detached 99ae914

Gen: Re-run script

commit
99ae9148bc678df2424e1572d28c7e539d250bac
author
Jeroen Wijenbergh · · 2025-10-16 14:31 UTC
parent
730f526
signature
SSH UnverifiedSHA256:8N5EoON8reSTMm461SyWlzRhib6IymBjUHb1p62kwyw The key is unknown
662 files · +68476 -17191
M v4/adw/adw-about-dialog.go +180 -11
@@ -175,6 +175,11 @@ func ShowAboutDialogFromAppdata(ParentVar *gtk.Widget, ResourcePathVar string, R
175 // To add information about other modules, such as application dependencies or175 // To add information about other modules, such as application dependencies or
176 // data, use [method@AboutDialog.add_legal_section].176 // data, use [method@AboutDialog.add_legal_section].
177 //177 //
178+// ## Other applications
179+//
180+// `AdwAboutDialog` can show links to your other apps at the end of the main
181+// page. To add them, use [method@AboutDialog.add_other_app].
182+//
178 // ## Constructing183 // ## Constructing
179 //184 //
180 // To make constructing an `AdwAboutDialog` as convenient as possible, you can185 // To make constructing an `AdwAboutDialog` as convenient as possible, you can
@@ -401,6 +406,33 @@ func (x *AboutDialog) AddLink(TitleVar string, UrlVar string) {
401 406
402 }407 }
403 408
409+var xAboutDialogAddOtherApp func(uintptr, string, string, string)
410+
411+// Adds another application to @self.
412+//
413+// The application will be displayed at the bottom of the main page, in a
414+// separate section. Each added application will be presented as a row with
415+// @title and @summary, as well as an icon with the name @appid. Clicking the
416+// row will show @appid in the software center app.
417+//
418+// This can be used to link to your other applications if you have multiple.
419+//
420+// Example:
421+//
422+// ```c
423+// adw_about_dialog_add_other_app (ADW_ABOUT_DIALOG (about),
424+//
425+// "org.gnome.Boxes",
426+// _("Boxes"),
427+// _("Virtualization made simple"));
428+//
429+// ```
430+func (x *AboutDialog) AddOtherApp(AppidVar string, NameVar string, SummaryVar string) {
431+
432+ xAboutDialogAddOtherApp(x.GoPointer(), AppidVar, NameVar, SummaryVar)
433+
434+}
435+
404 var xAboutDialogGetApplicationIcon func(uintptr) string436 var xAboutDialogGetApplicationIcon func(uintptr) string
405 437
406 // Gets the name of the application icon for @self.438 // Gets the name of the application icon for @self.
@@ -907,7 +939,8 @@ var xAboutDialogSetTranslatorCredits func(uintptr, string)
907 // should be marked as translatable.939 // should be marked as translatable.
908 //940 //
909 // The string may contain email addresses and URLs, see the introduction for941 // The string may contain email addresses and URLs, see the introduction for
910-// more details.942+// more details. When there is more than one translator, they must be
943+// separated by a newline in the same string.
911 //944 //
912 // See also:945 // See also:
913 //946 //
@@ -985,34 +1018,165 @@ func (x *AboutDialog) ConnectActivateLink(cb *func(AboutDialog, string) bool) ui
985 return gobject.SignalConnect(x.GoPointer(), "activate-link", cbRefPtr)1018 return gobject.SignalConnect(x.GoPointer(), "activate-link", cbRefPtr)
986 }1019 }
987 1020
988-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.1021+// Requests the user's screen reader to announce the given message.
1022+//
1023+// This kind of notification is useful for messages that
1024+// either have only a visual representation or that are not
1025+// exposed visually at all, e.g. a notification about a
1026+// successful operation.
1027+//
1028+// Also, by using this API, you can ensure that the message
1029+// does not interrupts the user's current screen reader output.
1030+func (x *AboutDialog) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
1031+
1032+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
1033+
1034+}
1035+
1036+// Retrieves the accessible parent for an accessible object.
1037+//
1038+// This function returns `NULL` for top level widgets.
1039+func (x *AboutDialog) GetAccessibleParent() *gtk.AccessibleBase {
1040+ var cls *gtk.AccessibleBase
1041+
1042+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
1043+
1044+ if cret == 0 {
1045+ return nil
1046+ }
1047+ cls = &gtk.AccessibleBase{}
1048+ cls.Ptr = cret
1049+ return cls
1050+}
1051+
1052+// Retrieves the accessible role of an accessible object.
989 func (x *AboutDialog) GetAccessibleRole() gtk.AccessibleRole {1053 func (x *AboutDialog) GetAccessibleRole() gtk.AccessibleRole {
990 1054
991 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())1055 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
992 return cret1056 return cret
993 }1057 }
994 1058
995-// Resets the accessible @property to its default value.1059+// Retrieves the implementation for the given accessible object.
1060+func (x *AboutDialog) GetAtContext() *gtk.ATContext {
1061+ var cls *gtk.ATContext
1062+
1063+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
1064+
1065+ if cret == 0 {
1066+ return nil
1067+ }
1068+ cls = &gtk.ATContext{}
1069+ cls.Ptr = cret
1070+ return cls
1071+}
1072+
1073+// Queries the coordinates and dimensions of this accessible
1074+//
1075+// This functionality can be overridden by `GtkAccessible`
1076+// implementations, e.g. to get the bounds from an ignored
1077+// child widget.
1078+func (x *AboutDialog) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
1079+
1080+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
1081+ return cret
1082+}
1083+
1084+// Retrieves the first accessible child of an accessible object.
1085+func (x *AboutDialog) GetFirstAccessibleChild() *gtk.AccessibleBase {
1086+ var cls *gtk.AccessibleBase
1087+
1088+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
1089+
1090+ if cret == 0 {
1091+ return nil
1092+ }
1093+ cls = &gtk.AccessibleBase{}
1094+ cls.Ptr = cret
1095+ return cls
1096+}
1097+
1098+// Retrieves the next accessible sibling of an accessible object
1099+func (x *AboutDialog) GetNextAccessibleSibling() *gtk.AccessibleBase {
1100+ var cls *gtk.AccessibleBase
1101+
1102+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
1103+
1104+ if cret == 0 {
1105+ return nil
1106+ }
1107+ cls = &gtk.AccessibleBase{}
1108+ cls.Ptr = cret
1109+ return cls
1110+}
1111+
1112+// Queries a platform state, such as focus.
1113+//
1114+// This functionality can be overridden by `GtkAccessible`
1115+// implementations, e.g. to get platform state from an ignored
1116+// child widget, as is the case for `GtkText` wrappers.
1117+func (x *AboutDialog) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
1118+
1119+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
1120+ return cret
1121+}
1122+
1123+// Resets the accessible property to its default value.
996 func (x *AboutDialog) ResetProperty(PropertyVar gtk.AccessibleProperty) {1124 func (x *AboutDialog) ResetProperty(PropertyVar gtk.AccessibleProperty) {
997 1125
998 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)1126 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
999 1127
1000 }1128 }
1001 1129
1002-// Resets the accessible @relation to its default value.1130+// Resets the accessible relation to its default value.
1003 func (x *AboutDialog) ResetRelation(RelationVar gtk.AccessibleRelation) {1131 func (x *AboutDialog) ResetRelation(RelationVar gtk.AccessibleRelation) {
1004 1132
1005 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)1133 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
1006 1134
1007 }1135 }
1008 1136
1009-// Resets the accessible @state to its default value.1137+// Resets the accessible state to its default value.
1010 func (x *AboutDialog) ResetState(StateVar gtk.AccessibleState) {1138 func (x *AboutDialog) ResetState(StateVar gtk.AccessibleState) {
1011 1139
1012 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)1140 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
1013 1141
1014 }1142 }
1015 1143
1144+// Sets the parent and sibling of an accessible object.
1145+//
1146+// This function is meant to be used by accessible implementations that are
1147+// not part of the widget hierarchy, and but act as a logical bridge between
1148+// widgets. For instance, if a widget creates an object that holds metadata
1149+// for each child, and you want that object to implement the `GtkAccessible`
1150+// interface, you will use this function to ensure that the parent of each
1151+// child widget is the metadata object, and the parent of each metadata
1152+// object is the container widget.
1153+func (x *AboutDialog) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
1154+
1155+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
1156+
1157+}
1158+
1159+// Updates the next accessible sibling.
1160+//
1161+// That might be useful when a new child of a custom accessible
1162+// is created, and it needs to be linked to a previous child.
1163+func (x *AboutDialog) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
1164+
1165+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
1166+
1167+}
1168+
1169+// Informs ATs that the platform state has changed.
1170+//
1171+// This function should be used by `GtkAccessible` implementations that
1172+// have a platform state but are not widgets. Widgets handle platform
1173+// states automatically.
1174+func (x *AboutDialog) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
1175+
1176+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
1177+
1178+}
1179+
1016 // Updates a list of accessible properties.1180 // Updates a list of accessible properties.
1017 //1181 //
1018 // See the [enum@Gtk.AccessibleProperty] documentation for the1182 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -1055,7 +1219,7 @@ func (x *AboutDialog) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gt
1055 // relation change must be communicated to assistive technologies.1219 // relation change must be communicated to assistive technologies.
1056 //1220 //
1057 // If the [enum@Gtk.AccessibleRelation] requires a list of references,1221 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
1058-// you should pass each reference individually, followed by %NULL, e.g.1222+// you should pass each reference individually, followed by `NULL`, e.g.
1059 //1223 //
1060 // ```c1224 // ```c
1061 // gtk_accessible_update_relation (accessible,1225 // gtk_accessible_update_relation (accessible,
@@ -1085,13 +1249,17 @@ func (x *AboutDialog) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.
1085 1249
1086 }1250 }
1087 1251
1088-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]1252+// Updates a list of accessible states.
1089-// documentation for the value types of accessible states.
1090 //1253 //
1091-// This function should be called by `GtkWidget` types whenever an accessible1254+// See the [enum@Gtk.AccessibleState] documentation for the
1092-// state change must be communicated to assistive technologies.1255+// value types of accessible states.
1256+//
1257+// This function should be called by `GtkWidget` types whenever
1258+// an accessible state change must be communicated to assistive
1259+// technologies.
1093 //1260 //
1094 // Example:1261 // Example:
1262+//
1095 // ```c1263 // ```c
1096 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;1264 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
1097 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),1265 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -1121,7 +1289,7 @@ func (x *AboutDialog) UpdateStateValue(NStatesVar int, StatesVar []gtk.Accessibl
1121 // Gets the ID of the @buildable object.1289 // Gets the ID of the @buildable object.
1122 //1290 //
1123 // `GtkBuilder` sets the name based on the ID attribute1291 // `GtkBuilder` sets the name based on the ID attribute
1124-// of the <object> tag used to construct the @buildable.1292+// of the `<object>` tag used to construct the @buildable.
1125 func (x *AboutDialog) GetBuildableId() string {1293 func (x *AboutDialog) GetBuildableId() string {
1126 1294
1127 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())1295 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
@@ -1148,6 +1316,7 @@ func init() {
1148 core.PuregoSafeRegister(&xAboutDialogAddCreditSection, lib, "adw_about_dialog_add_credit_section")1316 core.PuregoSafeRegister(&xAboutDialogAddCreditSection, lib, "adw_about_dialog_add_credit_section")
1149 core.PuregoSafeRegister(&xAboutDialogAddLegalSection, lib, "adw_about_dialog_add_legal_section")1317 core.PuregoSafeRegister(&xAboutDialogAddLegalSection, lib, "adw_about_dialog_add_legal_section")
1150 core.PuregoSafeRegister(&xAboutDialogAddLink, lib, "adw_about_dialog_add_link")1318 core.PuregoSafeRegister(&xAboutDialogAddLink, lib, "adw_about_dialog_add_link")
1319+ core.PuregoSafeRegister(&xAboutDialogAddOtherApp, lib, "adw_about_dialog_add_other_app")
1151 core.PuregoSafeRegister(&xAboutDialogGetApplicationIcon, lib, "adw_about_dialog_get_application_icon")1320 core.PuregoSafeRegister(&xAboutDialogGetApplicationIcon, lib, "adw_about_dialog_get_application_icon")
1152 core.PuregoSafeRegister(&xAboutDialogGetApplicationName, lib, "adw_about_dialog_get_application_name")1321 core.PuregoSafeRegister(&xAboutDialogGetApplicationName, lib, "adw_about_dialog_get_application_name")
1153 core.PuregoSafeRegister(&xAboutDialogGetArtists, lib, "adw_about_dialog_get_artists")1322 core.PuregoSafeRegister(&xAboutDialogGetArtists, lib, "adw_about_dialog_get_artists")
M v4/adw/adw-about-window.go +147 -11
@@ -909,7 +909,8 @@ var xAboutWindowSetTranslatorCredits func(uintptr, string)
909 // should be marked as translatable.909 // should be marked as translatable.
910 //910 //
911 // The string may contain email addresses and URLs, see the introduction for911 // The string may contain email addresses and URLs, see the introduction for
912-// more details.912+// more details. When there is more than one translator, they must be
913+// separated by a newline in the same string.
913 //914 //
914 // See also:915 // See also:
915 //916 //
@@ -987,34 +988,165 @@ func (x *AboutWindow) ConnectActivateLink(cb *func(AboutWindow, string) bool) ui
987 return gobject.SignalConnect(x.GoPointer(), "activate-link", cbRefPtr)988 return gobject.SignalConnect(x.GoPointer(), "activate-link", cbRefPtr)
988 }989 }
989 990
990-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.991+// Requests the user's screen reader to announce the given message.
992+//
993+// This kind of notification is useful for messages that
994+// either have only a visual representation or that are not
995+// exposed visually at all, e.g. a notification about a
996+// successful operation.
997+//
998+// Also, by using this API, you can ensure that the message
999+// does not interrupts the user's current screen reader output.
1000+func (x *AboutWindow) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
1001+
1002+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
1003+
1004+}
1005+
1006+// Retrieves the accessible parent for an accessible object.
1007+//
1008+// This function returns `NULL` for top level widgets.
1009+func (x *AboutWindow) GetAccessibleParent() *gtk.AccessibleBase {
1010+ var cls *gtk.AccessibleBase
1011+
1012+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
1013+
1014+ if cret == 0 {
1015+ return nil
1016+ }
1017+ cls = &gtk.AccessibleBase{}
1018+ cls.Ptr = cret
1019+ return cls
1020+}
1021+
1022+// Retrieves the accessible role of an accessible object.
991 func (x *AboutWindow) GetAccessibleRole() gtk.AccessibleRole {1023 func (x *AboutWindow) GetAccessibleRole() gtk.AccessibleRole {
992 1024
993 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())1025 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
994 return cret1026 return cret
995 }1027 }
996 1028
997-// Resets the accessible @property to its default value.1029+// Retrieves the implementation for the given accessible object.
1030+func (x *AboutWindow) GetAtContext() *gtk.ATContext {
1031+ var cls *gtk.ATContext
1032+
1033+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
1034+
1035+ if cret == 0 {
1036+ return nil
1037+ }
1038+ cls = &gtk.ATContext{}
1039+ cls.Ptr = cret
1040+ return cls
1041+}
1042+
1043+// Queries the coordinates and dimensions of this accessible
1044+//
1045+// This functionality can be overridden by `GtkAccessible`
1046+// implementations, e.g. to get the bounds from an ignored
1047+// child widget.
1048+func (x *AboutWindow) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
1049+
1050+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
1051+ return cret
1052+}
1053+
1054+// Retrieves the first accessible child of an accessible object.
1055+func (x *AboutWindow) GetFirstAccessibleChild() *gtk.AccessibleBase {
1056+ var cls *gtk.AccessibleBase
1057+
1058+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
1059+
1060+ if cret == 0 {
1061+ return nil
1062+ }
1063+ cls = &gtk.AccessibleBase{}
1064+ cls.Ptr = cret
1065+ return cls
1066+}
1067+
1068+// Retrieves the next accessible sibling of an accessible object
1069+func (x *AboutWindow) GetNextAccessibleSibling() *gtk.AccessibleBase {
1070+ var cls *gtk.AccessibleBase
1071+
1072+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
1073+
1074+ if cret == 0 {
1075+ return nil
1076+ }
1077+ cls = &gtk.AccessibleBase{}
1078+ cls.Ptr = cret
1079+ return cls
1080+}
1081+
1082+// Queries a platform state, such as focus.
1083+//
1084+// This functionality can be overridden by `GtkAccessible`
1085+// implementations, e.g. to get platform state from an ignored
1086+// child widget, as is the case for `GtkText` wrappers.
1087+func (x *AboutWindow) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
1088+
1089+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
1090+ return cret
1091+}
1092+
1093+// Resets the accessible property to its default value.
998 func (x *AboutWindow) ResetProperty(PropertyVar gtk.AccessibleProperty) {1094 func (x *AboutWindow) ResetProperty(PropertyVar gtk.AccessibleProperty) {
999 1095
1000 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)1096 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
1001 1097
1002 }1098 }
1003 1099
1004-// Resets the accessible @relation to its default value.1100+// Resets the accessible relation to its default value.
1005 func (x *AboutWindow) ResetRelation(RelationVar gtk.AccessibleRelation) {1101 func (x *AboutWindow) ResetRelation(RelationVar gtk.AccessibleRelation) {
1006 1102
1007 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)1103 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
1008 1104
1009 }1105 }
1010 1106
1011-// Resets the accessible @state to its default value.1107+// Resets the accessible state to its default value.
1012 func (x *AboutWindow) ResetState(StateVar gtk.AccessibleState) {1108 func (x *AboutWindow) ResetState(StateVar gtk.AccessibleState) {
1013 1109
1014 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)1110 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
1015 1111
1016 }1112 }
1017 1113
1114+// Sets the parent and sibling of an accessible object.
1115+//
1116+// This function is meant to be used by accessible implementations that are
1117+// not part of the widget hierarchy, and but act as a logical bridge between
1118+// widgets. For instance, if a widget creates an object that holds metadata
1119+// for each child, and you want that object to implement the `GtkAccessible`
1120+// interface, you will use this function to ensure that the parent of each
1121+// child widget is the metadata object, and the parent of each metadata
1122+// object is the container widget.
1123+func (x *AboutWindow) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
1124+
1125+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
1126+
1127+}
1128+
1129+// Updates the next accessible sibling.
1130+//
1131+// That might be useful when a new child of a custom accessible
1132+// is created, and it needs to be linked to a previous child.
1133+func (x *AboutWindow) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
1134+
1135+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
1136+
1137+}
1138+
1139+// Informs ATs that the platform state has changed.
1140+//
1141+// This function should be used by `GtkAccessible` implementations that
1142+// have a platform state but are not widgets. Widgets handle platform
1143+// states automatically.
1144+func (x *AboutWindow) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
1145+
1146+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
1147+
1148+}
1149+
1018 // Updates a list of accessible properties.1150 // Updates a list of accessible properties.
1019 //1151 //
1020 // See the [enum@Gtk.AccessibleProperty] documentation for the1152 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -1057,7 +1189,7 @@ func (x *AboutWindow) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gt
1057 // relation change must be communicated to assistive technologies.1189 // relation change must be communicated to assistive technologies.
1058 //1190 //
1059 // If the [enum@Gtk.AccessibleRelation] requires a list of references,1191 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
1060-// you should pass each reference individually, followed by %NULL, e.g.1192+// you should pass each reference individually, followed by `NULL`, e.g.
1061 //1193 //
1062 // ```c1194 // ```c
1063 // gtk_accessible_update_relation (accessible,1195 // gtk_accessible_update_relation (accessible,
@@ -1087,13 +1219,17 @@ func (x *AboutWindow) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.
1087 1219
1088 }1220 }
1089 1221
1090-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]1222+// Updates a list of accessible states.
1091-// documentation for the value types of accessible states.
1092 //1223 //
1093-// This function should be called by `GtkWidget` types whenever an accessible1224+// See the [enum@Gtk.AccessibleState] documentation for the
1094-// state change must be communicated to assistive technologies.1225+// value types of accessible states.
1226+//
1227+// This function should be called by `GtkWidget` types whenever
1228+// an accessible state change must be communicated to assistive
1229+// technologies.
1095 //1230 //
1096 // Example:1231 // Example:
1232+//
1097 // ```c1233 // ```c
1098 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;1234 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
1099 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),1235 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -1123,7 +1259,7 @@ func (x *AboutWindow) UpdateStateValue(NStatesVar int, StatesVar []gtk.Accessibl
1123 // Gets the ID of the @buildable object.1259 // Gets the ID of the @buildable object.
1124 //1260 //
1125 // `GtkBuilder` sets the name based on the ID attribute1261 // `GtkBuilder` sets the name based on the ID attribute
1126-// of the <object> tag used to construct the @buildable.1262+// of the `<object>` tag used to construct the @buildable.
1127 func (x *AboutWindow) GetBuildableId() string {1263 func (x *AboutWindow) GetBuildableId() string {
1128 1264
1129 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())1265 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-action-row.go +145 -10
@@ -340,34 +340,165 @@ func (x *ActionRow) ConnectActivated(cb *func(ActionRow)) uint32 {
340 return gobject.SignalConnect(x.GoPointer(), "activated", cbRefPtr)340 return gobject.SignalConnect(x.GoPointer(), "activated", cbRefPtr)
341 }341 }
342 342
343-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.343+// Requests the user's screen reader to announce the given message.
344+//
345+// This kind of notification is useful for messages that
346+// either have only a visual representation or that are not
347+// exposed visually at all, e.g. a notification about a
348+// successful operation.
349+//
350+// Also, by using this API, you can ensure that the message
351+// does not interrupts the user's current screen reader output.
352+func (x *ActionRow) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
353+
354+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
355+
356+}
357+
358+// Retrieves the accessible parent for an accessible object.
359+//
360+// This function returns `NULL` for top level widgets.
361+func (x *ActionRow) GetAccessibleParent() *gtk.AccessibleBase {
362+ var cls *gtk.AccessibleBase
363+
364+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
365+
366+ if cret == 0 {
367+ return nil
368+ }
369+ cls = &gtk.AccessibleBase{}
370+ cls.Ptr = cret
371+ return cls
372+}
373+
374+// Retrieves the accessible role of an accessible object.
344 func (x *ActionRow) GetAccessibleRole() gtk.AccessibleRole {375 func (x *ActionRow) GetAccessibleRole() gtk.AccessibleRole {
345 376
346 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())377 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
347 return cret378 return cret
348 }379 }
349 380
350-// Resets the accessible @property to its default value.381+// Retrieves the implementation for the given accessible object.
382+func (x *ActionRow) GetAtContext() *gtk.ATContext {
383+ var cls *gtk.ATContext
384+
385+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
386+
387+ if cret == 0 {
388+ return nil
389+ }
390+ cls = &gtk.ATContext{}
391+ cls.Ptr = cret
392+ return cls
393+}
394+
395+// Queries the coordinates and dimensions of this accessible
396+//
397+// This functionality can be overridden by `GtkAccessible`
398+// implementations, e.g. to get the bounds from an ignored
399+// child widget.
400+func (x *ActionRow) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
401+
402+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
403+ return cret
404+}
405+
406+// Retrieves the first accessible child of an accessible object.
407+func (x *ActionRow) GetFirstAccessibleChild() *gtk.AccessibleBase {
408+ var cls *gtk.AccessibleBase
409+
410+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
411+
412+ if cret == 0 {
413+ return nil
414+ }
415+ cls = &gtk.AccessibleBase{}
416+ cls.Ptr = cret
417+ return cls
418+}
419+
420+// Retrieves the next accessible sibling of an accessible object
421+func (x *ActionRow) GetNextAccessibleSibling() *gtk.AccessibleBase {
422+ var cls *gtk.AccessibleBase
423+
424+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
425+
426+ if cret == 0 {
427+ return nil
428+ }
429+ cls = &gtk.AccessibleBase{}
430+ cls.Ptr = cret
431+ return cls
432+}
433+
434+// Queries a platform state, such as focus.
435+//
436+// This functionality can be overridden by `GtkAccessible`
437+// implementations, e.g. to get platform state from an ignored
438+// child widget, as is the case for `GtkText` wrappers.
439+func (x *ActionRow) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
440+
441+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
442+ return cret
443+}
444+
445+// Resets the accessible property to its default value.
351 func (x *ActionRow) ResetProperty(PropertyVar gtk.AccessibleProperty) {446 func (x *ActionRow) ResetProperty(PropertyVar gtk.AccessibleProperty) {
352 447
353 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)448 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
354 449
355 }450 }
356 451
357-// Resets the accessible @relation to its default value.452+// Resets the accessible relation to its default value.
358 func (x *ActionRow) ResetRelation(RelationVar gtk.AccessibleRelation) {453 func (x *ActionRow) ResetRelation(RelationVar gtk.AccessibleRelation) {
359 454
360 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)455 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
361 456
362 }457 }
363 458
364-// Resets the accessible @state to its default value.459+// Resets the accessible state to its default value.
365 func (x *ActionRow) ResetState(StateVar gtk.AccessibleState) {460 func (x *ActionRow) ResetState(StateVar gtk.AccessibleState) {
366 461
367 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)462 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
368 463
369 }464 }
370 465
466+// Sets the parent and sibling of an accessible object.
467+//
468+// This function is meant to be used by accessible implementations that are
469+// not part of the widget hierarchy, and but act as a logical bridge between
470+// widgets. For instance, if a widget creates an object that holds metadata
471+// for each child, and you want that object to implement the `GtkAccessible`
472+// interface, you will use this function to ensure that the parent of each
473+// child widget is the metadata object, and the parent of each metadata
474+// object is the container widget.
475+func (x *ActionRow) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
476+
477+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
478+
479+}
480+
481+// Updates the next accessible sibling.
482+//
483+// That might be useful when a new child of a custom accessible
484+// is created, and it needs to be linked to a previous child.
485+func (x *ActionRow) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
486+
487+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
488+
489+}
490+
491+// Informs ATs that the platform state has changed.
492+//
493+// This function should be used by `GtkAccessible` implementations that
494+// have a platform state but are not widgets. Widgets handle platform
495+// states automatically.
496+func (x *ActionRow) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
497+
498+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
499+
500+}
501+
371 // Updates a list of accessible properties.502 // Updates a list of accessible properties.
372 //503 //
373 // See the [enum@Gtk.AccessibleProperty] documentation for the504 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -410,7 +541,7 @@ func (x *ActionRow) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.
410 // relation change must be communicated to assistive technologies.541 // relation change must be communicated to assistive technologies.
411 //542 //
412 // If the [enum@Gtk.AccessibleRelation] requires a list of references,543 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
413-// you should pass each reference individually, followed by %NULL, e.g.544+// you should pass each reference individually, followed by `NULL`, e.g.
414 //545 //
415 // ```c546 // ```c
416 // gtk_accessible_update_relation (accessible,547 // gtk_accessible_update_relation (accessible,
@@ -440,13 +571,17 @@ func (x *ActionRow) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.Ac
440 571
441 }572 }
442 573
443-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]574+// Updates a list of accessible states.
444-// documentation for the value types of accessible states.
445 //575 //
446-// This function should be called by `GtkWidget` types whenever an accessible576+// See the [enum@Gtk.AccessibleState] documentation for the
447-// state change must be communicated to assistive technologies.577+// value types of accessible states.
578+//
579+// This function should be called by `GtkWidget` types whenever
580+// an accessible state change must be communicated to assistive
581+// technologies.
448 //582 //
449 // Example:583 // Example:
584+//
450 // ```c585 // ```c
451 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;586 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
452 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),587 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -559,7 +694,7 @@ func (x *ActionRow) SetDetailedActionName(DetailedActionNameVar string) {
559 // Gets the ID of the @buildable object.694 // Gets the ID of the @buildable object.
560 //695 //
561 // `GtkBuilder` sets the name based on the ID attribute696 // `GtkBuilder` sets the name based on the ID attribute
562-// of the <object> tag used to construct the @buildable.697+// of the `<object>` tag used to construct the @buildable.
563 func (x *ActionRow) GetBuildableId() string {698 func (x *ActionRow) GetBuildableId() string {
564 699
565 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())700 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-alert-dialog.go +151 -13
@@ -561,10 +561,13 @@ var xAlertDialogSetDefaultResponse func(uintptr, string)
561 561
562 // Sets the ID of the default response of @self.562 // Sets the ID of the default response of @self.
563 //563 //
564-// If set, pressing <kbd>Enter</kbd> will activate the corresponding button.564+// The button corresponding to this response will be set as the default widget
565+// of @self.
565 //566 //
566-// If set to `NULL` or to a non-existent response ID, pressing <kbd>Enter</kbd>567+// If not set, the default widget will not be set, and the last added response
567-// will do nothing.568+// will be focused by default.
569+//
570+// See [property@Dialog:default-widget].
568 func (x *AlertDialog) SetDefaultResponse(ResponseVar string) {571 func (x *AlertDialog) SetDefaultResponse(ResponseVar string) {
569 572
570 xAlertDialogSetDefaultResponse(x.GoPointer(), ResponseVar)573 xAlertDialogSetDefaultResponse(x.GoPointer(), ResponseVar)
@@ -709,34 +712,165 @@ func (x *AlertDialog) ConnectResponse(cb *func(AlertDialog, string)) uint32 {
709 return gobject.SignalConnect(x.GoPointer(), "response", cbRefPtr)712 return gobject.SignalConnect(x.GoPointer(), "response", cbRefPtr)
710 }713 }
711 714
712-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.715+// Requests the user's screen reader to announce the given message.
716+//
717+// This kind of notification is useful for messages that
718+// either have only a visual representation or that are not
719+// exposed visually at all, e.g. a notification about a
720+// successful operation.
721+//
722+// Also, by using this API, you can ensure that the message
723+// does not interrupts the user's current screen reader output.
724+func (x *AlertDialog) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
725+
726+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
727+
728+}
729+
730+// Retrieves the accessible parent for an accessible object.
731+//
732+// This function returns `NULL` for top level widgets.
733+func (x *AlertDialog) GetAccessibleParent() *gtk.AccessibleBase {
734+ var cls *gtk.AccessibleBase
735+
736+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
737+
738+ if cret == 0 {
739+ return nil
740+ }
741+ cls = &gtk.AccessibleBase{}
742+ cls.Ptr = cret
743+ return cls
744+}
745+
746+// Retrieves the accessible role of an accessible object.
713 func (x *AlertDialog) GetAccessibleRole() gtk.AccessibleRole {747 func (x *AlertDialog) GetAccessibleRole() gtk.AccessibleRole {
714 748
715 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())749 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
716 return cret750 return cret
717 }751 }
718 752
719-// Resets the accessible @property to its default value.753+// Retrieves the implementation for the given accessible object.
754+func (x *AlertDialog) GetAtContext() *gtk.ATContext {
755+ var cls *gtk.ATContext
756+
757+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
758+
759+ if cret == 0 {
760+ return nil
761+ }
762+ cls = &gtk.ATContext{}
763+ cls.Ptr = cret
764+ return cls
765+}
766+
767+// Queries the coordinates and dimensions of this accessible
768+//
769+// This functionality can be overridden by `GtkAccessible`
770+// implementations, e.g. to get the bounds from an ignored
771+// child widget.
772+func (x *AlertDialog) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
773+
774+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
775+ return cret
776+}
777+
778+// Retrieves the first accessible child of an accessible object.
779+func (x *AlertDialog) GetFirstAccessibleChild() *gtk.AccessibleBase {
780+ var cls *gtk.AccessibleBase
781+
782+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
783+
784+ if cret == 0 {
785+ return nil
786+ }
787+ cls = &gtk.AccessibleBase{}
788+ cls.Ptr = cret
789+ return cls
790+}
791+
792+// Retrieves the next accessible sibling of an accessible object
793+func (x *AlertDialog) GetNextAccessibleSibling() *gtk.AccessibleBase {
794+ var cls *gtk.AccessibleBase
795+
796+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
797+
798+ if cret == 0 {
799+ return nil
800+ }
801+ cls = &gtk.AccessibleBase{}
802+ cls.Ptr = cret
803+ return cls
804+}
805+
806+// Queries a platform state, such as focus.
807+//
808+// This functionality can be overridden by `GtkAccessible`
809+// implementations, e.g. to get platform state from an ignored
810+// child widget, as is the case for `GtkText` wrappers.
811+func (x *AlertDialog) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
812+
813+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
814+ return cret
815+}
816+
817+// Resets the accessible property to its default value.
720 func (x *AlertDialog) ResetProperty(PropertyVar gtk.AccessibleProperty) {818 func (x *AlertDialog) ResetProperty(PropertyVar gtk.AccessibleProperty) {
721 819
722 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)820 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
723 821
724 }822 }
725 823
726-// Resets the accessible @relation to its default value.824+// Resets the accessible relation to its default value.
727 func (x *AlertDialog) ResetRelation(RelationVar gtk.AccessibleRelation) {825 func (x *AlertDialog) ResetRelation(RelationVar gtk.AccessibleRelation) {
728 826
729 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)827 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
730 828
731 }829 }
732 830
733-// Resets the accessible @state to its default value.831+// Resets the accessible state to its default value.
734 func (x *AlertDialog) ResetState(StateVar gtk.AccessibleState) {832 func (x *AlertDialog) ResetState(StateVar gtk.AccessibleState) {
735 833
736 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)834 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
737 835
738 }836 }
739 837
838+// Sets the parent and sibling of an accessible object.
839+//
840+// This function is meant to be used by accessible implementations that are
841+// not part of the widget hierarchy, and but act as a logical bridge between
842+// widgets. For instance, if a widget creates an object that holds metadata
843+// for each child, and you want that object to implement the `GtkAccessible`
844+// interface, you will use this function to ensure that the parent of each
845+// child widget is the metadata object, and the parent of each metadata
846+// object is the container widget.
847+func (x *AlertDialog) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
848+
849+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
850+
851+}
852+
853+// Updates the next accessible sibling.
854+//
855+// That might be useful when a new child of a custom accessible
856+// is created, and it needs to be linked to a previous child.
857+func (x *AlertDialog) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
858+
859+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
860+
861+}
862+
863+// Informs ATs that the platform state has changed.
864+//
865+// This function should be used by `GtkAccessible` implementations that
866+// have a platform state but are not widgets. Widgets handle platform
867+// states automatically.
868+func (x *AlertDialog) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
869+
870+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
871+
872+}
873+
740 // Updates a list of accessible properties.874 // Updates a list of accessible properties.
741 //875 //
742 // See the [enum@Gtk.AccessibleProperty] documentation for the876 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -779,7 +913,7 @@ func (x *AlertDialog) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gt
779 // relation change must be communicated to assistive technologies.913 // relation change must be communicated to assistive technologies.
780 //914 //
781 // If the [enum@Gtk.AccessibleRelation] requires a list of references,915 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
782-// you should pass each reference individually, followed by %NULL, e.g.916+// you should pass each reference individually, followed by `NULL`, e.g.
783 //917 //
784 // ```c918 // ```c
785 // gtk_accessible_update_relation (accessible,919 // gtk_accessible_update_relation (accessible,
@@ -809,13 +943,17 @@ func (x *AlertDialog) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.
809 943
810 }944 }
811 945
812-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]946+// Updates a list of accessible states.
813-// documentation for the value types of accessible states.
814 //947 //
815-// This function should be called by `GtkWidget` types whenever an accessible948+// See the [enum@Gtk.AccessibleState] documentation for the
816-// state change must be communicated to assistive technologies.949+// value types of accessible states.
950+//
951+// This function should be called by `GtkWidget` types whenever
952+// an accessible state change must be communicated to assistive
953+// technologies.
817 //954 //
818 // Example:955 // Example:
956+//
819 // ```c957 // ```c
820 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;958 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
821 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),959 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -845,7 +983,7 @@ func (x *AlertDialog) UpdateStateValue(NStatesVar int, StatesVar []gtk.Accessibl
845 // Gets the ID of the @buildable object.983 // Gets the ID of the @buildable object.
846 //984 //
847 // `GtkBuilder` sets the name based on the ID attribute985 // `GtkBuilder` sets the name based on the ID attribute
848-// of the <object> tag used to construct the @buildable.986+// of the `<object>` tag used to construct the @buildable.
849 func (x *AlertDialog) GetBuildableId() string {987 func (x *AlertDialog) GetBuildableId() string {
850 988
851 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())989 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-application-window.go +261 -67
@@ -105,6 +105,15 @@ func (x *ApplicationWindow) AddBreakpoint(BreakpointVar *Breakpoint) {
105 105
106 }106 }
107 107
108+var xApplicationWindowGetAdaptivePreview func(uintptr) bool
109+
110+// Gets whether adaptive preview for @self is currently open.
111+func (x *ApplicationWindow) GetAdaptivePreview() bool {
112+
113+ cret := xApplicationWindowGetAdaptivePreview(x.GoPointer())
114+ return cret
115+}
116+
108 var xApplicationWindowGetContent func(uintptr) uintptr117 var xApplicationWindowGetContent func(uintptr) uintptr
109 118
110 // Gets the content widget of @self.119 // Gets the content widget of @self.
@@ -176,6 +185,23 @@ func (x *ApplicationWindow) GetVisibleDialog() *Dialog {
176 return cls185 return cls
177 }186 }
178 187
188+var xApplicationWindowSetAdaptivePreview func(uintptr, bool)
189+
190+// Sets whether adaptive preview for @self is currently open.
191+//
192+// Adaptive preview is a debugging tool used for testing the window
193+// contents at specific screen sizes, simulating mobile environment.
194+//
195+// Adaptive preview can always be accessed from inspector. This function
196+// allows applications to open it manually.
197+//
198+// Most applications should not use this function.
199+func (x *ApplicationWindow) SetAdaptivePreview(AdaptivePreviewVar bool) {
200+
201+ xApplicationWindowSetAdaptivePreview(x.GoPointer(), AdaptivePreviewVar)
202+
203+}
204+
179 var xApplicationWindowSetContent func(uintptr, uintptr)205 var xApplicationWindowSetContent func(uintptr, uintptr)
180 206
181 // Sets the content widget of @self.207 // Sets the content widget of @self.
@@ -198,36 +224,36 @@ func (c *ApplicationWindow) SetGoPointer(ptr uintptr) {
198 c.Ptr = ptr224 c.Ptr = ptr
199 }225 }
200 226
201-// Emits the #GActionGroup::action-added signal on @action_group.227+// Emits the [signal@Gio.ActionGroup::action-added] signal on @action_group.
202 //228 //
203-// This function should only be called by #GActionGroup implementations.229+// This function should only be called by [type@Gio.ActionGroup] implementations.
204 func (x *ApplicationWindow) ActionAdded(ActionNameVar string) {230 func (x *ApplicationWindow) ActionAdded(ActionNameVar string) {
205 231
206 gio.XGActionGroupActionAdded(x.GoPointer(), ActionNameVar)232 gio.XGActionGroupActionAdded(x.GoPointer(), ActionNameVar)
207 233
208 }234 }
209 235
210-// Emits the #GActionGroup::action-enabled-changed signal on @action_group.236+// Emits the [signal@Gio.ActionGroup::action-enabled-changed] signal on @action_group.
211 //237 //
212-// This function should only be called by #GActionGroup implementations.238+// This function should only be called by [type@Gio.ActionGroup] implementations.
213 func (x *ApplicationWindow) ActionEnabledChanged(ActionNameVar string, EnabledVar bool) {239 func (x *ApplicationWindow) ActionEnabledChanged(ActionNameVar string, EnabledVar bool) {
214 240
215 gio.XGActionGroupActionEnabledChanged(x.GoPointer(), ActionNameVar, EnabledVar)241 gio.XGActionGroupActionEnabledChanged(x.GoPointer(), ActionNameVar, EnabledVar)
216 242
217 }243 }
218 244
219-// Emits the #GActionGroup::action-removed signal on @action_group.245+// Emits the [signal@Gio.ActionGroup::action-removed] signal on @action_group.
220 //246 //
221-// This function should only be called by #GActionGroup implementations.247+// This function should only be called by [type@Gio.ActionGroup] implementations.
222 func (x *ApplicationWindow) ActionRemoved(ActionNameVar string) {248 func (x *ApplicationWindow) ActionRemoved(ActionNameVar string) {
223 249
224 gio.XGActionGroupActionRemoved(x.GoPointer(), ActionNameVar)250 gio.XGActionGroupActionRemoved(x.GoPointer(), ActionNameVar)
225 251
226 }252 }
227 253
228-// Emits the #GActionGroup::action-state-changed signal on @action_group.254+// Emits the [signal@Gio.ActionGroup::action-state-changed] signal on @action_group.
229 //255 //
230-// This function should only be called by #GActionGroup implementations.256+// This function should only be called by [type@Gio.ActionGroup] implementations.
231 func (x *ApplicationWindow) ActionStateChanged(ActionNameVar string, StateVar *glib.Variant) {257 func (x *ApplicationWindow) ActionStateChanged(ActionNameVar string, StateVar *glib.Variant) {
232 258
233 gio.XGActionGroupActionStateChanged(x.GoPointer(), ActionNameVar, StateVar)259 gio.XGActionGroupActionStateChanged(x.GoPointer(), ActionNameVar, StateVar)
@@ -238,35 +264,35 @@ func (x *ApplicationWindow) ActionStateChanged(ActionNameVar string, StateVar *g
238 //264 //
239 // If the action is expecting a parameter, then the correct type of265 // If the action is expecting a parameter, then the correct type of
240 // parameter must be given as @parameter. If the action is expecting no266 // parameter must be given as @parameter. If the action is expecting no
241-// parameters then @parameter must be %NULL. See267+// parameters then @parameter must be `NULL`. See
242-// g_action_group_get_action_parameter_type().268+// [method@Gio.ActionGroup.get_action_parameter_type].
243 //269 //
244-// If the #GActionGroup implementation supports asynchronous remote270+// If the [type@Gio.ActionGroup] implementation supports asynchronous remote
245 // activation over D-Bus, this call may return before the relevant271 // activation over D-Bus, this call may return before the relevant
246 // D-Bus traffic has been sent, or any replies have been received. In272 // D-Bus traffic has been sent, or any replies have been received. In
247 // order to block on such asynchronous activation calls,273 // order to block on such asynchronous activation calls,
248-// g_dbus_connection_flush() should be called prior to the code, which274+// [method@Gio.DBusConnection.flush] should be called prior to the code, which
249 // depends on the result of the action activation. Without flushing275 // depends on the result of the action activation. Without flushing
250 // the D-Bus connection, there is no guarantee that the action would276 // the D-Bus connection, there is no guarantee that the action would
251 // have been activated.277 // have been activated.
252 //278 //
253 // The following code which runs in a remote app instance, shows an279 // The following code which runs in a remote app instance, shows an
254-// example of a "quit" action being activated on the primary app280+// example of a ‘quit’ action being activated on the primary app
255-// instance over D-Bus. Here g_dbus_connection_flush() is called281+// instance over D-Bus. Here [method@Gio.DBusConnection.flush] is called
256-// before `exit()`. Without g_dbus_connection_flush(), the "quit" action282+// before `exit()`. Without `g_dbus_connection_flush()`, the ‘quit’ action
257 // may fail to be activated on the primary instance.283 // may fail to be activated on the primary instance.
258 //284 //
259-// |[<!-- language="C" -->285+// ```c
260-// // call "quit" action on primary instance286+// // call ‘quit’ action on primary instance
261 // g_action_group_activate_action (G_ACTION_GROUP (app), "quit", NULL);287 // g_action_group_activate_action (G_ACTION_GROUP (app), "quit", NULL);
262 //288 //
263 // // make sure the action is activated now289 // // make sure the action is activated now
264-// g_dbus_connection_flush (...);290+// g_dbus_connection_flush (…);
265 //291 //
266-// g_debug ("application has been terminated. exiting.");292+// g_debug ("Application has been terminated. Exiting.");
267 //293 //
268 // exit (0);294 // exit (0);
269-// ]|295+// ```
270 func (x *ApplicationWindow) ActivateAction(ActionNameVar string, ParameterVar *glib.Variant) {296 func (x *ApplicationWindow) ActivateAction(ActionNameVar string, ParameterVar *glib.Variant) {
271 297
272 gio.XGActionGroupActivateAction(x.GoPointer(), ActionNameVar, ParameterVar)298 gio.XGActionGroupActivateAction(x.GoPointer(), ActionNameVar, ParameterVar)
@@ -277,11 +303,11 @@ func (x *ApplicationWindow) ActivateAction(ActionNameVar string, ParameterVar *g
277 // changed to @value.303 // changed to @value.
278 //304 //
279 // The action must be stateful and @value must be of the correct type.305 // The action must be stateful and @value must be of the correct type.
280-// See g_action_group_get_action_state_type().306+// See [method@Gio.ActionGroup.get_action_state_type].
281 //307 //
282 // This call merely requests a change. The action may refuse to change308 // This call merely requests a change. The action may refuse to change
283 // its state or may change its state to something other than @value.309 // its state or may change its state to something other than @value.
284-// See g_action_group_get_action_state_hint().310+// See [method@Gio.ActionGroup.get_action_state_hint].
285 //311 //
286 // If the @value GVariant is floating, it is consumed.312 // If the @value GVariant is floating, it is consumed.
287 func (x *ApplicationWindow) ChangeActionState(ActionNameVar string, ValueVar *glib.Variant) {313 func (x *ApplicationWindow) ChangeActionState(ActionNameVar string, ValueVar *glib.Variant) {
@@ -303,12 +329,12 @@ func (x *ApplicationWindow) GetActionEnabled(ActionNameVar string) bool {
303 // Queries the type of the parameter that must be given when activating329 // Queries the type of the parameter that must be given when activating
304 // the named action within @action_group.330 // the named action within @action_group.
305 //331 //
306-// When activating the action using g_action_group_activate_action(),332+// When activating the action using [method@Gio.ActionGroup.activate_action],
307-// the #GVariant given to that function must be of the type returned333+// the [type@GLib.Variant] given to that function must be of the type returned
308 // by this function.334 // by this function.
309 //335 //
310-// In the case that this function returns %NULL, you must not give any336+// In the case that this function returns `NULL`, you must not give any
311-// #GVariant, but %NULL instead.337+// [type@GLib.Variant], but `NULL` instead.
312 //338 //
313 // The parameter type of a particular action will never change but it is339 // The parameter type of a particular action will never change but it is
314 // possible for an action to be removed and for a new action to be added340 // possible for an action to be removed and for a new action to be added
@@ -321,12 +347,12 @@ func (x *ApplicationWindow) GetActionParameterType(ActionNameVar string) *glib.V
321 347
322 // Queries the current state of the named action within @action_group.348 // Queries the current state of the named action within @action_group.
323 //349 //
324-// If the action is not stateful then %NULL will be returned. If the350+// If the action is not stateful then `NULL` will be returned. If the
325 // action is stateful then the type of the return value is the type351 // action is stateful then the type of the return value is the type
326-// given by g_action_group_get_action_state_type().352+// given by [method@Gio.ActionGroup.get_action_state_type].
327 //353 //
328-// The return value (if non-%NULL) should be freed with354+// The return value (if non-`NULL`) should be freed with
329-// g_variant_unref() when it is no longer required.355+// [method@GLib.Variant.unref] when it is no longer required.
330 func (x *ApplicationWindow) GetActionState(ActionNameVar string) *glib.Variant {356 func (x *ApplicationWindow) GetActionState(ActionNameVar string) *glib.Variant {
331 357
332 cret := gio.XGActionGroupGetActionState(x.GoPointer(), ActionNameVar)358 cret := gio.XGActionGroupGetActionState(x.GoPointer(), ActionNameVar)
@@ -336,12 +362,12 @@ func (x *ApplicationWindow) GetActionState(ActionNameVar string) *glib.Variant {
336 // Requests a hint about the valid range of values for the state of the362 // Requests a hint about the valid range of values for the state of the
337 // named action within @action_group.363 // named action within @action_group.
338 //364 //
339-// If %NULL is returned it either means that the action is not stateful365+// If `NULL` is returned it either means that the action is not stateful
340 // or that there is no hint about the valid range of values for the366 // or that there is no hint about the valid range of values for the
341 // state of the action.367 // state of the action.
342 //368 //
343-// If a #GVariant array is returned then each item in the array is a369+// If a [type@GLib.Variant] array is returned then each item in the array is a
344-// possible value for the state. If a #GVariant pair (ie: two-tuple) is370+// possible value for the state. If a [type@GLib.Variant] pair (ie: two-tuple) is
345 // returned then the tuple specifies the inclusive lower and upper bound371 // returned then the tuple specifies the inclusive lower and upper bound
346 // of valid values for the state.372 // of valid values for the state.
347 //373 //
@@ -349,8 +375,8 @@ func (x *ApplicationWindow) GetActionState(ActionNameVar string) *glib.Variant {
349 // have a state value outside of the hinted range and setting a value375 // have a state value outside of the hinted range and setting a value
350 // within the range may fail.376 // within the range may fail.
351 //377 //
352-// The return value (if non-%NULL) should be freed with378+// The return value (if non-`NULL`) should be freed with
353-// g_variant_unref() when it is no longer required.379+// [method@GLib.Variant.unref] when it is no longer required.
354 func (x *ApplicationWindow) GetActionStateHint(ActionNameVar string) *glib.Variant {380 func (x *ApplicationWindow) GetActionStateHint(ActionNameVar string) *glib.Variant {
355 381
356 cret := gio.XGActionGroupGetActionStateHint(x.GoPointer(), ActionNameVar)382 cret := gio.XGActionGroupGetActionStateHint(x.GoPointer(), ActionNameVar)
@@ -361,14 +387,14 @@ func (x *ApplicationWindow) GetActionStateHint(ActionNameVar string) *glib.Varia
361 // @action_group.387 // @action_group.
362 //388 //
363 // If the action is stateful then this function returns the389 // If the action is stateful then this function returns the
364-// #GVariantType of the state. All calls to390+// [type@GLib.VariantType] of the state. All calls to
365-// g_action_group_change_action_state() must give a #GVariant of this391+// [method@Gio.ActionGroup.change_action_state] must give a [type@GLib.Variant] of this
366-// type and g_action_group_get_action_state() will return a #GVariant392+// type and [method@Gio.ActionGroup.get_action_state] will return a [type@GLib.Variant]
367 // of the same type.393 // of the same type.
368 //394 //
369-// If the action is not stateful then this function will return %NULL.395+// If the action is not stateful then this function will return `NULL`.
370-// In that case, g_action_group_get_action_state() will return %NULL396+// In that case, [method@Gio.ActionGroup.get_action_state] will return `NULL`
371-// and you must not call g_action_group_change_action_state().397+// and you must not call [method@Gio.ActionGroup.change_action_state].
372 //398 //
373 // The state type of a particular action will never change but it is399 // The state type of a particular action will never change but it is
374 // possible for an action to be removed and for a new action to be added400 // possible for an action to be removed and for a new action to be added
@@ -388,7 +414,7 @@ func (x *ApplicationWindow) HasAction(ActionNameVar string) bool {
388 414
389 // Lists the actions contained within @action_group.415 // Lists the actions contained within @action_group.
390 //416 //
391-// The caller is responsible for freeing the list with g_strfreev() when417+// The caller is responsible for freeing the list with [func@GLib.strfreev] when
392 // it is no longer required.418 // it is no longer required.
393 func (x *ApplicationWindow) ListActions() []string {419 func (x *ApplicationWindow) ListActions() []string {
394 420
@@ -399,18 +425,18 @@ func (x *ApplicationWindow) ListActions() []string {
399 // Queries all aspects of the named action within an @action_group.425 // Queries all aspects of the named action within an @action_group.
400 //426 //
401 // This function acquires the information available from427 // This function acquires the information available from
402-// g_action_group_has_action(), g_action_group_get_action_enabled(),428+// [method@Gio.ActionGroup.has_action], [method@Gio.ActionGroup.get_action_enabled],
403-// g_action_group_get_action_parameter_type(),429+// [method@Gio.ActionGroup.get_action_parameter_type],
404-// g_action_group_get_action_state_type(),430+// [method@Gio.ActionGroup.get_action_state_type],
405-// g_action_group_get_action_state_hint() and431+// [method@Gio.ActionGroup.get_action_state_hint] and
406-// g_action_group_get_action_state() with a single function call.432+// [method@Gio.ActionGroup.get_action_state] with a single function call.
407 //433 //
408 // This provides two main benefits.434 // This provides two main benefits.
409 //435 //
410 // The first is the improvement in efficiency that comes with not having436 // The first is the improvement in efficiency that comes with not having
411 // to perform repeated lookups of the action in order to discover437 // to perform repeated lookups of the action in order to discover
412 // different things about it. The second is that implementing438 // different things about it. The second is that implementing
413-// #GActionGroup can now be done by only overriding this one virtual439+// [type@Gio.ActionGroup] can now be done by only overriding this one virtual
414 // function.440 // function.
415 //441 //
416 // The interface provides a default implementation of this function that442 // The interface provides a default implementation of this function that
@@ -419,9 +445,9 @@ func (x *ApplicationWindow) ListActions() []string {
419 // those functions that call this function. All implementations,445 // those functions that call this function. All implementations,
420 // therefore, must override either this function or all of the others.446 // therefore, must override either this function or all of the others.
421 //447 //
422-// If the action exists, %TRUE is returned and any of the requested448+// If the action exists, `TRUE` is returned and any of the requested
423-// fields (as indicated by having a non-%NULL reference passed in) are449+// fields (as indicated by having a non-`NULL` reference passed in) are
424-// filled. If the action doesn't exist, %FALSE is returned and the450+// filled. If the action doesn’t exist, `FALSE` is returned and the
425 // fields may or may not have been modified.451 // fields may or may not have been modified.
426 func (x *ApplicationWindow) QueryAction(ActionNameVar string, EnabledVar bool, ParameterTypeVar **glib.VariantType, StateTypeVar **glib.VariantType, StateHintVar **glib.Variant, StateVar **glib.Variant) bool {452 func (x *ApplicationWindow) QueryAction(ActionNameVar string, EnabledVar bool, ParameterTypeVar **glib.VariantType, StateTypeVar **glib.VariantType, StateHintVar **glib.Variant, StateVar **glib.Variant) bool {
427 453
@@ -441,12 +467,12 @@ func (x *ApplicationWindow) AddAction(ActionVar gio.Action) {
441 467
442 }468 }
443 469
444-// A convenience function for creating multiple #GSimpleAction instances470+// A convenience function for creating multiple [class@Gio.SimpleAction]
445-// and adding them to a #GActionMap.471+// instances and adding them to a [iface@Gio.ActionMap].
446 //472 //
447-// Each action is constructed as per one #GActionEntry.473+// Each action is constructed as per one [struct@Gio.ActionEntry].
448 //474 //
449-// |[<!-- language="C" -->475+// ```c
450 // static void476 // static void
451 // activate_quit (GSimpleAction *simple,477 // activate_quit (GSimpleAction *simple,
452 //478 //
@@ -483,7 +509,7 @@ func (x *ApplicationWindow) AddAction(ActionVar gio.Action) {
483 // return G_ACTION_GROUP (group);509 // return G_ACTION_GROUP (group);
484 // }510 // }
485 //511 //
486-// ]|512+// ```
487 func (x *ApplicationWindow) AddActionEntries(EntriesVar []gio.ActionEntry, NEntriesVar int, UserDataVar uintptr) {513 func (x *ApplicationWindow) AddActionEntries(EntriesVar []gio.ActionEntry, NEntriesVar int, UserDataVar uintptr) {
488 514
489 gio.XGActionMapAddActionEntries(x.GoPointer(), EntriesVar, NEntriesVar, UserDataVar)515 gio.XGActionMapAddActionEntries(x.GoPointer(), EntriesVar, NEntriesVar, UserDataVar)
@@ -492,7 +518,7 @@ func (x *ApplicationWindow) AddActionEntries(EntriesVar []gio.ActionEntry, NEntr
492 518
493 // Looks up the action with the name @action_name in @action_map.519 // Looks up the action with the name @action_name in @action_map.
494 //520 //
495-// If no such action exists, returns %NULL.521+// If no such action exists, returns `NULL`.
496 func (x *ApplicationWindow) LookupAction(ActionNameVar string) *gio.ActionBase {522 func (x *ApplicationWindow) LookupAction(ActionNameVar string) *gio.ActionBase {
497 var cls *gio.ActionBase523 var cls *gio.ActionBase
498 524
@@ -516,34 +542,196 @@ func (x *ApplicationWindow) RemoveAction(ActionNameVar string) {
516 542
517 }543 }
518 544
519-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.545+// Remove actions from a [iface@Gio.ActionMap]. This is meant as the reverse of
546+// [method@Gio.ActionMap.add_action_entries].
547+//
548+// ```c
549+//
550+// static const GActionEntry entries[] = {
551+// { "quit", activate_quit },
552+// { "print-string", activate_print_string, "s" }
553+// };
554+//
555+// void
556+// add_actions (GActionMap *map)
557+//
558+// {
559+// g_action_map_add_action_entries (map, entries, G_N_ELEMENTS (entries), NULL);
560+// }
561+//
562+// void
563+// remove_actions (GActionMap *map)
564+//
565+// {
566+// g_action_map_remove_action_entries (map, entries, G_N_ELEMENTS (entries));
567+// }
568+//
569+// ```
570+func (x *ApplicationWindow) RemoveActionEntries(EntriesVar []gio.ActionEntry, NEntriesVar int) {
571+
572+ gio.XGActionMapRemoveActionEntries(x.GoPointer(), EntriesVar, NEntriesVar)
573+
574+}
575+
576+// Requests the user's screen reader to announce the given message.
577+//
578+// This kind of notification is useful for messages that
579+// either have only a visual representation or that are not
580+// exposed visually at all, e.g. a notification about a
581+// successful operation.
582+//
583+// Also, by using this API, you can ensure that the message
584+// does not interrupts the user's current screen reader output.
585+func (x *ApplicationWindow) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
586+
587+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
588+
589+}
590+
591+// Retrieves the accessible parent for an accessible object.
592+//
593+// This function returns `NULL` for top level widgets.
594+func (x *ApplicationWindow) GetAccessibleParent() *gtk.AccessibleBase {
595+ var cls *gtk.AccessibleBase
596+
597+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
598+
599+ if cret == 0 {
600+ return nil
601+ }
602+ cls = &gtk.AccessibleBase{}
603+ cls.Ptr = cret
604+ return cls
605+}
606+
607+// Retrieves the accessible role of an accessible object.
520 func (x *ApplicationWindow) GetAccessibleRole() gtk.AccessibleRole {608 func (x *ApplicationWindow) GetAccessibleRole() gtk.AccessibleRole {
521 609
522 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())610 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
523 return cret611 return cret
524 }612 }
525 613
526-// Resets the accessible @property to its default value.614+// Retrieves the implementation for the given accessible object.
615+func (x *ApplicationWindow) GetAtContext() *gtk.ATContext {
616+ var cls *gtk.ATContext
617+
618+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
619+
620+ if cret == 0 {
621+ return nil
622+ }
623+ cls = &gtk.ATContext{}
624+ cls.Ptr = cret
625+ return cls
626+}
627+
628+// Queries the coordinates and dimensions of this accessible
629+//
630+// This functionality can be overridden by `GtkAccessible`
631+// implementations, e.g. to get the bounds from an ignored
632+// child widget.
633+func (x *ApplicationWindow) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
634+
635+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
636+ return cret
637+}
638+
639+// Retrieves the first accessible child of an accessible object.
640+func (x *ApplicationWindow) GetFirstAccessibleChild() *gtk.AccessibleBase {
641+ var cls *gtk.AccessibleBase
642+
643+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
644+
645+ if cret == 0 {
646+ return nil
647+ }
648+ cls = &gtk.AccessibleBase{}
649+ cls.Ptr = cret
650+ return cls
651+}
652+
653+// Retrieves the next accessible sibling of an accessible object
654+func (x *ApplicationWindow) GetNextAccessibleSibling() *gtk.AccessibleBase {
655+ var cls *gtk.AccessibleBase
656+
657+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
658+
659+ if cret == 0 {
660+ return nil
661+ }
662+ cls = &gtk.AccessibleBase{}
663+ cls.Ptr = cret
664+ return cls
665+}
666+
667+// Queries a platform state, such as focus.
668+//
669+// This functionality can be overridden by `GtkAccessible`
670+// implementations, e.g. to get platform state from an ignored
671+// child widget, as is the case for `GtkText` wrappers.
672+func (x *ApplicationWindow) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
673+
674+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
675+ return cret
676+}
677+
678+// Resets the accessible property to its default value.
527 func (x *ApplicationWindow) ResetProperty(PropertyVar gtk.AccessibleProperty) {679 func (x *ApplicationWindow) ResetProperty(PropertyVar gtk.AccessibleProperty) {
528 680
529 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)681 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
530 682
531 }683 }
532 684
533-// Resets the accessible @relation to its default value.685+// Resets the accessible relation to its default value.
534 func (x *ApplicationWindow) ResetRelation(RelationVar gtk.AccessibleRelation) {686 func (x *ApplicationWindow) ResetRelation(RelationVar gtk.AccessibleRelation) {
535 687
536 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)688 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
537 689
538 }690 }
539 691
540-// Resets the accessible @state to its default value.692+// Resets the accessible state to its default value.
541 func (x *ApplicationWindow) ResetState(StateVar gtk.AccessibleState) {693 func (x *ApplicationWindow) ResetState(StateVar gtk.AccessibleState) {
542 694
543 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)695 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
544 696
545 }697 }
546 698
699+// Sets the parent and sibling of an accessible object.
700+//
701+// This function is meant to be used by accessible implementations that are
702+// not part of the widget hierarchy, and but act as a logical bridge between
703+// widgets. For instance, if a widget creates an object that holds metadata
704+// for each child, and you want that object to implement the `GtkAccessible`
705+// interface, you will use this function to ensure that the parent of each
706+// child widget is the metadata object, and the parent of each metadata
707+// object is the container widget.
708+func (x *ApplicationWindow) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
709+
710+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
711+
712+}
713+
714+// Updates the next accessible sibling.
715+//
716+// That might be useful when a new child of a custom accessible
717+// is created, and it needs to be linked to a previous child.
718+func (x *ApplicationWindow) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
719+
720+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
721+
722+}
723+
724+// Informs ATs that the platform state has changed.
725+//
726+// This function should be used by `GtkAccessible` implementations that
727+// have a platform state but are not widgets. Widgets handle platform
728+// states automatically.
729+func (x *ApplicationWindow) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
730+
731+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
732+
733+}
734+
547 // Updates a list of accessible properties.735 // Updates a list of accessible properties.
548 //736 //
549 // See the [enum@Gtk.AccessibleProperty] documentation for the737 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -586,7 +774,7 @@ func (x *ApplicationWindow) UpdatePropertyValue(NPropertiesVar int, PropertiesVa
586 // relation change must be communicated to assistive technologies.774 // relation change must be communicated to assistive technologies.
587 //775 //
588 // If the [enum@Gtk.AccessibleRelation] requires a list of references,776 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
589-// you should pass each reference individually, followed by %NULL, e.g.777+// you should pass each reference individually, followed by `NULL`, e.g.
590 //778 //
591 // ```c779 // ```c
592 // gtk_accessible_update_relation (accessible,780 // gtk_accessible_update_relation (accessible,
@@ -616,13 +804,17 @@ func (x *ApplicationWindow) UpdateRelationValue(NRelationsVar int, RelationsVar
616 804
617 }805 }
618 806
619-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]807+// Updates a list of accessible states.
620-// documentation for the value types of accessible states.
621 //808 //
622-// This function should be called by `GtkWidget` types whenever an accessible809+// See the [enum@Gtk.AccessibleState] documentation for the
623-// state change must be communicated to assistive technologies.810+// value types of accessible states.
811+//
812+// This function should be called by `GtkWidget` types whenever
813+// an accessible state change must be communicated to assistive
814+// technologies.
624 //815 //
625 // Example:816 // Example:
817+//
626 // ```c818 // ```c
627 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;819 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
628 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),820 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -652,7 +844,7 @@ func (x *ApplicationWindow) UpdateStateValue(NStatesVar int, StatesVar []gtk.Acc
652 // Gets the ID of the @buildable object.844 // Gets the ID of the @buildable object.
653 //845 //
654 // `GtkBuilder` sets the name based on the ID attribute846 // `GtkBuilder` sets the name based on the ID attribute
655-// of the <object> tag used to construct the @buildable.847+// of the `<object>` tag used to construct the @buildable.
656 func (x *ApplicationWindow) GetBuildableId() string {848 func (x *ApplicationWindow) GetBuildableId() string {
657 849
658 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())850 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
@@ -779,10 +971,12 @@ func init() {
779 core.PuregoSafeRegister(&xNewApplicationWindow, lib, "adw_application_window_new")971 core.PuregoSafeRegister(&xNewApplicationWindow, lib, "adw_application_window_new")
780 972
781 core.PuregoSafeRegister(&xApplicationWindowAddBreakpoint, lib, "adw_application_window_add_breakpoint")973 core.PuregoSafeRegister(&xApplicationWindowAddBreakpoint, lib, "adw_application_window_add_breakpoint")
974+ core.PuregoSafeRegister(&xApplicationWindowGetAdaptivePreview, lib, "adw_application_window_get_adaptive_preview")
782 core.PuregoSafeRegister(&xApplicationWindowGetContent, lib, "adw_application_window_get_content")975 core.PuregoSafeRegister(&xApplicationWindowGetContent, lib, "adw_application_window_get_content")
783 core.PuregoSafeRegister(&xApplicationWindowGetCurrentBreakpoint, lib, "adw_application_window_get_current_breakpoint")976 core.PuregoSafeRegister(&xApplicationWindowGetCurrentBreakpoint, lib, "adw_application_window_get_current_breakpoint")
784 core.PuregoSafeRegister(&xApplicationWindowGetDialogs, lib, "adw_application_window_get_dialogs")977 core.PuregoSafeRegister(&xApplicationWindowGetDialogs, lib, "adw_application_window_get_dialogs")
785 core.PuregoSafeRegister(&xApplicationWindowGetVisibleDialog, lib, "adw_application_window_get_visible_dialog")978 core.PuregoSafeRegister(&xApplicationWindowGetVisibleDialog, lib, "adw_application_window_get_visible_dialog")
979+ core.PuregoSafeRegister(&xApplicationWindowSetAdaptivePreview, lib, "adw_application_window_set_adaptive_preview")
786 core.PuregoSafeRegister(&xApplicationWindowSetContent, lib, "adw_application_window_set_content")980 core.PuregoSafeRegister(&xApplicationWindowSetContent, lib, "adw_application_window_set_content")
787 981
788 }982 }
M v4/adw/adw-application.go +88 -57
@@ -121,36 +121,36 @@ func (c *Application) SetGoPointer(ptr uintptr) {
121 c.Ptr = ptr121 c.Ptr = ptr
122 }122 }
123 123
124-// Emits the #GActionGroup::action-added signal on @action_group.124+// Emits the [signal@Gio.ActionGroup::action-added] signal on @action_group.
125 //125 //
126-// This function should only be called by #GActionGroup implementations.126+// This function should only be called by [type@Gio.ActionGroup] implementations.
127 func (x *Application) ActionAdded(ActionNameVar string) {127 func (x *Application) ActionAdded(ActionNameVar string) {
128 128
129 gio.XGActionGroupActionAdded(x.GoPointer(), ActionNameVar)129 gio.XGActionGroupActionAdded(x.GoPointer(), ActionNameVar)
130 130
131 }131 }
132 132
133-// Emits the #GActionGroup::action-enabled-changed signal on @action_group.133+// Emits the [signal@Gio.ActionGroup::action-enabled-changed] signal on @action_group.
134 //134 //
135-// This function should only be called by #GActionGroup implementations.135+// This function should only be called by [type@Gio.ActionGroup] implementations.
136 func (x *Application) ActionEnabledChanged(ActionNameVar string, EnabledVar bool) {136 func (x *Application) ActionEnabledChanged(ActionNameVar string, EnabledVar bool) {
137 137
138 gio.XGActionGroupActionEnabledChanged(x.GoPointer(), ActionNameVar, EnabledVar)138 gio.XGActionGroupActionEnabledChanged(x.GoPointer(), ActionNameVar, EnabledVar)
139 139
140 }140 }
141 141
142-// Emits the #GActionGroup::action-removed signal on @action_group.142+// Emits the [signal@Gio.ActionGroup::action-removed] signal on @action_group.
143 //143 //
144-// This function should only be called by #GActionGroup implementations.144+// This function should only be called by [type@Gio.ActionGroup] implementations.
145 func (x *Application) ActionRemoved(ActionNameVar string) {145 func (x *Application) ActionRemoved(ActionNameVar string) {
146 146
147 gio.XGActionGroupActionRemoved(x.GoPointer(), ActionNameVar)147 gio.XGActionGroupActionRemoved(x.GoPointer(), ActionNameVar)
148 148
149 }149 }
150 150
151-// Emits the #GActionGroup::action-state-changed signal on @action_group.151+// Emits the [signal@Gio.ActionGroup::action-state-changed] signal on @action_group.
152 //152 //
153-// This function should only be called by #GActionGroup implementations.153+// This function should only be called by [type@Gio.ActionGroup] implementations.
154 func (x *Application) ActionStateChanged(ActionNameVar string, StateVar *glib.Variant) {154 func (x *Application) ActionStateChanged(ActionNameVar string, StateVar *glib.Variant) {
155 155
156 gio.XGActionGroupActionStateChanged(x.GoPointer(), ActionNameVar, StateVar)156 gio.XGActionGroupActionStateChanged(x.GoPointer(), ActionNameVar, StateVar)
@@ -161,35 +161,35 @@ func (x *Application) ActionStateChanged(ActionNameVar string, StateVar *glib.Va
161 //161 //
162 // If the action is expecting a parameter, then the correct type of162 // If the action is expecting a parameter, then the correct type of
163 // parameter must be given as @parameter. If the action is expecting no163 // parameter must be given as @parameter. If the action is expecting no
164-// parameters then @parameter must be %NULL. See164+// parameters then @parameter must be `NULL`. See
165-// g_action_group_get_action_parameter_type().165+// [method@Gio.ActionGroup.get_action_parameter_type].
166 //166 //
167-// If the #GActionGroup implementation supports asynchronous remote167+// If the [type@Gio.ActionGroup] implementation supports asynchronous remote
168 // activation over D-Bus, this call may return before the relevant168 // activation over D-Bus, this call may return before the relevant
169 // D-Bus traffic has been sent, or any replies have been received. In169 // D-Bus traffic has been sent, or any replies have been received. In
170 // order to block on such asynchronous activation calls,170 // order to block on such asynchronous activation calls,
171-// g_dbus_connection_flush() should be called prior to the code, which171+// [method@Gio.DBusConnection.flush] should be called prior to the code, which
172 // depends on the result of the action activation. Without flushing172 // depends on the result of the action activation. Without flushing
173 // the D-Bus connection, there is no guarantee that the action would173 // the D-Bus connection, there is no guarantee that the action would
174 // have been activated.174 // have been activated.
175 //175 //
176 // The following code which runs in a remote app instance, shows an176 // The following code which runs in a remote app instance, shows an
177-// example of a "quit" action being activated on the primary app177+// example of a ‘quit’ action being activated on the primary app
178-// instance over D-Bus. Here g_dbus_connection_flush() is called178+// instance over D-Bus. Here [method@Gio.DBusConnection.flush] is called
179-// before `exit()`. Without g_dbus_connection_flush(), the "quit" action179+// before `exit()`. Without `g_dbus_connection_flush()`, the ‘quit’ action
180 // may fail to be activated on the primary instance.180 // may fail to be activated on the primary instance.
181 //181 //
182-// |[<!-- language="C" -->182+// ```c
183-// // call "quit" action on primary instance183+// // call ‘quit’ action on primary instance
184 // g_action_group_activate_action (G_ACTION_GROUP (app), "quit", NULL);184 // g_action_group_activate_action (G_ACTION_GROUP (app), "quit", NULL);
185 //185 //
186 // // make sure the action is activated now186 // // make sure the action is activated now
187-// g_dbus_connection_flush (...);187+// g_dbus_connection_flush (…);
188 //188 //
189-// g_debug ("application has been terminated. exiting.");189+// g_debug ("Application has been terminated. Exiting.");
190 //190 //
191 // exit (0);191 // exit (0);
192-// ]|192+// ```
193 func (x *Application) ActivateAction(ActionNameVar string, ParameterVar *glib.Variant) {193 func (x *Application) ActivateAction(ActionNameVar string, ParameterVar *glib.Variant) {
194 194
195 gio.XGActionGroupActivateAction(x.GoPointer(), ActionNameVar, ParameterVar)195 gio.XGActionGroupActivateAction(x.GoPointer(), ActionNameVar, ParameterVar)
@@ -200,11 +200,11 @@ func (x *Application) ActivateAction(ActionNameVar string, ParameterVar *glib.Va
200 // changed to @value.200 // changed to @value.
201 //201 //
202 // The action must be stateful and @value must be of the correct type.202 // The action must be stateful and @value must be of the correct type.
203-// See g_action_group_get_action_state_type().203+// See [method@Gio.ActionGroup.get_action_state_type].
204 //204 //
205 // This call merely requests a change. The action may refuse to change205 // This call merely requests a change. The action may refuse to change
206 // its state or may change its state to something other than @value.206 // its state or may change its state to something other than @value.
207-// See g_action_group_get_action_state_hint().207+// See [method@Gio.ActionGroup.get_action_state_hint].
208 //208 //
209 // If the @value GVariant is floating, it is consumed.209 // If the @value GVariant is floating, it is consumed.
210 func (x *Application) ChangeActionState(ActionNameVar string, ValueVar *glib.Variant) {210 func (x *Application) ChangeActionState(ActionNameVar string, ValueVar *glib.Variant) {
@@ -226,12 +226,12 @@ func (x *Application) GetActionEnabled(ActionNameVar string) bool {
226 // Queries the type of the parameter that must be given when activating226 // Queries the type of the parameter that must be given when activating
227 // the named action within @action_group.227 // the named action within @action_group.
228 //228 //
229-// When activating the action using g_action_group_activate_action(),229+// When activating the action using [method@Gio.ActionGroup.activate_action],
230-// the #GVariant given to that function must be of the type returned230+// the [type@GLib.Variant] given to that function must be of the type returned
231 // by this function.231 // by this function.
232 //232 //
233-// In the case that this function returns %NULL, you must not give any233+// In the case that this function returns `NULL`, you must not give any
234-// #GVariant, but %NULL instead.234+// [type@GLib.Variant], but `NULL` instead.
235 //235 //
236 // The parameter type of a particular action will never change but it is236 // The parameter type of a particular action will never change but it is
237 // possible for an action to be removed and for a new action to be added237 // possible for an action to be removed and for a new action to be added
@@ -244,12 +244,12 @@ func (x *Application) GetActionParameterType(ActionNameVar string) *glib.Variant
244 244
245 // Queries the current state of the named action within @action_group.245 // Queries the current state of the named action within @action_group.
246 //246 //
247-// If the action is not stateful then %NULL will be returned. If the247+// If the action is not stateful then `NULL` will be returned. If the
248 // action is stateful then the type of the return value is the type248 // action is stateful then the type of the return value is the type
249-// given by g_action_group_get_action_state_type().249+// given by [method@Gio.ActionGroup.get_action_state_type].
250 //250 //
251-// The return value (if non-%NULL) should be freed with251+// The return value (if non-`NULL`) should be freed with
252-// g_variant_unref() when it is no longer required.252+// [method@GLib.Variant.unref] when it is no longer required.
253 func (x *Application) GetActionState(ActionNameVar string) *glib.Variant {253 func (x *Application) GetActionState(ActionNameVar string) *glib.Variant {
254 254
255 cret := gio.XGActionGroupGetActionState(x.GoPointer(), ActionNameVar)255 cret := gio.XGActionGroupGetActionState(x.GoPointer(), ActionNameVar)
@@ -259,12 +259,12 @@ func (x *Application) GetActionState(ActionNameVar string) *glib.Variant {
259 // Requests a hint about the valid range of values for the state of the259 // Requests a hint about the valid range of values for the state of the
260 // named action within @action_group.260 // named action within @action_group.
261 //261 //
262-// If %NULL is returned it either means that the action is not stateful262+// If `NULL` is returned it either means that the action is not stateful
263 // or that there is no hint about the valid range of values for the263 // or that there is no hint about the valid range of values for the
264 // state of the action.264 // state of the action.
265 //265 //
266-// If a #GVariant array is returned then each item in the array is a266+// If a [type@GLib.Variant] array is returned then each item in the array is a
267-// possible value for the state. If a #GVariant pair (ie: two-tuple) is267+// possible value for the state. If a [type@GLib.Variant] pair (ie: two-tuple) is
268 // returned then the tuple specifies the inclusive lower and upper bound268 // returned then the tuple specifies the inclusive lower and upper bound
269 // of valid values for the state.269 // of valid values for the state.
270 //270 //
@@ -272,8 +272,8 @@ func (x *Application) GetActionState(ActionNameVar string) *glib.Variant {
272 // have a state value outside of the hinted range and setting a value272 // have a state value outside of the hinted range and setting a value
273 // within the range may fail.273 // within the range may fail.
274 //274 //
275-// The return value (if non-%NULL) should be freed with275+// The return value (if non-`NULL`) should be freed with
276-// g_variant_unref() when it is no longer required.276+// [method@GLib.Variant.unref] when it is no longer required.
277 func (x *Application) GetActionStateHint(ActionNameVar string) *glib.Variant {277 func (x *Application) GetActionStateHint(ActionNameVar string) *glib.Variant {
278 278
279 cret := gio.XGActionGroupGetActionStateHint(x.GoPointer(), ActionNameVar)279 cret := gio.XGActionGroupGetActionStateHint(x.GoPointer(), ActionNameVar)
@@ -284,14 +284,14 @@ func (x *Application) GetActionStateHint(ActionNameVar string) *glib.Variant {
284 // @action_group.284 // @action_group.
285 //285 //
286 // If the action is stateful then this function returns the286 // If the action is stateful then this function returns the
287-// #GVariantType of the state. All calls to287+// [type@GLib.VariantType] of the state. All calls to
288-// g_action_group_change_action_state() must give a #GVariant of this288+// [method@Gio.ActionGroup.change_action_state] must give a [type@GLib.Variant] of this
289-// type and g_action_group_get_action_state() will return a #GVariant289+// type and [method@Gio.ActionGroup.get_action_state] will return a [type@GLib.Variant]
290 // of the same type.290 // of the same type.
291 //291 //
292-// If the action is not stateful then this function will return %NULL.292+// If the action is not stateful then this function will return `NULL`.
293-// In that case, g_action_group_get_action_state() will return %NULL293+// In that case, [method@Gio.ActionGroup.get_action_state] will return `NULL`
294-// and you must not call g_action_group_change_action_state().294+// and you must not call [method@Gio.ActionGroup.change_action_state].
295 //295 //
296 // The state type of a particular action will never change but it is296 // The state type of a particular action will never change but it is
297 // possible for an action to be removed and for a new action to be added297 // possible for an action to be removed and for a new action to be added
@@ -311,7 +311,7 @@ func (x *Application) HasAction(ActionNameVar string) bool {
311 311
312 // Lists the actions contained within @action_group.312 // Lists the actions contained within @action_group.
313 //313 //
314-// The caller is responsible for freeing the list with g_strfreev() when314+// The caller is responsible for freeing the list with [func@GLib.strfreev] when
315 // it is no longer required.315 // it is no longer required.
316 func (x *Application) ListActions() []string {316 func (x *Application) ListActions() []string {
317 317
@@ -322,18 +322,18 @@ func (x *Application) ListActions() []string {
322 // Queries all aspects of the named action within an @action_group.322 // Queries all aspects of the named action within an @action_group.
323 //323 //
324 // This function acquires the information available from324 // This function acquires the information available from
325-// g_action_group_has_action(), g_action_group_get_action_enabled(),325+// [method@Gio.ActionGroup.has_action], [method@Gio.ActionGroup.get_action_enabled],
326-// g_action_group_get_action_parameter_type(),326+// [method@Gio.ActionGroup.get_action_parameter_type],
327-// g_action_group_get_action_state_type(),327+// [method@Gio.ActionGroup.get_action_state_type],
328-// g_action_group_get_action_state_hint() and328+// [method@Gio.ActionGroup.get_action_state_hint] and
329-// g_action_group_get_action_state() with a single function call.329+// [method@Gio.ActionGroup.get_action_state] with a single function call.
330 //330 //
331 // This provides two main benefits.331 // This provides two main benefits.
332 //332 //
333 // The first is the improvement in efficiency that comes with not having333 // The first is the improvement in efficiency that comes with not having
334 // to perform repeated lookups of the action in order to discover334 // to perform repeated lookups of the action in order to discover
335 // different things about it. The second is that implementing335 // different things about it. The second is that implementing
336-// #GActionGroup can now be done by only overriding this one virtual336+// [type@Gio.ActionGroup] can now be done by only overriding this one virtual
337 // function.337 // function.
338 //338 //
339 // The interface provides a default implementation of this function that339 // The interface provides a default implementation of this function that
@@ -342,9 +342,9 @@ func (x *Application) ListActions() []string {
342 // those functions that call this function. All implementations,342 // those functions that call this function. All implementations,
343 // therefore, must override either this function or all of the others.343 // therefore, must override either this function or all of the others.
344 //344 //
345-// If the action exists, %TRUE is returned and any of the requested345+// If the action exists, `TRUE` is returned and any of the requested
346-// fields (as indicated by having a non-%NULL reference passed in) are346+// fields (as indicated by having a non-`NULL` reference passed in) are
347-// filled. If the action doesn't exist, %FALSE is returned and the347+// filled. If the action doesn’t exist, `FALSE` is returned and the
348 // fields may or may not have been modified.348 // fields may or may not have been modified.
349 func (x *Application) QueryAction(ActionNameVar string, EnabledVar bool, ParameterTypeVar **glib.VariantType, StateTypeVar **glib.VariantType, StateHintVar **glib.Variant, StateVar **glib.Variant) bool {349 func (x *Application) QueryAction(ActionNameVar string, EnabledVar bool, ParameterTypeVar **glib.VariantType, StateTypeVar **glib.VariantType, StateHintVar **glib.Variant, StateVar **glib.Variant) bool {
350 350
@@ -364,12 +364,12 @@ func (x *Application) AddAction(ActionVar gio.Action) {
364 364
365 }365 }
366 366
367-// A convenience function for creating multiple #GSimpleAction instances367+// A convenience function for creating multiple [class@Gio.SimpleAction]
368-// and adding them to a #GActionMap.368+// instances and adding them to a [iface@Gio.ActionMap].
369 //369 //
370-// Each action is constructed as per one #GActionEntry.370+// Each action is constructed as per one [struct@Gio.ActionEntry].
371 //371 //
372-// |[<!-- language="C" -->372+// ```c
373 // static void373 // static void
374 // activate_quit (GSimpleAction *simple,374 // activate_quit (GSimpleAction *simple,
375 //375 //
@@ -406,7 +406,7 @@ func (x *Application) AddAction(ActionVar gio.Action) {
406 // return G_ACTION_GROUP (group);406 // return G_ACTION_GROUP (group);
407 // }407 // }
408 //408 //
409-// ]|409+// ```
410 func (x *Application) AddActionEntries(EntriesVar []gio.ActionEntry, NEntriesVar int, UserDataVar uintptr) {410 func (x *Application) AddActionEntries(EntriesVar []gio.ActionEntry, NEntriesVar int, UserDataVar uintptr) {
411 411
412 gio.XGActionMapAddActionEntries(x.GoPointer(), EntriesVar, NEntriesVar, UserDataVar)412 gio.XGActionMapAddActionEntries(x.GoPointer(), EntriesVar, NEntriesVar, UserDataVar)
@@ -415,7 +415,7 @@ func (x *Application) AddActionEntries(EntriesVar []gio.ActionEntry, NEntriesVar
415 415
416 // Looks up the action with the name @action_name in @action_map.416 // Looks up the action with the name @action_name in @action_map.
417 //417 //
418-// If no such action exists, returns %NULL.418+// If no such action exists, returns `NULL`.
419 func (x *Application) LookupAction(ActionNameVar string) *gio.ActionBase {419 func (x *Application) LookupAction(ActionNameVar string) *gio.ActionBase {
420 var cls *gio.ActionBase420 var cls *gio.ActionBase
421 421
@@ -439,6 +439,37 @@ func (x *Application) RemoveAction(ActionNameVar string) {
439 439
440 }440 }
441 441
442+// Remove actions from a [iface@Gio.ActionMap]. This is meant as the reverse of
443+// [method@Gio.ActionMap.add_action_entries].
444+//
445+// ```c
446+//
447+// static const GActionEntry entries[] = {
448+// { "quit", activate_quit },
449+// { "print-string", activate_print_string, "s" }
450+// };
451+//
452+// void
453+// add_actions (GActionMap *map)
454+//
455+// {
456+// g_action_map_add_action_entries (map, entries, G_N_ELEMENTS (entries), NULL);
457+// }
458+//
459+// void
460+// remove_actions (GActionMap *map)
461+//
462+// {
463+// g_action_map_remove_action_entries (map, entries, G_N_ELEMENTS (entries));
464+// }
465+//
466+// ```
467+func (x *Application) RemoveActionEntries(EntriesVar []gio.ActionEntry, NEntriesVar int) {
468+
469+ gio.XGActionMapRemoveActionEntries(x.GoPointer(), EntriesVar, NEntriesVar)
470+
471+}
472+
442 func init() {473 func init() {
443 core.SetPackageName("ADW", "libadwaita-1")474 core.SetPackageName("ADW", "libadwaita-1")
444 core.SetSharedLibrary("ADW", "libadwaita-1.so.0")475 core.SetSharedLibrary("ADW", "libadwaita-1.so.0")
M v4/adw/adw-avatar.go +149 -10
@@ -48,6 +48,10 @@ func (x *AvatarClass) GoPointer() uintptr {
48 // ## CSS nodes48 // ## CSS nodes
49 //49 //
50 // `AdwAvatar` has a single CSS node with name `avatar`.50 // `AdwAvatar` has a single CSS node with name `avatar`.
51+//
52+// ## Accessibility
53+//
54+// `AdwAvatar` uses the `GTK_ACCESSIBLE_ROLE_IMG` role.
51 type Avatar struct {55 type Avatar struct {
52 gtk.Widget56 gtk.Widget
53 }57 }
@@ -217,34 +221,165 @@ func (c *Avatar) SetGoPointer(ptr uintptr) {
217 c.Ptr = ptr221 c.Ptr = ptr
218 }222 }
219 223
220-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.224+// Requests the user's screen reader to announce the given message.
225+//
226+// This kind of notification is useful for messages that
227+// either have only a visual representation or that are not
228+// exposed visually at all, e.g. a notification about a
229+// successful operation.
230+//
231+// Also, by using this API, you can ensure that the message
232+// does not interrupts the user's current screen reader output.
233+func (x *Avatar) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
234+
235+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
236+
237+}
238+
239+// Retrieves the accessible parent for an accessible object.
240+//
241+// This function returns `NULL` for top level widgets.
242+func (x *Avatar) GetAccessibleParent() *gtk.AccessibleBase {
243+ var cls *gtk.AccessibleBase
244+
245+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
246+
247+ if cret == 0 {
248+ return nil
249+ }
250+ cls = &gtk.AccessibleBase{}
251+ cls.Ptr = cret
252+ return cls
253+}
254+
255+// Retrieves the accessible role of an accessible object.
221 func (x *Avatar) GetAccessibleRole() gtk.AccessibleRole {256 func (x *Avatar) GetAccessibleRole() gtk.AccessibleRole {
222 257
223 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())258 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
224 return cret259 return cret
225 }260 }
226 261
227-// Resets the accessible @property to its default value.262+// Retrieves the implementation for the given accessible object.
263+func (x *Avatar) GetAtContext() *gtk.ATContext {
264+ var cls *gtk.ATContext
265+
266+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
267+
268+ if cret == 0 {
269+ return nil
270+ }
271+ cls = &gtk.ATContext{}
272+ cls.Ptr = cret
273+ return cls
274+}
275+
276+// Queries the coordinates and dimensions of this accessible
277+//
278+// This functionality can be overridden by `GtkAccessible`
279+// implementations, e.g. to get the bounds from an ignored
280+// child widget.
281+func (x *Avatar) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
282+
283+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
284+ return cret
285+}
286+
287+// Retrieves the first accessible child of an accessible object.
288+func (x *Avatar) GetFirstAccessibleChild() *gtk.AccessibleBase {
289+ var cls *gtk.AccessibleBase
290+
291+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
292+
293+ if cret == 0 {
294+ return nil
295+ }
296+ cls = &gtk.AccessibleBase{}
297+ cls.Ptr = cret
298+ return cls
299+}
300+
301+// Retrieves the next accessible sibling of an accessible object
302+func (x *Avatar) GetNextAccessibleSibling() *gtk.AccessibleBase {
303+ var cls *gtk.AccessibleBase
304+
305+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
306+
307+ if cret == 0 {
308+ return nil
309+ }
310+ cls = &gtk.AccessibleBase{}
311+ cls.Ptr = cret
312+ return cls
313+}
314+
315+// Queries a platform state, such as focus.
316+//
317+// This functionality can be overridden by `GtkAccessible`
318+// implementations, e.g. to get platform state from an ignored
319+// child widget, as is the case for `GtkText` wrappers.
320+func (x *Avatar) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
321+
322+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
323+ return cret
324+}
325+
326+// Resets the accessible property to its default value.
228 func (x *Avatar) ResetProperty(PropertyVar gtk.AccessibleProperty) {327 func (x *Avatar) ResetProperty(PropertyVar gtk.AccessibleProperty) {
229 328
230 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)329 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
231 330
232 }331 }
233 332
234-// Resets the accessible @relation to its default value.333+// Resets the accessible relation to its default value.
235 func (x *Avatar) ResetRelation(RelationVar gtk.AccessibleRelation) {334 func (x *Avatar) ResetRelation(RelationVar gtk.AccessibleRelation) {
236 335
237 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)336 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
238 337
239 }338 }
240 339
241-// Resets the accessible @state to its default value.340+// Resets the accessible state to its default value.
242 func (x *Avatar) ResetState(StateVar gtk.AccessibleState) {341 func (x *Avatar) ResetState(StateVar gtk.AccessibleState) {
243 342
244 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)343 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
245 344
246 }345 }
247 346
347+// Sets the parent and sibling of an accessible object.
348+//
349+// This function is meant to be used by accessible implementations that are
350+// not part of the widget hierarchy, and but act as a logical bridge between
351+// widgets. For instance, if a widget creates an object that holds metadata
352+// for each child, and you want that object to implement the `GtkAccessible`
353+// interface, you will use this function to ensure that the parent of each
354+// child widget is the metadata object, and the parent of each metadata
355+// object is the container widget.
356+func (x *Avatar) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
357+
358+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
359+
360+}
361+
362+// Updates the next accessible sibling.
363+//
364+// That might be useful when a new child of a custom accessible
365+// is created, and it needs to be linked to a previous child.
366+func (x *Avatar) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
367+
368+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
369+
370+}
371+
372+// Informs ATs that the platform state has changed.
373+//
374+// This function should be used by `GtkAccessible` implementations that
375+// have a platform state but are not widgets. Widgets handle platform
376+// states automatically.
377+func (x *Avatar) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
378+
379+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
380+
381+}
382+
248 // Updates a list of accessible properties.383 // Updates a list of accessible properties.
249 //384 //
250 // See the [enum@Gtk.AccessibleProperty] documentation for the385 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -287,7 +422,7 @@ func (x *Avatar) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.Acc
287 // relation change must be communicated to assistive technologies.422 // relation change must be communicated to assistive technologies.
288 //423 //
289 // If the [enum@Gtk.AccessibleRelation] requires a list of references,424 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
290-// you should pass each reference individually, followed by %NULL, e.g.425+// you should pass each reference individually, followed by `NULL`, e.g.
291 //426 //
292 // ```c427 // ```c
293 // gtk_accessible_update_relation (accessible,428 // gtk_accessible_update_relation (accessible,
@@ -317,13 +452,17 @@ func (x *Avatar) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.Acces
317 452
318 }453 }
319 454
320-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]455+// Updates a list of accessible states.
321-// documentation for the value types of accessible states.
322 //456 //
323-// This function should be called by `GtkWidget` types whenever an accessible457+// See the [enum@Gtk.AccessibleState] documentation for the
324-// state change must be communicated to assistive technologies.458+// value types of accessible states.
459+//
460+// This function should be called by `GtkWidget` types whenever
461+// an accessible state change must be communicated to assistive
462+// technologies.
325 //463 //
326 // Example:464 // Example:
465+//
327 // ```c466 // ```c
328 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;467 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
329 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),468 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -353,7 +492,7 @@ func (x *Avatar) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleStat
353 // Gets the ID of the @buildable object.492 // Gets the ID of the @buildable object.
354 //493 //
355 // `GtkBuilder` sets the name based on the ID attribute494 // `GtkBuilder` sets the name based on the ID attribute
356-// of the <object> tag used to construct the @buildable.495+// of the `<object>` tag used to construct the @buildable.
357 func (x *Avatar) GetBuildableId() string {496 func (x *Avatar) GetBuildableId() string {
358 497
359 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())498 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-banner.go +207 -11
@@ -23,6 +23,27 @@ func (x *BannerClass) GoPointer() uintptr {
23 return uintptr(unsafe.Pointer(x))23 return uintptr(unsafe.Pointer(x))
24 }24 }
25 25
26+// Describes the available button styles for [class@Banner].
27+//
28+// New values may be added to this enumeration over time.
29+//
30+// See [property@Banner:button-style].
31+type BannerButtonStyle int
32+
33+var xBannerButtonStyleGLibType func() types.GType
34+
35+func BannerButtonStyleGLibType() types.GType {
36+ return xBannerButtonStyleGLibType()
37+}
38+
39+const (
40+
41+ // The default button style.
42+ BannerButtonDefaultValue BannerButtonStyle = 0
43+ // A button in the suggested action style.
44+ BannerButtonSuggestedValue BannerButtonStyle = 1
45+)
46+
26 // A bar with contextual information.47 // A bar with contextual information.
27 //48 //
28 // <picture>49 // <picture>
@@ -42,7 +63,15 @@ func (x *BannerClass) GoPointer() uintptr {
42 //63 //
43 // Banners can optionally have a button with text on it, set through64 // Banners can optionally have a button with text on it, set through
44 // [property@Banner:button-label]. The button can be used with a `GAction`,65 // [property@Banner:button-label]. The button can be used with a `GAction`,
45-// or with the [signal@Banner::button-clicked] signal.66+// or with the [signal@Banner::button-clicked] signal. The button can have
67+// different styles, a gray style and a suggested style.
68+//
69+// <picture>
70+//
71+// <source srcset="banner-suggested-dark.png" media="(prefers-color-scheme: dark)">
72+// <img src="banner-suggested.png" alt="banner with suggested button style">
73+//
74+// </picture>
46 //75 //
47 // ## CSS nodes76 // ## CSS nodes
48 //77 //
@@ -89,6 +118,15 @@ func (x *Banner) GetButtonLabel() string {
89 return cret118 return cret
90 }119 }
91 120
121+var xBannerGetButtonStyle func(uintptr) BannerButtonStyle
122+
123+// Gets the style class in use for the banner button.
124+func (x *Banner) GetButtonStyle() BannerButtonStyle {
125+
126+ cret := xBannerGetButtonStyle(x.GoPointer())
127+ return cret
128+}
129+
92 var xBannerGetRevealed func(uintptr) bool130 var xBannerGetRevealed func(uintptr) bool
93 131
94 // Gets if a banner is revealed132 // Gets if a banner is revealed
@@ -130,6 +168,25 @@ func (x *Banner) SetButtonLabel(LabelVar string) {
130 168
131 }169 }
132 170
171+var xBannerSetButtonStyle func(uintptr, BannerButtonStyle)
172+
173+// Sets the style class to use for the banner button.
174+//
175+// When set to `ADW_BANNER_BUTTON_DEFAULT`, the button stays grey.
176+// When set to `ADW_BANNER_BUTTON_SUGGESTED`, the button follows the [`.suggested-action`](style-classes.html#suggested-action) style
177+//
178+// <picture>
179+//
180+// <source srcset="banner-suggested-dark.png" media="(prefers-color-scheme: dark)">
181+// <img src="banner-suggested.png" alt="banner with suggested button style">
182+//
183+// </picture>
184+func (x *Banner) SetButtonStyle(StyleVar BannerButtonStyle) {
185+
186+ xBannerSetButtonStyle(x.GoPointer(), StyleVar)
187+
188+}
189+
133 var xBannerSetRevealed func(uintptr, bool)190 var xBannerSetRevealed func(uintptr, bool)
134 191
135 // Sets whether a banner should be revealed192 // Sets whether a banner should be revealed
@@ -194,34 +251,165 @@ func (x *Banner) ConnectButtonClicked(cb *func(Banner)) uint32 {
194 return gobject.SignalConnect(x.GoPointer(), "button-clicked", cbRefPtr)251 return gobject.SignalConnect(x.GoPointer(), "button-clicked", cbRefPtr)
195 }252 }
196 253
197-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.254+// Requests the user's screen reader to announce the given message.
255+//
256+// This kind of notification is useful for messages that
257+// either have only a visual representation or that are not
258+// exposed visually at all, e.g. a notification about a
259+// successful operation.
260+//
261+// Also, by using this API, you can ensure that the message
262+// does not interrupts the user's current screen reader output.
263+func (x *Banner) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
264+
265+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
266+
267+}
268+
269+// Retrieves the accessible parent for an accessible object.
270+//
271+// This function returns `NULL` for top level widgets.
272+func (x *Banner) GetAccessibleParent() *gtk.AccessibleBase {
273+ var cls *gtk.AccessibleBase
274+
275+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
276+
277+ if cret == 0 {
278+ return nil
279+ }
280+ cls = &gtk.AccessibleBase{}
281+ cls.Ptr = cret
282+ return cls
283+}
284+
285+// Retrieves the accessible role of an accessible object.
198 func (x *Banner) GetAccessibleRole() gtk.AccessibleRole {286 func (x *Banner) GetAccessibleRole() gtk.AccessibleRole {
199 287
200 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())288 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
201 return cret289 return cret
202 }290 }
203 291
204-// Resets the accessible @property to its default value.292+// Retrieves the implementation for the given accessible object.
293+func (x *Banner) GetAtContext() *gtk.ATContext {
294+ var cls *gtk.ATContext
295+
296+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
297+
298+ if cret == 0 {
299+ return nil
300+ }
301+ cls = &gtk.ATContext{}
302+ cls.Ptr = cret
303+ return cls
304+}
305+
306+// Queries the coordinates and dimensions of this accessible
307+//
308+// This functionality can be overridden by `GtkAccessible`
309+// implementations, e.g. to get the bounds from an ignored
310+// child widget.
311+func (x *Banner) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
312+
313+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
314+ return cret
315+}
316+
317+// Retrieves the first accessible child of an accessible object.
318+func (x *Banner) GetFirstAccessibleChild() *gtk.AccessibleBase {
319+ var cls *gtk.AccessibleBase
320+
321+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
322+
323+ if cret == 0 {
324+ return nil
325+ }
326+ cls = &gtk.AccessibleBase{}
327+ cls.Ptr = cret
328+ return cls
329+}
330+
331+// Retrieves the next accessible sibling of an accessible object
332+func (x *Banner) GetNextAccessibleSibling() *gtk.AccessibleBase {
333+ var cls *gtk.AccessibleBase
334+
335+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
336+
337+ if cret == 0 {
338+ return nil
339+ }
340+ cls = &gtk.AccessibleBase{}
341+ cls.Ptr = cret
342+ return cls
343+}
344+
345+// Queries a platform state, such as focus.
346+//
347+// This functionality can be overridden by `GtkAccessible`
348+// implementations, e.g. to get platform state from an ignored
349+// child widget, as is the case for `GtkText` wrappers.
350+func (x *Banner) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
351+
352+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
353+ return cret
354+}
355+
356+// Resets the accessible property to its default value.
205 func (x *Banner) ResetProperty(PropertyVar gtk.AccessibleProperty) {357 func (x *Banner) ResetProperty(PropertyVar gtk.AccessibleProperty) {
206 358
207 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)359 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
208 360
209 }361 }
210 362
211-// Resets the accessible @relation to its default value.363+// Resets the accessible relation to its default value.
212 func (x *Banner) ResetRelation(RelationVar gtk.AccessibleRelation) {364 func (x *Banner) ResetRelation(RelationVar gtk.AccessibleRelation) {
213 365
214 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)366 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
215 367
216 }368 }
217 369
218-// Resets the accessible @state to its default value.370+// Resets the accessible state to its default value.
219 func (x *Banner) ResetState(StateVar gtk.AccessibleState) {371 func (x *Banner) ResetState(StateVar gtk.AccessibleState) {
220 372
221 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)373 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
222 374
223 }375 }
224 376
377+// Sets the parent and sibling of an accessible object.
378+//
379+// This function is meant to be used by accessible implementations that are
380+// not part of the widget hierarchy, and but act as a logical bridge between
381+// widgets. For instance, if a widget creates an object that holds metadata
382+// for each child, and you want that object to implement the `GtkAccessible`
383+// interface, you will use this function to ensure that the parent of each
384+// child widget is the metadata object, and the parent of each metadata
385+// object is the container widget.
386+func (x *Banner) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
387+
388+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
389+
390+}
391+
392+// Updates the next accessible sibling.
393+//
394+// That might be useful when a new child of a custom accessible
395+// is created, and it needs to be linked to a previous child.
396+func (x *Banner) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
397+
398+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
399+
400+}
401+
402+// Informs ATs that the platform state has changed.
403+//
404+// This function should be used by `GtkAccessible` implementations that
405+// have a platform state but are not widgets. Widgets handle platform
406+// states automatically.
407+func (x *Banner) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
408+
409+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
410+
411+}
412+
225 // Updates a list of accessible properties.413 // Updates a list of accessible properties.
226 //414 //
227 // See the [enum@Gtk.AccessibleProperty] documentation for the415 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -264,7 +452,7 @@ func (x *Banner) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.Acc
264 // relation change must be communicated to assistive technologies.452 // relation change must be communicated to assistive technologies.
265 //453 //
266 // If the [enum@Gtk.AccessibleRelation] requires a list of references,454 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
267-// you should pass each reference individually, followed by %NULL, e.g.455+// you should pass each reference individually, followed by `NULL`, e.g.
268 //456 //
269 // ```c457 // ```c
270 // gtk_accessible_update_relation (accessible,458 // gtk_accessible_update_relation (accessible,
@@ -294,13 +482,17 @@ func (x *Banner) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.Acces
294 482
295 }483 }
296 484
297-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]485+// Updates a list of accessible states.
298-// documentation for the value types of accessible states.
299 //486 //
300-// This function should be called by `GtkWidget` types whenever an accessible487+// See the [enum@Gtk.AccessibleState] documentation for the
301-// state change must be communicated to assistive technologies.488+// value types of accessible states.
489+//
490+// This function should be called by `GtkWidget` types whenever
491+// an accessible state change must be communicated to assistive
492+// technologies.
302 //493 //
303 // Example:494 // Example:
495+//
304 // ```c496 // ```c
305 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;497 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
306 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),498 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -413,7 +605,7 @@ func (x *Banner) SetDetailedActionName(DetailedActionNameVar string) {
413 // Gets the ID of the @buildable object.605 // Gets the ID of the @buildable object.
414 //606 //
415 // `GtkBuilder` sets the name based on the ID attribute607 // `GtkBuilder` sets the name based on the ID attribute
416-// of the <object> tag used to construct the @buildable.608+// of the `<object>` tag used to construct the @buildable.
417 func (x *Banner) GetBuildableId() string {609 func (x *Banner) GetBuildableId() string {
418 610
419 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())611 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
@@ -428,15 +620,19 @@ func init() {
428 panic(err)620 panic(err)
429 }621 }
430 622
623+ core.PuregoSafeRegister(&xBannerButtonStyleGLibType, lib, "adw_banner_button_style_get_type")
624+
431 core.PuregoSafeRegister(&xBannerGLibType, lib, "adw_banner_get_type")625 core.PuregoSafeRegister(&xBannerGLibType, lib, "adw_banner_get_type")
432 626
433 core.PuregoSafeRegister(&xNewBanner, lib, "adw_banner_new")627 core.PuregoSafeRegister(&xNewBanner, lib, "adw_banner_new")
434 628
435 core.PuregoSafeRegister(&xBannerGetButtonLabel, lib, "adw_banner_get_button_label")629 core.PuregoSafeRegister(&xBannerGetButtonLabel, lib, "adw_banner_get_button_label")
630+ core.PuregoSafeRegister(&xBannerGetButtonStyle, lib, "adw_banner_get_button_style")
436 core.PuregoSafeRegister(&xBannerGetRevealed, lib, "adw_banner_get_revealed")631 core.PuregoSafeRegister(&xBannerGetRevealed, lib, "adw_banner_get_revealed")
437 core.PuregoSafeRegister(&xBannerGetTitle, lib, "adw_banner_get_title")632 core.PuregoSafeRegister(&xBannerGetTitle, lib, "adw_banner_get_title")
438 core.PuregoSafeRegister(&xBannerGetUseMarkup, lib, "adw_banner_get_use_markup")633 core.PuregoSafeRegister(&xBannerGetUseMarkup, lib, "adw_banner_get_use_markup")
439 core.PuregoSafeRegister(&xBannerSetButtonLabel, lib, "adw_banner_set_button_label")634 core.PuregoSafeRegister(&xBannerSetButtonLabel, lib, "adw_banner_set_button_label")
635+ core.PuregoSafeRegister(&xBannerSetButtonStyle, lib, "adw_banner_set_button_style")
440 core.PuregoSafeRegister(&xBannerSetRevealed, lib, "adw_banner_set_revealed")636 core.PuregoSafeRegister(&xBannerSetRevealed, lib, "adw_banner_set_revealed")
441 core.PuregoSafeRegister(&xBannerSetTitle, lib, "adw_banner_set_title")637 core.PuregoSafeRegister(&xBannerSetTitle, lib, "adw_banner_set_title")
442 core.PuregoSafeRegister(&xBannerSetUseMarkup, lib, "adw_banner_set_use_markup")638 core.PuregoSafeRegister(&xBannerSetUseMarkup, lib, "adw_banner_set_use_markup")
M v4/adw/adw-bin.go +145 -10
@@ -106,34 +106,165 @@ func (c *Bin) SetGoPointer(ptr uintptr) {
106 c.Ptr = ptr106 c.Ptr = ptr
107 }107 }
108 108
109-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.109+// Requests the user's screen reader to announce the given message.
110+//
111+// This kind of notification is useful for messages that
112+// either have only a visual representation or that are not
113+// exposed visually at all, e.g. a notification about a
114+// successful operation.
115+//
116+// Also, by using this API, you can ensure that the message
117+// does not interrupts the user's current screen reader output.
118+func (x *Bin) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
119+
120+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
121+
122+}
123+
124+// Retrieves the accessible parent for an accessible object.
125+//
126+// This function returns `NULL` for top level widgets.
127+func (x *Bin) GetAccessibleParent() *gtk.AccessibleBase {
128+ var cls *gtk.AccessibleBase
129+
130+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
131+
132+ if cret == 0 {
133+ return nil
134+ }
135+ cls = &gtk.AccessibleBase{}
136+ cls.Ptr = cret
137+ return cls
138+}
139+
140+// Retrieves the accessible role of an accessible object.
110 func (x *Bin) GetAccessibleRole() gtk.AccessibleRole {141 func (x *Bin) GetAccessibleRole() gtk.AccessibleRole {
111 142
112 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())143 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
113 return cret144 return cret
114 }145 }
115 146
116-// Resets the accessible @property to its default value.147+// Retrieves the implementation for the given accessible object.
148+func (x *Bin) GetAtContext() *gtk.ATContext {
149+ var cls *gtk.ATContext
150+
151+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
152+
153+ if cret == 0 {
154+ return nil
155+ }
156+ cls = &gtk.ATContext{}
157+ cls.Ptr = cret
158+ return cls
159+}
160+
161+// Queries the coordinates and dimensions of this accessible
162+//
163+// This functionality can be overridden by `GtkAccessible`
164+// implementations, e.g. to get the bounds from an ignored
165+// child widget.
166+func (x *Bin) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
167+
168+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
169+ return cret
170+}
171+
172+// Retrieves the first accessible child of an accessible object.
173+func (x *Bin) GetFirstAccessibleChild() *gtk.AccessibleBase {
174+ var cls *gtk.AccessibleBase
175+
176+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
177+
178+ if cret == 0 {
179+ return nil
180+ }
181+ cls = &gtk.AccessibleBase{}
182+ cls.Ptr = cret
183+ return cls
184+}
185+
186+// Retrieves the next accessible sibling of an accessible object
187+func (x *Bin) GetNextAccessibleSibling() *gtk.AccessibleBase {
188+ var cls *gtk.AccessibleBase
189+
190+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
191+
192+ if cret == 0 {
193+ return nil
194+ }
195+ cls = &gtk.AccessibleBase{}
196+ cls.Ptr = cret
197+ return cls
198+}
199+
200+// Queries a platform state, such as focus.
201+//
202+// This functionality can be overridden by `GtkAccessible`
203+// implementations, e.g. to get platform state from an ignored
204+// child widget, as is the case for `GtkText` wrappers.
205+func (x *Bin) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
206+
207+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
208+ return cret
209+}
210+
211+// Resets the accessible property to its default value.
117 func (x *Bin) ResetProperty(PropertyVar gtk.AccessibleProperty) {212 func (x *Bin) ResetProperty(PropertyVar gtk.AccessibleProperty) {
118 213
119 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)214 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
120 215
121 }216 }
122 217
123-// Resets the accessible @relation to its default value.218+// Resets the accessible relation to its default value.
124 func (x *Bin) ResetRelation(RelationVar gtk.AccessibleRelation) {219 func (x *Bin) ResetRelation(RelationVar gtk.AccessibleRelation) {
125 220
126 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)221 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
127 222
128 }223 }
129 224
130-// Resets the accessible @state to its default value.225+// Resets the accessible state to its default value.
131 func (x *Bin) ResetState(StateVar gtk.AccessibleState) {226 func (x *Bin) ResetState(StateVar gtk.AccessibleState) {
132 227
133 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)228 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
134 229
135 }230 }
136 231
232+// Sets the parent and sibling of an accessible object.
233+//
234+// This function is meant to be used by accessible implementations that are
235+// not part of the widget hierarchy, and but act as a logical bridge between
236+// widgets. For instance, if a widget creates an object that holds metadata
237+// for each child, and you want that object to implement the `GtkAccessible`
238+// interface, you will use this function to ensure that the parent of each
239+// child widget is the metadata object, and the parent of each metadata
240+// object is the container widget.
241+func (x *Bin) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
242+
243+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
244+
245+}
246+
247+// Updates the next accessible sibling.
248+//
249+// That might be useful when a new child of a custom accessible
250+// is created, and it needs to be linked to a previous child.
251+func (x *Bin) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
252+
253+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
254+
255+}
256+
257+// Informs ATs that the platform state has changed.
258+//
259+// This function should be used by `GtkAccessible` implementations that
260+// have a platform state but are not widgets. Widgets handle platform
261+// states automatically.
262+func (x *Bin) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
263+
264+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
265+
266+}
267+
137 // Updates a list of accessible properties.268 // Updates a list of accessible properties.
138 //269 //
139 // See the [enum@Gtk.AccessibleProperty] documentation for the270 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -176,7 +307,7 @@ func (x *Bin) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.Access
176 // relation change must be communicated to assistive technologies.307 // relation change must be communicated to assistive technologies.
177 //308 //
178 // If the [enum@Gtk.AccessibleRelation] requires a list of references,309 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
179-// you should pass each reference individually, followed by %NULL, e.g.310+// you should pass each reference individually, followed by `NULL`, e.g.
180 //311 //
181 // ```c312 // ```c
182 // gtk_accessible_update_relation (accessible,313 // gtk_accessible_update_relation (accessible,
@@ -206,13 +337,17 @@ func (x *Bin) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.Accessib
206 337
207 }338 }
208 339
209-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]340+// Updates a list of accessible states.
210-// documentation for the value types of accessible states.
211 //341 //
212-// This function should be called by `GtkWidget` types whenever an accessible342+// See the [enum@Gtk.AccessibleState] documentation for the
213-// state change must be communicated to assistive technologies.343+// value types of accessible states.
344+//
345+// This function should be called by `GtkWidget` types whenever
346+// an accessible state change must be communicated to assistive
347+// technologies.
214 //348 //
215 // Example:349 // Example:
350+//
216 // ```c351 // ```c
217 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;352 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
218 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),353 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -242,7 +377,7 @@ func (x *Bin) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleState,
242 // Gets the ID of the @buildable object.377 // Gets the ID of the @buildable object.
243 //378 //
244 // `GtkBuilder` sets the name based on the ID attribute379 // `GtkBuilder` sets the name based on the ID attribute
245-// of the <object> tag used to construct the @buildable.380+// of the `<object>` tag used to construct the @buildable.
246 func (x *Bin) GetBuildableId() string {381 func (x *Bin) GetBuildableId() string {
247 382
248 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())383 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-bottom-sheet.go +176 -10
@@ -43,6 +43,9 @@ func (x *BottomSheetClass) GoPointer() uintptr {
43 // [property@BottomSheet:align] determines where along the bottom edge they are43 // [property@BottomSheet:align] determines where along the bottom edge they are
44 // placed.44 // placed.
45 //45 //
46+// Bottom bar can be hidden using the [property@BottomSheet:reveal-bottom-bar]
47+// property.
48+//
46 // `AdwBottomSheet` can be useful for applications such as music players, that49 // `AdwBottomSheet` can be useful for applications such as music players, that
47 // want to have a persistent bottom bar that expands into a bottom sheet when50 // want to have a persistent bottom bar that expands into a bottom sheet when
48 // clicked. It's meant for cases where a bottom sheet is tightly integrated into51 // clicked. It's meant for cases where a bottom sheet is tightly integrated into
@@ -228,6 +231,15 @@ func (x *BottomSheet) GetOpen() bool {
228 return cret231 return cret
229 }232 }
230 233
234+var xBottomSheetGetRevealBottomBar func(uintptr) bool
235+
236+// Gets whether the bottom bar is revealed.
237+func (x *BottomSheet) GetRevealBottomBar() bool {
238+
239+ cret := xBottomSheetGetRevealBottomBar(x.GoPointer())
240+ return cret
241+}
242+
231 var xBottomSheetGetSheet func(uintptr) uintptr243 var xBottomSheetGetSheet func(uintptr) uintptr
232 244
233 // Gets the bottom sheet widget for @self.245 // Gets the bottom sheet widget for @self.
@@ -285,6 +297,9 @@ var xBottomSheetSetBottomBar func(uintptr, uintptr)
285 //297 //
286 // Shown when [property@BottomSheet:open] is `FALSE`. When open, morphs into298 // Shown when [property@BottomSheet:open] is `FALSE`. When open, morphs into
287 // the [property@BottomSheet:sheet].299 // the [property@BottomSheet:sheet].
300+//
301+// Bottom bar can be temporarily hidden using the
302+// [property@BottomSheet:reveal-bottom-bar] property.
288 func (x *BottomSheet) SetBottomBar(BottomBarVar *gtk.Widget) {303 func (x *BottomSheet) SetBottomBar(BottomBarVar *gtk.Widget) {
289 304
290 xBottomSheetSetBottomBar(x.GoPointer(), BottomBarVar.GoPointer())305 xBottomSheetSetBottomBar(x.GoPointer(), BottomBarVar.GoPointer())
@@ -366,6 +381,20 @@ func (x *BottomSheet) SetOpen(OpenVar bool) {
366 381
367 }382 }
368 383
384+var xBottomSheetSetRevealBottomBar func(uintptr, bool)
385+
386+// Sets whether to reveal the bottom bar.
387+//
388+// The transition will be animated.
389+//
390+// See [property@BottomSheet:bottom-bar] and
391+// [property@BottomSheet:bottom-bar-height].
392+func (x *BottomSheet) SetRevealBottomBar(RevealVar bool) {
393+
394+ xBottomSheetSetRevealBottomBar(x.GoPointer(), RevealVar)
395+
396+}
397+
369 var xBottomSheetSetSheet func(uintptr, uintptr)398 var xBottomSheetSetSheet func(uintptr, uintptr)
370 399
371 // Sets the bottom sheet widget for @self.400 // Sets the bottom sheet widget for @self.
@@ -474,34 +503,165 @@ func (x *BottomSheet) GetSwipeArea(NavigationDirectionVar NavigationDirection, I
474 503
475 }504 }
476 505
477-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.506+// Requests the user's screen reader to announce the given message.
507+//
508+// This kind of notification is useful for messages that
509+// either have only a visual representation or that are not
510+// exposed visually at all, e.g. a notification about a
511+// successful operation.
512+//
513+// Also, by using this API, you can ensure that the message
514+// does not interrupts the user's current screen reader output.
515+func (x *BottomSheet) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
516+
517+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
518+
519+}
520+
521+// Retrieves the accessible parent for an accessible object.
522+//
523+// This function returns `NULL` for top level widgets.
524+func (x *BottomSheet) GetAccessibleParent() *gtk.AccessibleBase {
525+ var cls *gtk.AccessibleBase
526+
527+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
528+
529+ if cret == 0 {
530+ return nil
531+ }
532+ cls = &gtk.AccessibleBase{}
533+ cls.Ptr = cret
534+ return cls
535+}
536+
537+// Retrieves the accessible role of an accessible object.
478 func (x *BottomSheet) GetAccessibleRole() gtk.AccessibleRole {538 func (x *BottomSheet) GetAccessibleRole() gtk.AccessibleRole {
479 539
480 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())540 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
481 return cret541 return cret
482 }542 }
483 543
484-// Resets the accessible @property to its default value.544+// Retrieves the implementation for the given accessible object.
545+func (x *BottomSheet) GetAtContext() *gtk.ATContext {
546+ var cls *gtk.ATContext
547+
548+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
549+
550+ if cret == 0 {
551+ return nil
552+ }
553+ cls = &gtk.ATContext{}
554+ cls.Ptr = cret
555+ return cls
556+}
557+
558+// Queries the coordinates and dimensions of this accessible
559+//
560+// This functionality can be overridden by `GtkAccessible`
561+// implementations, e.g. to get the bounds from an ignored
562+// child widget.
563+func (x *BottomSheet) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
564+
565+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
566+ return cret
567+}
568+
569+// Retrieves the first accessible child of an accessible object.
570+func (x *BottomSheet) GetFirstAccessibleChild() *gtk.AccessibleBase {
571+ var cls *gtk.AccessibleBase
572+
573+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
574+
575+ if cret == 0 {
576+ return nil
577+ }
578+ cls = &gtk.AccessibleBase{}
579+ cls.Ptr = cret
580+ return cls
581+}
582+
583+// Retrieves the next accessible sibling of an accessible object
584+func (x *BottomSheet) GetNextAccessibleSibling() *gtk.AccessibleBase {
585+ var cls *gtk.AccessibleBase
586+
587+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
588+
589+ if cret == 0 {
590+ return nil
591+ }
592+ cls = &gtk.AccessibleBase{}
593+ cls.Ptr = cret
594+ return cls
595+}
596+
597+// Queries a platform state, such as focus.
598+//
599+// This functionality can be overridden by `GtkAccessible`
600+// implementations, e.g. to get platform state from an ignored
601+// child widget, as is the case for `GtkText` wrappers.
602+func (x *BottomSheet) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
603+
604+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
605+ return cret
606+}
607+
608+// Resets the accessible property to its default value.
485 func (x *BottomSheet) ResetProperty(PropertyVar gtk.AccessibleProperty) {609 func (x *BottomSheet) ResetProperty(PropertyVar gtk.AccessibleProperty) {
486 610
487 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)611 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
488 612
489 }613 }
490 614
491-// Resets the accessible @relation to its default value.615+// Resets the accessible relation to its default value.
492 func (x *BottomSheet) ResetRelation(RelationVar gtk.AccessibleRelation) {616 func (x *BottomSheet) ResetRelation(RelationVar gtk.AccessibleRelation) {
493 617
494 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)618 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
495 619
496 }620 }
497 621
498-// Resets the accessible @state to its default value.622+// Resets the accessible state to its default value.
499 func (x *BottomSheet) ResetState(StateVar gtk.AccessibleState) {623 func (x *BottomSheet) ResetState(StateVar gtk.AccessibleState) {
500 624
501 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)625 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
502 626
503 }627 }
504 628
629+// Sets the parent and sibling of an accessible object.
630+//
631+// This function is meant to be used by accessible implementations that are
632+// not part of the widget hierarchy, and but act as a logical bridge between
633+// widgets. For instance, if a widget creates an object that holds metadata
634+// for each child, and you want that object to implement the `GtkAccessible`
635+// interface, you will use this function to ensure that the parent of each
636+// child widget is the metadata object, and the parent of each metadata
637+// object is the container widget.
638+func (x *BottomSheet) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
639+
640+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
641+
642+}
643+
644+// Updates the next accessible sibling.
645+//
646+// That might be useful when a new child of a custom accessible
647+// is created, and it needs to be linked to a previous child.
648+func (x *BottomSheet) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
649+
650+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
651+
652+}
653+
654+// Informs ATs that the platform state has changed.
655+//
656+// This function should be used by `GtkAccessible` implementations that
657+// have a platform state but are not widgets. Widgets handle platform
658+// states automatically.
659+func (x *BottomSheet) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
660+
661+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
662+
663+}
664+
505 // Updates a list of accessible properties.665 // Updates a list of accessible properties.
506 //666 //
507 // See the [enum@Gtk.AccessibleProperty] documentation for the667 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -544,7 +704,7 @@ func (x *BottomSheet) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gt
544 // relation change must be communicated to assistive technologies.704 // relation change must be communicated to assistive technologies.
545 //705 //
546 // If the [enum@Gtk.AccessibleRelation] requires a list of references,706 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
547-// you should pass each reference individually, followed by %NULL, e.g.707+// you should pass each reference individually, followed by `NULL`, e.g.
548 //708 //
549 // ```c709 // ```c
550 // gtk_accessible_update_relation (accessible,710 // gtk_accessible_update_relation (accessible,
@@ -574,13 +734,17 @@ func (x *BottomSheet) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.
574 734
575 }735 }
576 736
577-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]737+// Updates a list of accessible states.
578-// documentation for the value types of accessible states.
579 //738 //
580-// This function should be called by `GtkWidget` types whenever an accessible739+// See the [enum@Gtk.AccessibleState] documentation for the
581-// state change must be communicated to assistive technologies.740+// value types of accessible states.
741+//
742+// This function should be called by `GtkWidget` types whenever
743+// an accessible state change must be communicated to assistive
744+// technologies.
582 //745 //
583 // Example:746 // Example:
747+//
584 // ```c748 // ```c
585 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;749 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
586 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),750 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -610,7 +774,7 @@ func (x *BottomSheet) UpdateStateValue(NStatesVar int, StatesVar []gtk.Accessibl
610 // Gets the ID of the @buildable object.774 // Gets the ID of the @buildable object.
611 //775 //
612 // `GtkBuilder` sets the name based on the ID attribute776 // `GtkBuilder` sets the name based on the ID attribute
613-// of the <object> tag used to construct the @buildable.777+// of the `<object>` tag used to construct the @buildable.
614 func (x *BottomSheet) GetBuildableId() string {778 func (x *BottomSheet) GetBuildableId() string {
615 779
616 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())780 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
@@ -638,6 +802,7 @@ func init() {
638 core.PuregoSafeRegister(&xBottomSheetGetFullWidth, lib, "adw_bottom_sheet_get_full_width")802 core.PuregoSafeRegister(&xBottomSheetGetFullWidth, lib, "adw_bottom_sheet_get_full_width")
639 core.PuregoSafeRegister(&xBottomSheetGetModal, lib, "adw_bottom_sheet_get_modal")803 core.PuregoSafeRegister(&xBottomSheetGetModal, lib, "adw_bottom_sheet_get_modal")
640 core.PuregoSafeRegister(&xBottomSheetGetOpen, lib, "adw_bottom_sheet_get_open")804 core.PuregoSafeRegister(&xBottomSheetGetOpen, lib, "adw_bottom_sheet_get_open")
805+ core.PuregoSafeRegister(&xBottomSheetGetRevealBottomBar, lib, "adw_bottom_sheet_get_reveal_bottom_bar")
641 core.PuregoSafeRegister(&xBottomSheetGetSheet, lib, "adw_bottom_sheet_get_sheet")806 core.PuregoSafeRegister(&xBottomSheetGetSheet, lib, "adw_bottom_sheet_get_sheet")
642 core.PuregoSafeRegister(&xBottomSheetGetSheetHeight, lib, "adw_bottom_sheet_get_sheet_height")807 core.PuregoSafeRegister(&xBottomSheetGetSheetHeight, lib, "adw_bottom_sheet_get_sheet_height")
643 core.PuregoSafeRegister(&xBottomSheetGetShowDragHandle, lib, "adw_bottom_sheet_get_show_drag_handle")808 core.PuregoSafeRegister(&xBottomSheetGetShowDragHandle, lib, "adw_bottom_sheet_get_show_drag_handle")
@@ -649,6 +814,7 @@ func init() {
649 core.PuregoSafeRegister(&xBottomSheetSetFullWidth, lib, "adw_bottom_sheet_set_full_width")814 core.PuregoSafeRegister(&xBottomSheetSetFullWidth, lib, "adw_bottom_sheet_set_full_width")
650 core.PuregoSafeRegister(&xBottomSheetSetModal, lib, "adw_bottom_sheet_set_modal")815 core.PuregoSafeRegister(&xBottomSheetSetModal, lib, "adw_bottom_sheet_set_modal")
651 core.PuregoSafeRegister(&xBottomSheetSetOpen, lib, "adw_bottom_sheet_set_open")816 core.PuregoSafeRegister(&xBottomSheetSetOpen, lib, "adw_bottom_sheet_set_open")
817+ core.PuregoSafeRegister(&xBottomSheetSetRevealBottomBar, lib, "adw_bottom_sheet_set_reveal_bottom_bar")
652 core.PuregoSafeRegister(&xBottomSheetSetSheet, lib, "adw_bottom_sheet_set_sheet")818 core.PuregoSafeRegister(&xBottomSheetSetSheet, lib, "adw_bottom_sheet_set_sheet")
653 core.PuregoSafeRegister(&xBottomSheetSetShowDragHandle, lib, "adw_bottom_sheet_set_show_drag_handle")819 core.PuregoSafeRegister(&xBottomSheetSetShowDragHandle, lib, "adw_bottom_sheet_set_show_drag_handle")
654 820
M v4/adw/adw-breakpoint-bin.go +145 -10
@@ -246,34 +246,165 @@ func (c *BreakpointBin) SetGoPointer(ptr uintptr) {
246 c.Ptr = ptr246 c.Ptr = ptr
247 }247 }
248 248
249-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.249+// Requests the user's screen reader to announce the given message.
250+//
251+// This kind of notification is useful for messages that
252+// either have only a visual representation or that are not
253+// exposed visually at all, e.g. a notification about a
254+// successful operation.
255+//
256+// Also, by using this API, you can ensure that the message
257+// does not interrupts the user's current screen reader output.
258+func (x *BreakpointBin) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
259+
260+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
261+
262+}
263+
264+// Retrieves the accessible parent for an accessible object.
265+//
266+// This function returns `NULL` for top level widgets.
267+func (x *BreakpointBin) GetAccessibleParent() *gtk.AccessibleBase {
268+ var cls *gtk.AccessibleBase
269+
270+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
271+
272+ if cret == 0 {
273+ return nil
274+ }
275+ cls = &gtk.AccessibleBase{}
276+ cls.Ptr = cret
277+ return cls
278+}
279+
280+// Retrieves the accessible role of an accessible object.
250 func (x *BreakpointBin) GetAccessibleRole() gtk.AccessibleRole {281 func (x *BreakpointBin) GetAccessibleRole() gtk.AccessibleRole {
251 282
252 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())283 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
253 return cret284 return cret
254 }285 }
255 286
256-// Resets the accessible @property to its default value.287+// Retrieves the implementation for the given accessible object.
288+func (x *BreakpointBin) GetAtContext() *gtk.ATContext {
289+ var cls *gtk.ATContext
290+
291+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
292+
293+ if cret == 0 {
294+ return nil
295+ }
296+ cls = &gtk.ATContext{}
297+ cls.Ptr = cret
298+ return cls
299+}
300+
301+// Queries the coordinates and dimensions of this accessible
302+//
303+// This functionality can be overridden by `GtkAccessible`
304+// implementations, e.g. to get the bounds from an ignored
305+// child widget.
306+func (x *BreakpointBin) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
307+
308+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
309+ return cret
310+}
311+
312+// Retrieves the first accessible child of an accessible object.
313+func (x *BreakpointBin) GetFirstAccessibleChild() *gtk.AccessibleBase {
314+ var cls *gtk.AccessibleBase
315+
316+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
317+
318+ if cret == 0 {
319+ return nil
320+ }
321+ cls = &gtk.AccessibleBase{}
322+ cls.Ptr = cret
323+ return cls
324+}
325+
326+// Retrieves the next accessible sibling of an accessible object
327+func (x *BreakpointBin) GetNextAccessibleSibling() *gtk.AccessibleBase {
328+ var cls *gtk.AccessibleBase
329+
330+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
331+
332+ if cret == 0 {
333+ return nil
334+ }
335+ cls = &gtk.AccessibleBase{}
336+ cls.Ptr = cret
337+ return cls
338+}
339+
340+// Queries a platform state, such as focus.
341+//
342+// This functionality can be overridden by `GtkAccessible`
343+// implementations, e.g. to get platform state from an ignored
344+// child widget, as is the case for `GtkText` wrappers.
345+func (x *BreakpointBin) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
346+
347+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
348+ return cret
349+}
350+
351+// Resets the accessible property to its default value.
257 func (x *BreakpointBin) ResetProperty(PropertyVar gtk.AccessibleProperty) {352 func (x *BreakpointBin) ResetProperty(PropertyVar gtk.AccessibleProperty) {
258 353
259 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)354 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
260 355
261 }356 }
262 357
263-// Resets the accessible @relation to its default value.358+// Resets the accessible relation to its default value.
264 func (x *BreakpointBin) ResetRelation(RelationVar gtk.AccessibleRelation) {359 func (x *BreakpointBin) ResetRelation(RelationVar gtk.AccessibleRelation) {
265 360
266 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)361 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
267 362
268 }363 }
269 364
270-// Resets the accessible @state to its default value.365+// Resets the accessible state to its default value.
271 func (x *BreakpointBin) ResetState(StateVar gtk.AccessibleState) {366 func (x *BreakpointBin) ResetState(StateVar gtk.AccessibleState) {
272 367
273 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)368 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
274 369
275 }370 }
276 371
372+// Sets the parent and sibling of an accessible object.
373+//
374+// This function is meant to be used by accessible implementations that are
375+// not part of the widget hierarchy, and but act as a logical bridge between
376+// widgets. For instance, if a widget creates an object that holds metadata
377+// for each child, and you want that object to implement the `GtkAccessible`
378+// interface, you will use this function to ensure that the parent of each
379+// child widget is the metadata object, and the parent of each metadata
380+// object is the container widget.
381+func (x *BreakpointBin) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
382+
383+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
384+
385+}
386+
387+// Updates the next accessible sibling.
388+//
389+// That might be useful when a new child of a custom accessible
390+// is created, and it needs to be linked to a previous child.
391+func (x *BreakpointBin) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
392+
393+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
394+
395+}
396+
397+// Informs ATs that the platform state has changed.
398+//
399+// This function should be used by `GtkAccessible` implementations that
400+// have a platform state but are not widgets. Widgets handle platform
401+// states automatically.
402+func (x *BreakpointBin) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
403+
404+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
405+
406+}
407+
277 // Updates a list of accessible properties.408 // Updates a list of accessible properties.
278 //409 //
279 // See the [enum@Gtk.AccessibleProperty] documentation for the410 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -316,7 +447,7 @@ func (x *BreakpointBin) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []
316 // relation change must be communicated to assistive technologies.447 // relation change must be communicated to assistive technologies.
317 //448 //
318 // If the [enum@Gtk.AccessibleRelation] requires a list of references,449 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
319-// you should pass each reference individually, followed by %NULL, e.g.450+// you should pass each reference individually, followed by `NULL`, e.g.
320 //451 //
321 // ```c452 // ```c
322 // gtk_accessible_update_relation (accessible,453 // gtk_accessible_update_relation (accessible,
@@ -346,13 +477,17 @@ func (x *BreakpointBin) UpdateRelationValue(NRelationsVar int, RelationsVar []gt
346 477
347 }478 }
348 479
349-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]480+// Updates a list of accessible states.
350-// documentation for the value types of accessible states.
351 //481 //
352-// This function should be called by `GtkWidget` types whenever an accessible482+// See the [enum@Gtk.AccessibleState] documentation for the
353-// state change must be communicated to assistive technologies.483+// value types of accessible states.
484+//
485+// This function should be called by `GtkWidget` types whenever
486+// an accessible state change must be communicated to assistive
487+// technologies.
354 //488 //
355 // Example:489 // Example:
490+//
356 // ```c491 // ```c
357 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;492 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
358 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),493 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -382,7 +517,7 @@ func (x *BreakpointBin) UpdateStateValue(NStatesVar int, StatesVar []gtk.Accessi
382 // Gets the ID of the @buildable object.517 // Gets the ID of the @buildable object.
383 //518 //
384 // `GtkBuilder` sets the name based on the ID attribute519 // `GtkBuilder` sets the name based on the ID attribute
385-// of the <object> tag used to construct the @buildable.520+// of the `<object>` tag used to construct the @buildable.
386 func (x *BreakpointBin) GetBuildableId() string {521 func (x *BreakpointBin) GetBuildableId() string {
387 522
388 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())523 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-breakpoint.go +1 -1
@@ -478,7 +478,7 @@ func (x *Breakpoint) ConnectUnapply(cb *func(Breakpoint)) uint32 {
478 // Gets the ID of the @buildable object.478 // Gets the ID of the @buildable object.
479 //479 //
480 // `GtkBuilder` sets the name based on the ID attribute480 // `GtkBuilder` sets the name based on the ID attribute
481-// of the <object> tag used to construct the @buildable.481+// of the `<object>` tag used to construct the @buildable.
482 func (x *Breakpoint) GetBuildableId() string {482 func (x *Breakpoint) GetBuildableId() string {
483 483
484 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())484 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-button-content.go +145 -10
@@ -201,34 +201,165 @@ func (c *ButtonContent) SetGoPointer(ptr uintptr) {
201 c.Ptr = ptr201 c.Ptr = ptr
202 }202 }
203 203
204-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.204+// Requests the user's screen reader to announce the given message.
205+//
206+// This kind of notification is useful for messages that
207+// either have only a visual representation or that are not
208+// exposed visually at all, e.g. a notification about a
209+// successful operation.
210+//
211+// Also, by using this API, you can ensure that the message
212+// does not interrupts the user's current screen reader output.
213+func (x *ButtonContent) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
214+
215+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
216+
217+}
218+
219+// Retrieves the accessible parent for an accessible object.
220+//
221+// This function returns `NULL` for top level widgets.
222+func (x *ButtonContent) GetAccessibleParent() *gtk.AccessibleBase {
223+ var cls *gtk.AccessibleBase
224+
225+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
226+
227+ if cret == 0 {
228+ return nil
229+ }
230+ cls = &gtk.AccessibleBase{}
231+ cls.Ptr = cret
232+ return cls
233+}
234+
235+// Retrieves the accessible role of an accessible object.
205 func (x *ButtonContent) GetAccessibleRole() gtk.AccessibleRole {236 func (x *ButtonContent) GetAccessibleRole() gtk.AccessibleRole {
206 237
207 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())238 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
208 return cret239 return cret
209 }240 }
210 241
211-// Resets the accessible @property to its default value.242+// Retrieves the implementation for the given accessible object.
243+func (x *ButtonContent) GetAtContext() *gtk.ATContext {
244+ var cls *gtk.ATContext
245+
246+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
247+
248+ if cret == 0 {
249+ return nil
250+ }
251+ cls = &gtk.ATContext{}
252+ cls.Ptr = cret
253+ return cls
254+}
255+
256+// Queries the coordinates and dimensions of this accessible
257+//
258+// This functionality can be overridden by `GtkAccessible`
259+// implementations, e.g. to get the bounds from an ignored
260+// child widget.
261+func (x *ButtonContent) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
262+
263+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
264+ return cret
265+}
266+
267+// Retrieves the first accessible child of an accessible object.
268+func (x *ButtonContent) GetFirstAccessibleChild() *gtk.AccessibleBase {
269+ var cls *gtk.AccessibleBase
270+
271+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
272+
273+ if cret == 0 {
274+ return nil
275+ }
276+ cls = &gtk.AccessibleBase{}
277+ cls.Ptr = cret
278+ return cls
279+}
280+
281+// Retrieves the next accessible sibling of an accessible object
282+func (x *ButtonContent) GetNextAccessibleSibling() *gtk.AccessibleBase {
283+ var cls *gtk.AccessibleBase
284+
285+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
286+
287+ if cret == 0 {
288+ return nil
289+ }
290+ cls = &gtk.AccessibleBase{}
291+ cls.Ptr = cret
292+ return cls
293+}
294+
295+// Queries a platform state, such as focus.
296+//
297+// This functionality can be overridden by `GtkAccessible`
298+// implementations, e.g. to get platform state from an ignored
299+// child widget, as is the case for `GtkText` wrappers.
300+func (x *ButtonContent) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
301+
302+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
303+ return cret
304+}
305+
306+// Resets the accessible property to its default value.
212 func (x *ButtonContent) ResetProperty(PropertyVar gtk.AccessibleProperty) {307 func (x *ButtonContent) ResetProperty(PropertyVar gtk.AccessibleProperty) {
213 308
214 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)309 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
215 310
216 }311 }
217 312
218-// Resets the accessible @relation to its default value.313+// Resets the accessible relation to its default value.
219 func (x *ButtonContent) ResetRelation(RelationVar gtk.AccessibleRelation) {314 func (x *ButtonContent) ResetRelation(RelationVar gtk.AccessibleRelation) {
220 315
221 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)316 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
222 317
223 }318 }
224 319
225-// Resets the accessible @state to its default value.320+// Resets the accessible state to its default value.
226 func (x *ButtonContent) ResetState(StateVar gtk.AccessibleState) {321 func (x *ButtonContent) ResetState(StateVar gtk.AccessibleState) {
227 322
228 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)323 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
229 324
230 }325 }
231 326
327+// Sets the parent and sibling of an accessible object.
328+//
329+// This function is meant to be used by accessible implementations that are
330+// not part of the widget hierarchy, and but act as a logical bridge between
331+// widgets. For instance, if a widget creates an object that holds metadata
332+// for each child, and you want that object to implement the `GtkAccessible`
333+// interface, you will use this function to ensure that the parent of each
334+// child widget is the metadata object, and the parent of each metadata
335+// object is the container widget.
336+func (x *ButtonContent) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
337+
338+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
339+
340+}
341+
342+// Updates the next accessible sibling.
343+//
344+// That might be useful when a new child of a custom accessible
345+// is created, and it needs to be linked to a previous child.
346+func (x *ButtonContent) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
347+
348+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
349+
350+}
351+
352+// Informs ATs that the platform state has changed.
353+//
354+// This function should be used by `GtkAccessible` implementations that
355+// have a platform state but are not widgets. Widgets handle platform
356+// states automatically.
357+func (x *ButtonContent) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
358+
359+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
360+
361+}
362+
232 // Updates a list of accessible properties.363 // Updates a list of accessible properties.
233 //364 //
234 // See the [enum@Gtk.AccessibleProperty] documentation for the365 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -271,7 +402,7 @@ func (x *ButtonContent) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []
271 // relation change must be communicated to assistive technologies.402 // relation change must be communicated to assistive technologies.
272 //403 //
273 // If the [enum@Gtk.AccessibleRelation] requires a list of references,404 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
274-// you should pass each reference individually, followed by %NULL, e.g.405+// you should pass each reference individually, followed by `NULL`, e.g.
275 //406 //
276 // ```c407 // ```c
277 // gtk_accessible_update_relation (accessible,408 // gtk_accessible_update_relation (accessible,
@@ -301,13 +432,17 @@ func (x *ButtonContent) UpdateRelationValue(NRelationsVar int, RelationsVar []gt
301 432
302 }433 }
303 434
304-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]435+// Updates a list of accessible states.
305-// documentation for the value types of accessible states.
306 //436 //
307-// This function should be called by `GtkWidget` types whenever an accessible437+// See the [enum@Gtk.AccessibleState] documentation for the
308-// state change must be communicated to assistive technologies.438+// value types of accessible states.
439+//
440+// This function should be called by `GtkWidget` types whenever
441+// an accessible state change must be communicated to assistive
442+// technologies.
309 //443 //
310 // Example:444 // Example:
445+//
311 // ```c446 // ```c
312 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;447 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
313 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),448 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -337,7 +472,7 @@ func (x *ButtonContent) UpdateStateValue(NStatesVar int, StatesVar []gtk.Accessi
337 // Gets the ID of the @buildable object.472 // Gets the ID of the @buildable object.
338 //473 //
339 // `GtkBuilder` sets the name based on the ID attribute474 // `GtkBuilder` sets the name based on the ID attribute
340-// of the <object> tag used to construct the @buildable.475+// of the `<object>` tag used to construct the @buildable.
341 func (x *ButtonContent) GetBuildableId() string {476 func (x *ButtonContent) GetBuildableId() string {
342 477
343 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())478 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-button-row.go +145 -10
@@ -173,34 +173,165 @@ func (x *ButtonRow) ConnectActivated(cb *func(ButtonRow)) uint32 {
173 return gobject.SignalConnect(x.GoPointer(), "activated", cbRefPtr)173 return gobject.SignalConnect(x.GoPointer(), "activated", cbRefPtr)
174 }174 }
175 175
176-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.176+// Requests the user's screen reader to announce the given message.
177+//
178+// This kind of notification is useful for messages that
179+// either have only a visual representation or that are not
180+// exposed visually at all, e.g. a notification about a
181+// successful operation.
182+//
183+// Also, by using this API, you can ensure that the message
184+// does not interrupts the user's current screen reader output.
185+func (x *ButtonRow) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
186+
187+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
188+
189+}
190+
191+// Retrieves the accessible parent for an accessible object.
192+//
193+// This function returns `NULL` for top level widgets.
194+func (x *ButtonRow) GetAccessibleParent() *gtk.AccessibleBase {
195+ var cls *gtk.AccessibleBase
196+
197+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
198+
199+ if cret == 0 {
200+ return nil
201+ }
202+ cls = &gtk.AccessibleBase{}
203+ cls.Ptr = cret
204+ return cls
205+}
206+
207+// Retrieves the accessible role of an accessible object.
177 func (x *ButtonRow) GetAccessibleRole() gtk.AccessibleRole {208 func (x *ButtonRow) GetAccessibleRole() gtk.AccessibleRole {
178 209
179 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())210 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
180 return cret211 return cret
181 }212 }
182 213
183-// Resets the accessible @property to its default value.214+// Retrieves the implementation for the given accessible object.
215+func (x *ButtonRow) GetAtContext() *gtk.ATContext {
216+ var cls *gtk.ATContext
217+
218+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
219+
220+ if cret == 0 {
221+ return nil
222+ }
223+ cls = &gtk.ATContext{}
224+ cls.Ptr = cret
225+ return cls
226+}
227+
228+// Queries the coordinates and dimensions of this accessible
229+//
230+// This functionality can be overridden by `GtkAccessible`
231+// implementations, e.g. to get the bounds from an ignored
232+// child widget.
233+func (x *ButtonRow) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
234+
235+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
236+ return cret
237+}
238+
239+// Retrieves the first accessible child of an accessible object.
240+func (x *ButtonRow) GetFirstAccessibleChild() *gtk.AccessibleBase {
241+ var cls *gtk.AccessibleBase
242+
243+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
244+
245+ if cret == 0 {
246+ return nil
247+ }
248+ cls = &gtk.AccessibleBase{}
249+ cls.Ptr = cret
250+ return cls
251+}
252+
253+// Retrieves the next accessible sibling of an accessible object
254+func (x *ButtonRow) GetNextAccessibleSibling() *gtk.AccessibleBase {
255+ var cls *gtk.AccessibleBase
256+
257+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
258+
259+ if cret == 0 {
260+ return nil
261+ }
262+ cls = &gtk.AccessibleBase{}
263+ cls.Ptr = cret
264+ return cls
265+}
266+
267+// Queries a platform state, such as focus.
268+//
269+// This functionality can be overridden by `GtkAccessible`
270+// implementations, e.g. to get platform state from an ignored
271+// child widget, as is the case for `GtkText` wrappers.
272+func (x *ButtonRow) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
273+
274+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
275+ return cret
276+}
277+
278+// Resets the accessible property to its default value.
184 func (x *ButtonRow) ResetProperty(PropertyVar gtk.AccessibleProperty) {279 func (x *ButtonRow) ResetProperty(PropertyVar gtk.AccessibleProperty) {
185 280
186 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)281 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
187 282
188 }283 }
189 284
190-// Resets the accessible @relation to its default value.285+// Resets the accessible relation to its default value.
191 func (x *ButtonRow) ResetRelation(RelationVar gtk.AccessibleRelation) {286 func (x *ButtonRow) ResetRelation(RelationVar gtk.AccessibleRelation) {
192 287
193 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)288 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
194 289
195 }290 }
196 291
197-// Resets the accessible @state to its default value.292+// Resets the accessible state to its default value.
198 func (x *ButtonRow) ResetState(StateVar gtk.AccessibleState) {293 func (x *ButtonRow) ResetState(StateVar gtk.AccessibleState) {
199 294
200 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)295 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
201 296
202 }297 }
203 298
299+// Sets the parent and sibling of an accessible object.
300+//
301+// This function is meant to be used by accessible implementations that are
302+// not part of the widget hierarchy, and but act as a logical bridge between
303+// widgets. For instance, if a widget creates an object that holds metadata
304+// for each child, and you want that object to implement the `GtkAccessible`
305+// interface, you will use this function to ensure that the parent of each
306+// child widget is the metadata object, and the parent of each metadata
307+// object is the container widget.
308+func (x *ButtonRow) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
309+
310+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
311+
312+}
313+
314+// Updates the next accessible sibling.
315+//
316+// That might be useful when a new child of a custom accessible
317+// is created, and it needs to be linked to a previous child.
318+func (x *ButtonRow) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
319+
320+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
321+
322+}
323+
324+// Informs ATs that the platform state has changed.
325+//
326+// This function should be used by `GtkAccessible` implementations that
327+// have a platform state but are not widgets. Widgets handle platform
328+// states automatically.
329+func (x *ButtonRow) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
330+
331+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
332+
333+}
334+
204 // Updates a list of accessible properties.335 // Updates a list of accessible properties.
205 //336 //
206 // See the [enum@Gtk.AccessibleProperty] documentation for the337 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -243,7 +374,7 @@ func (x *ButtonRow) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.
243 // relation change must be communicated to assistive technologies.374 // relation change must be communicated to assistive technologies.
244 //375 //
245 // If the [enum@Gtk.AccessibleRelation] requires a list of references,376 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
246-// you should pass each reference individually, followed by %NULL, e.g.377+// you should pass each reference individually, followed by `NULL`, e.g.
247 //378 //
248 // ```c379 // ```c
249 // gtk_accessible_update_relation (accessible,380 // gtk_accessible_update_relation (accessible,
@@ -273,13 +404,17 @@ func (x *ButtonRow) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.Ac
273 404
274 }405 }
275 406
276-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]407+// Updates a list of accessible states.
277-// documentation for the value types of accessible states.
278 //408 //
279-// This function should be called by `GtkWidget` types whenever an accessible409+// See the [enum@Gtk.AccessibleState] documentation for the
280-// state change must be communicated to assistive technologies.410+// value types of accessible states.
411+//
412+// This function should be called by `GtkWidget` types whenever
413+// an accessible state change must be communicated to assistive
414+// technologies.
281 //415 //
282 // Example:416 // Example:
417+//
283 // ```c418 // ```c
284 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;419 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
285 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),420 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -392,7 +527,7 @@ func (x *ButtonRow) SetDetailedActionName(DetailedActionNameVar string) {
392 // Gets the ID of the @buildable object.527 // Gets the ID of the @buildable object.
393 //528 //
394 // `GtkBuilder` sets the name based on the ID attribute529 // `GtkBuilder` sets the name based on the ID attribute
395-// of the <object> tag used to construct the @buildable.530+// of the `<object>` tag used to construct the @buildable.
396 func (x *ButtonRow) GetBuildableId() string {531 func (x *ButtonRow) GetBuildableId() string {
397 532
398 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())533 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-carousel-indicator-dots.go +145 -10
@@ -112,34 +112,165 @@ func (c *CarouselIndicatorDots) SetGoPointer(ptr uintptr) {
112 c.Ptr = ptr112 c.Ptr = ptr
113 }113 }
114 114
115-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.115+// Requests the user's screen reader to announce the given message.
116+//
117+// This kind of notification is useful for messages that
118+// either have only a visual representation or that are not
119+// exposed visually at all, e.g. a notification about a
120+// successful operation.
121+//
122+// Also, by using this API, you can ensure that the message
123+// does not interrupts the user's current screen reader output.
124+func (x *CarouselIndicatorDots) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
125+
126+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
127+
128+}
129+
130+// Retrieves the accessible parent for an accessible object.
131+//
132+// This function returns `NULL` for top level widgets.
133+func (x *CarouselIndicatorDots) GetAccessibleParent() *gtk.AccessibleBase {
134+ var cls *gtk.AccessibleBase
135+
136+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
137+
138+ if cret == 0 {
139+ return nil
140+ }
141+ cls = &gtk.AccessibleBase{}
142+ cls.Ptr = cret
143+ return cls
144+}
145+
146+// Retrieves the accessible role of an accessible object.
116 func (x *CarouselIndicatorDots) GetAccessibleRole() gtk.AccessibleRole {147 func (x *CarouselIndicatorDots) GetAccessibleRole() gtk.AccessibleRole {
117 148
118 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())149 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
119 return cret150 return cret
120 }151 }
121 152
122-// Resets the accessible @property to its default value.153+// Retrieves the implementation for the given accessible object.
154+func (x *CarouselIndicatorDots) GetAtContext() *gtk.ATContext {
155+ var cls *gtk.ATContext
156+
157+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
158+
159+ if cret == 0 {
160+ return nil
161+ }
162+ cls = &gtk.ATContext{}
163+ cls.Ptr = cret
164+ return cls
165+}
166+
167+// Queries the coordinates and dimensions of this accessible
168+//
169+// This functionality can be overridden by `GtkAccessible`
170+// implementations, e.g. to get the bounds from an ignored
171+// child widget.
172+func (x *CarouselIndicatorDots) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
173+
174+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
175+ return cret
176+}
177+
178+// Retrieves the first accessible child of an accessible object.
179+func (x *CarouselIndicatorDots) GetFirstAccessibleChild() *gtk.AccessibleBase {
180+ var cls *gtk.AccessibleBase
181+
182+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
183+
184+ if cret == 0 {
185+ return nil
186+ }
187+ cls = &gtk.AccessibleBase{}
188+ cls.Ptr = cret
189+ return cls
190+}
191+
192+// Retrieves the next accessible sibling of an accessible object
193+func (x *CarouselIndicatorDots) GetNextAccessibleSibling() *gtk.AccessibleBase {
194+ var cls *gtk.AccessibleBase
195+
196+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
197+
198+ if cret == 0 {
199+ return nil
200+ }
201+ cls = &gtk.AccessibleBase{}
202+ cls.Ptr = cret
203+ return cls
204+}
205+
206+// Queries a platform state, such as focus.
207+//
208+// This functionality can be overridden by `GtkAccessible`
209+// implementations, e.g. to get platform state from an ignored
210+// child widget, as is the case for `GtkText` wrappers.
211+func (x *CarouselIndicatorDots) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
212+
213+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
214+ return cret
215+}
216+
217+// Resets the accessible property to its default value.
123 func (x *CarouselIndicatorDots) ResetProperty(PropertyVar gtk.AccessibleProperty) {218 func (x *CarouselIndicatorDots) ResetProperty(PropertyVar gtk.AccessibleProperty) {
124 219
125 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)220 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
126 221
127 }222 }
128 223
129-// Resets the accessible @relation to its default value.224+// Resets the accessible relation to its default value.
130 func (x *CarouselIndicatorDots) ResetRelation(RelationVar gtk.AccessibleRelation) {225 func (x *CarouselIndicatorDots) ResetRelation(RelationVar gtk.AccessibleRelation) {
131 226
132 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)227 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
133 228
134 }229 }
135 230
136-// Resets the accessible @state to its default value.231+// Resets the accessible state to its default value.
137 func (x *CarouselIndicatorDots) ResetState(StateVar gtk.AccessibleState) {232 func (x *CarouselIndicatorDots) ResetState(StateVar gtk.AccessibleState) {
138 233
139 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)234 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
140 235
141 }236 }
142 237
238+// Sets the parent and sibling of an accessible object.
239+//
240+// This function is meant to be used by accessible implementations that are
241+// not part of the widget hierarchy, and but act as a logical bridge between
242+// widgets. For instance, if a widget creates an object that holds metadata
243+// for each child, and you want that object to implement the `GtkAccessible`
244+// interface, you will use this function to ensure that the parent of each
245+// child widget is the metadata object, and the parent of each metadata
246+// object is the container widget.
247+func (x *CarouselIndicatorDots) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
248+
249+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
250+
251+}
252+
253+// Updates the next accessible sibling.
254+//
255+// That might be useful when a new child of a custom accessible
256+// is created, and it needs to be linked to a previous child.
257+func (x *CarouselIndicatorDots) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
258+
259+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
260+
261+}
262+
263+// Informs ATs that the platform state has changed.
264+//
265+// This function should be used by `GtkAccessible` implementations that
266+// have a platform state but are not widgets. Widgets handle platform
267+// states automatically.
268+func (x *CarouselIndicatorDots) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
269+
270+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
271+
272+}
273+
143 // Updates a list of accessible properties.274 // Updates a list of accessible properties.
144 //275 //
145 // See the [enum@Gtk.AccessibleProperty] documentation for the276 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -182,7 +313,7 @@ func (x *CarouselIndicatorDots) UpdatePropertyValue(NPropertiesVar int, Properti
182 // relation change must be communicated to assistive technologies.313 // relation change must be communicated to assistive technologies.
183 //314 //
184 // If the [enum@Gtk.AccessibleRelation] requires a list of references,315 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
185-// you should pass each reference individually, followed by %NULL, e.g.316+// you should pass each reference individually, followed by `NULL`, e.g.
186 //317 //
187 // ```c318 // ```c
188 // gtk_accessible_update_relation (accessible,319 // gtk_accessible_update_relation (accessible,
@@ -212,13 +343,17 @@ func (x *CarouselIndicatorDots) UpdateRelationValue(NRelationsVar int, Relations
212 343
213 }344 }
214 345
215-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]346+// Updates a list of accessible states.
216-// documentation for the value types of accessible states.
217 //347 //
218-// This function should be called by `GtkWidget` types whenever an accessible348+// See the [enum@Gtk.AccessibleState] documentation for the
219-// state change must be communicated to assistive technologies.349+// value types of accessible states.
350+//
351+// This function should be called by `GtkWidget` types whenever
352+// an accessible state change must be communicated to assistive
353+// technologies.
220 //354 //
221 // Example:355 // Example:
356+//
222 // ```c357 // ```c
223 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;358 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
224 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),359 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -248,7 +383,7 @@ func (x *CarouselIndicatorDots) UpdateStateValue(NStatesVar int, StatesVar []gtk
248 // Gets the ID of the @buildable object.383 // Gets the ID of the @buildable object.
249 //384 //
250 // `GtkBuilder` sets the name based on the ID attribute385 // `GtkBuilder` sets the name based on the ID attribute
251-// of the <object> tag used to construct the @buildable.386+// of the `<object>` tag used to construct the @buildable.
252 func (x *CarouselIndicatorDots) GetBuildableId() string {387 func (x *CarouselIndicatorDots) GetBuildableId() string {
253 388
254 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())389 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-carousel-indicator-lines.go +146 -11
@@ -26,7 +26,7 @@ func (x *CarouselIndicatorLinesClass) GoPointer() uintptr {
26 //26 //
27 // <picture>27 // <picture>
28 //28 //
29-// <source srcset="carousel-indicator-dots-lines.png" media="(prefers-color-scheme: dark)">29+// <source srcset="carousel-indicator-lines-dark.png" media="(prefers-color-scheme: dark)">
30 // <img src="carousel-indicator-lines.png" alt="carousel-indicator-lines">30 // <img src="carousel-indicator-lines.png" alt="carousel-indicator-lines">
31 //31 //
32 // </picture>32 // </picture>
@@ -111,34 +111,165 @@ func (c *CarouselIndicatorLines) SetGoPointer(ptr uintptr) {
111 c.Ptr = ptr111 c.Ptr = ptr
112 }112 }
113 113
114-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.114+// Requests the user's screen reader to announce the given message.
115+//
116+// This kind of notification is useful for messages that
117+// either have only a visual representation or that are not
118+// exposed visually at all, e.g. a notification about a
119+// successful operation.
120+//
121+// Also, by using this API, you can ensure that the message
122+// does not interrupts the user's current screen reader output.
123+func (x *CarouselIndicatorLines) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
124+
125+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
126+
127+}
128+
129+// Retrieves the accessible parent for an accessible object.
130+//
131+// This function returns `NULL` for top level widgets.
132+func (x *CarouselIndicatorLines) GetAccessibleParent() *gtk.AccessibleBase {
133+ var cls *gtk.AccessibleBase
134+
135+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
136+
137+ if cret == 0 {
138+ return nil
139+ }
140+ cls = &gtk.AccessibleBase{}
141+ cls.Ptr = cret
142+ return cls
143+}
144+
145+// Retrieves the accessible role of an accessible object.
115 func (x *CarouselIndicatorLines) GetAccessibleRole() gtk.AccessibleRole {146 func (x *CarouselIndicatorLines) GetAccessibleRole() gtk.AccessibleRole {
116 147
117 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())148 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
118 return cret149 return cret
119 }150 }
120 151
121-// Resets the accessible @property to its default value.152+// Retrieves the implementation for the given accessible object.
153+func (x *CarouselIndicatorLines) GetAtContext() *gtk.ATContext {
154+ var cls *gtk.ATContext
155+
156+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
157+
158+ if cret == 0 {
159+ return nil
160+ }
161+ cls = &gtk.ATContext{}
162+ cls.Ptr = cret
163+ return cls
164+}
165+
166+// Queries the coordinates and dimensions of this accessible
167+//
168+// This functionality can be overridden by `GtkAccessible`
169+// implementations, e.g. to get the bounds from an ignored
170+// child widget.
171+func (x *CarouselIndicatorLines) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
172+
173+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
174+ return cret
175+}
176+
177+// Retrieves the first accessible child of an accessible object.
178+func (x *CarouselIndicatorLines) GetFirstAccessibleChild() *gtk.AccessibleBase {
179+ var cls *gtk.AccessibleBase
180+
181+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
182+
183+ if cret == 0 {
184+ return nil
185+ }
186+ cls = &gtk.AccessibleBase{}
187+ cls.Ptr = cret
188+ return cls
189+}
190+
191+// Retrieves the next accessible sibling of an accessible object
192+func (x *CarouselIndicatorLines) GetNextAccessibleSibling() *gtk.AccessibleBase {
193+ var cls *gtk.AccessibleBase
194+
195+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
196+
197+ if cret == 0 {
198+ return nil
199+ }
200+ cls = &gtk.AccessibleBase{}
201+ cls.Ptr = cret
202+ return cls
203+}
204+
205+// Queries a platform state, such as focus.
206+//
207+// This functionality can be overridden by `GtkAccessible`
208+// implementations, e.g. to get platform state from an ignored
209+// child widget, as is the case for `GtkText` wrappers.
210+func (x *CarouselIndicatorLines) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
211+
212+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
213+ return cret
214+}
215+
216+// Resets the accessible property to its default value.
122 func (x *CarouselIndicatorLines) ResetProperty(PropertyVar gtk.AccessibleProperty) {217 func (x *CarouselIndicatorLines) ResetProperty(PropertyVar gtk.AccessibleProperty) {
123 218
124 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)219 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
125 220
126 }221 }
127 222
128-// Resets the accessible @relation to its default value.223+// Resets the accessible relation to its default value.
129 func (x *CarouselIndicatorLines) ResetRelation(RelationVar gtk.AccessibleRelation) {224 func (x *CarouselIndicatorLines) ResetRelation(RelationVar gtk.AccessibleRelation) {
130 225
131 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)226 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
132 227
133 }228 }
134 229
135-// Resets the accessible @state to its default value.230+// Resets the accessible state to its default value.
136 func (x *CarouselIndicatorLines) ResetState(StateVar gtk.AccessibleState) {231 func (x *CarouselIndicatorLines) ResetState(StateVar gtk.AccessibleState) {
137 232
138 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)233 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
139 234
140 }235 }
141 236
237+// Sets the parent and sibling of an accessible object.
238+//
239+// This function is meant to be used by accessible implementations that are
240+// not part of the widget hierarchy, and but act as a logical bridge between
241+// widgets. For instance, if a widget creates an object that holds metadata
242+// for each child, and you want that object to implement the `GtkAccessible`
243+// interface, you will use this function to ensure that the parent of each
244+// child widget is the metadata object, and the parent of each metadata
245+// object is the container widget.
246+func (x *CarouselIndicatorLines) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
247+
248+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
249+
250+}
251+
252+// Updates the next accessible sibling.
253+//
254+// That might be useful when a new child of a custom accessible
255+// is created, and it needs to be linked to a previous child.
256+func (x *CarouselIndicatorLines) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
257+
258+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
259+
260+}
261+
262+// Informs ATs that the platform state has changed.
263+//
264+// This function should be used by `GtkAccessible` implementations that
265+// have a platform state but are not widgets. Widgets handle platform
266+// states automatically.
267+func (x *CarouselIndicatorLines) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
268+
269+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
270+
271+}
272+
142 // Updates a list of accessible properties.273 // Updates a list of accessible properties.
143 //274 //
144 // See the [enum@Gtk.AccessibleProperty] documentation for the275 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -181,7 +312,7 @@ func (x *CarouselIndicatorLines) UpdatePropertyValue(NPropertiesVar int, Propert
181 // relation change must be communicated to assistive technologies.312 // relation change must be communicated to assistive technologies.
182 //313 //
183 // If the [enum@Gtk.AccessibleRelation] requires a list of references,314 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
184-// you should pass each reference individually, followed by %NULL, e.g.315+// you should pass each reference individually, followed by `NULL`, e.g.
185 //316 //
186 // ```c317 // ```c
187 // gtk_accessible_update_relation (accessible,318 // gtk_accessible_update_relation (accessible,
@@ -211,13 +342,17 @@ func (x *CarouselIndicatorLines) UpdateRelationValue(NRelationsVar int, Relation
211 342
212 }343 }
213 344
214-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]345+// Updates a list of accessible states.
215-// documentation for the value types of accessible states.
216 //346 //
217-// This function should be called by `GtkWidget` types whenever an accessible347+// See the [enum@Gtk.AccessibleState] documentation for the
218-// state change must be communicated to assistive technologies.348+// value types of accessible states.
349+//
350+// This function should be called by `GtkWidget` types whenever
351+// an accessible state change must be communicated to assistive
352+// technologies.
219 //353 //
220 // Example:354 // Example:
355+//
221 // ```c356 // ```c
222 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;357 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
223 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),358 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -247,7 +382,7 @@ func (x *CarouselIndicatorLines) UpdateStateValue(NStatesVar int, StatesVar []gt
247 // Gets the ID of the @buildable object.382 // Gets the ID of the @buildable object.
248 //383 //
249 // `GtkBuilder` sets the name based on the ID attribute384 // `GtkBuilder` sets the name based on the ID attribute
250-// of the <object> tag used to construct the @buildable.385+// of the `<object>` tag used to construct the @buildable.
251 func (x *CarouselIndicatorLines) GetBuildableId() string {386 func (x *CarouselIndicatorLines) GetBuildableId() string {
252 387
253 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())388 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-carousel.go +145 -10
@@ -404,34 +404,165 @@ func (x *Carousel) GetSwipeArea(NavigationDirectionVar NavigationDirection, IsDr
404 404
405 }405 }
406 406
407-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.407+// Requests the user's screen reader to announce the given message.
408+//
409+// This kind of notification is useful for messages that
410+// either have only a visual representation or that are not
411+// exposed visually at all, e.g. a notification about a
412+// successful operation.
413+//
414+// Also, by using this API, you can ensure that the message
415+// does not interrupts the user's current screen reader output.
416+func (x *Carousel) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
417+
418+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
419+
420+}
421+
422+// Retrieves the accessible parent for an accessible object.
423+//
424+// This function returns `NULL` for top level widgets.
425+func (x *Carousel) GetAccessibleParent() *gtk.AccessibleBase {
426+ var cls *gtk.AccessibleBase
427+
428+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
429+
430+ if cret == 0 {
431+ return nil
432+ }
433+ cls = &gtk.AccessibleBase{}
434+ cls.Ptr = cret
435+ return cls
436+}
437+
438+// Retrieves the accessible role of an accessible object.
408 func (x *Carousel) GetAccessibleRole() gtk.AccessibleRole {439 func (x *Carousel) GetAccessibleRole() gtk.AccessibleRole {
409 440
410 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())441 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
411 return cret442 return cret
412 }443 }
413 444
414-// Resets the accessible @property to its default value.445+// Retrieves the implementation for the given accessible object.
446+func (x *Carousel) GetAtContext() *gtk.ATContext {
447+ var cls *gtk.ATContext
448+
449+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
450+
451+ if cret == 0 {
452+ return nil
453+ }
454+ cls = &gtk.ATContext{}
455+ cls.Ptr = cret
456+ return cls
457+}
458+
459+// Queries the coordinates and dimensions of this accessible
460+//
461+// This functionality can be overridden by `GtkAccessible`
462+// implementations, e.g. to get the bounds from an ignored
463+// child widget.
464+func (x *Carousel) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
465+
466+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
467+ return cret
468+}
469+
470+// Retrieves the first accessible child of an accessible object.
471+func (x *Carousel) GetFirstAccessibleChild() *gtk.AccessibleBase {
472+ var cls *gtk.AccessibleBase
473+
474+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
475+
476+ if cret == 0 {
477+ return nil
478+ }
479+ cls = &gtk.AccessibleBase{}
480+ cls.Ptr = cret
481+ return cls
482+}
483+
484+// Retrieves the next accessible sibling of an accessible object
485+func (x *Carousel) GetNextAccessibleSibling() *gtk.AccessibleBase {
486+ var cls *gtk.AccessibleBase
487+
488+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
489+
490+ if cret == 0 {
491+ return nil
492+ }
493+ cls = &gtk.AccessibleBase{}
494+ cls.Ptr = cret
495+ return cls
496+}
497+
498+// Queries a platform state, such as focus.
499+//
500+// This functionality can be overridden by `GtkAccessible`
501+// implementations, e.g. to get platform state from an ignored
502+// child widget, as is the case for `GtkText` wrappers.
503+func (x *Carousel) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
504+
505+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
506+ return cret
507+}
508+
509+// Resets the accessible property to its default value.
415 func (x *Carousel) ResetProperty(PropertyVar gtk.AccessibleProperty) {510 func (x *Carousel) ResetProperty(PropertyVar gtk.AccessibleProperty) {
416 511
417 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)512 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
418 513
419 }514 }
420 515
421-// Resets the accessible @relation to its default value.516+// Resets the accessible relation to its default value.
422 func (x *Carousel) ResetRelation(RelationVar gtk.AccessibleRelation) {517 func (x *Carousel) ResetRelation(RelationVar gtk.AccessibleRelation) {
423 518
424 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)519 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
425 520
426 }521 }
427 522
428-// Resets the accessible @state to its default value.523+// Resets the accessible state to its default value.
429 func (x *Carousel) ResetState(StateVar gtk.AccessibleState) {524 func (x *Carousel) ResetState(StateVar gtk.AccessibleState) {
430 525
431 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)526 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
432 527
433 }528 }
434 529
530+// Sets the parent and sibling of an accessible object.
531+//
532+// This function is meant to be used by accessible implementations that are
533+// not part of the widget hierarchy, and but act as a logical bridge between
534+// widgets. For instance, if a widget creates an object that holds metadata
535+// for each child, and you want that object to implement the `GtkAccessible`
536+// interface, you will use this function to ensure that the parent of each
537+// child widget is the metadata object, and the parent of each metadata
538+// object is the container widget.
539+func (x *Carousel) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
540+
541+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
542+
543+}
544+
545+// Updates the next accessible sibling.
546+//
547+// That might be useful when a new child of a custom accessible
548+// is created, and it needs to be linked to a previous child.
549+func (x *Carousel) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
550+
551+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
552+
553+}
554+
555+// Informs ATs that the platform state has changed.
556+//
557+// This function should be used by `GtkAccessible` implementations that
558+// have a platform state but are not widgets. Widgets handle platform
559+// states automatically.
560+func (x *Carousel) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
561+
562+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
563+
564+}
565+
435 // Updates a list of accessible properties.566 // Updates a list of accessible properties.
436 //567 //
437 // See the [enum@Gtk.AccessibleProperty] documentation for the568 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -474,7 +605,7 @@ func (x *Carousel) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.A
474 // relation change must be communicated to assistive technologies.605 // relation change must be communicated to assistive technologies.
475 //606 //
476 // If the [enum@Gtk.AccessibleRelation] requires a list of references,607 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
477-// you should pass each reference individually, followed by %NULL, e.g.608+// you should pass each reference individually, followed by `NULL`, e.g.
478 //609 //
479 // ```c610 // ```c
480 // gtk_accessible_update_relation (accessible,611 // gtk_accessible_update_relation (accessible,
@@ -504,13 +635,17 @@ func (x *Carousel) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.Acc
504 635
505 }636 }
506 637
507-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]638+// Updates a list of accessible states.
508-// documentation for the value types of accessible states.
509 //639 //
510-// This function should be called by `GtkWidget` types whenever an accessible640+// See the [enum@Gtk.AccessibleState] documentation for the
511-// state change must be communicated to assistive technologies.641+// value types of accessible states.
642+//
643+// This function should be called by `GtkWidget` types whenever
644+// an accessible state change must be communicated to assistive
645+// technologies.
512 //646 //
513 // Example:647 // Example:
648+//
514 // ```c649 // ```c
515 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;650 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
516 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),651 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -540,7 +675,7 @@ func (x *Carousel) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleSt
540 // Gets the ID of the @buildable object.675 // Gets the ID of the @buildable object.
541 //676 //
542 // `GtkBuilder` sets the name based on the ID attribute677 // `GtkBuilder` sets the name based on the ID attribute
543-// of the <object> tag used to construct the @buildable.678+// of the `<object>` tag used to construct the @buildable.
544 func (x *Carousel) GetBuildableId() string {679 func (x *Carousel) GetBuildableId() string {
545 680
546 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())681 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-clamp-scrollable.go +145 -10
@@ -172,34 +172,165 @@ func (c *ClampScrollable) SetGoPointer(ptr uintptr) {
172 c.Ptr = ptr172 c.Ptr = ptr
173 }173 }
174 174
175-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.175+// Requests the user's screen reader to announce the given message.
176+//
177+// This kind of notification is useful for messages that
178+// either have only a visual representation or that are not
179+// exposed visually at all, e.g. a notification about a
180+// successful operation.
181+//
182+// Also, by using this API, you can ensure that the message
183+// does not interrupts the user's current screen reader output.
184+func (x *ClampScrollable) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
185+
186+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
187+
188+}
189+
190+// Retrieves the accessible parent for an accessible object.
191+//
192+// This function returns `NULL` for top level widgets.
193+func (x *ClampScrollable) GetAccessibleParent() *gtk.AccessibleBase {
194+ var cls *gtk.AccessibleBase
195+
196+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
197+
198+ if cret == 0 {
199+ return nil
200+ }
201+ cls = &gtk.AccessibleBase{}
202+ cls.Ptr = cret
203+ return cls
204+}
205+
206+// Retrieves the accessible role of an accessible object.
176 func (x *ClampScrollable) GetAccessibleRole() gtk.AccessibleRole {207 func (x *ClampScrollable) GetAccessibleRole() gtk.AccessibleRole {
177 208
178 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())209 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
179 return cret210 return cret
180 }211 }
181 212
182-// Resets the accessible @property to its default value.213+// Retrieves the implementation for the given accessible object.
214+func (x *ClampScrollable) GetAtContext() *gtk.ATContext {
215+ var cls *gtk.ATContext
216+
217+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
218+
219+ if cret == 0 {
220+ return nil
221+ }
222+ cls = &gtk.ATContext{}
223+ cls.Ptr = cret
224+ return cls
225+}
226+
227+// Queries the coordinates and dimensions of this accessible
228+//
229+// This functionality can be overridden by `GtkAccessible`
230+// implementations, e.g. to get the bounds from an ignored
231+// child widget.
232+func (x *ClampScrollable) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
233+
234+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
235+ return cret
236+}
237+
238+// Retrieves the first accessible child of an accessible object.
239+func (x *ClampScrollable) GetFirstAccessibleChild() *gtk.AccessibleBase {
240+ var cls *gtk.AccessibleBase
241+
242+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
243+
244+ if cret == 0 {
245+ return nil
246+ }
247+ cls = &gtk.AccessibleBase{}
248+ cls.Ptr = cret
249+ return cls
250+}
251+
252+// Retrieves the next accessible sibling of an accessible object
253+func (x *ClampScrollable) GetNextAccessibleSibling() *gtk.AccessibleBase {
254+ var cls *gtk.AccessibleBase
255+
256+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
257+
258+ if cret == 0 {
259+ return nil
260+ }
261+ cls = &gtk.AccessibleBase{}
262+ cls.Ptr = cret
263+ return cls
264+}
265+
266+// Queries a platform state, such as focus.
267+//
268+// This functionality can be overridden by `GtkAccessible`
269+// implementations, e.g. to get platform state from an ignored
270+// child widget, as is the case for `GtkText` wrappers.
271+func (x *ClampScrollable) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
272+
273+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
274+ return cret
275+}
276+
277+// Resets the accessible property to its default value.
183 func (x *ClampScrollable) ResetProperty(PropertyVar gtk.AccessibleProperty) {278 func (x *ClampScrollable) ResetProperty(PropertyVar gtk.AccessibleProperty) {
184 279
185 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)280 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
186 281
187 }282 }
188 283
189-// Resets the accessible @relation to its default value.284+// Resets the accessible relation to its default value.
190 func (x *ClampScrollable) ResetRelation(RelationVar gtk.AccessibleRelation) {285 func (x *ClampScrollable) ResetRelation(RelationVar gtk.AccessibleRelation) {
191 286
192 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)287 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
193 288
194 }289 }
195 290
196-// Resets the accessible @state to its default value.291+// Resets the accessible state to its default value.
197 func (x *ClampScrollable) ResetState(StateVar gtk.AccessibleState) {292 func (x *ClampScrollable) ResetState(StateVar gtk.AccessibleState) {
198 293
199 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)294 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
200 295
201 }296 }
202 297
298+// Sets the parent and sibling of an accessible object.
299+//
300+// This function is meant to be used by accessible implementations that are
301+// not part of the widget hierarchy, and but act as a logical bridge between
302+// widgets. For instance, if a widget creates an object that holds metadata
303+// for each child, and you want that object to implement the `GtkAccessible`
304+// interface, you will use this function to ensure that the parent of each
305+// child widget is the metadata object, and the parent of each metadata
306+// object is the container widget.
307+func (x *ClampScrollable) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
308+
309+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
310+
311+}
312+
313+// Updates the next accessible sibling.
314+//
315+// That might be useful when a new child of a custom accessible
316+// is created, and it needs to be linked to a previous child.
317+func (x *ClampScrollable) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
318+
319+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
320+
321+}
322+
323+// Informs ATs that the platform state has changed.
324+//
325+// This function should be used by `GtkAccessible` implementations that
326+// have a platform state but are not widgets. Widgets handle platform
327+// states automatically.
328+func (x *ClampScrollable) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
329+
330+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
331+
332+}
333+
203 // Updates a list of accessible properties.334 // Updates a list of accessible properties.
204 //335 //
205 // See the [enum@Gtk.AccessibleProperty] documentation for the336 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -242,7 +373,7 @@ func (x *ClampScrollable) UpdatePropertyValue(NPropertiesVar int, PropertiesVar
242 // relation change must be communicated to assistive technologies.373 // relation change must be communicated to assistive technologies.
243 //374 //
244 // If the [enum@Gtk.AccessibleRelation] requires a list of references,375 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
245-// you should pass each reference individually, followed by %NULL, e.g.376+// you should pass each reference individually, followed by `NULL`, e.g.
246 //377 //
247 // ```c378 // ```c
248 // gtk_accessible_update_relation (accessible,379 // gtk_accessible_update_relation (accessible,
@@ -272,13 +403,17 @@ func (x *ClampScrollable) UpdateRelationValue(NRelationsVar int, RelationsVar []
272 403
273 }404 }
274 405
275-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]406+// Updates a list of accessible states.
276-// documentation for the value types of accessible states.
277 //407 //
278-// This function should be called by `GtkWidget` types whenever an accessible408+// See the [enum@Gtk.AccessibleState] documentation for the
279-// state change must be communicated to assistive technologies.409+// value types of accessible states.
410+//
411+// This function should be called by `GtkWidget` types whenever
412+// an accessible state change must be communicated to assistive
413+// technologies.
280 //414 //
281 // Example:415 // Example:
416+//
282 // ```c417 // ```c
283 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;418 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
284 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),419 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -308,7 +443,7 @@ func (x *ClampScrollable) UpdateStateValue(NStatesVar int, StatesVar []gtk.Acces
308 // Gets the ID of the @buildable object.443 // Gets the ID of the @buildable object.
309 //444 //
310 // `GtkBuilder` sets the name based on the ID attribute445 // `GtkBuilder` sets the name based on the ID attribute
311-// of the <object> tag used to construct the @buildable.446+// of the `<object>` tag used to construct the @buildable.
312 func (x *ClampScrollable) GetBuildableId() string {447 func (x *ClampScrollable) GetBuildableId() string {
313 448
314 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())449 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-clamp.go +145 -10
@@ -194,34 +194,165 @@ func (c *Clamp) SetGoPointer(ptr uintptr) {
194 c.Ptr = ptr194 c.Ptr = ptr
195 }195 }
196 196
197-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.197+// Requests the user's screen reader to announce the given message.
198+//
199+// This kind of notification is useful for messages that
200+// either have only a visual representation or that are not
201+// exposed visually at all, e.g. a notification about a
202+// successful operation.
203+//
204+// Also, by using this API, you can ensure that the message
205+// does not interrupts the user's current screen reader output.
206+func (x *Clamp) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
207+
208+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
209+
210+}
211+
212+// Retrieves the accessible parent for an accessible object.
213+//
214+// This function returns `NULL` for top level widgets.
215+func (x *Clamp) GetAccessibleParent() *gtk.AccessibleBase {
216+ var cls *gtk.AccessibleBase
217+
218+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
219+
220+ if cret == 0 {
221+ return nil
222+ }
223+ cls = &gtk.AccessibleBase{}
224+ cls.Ptr = cret
225+ return cls
226+}
227+
228+// Retrieves the accessible role of an accessible object.
198 func (x *Clamp) GetAccessibleRole() gtk.AccessibleRole {229 func (x *Clamp) GetAccessibleRole() gtk.AccessibleRole {
199 230
200 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())231 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
201 return cret232 return cret
202 }233 }
203 234
204-// Resets the accessible @property to its default value.235+// Retrieves the implementation for the given accessible object.
236+func (x *Clamp) GetAtContext() *gtk.ATContext {
237+ var cls *gtk.ATContext
238+
239+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
240+
241+ if cret == 0 {
242+ return nil
243+ }
244+ cls = &gtk.ATContext{}
245+ cls.Ptr = cret
246+ return cls
247+}
248+
249+// Queries the coordinates and dimensions of this accessible
250+//
251+// This functionality can be overridden by `GtkAccessible`
252+// implementations, e.g. to get the bounds from an ignored
253+// child widget.
254+func (x *Clamp) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
255+
256+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
257+ return cret
258+}
259+
260+// Retrieves the first accessible child of an accessible object.
261+func (x *Clamp) GetFirstAccessibleChild() *gtk.AccessibleBase {
262+ var cls *gtk.AccessibleBase
263+
264+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
265+
266+ if cret == 0 {
267+ return nil
268+ }
269+ cls = &gtk.AccessibleBase{}
270+ cls.Ptr = cret
271+ return cls
272+}
273+
274+// Retrieves the next accessible sibling of an accessible object
275+func (x *Clamp) GetNextAccessibleSibling() *gtk.AccessibleBase {
276+ var cls *gtk.AccessibleBase
277+
278+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
279+
280+ if cret == 0 {
281+ return nil
282+ }
283+ cls = &gtk.AccessibleBase{}
284+ cls.Ptr = cret
285+ return cls
286+}
287+
288+// Queries a platform state, such as focus.
289+//
290+// This functionality can be overridden by `GtkAccessible`
291+// implementations, e.g. to get platform state from an ignored
292+// child widget, as is the case for `GtkText` wrappers.
293+func (x *Clamp) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
294+
295+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
296+ return cret
297+}
298+
299+// Resets the accessible property to its default value.
205 func (x *Clamp) ResetProperty(PropertyVar gtk.AccessibleProperty) {300 func (x *Clamp) ResetProperty(PropertyVar gtk.AccessibleProperty) {
206 301
207 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)302 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
208 303
209 }304 }
210 305
211-// Resets the accessible @relation to its default value.306+// Resets the accessible relation to its default value.
212 func (x *Clamp) ResetRelation(RelationVar gtk.AccessibleRelation) {307 func (x *Clamp) ResetRelation(RelationVar gtk.AccessibleRelation) {
213 308
214 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)309 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
215 310
216 }311 }
217 312
218-// Resets the accessible @state to its default value.313+// Resets the accessible state to its default value.
219 func (x *Clamp) ResetState(StateVar gtk.AccessibleState) {314 func (x *Clamp) ResetState(StateVar gtk.AccessibleState) {
220 315
221 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)316 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
222 317
223 }318 }
224 319
320+// Sets the parent and sibling of an accessible object.
321+//
322+// This function is meant to be used by accessible implementations that are
323+// not part of the widget hierarchy, and but act as a logical bridge between
324+// widgets. For instance, if a widget creates an object that holds metadata
325+// for each child, and you want that object to implement the `GtkAccessible`
326+// interface, you will use this function to ensure that the parent of each
327+// child widget is the metadata object, and the parent of each metadata
328+// object is the container widget.
329+func (x *Clamp) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
330+
331+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
332+
333+}
334+
335+// Updates the next accessible sibling.
336+//
337+// That might be useful when a new child of a custom accessible
338+// is created, and it needs to be linked to a previous child.
339+func (x *Clamp) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
340+
341+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
342+
343+}
344+
345+// Informs ATs that the platform state has changed.
346+//
347+// This function should be used by `GtkAccessible` implementations that
348+// have a platform state but are not widgets. Widgets handle platform
349+// states automatically.
350+func (x *Clamp) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
351+
352+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
353+
354+}
355+
225 // Updates a list of accessible properties.356 // Updates a list of accessible properties.
226 //357 //
227 // See the [enum@Gtk.AccessibleProperty] documentation for the358 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -264,7 +395,7 @@ func (x *Clamp) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.Acce
264 // relation change must be communicated to assistive technologies.395 // relation change must be communicated to assistive technologies.
265 //396 //
266 // If the [enum@Gtk.AccessibleRelation] requires a list of references,397 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
267-// you should pass each reference individually, followed by %NULL, e.g.398+// you should pass each reference individually, followed by `NULL`, e.g.
268 //399 //
269 // ```c400 // ```c
270 // gtk_accessible_update_relation (accessible,401 // gtk_accessible_update_relation (accessible,
@@ -294,13 +425,17 @@ func (x *Clamp) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.Access
294 425
295 }426 }
296 427
297-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]428+// Updates a list of accessible states.
298-// documentation for the value types of accessible states.
299 //429 //
300-// This function should be called by `GtkWidget` types whenever an accessible430+// See the [enum@Gtk.AccessibleState] documentation for the
301-// state change must be communicated to assistive technologies.431+// value types of accessible states.
432+//
433+// This function should be called by `GtkWidget` types whenever
434+// an accessible state change must be communicated to assistive
435+// technologies.
302 //436 //
303 // Example:437 // Example:
438+//
304 // ```c439 // ```c
305 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;440 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
306 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),441 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -330,7 +465,7 @@ func (x *Clamp) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleState
330 // Gets the ID of the @buildable object.465 // Gets the ID of the @buildable object.
331 //466 //
332 // `GtkBuilder` sets the name based on the ID attribute467 // `GtkBuilder` sets the name based on the ID attribute
333-// of the <object> tag used to construct the @buildable.468+// of the `<object>` tag used to construct the @buildable.
334 func (x *Clamp) GetBuildableId() string {469 func (x *Clamp) GetBuildableId() string {
335 470
336 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())471 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-combo-row.go +145 -10
@@ -369,34 +369,165 @@ func (c *ComboRow) SetGoPointer(ptr uintptr) {
369 c.Ptr = ptr369 c.Ptr = ptr
370 }370 }
371 371
372-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.372+// Requests the user's screen reader to announce the given message.
373+//
374+// This kind of notification is useful for messages that
375+// either have only a visual representation or that are not
376+// exposed visually at all, e.g. a notification about a
377+// successful operation.
378+//
379+// Also, by using this API, you can ensure that the message
380+// does not interrupts the user's current screen reader output.
381+func (x *ComboRow) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
382+
383+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
384+
385+}
386+
387+// Retrieves the accessible parent for an accessible object.
388+//
389+// This function returns `NULL` for top level widgets.
390+func (x *ComboRow) GetAccessibleParent() *gtk.AccessibleBase {
391+ var cls *gtk.AccessibleBase
392+
393+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
394+
395+ if cret == 0 {
396+ return nil
397+ }
398+ cls = &gtk.AccessibleBase{}
399+ cls.Ptr = cret
400+ return cls
401+}
402+
403+// Retrieves the accessible role of an accessible object.
373 func (x *ComboRow) GetAccessibleRole() gtk.AccessibleRole {404 func (x *ComboRow) GetAccessibleRole() gtk.AccessibleRole {
374 405
375 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())406 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
376 return cret407 return cret
377 }408 }
378 409
379-// Resets the accessible @property to its default value.410+// Retrieves the implementation for the given accessible object.
411+func (x *ComboRow) GetAtContext() *gtk.ATContext {
412+ var cls *gtk.ATContext
413+
414+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
415+
416+ if cret == 0 {
417+ return nil
418+ }
419+ cls = &gtk.ATContext{}
420+ cls.Ptr = cret
421+ return cls
422+}
423+
424+// Queries the coordinates and dimensions of this accessible
425+//
426+// This functionality can be overridden by `GtkAccessible`
427+// implementations, e.g. to get the bounds from an ignored
428+// child widget.
429+func (x *ComboRow) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
430+
431+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
432+ return cret
433+}
434+
435+// Retrieves the first accessible child of an accessible object.
436+func (x *ComboRow) GetFirstAccessibleChild() *gtk.AccessibleBase {
437+ var cls *gtk.AccessibleBase
438+
439+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
440+
441+ if cret == 0 {
442+ return nil
443+ }
444+ cls = &gtk.AccessibleBase{}
445+ cls.Ptr = cret
446+ return cls
447+}
448+
449+// Retrieves the next accessible sibling of an accessible object
450+func (x *ComboRow) GetNextAccessibleSibling() *gtk.AccessibleBase {
451+ var cls *gtk.AccessibleBase
452+
453+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
454+
455+ if cret == 0 {
456+ return nil
457+ }
458+ cls = &gtk.AccessibleBase{}
459+ cls.Ptr = cret
460+ return cls
461+}
462+
463+// Queries a platform state, such as focus.
464+//
465+// This functionality can be overridden by `GtkAccessible`
466+// implementations, e.g. to get platform state from an ignored
467+// child widget, as is the case for `GtkText` wrappers.
468+func (x *ComboRow) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
469+
470+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
471+ return cret
472+}
473+
474+// Resets the accessible property to its default value.
380 func (x *ComboRow) ResetProperty(PropertyVar gtk.AccessibleProperty) {475 func (x *ComboRow) ResetProperty(PropertyVar gtk.AccessibleProperty) {
381 476
382 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)477 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
383 478
384 }479 }
385 480
386-// Resets the accessible @relation to its default value.481+// Resets the accessible relation to its default value.
387 func (x *ComboRow) ResetRelation(RelationVar gtk.AccessibleRelation) {482 func (x *ComboRow) ResetRelation(RelationVar gtk.AccessibleRelation) {
388 483
389 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)484 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
390 485
391 }486 }
392 487
393-// Resets the accessible @state to its default value.488+// Resets the accessible state to its default value.
394 func (x *ComboRow) ResetState(StateVar gtk.AccessibleState) {489 func (x *ComboRow) ResetState(StateVar gtk.AccessibleState) {
395 490
396 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)491 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
397 492
398 }493 }
399 494
495+// Sets the parent and sibling of an accessible object.
496+//
497+// This function is meant to be used by accessible implementations that are
498+// not part of the widget hierarchy, and but act as a logical bridge between
499+// widgets. For instance, if a widget creates an object that holds metadata
500+// for each child, and you want that object to implement the `GtkAccessible`
501+// interface, you will use this function to ensure that the parent of each
502+// child widget is the metadata object, and the parent of each metadata
503+// object is the container widget.
504+func (x *ComboRow) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
505+
506+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
507+
508+}
509+
510+// Updates the next accessible sibling.
511+//
512+// That might be useful when a new child of a custom accessible
513+// is created, and it needs to be linked to a previous child.
514+func (x *ComboRow) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
515+
516+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
517+
518+}
519+
520+// Informs ATs that the platform state has changed.
521+//
522+// This function should be used by `GtkAccessible` implementations that
523+// have a platform state but are not widgets. Widgets handle platform
524+// states automatically.
525+func (x *ComboRow) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
526+
527+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
528+
529+}
530+
400 // Updates a list of accessible properties.531 // Updates a list of accessible properties.
401 //532 //
402 // See the [enum@Gtk.AccessibleProperty] documentation for the533 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -439,7 +570,7 @@ func (x *ComboRow) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.A
439 // relation change must be communicated to assistive technologies.570 // relation change must be communicated to assistive technologies.
440 //571 //
441 // If the [enum@Gtk.AccessibleRelation] requires a list of references,572 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
442-// you should pass each reference individually, followed by %NULL, e.g.573+// you should pass each reference individually, followed by `NULL`, e.g.
443 //574 //
444 // ```c575 // ```c
445 // gtk_accessible_update_relation (accessible,576 // gtk_accessible_update_relation (accessible,
@@ -469,13 +600,17 @@ func (x *ComboRow) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.Acc
469 600
470 }601 }
471 602
472-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]603+// Updates a list of accessible states.
473-// documentation for the value types of accessible states.
474 //604 //
475-// This function should be called by `GtkWidget` types whenever an accessible605+// See the [enum@Gtk.AccessibleState] documentation for the
476-// state change must be communicated to assistive technologies.606+// value types of accessible states.
607+//
608+// This function should be called by `GtkWidget` types whenever
609+// an accessible state change must be communicated to assistive
610+// technologies.
477 //611 //
478 // Example:612 // Example:
613+//
479 // ```c614 // ```c
480 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;615 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
481 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),616 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -588,7 +723,7 @@ func (x *ComboRow) SetDetailedActionName(DetailedActionNameVar string) {
588 // Gets the ID of the @buildable object.723 // Gets the ID of the @buildable object.
589 //724 //
590 // `GtkBuilder` sets the name based on the ID attribute725 // `GtkBuilder` sets the name based on the ID attribute
591-// of the <object> tag used to construct the @buildable.726+// of the `<object>` tag used to construct the @buildable.
592 func (x *ComboRow) GetBuildableId() string {727 func (x *ComboRow) GetBuildableId() string {
593 728
594 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())729 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-dialog.go +145 -10
@@ -536,34 +536,165 @@ func (x *Dialog) ConnectClosed(cb *func(Dialog)) uint32 {
536 return gobject.SignalConnect(x.GoPointer(), "closed", cbRefPtr)536 return gobject.SignalConnect(x.GoPointer(), "closed", cbRefPtr)
537 }537 }
538 538
539-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.539+// Requests the user's screen reader to announce the given message.
540+//
541+// This kind of notification is useful for messages that
542+// either have only a visual representation or that are not
543+// exposed visually at all, e.g. a notification about a
544+// successful operation.
545+//
546+// Also, by using this API, you can ensure that the message
547+// does not interrupts the user's current screen reader output.
548+func (x *Dialog) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
549+
550+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
551+
552+}
553+
554+// Retrieves the accessible parent for an accessible object.
555+//
556+// This function returns `NULL` for top level widgets.
557+func (x *Dialog) GetAccessibleParent() *gtk.AccessibleBase {
558+ var cls *gtk.AccessibleBase
559+
560+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
561+
562+ if cret == 0 {
563+ return nil
564+ }
565+ cls = &gtk.AccessibleBase{}
566+ cls.Ptr = cret
567+ return cls
568+}
569+
570+// Retrieves the accessible role of an accessible object.
540 func (x *Dialog) GetAccessibleRole() gtk.AccessibleRole {571 func (x *Dialog) GetAccessibleRole() gtk.AccessibleRole {
541 572
542 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())573 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
543 return cret574 return cret
544 }575 }
545 576
546-// Resets the accessible @property to its default value.577+// Retrieves the implementation for the given accessible object.
578+func (x *Dialog) GetAtContext() *gtk.ATContext {
579+ var cls *gtk.ATContext
580+
581+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
582+
583+ if cret == 0 {
584+ return nil
585+ }
586+ cls = &gtk.ATContext{}
587+ cls.Ptr = cret
588+ return cls
589+}
590+
591+// Queries the coordinates and dimensions of this accessible
592+//
593+// This functionality can be overridden by `GtkAccessible`
594+// implementations, e.g. to get the bounds from an ignored
595+// child widget.
596+func (x *Dialog) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
597+
598+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
599+ return cret
600+}
601+
602+// Retrieves the first accessible child of an accessible object.
603+func (x *Dialog) GetFirstAccessibleChild() *gtk.AccessibleBase {
604+ var cls *gtk.AccessibleBase
605+
606+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
607+
608+ if cret == 0 {
609+ return nil
610+ }
611+ cls = &gtk.AccessibleBase{}
612+ cls.Ptr = cret
613+ return cls
614+}
615+
616+// Retrieves the next accessible sibling of an accessible object
617+func (x *Dialog) GetNextAccessibleSibling() *gtk.AccessibleBase {
618+ var cls *gtk.AccessibleBase
619+
620+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
621+
622+ if cret == 0 {
623+ return nil
624+ }
625+ cls = &gtk.AccessibleBase{}
626+ cls.Ptr = cret
627+ return cls
628+}
629+
630+// Queries a platform state, such as focus.
631+//
632+// This functionality can be overridden by `GtkAccessible`
633+// implementations, e.g. to get platform state from an ignored
634+// child widget, as is the case for `GtkText` wrappers.
635+func (x *Dialog) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
636+
637+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
638+ return cret
639+}
640+
641+// Resets the accessible property to its default value.
547 func (x *Dialog) ResetProperty(PropertyVar gtk.AccessibleProperty) {642 func (x *Dialog) ResetProperty(PropertyVar gtk.AccessibleProperty) {
548 643
549 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)644 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
550 645
551 }646 }
552 647
553-// Resets the accessible @relation to its default value.648+// Resets the accessible relation to its default value.
554 func (x *Dialog) ResetRelation(RelationVar gtk.AccessibleRelation) {649 func (x *Dialog) ResetRelation(RelationVar gtk.AccessibleRelation) {
555 650
556 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)651 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
557 652
558 }653 }
559 654
560-// Resets the accessible @state to its default value.655+// Resets the accessible state to its default value.
561 func (x *Dialog) ResetState(StateVar gtk.AccessibleState) {656 func (x *Dialog) ResetState(StateVar gtk.AccessibleState) {
562 657
563 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)658 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
564 659
565 }660 }
566 661
662+// Sets the parent and sibling of an accessible object.
663+//
664+// This function is meant to be used by accessible implementations that are
665+// not part of the widget hierarchy, and but act as a logical bridge between
666+// widgets. For instance, if a widget creates an object that holds metadata
667+// for each child, and you want that object to implement the `GtkAccessible`
668+// interface, you will use this function to ensure that the parent of each
669+// child widget is the metadata object, and the parent of each metadata
670+// object is the container widget.
671+func (x *Dialog) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
672+
673+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
674+
675+}
676+
677+// Updates the next accessible sibling.
678+//
679+// That might be useful when a new child of a custom accessible
680+// is created, and it needs to be linked to a previous child.
681+func (x *Dialog) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
682+
683+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
684+
685+}
686+
687+// Informs ATs that the platform state has changed.
688+//
689+// This function should be used by `GtkAccessible` implementations that
690+// have a platform state but are not widgets. Widgets handle platform
691+// states automatically.
692+func (x *Dialog) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
693+
694+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
695+
696+}
697+
567 // Updates a list of accessible properties.698 // Updates a list of accessible properties.
568 //699 //
569 // See the [enum@Gtk.AccessibleProperty] documentation for the700 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -606,7 +737,7 @@ func (x *Dialog) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.Acc
606 // relation change must be communicated to assistive technologies.737 // relation change must be communicated to assistive technologies.
607 //738 //
608 // If the [enum@Gtk.AccessibleRelation] requires a list of references,739 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
609-// you should pass each reference individually, followed by %NULL, e.g.740+// you should pass each reference individually, followed by `NULL`, e.g.
610 //741 //
611 // ```c742 // ```c
612 // gtk_accessible_update_relation (accessible,743 // gtk_accessible_update_relation (accessible,
@@ -636,13 +767,17 @@ func (x *Dialog) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.Acces
636 767
637 }768 }
638 769
639-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]770+// Updates a list of accessible states.
640-// documentation for the value types of accessible states.
641 //771 //
642-// This function should be called by `GtkWidget` types whenever an accessible772+// See the [enum@Gtk.AccessibleState] documentation for the
643-// state change must be communicated to assistive technologies.773+// value types of accessible states.
774+//
775+// This function should be called by `GtkWidget` types whenever
776+// an accessible state change must be communicated to assistive
777+// technologies.
644 //778 //
645 // Example:779 // Example:
780+//
646 // ```c781 // ```c
647 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;782 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
648 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),783 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -672,7 +807,7 @@ func (x *Dialog) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleStat
672 // Gets the ID of the @buildable object.807 // Gets the ID of the @buildable object.
673 //808 //
674 // `GtkBuilder` sets the name based on the ID attribute809 // `GtkBuilder` sets the name based on the ID attribute
675-// of the <object> tag used to construct the @buildable.810+// of the `<object>` tag used to construct the @buildable.
676 func (x *Dialog) GetBuildableId() string {811 func (x *Dialog) GetBuildableId() string {
677 812
678 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())813 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-easing.go +17 -0
@@ -98,6 +98,23 @@ const (
98 // with bounce on both ends, combining `ADW_EASE_IN_BOUNCE` and98 // with bounce on both ends, combining `ADW_EASE_IN_BOUNCE` and
99 // `ADW_EASE_OUT_BOUNCE`.99 // `ADW_EASE_OUT_BOUNCE`.
100 EaseInOutBounceValue Easing = 30100 EaseInOutBounceValue Easing = 30
101+ // Cubic bezier tweening, with control points in (0.25, 0.1) and (0.25, 1.0).
102+ //
103+ // Increases in velocity towards the middle of the animation, slowing back down
104+ // at the end.
105+ EaseValue Easing = 31
106+ // Cubic bezier tweening, with control points in (0.42, 0.0) and (1.0, 1.0).
107+ //
108+ // Starts off slowly, with the speed of the animation increasing until complete.
109+ EaseInValue Easing = 32
110+ // Cubic bezier tweening, with control points in (0.0, 0.0) and (0.58, 1.0).
111+ //
112+ // Starts quickly, slowing down the animation until complete.
113+ EaseOutValue Easing = 33
114+ // Cubic bezier tweening, with control points in (0.42, 0.0) and (0.58, 1.0).
115+ //
116+ // Starts off slowly, speeds up in the middle, and then slows down again.
117+ EaseInOutValue Easing = 34
101 )118 )
102 119
103 var xEasingEase func(Easing, float64) float64120 var xEasingEase func(Easing, float64) float64
M v4/adw/adw-entry-row.go +187 -10
@@ -338,34 +338,165 @@ func (x *EntryRow) ConnectEntryActivated(cb *func(EntryRow)) uint32 {
338 return gobject.SignalConnect(x.GoPointer(), "entry-activated", cbRefPtr)338 return gobject.SignalConnect(x.GoPointer(), "entry-activated", cbRefPtr)
339 }339 }
340 340
341-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.341+// Requests the user's screen reader to announce the given message.
342+//
343+// This kind of notification is useful for messages that
344+// either have only a visual representation or that are not
345+// exposed visually at all, e.g. a notification about a
346+// successful operation.
347+//
348+// Also, by using this API, you can ensure that the message
349+// does not interrupts the user's current screen reader output.
350+func (x *EntryRow) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
351+
352+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
353+
354+}
355+
356+// Retrieves the accessible parent for an accessible object.
357+//
358+// This function returns `NULL` for top level widgets.
359+func (x *EntryRow) GetAccessibleParent() *gtk.AccessibleBase {
360+ var cls *gtk.AccessibleBase
361+
362+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
363+
364+ if cret == 0 {
365+ return nil
366+ }
367+ cls = &gtk.AccessibleBase{}
368+ cls.Ptr = cret
369+ return cls
370+}
371+
372+// Retrieves the accessible role of an accessible object.
342 func (x *EntryRow) GetAccessibleRole() gtk.AccessibleRole {373 func (x *EntryRow) GetAccessibleRole() gtk.AccessibleRole {
343 374
344 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())375 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
345 return cret376 return cret
346 }377 }
347 378
348-// Resets the accessible @property to its default value.379+// Retrieves the implementation for the given accessible object.
380+func (x *EntryRow) GetAtContext() *gtk.ATContext {
381+ var cls *gtk.ATContext
382+
383+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
384+
385+ if cret == 0 {
386+ return nil
387+ }
388+ cls = &gtk.ATContext{}
389+ cls.Ptr = cret
390+ return cls
391+}
392+
393+// Queries the coordinates and dimensions of this accessible
394+//
395+// This functionality can be overridden by `GtkAccessible`
396+// implementations, e.g. to get the bounds from an ignored
397+// child widget.
398+func (x *EntryRow) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
399+
400+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
401+ return cret
402+}
403+
404+// Retrieves the first accessible child of an accessible object.
405+func (x *EntryRow) GetFirstAccessibleChild() *gtk.AccessibleBase {
406+ var cls *gtk.AccessibleBase
407+
408+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
409+
410+ if cret == 0 {
411+ return nil
412+ }
413+ cls = &gtk.AccessibleBase{}
414+ cls.Ptr = cret
415+ return cls
416+}
417+
418+// Retrieves the next accessible sibling of an accessible object
419+func (x *EntryRow) GetNextAccessibleSibling() *gtk.AccessibleBase {
420+ var cls *gtk.AccessibleBase
421+
422+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
423+
424+ if cret == 0 {
425+ return nil
426+ }
427+ cls = &gtk.AccessibleBase{}
428+ cls.Ptr = cret
429+ return cls
430+}
431+
432+// Queries a platform state, such as focus.
433+//
434+// This functionality can be overridden by `GtkAccessible`
435+// implementations, e.g. to get platform state from an ignored
436+// child widget, as is the case for `GtkText` wrappers.
437+func (x *EntryRow) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
438+
439+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
440+ return cret
441+}
442+
443+// Resets the accessible property to its default value.
349 func (x *EntryRow) ResetProperty(PropertyVar gtk.AccessibleProperty) {444 func (x *EntryRow) ResetProperty(PropertyVar gtk.AccessibleProperty) {
350 445
351 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)446 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
352 447
353 }448 }
354 449
355-// Resets the accessible @relation to its default value.450+// Resets the accessible relation to its default value.
356 func (x *EntryRow) ResetRelation(RelationVar gtk.AccessibleRelation) {451 func (x *EntryRow) ResetRelation(RelationVar gtk.AccessibleRelation) {
357 452
358 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)453 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
359 454
360 }455 }
361 456
362-// Resets the accessible @state to its default value.457+// Resets the accessible state to its default value.
363 func (x *EntryRow) ResetState(StateVar gtk.AccessibleState) {458 func (x *EntryRow) ResetState(StateVar gtk.AccessibleState) {
364 459
365 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)460 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
366 461
367 }462 }
368 463
464+// Sets the parent and sibling of an accessible object.
465+//
466+// This function is meant to be used by accessible implementations that are
467+// not part of the widget hierarchy, and but act as a logical bridge between
468+// widgets. For instance, if a widget creates an object that holds metadata
469+// for each child, and you want that object to implement the `GtkAccessible`
470+// interface, you will use this function to ensure that the parent of each
471+// child widget is the metadata object, and the parent of each metadata
472+// object is the container widget.
473+func (x *EntryRow) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
474+
475+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
476+
477+}
478+
479+// Updates the next accessible sibling.
480+//
481+// That might be useful when a new child of a custom accessible
482+// is created, and it needs to be linked to a previous child.
483+func (x *EntryRow) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
484+
485+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
486+
487+}
488+
489+// Informs ATs that the platform state has changed.
490+//
491+// This function should be used by `GtkAccessible` implementations that
492+// have a platform state but are not widgets. Widgets handle platform
493+// states automatically.
494+func (x *EntryRow) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
495+
496+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
497+
498+}
499+
369 // Updates a list of accessible properties.500 // Updates a list of accessible properties.
370 //501 //
371 // See the [enum@Gtk.AccessibleProperty] documentation for the502 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -408,7 +539,7 @@ func (x *EntryRow) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.A
408 // relation change must be communicated to assistive technologies.539 // relation change must be communicated to assistive technologies.
409 //540 //
410 // If the [enum@Gtk.AccessibleRelation] requires a list of references,541 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
411-// you should pass each reference individually, followed by %NULL, e.g.542+// you should pass each reference individually, followed by `NULL`, e.g.
412 //543 //
413 // ```c544 // ```c
414 // gtk_accessible_update_relation (accessible,545 // gtk_accessible_update_relation (accessible,
@@ -438,13 +569,17 @@ func (x *EntryRow) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.Acc
438 569
439 }570 }
440 571
441-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]572+// Updates a list of accessible states.
442-// documentation for the value types of accessible states.
443 //573 //
444-// This function should be called by `GtkWidget` types whenever an accessible574+// See the [enum@Gtk.AccessibleState] documentation for the
445-// state change must be communicated to assistive technologies.575+// value types of accessible states.
576+//
577+// This function should be called by `GtkWidget` types whenever
578+// an accessible state change must be communicated to assistive
579+// technologies.
446 //580 //
447 // Example:581 // Example:
582+//
448 // ```c583 // ```c
449 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;584 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
450 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),585 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -557,13 +692,55 @@ func (x *EntryRow) SetDetailedActionName(DetailedActionNameVar string) {
557 // Gets the ID of the @buildable object.692 // Gets the ID of the @buildable object.
558 //693 //
559 // `GtkBuilder` sets the name based on the ID attribute694 // `GtkBuilder` sets the name based on the ID attribute
560-// of the <object> tag used to construct the @buildable.695+// of the `<object>` tag used to construct the @buildable.
561 func (x *EntryRow) GetBuildableId() string {696 func (x *EntryRow) GetBuildableId() string {
562 697
563 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())698 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
564 return cret699 return cret
565 }700 }
566 701
702+// Retrieves the accessible platform state from the editable delegate.
703+//
704+// This is an helper function to retrieve the accessible state for
705+// `GtkEditable` interface implementations using a delegate pattern.
706+//
707+// You should call this function in your editable widget implementation
708+// of the [vfunc@Gtk.Accessible.get_platform_state] virtual function, for
709+// instance:
710+//
711+// ```c
712+// static void
713+// accessible_interface_init (GtkAccessibleInterface *iface)
714+//
715+// {
716+// iface->get_platform_state = your_editable_get_accessible_platform_state;
717+// }
718+//
719+// static gboolean
720+// your_editable_get_accessible_platform_state (GtkAccessible *accessible,
721+//
722+// GtkAccessiblePlatformState state)
723+//
724+// {
725+// return gtk_editable_delegate_get_accessible_platform_state (GTK_EDITABLE (accessible), state);
726+// }
727+//
728+// ```
729+//
730+// Note that the widget which is the delegate *must* be a direct child of
731+// this widget, otherwise your implementation of [vfunc@Gtk.Accessible.get_platform_state]
732+// might not even be called, as the platform change will originate from
733+// the parent of the delegate, and, as a result, will not work properly.
734+//
735+// So, if you can't ensure the direct child condition, you should give the
736+// delegate the %GTK_ACCESSIBLE_ROLE_TEXT_BOX role, or you can
737+// change your tree to allow this function to work.
738+func (x *EntryRow) DelegateGetAccessiblePlatformState(StateVar gtk.AccessiblePlatformState) bool {
739+
740+ cret := gtk.XGtkEditableDelegateGetAccessiblePlatformState(x.GoPointer(), StateVar)
741+ return cret
742+}
743+
567 // Deletes the currently selected text of the editable.744 // Deletes the currently selected text of the editable.
568 //745 //
569 // This call doesn’t do anything if there is no selected text.746 // This call doesn’t do anything if there is no selected text.
M v4/adw/adw-expander-row.go +145 -10
@@ -292,34 +292,165 @@ func (c *ExpanderRow) SetGoPointer(ptr uintptr) {
292 c.Ptr = ptr292 c.Ptr = ptr
293 }293 }
294 294
295-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.295+// Requests the user's screen reader to announce the given message.
296+//
297+// This kind of notification is useful for messages that
298+// either have only a visual representation or that are not
299+// exposed visually at all, e.g. a notification about a
300+// successful operation.
301+//
302+// Also, by using this API, you can ensure that the message
303+// does not interrupts the user's current screen reader output.
304+func (x *ExpanderRow) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
305+
306+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
307+
308+}
309+
310+// Retrieves the accessible parent for an accessible object.
311+//
312+// This function returns `NULL` for top level widgets.
313+func (x *ExpanderRow) GetAccessibleParent() *gtk.AccessibleBase {
314+ var cls *gtk.AccessibleBase
315+
316+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
317+
318+ if cret == 0 {
319+ return nil
320+ }
321+ cls = &gtk.AccessibleBase{}
322+ cls.Ptr = cret
323+ return cls
324+}
325+
326+// Retrieves the accessible role of an accessible object.
296 func (x *ExpanderRow) GetAccessibleRole() gtk.AccessibleRole {327 func (x *ExpanderRow) GetAccessibleRole() gtk.AccessibleRole {
297 328
298 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())329 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
299 return cret330 return cret
300 }331 }
301 332
302-// Resets the accessible @property to its default value.333+// Retrieves the implementation for the given accessible object.
334+func (x *ExpanderRow) GetAtContext() *gtk.ATContext {
335+ var cls *gtk.ATContext
336+
337+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
338+
339+ if cret == 0 {
340+ return nil
341+ }
342+ cls = &gtk.ATContext{}
343+ cls.Ptr = cret
344+ return cls
345+}
346+
347+// Queries the coordinates and dimensions of this accessible
348+//
349+// This functionality can be overridden by `GtkAccessible`
350+// implementations, e.g. to get the bounds from an ignored
351+// child widget.
352+func (x *ExpanderRow) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
353+
354+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
355+ return cret
356+}
357+
358+// Retrieves the first accessible child of an accessible object.
359+func (x *ExpanderRow) GetFirstAccessibleChild() *gtk.AccessibleBase {
360+ var cls *gtk.AccessibleBase
361+
362+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
363+
364+ if cret == 0 {
365+ return nil
366+ }
367+ cls = &gtk.AccessibleBase{}
368+ cls.Ptr = cret
369+ return cls
370+}
371+
372+// Retrieves the next accessible sibling of an accessible object
373+func (x *ExpanderRow) GetNextAccessibleSibling() *gtk.AccessibleBase {
374+ var cls *gtk.AccessibleBase
375+
376+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
377+
378+ if cret == 0 {
379+ return nil
380+ }
381+ cls = &gtk.AccessibleBase{}
382+ cls.Ptr = cret
383+ return cls
384+}
385+
386+// Queries a platform state, such as focus.
387+//
388+// This functionality can be overridden by `GtkAccessible`
389+// implementations, e.g. to get platform state from an ignored
390+// child widget, as is the case for `GtkText` wrappers.
391+func (x *ExpanderRow) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
392+
393+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
394+ return cret
395+}
396+
397+// Resets the accessible property to its default value.
303 func (x *ExpanderRow) ResetProperty(PropertyVar gtk.AccessibleProperty) {398 func (x *ExpanderRow) ResetProperty(PropertyVar gtk.AccessibleProperty) {
304 399
305 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)400 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
306 401
307 }402 }
308 403
309-// Resets the accessible @relation to its default value.404+// Resets the accessible relation to its default value.
310 func (x *ExpanderRow) ResetRelation(RelationVar gtk.AccessibleRelation) {405 func (x *ExpanderRow) ResetRelation(RelationVar gtk.AccessibleRelation) {
311 406
312 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)407 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
313 408
314 }409 }
315 410
316-// Resets the accessible @state to its default value.411+// Resets the accessible state to its default value.
317 func (x *ExpanderRow) ResetState(StateVar gtk.AccessibleState) {412 func (x *ExpanderRow) ResetState(StateVar gtk.AccessibleState) {
318 413
319 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)414 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
320 415
321 }416 }
322 417
418+// Sets the parent and sibling of an accessible object.
419+//
420+// This function is meant to be used by accessible implementations that are
421+// not part of the widget hierarchy, and but act as a logical bridge between
422+// widgets. For instance, if a widget creates an object that holds metadata
423+// for each child, and you want that object to implement the `GtkAccessible`
424+// interface, you will use this function to ensure that the parent of each
425+// child widget is the metadata object, and the parent of each metadata
426+// object is the container widget.
427+func (x *ExpanderRow) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
428+
429+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
430+
431+}
432+
433+// Updates the next accessible sibling.
434+//
435+// That might be useful when a new child of a custom accessible
436+// is created, and it needs to be linked to a previous child.
437+func (x *ExpanderRow) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
438+
439+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
440+
441+}
442+
443+// Informs ATs that the platform state has changed.
444+//
445+// This function should be used by `GtkAccessible` implementations that
446+// have a platform state but are not widgets. Widgets handle platform
447+// states automatically.
448+func (x *ExpanderRow) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
449+
450+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
451+
452+}
453+
323 // Updates a list of accessible properties.454 // Updates a list of accessible properties.
324 //455 //
325 // See the [enum@Gtk.AccessibleProperty] documentation for the456 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -362,7 +493,7 @@ func (x *ExpanderRow) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gt
362 // relation change must be communicated to assistive technologies.493 // relation change must be communicated to assistive technologies.
363 //494 //
364 // If the [enum@Gtk.AccessibleRelation] requires a list of references,495 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
365-// you should pass each reference individually, followed by %NULL, e.g.496+// you should pass each reference individually, followed by `NULL`, e.g.
366 //497 //
367 // ```c498 // ```c
368 // gtk_accessible_update_relation (accessible,499 // gtk_accessible_update_relation (accessible,
@@ -392,13 +523,17 @@ func (x *ExpanderRow) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.
392 523
393 }524 }
394 525
395-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]526+// Updates a list of accessible states.
396-// documentation for the value types of accessible states.
397 //527 //
398-// This function should be called by `GtkWidget` types whenever an accessible528+// See the [enum@Gtk.AccessibleState] documentation for the
399-// state change must be communicated to assistive technologies.529+// value types of accessible states.
530+//
531+// This function should be called by `GtkWidget` types whenever
532+// an accessible state change must be communicated to assistive
533+// technologies.
400 //534 //
401 // Example:535 // Example:
536+//
402 // ```c537 // ```c
403 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;538 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
404 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),539 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -511,7 +646,7 @@ func (x *ExpanderRow) SetDetailedActionName(DetailedActionNameVar string) {
511 // Gets the ID of the @buildable object.646 // Gets the ID of the @buildable object.
512 //647 //
513 // `GtkBuilder` sets the name based on the ID attribute648 // `GtkBuilder` sets the name based on the ID attribute
514-// of the <object> tag used to construct the @buildable.649+// of the `<object>` tag used to construct the @buildable.
515 func (x *ExpanderRow) GetBuildableId() string {650 func (x *ExpanderRow) GetBuildableId() string {
516 651
517 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())652 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-flap.go +145 -10
@@ -567,34 +567,165 @@ func (x *Flap) GetSwipeArea(NavigationDirectionVar NavigationDirection, IsDragVa
567 567
568 }568 }
569 569
570-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.570+// Requests the user's screen reader to announce the given message.
571+//
572+// This kind of notification is useful for messages that
573+// either have only a visual representation or that are not
574+// exposed visually at all, e.g. a notification about a
575+// successful operation.
576+//
577+// Also, by using this API, you can ensure that the message
578+// does not interrupts the user's current screen reader output.
579+func (x *Flap) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
580+
581+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
582+
583+}
584+
585+// Retrieves the accessible parent for an accessible object.
586+//
587+// This function returns `NULL` for top level widgets.
588+func (x *Flap) GetAccessibleParent() *gtk.AccessibleBase {
589+ var cls *gtk.AccessibleBase
590+
591+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
592+
593+ if cret == 0 {
594+ return nil
595+ }
596+ cls = &gtk.AccessibleBase{}
597+ cls.Ptr = cret
598+ return cls
599+}
600+
601+// Retrieves the accessible role of an accessible object.
571 func (x *Flap) GetAccessibleRole() gtk.AccessibleRole {602 func (x *Flap) GetAccessibleRole() gtk.AccessibleRole {
572 603
573 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())604 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
574 return cret605 return cret
575 }606 }
576 607
577-// Resets the accessible @property to its default value.608+// Retrieves the implementation for the given accessible object.
609+func (x *Flap) GetAtContext() *gtk.ATContext {
610+ var cls *gtk.ATContext
611+
612+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
613+
614+ if cret == 0 {
615+ return nil
616+ }
617+ cls = &gtk.ATContext{}
618+ cls.Ptr = cret
619+ return cls
620+}
621+
622+// Queries the coordinates and dimensions of this accessible
623+//
624+// This functionality can be overridden by `GtkAccessible`
625+// implementations, e.g. to get the bounds from an ignored
626+// child widget.
627+func (x *Flap) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
628+
629+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
630+ return cret
631+}
632+
633+// Retrieves the first accessible child of an accessible object.
634+func (x *Flap) GetFirstAccessibleChild() *gtk.AccessibleBase {
635+ var cls *gtk.AccessibleBase
636+
637+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
638+
639+ if cret == 0 {
640+ return nil
641+ }
642+ cls = &gtk.AccessibleBase{}
643+ cls.Ptr = cret
644+ return cls
645+}
646+
647+// Retrieves the next accessible sibling of an accessible object
648+func (x *Flap) GetNextAccessibleSibling() *gtk.AccessibleBase {
649+ var cls *gtk.AccessibleBase
650+
651+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
652+
653+ if cret == 0 {
654+ return nil
655+ }
656+ cls = &gtk.AccessibleBase{}
657+ cls.Ptr = cret
658+ return cls
659+}
660+
661+// Queries a platform state, such as focus.
662+//
663+// This functionality can be overridden by `GtkAccessible`
664+// implementations, e.g. to get platform state from an ignored
665+// child widget, as is the case for `GtkText` wrappers.
666+func (x *Flap) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
667+
668+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
669+ return cret
670+}
671+
672+// Resets the accessible property to its default value.
578 func (x *Flap) ResetProperty(PropertyVar gtk.AccessibleProperty) {673 func (x *Flap) ResetProperty(PropertyVar gtk.AccessibleProperty) {
579 674
580 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)675 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
581 676
582 }677 }
583 678
584-// Resets the accessible @relation to its default value.679+// Resets the accessible relation to its default value.
585 func (x *Flap) ResetRelation(RelationVar gtk.AccessibleRelation) {680 func (x *Flap) ResetRelation(RelationVar gtk.AccessibleRelation) {
586 681
587 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)682 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
588 683
589 }684 }
590 685
591-// Resets the accessible @state to its default value.686+// Resets the accessible state to its default value.
592 func (x *Flap) ResetState(StateVar gtk.AccessibleState) {687 func (x *Flap) ResetState(StateVar gtk.AccessibleState) {
593 688
594 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)689 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
595 690
596 }691 }
597 692
693+// Sets the parent and sibling of an accessible object.
694+//
695+// This function is meant to be used by accessible implementations that are
696+// not part of the widget hierarchy, and but act as a logical bridge between
697+// widgets. For instance, if a widget creates an object that holds metadata
698+// for each child, and you want that object to implement the `GtkAccessible`
699+// interface, you will use this function to ensure that the parent of each
700+// child widget is the metadata object, and the parent of each metadata
701+// object is the container widget.
702+func (x *Flap) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
703+
704+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
705+
706+}
707+
708+// Updates the next accessible sibling.
709+//
710+// That might be useful when a new child of a custom accessible
711+// is created, and it needs to be linked to a previous child.
712+func (x *Flap) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
713+
714+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
715+
716+}
717+
718+// Informs ATs that the platform state has changed.
719+//
720+// This function should be used by `GtkAccessible` implementations that
721+// have a platform state but are not widgets. Widgets handle platform
722+// states automatically.
723+func (x *Flap) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
724+
725+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
726+
727+}
728+
598 // Updates a list of accessible properties.729 // Updates a list of accessible properties.
599 //730 //
600 // See the [enum@Gtk.AccessibleProperty] documentation for the731 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -637,7 +768,7 @@ func (x *Flap) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.Acces
637 // relation change must be communicated to assistive technologies.768 // relation change must be communicated to assistive technologies.
638 //769 //
639 // If the [enum@Gtk.AccessibleRelation] requires a list of references,770 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
640-// you should pass each reference individually, followed by %NULL, e.g.771+// you should pass each reference individually, followed by `NULL`, e.g.
641 //772 //
642 // ```c773 // ```c
643 // gtk_accessible_update_relation (accessible,774 // gtk_accessible_update_relation (accessible,
@@ -667,13 +798,17 @@ func (x *Flap) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.Accessi
667 798
668 }799 }
669 800
670-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]801+// Updates a list of accessible states.
671-// documentation for the value types of accessible states.
672 //802 //
673-// This function should be called by `GtkWidget` types whenever an accessible803+// See the [enum@Gtk.AccessibleState] documentation for the
674-// state change must be communicated to assistive technologies.804+// value types of accessible states.
805+//
806+// This function should be called by `GtkWidget` types whenever
807+// an accessible state change must be communicated to assistive
808+// technologies.
675 //809 //
676 // Example:810 // Example:
811+//
677 // ```c812 // ```c
678 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;813 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
679 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),814 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -703,7 +838,7 @@ func (x *Flap) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleState,
703 // Gets the ID of the @buildable object.838 // Gets the ID of the @buildable object.
704 //839 //
705 // `GtkBuilder` sets the name based on the ID attribute840 // `GtkBuilder` sets the name based on the ID attribute
706-// of the <object> tag used to construct the @buildable.841+// of the `<object>` tag used to construct the @buildable.
707 func (x *Flap) GetBuildableId() string {842 func (x *Flap) GetBuildableId() string {
708 843
709 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())844 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-header-bar.go +145 -10
@@ -388,34 +388,165 @@ func (c *HeaderBar) SetGoPointer(ptr uintptr) {
388 c.Ptr = ptr388 c.Ptr = ptr
389 }389 }
390 390
391-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.391+// Requests the user's screen reader to announce the given message.
392+//
393+// This kind of notification is useful for messages that
394+// either have only a visual representation or that are not
395+// exposed visually at all, e.g. a notification about a
396+// successful operation.
397+//
398+// Also, by using this API, you can ensure that the message
399+// does not interrupts the user's current screen reader output.
400+func (x *HeaderBar) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
401+
402+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
403+
404+}
405+
406+// Retrieves the accessible parent for an accessible object.
407+//
408+// This function returns `NULL` for top level widgets.
409+func (x *HeaderBar) GetAccessibleParent() *gtk.AccessibleBase {
410+ var cls *gtk.AccessibleBase
411+
412+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
413+
414+ if cret == 0 {
415+ return nil
416+ }
417+ cls = &gtk.AccessibleBase{}
418+ cls.Ptr = cret
419+ return cls
420+}
421+
422+// Retrieves the accessible role of an accessible object.
392 func (x *HeaderBar) GetAccessibleRole() gtk.AccessibleRole {423 func (x *HeaderBar) GetAccessibleRole() gtk.AccessibleRole {
393 424
394 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())425 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
395 return cret426 return cret
396 }427 }
397 428
398-// Resets the accessible @property to its default value.429+// Retrieves the implementation for the given accessible object.
430+func (x *HeaderBar) GetAtContext() *gtk.ATContext {
431+ var cls *gtk.ATContext
432+
433+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
434+
435+ if cret == 0 {
436+ return nil
437+ }
438+ cls = &gtk.ATContext{}
439+ cls.Ptr = cret
440+ return cls
441+}
442+
443+// Queries the coordinates and dimensions of this accessible
444+//
445+// This functionality can be overridden by `GtkAccessible`
446+// implementations, e.g. to get the bounds from an ignored
447+// child widget.
448+func (x *HeaderBar) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
449+
450+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
451+ return cret
452+}
453+
454+// Retrieves the first accessible child of an accessible object.
455+func (x *HeaderBar) GetFirstAccessibleChild() *gtk.AccessibleBase {
456+ var cls *gtk.AccessibleBase
457+
458+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
459+
460+ if cret == 0 {
461+ return nil
462+ }
463+ cls = &gtk.AccessibleBase{}
464+ cls.Ptr = cret
465+ return cls
466+}
467+
468+// Retrieves the next accessible sibling of an accessible object
469+func (x *HeaderBar) GetNextAccessibleSibling() *gtk.AccessibleBase {
470+ var cls *gtk.AccessibleBase
471+
472+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
473+
474+ if cret == 0 {
475+ return nil
476+ }
477+ cls = &gtk.AccessibleBase{}
478+ cls.Ptr = cret
479+ return cls
480+}
481+
482+// Queries a platform state, such as focus.
483+//
484+// This functionality can be overridden by `GtkAccessible`
485+// implementations, e.g. to get platform state from an ignored
486+// child widget, as is the case for `GtkText` wrappers.
487+func (x *HeaderBar) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
488+
489+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
490+ return cret
491+}
492+
493+// Resets the accessible property to its default value.
399 func (x *HeaderBar) ResetProperty(PropertyVar gtk.AccessibleProperty) {494 func (x *HeaderBar) ResetProperty(PropertyVar gtk.AccessibleProperty) {
400 495
401 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)496 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
402 497
403 }498 }
404 499
405-// Resets the accessible @relation to its default value.500+// Resets the accessible relation to its default value.
406 func (x *HeaderBar) ResetRelation(RelationVar gtk.AccessibleRelation) {501 func (x *HeaderBar) ResetRelation(RelationVar gtk.AccessibleRelation) {
407 502
408 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)503 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
409 504
410 }505 }
411 506
412-// Resets the accessible @state to its default value.507+// Resets the accessible state to its default value.
413 func (x *HeaderBar) ResetState(StateVar gtk.AccessibleState) {508 func (x *HeaderBar) ResetState(StateVar gtk.AccessibleState) {
414 509
415 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)510 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
416 511
417 }512 }
418 513
514+// Sets the parent and sibling of an accessible object.
515+//
516+// This function is meant to be used by accessible implementations that are
517+// not part of the widget hierarchy, and but act as a logical bridge between
518+// widgets. For instance, if a widget creates an object that holds metadata
519+// for each child, and you want that object to implement the `GtkAccessible`
520+// interface, you will use this function to ensure that the parent of each
521+// child widget is the metadata object, and the parent of each metadata
522+// object is the container widget.
523+func (x *HeaderBar) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
524+
525+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
526+
527+}
528+
529+// Updates the next accessible sibling.
530+//
531+// That might be useful when a new child of a custom accessible
532+// is created, and it needs to be linked to a previous child.
533+func (x *HeaderBar) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
534+
535+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
536+
537+}
538+
539+// Informs ATs that the platform state has changed.
540+//
541+// This function should be used by `GtkAccessible` implementations that
542+// have a platform state but are not widgets. Widgets handle platform
543+// states automatically.
544+func (x *HeaderBar) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
545+
546+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
547+
548+}
549+
419 // Updates a list of accessible properties.550 // Updates a list of accessible properties.
420 //551 //
421 // See the [enum@Gtk.AccessibleProperty] documentation for the552 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -458,7 +589,7 @@ func (x *HeaderBar) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.
458 // relation change must be communicated to assistive technologies.589 // relation change must be communicated to assistive technologies.
459 //590 //
460 // If the [enum@Gtk.AccessibleRelation] requires a list of references,591 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
461-// you should pass each reference individually, followed by %NULL, e.g.592+// you should pass each reference individually, followed by `NULL`, e.g.
462 //593 //
463 // ```c594 // ```c
464 // gtk_accessible_update_relation (accessible,595 // gtk_accessible_update_relation (accessible,
@@ -488,13 +619,17 @@ func (x *HeaderBar) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.Ac
488 619
489 }620 }
490 621
491-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]622+// Updates a list of accessible states.
492-// documentation for the value types of accessible states.
493 //623 //
494-// This function should be called by `GtkWidget` types whenever an accessible624+// See the [enum@Gtk.AccessibleState] documentation for the
495-// state change must be communicated to assistive technologies.625+// value types of accessible states.
626+//
627+// This function should be called by `GtkWidget` types whenever
628+// an accessible state change must be communicated to assistive
629+// technologies.
496 //630 //
497 // Example:631 // Example:
632+//
498 // ```c633 // ```c
499 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;634 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
500 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),635 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -524,7 +659,7 @@ func (x *HeaderBar) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleS
524 // Gets the ID of the @buildable object.659 // Gets the ID of the @buildable object.
525 //660 //
526 // `GtkBuilder` sets the name based on the ID attribute661 // `GtkBuilder` sets the name based on the ID attribute
527-// of the <object> tag used to construct the @buildable.662+// of the `<object>` tag used to construct the @buildable.
528 func (x *HeaderBar) GetBuildableId() string {663 func (x *HeaderBar) GetBuildableId() string {
529 664
530 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())665 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
A v4/adw/adw-inline-view-switcher.go +548 -0
@@ -0,0 +1,548 @@
1+// Package adw was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT
2+package adw
3+
4+import (
5+ "structs"
6+ "unsafe"
7+
8+ "github.com/jwijenbergh/purego"
9+ "github.com/jwijenbergh/puregotk/pkg/core"
10+ "github.com/jwijenbergh/puregotk/v4/gobject"
11+ "github.com/jwijenbergh/puregotk/v4/gobject/types"
12+ "github.com/jwijenbergh/puregotk/v4/gtk"
13+)
14+
15+type InlineViewSwitcherClass struct {
16+ _ structs.HostLayout
17+
18+ ParentClass gtk.WidgetClass
19+}
20+
21+func (x *InlineViewSwitcherClass) GoPointer() uintptr {
22+ return uintptr(unsafe.Pointer(x))
23+}
24+
25+// Describes what [class@InlineViewSwitcher] toggles display.
26+//
27+// <picture>
28+//
29+// <source srcset="inline-view-switcher-display-modes-dark.png" media="(prefers-color-scheme: dark)">
30+// <img src="inline-view-switcher-display-modes.png" alt="inline-view-switcher-display-modes">
31+//
32+// </picture>
33+type InlineViewSwitcherDisplayMode int
34+
35+var xInlineViewSwitcherDisplayModeGLibType func() types.GType
36+
37+func InlineViewSwitcherDisplayModeGLibType() types.GType {
38+ return xInlineViewSwitcherDisplayModeGLibType()
39+}
40+
41+const (
42+
43+ // Toggles only display labels.
44+ InlineViewSwitcherLabelsValue InlineViewSwitcherDisplayMode = 0
45+ // Toggles only display icons.
46+ InlineViewSwitcherIconsValue InlineViewSwitcherDisplayMode = 1
47+ // Toggles display both icons and labels.
48+ InlineViewSwitcherBothValue InlineViewSwitcherDisplayMode = 2
49+)
50+
51+// A view switcher that uses a toggle group.
52+//
53+// <picture>
54+//
55+// <source srcset="inline-view-switcher-dark.png" media="(prefers-color-scheme: dark)">
56+// <img src="inline-view-switcher.png" alt="inline-view-switcher">
57+//
58+// </picture>
59+//
60+// A view switcher showing pages of an [class@ViewStack] within an
61+// [class@ToggleGroup], similar to [class@ViewSwitcher].
62+//
63+// The toggles can display either an icon, a label or both. Use the
64+// [property@InlineViewSwitcher:display-mode] to control this.
65+//
66+// <picture>
67+//
68+// <source srcset="inline-view-switcher-display-modes-dark.png" media="(prefers-color-scheme: dark)">
69+// <img src="inline-view-switcher-display-modes.png" alt="inline-view-switcher-display-modes">
70+//
71+// </picture>
72+//
73+// ## CSS nodes
74+//
75+// `AdwInlineViewSwitcher` has a single CSS node with the name
76+// `inline-view-switcher`.
77+//
78+// ## Style classes
79+//
80+// Like `AdwToggleGroup`, it can accept the [`.flat`](style-classes.html#flat_1)
81+// and [`.round`](style-classes.html#round) style classes.
82+//
83+// <picture>
84+//
85+// <source srcset="inline-view-switcher-style-classes-dark.png" media="(prefers-color-scheme: dark)">
86+// <img src="inline-view-switcher-style-classes.png" alt="inline-view-switcher-style-classes">
87+//
88+// </picture>
89+//
90+// ## Accessibility
91+//
92+// The internal toggle group uses the `GTK_ACCESSIBLE_ROLE_TAB_LIST` role. Its
93+// toggles use the `GTK_ACCESSIBLE_ROLE_TAB` role.
94+type InlineViewSwitcher struct {
95+ gtk.Widget
96+}
97+
98+var xInlineViewSwitcherGLibType func() types.GType
99+
100+func InlineViewSwitcherGLibType() types.GType {
101+ return xInlineViewSwitcherGLibType()
102+}
103+
104+func InlineViewSwitcherNewFromInternalPtr(ptr uintptr) *InlineViewSwitcher {
105+ cls := &InlineViewSwitcher{}
106+ cls.Ptr = ptr
107+ return cls
108+}
109+
110+var xNewInlineViewSwitcher func() uintptr
111+
112+// Creates a new `AdwInlineViewSwitcher`.
113+func NewInlineViewSwitcher() *InlineViewSwitcher {
114+ var cls *InlineViewSwitcher
115+
116+ cret := xNewInlineViewSwitcher()
117+
118+ if cret == 0 {
119+ return nil
120+ }
121+ gobject.IncreaseRef(cret)
122+ cls = &InlineViewSwitcher{}
123+ cls.Ptr = cret
124+ return cls
125+}
126+
127+var xInlineViewSwitcherGetCanShrink func(uintptr) bool
128+
129+// Gets whether the toggles can be smaller than the natural size of their
130+// contents.
131+func (x *InlineViewSwitcher) GetCanShrink() bool {
132+
133+ cret := xInlineViewSwitcherGetCanShrink(x.GoPointer())
134+ return cret
135+}
136+
137+var xInlineViewSwitcherGetDisplayMode func(uintptr) InlineViewSwitcherDisplayMode
138+
139+// Gets the display mode of @self.
140+func (x *InlineViewSwitcher) GetDisplayMode() InlineViewSwitcherDisplayMode {
141+
142+ cret := xInlineViewSwitcherGetDisplayMode(x.GoPointer())
143+ return cret
144+}
145+
146+var xInlineViewSwitcherGetHomogeneous func(uintptr) bool
147+
148+// Gets whether all toggles within @self take the same size.
149+func (x *InlineViewSwitcher) GetHomogeneous() bool {
150+
151+ cret := xInlineViewSwitcherGetHomogeneous(x.GoPointer())
152+ return cret
153+}
154+
155+var xInlineViewSwitcherGetStack func(uintptr) uintptr
156+
157+// Gets the stack @self controls.
158+func (x *InlineViewSwitcher) GetStack() *ViewStack {
159+ var cls *ViewStack
160+
161+ cret := xInlineViewSwitcherGetStack(x.GoPointer())
162+
163+ if cret == 0 {
164+ return nil
165+ }
166+ gobject.IncreaseRef(cret)
167+ cls = &ViewStack{}
168+ cls.Ptr = cret
169+ return cls
170+}
171+
172+var xInlineViewSwitcherSetCanShrink func(uintptr, bool)
173+
174+// Sets whether the toggles can be smaller than the natural size of their
175+// contents.
176+//
177+// If @can_shrink is `TRUE`, the toggle labels will ellipsize.
178+//
179+// See [property@ToggleGroup:can-shrink].
180+func (x *InlineViewSwitcher) SetCanShrink(CanShrinkVar bool) {
181+
182+ xInlineViewSwitcherSetCanShrink(x.GoPointer(), CanShrinkVar)
183+
184+}
185+
186+var xInlineViewSwitcherSetDisplayMode func(uintptr, InlineViewSwitcherDisplayMode)
187+
188+// Sets the display mode of @self.
189+//
190+// Determines what the toggles display: a label, an icon or both.
191+//
192+// <picture>
193+//
194+// <source srcset="inline-view-switcher-display-modes-dark.png" media="(prefers-color-scheme: dark)">
195+// <img src="inline-view-switcher-display-modes.png" alt="inline-view-switcher-display-modes">
196+//
197+// </picture>
198+func (x *InlineViewSwitcher) SetDisplayMode(ModeVar InlineViewSwitcherDisplayMode) {
199+
200+ xInlineViewSwitcherSetDisplayMode(x.GoPointer(), ModeVar)
201+
202+}
203+
204+var xInlineViewSwitcherSetHomogeneous func(uintptr, bool)
205+
206+// Sets whether all toggles within @self take the same size.
207+func (x *InlineViewSwitcher) SetHomogeneous(HomogeneousVar bool) {
208+
209+ xInlineViewSwitcherSetHomogeneous(x.GoPointer(), HomogeneousVar)
210+
211+}
212+
213+var xInlineViewSwitcherSetStack func(uintptr, uintptr)
214+
215+// Sets the stack to control.
216+func (x *InlineViewSwitcher) SetStack(StackVar *ViewStack) {
217+
218+ xInlineViewSwitcherSetStack(x.GoPointer(), StackVar.GoPointer())
219+
220+}
221+
222+func (c *InlineViewSwitcher) GoPointer() uintptr {
223+ if c == nil {
224+ return 0
225+ }
226+ return c.Ptr
227+}
228+
229+func (c *InlineViewSwitcher) SetGoPointer(ptr uintptr) {
230+ c.Ptr = ptr
231+}
232+
233+// Requests the user's screen reader to announce the given message.
234+//
235+// This kind of notification is useful for messages that
236+// either have only a visual representation or that are not
237+// exposed visually at all, e.g. a notification about a
238+// successful operation.
239+//
240+// Also, by using this API, you can ensure that the message
241+// does not interrupts the user's current screen reader output.
242+func (x *InlineViewSwitcher) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
243+
244+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
245+
246+}
247+
248+// Retrieves the accessible parent for an accessible object.
249+//
250+// This function returns `NULL` for top level widgets.
251+func (x *InlineViewSwitcher) GetAccessibleParent() *gtk.AccessibleBase {
252+ var cls *gtk.AccessibleBase
253+
254+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
255+
256+ if cret == 0 {
257+ return nil
258+ }
259+ cls = &gtk.AccessibleBase{}
260+ cls.Ptr = cret
261+ return cls
262+}
263+
264+// Retrieves the accessible role of an accessible object.
265+func (x *InlineViewSwitcher) GetAccessibleRole() gtk.AccessibleRole {
266+
267+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
268+ return cret
269+}
270+
271+// Retrieves the implementation for the given accessible object.
272+func (x *InlineViewSwitcher) GetAtContext() *gtk.ATContext {
273+ var cls *gtk.ATContext
274+
275+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
276+
277+ if cret == 0 {
278+ return nil
279+ }
280+ cls = &gtk.ATContext{}
281+ cls.Ptr = cret
282+ return cls
283+}
284+
285+// Queries the coordinates and dimensions of this accessible
286+//
287+// This functionality can be overridden by `GtkAccessible`
288+// implementations, e.g. to get the bounds from an ignored
289+// child widget.
290+func (x *InlineViewSwitcher) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
291+
292+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
293+ return cret
294+}
295+
296+// Retrieves the first accessible child of an accessible object.
297+func (x *InlineViewSwitcher) GetFirstAccessibleChild() *gtk.AccessibleBase {
298+ var cls *gtk.AccessibleBase
299+
300+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
301+
302+ if cret == 0 {
303+ return nil
304+ }
305+ cls = &gtk.AccessibleBase{}
306+ cls.Ptr = cret
307+ return cls
308+}
309+
310+// Retrieves the next accessible sibling of an accessible object
311+func (x *InlineViewSwitcher) GetNextAccessibleSibling() *gtk.AccessibleBase {
312+ var cls *gtk.AccessibleBase
313+
314+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
315+
316+ if cret == 0 {
317+ return nil
318+ }
319+ cls = &gtk.AccessibleBase{}
320+ cls.Ptr = cret
321+ return cls
322+}
323+
324+// Queries a platform state, such as focus.
325+//
326+// This functionality can be overridden by `GtkAccessible`
327+// implementations, e.g. to get platform state from an ignored
328+// child widget, as is the case for `GtkText` wrappers.
329+func (x *InlineViewSwitcher) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
330+
331+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
332+ return cret
333+}
334+
335+// Resets the accessible property to its default value.
336+func (x *InlineViewSwitcher) ResetProperty(PropertyVar gtk.AccessibleProperty) {
337+
338+ gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
339+
340+}
341+
342+// Resets the accessible relation to its default value.
343+func (x *InlineViewSwitcher) ResetRelation(RelationVar gtk.AccessibleRelation) {
344+
345+ gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
346+
347+}
348+
349+// Resets the accessible state to its default value.
350+func (x *InlineViewSwitcher) ResetState(StateVar gtk.AccessibleState) {
351+
352+ gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
353+
354+}
355+
356+// Sets the parent and sibling of an accessible object.
357+//
358+// This function is meant to be used by accessible implementations that are
359+// not part of the widget hierarchy, and but act as a logical bridge between
360+// widgets. For instance, if a widget creates an object that holds metadata
361+// for each child, and you want that object to implement the `GtkAccessible`
362+// interface, you will use this function to ensure that the parent of each
363+// child widget is the metadata object, and the parent of each metadata
364+// object is the container widget.
365+func (x *InlineViewSwitcher) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
366+
367+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
368+
369+}
370+
371+// Updates the next accessible sibling.
372+//
373+// That might be useful when a new child of a custom accessible
374+// is created, and it needs to be linked to a previous child.
375+func (x *InlineViewSwitcher) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
376+
377+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
378+
379+}
380+
381+// Informs ATs that the platform state has changed.
382+//
383+// This function should be used by `GtkAccessible` implementations that
384+// have a platform state but are not widgets. Widgets handle platform
385+// states automatically.
386+func (x *InlineViewSwitcher) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
387+
388+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
389+
390+}
391+
392+// Updates a list of accessible properties.
393+//
394+// See the [enum@Gtk.AccessibleProperty] documentation for the
395+// value types of accessible properties.
396+//
397+// This function should be called by `GtkWidget` types whenever
398+// an accessible property change must be communicated to assistive
399+// technologies.
400+//
401+// Example:
402+// ```c
403+// value = gtk_adjustment_get_value (adjustment);
404+// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
405+//
406+// GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
407+// -1);
408+//
409+// ```
410+func (x *InlineViewSwitcher) UpdateProperty(FirstPropertyVar gtk.AccessibleProperty, varArgs ...interface{}) {
411+
412+ gtk.XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
413+
414+}
415+
416+// Updates an array of accessible properties.
417+//
418+// This function should be called by `GtkWidget` types whenever an accessible
419+// property change must be communicated to assistive technologies.
420+//
421+// This function is meant to be used by language bindings.
422+func (x *InlineViewSwitcher) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.AccessibleProperty, ValuesVar []gobject.Value) {
423+
424+ gtk.XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
425+
426+}
427+
428+// Updates a list of accessible relations.
429+//
430+// This function should be called by `GtkWidget` types whenever an accessible
431+// relation change must be communicated to assistive technologies.
432+//
433+// If the [enum@Gtk.AccessibleRelation] requires a list of references,
434+// you should pass each reference individually, followed by `NULL`, e.g.
435+//
436+// ```c
437+// gtk_accessible_update_relation (accessible,
438+//
439+// GTK_ACCESSIBLE_RELATION_CONTROLS,
440+// ref1, NULL,
441+// GTK_ACCESSIBLE_RELATION_LABELLED_BY,
442+// ref1, ref2, ref3, NULL,
443+// -1);
444+//
445+// ```
446+func (x *InlineViewSwitcher) UpdateRelation(FirstRelationVar gtk.AccessibleRelation, varArgs ...interface{}) {
447+
448+ gtk.XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
449+
450+}
451+
452+// Updates an array of accessible relations.
453+//
454+// This function should be called by `GtkWidget` types whenever an accessible
455+// relation change must be communicated to assistive technologies.
456+//
457+// This function is meant to be used by language bindings.
458+func (x *InlineViewSwitcher) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.AccessibleRelation, ValuesVar []gobject.Value) {
459+
460+ gtk.XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
461+
462+}
463+
464+// Updates a list of accessible states.
465+//
466+// See the [enum@Gtk.AccessibleState] documentation for the
467+// value types of accessible states.
468+//
469+// This function should be called by `GtkWidget` types whenever
470+// an accessible state change must be communicated to assistive
471+// technologies.
472+//
473+// Example:
474+//
475+// ```c
476+// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
477+// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
478+//
479+// GTK_ACCESSIBLE_STATE_CHECKED, value,
480+// -1);
481+//
482+// ```
483+func (x *InlineViewSwitcher) UpdateState(FirstStateVar gtk.AccessibleState, varArgs ...interface{}) {
484+
485+ gtk.XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
486+
487+}
488+
489+// Updates an array of accessible states.
490+//
491+// This function should be called by `GtkWidget` types whenever an accessible
492+// state change must be communicated to assistive technologies.
493+//
494+// This function is meant to be used by language bindings.
495+func (x *InlineViewSwitcher) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleState, ValuesVar []gobject.Value) {
496+
497+ gtk.XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
498+
499+}
500+
501+// Gets the ID of the @buildable object.
502+//
503+// `GtkBuilder` sets the name based on the ID attribute
504+// of the `<object>` tag used to construct the @buildable.
505+func (x *InlineViewSwitcher) GetBuildableId() string {
506+
507+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
508+ return cret
509+}
510+
511+// Retrieves the orientation of the @orientable.
512+func (x *InlineViewSwitcher) GetOrientation() gtk.Orientation {
513+
514+ cret := gtk.XGtkOrientableGetOrientation(x.GoPointer())
515+ return cret
516+}
517+
518+// Sets the orientation of the @orientable.
519+func (x *InlineViewSwitcher) SetOrientation(OrientationVar gtk.Orientation) {
520+
521+ gtk.XGtkOrientableSetOrientation(x.GoPointer(), OrientationVar)
522+
523+}
524+
525+func init() {
526+ core.SetPackageName("ADW", "libadwaita-1")
527+ core.SetSharedLibrary("ADW", "libadwaita-1.so.0")
528+ lib, err := purego.Dlopen(core.GetPath("ADW"), purego.RTLD_NOW|purego.RTLD_GLOBAL)
529+ if err != nil {
530+ panic(err)
531+ }
532+
533+ core.PuregoSafeRegister(&xInlineViewSwitcherDisplayModeGLibType, lib, "adw_inline_view_switcher_display_mode_get_type")
534+
535+ core.PuregoSafeRegister(&xInlineViewSwitcherGLibType, lib, "adw_inline_view_switcher_get_type")
536+
537+ core.PuregoSafeRegister(&xNewInlineViewSwitcher, lib, "adw_inline_view_switcher_new")
538+
539+ core.PuregoSafeRegister(&xInlineViewSwitcherGetCanShrink, lib, "adw_inline_view_switcher_get_can_shrink")
540+ core.PuregoSafeRegister(&xInlineViewSwitcherGetDisplayMode, lib, "adw_inline_view_switcher_get_display_mode")
541+ core.PuregoSafeRegister(&xInlineViewSwitcherGetHomogeneous, lib, "adw_inline_view_switcher_get_homogeneous")
542+ core.PuregoSafeRegister(&xInlineViewSwitcherGetStack, lib, "adw_inline_view_switcher_get_stack")
543+ core.PuregoSafeRegister(&xInlineViewSwitcherSetCanShrink, lib, "adw_inline_view_switcher_set_can_shrink")
544+ core.PuregoSafeRegister(&xInlineViewSwitcherSetDisplayMode, lib, "adw_inline_view_switcher_set_display_mode")
545+ core.PuregoSafeRegister(&xInlineViewSwitcherSetHomogeneous, lib, "adw_inline_view_switcher_set_homogeneous")
546+ core.PuregoSafeRegister(&xInlineViewSwitcherSetStack, lib, "adw_inline_view_switcher_set_stack")
547+
548+}
M v4/adw/adw-layout-slot.go +145 -10
@@ -81,34 +81,165 @@ func (c *LayoutSlot) SetGoPointer(ptr uintptr) {
81 c.Ptr = ptr81 c.Ptr = ptr
82 }82 }
83 83
84-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.84+// Requests the user's screen reader to announce the given message.
85+//
86+// This kind of notification is useful for messages that
87+// either have only a visual representation or that are not
88+// exposed visually at all, e.g. a notification about a
89+// successful operation.
90+//
91+// Also, by using this API, you can ensure that the message
92+// does not interrupts the user's current screen reader output.
93+func (x *LayoutSlot) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
94+
95+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
96+
97+}
98+
99+// Retrieves the accessible parent for an accessible object.
100+//
101+// This function returns `NULL` for top level widgets.
102+func (x *LayoutSlot) GetAccessibleParent() *gtk.AccessibleBase {
103+ var cls *gtk.AccessibleBase
104+
105+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
106+
107+ if cret == 0 {
108+ return nil
109+ }
110+ cls = &gtk.AccessibleBase{}
111+ cls.Ptr = cret
112+ return cls
113+}
114+
115+// Retrieves the accessible role of an accessible object.
85 func (x *LayoutSlot) GetAccessibleRole() gtk.AccessibleRole {116 func (x *LayoutSlot) GetAccessibleRole() gtk.AccessibleRole {
86 117
87 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())118 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
88 return cret119 return cret
89 }120 }
90 121
91-// Resets the accessible @property to its default value.122+// Retrieves the implementation for the given accessible object.
123+func (x *LayoutSlot) GetAtContext() *gtk.ATContext {
124+ var cls *gtk.ATContext
125+
126+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
127+
128+ if cret == 0 {
129+ return nil
130+ }
131+ cls = &gtk.ATContext{}
132+ cls.Ptr = cret
133+ return cls
134+}
135+
136+// Queries the coordinates and dimensions of this accessible
137+//
138+// This functionality can be overridden by `GtkAccessible`
139+// implementations, e.g. to get the bounds from an ignored
140+// child widget.
141+func (x *LayoutSlot) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
142+
143+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
144+ return cret
145+}
146+
147+// Retrieves the first accessible child of an accessible object.
148+func (x *LayoutSlot) GetFirstAccessibleChild() *gtk.AccessibleBase {
149+ var cls *gtk.AccessibleBase
150+
151+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
152+
153+ if cret == 0 {
154+ return nil
155+ }
156+ cls = &gtk.AccessibleBase{}
157+ cls.Ptr = cret
158+ return cls
159+}
160+
161+// Retrieves the next accessible sibling of an accessible object
162+func (x *LayoutSlot) GetNextAccessibleSibling() *gtk.AccessibleBase {
163+ var cls *gtk.AccessibleBase
164+
165+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
166+
167+ if cret == 0 {
168+ return nil
169+ }
170+ cls = &gtk.AccessibleBase{}
171+ cls.Ptr = cret
172+ return cls
173+}
174+
175+// Queries a platform state, such as focus.
176+//
177+// This functionality can be overridden by `GtkAccessible`
178+// implementations, e.g. to get platform state from an ignored
179+// child widget, as is the case for `GtkText` wrappers.
180+func (x *LayoutSlot) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
181+
182+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
183+ return cret
184+}
185+
186+// Resets the accessible property to its default value.
92 func (x *LayoutSlot) ResetProperty(PropertyVar gtk.AccessibleProperty) {187 func (x *LayoutSlot) ResetProperty(PropertyVar gtk.AccessibleProperty) {
93 188
94 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)189 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
95 190
96 }191 }
97 192
98-// Resets the accessible @relation to its default value.193+// Resets the accessible relation to its default value.
99 func (x *LayoutSlot) ResetRelation(RelationVar gtk.AccessibleRelation) {194 func (x *LayoutSlot) ResetRelation(RelationVar gtk.AccessibleRelation) {
100 195
101 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)196 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
102 197
103 }198 }
104 199
105-// Resets the accessible @state to its default value.200+// Resets the accessible state to its default value.
106 func (x *LayoutSlot) ResetState(StateVar gtk.AccessibleState) {201 func (x *LayoutSlot) ResetState(StateVar gtk.AccessibleState) {
107 202
108 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)203 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
109 204
110 }205 }
111 206
207+// Sets the parent and sibling of an accessible object.
208+//
209+// This function is meant to be used by accessible implementations that are
210+// not part of the widget hierarchy, and but act as a logical bridge between
211+// widgets. For instance, if a widget creates an object that holds metadata
212+// for each child, and you want that object to implement the `GtkAccessible`
213+// interface, you will use this function to ensure that the parent of each
214+// child widget is the metadata object, and the parent of each metadata
215+// object is the container widget.
216+func (x *LayoutSlot) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
217+
218+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
219+
220+}
221+
222+// Updates the next accessible sibling.
223+//
224+// That might be useful when a new child of a custom accessible
225+// is created, and it needs to be linked to a previous child.
226+func (x *LayoutSlot) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
227+
228+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
229+
230+}
231+
232+// Informs ATs that the platform state has changed.
233+//
234+// This function should be used by `GtkAccessible` implementations that
235+// have a platform state but are not widgets. Widgets handle platform
236+// states automatically.
237+func (x *LayoutSlot) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
238+
239+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
240+
241+}
242+
112 // Updates a list of accessible properties.243 // Updates a list of accessible properties.
113 //244 //
114 // See the [enum@Gtk.AccessibleProperty] documentation for the245 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -151,7 +282,7 @@ func (x *LayoutSlot) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk
151 // relation change must be communicated to assistive technologies.282 // relation change must be communicated to assistive technologies.
152 //283 //
153 // If the [enum@Gtk.AccessibleRelation] requires a list of references,284 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
154-// you should pass each reference individually, followed by %NULL, e.g.285+// you should pass each reference individually, followed by `NULL`, e.g.
155 //286 //
156 // ```c287 // ```c
157 // gtk_accessible_update_relation (accessible,288 // gtk_accessible_update_relation (accessible,
@@ -181,13 +312,17 @@ func (x *LayoutSlot) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.A
181 312
182 }313 }
183 314
184-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]315+// Updates a list of accessible states.
185-// documentation for the value types of accessible states.
186 //316 //
187-// This function should be called by `GtkWidget` types whenever an accessible317+// See the [enum@Gtk.AccessibleState] documentation for the
188-// state change must be communicated to assistive technologies.318+// value types of accessible states.
319+//
320+// This function should be called by `GtkWidget` types whenever
321+// an accessible state change must be communicated to assistive
322+// technologies.
189 //323 //
190 // Example:324 // Example:
325+//
191 // ```c326 // ```c
192 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;327 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
193 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),328 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -217,7 +352,7 @@ func (x *LayoutSlot) UpdateStateValue(NStatesVar int, StatesVar []gtk.Accessible
217 // Gets the ID of the @buildable object.352 // Gets the ID of the @buildable object.
218 //353 //
219 // `GtkBuilder` sets the name based on the ID attribute354 // `GtkBuilder` sets the name based on the ID attribute
220-// of the <object> tag used to construct the @buildable.355+// of the `<object>` tag used to construct the @buildable.
221 func (x *LayoutSlot) GetBuildableId() string {356 func (x *LayoutSlot) GetBuildableId() string {
222 357
223 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())358 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-layout.go +1 -1
@@ -104,7 +104,7 @@ func (c *Layout) SetGoPointer(ptr uintptr) {
104 // Gets the ID of the @buildable object.104 // Gets the ID of the @buildable object.
105 //105 //
106 // `GtkBuilder` sets the name based on the ID attribute106 // `GtkBuilder` sets the name based on the ID attribute
107-// of the <object> tag used to construct the @buildable.107+// of the `<object>` tag used to construct the @buildable.
108 func (x *Layout) GetBuildableId() string {108 func (x *Layout) GetBuildableId() string {
109 109
110 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())110 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-leaflet.go +145 -10
@@ -620,34 +620,165 @@ func (x *Leaflet) GetSwipeArea(NavigationDirectionVar NavigationDirection, IsDra
620 620
621 }621 }
622 622
623-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.623+// Requests the user's screen reader to announce the given message.
624+//
625+// This kind of notification is useful for messages that
626+// either have only a visual representation or that are not
627+// exposed visually at all, e.g. a notification about a
628+// successful operation.
629+//
630+// Also, by using this API, you can ensure that the message
631+// does not interrupts the user's current screen reader output.
632+func (x *Leaflet) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
633+
634+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
635+
636+}
637+
638+// Retrieves the accessible parent for an accessible object.
639+//
640+// This function returns `NULL` for top level widgets.
641+func (x *Leaflet) GetAccessibleParent() *gtk.AccessibleBase {
642+ var cls *gtk.AccessibleBase
643+
644+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
645+
646+ if cret == 0 {
647+ return nil
648+ }
649+ cls = &gtk.AccessibleBase{}
650+ cls.Ptr = cret
651+ return cls
652+}
653+
654+// Retrieves the accessible role of an accessible object.
624 func (x *Leaflet) GetAccessibleRole() gtk.AccessibleRole {655 func (x *Leaflet) GetAccessibleRole() gtk.AccessibleRole {
625 656
626 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())657 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
627 return cret658 return cret
628 }659 }
629 660
630-// Resets the accessible @property to its default value.661+// Retrieves the implementation for the given accessible object.
662+func (x *Leaflet) GetAtContext() *gtk.ATContext {
663+ var cls *gtk.ATContext
664+
665+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
666+
667+ if cret == 0 {
668+ return nil
669+ }
670+ cls = &gtk.ATContext{}
671+ cls.Ptr = cret
672+ return cls
673+}
674+
675+// Queries the coordinates and dimensions of this accessible
676+//
677+// This functionality can be overridden by `GtkAccessible`
678+// implementations, e.g. to get the bounds from an ignored
679+// child widget.
680+func (x *Leaflet) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
681+
682+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
683+ return cret
684+}
685+
686+// Retrieves the first accessible child of an accessible object.
687+func (x *Leaflet) GetFirstAccessibleChild() *gtk.AccessibleBase {
688+ var cls *gtk.AccessibleBase
689+
690+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
691+
692+ if cret == 0 {
693+ return nil
694+ }
695+ cls = &gtk.AccessibleBase{}
696+ cls.Ptr = cret
697+ return cls
698+}
699+
700+// Retrieves the next accessible sibling of an accessible object
701+func (x *Leaflet) GetNextAccessibleSibling() *gtk.AccessibleBase {
702+ var cls *gtk.AccessibleBase
703+
704+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
705+
706+ if cret == 0 {
707+ return nil
708+ }
709+ cls = &gtk.AccessibleBase{}
710+ cls.Ptr = cret
711+ return cls
712+}
713+
714+// Queries a platform state, such as focus.
715+//
716+// This functionality can be overridden by `GtkAccessible`
717+// implementations, e.g. to get platform state from an ignored
718+// child widget, as is the case for `GtkText` wrappers.
719+func (x *Leaflet) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
720+
721+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
722+ return cret
723+}
724+
725+// Resets the accessible property to its default value.
631 func (x *Leaflet) ResetProperty(PropertyVar gtk.AccessibleProperty) {726 func (x *Leaflet) ResetProperty(PropertyVar gtk.AccessibleProperty) {
632 727
633 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)728 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
634 729
635 }730 }
636 731
637-// Resets the accessible @relation to its default value.732+// Resets the accessible relation to its default value.
638 func (x *Leaflet) ResetRelation(RelationVar gtk.AccessibleRelation) {733 func (x *Leaflet) ResetRelation(RelationVar gtk.AccessibleRelation) {
639 734
640 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)735 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
641 736
642 }737 }
643 738
644-// Resets the accessible @state to its default value.739+// Resets the accessible state to its default value.
645 func (x *Leaflet) ResetState(StateVar gtk.AccessibleState) {740 func (x *Leaflet) ResetState(StateVar gtk.AccessibleState) {
646 741
647 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)742 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
648 743
649 }744 }
650 745
746+// Sets the parent and sibling of an accessible object.
747+//
748+// This function is meant to be used by accessible implementations that are
749+// not part of the widget hierarchy, and but act as a logical bridge between
750+// widgets. For instance, if a widget creates an object that holds metadata
751+// for each child, and you want that object to implement the `GtkAccessible`
752+// interface, you will use this function to ensure that the parent of each
753+// child widget is the metadata object, and the parent of each metadata
754+// object is the container widget.
755+func (x *Leaflet) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
756+
757+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
758+
759+}
760+
761+// Updates the next accessible sibling.
762+//
763+// That might be useful when a new child of a custom accessible
764+// is created, and it needs to be linked to a previous child.
765+func (x *Leaflet) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
766+
767+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
768+
769+}
770+
771+// Informs ATs that the platform state has changed.
772+//
773+// This function should be used by `GtkAccessible` implementations that
774+// have a platform state but are not widgets. Widgets handle platform
775+// states automatically.
776+func (x *Leaflet) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
777+
778+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
779+
780+}
781+
651 // Updates a list of accessible properties.782 // Updates a list of accessible properties.
652 //783 //
653 // See the [enum@Gtk.AccessibleProperty] documentation for the784 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -690,7 +821,7 @@ func (x *Leaflet) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.Ac
690 // relation change must be communicated to assistive technologies.821 // relation change must be communicated to assistive technologies.
691 //822 //
692 // If the [enum@Gtk.AccessibleRelation] requires a list of references,823 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
693-// you should pass each reference individually, followed by %NULL, e.g.824+// you should pass each reference individually, followed by `NULL`, e.g.
694 //825 //
695 // ```c826 // ```c
696 // gtk_accessible_update_relation (accessible,827 // gtk_accessible_update_relation (accessible,
@@ -720,13 +851,17 @@ func (x *Leaflet) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.Acce
720 851
721 }852 }
722 853
723-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]854+// Updates a list of accessible states.
724-// documentation for the value types of accessible states.
725 //855 //
726-// This function should be called by `GtkWidget` types whenever an accessible856+// See the [enum@Gtk.AccessibleState] documentation for the
727-// state change must be communicated to assistive technologies.857+// value types of accessible states.
858+//
859+// This function should be called by `GtkWidget` types whenever
860+// an accessible state change must be communicated to assistive
861+// technologies.
728 //862 //
729 // Example:863 // Example:
864+//
730 // ```c865 // ```c
731 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;866 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
732 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),867 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -756,7 +891,7 @@ func (x *Leaflet) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleSta
756 // Gets the ID of the @buildable object.891 // Gets the ID of the @buildable object.
757 //892 //
758 // `GtkBuilder` sets the name based on the ID attribute893 // `GtkBuilder` sets the name based on the ID attribute
759-// of the <object> tag used to construct the @buildable.894+// of the `<object>` tag used to construct the @buildable.
760 func (x *Leaflet) GetBuildableId() string {895 func (x *Leaflet) GetBuildableId() string {
761 896
762 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())897 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-message-dialog.go +151 -13
@@ -536,10 +536,13 @@ var xMessageDialogSetDefaultResponse func(uintptr, string)
536 536
537 // Sets the ID of the default response of @self.537 // Sets the ID of the default response of @self.
538 //538 //
539-// If set, pressing <kbd>Enter</kbd> will activate the corresponding button.539+// The button corresponding to this response will be set as the default widget
540+// of @self.
540 //541 //
541-// If set to `NULL` or to a non-existent response ID, pressing <kbd>Enter</kbd>542+// If not set, the default widget will not be set, and the last added response
542-// will do nothing.543+// will be focused by default.
544+//
545+// See [property@Gtk.Window:default-widget].
543 func (x *MessageDialog) SetDefaultResponse(ResponseVar string) {546 func (x *MessageDialog) SetDefaultResponse(ResponseVar string) {
544 547
545 xMessageDialogSetDefaultResponse(x.GoPointer(), ResponseVar)548 xMessageDialogSetDefaultResponse(x.GoPointer(), ResponseVar)
@@ -672,34 +675,165 @@ func (x *MessageDialog) ConnectResponse(cb *func(MessageDialog, string)) uint32
672 return gobject.SignalConnect(x.GoPointer(), "response", cbRefPtr)675 return gobject.SignalConnect(x.GoPointer(), "response", cbRefPtr)
673 }676 }
674 677
675-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.678+// Requests the user's screen reader to announce the given message.
679+//
680+// This kind of notification is useful for messages that
681+// either have only a visual representation or that are not
682+// exposed visually at all, e.g. a notification about a
683+// successful operation.
684+//
685+// Also, by using this API, you can ensure that the message
686+// does not interrupts the user's current screen reader output.
687+func (x *MessageDialog) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
688+
689+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
690+
691+}
692+
693+// Retrieves the accessible parent for an accessible object.
694+//
695+// This function returns `NULL` for top level widgets.
696+func (x *MessageDialog) GetAccessibleParent() *gtk.AccessibleBase {
697+ var cls *gtk.AccessibleBase
698+
699+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
700+
701+ if cret == 0 {
702+ return nil
703+ }
704+ cls = &gtk.AccessibleBase{}
705+ cls.Ptr = cret
706+ return cls
707+}
708+
709+// Retrieves the accessible role of an accessible object.
676 func (x *MessageDialog) GetAccessibleRole() gtk.AccessibleRole {710 func (x *MessageDialog) GetAccessibleRole() gtk.AccessibleRole {
677 711
678 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())712 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
679 return cret713 return cret
680 }714 }
681 715
682-// Resets the accessible @property to its default value.716+// Retrieves the implementation for the given accessible object.
717+func (x *MessageDialog) GetAtContext() *gtk.ATContext {
718+ var cls *gtk.ATContext
719+
720+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
721+
722+ if cret == 0 {
723+ return nil
724+ }
725+ cls = &gtk.ATContext{}
726+ cls.Ptr = cret
727+ return cls
728+}
729+
730+// Queries the coordinates and dimensions of this accessible
731+//
732+// This functionality can be overridden by `GtkAccessible`
733+// implementations, e.g. to get the bounds from an ignored
734+// child widget.
735+func (x *MessageDialog) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
736+
737+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
738+ return cret
739+}
740+
741+// Retrieves the first accessible child of an accessible object.
742+func (x *MessageDialog) GetFirstAccessibleChild() *gtk.AccessibleBase {
743+ var cls *gtk.AccessibleBase
744+
745+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
746+
747+ if cret == 0 {
748+ return nil
749+ }
750+ cls = &gtk.AccessibleBase{}
751+ cls.Ptr = cret
752+ return cls
753+}
754+
755+// Retrieves the next accessible sibling of an accessible object
756+func (x *MessageDialog) GetNextAccessibleSibling() *gtk.AccessibleBase {
757+ var cls *gtk.AccessibleBase
758+
759+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
760+
761+ if cret == 0 {
762+ return nil
763+ }
764+ cls = &gtk.AccessibleBase{}
765+ cls.Ptr = cret
766+ return cls
767+}
768+
769+// Queries a platform state, such as focus.
770+//
771+// This functionality can be overridden by `GtkAccessible`
772+// implementations, e.g. to get platform state from an ignored
773+// child widget, as is the case for `GtkText` wrappers.
774+func (x *MessageDialog) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
775+
776+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
777+ return cret
778+}
779+
780+// Resets the accessible property to its default value.
683 func (x *MessageDialog) ResetProperty(PropertyVar gtk.AccessibleProperty) {781 func (x *MessageDialog) ResetProperty(PropertyVar gtk.AccessibleProperty) {
684 782
685 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)783 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
686 784
687 }785 }
688 786
689-// Resets the accessible @relation to its default value.787+// Resets the accessible relation to its default value.
690 func (x *MessageDialog) ResetRelation(RelationVar gtk.AccessibleRelation) {788 func (x *MessageDialog) ResetRelation(RelationVar gtk.AccessibleRelation) {
691 789
692 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)790 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
693 791
694 }792 }
695 793
696-// Resets the accessible @state to its default value.794+// Resets the accessible state to its default value.
697 func (x *MessageDialog) ResetState(StateVar gtk.AccessibleState) {795 func (x *MessageDialog) ResetState(StateVar gtk.AccessibleState) {
698 796
699 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)797 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
700 798
701 }799 }
702 800
801+// Sets the parent and sibling of an accessible object.
802+//
803+// This function is meant to be used by accessible implementations that are
804+// not part of the widget hierarchy, and but act as a logical bridge between
805+// widgets. For instance, if a widget creates an object that holds metadata
806+// for each child, and you want that object to implement the `GtkAccessible`
807+// interface, you will use this function to ensure that the parent of each
808+// child widget is the metadata object, and the parent of each metadata
809+// object is the container widget.
810+func (x *MessageDialog) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
811+
812+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
813+
814+}
815+
816+// Updates the next accessible sibling.
817+//
818+// That might be useful when a new child of a custom accessible
819+// is created, and it needs to be linked to a previous child.
820+func (x *MessageDialog) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
821+
822+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
823+
824+}
825+
826+// Informs ATs that the platform state has changed.
827+//
828+// This function should be used by `GtkAccessible` implementations that
829+// have a platform state but are not widgets. Widgets handle platform
830+// states automatically.
831+func (x *MessageDialog) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
832+
833+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
834+
835+}
836+
703 // Updates a list of accessible properties.837 // Updates a list of accessible properties.
704 //838 //
705 // See the [enum@Gtk.AccessibleProperty] documentation for the839 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -742,7 +876,7 @@ func (x *MessageDialog) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []
742 // relation change must be communicated to assistive technologies.876 // relation change must be communicated to assistive technologies.
743 //877 //
744 // If the [enum@Gtk.AccessibleRelation] requires a list of references,878 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
745-// you should pass each reference individually, followed by %NULL, e.g.879+// you should pass each reference individually, followed by `NULL`, e.g.
746 //880 //
747 // ```c881 // ```c
748 // gtk_accessible_update_relation (accessible,882 // gtk_accessible_update_relation (accessible,
@@ -772,13 +906,17 @@ func (x *MessageDialog) UpdateRelationValue(NRelationsVar int, RelationsVar []gt
772 906
773 }907 }
774 908
775-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]909+// Updates a list of accessible states.
776-// documentation for the value types of accessible states.
777 //910 //
778-// This function should be called by `GtkWidget` types whenever an accessible911+// See the [enum@Gtk.AccessibleState] documentation for the
779-// state change must be communicated to assistive technologies.912+// value types of accessible states.
913+//
914+// This function should be called by `GtkWidget` types whenever
915+// an accessible state change must be communicated to assistive
916+// technologies.
780 //917 //
781 // Example:918 // Example:
919+//
782 // ```c920 // ```c
783 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;921 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
784 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),922 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -808,7 +946,7 @@ func (x *MessageDialog) UpdateStateValue(NStatesVar int, StatesVar []gtk.Accessi
808 // Gets the ID of the @buildable object.946 // Gets the ID of the @buildable object.
809 //947 //
810 // `GtkBuilder` sets the name based on the ID attribute948 // `GtkBuilder` sets the name based on the ID attribute
811-// of the <object> tag used to construct the @buildable.949+// of the `<object>` tag used to construct the @buildable.
812 func (x *MessageDialog) GetBuildableId() string {950 func (x *MessageDialog) GetBuildableId() string {
813 951
814 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())952 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-multi-layout-view.go +145 -10
@@ -259,34 +259,165 @@ func (c *MultiLayoutView) SetGoPointer(ptr uintptr) {
259 c.Ptr = ptr259 c.Ptr = ptr
260 }260 }
261 261
262-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.262+// Requests the user's screen reader to announce the given message.
263+//
264+// This kind of notification is useful for messages that
265+// either have only a visual representation or that are not
266+// exposed visually at all, e.g. a notification about a
267+// successful operation.
268+//
269+// Also, by using this API, you can ensure that the message
270+// does not interrupts the user's current screen reader output.
271+func (x *MultiLayoutView) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
272+
273+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
274+
275+}
276+
277+// Retrieves the accessible parent for an accessible object.
278+//
279+// This function returns `NULL` for top level widgets.
280+func (x *MultiLayoutView) GetAccessibleParent() *gtk.AccessibleBase {
281+ var cls *gtk.AccessibleBase
282+
283+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
284+
285+ if cret == 0 {
286+ return nil
287+ }
288+ cls = &gtk.AccessibleBase{}
289+ cls.Ptr = cret
290+ return cls
291+}
292+
293+// Retrieves the accessible role of an accessible object.
263 func (x *MultiLayoutView) GetAccessibleRole() gtk.AccessibleRole {294 func (x *MultiLayoutView) GetAccessibleRole() gtk.AccessibleRole {
264 295
265 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())296 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
266 return cret297 return cret
267 }298 }
268 299
269-// Resets the accessible @property to its default value.300+// Retrieves the implementation for the given accessible object.
301+func (x *MultiLayoutView) GetAtContext() *gtk.ATContext {
302+ var cls *gtk.ATContext
303+
304+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
305+
306+ if cret == 0 {
307+ return nil
308+ }
309+ cls = &gtk.ATContext{}
310+ cls.Ptr = cret
311+ return cls
312+}
313+
314+// Queries the coordinates and dimensions of this accessible
315+//
316+// This functionality can be overridden by `GtkAccessible`
317+// implementations, e.g. to get the bounds from an ignored
318+// child widget.
319+func (x *MultiLayoutView) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
320+
321+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
322+ return cret
323+}
324+
325+// Retrieves the first accessible child of an accessible object.
326+func (x *MultiLayoutView) GetFirstAccessibleChild() *gtk.AccessibleBase {
327+ var cls *gtk.AccessibleBase
328+
329+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
330+
331+ if cret == 0 {
332+ return nil
333+ }
334+ cls = &gtk.AccessibleBase{}
335+ cls.Ptr = cret
336+ return cls
337+}
338+
339+// Retrieves the next accessible sibling of an accessible object
340+func (x *MultiLayoutView) GetNextAccessibleSibling() *gtk.AccessibleBase {
341+ var cls *gtk.AccessibleBase
342+
343+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
344+
345+ if cret == 0 {
346+ return nil
347+ }
348+ cls = &gtk.AccessibleBase{}
349+ cls.Ptr = cret
350+ return cls
351+}
352+
353+// Queries a platform state, such as focus.
354+//
355+// This functionality can be overridden by `GtkAccessible`
356+// implementations, e.g. to get platform state from an ignored
357+// child widget, as is the case for `GtkText` wrappers.
358+func (x *MultiLayoutView) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
359+
360+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
361+ return cret
362+}
363+
364+// Resets the accessible property to its default value.
270 func (x *MultiLayoutView) ResetProperty(PropertyVar gtk.AccessibleProperty) {365 func (x *MultiLayoutView) ResetProperty(PropertyVar gtk.AccessibleProperty) {
271 366
272 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)367 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
273 368
274 }369 }
275 370
276-// Resets the accessible @relation to its default value.371+// Resets the accessible relation to its default value.
277 func (x *MultiLayoutView) ResetRelation(RelationVar gtk.AccessibleRelation) {372 func (x *MultiLayoutView) ResetRelation(RelationVar gtk.AccessibleRelation) {
278 373
279 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)374 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
280 375
281 }376 }
282 377
283-// Resets the accessible @state to its default value.378+// Resets the accessible state to its default value.
284 func (x *MultiLayoutView) ResetState(StateVar gtk.AccessibleState) {379 func (x *MultiLayoutView) ResetState(StateVar gtk.AccessibleState) {
285 380
286 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)381 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
287 382
288 }383 }
289 384
385+// Sets the parent and sibling of an accessible object.
386+//
387+// This function is meant to be used by accessible implementations that are
388+// not part of the widget hierarchy, and but act as a logical bridge between
389+// widgets. For instance, if a widget creates an object that holds metadata
390+// for each child, and you want that object to implement the `GtkAccessible`
391+// interface, you will use this function to ensure that the parent of each
392+// child widget is the metadata object, and the parent of each metadata
393+// object is the container widget.
394+func (x *MultiLayoutView) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
395+
396+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
397+
398+}
399+
400+// Updates the next accessible sibling.
401+//
402+// That might be useful when a new child of a custom accessible
403+// is created, and it needs to be linked to a previous child.
404+func (x *MultiLayoutView) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
405+
406+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
407+
408+}
409+
410+// Informs ATs that the platform state has changed.
411+//
412+// This function should be used by `GtkAccessible` implementations that
413+// have a platform state but are not widgets. Widgets handle platform
414+// states automatically.
415+func (x *MultiLayoutView) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
416+
417+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
418+
419+}
420+
290 // Updates a list of accessible properties.421 // Updates a list of accessible properties.
291 //422 //
292 // See the [enum@Gtk.AccessibleProperty] documentation for the423 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -329,7 +460,7 @@ func (x *MultiLayoutView) UpdatePropertyValue(NPropertiesVar int, PropertiesVar
329 // relation change must be communicated to assistive technologies.460 // relation change must be communicated to assistive technologies.
330 //461 //
331 // If the [enum@Gtk.AccessibleRelation] requires a list of references,462 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
332-// you should pass each reference individually, followed by %NULL, e.g.463+// you should pass each reference individually, followed by `NULL`, e.g.
333 //464 //
334 // ```c465 // ```c
335 // gtk_accessible_update_relation (accessible,466 // gtk_accessible_update_relation (accessible,
@@ -359,13 +490,17 @@ func (x *MultiLayoutView) UpdateRelationValue(NRelationsVar int, RelationsVar []
359 490
360 }491 }
361 492
362-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]493+// Updates a list of accessible states.
363-// documentation for the value types of accessible states.
364 //494 //
365-// This function should be called by `GtkWidget` types whenever an accessible495+// See the [enum@Gtk.AccessibleState] documentation for the
366-// state change must be communicated to assistive technologies.496+// value types of accessible states.
497+//
498+// This function should be called by `GtkWidget` types whenever
499+// an accessible state change must be communicated to assistive
500+// technologies.
367 //501 //
368 // Example:502 // Example:
503+//
369 // ```c504 // ```c
370 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;505 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
371 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),506 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -395,7 +530,7 @@ func (x *MultiLayoutView) UpdateStateValue(NStatesVar int, StatesVar []gtk.Acces
395 // Gets the ID of the @buildable object.530 // Gets the ID of the @buildable object.
396 //531 //
397 // `GtkBuilder` sets the name based on the ID attribute532 // `GtkBuilder` sets the name based on the ID attribute
398-// of the <object> tag used to construct the @buildable.533+// of the `<object>` tag used to construct the @buildable.
399 func (x *MultiLayoutView) GetBuildableId() string {534 func (x *MultiLayoutView) GetBuildableId() string {
400 535
401 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())536 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-navigation-split-view.go +171 -10
@@ -269,6 +269,15 @@ func (x *NavigationSplitView) GetSidebar() *NavigationPage {
269 return cls269 return cls
270 }270 }
271 271
272+var xNavigationSplitViewGetSidebarPosition func(uintptr) gtk.PackType
273+
274+// Gets the sidebar position for @self.
275+func (x *NavigationSplitView) GetSidebarPosition() gtk.PackType {
276+
277+ cret := xNavigationSplitViewGetSidebarPosition(x.GoPointer())
278+ return cret
279+}
280+
272 var xNavigationSplitViewGetSidebarWidthFraction func(uintptr) float64281 var xNavigationSplitViewGetSidebarWidthFraction func(uintptr) float64
273 282
274 // Gets the preferred sidebar width fraction for @self.283 // Gets the preferred sidebar width fraction for @self.
@@ -365,6 +374,21 @@ func (x *NavigationSplitView) SetSidebar(SidebarVar *NavigationPage) {
365 374
366 }375 }
367 376
377+var xNavigationSplitViewSetSidebarPosition func(uintptr, gtk.PackType)
378+
379+// Sets the sidebar position for @self.
380+//
381+// If set to `GTK_PACK_START`, the sidebar is displayed before the content,
382+// and the sidebar will be the root page when collapsed.
383+//
384+// If set to `GTK_PACK_END`, the sidebar is displayed after the content,
385+// and the content will be the root page.
386+func (x *NavigationSplitView) SetSidebarPosition(PositionVar gtk.PackType) {
387+
388+ xNavigationSplitViewSetSidebarPosition(x.GoPointer(), PositionVar)
389+
390+}
391+
368 var xNavigationSplitViewSetSidebarWidthFraction func(uintptr, float64)392 var xNavigationSplitViewSetSidebarWidthFraction func(uintptr, float64)
369 393
370 // Sets the preferred sidebar width as a fraction of the total width of @self.394 // Sets the preferred sidebar width as a fraction of the total width of @self.
@@ -404,34 +428,165 @@ func (c *NavigationSplitView) SetGoPointer(ptr uintptr) {
404 c.Ptr = ptr428 c.Ptr = ptr
405 }429 }
406 430
407-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.431+// Requests the user's screen reader to announce the given message.
432+//
433+// This kind of notification is useful for messages that
434+// either have only a visual representation or that are not
435+// exposed visually at all, e.g. a notification about a
436+// successful operation.
437+//
438+// Also, by using this API, you can ensure that the message
439+// does not interrupts the user's current screen reader output.
440+func (x *NavigationSplitView) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
441+
442+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
443+
444+}
445+
446+// Retrieves the accessible parent for an accessible object.
447+//
448+// This function returns `NULL` for top level widgets.
449+func (x *NavigationSplitView) GetAccessibleParent() *gtk.AccessibleBase {
450+ var cls *gtk.AccessibleBase
451+
452+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
453+
454+ if cret == 0 {
455+ return nil
456+ }
457+ cls = &gtk.AccessibleBase{}
458+ cls.Ptr = cret
459+ return cls
460+}
461+
462+// Retrieves the accessible role of an accessible object.
408 func (x *NavigationSplitView) GetAccessibleRole() gtk.AccessibleRole {463 func (x *NavigationSplitView) GetAccessibleRole() gtk.AccessibleRole {
409 464
410 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())465 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
411 return cret466 return cret
412 }467 }
413 468
414-// Resets the accessible @property to its default value.469+// Retrieves the implementation for the given accessible object.
470+func (x *NavigationSplitView) GetAtContext() *gtk.ATContext {
471+ var cls *gtk.ATContext
472+
473+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
474+
475+ if cret == 0 {
476+ return nil
477+ }
478+ cls = &gtk.ATContext{}
479+ cls.Ptr = cret
480+ return cls
481+}
482+
483+// Queries the coordinates and dimensions of this accessible
484+//
485+// This functionality can be overridden by `GtkAccessible`
486+// implementations, e.g. to get the bounds from an ignored
487+// child widget.
488+func (x *NavigationSplitView) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
489+
490+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
491+ return cret
492+}
493+
494+// Retrieves the first accessible child of an accessible object.
495+func (x *NavigationSplitView) GetFirstAccessibleChild() *gtk.AccessibleBase {
496+ var cls *gtk.AccessibleBase
497+
498+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
499+
500+ if cret == 0 {
501+ return nil
502+ }
503+ cls = &gtk.AccessibleBase{}
504+ cls.Ptr = cret
505+ return cls
506+}
507+
508+// Retrieves the next accessible sibling of an accessible object
509+func (x *NavigationSplitView) GetNextAccessibleSibling() *gtk.AccessibleBase {
510+ var cls *gtk.AccessibleBase
511+
512+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
513+
514+ if cret == 0 {
515+ return nil
516+ }
517+ cls = &gtk.AccessibleBase{}
518+ cls.Ptr = cret
519+ return cls
520+}
521+
522+// Queries a platform state, such as focus.
523+//
524+// This functionality can be overridden by `GtkAccessible`
525+// implementations, e.g. to get platform state from an ignored
526+// child widget, as is the case for `GtkText` wrappers.
527+func (x *NavigationSplitView) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
528+
529+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
530+ return cret
531+}
532+
533+// Resets the accessible property to its default value.
415 func (x *NavigationSplitView) ResetProperty(PropertyVar gtk.AccessibleProperty) {534 func (x *NavigationSplitView) ResetProperty(PropertyVar gtk.AccessibleProperty) {
416 535
417 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)536 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
418 537
419 }538 }
420 539
421-// Resets the accessible @relation to its default value.540+// Resets the accessible relation to its default value.
422 func (x *NavigationSplitView) ResetRelation(RelationVar gtk.AccessibleRelation) {541 func (x *NavigationSplitView) ResetRelation(RelationVar gtk.AccessibleRelation) {
423 542
424 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)543 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
425 544
426 }545 }
427 546
428-// Resets the accessible @state to its default value.547+// Resets the accessible state to its default value.
429 func (x *NavigationSplitView) ResetState(StateVar gtk.AccessibleState) {548 func (x *NavigationSplitView) ResetState(StateVar gtk.AccessibleState) {
430 549
431 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)550 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
432 551
433 }552 }
434 553
554+// Sets the parent and sibling of an accessible object.
555+//
556+// This function is meant to be used by accessible implementations that are
557+// not part of the widget hierarchy, and but act as a logical bridge between
558+// widgets. For instance, if a widget creates an object that holds metadata
559+// for each child, and you want that object to implement the `GtkAccessible`
560+// interface, you will use this function to ensure that the parent of each
561+// child widget is the metadata object, and the parent of each metadata
562+// object is the container widget.
563+func (x *NavigationSplitView) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
564+
565+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
566+
567+}
568+
569+// Updates the next accessible sibling.
570+//
571+// That might be useful when a new child of a custom accessible
572+// is created, and it needs to be linked to a previous child.
573+func (x *NavigationSplitView) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
574+
575+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
576+
577+}
578+
579+// Informs ATs that the platform state has changed.
580+//
581+// This function should be used by `GtkAccessible` implementations that
582+// have a platform state but are not widgets. Widgets handle platform
583+// states automatically.
584+func (x *NavigationSplitView) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
585+
586+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
587+
588+}
589+
435 // Updates a list of accessible properties.590 // Updates a list of accessible properties.
436 //591 //
437 // See the [enum@Gtk.AccessibleProperty] documentation for the592 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -474,7 +629,7 @@ func (x *NavigationSplitView) UpdatePropertyValue(NPropertiesVar int, Properties
474 // relation change must be communicated to assistive technologies.629 // relation change must be communicated to assistive technologies.
475 //630 //
476 // If the [enum@Gtk.AccessibleRelation] requires a list of references,631 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
477-// you should pass each reference individually, followed by %NULL, e.g.632+// you should pass each reference individually, followed by `NULL`, e.g.
478 //633 //
479 // ```c634 // ```c
480 // gtk_accessible_update_relation (accessible,635 // gtk_accessible_update_relation (accessible,
@@ -504,13 +659,17 @@ func (x *NavigationSplitView) UpdateRelationValue(NRelationsVar int, RelationsVa
504 659
505 }660 }
506 661
507-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]662+// Updates a list of accessible states.
508-// documentation for the value types of accessible states.
509 //663 //
510-// This function should be called by `GtkWidget` types whenever an accessible664+// See the [enum@Gtk.AccessibleState] documentation for the
511-// state change must be communicated to assistive technologies.665+// value types of accessible states.
666+//
667+// This function should be called by `GtkWidget` types whenever
668+// an accessible state change must be communicated to assistive
669+// technologies.
512 //670 //
513 // Example:671 // Example:
672+//
514 // ```c673 // ```c
515 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;674 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
516 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),675 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -540,7 +699,7 @@ func (x *NavigationSplitView) UpdateStateValue(NStatesVar int, StatesVar []gtk.A
540 // Gets the ID of the @buildable object.699 // Gets the ID of the @buildable object.
541 //700 //
542 // `GtkBuilder` sets the name based on the ID attribute701 // `GtkBuilder` sets the name based on the ID attribute
543-// of the <object> tag used to construct the @buildable.702+// of the `<object>` tag used to construct the @buildable.
544 func (x *NavigationSplitView) GetBuildableId() string {703 func (x *NavigationSplitView) GetBuildableId() string {
545 704
546 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())705 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
@@ -565,6 +724,7 @@ func init() {
565 core.PuregoSafeRegister(&xNavigationSplitViewGetMinSidebarWidth, lib, "adw_navigation_split_view_get_min_sidebar_width")724 core.PuregoSafeRegister(&xNavigationSplitViewGetMinSidebarWidth, lib, "adw_navigation_split_view_get_min_sidebar_width")
566 core.PuregoSafeRegister(&xNavigationSplitViewGetShowContent, lib, "adw_navigation_split_view_get_show_content")725 core.PuregoSafeRegister(&xNavigationSplitViewGetShowContent, lib, "adw_navigation_split_view_get_show_content")
567 core.PuregoSafeRegister(&xNavigationSplitViewGetSidebar, lib, "adw_navigation_split_view_get_sidebar")726 core.PuregoSafeRegister(&xNavigationSplitViewGetSidebar, lib, "adw_navigation_split_view_get_sidebar")
727+ core.PuregoSafeRegister(&xNavigationSplitViewGetSidebarPosition, lib, "adw_navigation_split_view_get_sidebar_position")
568 core.PuregoSafeRegister(&xNavigationSplitViewGetSidebarWidthFraction, lib, "adw_navigation_split_view_get_sidebar_width_fraction")728 core.PuregoSafeRegister(&xNavigationSplitViewGetSidebarWidthFraction, lib, "adw_navigation_split_view_get_sidebar_width_fraction")
569 core.PuregoSafeRegister(&xNavigationSplitViewGetSidebarWidthUnit, lib, "adw_navigation_split_view_get_sidebar_width_unit")729 core.PuregoSafeRegister(&xNavigationSplitViewGetSidebarWidthUnit, lib, "adw_navigation_split_view_get_sidebar_width_unit")
570 core.PuregoSafeRegister(&xNavigationSplitViewSetCollapsed, lib, "adw_navigation_split_view_set_collapsed")730 core.PuregoSafeRegister(&xNavigationSplitViewSetCollapsed, lib, "adw_navigation_split_view_set_collapsed")
@@ -573,6 +733,7 @@ func init() {
573 core.PuregoSafeRegister(&xNavigationSplitViewSetMinSidebarWidth, lib, "adw_navigation_split_view_set_min_sidebar_width")733 core.PuregoSafeRegister(&xNavigationSplitViewSetMinSidebarWidth, lib, "adw_navigation_split_view_set_min_sidebar_width")
574 core.PuregoSafeRegister(&xNavigationSplitViewSetShowContent, lib, "adw_navigation_split_view_set_show_content")734 core.PuregoSafeRegister(&xNavigationSplitViewSetShowContent, lib, "adw_navigation_split_view_set_show_content")
575 core.PuregoSafeRegister(&xNavigationSplitViewSetSidebar, lib, "adw_navigation_split_view_set_sidebar")735 core.PuregoSafeRegister(&xNavigationSplitViewSetSidebar, lib, "adw_navigation_split_view_set_sidebar")
736+ core.PuregoSafeRegister(&xNavigationSplitViewSetSidebarPosition, lib, "adw_navigation_split_view_set_sidebar_position")
576 core.PuregoSafeRegister(&xNavigationSplitViewSetSidebarWidthFraction, lib, "adw_navigation_split_view_set_sidebar_width_fraction")737 core.PuregoSafeRegister(&xNavigationSplitViewSetSidebarWidthFraction, lib, "adw_navigation_split_view_set_sidebar_width_fraction")
577 core.PuregoSafeRegister(&xNavigationSplitViewSetSidebarWidthUnit, lib, "adw_navigation_split_view_set_sidebar_width_unit")738 core.PuregoSafeRegister(&xNavigationSplitViewSetSidebarWidthUnit, lib, "adw_navigation_split_view_set_sidebar_width_unit")
578 739
M v4/adw/adw-navigation-view.go +351 -20
@@ -421,34 +421,165 @@ func (x *NavigationPage) ConnectShown(cb *func(NavigationPage)) uint32 {
421 return gobject.SignalConnect(x.GoPointer(), "shown", cbRefPtr)421 return gobject.SignalConnect(x.GoPointer(), "shown", cbRefPtr)
422 }422 }
423 423
424-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.424+// Requests the user's screen reader to announce the given message.
425+//
426+// This kind of notification is useful for messages that
427+// either have only a visual representation or that are not
428+// exposed visually at all, e.g. a notification about a
429+// successful operation.
430+//
431+// Also, by using this API, you can ensure that the message
432+// does not interrupts the user's current screen reader output.
433+func (x *NavigationPage) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
434+
435+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
436+
437+}
438+
439+// Retrieves the accessible parent for an accessible object.
440+//
441+// This function returns `NULL` for top level widgets.
442+func (x *NavigationPage) GetAccessibleParent() *gtk.AccessibleBase {
443+ var cls *gtk.AccessibleBase
444+
445+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
446+
447+ if cret == 0 {
448+ return nil
449+ }
450+ cls = &gtk.AccessibleBase{}
451+ cls.Ptr = cret
452+ return cls
453+}
454+
455+// Retrieves the accessible role of an accessible object.
425 func (x *NavigationPage) GetAccessibleRole() gtk.AccessibleRole {456 func (x *NavigationPage) GetAccessibleRole() gtk.AccessibleRole {
426 457
427 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())458 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
428 return cret459 return cret
429 }460 }
430 461
431-// Resets the accessible @property to its default value.462+// Retrieves the implementation for the given accessible object.
463+func (x *NavigationPage) GetAtContext() *gtk.ATContext {
464+ var cls *gtk.ATContext
465+
466+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
467+
468+ if cret == 0 {
469+ return nil
470+ }
471+ cls = &gtk.ATContext{}
472+ cls.Ptr = cret
473+ return cls
474+}
475+
476+// Queries the coordinates and dimensions of this accessible
477+//
478+// This functionality can be overridden by `GtkAccessible`
479+// implementations, e.g. to get the bounds from an ignored
480+// child widget.
481+func (x *NavigationPage) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
482+
483+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
484+ return cret
485+}
486+
487+// Retrieves the first accessible child of an accessible object.
488+func (x *NavigationPage) GetFirstAccessibleChild() *gtk.AccessibleBase {
489+ var cls *gtk.AccessibleBase
490+
491+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
492+
493+ if cret == 0 {
494+ return nil
495+ }
496+ cls = &gtk.AccessibleBase{}
497+ cls.Ptr = cret
498+ return cls
499+}
500+
501+// Retrieves the next accessible sibling of an accessible object
502+func (x *NavigationPage) GetNextAccessibleSibling() *gtk.AccessibleBase {
503+ var cls *gtk.AccessibleBase
504+
505+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
506+
507+ if cret == 0 {
508+ return nil
509+ }
510+ cls = &gtk.AccessibleBase{}
511+ cls.Ptr = cret
512+ return cls
513+}
514+
515+// Queries a platform state, such as focus.
516+//
517+// This functionality can be overridden by `GtkAccessible`
518+// implementations, e.g. to get platform state from an ignored
519+// child widget, as is the case for `GtkText` wrappers.
520+func (x *NavigationPage) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
521+
522+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
523+ return cret
524+}
525+
526+// Resets the accessible property to its default value.
432 func (x *NavigationPage) ResetProperty(PropertyVar gtk.AccessibleProperty) {527 func (x *NavigationPage) ResetProperty(PropertyVar gtk.AccessibleProperty) {
433 528
434 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)529 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
435 530
436 }531 }
437 532
438-// Resets the accessible @relation to its default value.533+// Resets the accessible relation to its default value.
439 func (x *NavigationPage) ResetRelation(RelationVar gtk.AccessibleRelation) {534 func (x *NavigationPage) ResetRelation(RelationVar gtk.AccessibleRelation) {
440 535
441 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)536 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
442 537
443 }538 }
444 539
445-// Resets the accessible @state to its default value.540+// Resets the accessible state to its default value.
446 func (x *NavigationPage) ResetState(StateVar gtk.AccessibleState) {541 func (x *NavigationPage) ResetState(StateVar gtk.AccessibleState) {
447 542
448 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)543 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
449 544
450 }545 }
451 546
547+// Sets the parent and sibling of an accessible object.
548+//
549+// This function is meant to be used by accessible implementations that are
550+// not part of the widget hierarchy, and but act as a logical bridge between
551+// widgets. For instance, if a widget creates an object that holds metadata
552+// for each child, and you want that object to implement the `GtkAccessible`
553+// interface, you will use this function to ensure that the parent of each
554+// child widget is the metadata object, and the parent of each metadata
555+// object is the container widget.
556+func (x *NavigationPage) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
557+
558+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
559+
560+}
561+
562+// Updates the next accessible sibling.
563+//
564+// That might be useful when a new child of a custom accessible
565+// is created, and it needs to be linked to a previous child.
566+func (x *NavigationPage) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
567+
568+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
569+
570+}
571+
572+// Informs ATs that the platform state has changed.
573+//
574+// This function should be used by `GtkAccessible` implementations that
575+// have a platform state but are not widgets. Widgets handle platform
576+// states automatically.
577+func (x *NavigationPage) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
578+
579+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
580+
581+}
582+
452 // Updates a list of accessible properties.583 // Updates a list of accessible properties.
453 //584 //
454 // See the [enum@Gtk.AccessibleProperty] documentation for the585 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -491,7 +622,7 @@ func (x *NavigationPage) UpdatePropertyValue(NPropertiesVar int, PropertiesVar [
491 // relation change must be communicated to assistive technologies.622 // relation change must be communicated to assistive technologies.
492 //623 //
493 // If the [enum@Gtk.AccessibleRelation] requires a list of references,624 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
494-// you should pass each reference individually, followed by %NULL, e.g.625+// you should pass each reference individually, followed by `NULL`, e.g.
495 //626 //
496 // ```c627 // ```c
497 // gtk_accessible_update_relation (accessible,628 // gtk_accessible_update_relation (accessible,
@@ -521,13 +652,17 @@ func (x *NavigationPage) UpdateRelationValue(NRelationsVar int, RelationsVar []g
521 652
522 }653 }
523 654
524-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]655+// Updates a list of accessible states.
525-// documentation for the value types of accessible states.
526 //656 //
527-// This function should be called by `GtkWidget` types whenever an accessible657+// See the [enum@Gtk.AccessibleState] documentation for the
528-// state change must be communicated to assistive technologies.658+// value types of accessible states.
659+//
660+// This function should be called by `GtkWidget` types whenever
661+// an accessible state change must be communicated to assistive
662+// technologies.
529 //663 //
530 // Example:664 // Example:
665+//
531 // ```c666 // ```c
532 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;667 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
533 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),668 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -557,7 +692,7 @@ func (x *NavigationPage) UpdateStateValue(NStatesVar int, StatesVar []gtk.Access
557 // Gets the ID of the @buildable object.692 // Gets the ID of the @buildable object.
558 //693 //
559 // `GtkBuilder` sets the name based on the ID attribute694 // `GtkBuilder` sets the name based on the ID attribute
560-// of the <object> tag used to construct the @buildable.695+// of the `<object>` tag used to construct the @buildable.
561 func (x *NavigationPage) GetBuildableId() string {696 func (x *NavigationPage) GetBuildableId() string {
562 697
563 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())698 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
@@ -805,6 +940,15 @@ func (x *NavigationView) GetAnimateTransitions() bool {
805 return cret940 return cret
806 }941 }
807 942
943+var xNavigationViewGetHhomogeneous func(uintptr) bool
944+
945+// Gets whether @self is horizontally homogeneous.
946+func (x *NavigationView) GetHhomogeneous() bool {
947+
948+ cret := xNavigationViewGetHhomogeneous(x.GoPointer())
949+ return cret
950+}
951+
808 var xNavigationViewGetNavigationStack func(uintptr) uintptr952 var xNavigationViewGetNavigationStack func(uintptr) uintptr
809 953
810 // Returns a [iface@Gio.ListModel] that contains the pages in navigation stack.954 // Returns a [iface@Gio.ListModel] that contains the pages in navigation stack.
@@ -856,6 +1000,15 @@ func (x *NavigationView) GetPreviousPage(PageVar *NavigationPage) *NavigationPag
856 return cls1000 return cls
857 }1001 }
858 1002
1003+var xNavigationViewGetVhomogeneous func(uintptr) bool
1004+
1005+// Gets whether @self is vertically homogeneous.
1006+func (x *NavigationView) GetVhomogeneous() bool {
1007+
1008+ cret := xNavigationViewGetVhomogeneous(x.GoPointer())
1009+ return cret
1010+}
1011+
859 var xNavigationViewGetVisiblePage func(uintptr) uintptr1012 var xNavigationViewGetVisiblePage func(uintptr) uintptr
860 1013
861 // Gets the currently visible page in @self.1014 // Gets the currently visible page in @self.
@@ -873,6 +1026,15 @@ func (x *NavigationView) GetVisiblePage() *NavigationPage {
873 return cls1026 return cls
874 }1027 }
875 1028
1029+var xNavigationViewGetVisiblePageTag func(uintptr) string
1030+
1031+// Gets the tag of the currently visible page in @self.
1032+func (x *NavigationView) GetVisiblePageTag() string {
1033+
1034+ cret := xNavigationViewGetVisiblePageTag(x.GoPointer())
1035+ return cret
1036+}
1037+
876 var xNavigationViewPop func(uintptr) bool1038 var xNavigationViewPop func(uintptr) bool
877 1039
878 // Pops the visible page from the navigation stack.1040 // Pops the visible page from the navigation stack.
@@ -1032,6 +1194,20 @@ func (x *NavigationView) SetAnimateTransitions(AnimateTransitionsVar bool) {
1032 1194
1033 }1195 }
1034 1196
1197+var xNavigationViewSetHhomogeneous func(uintptr, bool)
1198+
1199+// Sets @self to be horizontally homogeneous or not.
1200+//
1201+// If the view is horizontally homogeneous, it allocates the same width for
1202+// all pages.
1203+//
1204+// If it's not, the view may change width when a different page becomes visible.
1205+func (x *NavigationView) SetHhomogeneous(HhomogeneousVar bool) {
1206+
1207+ xNavigationViewSetHhomogeneous(x.GoPointer(), HhomogeneousVar)
1208+
1209+}
1210+
1035 var xNavigationViewSetPopOnEscape func(uintptr, bool)1211 var xNavigationViewSetPopOnEscape func(uintptr, bool)
1036 1212
1037 // Sets whether pressing Escape pops the current page on @self.1213 // Sets whether pressing Escape pops the current page on @self.
@@ -1044,6 +1220,21 @@ func (x *NavigationView) SetPopOnEscape(PopOnEscapeVar bool) {
1044 1220
1045 }1221 }
1046 1222
1223+var xNavigationViewSetVhomogeneous func(uintptr, bool)
1224+
1225+// Sets @self to be vertically homogeneous or not.
1226+//
1227+// If the view is vertically homogeneous, it allocates the same height for
1228+// all pages.
1229+//
1230+// If it's not, the view may change height when a different page becomes
1231+// visible.
1232+func (x *NavigationView) SetVhomogeneous(VhomogeneousVar bool) {
1233+
1234+ xNavigationViewSetVhomogeneous(x.GoPointer(), VhomogeneousVar)
1235+
1236+}
1237+
1047 func (c *NavigationView) GoPointer() uintptr {1238 func (c *NavigationView) GoPointer() uintptr {
1048 if c == nil {1239 if c == nil {
1049 return 01240 return 0
@@ -1204,34 +1395,165 @@ func (x *NavigationView) GetSwipeArea(NavigationDirectionVar NavigationDirection
1204 1395
1205 }1396 }
1206 1397
1207-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.1398+// Requests the user's screen reader to announce the given message.
1399+//
1400+// This kind of notification is useful for messages that
1401+// either have only a visual representation or that are not
1402+// exposed visually at all, e.g. a notification about a
1403+// successful operation.
1404+//
1405+// Also, by using this API, you can ensure that the message
1406+// does not interrupts the user's current screen reader output.
1407+func (x *NavigationView) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
1408+
1409+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
1410+
1411+}
1412+
1413+// Retrieves the accessible parent for an accessible object.
1414+//
1415+// This function returns `NULL` for top level widgets.
1416+func (x *NavigationView) GetAccessibleParent() *gtk.AccessibleBase {
1417+ var cls *gtk.AccessibleBase
1418+
1419+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
1420+
1421+ if cret == 0 {
1422+ return nil
1423+ }
1424+ cls = &gtk.AccessibleBase{}
1425+ cls.Ptr = cret
1426+ return cls
1427+}
1428+
1429+// Retrieves the accessible role of an accessible object.
1208 func (x *NavigationView) GetAccessibleRole() gtk.AccessibleRole {1430 func (x *NavigationView) GetAccessibleRole() gtk.AccessibleRole {
1209 1431
1210 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())1432 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
1211 return cret1433 return cret
1212 }1434 }
1213 1435
1214-// Resets the accessible @property to its default value.1436+// Retrieves the implementation for the given accessible object.
1437+func (x *NavigationView) GetAtContext() *gtk.ATContext {
1438+ var cls *gtk.ATContext
1439+
1440+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
1441+
1442+ if cret == 0 {
1443+ return nil
1444+ }
1445+ cls = &gtk.ATContext{}
1446+ cls.Ptr = cret
1447+ return cls
1448+}
1449+
1450+// Queries the coordinates and dimensions of this accessible
1451+//
1452+// This functionality can be overridden by `GtkAccessible`
1453+// implementations, e.g. to get the bounds from an ignored
1454+// child widget.
1455+func (x *NavigationView) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
1456+
1457+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
1458+ return cret
1459+}
1460+
1461+// Retrieves the first accessible child of an accessible object.
1462+func (x *NavigationView) GetFirstAccessibleChild() *gtk.AccessibleBase {
1463+ var cls *gtk.AccessibleBase
1464+
1465+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
1466+
1467+ if cret == 0 {
1468+ return nil
1469+ }
1470+ cls = &gtk.AccessibleBase{}
1471+ cls.Ptr = cret
1472+ return cls
1473+}
1474+
1475+// Retrieves the next accessible sibling of an accessible object
1476+func (x *NavigationView) GetNextAccessibleSibling() *gtk.AccessibleBase {
1477+ var cls *gtk.AccessibleBase
1478+
1479+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
1480+
1481+ if cret == 0 {
1482+ return nil
1483+ }
1484+ cls = &gtk.AccessibleBase{}
1485+ cls.Ptr = cret
1486+ return cls
1487+}
1488+
1489+// Queries a platform state, such as focus.
1490+//
1491+// This functionality can be overridden by `GtkAccessible`
1492+// implementations, e.g. to get platform state from an ignored
1493+// child widget, as is the case for `GtkText` wrappers.
1494+func (x *NavigationView) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
1495+
1496+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
1497+ return cret
1498+}
1499+
1500+// Resets the accessible property to its default value.
1215 func (x *NavigationView) ResetProperty(PropertyVar gtk.AccessibleProperty) {1501 func (x *NavigationView) ResetProperty(PropertyVar gtk.AccessibleProperty) {
1216 1502
1217 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)1503 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
1218 1504
1219 }1505 }
1220 1506
1221-// Resets the accessible @relation to its default value.1507+// Resets the accessible relation to its default value.
1222 func (x *NavigationView) ResetRelation(RelationVar gtk.AccessibleRelation) {1508 func (x *NavigationView) ResetRelation(RelationVar gtk.AccessibleRelation) {
1223 1509
1224 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)1510 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
1225 1511
1226 }1512 }
1227 1513
1228-// Resets the accessible @state to its default value.1514+// Resets the accessible state to its default value.
1229 func (x *NavigationView) ResetState(StateVar gtk.AccessibleState) {1515 func (x *NavigationView) ResetState(StateVar gtk.AccessibleState) {
1230 1516
1231 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)1517 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
1232 1518
1233 }1519 }
1234 1520
1521+// Sets the parent and sibling of an accessible object.
1522+//
1523+// This function is meant to be used by accessible implementations that are
1524+// not part of the widget hierarchy, and but act as a logical bridge between
1525+// widgets. For instance, if a widget creates an object that holds metadata
1526+// for each child, and you want that object to implement the `GtkAccessible`
1527+// interface, you will use this function to ensure that the parent of each
1528+// child widget is the metadata object, and the parent of each metadata
1529+// object is the container widget.
1530+func (x *NavigationView) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
1531+
1532+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
1533+
1534+}
1535+
1536+// Updates the next accessible sibling.
1537+//
1538+// That might be useful when a new child of a custom accessible
1539+// is created, and it needs to be linked to a previous child.
1540+func (x *NavigationView) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
1541+
1542+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
1543+
1544+}
1545+
1546+// Informs ATs that the platform state has changed.
1547+//
1548+// This function should be used by `GtkAccessible` implementations that
1549+// have a platform state but are not widgets. Widgets handle platform
1550+// states automatically.
1551+func (x *NavigationView) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
1552+
1553+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
1554+
1555+}
1556+
1235 // Updates a list of accessible properties.1557 // Updates a list of accessible properties.
1236 //1558 //
1237 // See the [enum@Gtk.AccessibleProperty] documentation for the1559 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -1274,7 +1596,7 @@ func (x *NavigationView) UpdatePropertyValue(NPropertiesVar int, PropertiesVar [
1274 // relation change must be communicated to assistive technologies.1596 // relation change must be communicated to assistive technologies.
1275 //1597 //
1276 // If the [enum@Gtk.AccessibleRelation] requires a list of references,1598 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
1277-// you should pass each reference individually, followed by %NULL, e.g.1599+// you should pass each reference individually, followed by `NULL`, e.g.
1278 //1600 //
1279 // ```c1601 // ```c
1280 // gtk_accessible_update_relation (accessible,1602 // gtk_accessible_update_relation (accessible,
@@ -1304,13 +1626,17 @@ func (x *NavigationView) UpdateRelationValue(NRelationsVar int, RelationsVar []g
1304 1626
1305 }1627 }
1306 1628
1307-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]1629+// Updates a list of accessible states.
1308-// documentation for the value types of accessible states.
1309 //1630 //
1310-// This function should be called by `GtkWidget` types whenever an accessible1631+// See the [enum@Gtk.AccessibleState] documentation for the
1311-// state change must be communicated to assistive technologies.1632+// value types of accessible states.
1633+//
1634+// This function should be called by `GtkWidget` types whenever
1635+// an accessible state change must be communicated to assistive
1636+// technologies.
1312 //1637 //
1313 // Example:1638 // Example:
1639+//
1314 // ```c1640 // ```c
1315 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;1641 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
1316 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),1642 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -1340,7 +1666,7 @@ func (x *NavigationView) UpdateStateValue(NStatesVar int, StatesVar []gtk.Access
1340 // Gets the ID of the @buildable object.1666 // Gets the ID of the @buildable object.
1341 //1667 //
1342 // `GtkBuilder` sets the name based on the ID attribute1668 // `GtkBuilder` sets the name based on the ID attribute
1343-// of the <object> tag used to construct the @buildable.1669+// of the `<object>` tag used to construct the @buildable.
1344 func (x *NavigationView) GetBuildableId() string {1670 func (x *NavigationView) GetBuildableId() string {
1345 1671
1346 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())1672 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
@@ -1376,10 +1702,13 @@ func init() {
1376 core.PuregoSafeRegister(&xNavigationViewAdd, lib, "adw_navigation_view_add")1702 core.PuregoSafeRegister(&xNavigationViewAdd, lib, "adw_navigation_view_add")
1377 core.PuregoSafeRegister(&xNavigationViewFindPage, lib, "adw_navigation_view_find_page")1703 core.PuregoSafeRegister(&xNavigationViewFindPage, lib, "adw_navigation_view_find_page")
1378 core.PuregoSafeRegister(&xNavigationViewGetAnimateTransitions, lib, "adw_navigation_view_get_animate_transitions")1704 core.PuregoSafeRegister(&xNavigationViewGetAnimateTransitions, lib, "adw_navigation_view_get_animate_transitions")
1705+ core.PuregoSafeRegister(&xNavigationViewGetHhomogeneous, lib, "adw_navigation_view_get_hhomogeneous")
1379 core.PuregoSafeRegister(&xNavigationViewGetNavigationStack, lib, "adw_navigation_view_get_navigation_stack")1706 core.PuregoSafeRegister(&xNavigationViewGetNavigationStack, lib, "adw_navigation_view_get_navigation_stack")
1380 core.PuregoSafeRegister(&xNavigationViewGetPopOnEscape, lib, "adw_navigation_view_get_pop_on_escape")1707 core.PuregoSafeRegister(&xNavigationViewGetPopOnEscape, lib, "adw_navigation_view_get_pop_on_escape")
1381 core.PuregoSafeRegister(&xNavigationViewGetPreviousPage, lib, "adw_navigation_view_get_previous_page")1708 core.PuregoSafeRegister(&xNavigationViewGetPreviousPage, lib, "adw_navigation_view_get_previous_page")
1709+ core.PuregoSafeRegister(&xNavigationViewGetVhomogeneous, lib, "adw_navigation_view_get_vhomogeneous")
1382 core.PuregoSafeRegister(&xNavigationViewGetVisiblePage, lib, "adw_navigation_view_get_visible_page")1710 core.PuregoSafeRegister(&xNavigationViewGetVisiblePage, lib, "adw_navigation_view_get_visible_page")
1711+ core.PuregoSafeRegister(&xNavigationViewGetVisiblePageTag, lib, "adw_navigation_view_get_visible_page_tag")
1383 core.PuregoSafeRegister(&xNavigationViewPop, lib, "adw_navigation_view_pop")1712 core.PuregoSafeRegister(&xNavigationViewPop, lib, "adw_navigation_view_pop")
1384 core.PuregoSafeRegister(&xNavigationViewPopToPage, lib, "adw_navigation_view_pop_to_page")1713 core.PuregoSafeRegister(&xNavigationViewPopToPage, lib, "adw_navigation_view_pop_to_page")
1385 core.PuregoSafeRegister(&xNavigationViewPopToTag, lib, "adw_navigation_view_pop_to_tag")1714 core.PuregoSafeRegister(&xNavigationViewPopToTag, lib, "adw_navigation_view_pop_to_tag")
@@ -1389,6 +1718,8 @@ func init() {
1389 core.PuregoSafeRegister(&xNavigationViewReplace, lib, "adw_navigation_view_replace")1718 core.PuregoSafeRegister(&xNavigationViewReplace, lib, "adw_navigation_view_replace")
1390 core.PuregoSafeRegister(&xNavigationViewReplaceWithTags, lib, "adw_navigation_view_replace_with_tags")1719 core.PuregoSafeRegister(&xNavigationViewReplaceWithTags, lib, "adw_navigation_view_replace_with_tags")
1391 core.PuregoSafeRegister(&xNavigationViewSetAnimateTransitions, lib, "adw_navigation_view_set_animate_transitions")1720 core.PuregoSafeRegister(&xNavigationViewSetAnimateTransitions, lib, "adw_navigation_view_set_animate_transitions")
1721+ core.PuregoSafeRegister(&xNavigationViewSetHhomogeneous, lib, "adw_navigation_view_set_hhomogeneous")
1392 core.PuregoSafeRegister(&xNavigationViewSetPopOnEscape, lib, "adw_navigation_view_set_pop_on_escape")1722 core.PuregoSafeRegister(&xNavigationViewSetPopOnEscape, lib, "adw_navigation_view_set_pop_on_escape")
1723+ core.PuregoSafeRegister(&xNavigationViewSetVhomogeneous, lib, "adw_navigation_view_set_vhomogeneous")
1393 1724
1394 }1725 }
M v4/adw/adw-overlay-split-view.go +145 -10
@@ -522,34 +522,165 @@ func (x *OverlaySplitView) GetSwipeArea(NavigationDirectionVar NavigationDirecti
522 522
523 }523 }
524 524
525-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.525+// Requests the user's screen reader to announce the given message.
526+//
527+// This kind of notification is useful for messages that
528+// either have only a visual representation or that are not
529+// exposed visually at all, e.g. a notification about a
530+// successful operation.
531+//
532+// Also, by using this API, you can ensure that the message
533+// does not interrupts the user's current screen reader output.
534+func (x *OverlaySplitView) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
535+
536+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
537+
538+}
539+
540+// Retrieves the accessible parent for an accessible object.
541+//
542+// This function returns `NULL` for top level widgets.
543+func (x *OverlaySplitView) GetAccessibleParent() *gtk.AccessibleBase {
544+ var cls *gtk.AccessibleBase
545+
546+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
547+
548+ if cret == 0 {
549+ return nil
550+ }
551+ cls = &gtk.AccessibleBase{}
552+ cls.Ptr = cret
553+ return cls
554+}
555+
556+// Retrieves the accessible role of an accessible object.
526 func (x *OverlaySplitView) GetAccessibleRole() gtk.AccessibleRole {557 func (x *OverlaySplitView) GetAccessibleRole() gtk.AccessibleRole {
527 558
528 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())559 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
529 return cret560 return cret
530 }561 }
531 562
532-// Resets the accessible @property to its default value.563+// Retrieves the implementation for the given accessible object.
564+func (x *OverlaySplitView) GetAtContext() *gtk.ATContext {
565+ var cls *gtk.ATContext
566+
567+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
568+
569+ if cret == 0 {
570+ return nil
571+ }
572+ cls = &gtk.ATContext{}
573+ cls.Ptr = cret
574+ return cls
575+}
576+
577+// Queries the coordinates and dimensions of this accessible
578+//
579+// This functionality can be overridden by `GtkAccessible`
580+// implementations, e.g. to get the bounds from an ignored
581+// child widget.
582+func (x *OverlaySplitView) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
583+
584+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
585+ return cret
586+}
587+
588+// Retrieves the first accessible child of an accessible object.
589+func (x *OverlaySplitView) GetFirstAccessibleChild() *gtk.AccessibleBase {
590+ var cls *gtk.AccessibleBase
591+
592+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
593+
594+ if cret == 0 {
595+ return nil
596+ }
597+ cls = &gtk.AccessibleBase{}
598+ cls.Ptr = cret
599+ return cls
600+}
601+
602+// Retrieves the next accessible sibling of an accessible object
603+func (x *OverlaySplitView) GetNextAccessibleSibling() *gtk.AccessibleBase {
604+ var cls *gtk.AccessibleBase
605+
606+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
607+
608+ if cret == 0 {
609+ return nil
610+ }
611+ cls = &gtk.AccessibleBase{}
612+ cls.Ptr = cret
613+ return cls
614+}
615+
616+// Queries a platform state, such as focus.
617+//
618+// This functionality can be overridden by `GtkAccessible`
619+// implementations, e.g. to get platform state from an ignored
620+// child widget, as is the case for `GtkText` wrappers.
621+func (x *OverlaySplitView) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
622+
623+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
624+ return cret
625+}
626+
627+// Resets the accessible property to its default value.
533 func (x *OverlaySplitView) ResetProperty(PropertyVar gtk.AccessibleProperty) {628 func (x *OverlaySplitView) ResetProperty(PropertyVar gtk.AccessibleProperty) {
534 629
535 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)630 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
536 631
537 }632 }
538 633
539-// Resets the accessible @relation to its default value.634+// Resets the accessible relation to its default value.
540 func (x *OverlaySplitView) ResetRelation(RelationVar gtk.AccessibleRelation) {635 func (x *OverlaySplitView) ResetRelation(RelationVar gtk.AccessibleRelation) {
541 636
542 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)637 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
543 638
544 }639 }
545 640
546-// Resets the accessible @state to its default value.641+// Resets the accessible state to its default value.
547 func (x *OverlaySplitView) ResetState(StateVar gtk.AccessibleState) {642 func (x *OverlaySplitView) ResetState(StateVar gtk.AccessibleState) {
548 643
549 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)644 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
550 645
551 }646 }
552 647
648+// Sets the parent and sibling of an accessible object.
649+//
650+// This function is meant to be used by accessible implementations that are
651+// not part of the widget hierarchy, and but act as a logical bridge between
652+// widgets. For instance, if a widget creates an object that holds metadata
653+// for each child, and you want that object to implement the `GtkAccessible`
654+// interface, you will use this function to ensure that the parent of each
655+// child widget is the metadata object, and the parent of each metadata
656+// object is the container widget.
657+func (x *OverlaySplitView) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
658+
659+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
660+
661+}
662+
663+// Updates the next accessible sibling.
664+//
665+// That might be useful when a new child of a custom accessible
666+// is created, and it needs to be linked to a previous child.
667+func (x *OverlaySplitView) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
668+
669+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
670+
671+}
672+
673+// Informs ATs that the platform state has changed.
674+//
675+// This function should be used by `GtkAccessible` implementations that
676+// have a platform state but are not widgets. Widgets handle platform
677+// states automatically.
678+func (x *OverlaySplitView) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
679+
680+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
681+
682+}
683+
553 // Updates a list of accessible properties.684 // Updates a list of accessible properties.
554 //685 //
555 // See the [enum@Gtk.AccessibleProperty] documentation for the686 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -592,7 +723,7 @@ func (x *OverlaySplitView) UpdatePropertyValue(NPropertiesVar int, PropertiesVar
592 // relation change must be communicated to assistive technologies.723 // relation change must be communicated to assistive technologies.
593 //724 //
594 // If the [enum@Gtk.AccessibleRelation] requires a list of references,725 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
595-// you should pass each reference individually, followed by %NULL, e.g.726+// you should pass each reference individually, followed by `NULL`, e.g.
596 //727 //
597 // ```c728 // ```c
598 // gtk_accessible_update_relation (accessible,729 // gtk_accessible_update_relation (accessible,
@@ -622,13 +753,17 @@ func (x *OverlaySplitView) UpdateRelationValue(NRelationsVar int, RelationsVar [
622 753
623 }754 }
624 755
625-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]756+// Updates a list of accessible states.
626-// documentation for the value types of accessible states.
627 //757 //
628-// This function should be called by `GtkWidget` types whenever an accessible758+// See the [enum@Gtk.AccessibleState] documentation for the
629-// state change must be communicated to assistive technologies.759+// value types of accessible states.
760+//
761+// This function should be called by `GtkWidget` types whenever
762+// an accessible state change must be communicated to assistive
763+// technologies.
630 //764 //
631 // Example:765 // Example:
766+//
632 // ```c767 // ```c
633 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;768 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
634 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),769 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -658,7 +793,7 @@ func (x *OverlaySplitView) UpdateStateValue(NStatesVar int, StatesVar []gtk.Acce
658 // Gets the ID of the @buildable object.793 // Gets the ID of the @buildable object.
659 //794 //
660 // `GtkBuilder` sets the name based on the ID attribute795 // `GtkBuilder` sets the name based on the ID attribute
661-// of the <object> tag used to construct the @buildable.796+// of the `<object>` tag used to construct the @buildable.
662 func (x *OverlaySplitView) GetBuildableId() string {797 func (x *OverlaySplitView) GetBuildableId() string {
663 798
664 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())799 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-password-entry-row.go +187 -10
@@ -88,34 +88,165 @@ func (c *PasswordEntryRow) SetGoPointer(ptr uintptr) {
88 c.Ptr = ptr88 c.Ptr = ptr
89 }89 }
90 90
91-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.91+// Requests the user's screen reader to announce the given message.
92+//
93+// This kind of notification is useful for messages that
94+// either have only a visual representation or that are not
95+// exposed visually at all, e.g. a notification about a
96+// successful operation.
97+//
98+// Also, by using this API, you can ensure that the message
99+// does not interrupts the user's current screen reader output.
100+func (x *PasswordEntryRow) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
101+
102+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
103+
104+}
105+
106+// Retrieves the accessible parent for an accessible object.
107+//
108+// This function returns `NULL` for top level widgets.
109+func (x *PasswordEntryRow) GetAccessibleParent() *gtk.AccessibleBase {
110+ var cls *gtk.AccessibleBase
111+
112+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
113+
114+ if cret == 0 {
115+ return nil
116+ }
117+ cls = &gtk.AccessibleBase{}
118+ cls.Ptr = cret
119+ return cls
120+}
121+
122+// Retrieves the accessible role of an accessible object.
92 func (x *PasswordEntryRow) GetAccessibleRole() gtk.AccessibleRole {123 func (x *PasswordEntryRow) GetAccessibleRole() gtk.AccessibleRole {
93 124
94 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())125 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
95 return cret126 return cret
96 }127 }
97 128
98-// Resets the accessible @property to its default value.129+// Retrieves the implementation for the given accessible object.
130+func (x *PasswordEntryRow) GetAtContext() *gtk.ATContext {
131+ var cls *gtk.ATContext
132+
133+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
134+
135+ if cret == 0 {
136+ return nil
137+ }
138+ cls = &gtk.ATContext{}
139+ cls.Ptr = cret
140+ return cls
141+}
142+
143+// Queries the coordinates and dimensions of this accessible
144+//
145+// This functionality can be overridden by `GtkAccessible`
146+// implementations, e.g. to get the bounds from an ignored
147+// child widget.
148+func (x *PasswordEntryRow) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
149+
150+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
151+ return cret
152+}
153+
154+// Retrieves the first accessible child of an accessible object.
155+func (x *PasswordEntryRow) GetFirstAccessibleChild() *gtk.AccessibleBase {
156+ var cls *gtk.AccessibleBase
157+
158+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
159+
160+ if cret == 0 {
161+ return nil
162+ }
163+ cls = &gtk.AccessibleBase{}
164+ cls.Ptr = cret
165+ return cls
166+}
167+
168+// Retrieves the next accessible sibling of an accessible object
169+func (x *PasswordEntryRow) GetNextAccessibleSibling() *gtk.AccessibleBase {
170+ var cls *gtk.AccessibleBase
171+
172+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
173+
174+ if cret == 0 {
175+ return nil
176+ }
177+ cls = &gtk.AccessibleBase{}
178+ cls.Ptr = cret
179+ return cls
180+}
181+
182+// Queries a platform state, such as focus.
183+//
184+// This functionality can be overridden by `GtkAccessible`
185+// implementations, e.g. to get platform state from an ignored
186+// child widget, as is the case for `GtkText` wrappers.
187+func (x *PasswordEntryRow) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
188+
189+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
190+ return cret
191+}
192+
193+// Resets the accessible property to its default value.
99 func (x *PasswordEntryRow) ResetProperty(PropertyVar gtk.AccessibleProperty) {194 func (x *PasswordEntryRow) ResetProperty(PropertyVar gtk.AccessibleProperty) {
100 195
101 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)196 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
102 197
103 }198 }
104 199
105-// Resets the accessible @relation to its default value.200+// Resets the accessible relation to its default value.
106 func (x *PasswordEntryRow) ResetRelation(RelationVar gtk.AccessibleRelation) {201 func (x *PasswordEntryRow) ResetRelation(RelationVar gtk.AccessibleRelation) {
107 202
108 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)203 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
109 204
110 }205 }
111 206
112-// Resets the accessible @state to its default value.207+// Resets the accessible state to its default value.
113 func (x *PasswordEntryRow) ResetState(StateVar gtk.AccessibleState) {208 func (x *PasswordEntryRow) ResetState(StateVar gtk.AccessibleState) {
114 209
115 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)210 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
116 211
117 }212 }
118 213
214+// Sets the parent and sibling of an accessible object.
215+//
216+// This function is meant to be used by accessible implementations that are
217+// not part of the widget hierarchy, and but act as a logical bridge between
218+// widgets. For instance, if a widget creates an object that holds metadata
219+// for each child, and you want that object to implement the `GtkAccessible`
220+// interface, you will use this function to ensure that the parent of each
221+// child widget is the metadata object, and the parent of each metadata
222+// object is the container widget.
223+func (x *PasswordEntryRow) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
224+
225+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
226+
227+}
228+
229+// Updates the next accessible sibling.
230+//
231+// That might be useful when a new child of a custom accessible
232+// is created, and it needs to be linked to a previous child.
233+func (x *PasswordEntryRow) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
234+
235+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
236+
237+}
238+
239+// Informs ATs that the platform state has changed.
240+//
241+// This function should be used by `GtkAccessible` implementations that
242+// have a platform state but are not widgets. Widgets handle platform
243+// states automatically.
244+func (x *PasswordEntryRow) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
245+
246+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
247+
248+}
249+
119 // Updates a list of accessible properties.250 // Updates a list of accessible properties.
120 //251 //
121 // See the [enum@Gtk.AccessibleProperty] documentation for the252 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -158,7 +289,7 @@ func (x *PasswordEntryRow) UpdatePropertyValue(NPropertiesVar int, PropertiesVar
158 // relation change must be communicated to assistive technologies.289 // relation change must be communicated to assistive technologies.
159 //290 //
160 // If the [enum@Gtk.AccessibleRelation] requires a list of references,291 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
161-// you should pass each reference individually, followed by %NULL, e.g.292+// you should pass each reference individually, followed by `NULL`, e.g.
162 //293 //
163 // ```c294 // ```c
164 // gtk_accessible_update_relation (accessible,295 // gtk_accessible_update_relation (accessible,
@@ -188,13 +319,17 @@ func (x *PasswordEntryRow) UpdateRelationValue(NRelationsVar int, RelationsVar [
188 319
189 }320 }
190 321
191-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]322+// Updates a list of accessible states.
192-// documentation for the value types of accessible states.
193 //323 //
194-// This function should be called by `GtkWidget` types whenever an accessible324+// See the [enum@Gtk.AccessibleState] documentation for the
195-// state change must be communicated to assistive technologies.325+// value types of accessible states.
326+//
327+// This function should be called by `GtkWidget` types whenever
328+// an accessible state change must be communicated to assistive
329+// technologies.
196 //330 //
197 // Example:331 // Example:
332+//
198 // ```c333 // ```c
199 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;334 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
200 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),335 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -307,13 +442,55 @@ func (x *PasswordEntryRow) SetDetailedActionName(DetailedActionNameVar string) {
307 // Gets the ID of the @buildable object.442 // Gets the ID of the @buildable object.
308 //443 //
309 // `GtkBuilder` sets the name based on the ID attribute444 // `GtkBuilder` sets the name based on the ID attribute
310-// of the <object> tag used to construct the @buildable.445+// of the `<object>` tag used to construct the @buildable.
311 func (x *PasswordEntryRow) GetBuildableId() string {446 func (x *PasswordEntryRow) GetBuildableId() string {
312 447
313 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())448 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
314 return cret449 return cret
315 }450 }
316 451
452+// Retrieves the accessible platform state from the editable delegate.
453+//
454+// This is an helper function to retrieve the accessible state for
455+// `GtkEditable` interface implementations using a delegate pattern.
456+//
457+// You should call this function in your editable widget implementation
458+// of the [vfunc@Gtk.Accessible.get_platform_state] virtual function, for
459+// instance:
460+//
461+// ```c
462+// static void
463+// accessible_interface_init (GtkAccessibleInterface *iface)
464+//
465+// {
466+// iface->get_platform_state = your_editable_get_accessible_platform_state;
467+// }
468+//
469+// static gboolean
470+// your_editable_get_accessible_platform_state (GtkAccessible *accessible,
471+//
472+// GtkAccessiblePlatformState state)
473+//
474+// {
475+// return gtk_editable_delegate_get_accessible_platform_state (GTK_EDITABLE (accessible), state);
476+// }
477+//
478+// ```
479+//
480+// Note that the widget which is the delegate *must* be a direct child of
481+// this widget, otherwise your implementation of [vfunc@Gtk.Accessible.get_platform_state]
482+// might not even be called, as the platform change will originate from
483+// the parent of the delegate, and, as a result, will not work properly.
484+//
485+// So, if you can't ensure the direct child condition, you should give the
486+// delegate the %GTK_ACCESSIBLE_ROLE_TEXT_BOX role, or you can
487+// change your tree to allow this function to work.
488+func (x *PasswordEntryRow) DelegateGetAccessiblePlatformState(StateVar gtk.AccessiblePlatformState) bool {
489+
490+ cret := gtk.XGtkEditableDelegateGetAccessiblePlatformState(x.GoPointer(), StateVar)
491+ return cret
492+}
493+
317 // Deletes the currently selected text of the editable.494 // Deletes the currently selected text of the editable.
318 //495 //
319 // This call doesn’t do anything if there is no selected text.496 // This call doesn’t do anything if there is no selected text.
M v4/adw/adw-preferences-dialog.go +145 -10
@@ -203,34 +203,165 @@ func (c *PreferencesDialog) SetGoPointer(ptr uintptr) {
203 c.Ptr = ptr203 c.Ptr = ptr
204 }204 }
205 205
206-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.206+// Requests the user's screen reader to announce the given message.
207+//
208+// This kind of notification is useful for messages that
209+// either have only a visual representation or that are not
210+// exposed visually at all, e.g. a notification about a
211+// successful operation.
212+//
213+// Also, by using this API, you can ensure that the message
214+// does not interrupts the user's current screen reader output.
215+func (x *PreferencesDialog) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
216+
217+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
218+
219+}
220+
221+// Retrieves the accessible parent for an accessible object.
222+//
223+// This function returns `NULL` for top level widgets.
224+func (x *PreferencesDialog) GetAccessibleParent() *gtk.AccessibleBase {
225+ var cls *gtk.AccessibleBase
226+
227+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
228+
229+ if cret == 0 {
230+ return nil
231+ }
232+ cls = &gtk.AccessibleBase{}
233+ cls.Ptr = cret
234+ return cls
235+}
236+
237+// Retrieves the accessible role of an accessible object.
207 func (x *PreferencesDialog) GetAccessibleRole() gtk.AccessibleRole {238 func (x *PreferencesDialog) GetAccessibleRole() gtk.AccessibleRole {
208 239
209 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())240 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
210 return cret241 return cret
211 }242 }
212 243
213-// Resets the accessible @property to its default value.244+// Retrieves the implementation for the given accessible object.
245+func (x *PreferencesDialog) GetAtContext() *gtk.ATContext {
246+ var cls *gtk.ATContext
247+
248+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
249+
250+ if cret == 0 {
251+ return nil
252+ }
253+ cls = &gtk.ATContext{}
254+ cls.Ptr = cret
255+ return cls
256+}
257+
258+// Queries the coordinates and dimensions of this accessible
259+//
260+// This functionality can be overridden by `GtkAccessible`
261+// implementations, e.g. to get the bounds from an ignored
262+// child widget.
263+func (x *PreferencesDialog) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
264+
265+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
266+ return cret
267+}
268+
269+// Retrieves the first accessible child of an accessible object.
270+func (x *PreferencesDialog) GetFirstAccessibleChild() *gtk.AccessibleBase {
271+ var cls *gtk.AccessibleBase
272+
273+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
274+
275+ if cret == 0 {
276+ return nil
277+ }
278+ cls = &gtk.AccessibleBase{}
279+ cls.Ptr = cret
280+ return cls
281+}
282+
283+// Retrieves the next accessible sibling of an accessible object
284+func (x *PreferencesDialog) GetNextAccessibleSibling() *gtk.AccessibleBase {
285+ var cls *gtk.AccessibleBase
286+
287+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
288+
289+ if cret == 0 {
290+ return nil
291+ }
292+ cls = &gtk.AccessibleBase{}
293+ cls.Ptr = cret
294+ return cls
295+}
296+
297+// Queries a platform state, such as focus.
298+//
299+// This functionality can be overridden by `GtkAccessible`
300+// implementations, e.g. to get platform state from an ignored
301+// child widget, as is the case for `GtkText` wrappers.
302+func (x *PreferencesDialog) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
303+
304+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
305+ return cret
306+}
307+
308+// Resets the accessible property to its default value.
214 func (x *PreferencesDialog) ResetProperty(PropertyVar gtk.AccessibleProperty) {309 func (x *PreferencesDialog) ResetProperty(PropertyVar gtk.AccessibleProperty) {
215 310
216 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)311 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
217 312
218 }313 }
219 314
220-// Resets the accessible @relation to its default value.315+// Resets the accessible relation to its default value.
221 func (x *PreferencesDialog) ResetRelation(RelationVar gtk.AccessibleRelation) {316 func (x *PreferencesDialog) ResetRelation(RelationVar gtk.AccessibleRelation) {
222 317
223 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)318 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
224 319
225 }320 }
226 321
227-// Resets the accessible @state to its default value.322+// Resets the accessible state to its default value.
228 func (x *PreferencesDialog) ResetState(StateVar gtk.AccessibleState) {323 func (x *PreferencesDialog) ResetState(StateVar gtk.AccessibleState) {
229 324
230 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)325 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
231 326
232 }327 }
233 328
329+// Sets the parent and sibling of an accessible object.
330+//
331+// This function is meant to be used by accessible implementations that are
332+// not part of the widget hierarchy, and but act as a logical bridge between
333+// widgets. For instance, if a widget creates an object that holds metadata
334+// for each child, and you want that object to implement the `GtkAccessible`
335+// interface, you will use this function to ensure that the parent of each
336+// child widget is the metadata object, and the parent of each metadata
337+// object is the container widget.
338+func (x *PreferencesDialog) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
339+
340+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
341+
342+}
343+
344+// Updates the next accessible sibling.
345+//
346+// That might be useful when a new child of a custom accessible
347+// is created, and it needs to be linked to a previous child.
348+func (x *PreferencesDialog) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
349+
350+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
351+
352+}
353+
354+// Informs ATs that the platform state has changed.
355+//
356+// This function should be used by `GtkAccessible` implementations that
357+// have a platform state but are not widgets. Widgets handle platform
358+// states automatically.
359+func (x *PreferencesDialog) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
360+
361+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
362+
363+}
364+
234 // Updates a list of accessible properties.365 // Updates a list of accessible properties.
235 //366 //
236 // See the [enum@Gtk.AccessibleProperty] documentation for the367 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -273,7 +404,7 @@ func (x *PreferencesDialog) UpdatePropertyValue(NPropertiesVar int, PropertiesVa
273 // relation change must be communicated to assistive technologies.404 // relation change must be communicated to assistive technologies.
274 //405 //
275 // If the [enum@Gtk.AccessibleRelation] requires a list of references,406 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
276-// you should pass each reference individually, followed by %NULL, e.g.407+// you should pass each reference individually, followed by `NULL`, e.g.
277 //408 //
278 // ```c409 // ```c
279 // gtk_accessible_update_relation (accessible,410 // gtk_accessible_update_relation (accessible,
@@ -303,13 +434,17 @@ func (x *PreferencesDialog) UpdateRelationValue(NRelationsVar int, RelationsVar
303 434
304 }435 }
305 436
306-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]437+// Updates a list of accessible states.
307-// documentation for the value types of accessible states.
308 //438 //
309-// This function should be called by `GtkWidget` types whenever an accessible439+// See the [enum@Gtk.AccessibleState] documentation for the
310-// state change must be communicated to assistive technologies.440+// value types of accessible states.
441+//
442+// This function should be called by `GtkWidget` types whenever
443+// an accessible state change must be communicated to assistive
444+// technologies.
311 //445 //
312 // Example:446 // Example:
447+//
313 // ```c448 // ```c
314 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;449 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
315 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),450 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -339,7 +474,7 @@ func (x *PreferencesDialog) UpdateStateValue(NStatesVar int, StatesVar []gtk.Acc
339 // Gets the ID of the @buildable object.474 // Gets the ID of the @buildable object.
340 //475 //
341 // `GtkBuilder` sets the name based on the ID attribute476 // `GtkBuilder` sets the name based on the ID attribute
342-// of the <object> tag used to construct the @buildable.477+// of the `<object>` tag used to construct the @buildable.
343 func (x *PreferencesDialog) GetBuildableId() string {478 func (x *PreferencesDialog) GetBuildableId() string {
344 479
345 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())480 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-preferences-group.go +145 -10
@@ -212,34 +212,165 @@ func (c *PreferencesGroup) SetGoPointer(ptr uintptr) {
212 c.Ptr = ptr212 c.Ptr = ptr
213 }213 }
214 214
215-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.215+// Requests the user's screen reader to announce the given message.
216+//
217+// This kind of notification is useful for messages that
218+// either have only a visual representation or that are not
219+// exposed visually at all, e.g. a notification about a
220+// successful operation.
221+//
222+// Also, by using this API, you can ensure that the message
223+// does not interrupts the user's current screen reader output.
224+func (x *PreferencesGroup) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
225+
226+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
227+
228+}
229+
230+// Retrieves the accessible parent for an accessible object.
231+//
232+// This function returns `NULL` for top level widgets.
233+func (x *PreferencesGroup) GetAccessibleParent() *gtk.AccessibleBase {
234+ var cls *gtk.AccessibleBase
235+
236+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
237+
238+ if cret == 0 {
239+ return nil
240+ }
241+ cls = &gtk.AccessibleBase{}
242+ cls.Ptr = cret
243+ return cls
244+}
245+
246+// Retrieves the accessible role of an accessible object.
216 func (x *PreferencesGroup) GetAccessibleRole() gtk.AccessibleRole {247 func (x *PreferencesGroup) GetAccessibleRole() gtk.AccessibleRole {
217 248
218 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())249 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
219 return cret250 return cret
220 }251 }
221 252
222-// Resets the accessible @property to its default value.253+// Retrieves the implementation for the given accessible object.
254+func (x *PreferencesGroup) GetAtContext() *gtk.ATContext {
255+ var cls *gtk.ATContext
256+
257+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
258+
259+ if cret == 0 {
260+ return nil
261+ }
262+ cls = &gtk.ATContext{}
263+ cls.Ptr = cret
264+ return cls
265+}
266+
267+// Queries the coordinates and dimensions of this accessible
268+//
269+// This functionality can be overridden by `GtkAccessible`
270+// implementations, e.g. to get the bounds from an ignored
271+// child widget.
272+func (x *PreferencesGroup) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
273+
274+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
275+ return cret
276+}
277+
278+// Retrieves the first accessible child of an accessible object.
279+func (x *PreferencesGroup) GetFirstAccessibleChild() *gtk.AccessibleBase {
280+ var cls *gtk.AccessibleBase
281+
282+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
283+
284+ if cret == 0 {
285+ return nil
286+ }
287+ cls = &gtk.AccessibleBase{}
288+ cls.Ptr = cret
289+ return cls
290+}
291+
292+// Retrieves the next accessible sibling of an accessible object
293+func (x *PreferencesGroup) GetNextAccessibleSibling() *gtk.AccessibleBase {
294+ var cls *gtk.AccessibleBase
295+
296+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
297+
298+ if cret == 0 {
299+ return nil
300+ }
301+ cls = &gtk.AccessibleBase{}
302+ cls.Ptr = cret
303+ return cls
304+}
305+
306+// Queries a platform state, such as focus.
307+//
308+// This functionality can be overridden by `GtkAccessible`
309+// implementations, e.g. to get platform state from an ignored
310+// child widget, as is the case for `GtkText` wrappers.
311+func (x *PreferencesGroup) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
312+
313+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
314+ return cret
315+}
316+
317+// Resets the accessible property to its default value.
223 func (x *PreferencesGroup) ResetProperty(PropertyVar gtk.AccessibleProperty) {318 func (x *PreferencesGroup) ResetProperty(PropertyVar gtk.AccessibleProperty) {
224 319
225 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)320 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
226 321
227 }322 }
228 323
229-// Resets the accessible @relation to its default value.324+// Resets the accessible relation to its default value.
230 func (x *PreferencesGroup) ResetRelation(RelationVar gtk.AccessibleRelation) {325 func (x *PreferencesGroup) ResetRelation(RelationVar gtk.AccessibleRelation) {
231 326
232 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)327 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
233 328
234 }329 }
235 330
236-// Resets the accessible @state to its default value.331+// Resets the accessible state to its default value.
237 func (x *PreferencesGroup) ResetState(StateVar gtk.AccessibleState) {332 func (x *PreferencesGroup) ResetState(StateVar gtk.AccessibleState) {
238 333
239 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)334 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
240 335
241 }336 }
242 337
338+// Sets the parent and sibling of an accessible object.
339+//
340+// This function is meant to be used by accessible implementations that are
341+// not part of the widget hierarchy, and but act as a logical bridge between
342+// widgets. For instance, if a widget creates an object that holds metadata
343+// for each child, and you want that object to implement the `GtkAccessible`
344+// interface, you will use this function to ensure that the parent of each
345+// child widget is the metadata object, and the parent of each metadata
346+// object is the container widget.
347+func (x *PreferencesGroup) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
348+
349+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
350+
351+}
352+
353+// Updates the next accessible sibling.
354+//
355+// That might be useful when a new child of a custom accessible
356+// is created, and it needs to be linked to a previous child.
357+func (x *PreferencesGroup) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
358+
359+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
360+
361+}
362+
363+// Informs ATs that the platform state has changed.
364+//
365+// This function should be used by `GtkAccessible` implementations that
366+// have a platform state but are not widgets. Widgets handle platform
367+// states automatically.
368+func (x *PreferencesGroup) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
369+
370+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
371+
372+}
373+
243 // Updates a list of accessible properties.374 // Updates a list of accessible properties.
244 //375 //
245 // See the [enum@Gtk.AccessibleProperty] documentation for the376 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -282,7 +413,7 @@ func (x *PreferencesGroup) UpdatePropertyValue(NPropertiesVar int, PropertiesVar
282 // relation change must be communicated to assistive technologies.413 // relation change must be communicated to assistive technologies.
283 //414 //
284 // If the [enum@Gtk.AccessibleRelation] requires a list of references,415 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
285-// you should pass each reference individually, followed by %NULL, e.g.416+// you should pass each reference individually, followed by `NULL`, e.g.
286 //417 //
287 // ```c418 // ```c
288 // gtk_accessible_update_relation (accessible,419 // gtk_accessible_update_relation (accessible,
@@ -312,13 +443,17 @@ func (x *PreferencesGroup) UpdateRelationValue(NRelationsVar int, RelationsVar [
312 443
313 }444 }
314 445
315-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]446+// Updates a list of accessible states.
316-// documentation for the value types of accessible states.
317 //447 //
318-// This function should be called by `GtkWidget` types whenever an accessible448+// See the [enum@Gtk.AccessibleState] documentation for the
319-// state change must be communicated to assistive technologies.449+// value types of accessible states.
450+//
451+// This function should be called by `GtkWidget` types whenever
452+// an accessible state change must be communicated to assistive
453+// technologies.
320 //454 //
321 // Example:455 // Example:
456+//
322 // ```c457 // ```c
323 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;458 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
324 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),459 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -348,7 +483,7 @@ func (x *PreferencesGroup) UpdateStateValue(NStatesVar int, StatesVar []gtk.Acce
348 // Gets the ID of the @buildable object.483 // Gets the ID of the @buildable object.
349 //484 //
350 // `GtkBuilder` sets the name based on the ID attribute485 // `GtkBuilder` sets the name based on the ID attribute
351-// of the <object> tag used to construct the @buildable.486+// of the `<object>` tag used to construct the @buildable.
352 func (x *PreferencesGroup) GetBuildableId() string {487 func (x *PreferencesGroup) GetBuildableId() string {
353 488
354 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())489 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-preferences-page.go +173 -10
@@ -85,6 +85,23 @@ func (x *PreferencesPage) Add(GroupVar *PreferencesGroup) {
85 85
86 }86 }
87 87
88+var xPreferencesPageGetBanner func(uintptr) uintptr
89+
90+// Gets the banner displayed at the top of the page.
91+func (x *PreferencesPage) GetBanner() *Banner {
92+ var cls *Banner
93+
94+ cret := xPreferencesPageGetBanner(x.GoPointer())
95+
96+ if cret == 0 {
97+ return nil
98+ }
99+ gobject.IncreaseRef(cret)
100+ cls = &Banner{}
101+ cls.Ptr = cret
102+ return cls
103+}
104+
88 var xPreferencesPageGetDescription func(uintptr) string105 var xPreferencesPageGetDescription func(uintptr) string
89 106
90 // Gets the description of @self.107 // Gets the description of @self.
@@ -157,6 +174,15 @@ func (x *PreferencesPage) ScrollToTop() {
157 174
158 }175 }
159 176
177+var xPreferencesPageSetBanner func(uintptr, uintptr)
178+
179+// Sets the banner displayed at the top of the page.
180+func (x *PreferencesPage) SetBanner(BannerVar *Banner) {
181+
182+ xPreferencesPageSetBanner(x.GoPointer(), BannerVar.GoPointer())
183+
184+}
185+
160 var xPreferencesPageSetDescription func(uintptr, string)186 var xPreferencesPageSetDescription func(uintptr, string)
161 187
162 // Sets the description of @self.188 // Sets the description of @self.
@@ -224,34 +250,165 @@ func (c *PreferencesPage) SetGoPointer(ptr uintptr) {
224 c.Ptr = ptr250 c.Ptr = ptr
225 }251 }
226 252
227-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.253+// Requests the user's screen reader to announce the given message.
254+//
255+// This kind of notification is useful for messages that
256+// either have only a visual representation or that are not
257+// exposed visually at all, e.g. a notification about a
258+// successful operation.
259+//
260+// Also, by using this API, you can ensure that the message
261+// does not interrupts the user's current screen reader output.
262+func (x *PreferencesPage) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
263+
264+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
265+
266+}
267+
268+// Retrieves the accessible parent for an accessible object.
269+//
270+// This function returns `NULL` for top level widgets.
271+func (x *PreferencesPage) GetAccessibleParent() *gtk.AccessibleBase {
272+ var cls *gtk.AccessibleBase
273+
274+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
275+
276+ if cret == 0 {
277+ return nil
278+ }
279+ cls = &gtk.AccessibleBase{}
280+ cls.Ptr = cret
281+ return cls
282+}
283+
284+// Retrieves the accessible role of an accessible object.
228 func (x *PreferencesPage) GetAccessibleRole() gtk.AccessibleRole {285 func (x *PreferencesPage) GetAccessibleRole() gtk.AccessibleRole {
229 286
230 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())287 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
231 return cret288 return cret
232 }289 }
233 290
234-// Resets the accessible @property to its default value.291+// Retrieves the implementation for the given accessible object.
292+func (x *PreferencesPage) GetAtContext() *gtk.ATContext {
293+ var cls *gtk.ATContext
294+
295+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
296+
297+ if cret == 0 {
298+ return nil
299+ }
300+ cls = &gtk.ATContext{}
301+ cls.Ptr = cret
302+ return cls
303+}
304+
305+// Queries the coordinates and dimensions of this accessible
306+//
307+// This functionality can be overridden by `GtkAccessible`
308+// implementations, e.g. to get the bounds from an ignored
309+// child widget.
310+func (x *PreferencesPage) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
311+
312+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
313+ return cret
314+}
315+
316+// Retrieves the first accessible child of an accessible object.
317+func (x *PreferencesPage) GetFirstAccessibleChild() *gtk.AccessibleBase {
318+ var cls *gtk.AccessibleBase
319+
320+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
321+
322+ if cret == 0 {
323+ return nil
324+ }
325+ cls = &gtk.AccessibleBase{}
326+ cls.Ptr = cret
327+ return cls
328+}
329+
330+// Retrieves the next accessible sibling of an accessible object
331+func (x *PreferencesPage) GetNextAccessibleSibling() *gtk.AccessibleBase {
332+ var cls *gtk.AccessibleBase
333+
334+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
335+
336+ if cret == 0 {
337+ return nil
338+ }
339+ cls = &gtk.AccessibleBase{}
340+ cls.Ptr = cret
341+ return cls
342+}
343+
344+// Queries a platform state, such as focus.
345+//
346+// This functionality can be overridden by `GtkAccessible`
347+// implementations, e.g. to get platform state from an ignored
348+// child widget, as is the case for `GtkText` wrappers.
349+func (x *PreferencesPage) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
350+
351+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
352+ return cret
353+}
354+
355+// Resets the accessible property to its default value.
235 func (x *PreferencesPage) ResetProperty(PropertyVar gtk.AccessibleProperty) {356 func (x *PreferencesPage) ResetProperty(PropertyVar gtk.AccessibleProperty) {
236 357
237 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)358 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
238 359
239 }360 }
240 361
241-// Resets the accessible @relation to its default value.362+// Resets the accessible relation to its default value.
242 func (x *PreferencesPage) ResetRelation(RelationVar gtk.AccessibleRelation) {363 func (x *PreferencesPage) ResetRelation(RelationVar gtk.AccessibleRelation) {
243 364
244 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)365 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
245 366
246 }367 }
247 368
248-// Resets the accessible @state to its default value.369+// Resets the accessible state to its default value.
249 func (x *PreferencesPage) ResetState(StateVar gtk.AccessibleState) {370 func (x *PreferencesPage) ResetState(StateVar gtk.AccessibleState) {
250 371
251 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)372 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
252 373
253 }374 }
254 375
376+// Sets the parent and sibling of an accessible object.
377+//
378+// This function is meant to be used by accessible implementations that are
379+// not part of the widget hierarchy, and but act as a logical bridge between
380+// widgets. For instance, if a widget creates an object that holds metadata
381+// for each child, and you want that object to implement the `GtkAccessible`
382+// interface, you will use this function to ensure that the parent of each
383+// child widget is the metadata object, and the parent of each metadata
384+// object is the container widget.
385+func (x *PreferencesPage) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
386+
387+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
388+
389+}
390+
391+// Updates the next accessible sibling.
392+//
393+// That might be useful when a new child of a custom accessible
394+// is created, and it needs to be linked to a previous child.
395+func (x *PreferencesPage) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
396+
397+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
398+
399+}
400+
401+// Informs ATs that the platform state has changed.
402+//
403+// This function should be used by `GtkAccessible` implementations that
404+// have a platform state but are not widgets. Widgets handle platform
405+// states automatically.
406+func (x *PreferencesPage) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
407+
408+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
409+
410+}
411+
255 // Updates a list of accessible properties.412 // Updates a list of accessible properties.
256 //413 //
257 // See the [enum@Gtk.AccessibleProperty] documentation for the414 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -294,7 +451,7 @@ func (x *PreferencesPage) UpdatePropertyValue(NPropertiesVar int, PropertiesVar
294 // relation change must be communicated to assistive technologies.451 // relation change must be communicated to assistive technologies.
295 //452 //
296 // If the [enum@Gtk.AccessibleRelation] requires a list of references,453 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
297-// you should pass each reference individually, followed by %NULL, e.g.454+// you should pass each reference individually, followed by `NULL`, e.g.
298 //455 //
299 // ```c456 // ```c
300 // gtk_accessible_update_relation (accessible,457 // gtk_accessible_update_relation (accessible,
@@ -324,13 +481,17 @@ func (x *PreferencesPage) UpdateRelationValue(NRelationsVar int, RelationsVar []
324 481
325 }482 }
326 483
327-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]484+// Updates a list of accessible states.
328-// documentation for the value types of accessible states.
329 //485 //
330-// This function should be called by `GtkWidget` types whenever an accessible486+// See the [enum@Gtk.AccessibleState] documentation for the
331-// state change must be communicated to assistive technologies.487+// value types of accessible states.
488+//
489+// This function should be called by `GtkWidget` types whenever
490+// an accessible state change must be communicated to assistive
491+// technologies.
332 //492 //
333 // Example:493 // Example:
494+//
334 // ```c495 // ```c
335 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;496 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
336 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),497 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -360,7 +521,7 @@ func (x *PreferencesPage) UpdateStateValue(NStatesVar int, StatesVar []gtk.Acces
360 // Gets the ID of the @buildable object.521 // Gets the ID of the @buildable object.
361 //522 //
362 // `GtkBuilder` sets the name based on the ID attribute523 // `GtkBuilder` sets the name based on the ID attribute
363-// of the <object> tag used to construct the @buildable.524+// of the `<object>` tag used to construct the @buildable.
364 func (x *PreferencesPage) GetBuildableId() string {525 func (x *PreferencesPage) GetBuildableId() string {
365 526
366 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())527 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
@@ -380,6 +541,7 @@ func init() {
380 core.PuregoSafeRegister(&xNewPreferencesPage, lib, "adw_preferences_page_new")541 core.PuregoSafeRegister(&xNewPreferencesPage, lib, "adw_preferences_page_new")
381 542
382 core.PuregoSafeRegister(&xPreferencesPageAdd, lib, "adw_preferences_page_add")543 core.PuregoSafeRegister(&xPreferencesPageAdd, lib, "adw_preferences_page_add")
544+ core.PuregoSafeRegister(&xPreferencesPageGetBanner, lib, "adw_preferences_page_get_banner")
383 core.PuregoSafeRegister(&xPreferencesPageGetDescription, lib, "adw_preferences_page_get_description")545 core.PuregoSafeRegister(&xPreferencesPageGetDescription, lib, "adw_preferences_page_get_description")
384 core.PuregoSafeRegister(&xPreferencesPageGetDescriptionCentered, lib, "adw_preferences_page_get_description_centered")546 core.PuregoSafeRegister(&xPreferencesPageGetDescriptionCentered, lib, "adw_preferences_page_get_description_centered")
385 core.PuregoSafeRegister(&xPreferencesPageGetIconName, lib, "adw_preferences_page_get_icon_name")547 core.PuregoSafeRegister(&xPreferencesPageGetIconName, lib, "adw_preferences_page_get_icon_name")
@@ -388,6 +550,7 @@ func init() {
388 core.PuregoSafeRegister(&xPreferencesPageGetUseUnderline, lib, "adw_preferences_page_get_use_underline")550 core.PuregoSafeRegister(&xPreferencesPageGetUseUnderline, lib, "adw_preferences_page_get_use_underline")
389 core.PuregoSafeRegister(&xPreferencesPageRemove, lib, "adw_preferences_page_remove")551 core.PuregoSafeRegister(&xPreferencesPageRemove, lib, "adw_preferences_page_remove")
390 core.PuregoSafeRegister(&xPreferencesPageScrollToTop, lib, "adw_preferences_page_scroll_to_top")552 core.PuregoSafeRegister(&xPreferencesPageScrollToTop, lib, "adw_preferences_page_scroll_to_top")
553+ core.PuregoSafeRegister(&xPreferencesPageSetBanner, lib, "adw_preferences_page_set_banner")
391 core.PuregoSafeRegister(&xPreferencesPageSetDescription, lib, "adw_preferences_page_set_description")554 core.PuregoSafeRegister(&xPreferencesPageSetDescription, lib, "adw_preferences_page_set_description")
392 core.PuregoSafeRegister(&xPreferencesPageSetDescriptionCentered, lib, "adw_preferences_page_set_description_centered")555 core.PuregoSafeRegister(&xPreferencesPageSetDescriptionCentered, lib, "adw_preferences_page_set_description_centered")
393 core.PuregoSafeRegister(&xPreferencesPageSetIconName, lib, "adw_preferences_page_set_icon_name")556 core.PuregoSafeRegister(&xPreferencesPageSetIconName, lib, "adw_preferences_page_set_icon_name")
M v4/adw/adw-preferences-row.go +145 -10
@@ -159,34 +159,165 @@ func (c *PreferencesRow) SetGoPointer(ptr uintptr) {
159 c.Ptr = ptr159 c.Ptr = ptr
160 }160 }
161 161
162-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.162+// Requests the user's screen reader to announce the given message.
163+//
164+// This kind of notification is useful for messages that
165+// either have only a visual representation or that are not
166+// exposed visually at all, e.g. a notification about a
167+// successful operation.
168+//
169+// Also, by using this API, you can ensure that the message
170+// does not interrupts the user's current screen reader output.
171+func (x *PreferencesRow) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
172+
173+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
174+
175+}
176+
177+// Retrieves the accessible parent for an accessible object.
178+//
179+// This function returns `NULL` for top level widgets.
180+func (x *PreferencesRow) GetAccessibleParent() *gtk.AccessibleBase {
181+ var cls *gtk.AccessibleBase
182+
183+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
184+
185+ if cret == 0 {
186+ return nil
187+ }
188+ cls = &gtk.AccessibleBase{}
189+ cls.Ptr = cret
190+ return cls
191+}
192+
193+// Retrieves the accessible role of an accessible object.
163 func (x *PreferencesRow) GetAccessibleRole() gtk.AccessibleRole {194 func (x *PreferencesRow) GetAccessibleRole() gtk.AccessibleRole {
164 195
165 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())196 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
166 return cret197 return cret
167 }198 }
168 199
169-// Resets the accessible @property to its default value.200+// Retrieves the implementation for the given accessible object.
201+func (x *PreferencesRow) GetAtContext() *gtk.ATContext {
202+ var cls *gtk.ATContext
203+
204+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
205+
206+ if cret == 0 {
207+ return nil
208+ }
209+ cls = &gtk.ATContext{}
210+ cls.Ptr = cret
211+ return cls
212+}
213+
214+// Queries the coordinates and dimensions of this accessible
215+//
216+// This functionality can be overridden by `GtkAccessible`
217+// implementations, e.g. to get the bounds from an ignored
218+// child widget.
219+func (x *PreferencesRow) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
220+
221+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
222+ return cret
223+}
224+
225+// Retrieves the first accessible child of an accessible object.
226+func (x *PreferencesRow) GetFirstAccessibleChild() *gtk.AccessibleBase {
227+ var cls *gtk.AccessibleBase
228+
229+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
230+
231+ if cret == 0 {
232+ return nil
233+ }
234+ cls = &gtk.AccessibleBase{}
235+ cls.Ptr = cret
236+ return cls
237+}
238+
239+// Retrieves the next accessible sibling of an accessible object
240+func (x *PreferencesRow) GetNextAccessibleSibling() *gtk.AccessibleBase {
241+ var cls *gtk.AccessibleBase
242+
243+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
244+
245+ if cret == 0 {
246+ return nil
247+ }
248+ cls = &gtk.AccessibleBase{}
249+ cls.Ptr = cret
250+ return cls
251+}
252+
253+// Queries a platform state, such as focus.
254+//
255+// This functionality can be overridden by `GtkAccessible`
256+// implementations, e.g. to get platform state from an ignored
257+// child widget, as is the case for `GtkText` wrappers.
258+func (x *PreferencesRow) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
259+
260+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
261+ return cret
262+}
263+
264+// Resets the accessible property to its default value.
170 func (x *PreferencesRow) ResetProperty(PropertyVar gtk.AccessibleProperty) {265 func (x *PreferencesRow) ResetProperty(PropertyVar gtk.AccessibleProperty) {
171 266
172 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)267 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
173 268
174 }269 }
175 270
176-// Resets the accessible @relation to its default value.271+// Resets the accessible relation to its default value.
177 func (x *PreferencesRow) ResetRelation(RelationVar gtk.AccessibleRelation) {272 func (x *PreferencesRow) ResetRelation(RelationVar gtk.AccessibleRelation) {
178 273
179 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)274 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
180 275
181 }276 }
182 277
183-// Resets the accessible @state to its default value.278+// Resets the accessible state to its default value.
184 func (x *PreferencesRow) ResetState(StateVar gtk.AccessibleState) {279 func (x *PreferencesRow) ResetState(StateVar gtk.AccessibleState) {
185 280
186 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)281 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
187 282
188 }283 }
189 284
285+// Sets the parent and sibling of an accessible object.
286+//
287+// This function is meant to be used by accessible implementations that are
288+// not part of the widget hierarchy, and but act as a logical bridge between
289+// widgets. For instance, if a widget creates an object that holds metadata
290+// for each child, and you want that object to implement the `GtkAccessible`
291+// interface, you will use this function to ensure that the parent of each
292+// child widget is the metadata object, and the parent of each metadata
293+// object is the container widget.
294+func (x *PreferencesRow) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
295+
296+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
297+
298+}
299+
300+// Updates the next accessible sibling.
301+//
302+// That might be useful when a new child of a custom accessible
303+// is created, and it needs to be linked to a previous child.
304+func (x *PreferencesRow) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
305+
306+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
307+
308+}
309+
310+// Informs ATs that the platform state has changed.
311+//
312+// This function should be used by `GtkAccessible` implementations that
313+// have a platform state but are not widgets. Widgets handle platform
314+// states automatically.
315+func (x *PreferencesRow) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
316+
317+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
318+
319+}
320+
190 // Updates a list of accessible properties.321 // Updates a list of accessible properties.
191 //322 //
192 // See the [enum@Gtk.AccessibleProperty] documentation for the323 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -229,7 +360,7 @@ func (x *PreferencesRow) UpdatePropertyValue(NPropertiesVar int, PropertiesVar [
229 // relation change must be communicated to assistive technologies.360 // relation change must be communicated to assistive technologies.
230 //361 //
231 // If the [enum@Gtk.AccessibleRelation] requires a list of references,362 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
232-// you should pass each reference individually, followed by %NULL, e.g.363+// you should pass each reference individually, followed by `NULL`, e.g.
233 //364 //
234 // ```c365 // ```c
235 // gtk_accessible_update_relation (accessible,366 // gtk_accessible_update_relation (accessible,
@@ -259,13 +390,17 @@ func (x *PreferencesRow) UpdateRelationValue(NRelationsVar int, RelationsVar []g
259 390
260 }391 }
261 392
262-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]393+// Updates a list of accessible states.
263-// documentation for the value types of accessible states.
264 //394 //
265-// This function should be called by `GtkWidget` types whenever an accessible395+// See the [enum@Gtk.AccessibleState] documentation for the
266-// state change must be communicated to assistive technologies.396+// value types of accessible states.
397+//
398+// This function should be called by `GtkWidget` types whenever
399+// an accessible state change must be communicated to assistive
400+// technologies.
267 //401 //
268 // Example:402 // Example:
403+//
269 // ```c404 // ```c
270 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;405 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
271 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),406 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -378,7 +513,7 @@ func (x *PreferencesRow) SetDetailedActionName(DetailedActionNameVar string) {
378 // Gets the ID of the @buildable object.513 // Gets the ID of the @buildable object.
379 //514 //
380 // `GtkBuilder` sets the name based on the ID attribute515 // `GtkBuilder` sets the name based on the ID attribute
381-// of the <object> tag used to construct the @buildable.516+// of the `<object>` tag used to construct the @buildable.
382 func (x *PreferencesRow) GetBuildableId() string {517 func (x *PreferencesRow) GetBuildableId() string {
383 518
384 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())519 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-preferences-window.go +145 -10
@@ -253,34 +253,165 @@ func (c *PreferencesWindow) SetGoPointer(ptr uintptr) {
253 c.Ptr = ptr253 c.Ptr = ptr
254 }254 }
255 255
256-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.256+// Requests the user's screen reader to announce the given message.
257+//
258+// This kind of notification is useful for messages that
259+// either have only a visual representation or that are not
260+// exposed visually at all, e.g. a notification about a
261+// successful operation.
262+//
263+// Also, by using this API, you can ensure that the message
264+// does not interrupts the user's current screen reader output.
265+func (x *PreferencesWindow) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
266+
267+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
268+
269+}
270+
271+// Retrieves the accessible parent for an accessible object.
272+//
273+// This function returns `NULL` for top level widgets.
274+func (x *PreferencesWindow) GetAccessibleParent() *gtk.AccessibleBase {
275+ var cls *gtk.AccessibleBase
276+
277+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
278+
279+ if cret == 0 {
280+ return nil
281+ }
282+ cls = &gtk.AccessibleBase{}
283+ cls.Ptr = cret
284+ return cls
285+}
286+
287+// Retrieves the accessible role of an accessible object.
257 func (x *PreferencesWindow) GetAccessibleRole() gtk.AccessibleRole {288 func (x *PreferencesWindow) GetAccessibleRole() gtk.AccessibleRole {
258 289
259 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())290 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
260 return cret291 return cret
261 }292 }
262 293
263-// Resets the accessible @property to its default value.294+// Retrieves the implementation for the given accessible object.
295+func (x *PreferencesWindow) GetAtContext() *gtk.ATContext {
296+ var cls *gtk.ATContext
297+
298+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
299+
300+ if cret == 0 {
301+ return nil
302+ }
303+ cls = &gtk.ATContext{}
304+ cls.Ptr = cret
305+ return cls
306+}
307+
308+// Queries the coordinates and dimensions of this accessible
309+//
310+// This functionality can be overridden by `GtkAccessible`
311+// implementations, e.g. to get the bounds from an ignored
312+// child widget.
313+func (x *PreferencesWindow) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
314+
315+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
316+ return cret
317+}
318+
319+// Retrieves the first accessible child of an accessible object.
320+func (x *PreferencesWindow) GetFirstAccessibleChild() *gtk.AccessibleBase {
321+ var cls *gtk.AccessibleBase
322+
323+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
324+
325+ if cret == 0 {
326+ return nil
327+ }
328+ cls = &gtk.AccessibleBase{}
329+ cls.Ptr = cret
330+ return cls
331+}
332+
333+// Retrieves the next accessible sibling of an accessible object
334+func (x *PreferencesWindow) GetNextAccessibleSibling() *gtk.AccessibleBase {
335+ var cls *gtk.AccessibleBase
336+
337+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
338+
339+ if cret == 0 {
340+ return nil
341+ }
342+ cls = &gtk.AccessibleBase{}
343+ cls.Ptr = cret
344+ return cls
345+}
346+
347+// Queries a platform state, such as focus.
348+//
349+// This functionality can be overridden by `GtkAccessible`
350+// implementations, e.g. to get platform state from an ignored
351+// child widget, as is the case for `GtkText` wrappers.
352+func (x *PreferencesWindow) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
353+
354+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
355+ return cret
356+}
357+
358+// Resets the accessible property to its default value.
264 func (x *PreferencesWindow) ResetProperty(PropertyVar gtk.AccessibleProperty) {359 func (x *PreferencesWindow) ResetProperty(PropertyVar gtk.AccessibleProperty) {
265 360
266 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)361 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
267 362
268 }363 }
269 364
270-// Resets the accessible @relation to its default value.365+// Resets the accessible relation to its default value.
271 func (x *PreferencesWindow) ResetRelation(RelationVar gtk.AccessibleRelation) {366 func (x *PreferencesWindow) ResetRelation(RelationVar gtk.AccessibleRelation) {
272 367
273 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)368 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
274 369
275 }370 }
276 371
277-// Resets the accessible @state to its default value.372+// Resets the accessible state to its default value.
278 func (x *PreferencesWindow) ResetState(StateVar gtk.AccessibleState) {373 func (x *PreferencesWindow) ResetState(StateVar gtk.AccessibleState) {
279 374
280 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)375 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
281 376
282 }377 }
283 378
379+// Sets the parent and sibling of an accessible object.
380+//
381+// This function is meant to be used by accessible implementations that are
382+// not part of the widget hierarchy, and but act as a logical bridge between
383+// widgets. For instance, if a widget creates an object that holds metadata
384+// for each child, and you want that object to implement the `GtkAccessible`
385+// interface, you will use this function to ensure that the parent of each
386+// child widget is the metadata object, and the parent of each metadata
387+// object is the container widget.
388+func (x *PreferencesWindow) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
389+
390+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
391+
392+}
393+
394+// Updates the next accessible sibling.
395+//
396+// That might be useful when a new child of a custom accessible
397+// is created, and it needs to be linked to a previous child.
398+func (x *PreferencesWindow) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
399+
400+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
401+
402+}
403+
404+// Informs ATs that the platform state has changed.
405+//
406+// This function should be used by `GtkAccessible` implementations that
407+// have a platform state but are not widgets. Widgets handle platform
408+// states automatically.
409+func (x *PreferencesWindow) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
410+
411+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
412+
413+}
414+
284 // Updates a list of accessible properties.415 // Updates a list of accessible properties.
285 //416 //
286 // See the [enum@Gtk.AccessibleProperty] documentation for the417 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -323,7 +454,7 @@ func (x *PreferencesWindow) UpdatePropertyValue(NPropertiesVar int, PropertiesVa
323 // relation change must be communicated to assistive technologies.454 // relation change must be communicated to assistive technologies.
324 //455 //
325 // If the [enum@Gtk.AccessibleRelation] requires a list of references,456 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
326-// you should pass each reference individually, followed by %NULL, e.g.457+// you should pass each reference individually, followed by `NULL`, e.g.
327 //458 //
328 // ```c459 // ```c
329 // gtk_accessible_update_relation (accessible,460 // gtk_accessible_update_relation (accessible,
@@ -353,13 +484,17 @@ func (x *PreferencesWindow) UpdateRelationValue(NRelationsVar int, RelationsVar
353 484
354 }485 }
355 486
356-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]487+// Updates a list of accessible states.
357-// documentation for the value types of accessible states.
358 //488 //
359-// This function should be called by `GtkWidget` types whenever an accessible489+// See the [enum@Gtk.AccessibleState] documentation for the
360-// state change must be communicated to assistive technologies.490+// value types of accessible states.
491+//
492+// This function should be called by `GtkWidget` types whenever
493+// an accessible state change must be communicated to assistive
494+// technologies.
361 //495 //
362 // Example:496 // Example:
497+//
363 // ```c498 // ```c
364 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;499 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
365 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),500 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -389,7 +524,7 @@ func (x *PreferencesWindow) UpdateStateValue(NStatesVar int, StatesVar []gtk.Acc
389 // Gets the ID of the @buildable object.524 // Gets the ID of the @buildable object.
390 //525 //
391 // `GtkBuilder` sets the name based on the ID attribute526 // `GtkBuilder` sets the name based on the ID attribute
392-// of the <object> tag used to construct the @buildable.527+// of the `<object>` tag used to construct the @buildable.
393 func (x *PreferencesWindow) GetBuildableId() string {528 func (x *PreferencesWindow) GetBuildableId() string {
394 529
395 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())530 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-spin-row.go +187 -10
@@ -392,34 +392,165 @@ func (x *SpinRow) ConnectWrapped(cb *func(SpinRow)) uint32 {
392 return gobject.SignalConnect(x.GoPointer(), "wrapped", cbRefPtr)392 return gobject.SignalConnect(x.GoPointer(), "wrapped", cbRefPtr)
393 }393 }
394 394
395-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.395+// Requests the user's screen reader to announce the given message.
396+//
397+// This kind of notification is useful for messages that
398+// either have only a visual representation or that are not
399+// exposed visually at all, e.g. a notification about a
400+// successful operation.
401+//
402+// Also, by using this API, you can ensure that the message
403+// does not interrupts the user's current screen reader output.
404+func (x *SpinRow) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
405+
406+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
407+
408+}
409+
410+// Retrieves the accessible parent for an accessible object.
411+//
412+// This function returns `NULL` for top level widgets.
413+func (x *SpinRow) GetAccessibleParent() *gtk.AccessibleBase {
414+ var cls *gtk.AccessibleBase
415+
416+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
417+
418+ if cret == 0 {
419+ return nil
420+ }
421+ cls = &gtk.AccessibleBase{}
422+ cls.Ptr = cret
423+ return cls
424+}
425+
426+// Retrieves the accessible role of an accessible object.
396 func (x *SpinRow) GetAccessibleRole() gtk.AccessibleRole {427 func (x *SpinRow) GetAccessibleRole() gtk.AccessibleRole {
397 428
398 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())429 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
399 return cret430 return cret
400 }431 }
401 432
402-// Resets the accessible @property to its default value.433+// Retrieves the implementation for the given accessible object.
434+func (x *SpinRow) GetAtContext() *gtk.ATContext {
435+ var cls *gtk.ATContext
436+
437+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
438+
439+ if cret == 0 {
440+ return nil
441+ }
442+ cls = &gtk.ATContext{}
443+ cls.Ptr = cret
444+ return cls
445+}
446+
447+// Queries the coordinates and dimensions of this accessible
448+//
449+// This functionality can be overridden by `GtkAccessible`
450+// implementations, e.g. to get the bounds from an ignored
451+// child widget.
452+func (x *SpinRow) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
453+
454+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
455+ return cret
456+}
457+
458+// Retrieves the first accessible child of an accessible object.
459+func (x *SpinRow) GetFirstAccessibleChild() *gtk.AccessibleBase {
460+ var cls *gtk.AccessibleBase
461+
462+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
463+
464+ if cret == 0 {
465+ return nil
466+ }
467+ cls = &gtk.AccessibleBase{}
468+ cls.Ptr = cret
469+ return cls
470+}
471+
472+// Retrieves the next accessible sibling of an accessible object
473+func (x *SpinRow) GetNextAccessibleSibling() *gtk.AccessibleBase {
474+ var cls *gtk.AccessibleBase
475+
476+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
477+
478+ if cret == 0 {
479+ return nil
480+ }
481+ cls = &gtk.AccessibleBase{}
482+ cls.Ptr = cret
483+ return cls
484+}
485+
486+// Queries a platform state, such as focus.
487+//
488+// This functionality can be overridden by `GtkAccessible`
489+// implementations, e.g. to get platform state from an ignored
490+// child widget, as is the case for `GtkText` wrappers.
491+func (x *SpinRow) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
492+
493+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
494+ return cret
495+}
496+
497+// Resets the accessible property to its default value.
403 func (x *SpinRow) ResetProperty(PropertyVar gtk.AccessibleProperty) {498 func (x *SpinRow) ResetProperty(PropertyVar gtk.AccessibleProperty) {
404 499
405 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)500 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
406 501
407 }502 }
408 503
409-// Resets the accessible @relation to its default value.504+// Resets the accessible relation to its default value.
410 func (x *SpinRow) ResetRelation(RelationVar gtk.AccessibleRelation) {505 func (x *SpinRow) ResetRelation(RelationVar gtk.AccessibleRelation) {
411 506
412 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)507 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
413 508
414 }509 }
415 510
416-// Resets the accessible @state to its default value.511+// Resets the accessible state to its default value.
417 func (x *SpinRow) ResetState(StateVar gtk.AccessibleState) {512 func (x *SpinRow) ResetState(StateVar gtk.AccessibleState) {
418 513
419 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)514 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
420 515
421 }516 }
422 517
518+// Sets the parent and sibling of an accessible object.
519+//
520+// This function is meant to be used by accessible implementations that are
521+// not part of the widget hierarchy, and but act as a logical bridge between
522+// widgets. For instance, if a widget creates an object that holds metadata
523+// for each child, and you want that object to implement the `GtkAccessible`
524+// interface, you will use this function to ensure that the parent of each
525+// child widget is the metadata object, and the parent of each metadata
526+// object is the container widget.
527+func (x *SpinRow) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
528+
529+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
530+
531+}
532+
533+// Updates the next accessible sibling.
534+//
535+// That might be useful when a new child of a custom accessible
536+// is created, and it needs to be linked to a previous child.
537+func (x *SpinRow) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
538+
539+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
540+
541+}
542+
543+// Informs ATs that the platform state has changed.
544+//
545+// This function should be used by `GtkAccessible` implementations that
546+// have a platform state but are not widgets. Widgets handle platform
547+// states automatically.
548+func (x *SpinRow) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
549+
550+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
551+
552+}
553+
423 // Updates a list of accessible properties.554 // Updates a list of accessible properties.
424 //555 //
425 // See the [enum@Gtk.AccessibleProperty] documentation for the556 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -462,7 +593,7 @@ func (x *SpinRow) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.Ac
462 // relation change must be communicated to assistive technologies.593 // relation change must be communicated to assistive technologies.
463 //594 //
464 // If the [enum@Gtk.AccessibleRelation] requires a list of references,595 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
465-// you should pass each reference individually, followed by %NULL, e.g.596+// you should pass each reference individually, followed by `NULL`, e.g.
466 //597 //
467 // ```c598 // ```c
468 // gtk_accessible_update_relation (accessible,599 // gtk_accessible_update_relation (accessible,
@@ -492,13 +623,17 @@ func (x *SpinRow) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.Acce
492 623
493 }624 }
494 625
495-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]626+// Updates a list of accessible states.
496-// documentation for the value types of accessible states.
497 //627 //
498-// This function should be called by `GtkWidget` types whenever an accessible628+// See the [enum@Gtk.AccessibleState] documentation for the
499-// state change must be communicated to assistive technologies.629+// value types of accessible states.
630+//
631+// This function should be called by `GtkWidget` types whenever
632+// an accessible state change must be communicated to assistive
633+// technologies.
500 //634 //
501 // Example:635 // Example:
636+//
502 // ```c637 // ```c
503 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;638 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
504 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),639 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -611,13 +746,55 @@ func (x *SpinRow) SetDetailedActionName(DetailedActionNameVar string) {
611 // Gets the ID of the @buildable object.746 // Gets the ID of the @buildable object.
612 //747 //
613 // `GtkBuilder` sets the name based on the ID attribute748 // `GtkBuilder` sets the name based on the ID attribute
614-// of the <object> tag used to construct the @buildable.749+// of the `<object>` tag used to construct the @buildable.
615 func (x *SpinRow) GetBuildableId() string {750 func (x *SpinRow) GetBuildableId() string {
616 751
617 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())752 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
618 return cret753 return cret
619 }754 }
620 755
756+// Retrieves the accessible platform state from the editable delegate.
757+//
758+// This is an helper function to retrieve the accessible state for
759+// `GtkEditable` interface implementations using a delegate pattern.
760+//
761+// You should call this function in your editable widget implementation
762+// of the [vfunc@Gtk.Accessible.get_platform_state] virtual function, for
763+// instance:
764+//
765+// ```c
766+// static void
767+// accessible_interface_init (GtkAccessibleInterface *iface)
768+//
769+// {
770+// iface->get_platform_state = your_editable_get_accessible_platform_state;
771+// }
772+//
773+// static gboolean
774+// your_editable_get_accessible_platform_state (GtkAccessible *accessible,
775+//
776+// GtkAccessiblePlatformState state)
777+//
778+// {
779+// return gtk_editable_delegate_get_accessible_platform_state (GTK_EDITABLE (accessible), state);
780+// }
781+//
782+// ```
783+//
784+// Note that the widget which is the delegate *must* be a direct child of
785+// this widget, otherwise your implementation of [vfunc@Gtk.Accessible.get_platform_state]
786+// might not even be called, as the platform change will originate from
787+// the parent of the delegate, and, as a result, will not work properly.
788+//
789+// So, if you can't ensure the direct child condition, you should give the
790+// delegate the %GTK_ACCESSIBLE_ROLE_TEXT_BOX role, or you can
791+// change your tree to allow this function to work.
792+func (x *SpinRow) DelegateGetAccessiblePlatformState(StateVar gtk.AccessiblePlatformState) bool {
793+
794+ cret := gtk.XGtkEditableDelegateGetAccessiblePlatformState(x.GoPointer(), StateVar)
795+ return cret
796+}
797+
621 // Deletes the currently selected text of the editable.798 // Deletes the currently selected text of the editable.
622 //799 //
623 // This call doesn’t do anything if there is no selected text.800 // This call doesn’t do anything if there is no selected text.
M v4/adw/adw-spinner.go +149 -10
@@ -58,6 +58,10 @@ func (x *SpinnerClass) GoPointer() uintptr {
58 //58 //
59 // `AdwSpinner` has a single node with the name `image` and the style class59 // `AdwSpinner` has a single node with the name `image` and the style class
60 // `.spinner`.60 // `.spinner`.
61+//
62+// ## Accessibility
63+//
64+// `AdwSpinner` uses the [enum@Gtk.AccessibleRole.progress-bar] role.
61 type Spinner struct {65 type Spinner struct {
62 gtk.Widget66 gtk.Widget
63 }67 }
@@ -102,34 +106,165 @@ func (c *Spinner) SetGoPointer(ptr uintptr) {
102 c.Ptr = ptr106 c.Ptr = ptr
103 }107 }
104 108
105-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.109+// Requests the user's screen reader to announce the given message.
110+//
111+// This kind of notification is useful for messages that
112+// either have only a visual representation or that are not
113+// exposed visually at all, e.g. a notification about a
114+// successful operation.
115+//
116+// Also, by using this API, you can ensure that the message
117+// does not interrupts the user's current screen reader output.
118+func (x *Spinner) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
119+
120+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
121+
122+}
123+
124+// Retrieves the accessible parent for an accessible object.
125+//
126+// This function returns `NULL` for top level widgets.
127+func (x *Spinner) GetAccessibleParent() *gtk.AccessibleBase {
128+ var cls *gtk.AccessibleBase
129+
130+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
131+
132+ if cret == 0 {
133+ return nil
134+ }
135+ cls = &gtk.AccessibleBase{}
136+ cls.Ptr = cret
137+ return cls
138+}
139+
140+// Retrieves the accessible role of an accessible object.
106 func (x *Spinner) GetAccessibleRole() gtk.AccessibleRole {141 func (x *Spinner) GetAccessibleRole() gtk.AccessibleRole {
107 142
108 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())143 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
109 return cret144 return cret
110 }145 }
111 146
112-// Resets the accessible @property to its default value.147+// Retrieves the implementation for the given accessible object.
148+func (x *Spinner) GetAtContext() *gtk.ATContext {
149+ var cls *gtk.ATContext
150+
151+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
152+
153+ if cret == 0 {
154+ return nil
155+ }
156+ cls = &gtk.ATContext{}
157+ cls.Ptr = cret
158+ return cls
159+}
160+
161+// Queries the coordinates and dimensions of this accessible
162+//
163+// This functionality can be overridden by `GtkAccessible`
164+// implementations, e.g. to get the bounds from an ignored
165+// child widget.
166+func (x *Spinner) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
167+
168+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
169+ return cret
170+}
171+
172+// Retrieves the first accessible child of an accessible object.
173+func (x *Spinner) GetFirstAccessibleChild() *gtk.AccessibleBase {
174+ var cls *gtk.AccessibleBase
175+
176+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
177+
178+ if cret == 0 {
179+ return nil
180+ }
181+ cls = &gtk.AccessibleBase{}
182+ cls.Ptr = cret
183+ return cls
184+}
185+
186+// Retrieves the next accessible sibling of an accessible object
187+func (x *Spinner) GetNextAccessibleSibling() *gtk.AccessibleBase {
188+ var cls *gtk.AccessibleBase
189+
190+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
191+
192+ if cret == 0 {
193+ return nil
194+ }
195+ cls = &gtk.AccessibleBase{}
196+ cls.Ptr = cret
197+ return cls
198+}
199+
200+// Queries a platform state, such as focus.
201+//
202+// This functionality can be overridden by `GtkAccessible`
203+// implementations, e.g. to get platform state from an ignored
204+// child widget, as is the case for `GtkText` wrappers.
205+func (x *Spinner) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
206+
207+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
208+ return cret
209+}
210+
211+// Resets the accessible property to its default value.
113 func (x *Spinner) ResetProperty(PropertyVar gtk.AccessibleProperty) {212 func (x *Spinner) ResetProperty(PropertyVar gtk.AccessibleProperty) {
114 213
115 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)214 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
116 215
117 }216 }
118 217
119-// Resets the accessible @relation to its default value.218+// Resets the accessible relation to its default value.
120 func (x *Spinner) ResetRelation(RelationVar gtk.AccessibleRelation) {219 func (x *Spinner) ResetRelation(RelationVar gtk.AccessibleRelation) {
121 220
122 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)221 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
123 222
124 }223 }
125 224
126-// Resets the accessible @state to its default value.225+// Resets the accessible state to its default value.
127 func (x *Spinner) ResetState(StateVar gtk.AccessibleState) {226 func (x *Spinner) ResetState(StateVar gtk.AccessibleState) {
128 227
129 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)228 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
130 229
131 }230 }
132 231
232+// Sets the parent and sibling of an accessible object.
233+//
234+// This function is meant to be used by accessible implementations that are
235+// not part of the widget hierarchy, and but act as a logical bridge between
236+// widgets. For instance, if a widget creates an object that holds metadata
237+// for each child, and you want that object to implement the `GtkAccessible`
238+// interface, you will use this function to ensure that the parent of each
239+// child widget is the metadata object, and the parent of each metadata
240+// object is the container widget.
241+func (x *Spinner) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
242+
243+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
244+
245+}
246+
247+// Updates the next accessible sibling.
248+//
249+// That might be useful when a new child of a custom accessible
250+// is created, and it needs to be linked to a previous child.
251+func (x *Spinner) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
252+
253+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
254+
255+}
256+
257+// Informs ATs that the platform state has changed.
258+//
259+// This function should be used by `GtkAccessible` implementations that
260+// have a platform state but are not widgets. Widgets handle platform
261+// states automatically.
262+func (x *Spinner) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
263+
264+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
265+
266+}
267+
133 // Updates a list of accessible properties.268 // Updates a list of accessible properties.
134 //269 //
135 // See the [enum@Gtk.AccessibleProperty] documentation for the270 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -172,7 +307,7 @@ func (x *Spinner) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.Ac
172 // relation change must be communicated to assistive technologies.307 // relation change must be communicated to assistive technologies.
173 //308 //
174 // If the [enum@Gtk.AccessibleRelation] requires a list of references,309 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
175-// you should pass each reference individually, followed by %NULL, e.g.310+// you should pass each reference individually, followed by `NULL`, e.g.
176 //311 //
177 // ```c312 // ```c
178 // gtk_accessible_update_relation (accessible,313 // gtk_accessible_update_relation (accessible,
@@ -202,13 +337,17 @@ func (x *Spinner) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.Acce
202 337
203 }338 }
204 339
205-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]340+// Updates a list of accessible states.
206-// documentation for the value types of accessible states.
207 //341 //
208-// This function should be called by `GtkWidget` types whenever an accessible342+// See the [enum@Gtk.AccessibleState] documentation for the
209-// state change must be communicated to assistive technologies.343+// value types of accessible states.
344+//
345+// This function should be called by `GtkWidget` types whenever
346+// an accessible state change must be communicated to assistive
347+// technologies.
210 //348 //
211 // Example:349 // Example:
350+//
212 // ```c351 // ```c
213 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;352 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
214 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),353 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -238,7 +377,7 @@ func (x *Spinner) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleSta
238 // Gets the ID of the @buildable object.377 // Gets the ID of the @buildable object.
239 //378 //
240 // `GtkBuilder` sets the name based on the ID attribute379 // `GtkBuilder` sets the name based on the ID attribute
241-// of the <object> tag used to construct the @buildable.380+// of the `<object>` tag used to construct the @buildable.
242 func (x *Spinner) GetBuildableId() string {381 func (x *Spinner) GetBuildableId() string {
243 382
244 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())383 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-split-button.go +145 -10
@@ -405,34 +405,165 @@ func (x *SplitButton) ConnectClicked(cb *func(SplitButton)) uint32 {
405 return gobject.SignalConnect(x.GoPointer(), "clicked", cbRefPtr)405 return gobject.SignalConnect(x.GoPointer(), "clicked", cbRefPtr)
406 }406 }
407 407
408-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.408+// Requests the user's screen reader to announce the given message.
409+//
410+// This kind of notification is useful for messages that
411+// either have only a visual representation or that are not
412+// exposed visually at all, e.g. a notification about a
413+// successful operation.
414+//
415+// Also, by using this API, you can ensure that the message
416+// does not interrupts the user's current screen reader output.
417+func (x *SplitButton) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
418+
419+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
420+
421+}
422+
423+// Retrieves the accessible parent for an accessible object.
424+//
425+// This function returns `NULL` for top level widgets.
426+func (x *SplitButton) GetAccessibleParent() *gtk.AccessibleBase {
427+ var cls *gtk.AccessibleBase
428+
429+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
430+
431+ if cret == 0 {
432+ return nil
433+ }
434+ cls = &gtk.AccessibleBase{}
435+ cls.Ptr = cret
436+ return cls
437+}
438+
439+// Retrieves the accessible role of an accessible object.
409 func (x *SplitButton) GetAccessibleRole() gtk.AccessibleRole {440 func (x *SplitButton) GetAccessibleRole() gtk.AccessibleRole {
410 441
411 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())442 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
412 return cret443 return cret
413 }444 }
414 445
415-// Resets the accessible @property to its default value.446+// Retrieves the implementation for the given accessible object.
447+func (x *SplitButton) GetAtContext() *gtk.ATContext {
448+ var cls *gtk.ATContext
449+
450+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
451+
452+ if cret == 0 {
453+ return nil
454+ }
455+ cls = &gtk.ATContext{}
456+ cls.Ptr = cret
457+ return cls
458+}
459+
460+// Queries the coordinates and dimensions of this accessible
461+//
462+// This functionality can be overridden by `GtkAccessible`
463+// implementations, e.g. to get the bounds from an ignored
464+// child widget.
465+func (x *SplitButton) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
466+
467+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
468+ return cret
469+}
470+
471+// Retrieves the first accessible child of an accessible object.
472+func (x *SplitButton) GetFirstAccessibleChild() *gtk.AccessibleBase {
473+ var cls *gtk.AccessibleBase
474+
475+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
476+
477+ if cret == 0 {
478+ return nil
479+ }
480+ cls = &gtk.AccessibleBase{}
481+ cls.Ptr = cret
482+ return cls
483+}
484+
485+// Retrieves the next accessible sibling of an accessible object
486+func (x *SplitButton) GetNextAccessibleSibling() *gtk.AccessibleBase {
487+ var cls *gtk.AccessibleBase
488+
489+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
490+
491+ if cret == 0 {
492+ return nil
493+ }
494+ cls = &gtk.AccessibleBase{}
495+ cls.Ptr = cret
496+ return cls
497+}
498+
499+// Queries a platform state, such as focus.
500+//
501+// This functionality can be overridden by `GtkAccessible`
502+// implementations, e.g. to get platform state from an ignored
503+// child widget, as is the case for `GtkText` wrappers.
504+func (x *SplitButton) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
505+
506+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
507+ return cret
508+}
509+
510+// Resets the accessible property to its default value.
416 func (x *SplitButton) ResetProperty(PropertyVar gtk.AccessibleProperty) {511 func (x *SplitButton) ResetProperty(PropertyVar gtk.AccessibleProperty) {
417 512
418 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)513 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
419 514
420 }515 }
421 516
422-// Resets the accessible @relation to its default value.517+// Resets the accessible relation to its default value.
423 func (x *SplitButton) ResetRelation(RelationVar gtk.AccessibleRelation) {518 func (x *SplitButton) ResetRelation(RelationVar gtk.AccessibleRelation) {
424 519
425 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)520 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
426 521
427 }522 }
428 523
429-// Resets the accessible @state to its default value.524+// Resets the accessible state to its default value.
430 func (x *SplitButton) ResetState(StateVar gtk.AccessibleState) {525 func (x *SplitButton) ResetState(StateVar gtk.AccessibleState) {
431 526
432 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)527 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
433 528
434 }529 }
435 530
531+// Sets the parent and sibling of an accessible object.
532+//
533+// This function is meant to be used by accessible implementations that are
534+// not part of the widget hierarchy, and but act as a logical bridge between
535+// widgets. For instance, if a widget creates an object that holds metadata
536+// for each child, and you want that object to implement the `GtkAccessible`
537+// interface, you will use this function to ensure that the parent of each
538+// child widget is the metadata object, and the parent of each metadata
539+// object is the container widget.
540+func (x *SplitButton) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
541+
542+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
543+
544+}
545+
546+// Updates the next accessible sibling.
547+//
548+// That might be useful when a new child of a custom accessible
549+// is created, and it needs to be linked to a previous child.
550+func (x *SplitButton) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
551+
552+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
553+
554+}
555+
556+// Informs ATs that the platform state has changed.
557+//
558+// This function should be used by `GtkAccessible` implementations that
559+// have a platform state but are not widgets. Widgets handle platform
560+// states automatically.
561+func (x *SplitButton) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
562+
563+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
564+
565+}
566+
436 // Updates a list of accessible properties.567 // Updates a list of accessible properties.
437 //568 //
438 // See the [enum@Gtk.AccessibleProperty] documentation for the569 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -475,7 +606,7 @@ func (x *SplitButton) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gt
475 // relation change must be communicated to assistive technologies.606 // relation change must be communicated to assistive technologies.
476 //607 //
477 // If the [enum@Gtk.AccessibleRelation] requires a list of references,608 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
478-// you should pass each reference individually, followed by %NULL, e.g.609+// you should pass each reference individually, followed by `NULL`, e.g.
479 //610 //
480 // ```c611 // ```c
481 // gtk_accessible_update_relation (accessible,612 // gtk_accessible_update_relation (accessible,
@@ -505,13 +636,17 @@ func (x *SplitButton) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.
505 636
506 }637 }
507 638
508-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]639+// Updates a list of accessible states.
509-// documentation for the value types of accessible states.
510 //640 //
511-// This function should be called by `GtkWidget` types whenever an accessible641+// See the [enum@Gtk.AccessibleState] documentation for the
512-// state change must be communicated to assistive technologies.642+// value types of accessible states.
643+//
644+// This function should be called by `GtkWidget` types whenever
645+// an accessible state change must be communicated to assistive
646+// technologies.
513 //647 //
514 // Example:648 // Example:
649+//
515 // ```c650 // ```c
516 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;651 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
517 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),652 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -624,7 +759,7 @@ func (x *SplitButton) SetDetailedActionName(DetailedActionNameVar string) {
624 // Gets the ID of the @buildable object.759 // Gets the ID of the @buildable object.
625 //760 //
626 // `GtkBuilder` sets the name based on the ID attribute761 // `GtkBuilder` sets the name based on the ID attribute
627-// of the <object> tag used to construct the @buildable.762+// of the `<object>` tag used to construct the @buildable.
628 func (x *SplitButton) GetBuildableId() string {763 func (x *SplitButton) GetBuildableId() string {
629 764
630 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())765 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-squeezer.go +145 -10
@@ -389,34 +389,165 @@ func (c *Squeezer) SetGoPointer(ptr uintptr) {
389 c.Ptr = ptr389 c.Ptr = ptr
390 }390 }
391 391
392-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.392+// Requests the user's screen reader to announce the given message.
393+//
394+// This kind of notification is useful for messages that
395+// either have only a visual representation or that are not
396+// exposed visually at all, e.g. a notification about a
397+// successful operation.
398+//
399+// Also, by using this API, you can ensure that the message
400+// does not interrupts the user's current screen reader output.
401+func (x *Squeezer) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
402+
403+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
404+
405+}
406+
407+// Retrieves the accessible parent for an accessible object.
408+//
409+// This function returns `NULL` for top level widgets.
410+func (x *Squeezer) GetAccessibleParent() *gtk.AccessibleBase {
411+ var cls *gtk.AccessibleBase
412+
413+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
414+
415+ if cret == 0 {
416+ return nil
417+ }
418+ cls = &gtk.AccessibleBase{}
419+ cls.Ptr = cret
420+ return cls
421+}
422+
423+// Retrieves the accessible role of an accessible object.
393 func (x *Squeezer) GetAccessibleRole() gtk.AccessibleRole {424 func (x *Squeezer) GetAccessibleRole() gtk.AccessibleRole {
394 425
395 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())426 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
396 return cret427 return cret
397 }428 }
398 429
399-// Resets the accessible @property to its default value.430+// Retrieves the implementation for the given accessible object.
431+func (x *Squeezer) GetAtContext() *gtk.ATContext {
432+ var cls *gtk.ATContext
433+
434+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
435+
436+ if cret == 0 {
437+ return nil
438+ }
439+ cls = &gtk.ATContext{}
440+ cls.Ptr = cret
441+ return cls
442+}
443+
444+// Queries the coordinates and dimensions of this accessible
445+//
446+// This functionality can be overridden by `GtkAccessible`
447+// implementations, e.g. to get the bounds from an ignored
448+// child widget.
449+func (x *Squeezer) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
450+
451+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
452+ return cret
453+}
454+
455+// Retrieves the first accessible child of an accessible object.
456+func (x *Squeezer) GetFirstAccessibleChild() *gtk.AccessibleBase {
457+ var cls *gtk.AccessibleBase
458+
459+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
460+
461+ if cret == 0 {
462+ return nil
463+ }
464+ cls = &gtk.AccessibleBase{}
465+ cls.Ptr = cret
466+ return cls
467+}
468+
469+// Retrieves the next accessible sibling of an accessible object
470+func (x *Squeezer) GetNextAccessibleSibling() *gtk.AccessibleBase {
471+ var cls *gtk.AccessibleBase
472+
473+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
474+
475+ if cret == 0 {
476+ return nil
477+ }
478+ cls = &gtk.AccessibleBase{}
479+ cls.Ptr = cret
480+ return cls
481+}
482+
483+// Queries a platform state, such as focus.
484+//
485+// This functionality can be overridden by `GtkAccessible`
486+// implementations, e.g. to get platform state from an ignored
487+// child widget, as is the case for `GtkText` wrappers.
488+func (x *Squeezer) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
489+
490+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
491+ return cret
492+}
493+
494+// Resets the accessible property to its default value.
400 func (x *Squeezer) ResetProperty(PropertyVar gtk.AccessibleProperty) {495 func (x *Squeezer) ResetProperty(PropertyVar gtk.AccessibleProperty) {
401 496
402 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)497 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
403 498
404 }499 }
405 500
406-// Resets the accessible @relation to its default value.501+// Resets the accessible relation to its default value.
407 func (x *Squeezer) ResetRelation(RelationVar gtk.AccessibleRelation) {502 func (x *Squeezer) ResetRelation(RelationVar gtk.AccessibleRelation) {
408 503
409 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)504 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
410 505
411 }506 }
412 507
413-// Resets the accessible @state to its default value.508+// Resets the accessible state to its default value.
414 func (x *Squeezer) ResetState(StateVar gtk.AccessibleState) {509 func (x *Squeezer) ResetState(StateVar gtk.AccessibleState) {
415 510
416 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)511 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
417 512
418 }513 }
419 514
515+// Sets the parent and sibling of an accessible object.
516+//
517+// This function is meant to be used by accessible implementations that are
518+// not part of the widget hierarchy, and but act as a logical bridge between
519+// widgets. For instance, if a widget creates an object that holds metadata
520+// for each child, and you want that object to implement the `GtkAccessible`
521+// interface, you will use this function to ensure that the parent of each
522+// child widget is the metadata object, and the parent of each metadata
523+// object is the container widget.
524+func (x *Squeezer) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
525+
526+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
527+
528+}
529+
530+// Updates the next accessible sibling.
531+//
532+// That might be useful when a new child of a custom accessible
533+// is created, and it needs to be linked to a previous child.
534+func (x *Squeezer) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
535+
536+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
537+
538+}
539+
540+// Informs ATs that the platform state has changed.
541+//
542+// This function should be used by `GtkAccessible` implementations that
543+// have a platform state but are not widgets. Widgets handle platform
544+// states automatically.
545+func (x *Squeezer) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
546+
547+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
548+
549+}
550+
420 // Updates a list of accessible properties.551 // Updates a list of accessible properties.
421 //552 //
422 // See the [enum@Gtk.AccessibleProperty] documentation for the553 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -459,7 +590,7 @@ func (x *Squeezer) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.A
459 // relation change must be communicated to assistive technologies.590 // relation change must be communicated to assistive technologies.
460 //591 //
461 // If the [enum@Gtk.AccessibleRelation] requires a list of references,592 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
462-// you should pass each reference individually, followed by %NULL, e.g.593+// you should pass each reference individually, followed by `NULL`, e.g.
463 //594 //
464 // ```c595 // ```c
465 // gtk_accessible_update_relation (accessible,596 // gtk_accessible_update_relation (accessible,
@@ -489,13 +620,17 @@ func (x *Squeezer) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.Acc
489 620
490 }621 }
491 622
492-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]623+// Updates a list of accessible states.
493-// documentation for the value types of accessible states.
494 //624 //
495-// This function should be called by `GtkWidget` types whenever an accessible625+// See the [enum@Gtk.AccessibleState] documentation for the
496-// state change must be communicated to assistive technologies.626+// value types of accessible states.
627+//
628+// This function should be called by `GtkWidget` types whenever
629+// an accessible state change must be communicated to assistive
630+// technologies.
497 //631 //
498 // Example:632 // Example:
633+//
499 // ```c634 // ```c
500 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;635 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
501 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),636 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -525,7 +660,7 @@ func (x *Squeezer) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleSt
525 // Gets the ID of the @buildable object.660 // Gets the ID of the @buildable object.
526 //661 //
527 // `GtkBuilder` sets the name based on the ID attribute662 // `GtkBuilder` sets the name based on the ID attribute
528-// of the <object> tag used to construct the @buildable.663+// of the `<object>` tag used to construct the @buildable.
529 func (x *Squeezer) GetBuildableId() string {664 func (x *Squeezer) GetBuildableId() string {
530 665
531 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())666 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-status-page.go +145 -10
@@ -214,34 +214,165 @@ func (c *StatusPage) SetGoPointer(ptr uintptr) {
214 c.Ptr = ptr214 c.Ptr = ptr
215 }215 }
216 216
217-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.217+// Requests the user's screen reader to announce the given message.
218+//
219+// This kind of notification is useful for messages that
220+// either have only a visual representation or that are not
221+// exposed visually at all, e.g. a notification about a
222+// successful operation.
223+//
224+// Also, by using this API, you can ensure that the message
225+// does not interrupts the user's current screen reader output.
226+func (x *StatusPage) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
227+
228+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
229+
230+}
231+
232+// Retrieves the accessible parent for an accessible object.
233+//
234+// This function returns `NULL` for top level widgets.
235+func (x *StatusPage) GetAccessibleParent() *gtk.AccessibleBase {
236+ var cls *gtk.AccessibleBase
237+
238+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
239+
240+ if cret == 0 {
241+ return nil
242+ }
243+ cls = &gtk.AccessibleBase{}
244+ cls.Ptr = cret
245+ return cls
246+}
247+
248+// Retrieves the accessible role of an accessible object.
218 func (x *StatusPage) GetAccessibleRole() gtk.AccessibleRole {249 func (x *StatusPage) GetAccessibleRole() gtk.AccessibleRole {
219 250
220 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())251 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
221 return cret252 return cret
222 }253 }
223 254
224-// Resets the accessible @property to its default value.255+// Retrieves the implementation for the given accessible object.
256+func (x *StatusPage) GetAtContext() *gtk.ATContext {
257+ var cls *gtk.ATContext
258+
259+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
260+
261+ if cret == 0 {
262+ return nil
263+ }
264+ cls = &gtk.ATContext{}
265+ cls.Ptr = cret
266+ return cls
267+}
268+
269+// Queries the coordinates and dimensions of this accessible
270+//
271+// This functionality can be overridden by `GtkAccessible`
272+// implementations, e.g. to get the bounds from an ignored
273+// child widget.
274+func (x *StatusPage) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
275+
276+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
277+ return cret
278+}
279+
280+// Retrieves the first accessible child of an accessible object.
281+func (x *StatusPage) GetFirstAccessibleChild() *gtk.AccessibleBase {
282+ var cls *gtk.AccessibleBase
283+
284+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
285+
286+ if cret == 0 {
287+ return nil
288+ }
289+ cls = &gtk.AccessibleBase{}
290+ cls.Ptr = cret
291+ return cls
292+}
293+
294+// Retrieves the next accessible sibling of an accessible object
295+func (x *StatusPage) GetNextAccessibleSibling() *gtk.AccessibleBase {
296+ var cls *gtk.AccessibleBase
297+
298+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
299+
300+ if cret == 0 {
301+ return nil
302+ }
303+ cls = &gtk.AccessibleBase{}
304+ cls.Ptr = cret
305+ return cls
306+}
307+
308+// Queries a platform state, such as focus.
309+//
310+// This functionality can be overridden by `GtkAccessible`
311+// implementations, e.g. to get platform state from an ignored
312+// child widget, as is the case for `GtkText` wrappers.
313+func (x *StatusPage) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
314+
315+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
316+ return cret
317+}
318+
319+// Resets the accessible property to its default value.
225 func (x *StatusPage) ResetProperty(PropertyVar gtk.AccessibleProperty) {320 func (x *StatusPage) ResetProperty(PropertyVar gtk.AccessibleProperty) {
226 321
227 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)322 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
228 323
229 }324 }
230 325
231-// Resets the accessible @relation to its default value.326+// Resets the accessible relation to its default value.
232 func (x *StatusPage) ResetRelation(RelationVar gtk.AccessibleRelation) {327 func (x *StatusPage) ResetRelation(RelationVar gtk.AccessibleRelation) {
233 328
234 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)329 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
235 330
236 }331 }
237 332
238-// Resets the accessible @state to its default value.333+// Resets the accessible state to its default value.
239 func (x *StatusPage) ResetState(StateVar gtk.AccessibleState) {334 func (x *StatusPage) ResetState(StateVar gtk.AccessibleState) {
240 335
241 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)336 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
242 337
243 }338 }
244 339
340+// Sets the parent and sibling of an accessible object.
341+//
342+// This function is meant to be used by accessible implementations that are
343+// not part of the widget hierarchy, and but act as a logical bridge between
344+// widgets. For instance, if a widget creates an object that holds metadata
345+// for each child, and you want that object to implement the `GtkAccessible`
346+// interface, you will use this function to ensure that the parent of each
347+// child widget is the metadata object, and the parent of each metadata
348+// object is the container widget.
349+func (x *StatusPage) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
350+
351+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
352+
353+}
354+
355+// Updates the next accessible sibling.
356+//
357+// That might be useful when a new child of a custom accessible
358+// is created, and it needs to be linked to a previous child.
359+func (x *StatusPage) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
360+
361+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
362+
363+}
364+
365+// Informs ATs that the platform state has changed.
366+//
367+// This function should be used by `GtkAccessible` implementations that
368+// have a platform state but are not widgets. Widgets handle platform
369+// states automatically.
370+func (x *StatusPage) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
371+
372+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
373+
374+}
375+
245 // Updates a list of accessible properties.376 // Updates a list of accessible properties.
246 //377 //
247 // See the [enum@Gtk.AccessibleProperty] documentation for the378 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -284,7 +415,7 @@ func (x *StatusPage) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk
284 // relation change must be communicated to assistive technologies.415 // relation change must be communicated to assistive technologies.
285 //416 //
286 // If the [enum@Gtk.AccessibleRelation] requires a list of references,417 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
287-// you should pass each reference individually, followed by %NULL, e.g.418+// you should pass each reference individually, followed by `NULL`, e.g.
288 //419 //
289 // ```c420 // ```c
290 // gtk_accessible_update_relation (accessible,421 // gtk_accessible_update_relation (accessible,
@@ -314,13 +445,17 @@ func (x *StatusPage) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.A
314 445
315 }446 }
316 447
317-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]448+// Updates a list of accessible states.
318-// documentation for the value types of accessible states.
319 //449 //
320-// This function should be called by `GtkWidget` types whenever an accessible450+// See the [enum@Gtk.AccessibleState] documentation for the
321-// state change must be communicated to assistive technologies.451+// value types of accessible states.
452+//
453+// This function should be called by `GtkWidget` types whenever
454+// an accessible state change must be communicated to assistive
455+// technologies.
322 //456 //
323 // Example:457 // Example:
458+//
324 // ```c459 // ```c
325 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;460 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
326 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),461 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -350,7 +485,7 @@ func (x *StatusPage) UpdateStateValue(NStatesVar int, StatesVar []gtk.Accessible
350 // Gets the ID of the @buildable object.485 // Gets the ID of the @buildable object.
351 //486 //
352 // `GtkBuilder` sets the name based on the ID attribute487 // `GtkBuilder` sets the name based on the ID attribute
353-// of the <object> tag used to construct the @buildable.488+// of the `<object>` tag used to construct the @buildable.
354 func (x *StatusPage) GetBuildableId() string {489 func (x *StatusPage) GetBuildableId() string {
355 490
356 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())491 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-style-manager.go +30 -0
@@ -141,6 +141,20 @@ func (x *StyleManager) GetDisplay() *gdk.Display {
141 return cls141 return cls
142 }142 }
143 143
144+var xStyleManagerGetDocumentFontName func(uintptr) string
145+
146+// Gets the system document font.
147+//
148+// The font is in the same format as [property@Gtk.Settings:gtk-font-name],
149+// e.g. "Adwaita Sans 11".
150+//
151+// Use [func@Pango.FontDescription.from_string] to parse it.
152+func (x *StyleManager) GetDocumentFontName() string {
153+
154+ cret := xStyleManagerGetDocumentFontName(x.GoPointer())
155+ return cret
156+}
157+
144 var xStyleManagerGetHighContrast func(uintptr) bool158 var xStyleManagerGetHighContrast func(uintptr) bool
145 159
146 // Gets whether the application is using high contrast appearance.160 // Gets whether the application is using high contrast appearance.
@@ -152,6 +166,20 @@ func (x *StyleManager) GetHighContrast() bool {
152 return cret166 return cret
153 }167 }
154 168
169+var xStyleManagerGetMonospaceFontName func(uintptr) string
170+
171+// Gets the system monospace font.
172+//
173+// The font is in the same format as [property@Gtk.Settings:gtk-font-name],
174+// e.g. "Adwaita Mono 11".
175+//
176+// Use [func@Pango.FontDescription.from_string] to parse it.
177+func (x *StyleManager) GetMonospaceFontName() string {
178+
179+ cret := xStyleManagerGetMonospaceFontName(x.GoPointer())
180+ return cret
181+}
182+
155 var xStyleManagerGetSystemSupportsAccentColors func(uintptr) bool183 var xStyleManagerGetSystemSupportsAccentColors func(uintptr) bool
156 184
157 // Gets whether the system supports accent colors.185 // Gets whether the system supports accent colors.
@@ -291,7 +319,9 @@ func init() {
291 core.PuregoSafeRegister(&xStyleManagerGetColorScheme, lib, "adw_style_manager_get_color_scheme")319 core.PuregoSafeRegister(&xStyleManagerGetColorScheme, lib, "adw_style_manager_get_color_scheme")
292 core.PuregoSafeRegister(&xStyleManagerGetDark, lib, "adw_style_manager_get_dark")320 core.PuregoSafeRegister(&xStyleManagerGetDark, lib, "adw_style_manager_get_dark")
293 core.PuregoSafeRegister(&xStyleManagerGetDisplay, lib, "adw_style_manager_get_display")321 core.PuregoSafeRegister(&xStyleManagerGetDisplay, lib, "adw_style_manager_get_display")
322+ core.PuregoSafeRegister(&xStyleManagerGetDocumentFontName, lib, "adw_style_manager_get_document_font_name")
294 core.PuregoSafeRegister(&xStyleManagerGetHighContrast, lib, "adw_style_manager_get_high_contrast")323 core.PuregoSafeRegister(&xStyleManagerGetHighContrast, lib, "adw_style_manager_get_high_contrast")
324+ core.PuregoSafeRegister(&xStyleManagerGetMonospaceFontName, lib, "adw_style_manager_get_monospace_font_name")
295 core.PuregoSafeRegister(&xStyleManagerGetSystemSupportsAccentColors, lib, "adw_style_manager_get_system_supports_accent_colors")325 core.PuregoSafeRegister(&xStyleManagerGetSystemSupportsAccentColors, lib, "adw_style_manager_get_system_supports_accent_colors")
296 core.PuregoSafeRegister(&xStyleManagerGetSystemSupportsColorSchemes, lib, "adw_style_manager_get_system_supports_color_schemes")326 core.PuregoSafeRegister(&xStyleManagerGetSystemSupportsColorSchemes, lib, "adw_style_manager_get_system_supports_color_schemes")
297 core.PuregoSafeRegister(&xStyleManagerSetColorScheme, lib, "adw_style_manager_set_color_scheme")327 core.PuregoSafeRegister(&xStyleManagerSetColorScheme, lib, "adw_style_manager_set_color_scheme")
M v4/adw/adw-switch-row.go +145 -10
@@ -119,34 +119,165 @@ func (c *SwitchRow) SetGoPointer(ptr uintptr) {
119 c.Ptr = ptr119 c.Ptr = ptr
120 }120 }
121 121
122-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.122+// Requests the user's screen reader to announce the given message.
123+//
124+// This kind of notification is useful for messages that
125+// either have only a visual representation or that are not
126+// exposed visually at all, e.g. a notification about a
127+// successful operation.
128+//
129+// Also, by using this API, you can ensure that the message
130+// does not interrupts the user's current screen reader output.
131+func (x *SwitchRow) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
132+
133+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
134+
135+}
136+
137+// Retrieves the accessible parent for an accessible object.
138+//
139+// This function returns `NULL` for top level widgets.
140+func (x *SwitchRow) GetAccessibleParent() *gtk.AccessibleBase {
141+ var cls *gtk.AccessibleBase
142+
143+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
144+
145+ if cret == 0 {
146+ return nil
147+ }
148+ cls = &gtk.AccessibleBase{}
149+ cls.Ptr = cret
150+ return cls
151+}
152+
153+// Retrieves the accessible role of an accessible object.
123 func (x *SwitchRow) GetAccessibleRole() gtk.AccessibleRole {154 func (x *SwitchRow) GetAccessibleRole() gtk.AccessibleRole {
124 155
125 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())156 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
126 return cret157 return cret
127 }158 }
128 159
129-// Resets the accessible @property to its default value.160+// Retrieves the implementation for the given accessible object.
161+func (x *SwitchRow) GetAtContext() *gtk.ATContext {
162+ var cls *gtk.ATContext
163+
164+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
165+
166+ if cret == 0 {
167+ return nil
168+ }
169+ cls = &gtk.ATContext{}
170+ cls.Ptr = cret
171+ return cls
172+}
173+
174+// Queries the coordinates and dimensions of this accessible
175+//
176+// This functionality can be overridden by `GtkAccessible`
177+// implementations, e.g. to get the bounds from an ignored
178+// child widget.
179+func (x *SwitchRow) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
180+
181+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
182+ return cret
183+}
184+
185+// Retrieves the first accessible child of an accessible object.
186+func (x *SwitchRow) GetFirstAccessibleChild() *gtk.AccessibleBase {
187+ var cls *gtk.AccessibleBase
188+
189+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
190+
191+ if cret == 0 {
192+ return nil
193+ }
194+ cls = &gtk.AccessibleBase{}
195+ cls.Ptr = cret
196+ return cls
197+}
198+
199+// Retrieves the next accessible sibling of an accessible object
200+func (x *SwitchRow) GetNextAccessibleSibling() *gtk.AccessibleBase {
201+ var cls *gtk.AccessibleBase
202+
203+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
204+
205+ if cret == 0 {
206+ return nil
207+ }
208+ cls = &gtk.AccessibleBase{}
209+ cls.Ptr = cret
210+ return cls
211+}
212+
213+// Queries a platform state, such as focus.
214+//
215+// This functionality can be overridden by `GtkAccessible`
216+// implementations, e.g. to get platform state from an ignored
217+// child widget, as is the case for `GtkText` wrappers.
218+func (x *SwitchRow) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
219+
220+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
221+ return cret
222+}
223+
224+// Resets the accessible property to its default value.
130 func (x *SwitchRow) ResetProperty(PropertyVar gtk.AccessibleProperty) {225 func (x *SwitchRow) ResetProperty(PropertyVar gtk.AccessibleProperty) {
131 226
132 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)227 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
133 228
134 }229 }
135 230
136-// Resets the accessible @relation to its default value.231+// Resets the accessible relation to its default value.
137 func (x *SwitchRow) ResetRelation(RelationVar gtk.AccessibleRelation) {232 func (x *SwitchRow) ResetRelation(RelationVar gtk.AccessibleRelation) {
138 233
139 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)234 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
140 235
141 }236 }
142 237
143-// Resets the accessible @state to its default value.238+// Resets the accessible state to its default value.
144 func (x *SwitchRow) ResetState(StateVar gtk.AccessibleState) {239 func (x *SwitchRow) ResetState(StateVar gtk.AccessibleState) {
145 240
146 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)241 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
147 242
148 }243 }
149 244
245+// Sets the parent and sibling of an accessible object.
246+//
247+// This function is meant to be used by accessible implementations that are
248+// not part of the widget hierarchy, and but act as a logical bridge between
249+// widgets. For instance, if a widget creates an object that holds metadata
250+// for each child, and you want that object to implement the `GtkAccessible`
251+// interface, you will use this function to ensure that the parent of each
252+// child widget is the metadata object, and the parent of each metadata
253+// object is the container widget.
254+func (x *SwitchRow) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
255+
256+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
257+
258+}
259+
260+// Updates the next accessible sibling.
261+//
262+// That might be useful when a new child of a custom accessible
263+// is created, and it needs to be linked to a previous child.
264+func (x *SwitchRow) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
265+
266+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
267+
268+}
269+
270+// Informs ATs that the platform state has changed.
271+//
272+// This function should be used by `GtkAccessible` implementations that
273+// have a platform state but are not widgets. Widgets handle platform
274+// states automatically.
275+func (x *SwitchRow) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
276+
277+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
278+
279+}
280+
150 // Updates a list of accessible properties.281 // Updates a list of accessible properties.
151 //282 //
152 // See the [enum@Gtk.AccessibleProperty] documentation for the283 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -189,7 +320,7 @@ func (x *SwitchRow) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.
189 // relation change must be communicated to assistive technologies.320 // relation change must be communicated to assistive technologies.
190 //321 //
191 // If the [enum@Gtk.AccessibleRelation] requires a list of references,322 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
192-// you should pass each reference individually, followed by %NULL, e.g.323+// you should pass each reference individually, followed by `NULL`, e.g.
193 //324 //
194 // ```c325 // ```c
195 // gtk_accessible_update_relation (accessible,326 // gtk_accessible_update_relation (accessible,
@@ -219,13 +350,17 @@ func (x *SwitchRow) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.Ac
219 350
220 }351 }
221 352
222-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]353+// Updates a list of accessible states.
223-// documentation for the value types of accessible states.
224 //354 //
225-// This function should be called by `GtkWidget` types whenever an accessible355+// See the [enum@Gtk.AccessibleState] documentation for the
226-// state change must be communicated to assistive technologies.356+// value types of accessible states.
357+//
358+// This function should be called by `GtkWidget` types whenever
359+// an accessible state change must be communicated to assistive
360+// technologies.
227 //361 //
228 // Example:362 // Example:
363+//
229 // ```c364 // ```c
230 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;365 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
231 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),366 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -338,7 +473,7 @@ func (x *SwitchRow) SetDetailedActionName(DetailedActionNameVar string) {
338 // Gets the ID of the @buildable object.473 // Gets the ID of the @buildable object.
339 //474 //
340 // `GtkBuilder` sets the name based on the ID attribute475 // `GtkBuilder` sets the name based on the ID attribute
341-// of the <object> tag used to construct the @buildable.476+// of the `<object>` tag used to construct the @buildable.
342 func (x *SwitchRow) GetBuildableId() string {477 func (x *SwitchRow) GetBuildableId() string {
343 478
344 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())479 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-tab-bar.go +145 -10
@@ -370,34 +370,165 @@ func (x *TabBar) ConnectExtraDragValue(cb *func(TabBar, uintptr, uintptr) gdk.Dr
370 return gobject.SignalConnect(x.GoPointer(), "extra-drag-value", cbRefPtr)370 return gobject.SignalConnect(x.GoPointer(), "extra-drag-value", cbRefPtr)
371 }371 }
372 372
373-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.373+// Requests the user's screen reader to announce the given message.
374+//
375+// This kind of notification is useful for messages that
376+// either have only a visual representation or that are not
377+// exposed visually at all, e.g. a notification about a
378+// successful operation.
379+//
380+// Also, by using this API, you can ensure that the message
381+// does not interrupts the user's current screen reader output.
382+func (x *TabBar) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
383+
384+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
385+
386+}
387+
388+// Retrieves the accessible parent for an accessible object.
389+//
390+// This function returns `NULL` for top level widgets.
391+func (x *TabBar) GetAccessibleParent() *gtk.AccessibleBase {
392+ var cls *gtk.AccessibleBase
393+
394+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
395+
396+ if cret == 0 {
397+ return nil
398+ }
399+ cls = &gtk.AccessibleBase{}
400+ cls.Ptr = cret
401+ return cls
402+}
403+
404+// Retrieves the accessible role of an accessible object.
374 func (x *TabBar) GetAccessibleRole() gtk.AccessibleRole {405 func (x *TabBar) GetAccessibleRole() gtk.AccessibleRole {
375 406
376 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())407 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
377 return cret408 return cret
378 }409 }
379 410
380-// Resets the accessible @property to its default value.411+// Retrieves the implementation for the given accessible object.
412+func (x *TabBar) GetAtContext() *gtk.ATContext {
413+ var cls *gtk.ATContext
414+
415+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
416+
417+ if cret == 0 {
418+ return nil
419+ }
420+ cls = &gtk.ATContext{}
421+ cls.Ptr = cret
422+ return cls
423+}
424+
425+// Queries the coordinates and dimensions of this accessible
426+//
427+// This functionality can be overridden by `GtkAccessible`
428+// implementations, e.g. to get the bounds from an ignored
429+// child widget.
430+func (x *TabBar) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
431+
432+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
433+ return cret
434+}
435+
436+// Retrieves the first accessible child of an accessible object.
437+func (x *TabBar) GetFirstAccessibleChild() *gtk.AccessibleBase {
438+ var cls *gtk.AccessibleBase
439+
440+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
441+
442+ if cret == 0 {
443+ return nil
444+ }
445+ cls = &gtk.AccessibleBase{}
446+ cls.Ptr = cret
447+ return cls
448+}
449+
450+// Retrieves the next accessible sibling of an accessible object
451+func (x *TabBar) GetNextAccessibleSibling() *gtk.AccessibleBase {
452+ var cls *gtk.AccessibleBase
453+
454+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
455+
456+ if cret == 0 {
457+ return nil
458+ }
459+ cls = &gtk.AccessibleBase{}
460+ cls.Ptr = cret
461+ return cls
462+}
463+
464+// Queries a platform state, such as focus.
465+//
466+// This functionality can be overridden by `GtkAccessible`
467+// implementations, e.g. to get platform state from an ignored
468+// child widget, as is the case for `GtkText` wrappers.
469+func (x *TabBar) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
470+
471+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
472+ return cret
473+}
474+
475+// Resets the accessible property to its default value.
381 func (x *TabBar) ResetProperty(PropertyVar gtk.AccessibleProperty) {476 func (x *TabBar) ResetProperty(PropertyVar gtk.AccessibleProperty) {
382 477
383 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)478 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
384 479
385 }480 }
386 481
387-// Resets the accessible @relation to its default value.482+// Resets the accessible relation to its default value.
388 func (x *TabBar) ResetRelation(RelationVar gtk.AccessibleRelation) {483 func (x *TabBar) ResetRelation(RelationVar gtk.AccessibleRelation) {
389 484
390 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)485 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
391 486
392 }487 }
393 488
394-// Resets the accessible @state to its default value.489+// Resets the accessible state to its default value.
395 func (x *TabBar) ResetState(StateVar gtk.AccessibleState) {490 func (x *TabBar) ResetState(StateVar gtk.AccessibleState) {
396 491
397 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)492 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
398 493
399 }494 }
400 495
496+// Sets the parent and sibling of an accessible object.
497+//
498+// This function is meant to be used by accessible implementations that are
499+// not part of the widget hierarchy, and but act as a logical bridge between
500+// widgets. For instance, if a widget creates an object that holds metadata
501+// for each child, and you want that object to implement the `GtkAccessible`
502+// interface, you will use this function to ensure that the parent of each
503+// child widget is the metadata object, and the parent of each metadata
504+// object is the container widget.
505+func (x *TabBar) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
506+
507+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
508+
509+}
510+
511+// Updates the next accessible sibling.
512+//
513+// That might be useful when a new child of a custom accessible
514+// is created, and it needs to be linked to a previous child.
515+func (x *TabBar) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
516+
517+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
518+
519+}
520+
521+// Informs ATs that the platform state has changed.
522+//
523+// This function should be used by `GtkAccessible` implementations that
524+// have a platform state but are not widgets. Widgets handle platform
525+// states automatically.
526+func (x *TabBar) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
527+
528+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
529+
530+}
531+
401 // Updates a list of accessible properties.532 // Updates a list of accessible properties.
402 //533 //
403 // See the [enum@Gtk.AccessibleProperty] documentation for the534 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -440,7 +571,7 @@ func (x *TabBar) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.Acc
440 // relation change must be communicated to assistive technologies.571 // relation change must be communicated to assistive technologies.
441 //572 //
442 // If the [enum@Gtk.AccessibleRelation] requires a list of references,573 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
443-// you should pass each reference individually, followed by %NULL, e.g.574+// you should pass each reference individually, followed by `NULL`, e.g.
444 //575 //
445 // ```c576 // ```c
446 // gtk_accessible_update_relation (accessible,577 // gtk_accessible_update_relation (accessible,
@@ -470,13 +601,17 @@ func (x *TabBar) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.Acces
470 601
471 }602 }
472 603
473-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]604+// Updates a list of accessible states.
474-// documentation for the value types of accessible states.
475 //605 //
476-// This function should be called by `GtkWidget` types whenever an accessible606+// See the [enum@Gtk.AccessibleState] documentation for the
477-// state change must be communicated to assistive technologies.607+// value types of accessible states.
608+//
609+// This function should be called by `GtkWidget` types whenever
610+// an accessible state change must be communicated to assistive
611+// technologies.
478 //612 //
479 // Example:613 // Example:
614+//
480 // ```c615 // ```c
481 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;616 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
482 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),617 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -506,7 +641,7 @@ func (x *TabBar) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleStat
506 // Gets the ID of the @buildable object.641 // Gets the ID of the @buildable object.
507 //642 //
508 // `GtkBuilder` sets the name based on the ID attribute643 // `GtkBuilder` sets the name based on the ID attribute
509-// of the <object> tag used to construct the @buildable.644+// of the `<object>` tag used to construct the @buildable.
510 func (x *TabBar) GetBuildableId() string {645 func (x *TabBar) GetBuildableId() string {
511 646
512 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())647 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-tab-button.go +145 -10
@@ -168,34 +168,165 @@ func (x *TabButton) ConnectClicked(cb *func(TabButton)) uint32 {
168 return gobject.SignalConnect(x.GoPointer(), "clicked", cbRefPtr)168 return gobject.SignalConnect(x.GoPointer(), "clicked", cbRefPtr)
169 }169 }
170 170
171-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.171+// Requests the user's screen reader to announce the given message.
172+//
173+// This kind of notification is useful for messages that
174+// either have only a visual representation or that are not
175+// exposed visually at all, e.g. a notification about a
176+// successful operation.
177+//
178+// Also, by using this API, you can ensure that the message
179+// does not interrupts the user's current screen reader output.
180+func (x *TabButton) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
181+
182+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
183+
184+}
185+
186+// Retrieves the accessible parent for an accessible object.
187+//
188+// This function returns `NULL` for top level widgets.
189+func (x *TabButton) GetAccessibleParent() *gtk.AccessibleBase {
190+ var cls *gtk.AccessibleBase
191+
192+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
193+
194+ if cret == 0 {
195+ return nil
196+ }
197+ cls = &gtk.AccessibleBase{}
198+ cls.Ptr = cret
199+ return cls
200+}
201+
202+// Retrieves the accessible role of an accessible object.
172 func (x *TabButton) GetAccessibleRole() gtk.AccessibleRole {203 func (x *TabButton) GetAccessibleRole() gtk.AccessibleRole {
173 204
174 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())205 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
175 return cret206 return cret
176 }207 }
177 208
178-// Resets the accessible @property to its default value.209+// Retrieves the implementation for the given accessible object.
210+func (x *TabButton) GetAtContext() *gtk.ATContext {
211+ var cls *gtk.ATContext
212+
213+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
214+
215+ if cret == 0 {
216+ return nil
217+ }
218+ cls = &gtk.ATContext{}
219+ cls.Ptr = cret
220+ return cls
221+}
222+
223+// Queries the coordinates and dimensions of this accessible
224+//
225+// This functionality can be overridden by `GtkAccessible`
226+// implementations, e.g. to get the bounds from an ignored
227+// child widget.
228+func (x *TabButton) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
229+
230+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
231+ return cret
232+}
233+
234+// Retrieves the first accessible child of an accessible object.
235+func (x *TabButton) GetFirstAccessibleChild() *gtk.AccessibleBase {
236+ var cls *gtk.AccessibleBase
237+
238+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
239+
240+ if cret == 0 {
241+ return nil
242+ }
243+ cls = &gtk.AccessibleBase{}
244+ cls.Ptr = cret
245+ return cls
246+}
247+
248+// Retrieves the next accessible sibling of an accessible object
249+func (x *TabButton) GetNextAccessibleSibling() *gtk.AccessibleBase {
250+ var cls *gtk.AccessibleBase
251+
252+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
253+
254+ if cret == 0 {
255+ return nil
256+ }
257+ cls = &gtk.AccessibleBase{}
258+ cls.Ptr = cret
259+ return cls
260+}
261+
262+// Queries a platform state, such as focus.
263+//
264+// This functionality can be overridden by `GtkAccessible`
265+// implementations, e.g. to get platform state from an ignored
266+// child widget, as is the case for `GtkText` wrappers.
267+func (x *TabButton) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
268+
269+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
270+ return cret
271+}
272+
273+// Resets the accessible property to its default value.
179 func (x *TabButton) ResetProperty(PropertyVar gtk.AccessibleProperty) {274 func (x *TabButton) ResetProperty(PropertyVar gtk.AccessibleProperty) {
180 275
181 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)276 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
182 277
183 }278 }
184 279
185-// Resets the accessible @relation to its default value.280+// Resets the accessible relation to its default value.
186 func (x *TabButton) ResetRelation(RelationVar gtk.AccessibleRelation) {281 func (x *TabButton) ResetRelation(RelationVar gtk.AccessibleRelation) {
187 282
188 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)283 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
189 284
190 }285 }
191 286
192-// Resets the accessible @state to its default value.287+// Resets the accessible state to its default value.
193 func (x *TabButton) ResetState(StateVar gtk.AccessibleState) {288 func (x *TabButton) ResetState(StateVar gtk.AccessibleState) {
194 289
195 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)290 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
196 291
197 }292 }
198 293
294+// Sets the parent and sibling of an accessible object.
295+//
296+// This function is meant to be used by accessible implementations that are
297+// not part of the widget hierarchy, and but act as a logical bridge between
298+// widgets. For instance, if a widget creates an object that holds metadata
299+// for each child, and you want that object to implement the `GtkAccessible`
300+// interface, you will use this function to ensure that the parent of each
301+// child widget is the metadata object, and the parent of each metadata
302+// object is the container widget.
303+func (x *TabButton) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
304+
305+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
306+
307+}
308+
309+// Updates the next accessible sibling.
310+//
311+// That might be useful when a new child of a custom accessible
312+// is created, and it needs to be linked to a previous child.
313+func (x *TabButton) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
314+
315+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
316+
317+}
318+
319+// Informs ATs that the platform state has changed.
320+//
321+// This function should be used by `GtkAccessible` implementations that
322+// have a platform state but are not widgets. Widgets handle platform
323+// states automatically.
324+func (x *TabButton) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
325+
326+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
327+
328+}
329+
199 // Updates a list of accessible properties.330 // Updates a list of accessible properties.
200 //331 //
201 // See the [enum@Gtk.AccessibleProperty] documentation for the332 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -238,7 +369,7 @@ func (x *TabButton) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.
238 // relation change must be communicated to assistive technologies.369 // relation change must be communicated to assistive technologies.
239 //370 //
240 // If the [enum@Gtk.AccessibleRelation] requires a list of references,371 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
241-// you should pass each reference individually, followed by %NULL, e.g.372+// you should pass each reference individually, followed by `NULL`, e.g.
242 //373 //
243 // ```c374 // ```c
244 // gtk_accessible_update_relation (accessible,375 // gtk_accessible_update_relation (accessible,
@@ -268,13 +399,17 @@ func (x *TabButton) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.Ac
268 399
269 }400 }
270 401
271-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]402+// Updates a list of accessible states.
272-// documentation for the value types of accessible states.
273 //403 //
274-// This function should be called by `GtkWidget` types whenever an accessible404+// See the [enum@Gtk.AccessibleState] documentation for the
275-// state change must be communicated to assistive technologies.405+// value types of accessible states.
406+//
407+// This function should be called by `GtkWidget` types whenever
408+// an accessible state change must be communicated to assistive
409+// technologies.
276 //410 //
277 // Example:411 // Example:
412+//
278 // ```c413 // ```c
279 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;414 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
280 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),415 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -387,7 +522,7 @@ func (x *TabButton) SetDetailedActionName(DetailedActionNameVar string) {
387 // Gets the ID of the @buildable object.522 // Gets the ID of the @buildable object.
388 //523 //
389 // `GtkBuilder` sets the name based on the ID attribute524 // `GtkBuilder` sets the name based on the ID attribute
390-// of the <object> tag used to construct the @buildable.525+// of the `<object>` tag used to construct the @buildable.
391 func (x *TabButton) GetBuildableId() string {526 func (x *TabButton) GetBuildableId() string {
392 527
393 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())528 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-tab-overview.go +145 -10
@@ -475,34 +475,165 @@ func (x *TabOverview) ConnectExtraDragValue(cb *func(TabOverview, uintptr, uintp
475 return gobject.SignalConnect(x.GoPointer(), "extra-drag-value", cbRefPtr)475 return gobject.SignalConnect(x.GoPointer(), "extra-drag-value", cbRefPtr)
476 }476 }
477 477
478-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.478+// Requests the user's screen reader to announce the given message.
479+//
480+// This kind of notification is useful for messages that
481+// either have only a visual representation or that are not
482+// exposed visually at all, e.g. a notification about a
483+// successful operation.
484+//
485+// Also, by using this API, you can ensure that the message
486+// does not interrupts the user's current screen reader output.
487+func (x *TabOverview) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
488+
489+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
490+
491+}
492+
493+// Retrieves the accessible parent for an accessible object.
494+//
495+// This function returns `NULL` for top level widgets.
496+func (x *TabOverview) GetAccessibleParent() *gtk.AccessibleBase {
497+ var cls *gtk.AccessibleBase
498+
499+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
500+
501+ if cret == 0 {
502+ return nil
503+ }
504+ cls = &gtk.AccessibleBase{}
505+ cls.Ptr = cret
506+ return cls
507+}
508+
509+// Retrieves the accessible role of an accessible object.
479 func (x *TabOverview) GetAccessibleRole() gtk.AccessibleRole {510 func (x *TabOverview) GetAccessibleRole() gtk.AccessibleRole {
480 511
481 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())512 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
482 return cret513 return cret
483 }514 }
484 515
485-// Resets the accessible @property to its default value.516+// Retrieves the implementation for the given accessible object.
517+func (x *TabOverview) GetAtContext() *gtk.ATContext {
518+ var cls *gtk.ATContext
519+
520+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
521+
522+ if cret == 0 {
523+ return nil
524+ }
525+ cls = &gtk.ATContext{}
526+ cls.Ptr = cret
527+ return cls
528+}
529+
530+// Queries the coordinates and dimensions of this accessible
531+//
532+// This functionality can be overridden by `GtkAccessible`
533+// implementations, e.g. to get the bounds from an ignored
534+// child widget.
535+func (x *TabOverview) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
536+
537+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
538+ return cret
539+}
540+
541+// Retrieves the first accessible child of an accessible object.
542+func (x *TabOverview) GetFirstAccessibleChild() *gtk.AccessibleBase {
543+ var cls *gtk.AccessibleBase
544+
545+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
546+
547+ if cret == 0 {
548+ return nil
549+ }
550+ cls = &gtk.AccessibleBase{}
551+ cls.Ptr = cret
552+ return cls
553+}
554+
555+// Retrieves the next accessible sibling of an accessible object
556+func (x *TabOverview) GetNextAccessibleSibling() *gtk.AccessibleBase {
557+ var cls *gtk.AccessibleBase
558+
559+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
560+
561+ if cret == 0 {
562+ return nil
563+ }
564+ cls = &gtk.AccessibleBase{}
565+ cls.Ptr = cret
566+ return cls
567+}
568+
569+// Queries a platform state, such as focus.
570+//
571+// This functionality can be overridden by `GtkAccessible`
572+// implementations, e.g. to get platform state from an ignored
573+// child widget, as is the case for `GtkText` wrappers.
574+func (x *TabOverview) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
575+
576+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
577+ return cret
578+}
579+
580+// Resets the accessible property to its default value.
486 func (x *TabOverview) ResetProperty(PropertyVar gtk.AccessibleProperty) {581 func (x *TabOverview) ResetProperty(PropertyVar gtk.AccessibleProperty) {
487 582
488 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)583 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
489 584
490 }585 }
491 586
492-// Resets the accessible @relation to its default value.587+// Resets the accessible relation to its default value.
493 func (x *TabOverview) ResetRelation(RelationVar gtk.AccessibleRelation) {588 func (x *TabOverview) ResetRelation(RelationVar gtk.AccessibleRelation) {
494 589
495 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)590 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
496 591
497 }592 }
498 593
499-// Resets the accessible @state to its default value.594+// Resets the accessible state to its default value.
500 func (x *TabOverview) ResetState(StateVar gtk.AccessibleState) {595 func (x *TabOverview) ResetState(StateVar gtk.AccessibleState) {
501 596
502 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)597 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
503 598
504 }599 }
505 600
601+// Sets the parent and sibling of an accessible object.
602+//
603+// This function is meant to be used by accessible implementations that are
604+// not part of the widget hierarchy, and but act as a logical bridge between
605+// widgets. For instance, if a widget creates an object that holds metadata
606+// for each child, and you want that object to implement the `GtkAccessible`
607+// interface, you will use this function to ensure that the parent of each
608+// child widget is the metadata object, and the parent of each metadata
609+// object is the container widget.
610+func (x *TabOverview) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
611+
612+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
613+
614+}
615+
616+// Updates the next accessible sibling.
617+//
618+// That might be useful when a new child of a custom accessible
619+// is created, and it needs to be linked to a previous child.
620+func (x *TabOverview) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
621+
622+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
623+
624+}
625+
626+// Informs ATs that the platform state has changed.
627+//
628+// This function should be used by `GtkAccessible` implementations that
629+// have a platform state but are not widgets. Widgets handle platform
630+// states automatically.
631+func (x *TabOverview) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
632+
633+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
634+
635+}
636+
506 // Updates a list of accessible properties.637 // Updates a list of accessible properties.
507 //638 //
508 // See the [enum@Gtk.AccessibleProperty] documentation for the639 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -545,7 +676,7 @@ func (x *TabOverview) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gt
545 // relation change must be communicated to assistive technologies.676 // relation change must be communicated to assistive technologies.
546 //677 //
547 // If the [enum@Gtk.AccessibleRelation] requires a list of references,678 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
548-// you should pass each reference individually, followed by %NULL, e.g.679+// you should pass each reference individually, followed by `NULL`, e.g.
549 //680 //
550 // ```c681 // ```c
551 // gtk_accessible_update_relation (accessible,682 // gtk_accessible_update_relation (accessible,
@@ -575,13 +706,17 @@ func (x *TabOverview) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.
575 706
576 }707 }
577 708
578-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]709+// Updates a list of accessible states.
579-// documentation for the value types of accessible states.
580 //710 //
581-// This function should be called by `GtkWidget` types whenever an accessible711+// See the [enum@Gtk.AccessibleState] documentation for the
582-// state change must be communicated to assistive technologies.712+// value types of accessible states.
713+//
714+// This function should be called by `GtkWidget` types whenever
715+// an accessible state change must be communicated to assistive
716+// technologies.
583 //717 //
584 // Example:718 // Example:
719+//
585 // ```c720 // ```c
586 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;721 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
587 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),722 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -611,7 +746,7 @@ func (x *TabOverview) UpdateStateValue(NStatesVar int, StatesVar []gtk.Accessibl
611 // Gets the ID of the @buildable object.746 // Gets the ID of the @buildable object.
612 //747 //
613 // `GtkBuilder` sets the name based on the ID attribute748 // `GtkBuilder` sets the name based on the ID attribute
614-// of the <object> tag used to construct the @buildable.749+// of the `<object>` tag used to construct the @buildable.
615 func (x *TabOverview) GetBuildableId() string {750 func (x *TabOverview) GetBuildableId() string {
616 751
617 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())752 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-tab-view.go +289 -19
@@ -508,34 +508,165 @@ func (c *TabPage) SetGoPointer(ptr uintptr) {
508 c.Ptr = ptr508 c.Ptr = ptr
509 }509 }
510 510
511-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.511+// Requests the user's screen reader to announce the given message.
512+//
513+// This kind of notification is useful for messages that
514+// either have only a visual representation or that are not
515+// exposed visually at all, e.g. a notification about a
516+// successful operation.
517+//
518+// Also, by using this API, you can ensure that the message
519+// does not interrupts the user's current screen reader output.
520+func (x *TabPage) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
521+
522+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
523+
524+}
525+
526+// Retrieves the accessible parent for an accessible object.
527+//
528+// This function returns `NULL` for top level widgets.
529+func (x *TabPage) GetAccessibleParent() *gtk.AccessibleBase {
530+ var cls *gtk.AccessibleBase
531+
532+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
533+
534+ if cret == 0 {
535+ return nil
536+ }
537+ cls = &gtk.AccessibleBase{}
538+ cls.Ptr = cret
539+ return cls
540+}
541+
542+// Retrieves the accessible role of an accessible object.
512 func (x *TabPage) GetAccessibleRole() gtk.AccessibleRole {543 func (x *TabPage) GetAccessibleRole() gtk.AccessibleRole {
513 544
514 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())545 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
515 return cret546 return cret
516 }547 }
517 548
518-// Resets the accessible @property to its default value.549+// Retrieves the implementation for the given accessible object.
550+func (x *TabPage) GetAtContext() *gtk.ATContext {
551+ var cls *gtk.ATContext
552+
553+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
554+
555+ if cret == 0 {
556+ return nil
557+ }
558+ cls = &gtk.ATContext{}
559+ cls.Ptr = cret
560+ return cls
561+}
562+
563+// Queries the coordinates and dimensions of this accessible
564+//
565+// This functionality can be overridden by `GtkAccessible`
566+// implementations, e.g. to get the bounds from an ignored
567+// child widget.
568+func (x *TabPage) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
569+
570+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
571+ return cret
572+}
573+
574+// Retrieves the first accessible child of an accessible object.
575+func (x *TabPage) GetFirstAccessibleChild() *gtk.AccessibleBase {
576+ var cls *gtk.AccessibleBase
577+
578+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
579+
580+ if cret == 0 {
581+ return nil
582+ }
583+ cls = &gtk.AccessibleBase{}
584+ cls.Ptr = cret
585+ return cls
586+}
587+
588+// Retrieves the next accessible sibling of an accessible object
589+func (x *TabPage) GetNextAccessibleSibling() *gtk.AccessibleBase {
590+ var cls *gtk.AccessibleBase
591+
592+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
593+
594+ if cret == 0 {
595+ return nil
596+ }
597+ cls = &gtk.AccessibleBase{}
598+ cls.Ptr = cret
599+ return cls
600+}
601+
602+// Queries a platform state, such as focus.
603+//
604+// This functionality can be overridden by `GtkAccessible`
605+// implementations, e.g. to get platform state from an ignored
606+// child widget, as is the case for `GtkText` wrappers.
607+func (x *TabPage) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
608+
609+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
610+ return cret
611+}
612+
613+// Resets the accessible property to its default value.
519 func (x *TabPage) ResetProperty(PropertyVar gtk.AccessibleProperty) {614 func (x *TabPage) ResetProperty(PropertyVar gtk.AccessibleProperty) {
520 615
521 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)616 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
522 617
523 }618 }
524 619
525-// Resets the accessible @relation to its default value.620+// Resets the accessible relation to its default value.
526 func (x *TabPage) ResetRelation(RelationVar gtk.AccessibleRelation) {621 func (x *TabPage) ResetRelation(RelationVar gtk.AccessibleRelation) {
527 622
528 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)623 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
529 624
530 }625 }
531 626
532-// Resets the accessible @state to its default value.627+// Resets the accessible state to its default value.
533 func (x *TabPage) ResetState(StateVar gtk.AccessibleState) {628 func (x *TabPage) ResetState(StateVar gtk.AccessibleState) {
534 629
535 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)630 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
536 631
537 }632 }
538 633
634+// Sets the parent and sibling of an accessible object.
635+//
636+// This function is meant to be used by accessible implementations that are
637+// not part of the widget hierarchy, and but act as a logical bridge between
638+// widgets. For instance, if a widget creates an object that holds metadata
639+// for each child, and you want that object to implement the `GtkAccessible`
640+// interface, you will use this function to ensure that the parent of each
641+// child widget is the metadata object, and the parent of each metadata
642+// object is the container widget.
643+func (x *TabPage) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
644+
645+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
646+
647+}
648+
649+// Updates the next accessible sibling.
650+//
651+// That might be useful when a new child of a custom accessible
652+// is created, and it needs to be linked to a previous child.
653+func (x *TabPage) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
654+
655+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
656+
657+}
658+
659+// Informs ATs that the platform state has changed.
660+//
661+// This function should be used by `GtkAccessible` implementations that
662+// have a platform state but are not widgets. Widgets handle platform
663+// states automatically.
664+func (x *TabPage) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
665+
666+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
667+
668+}
669+
539 // Updates a list of accessible properties.670 // Updates a list of accessible properties.
540 //671 //
541 // See the [enum@Gtk.AccessibleProperty] documentation for the672 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -578,7 +709,7 @@ func (x *TabPage) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.Ac
578 // relation change must be communicated to assistive technologies.709 // relation change must be communicated to assistive technologies.
579 //710 //
580 // If the [enum@Gtk.AccessibleRelation] requires a list of references,711 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
581-// you should pass each reference individually, followed by %NULL, e.g.712+// you should pass each reference individually, followed by `NULL`, e.g.
582 //713 //
583 // ```c714 // ```c
584 // gtk_accessible_update_relation (accessible,715 // gtk_accessible_update_relation (accessible,
@@ -608,13 +739,17 @@ func (x *TabPage) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.Acce
608 739
609 }740 }
610 741
611-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]742+// Updates a list of accessible states.
612-// documentation for the value types of accessible states.
613 //743 //
614-// This function should be called by `GtkWidget` types whenever an accessible744+// See the [enum@Gtk.AccessibleState] documentation for the
615-// state change must be communicated to assistive technologies.745+// value types of accessible states.
746+//
747+// This function should be called by `GtkWidget` types whenever
748+// an accessible state change must be communicated to assistive
749+// technologies.
616 //750 //
617 // Example:751 // Example:
752+//
618 // ```c753 // ```c
619 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;754 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
620 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),755 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -1498,34 +1633,165 @@ func (x *TabView) ConnectSetupMenu(cb *func(TabView, uintptr)) uint32 {
1498 return gobject.SignalConnect(x.GoPointer(), "setup-menu", cbRefPtr)1633 return gobject.SignalConnect(x.GoPointer(), "setup-menu", cbRefPtr)
1499 }1634 }
1500 1635
1501-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.1636+// Requests the user's screen reader to announce the given message.
1637+//
1638+// This kind of notification is useful for messages that
1639+// either have only a visual representation or that are not
1640+// exposed visually at all, e.g. a notification about a
1641+// successful operation.
1642+//
1643+// Also, by using this API, you can ensure that the message
1644+// does not interrupts the user's current screen reader output.
1645+func (x *TabView) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
1646+
1647+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
1648+
1649+}
1650+
1651+// Retrieves the accessible parent for an accessible object.
1652+//
1653+// This function returns `NULL` for top level widgets.
1654+func (x *TabView) GetAccessibleParent() *gtk.AccessibleBase {
1655+ var cls *gtk.AccessibleBase
1656+
1657+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
1658+
1659+ if cret == 0 {
1660+ return nil
1661+ }
1662+ cls = &gtk.AccessibleBase{}
1663+ cls.Ptr = cret
1664+ return cls
1665+}
1666+
1667+// Retrieves the accessible role of an accessible object.
1502 func (x *TabView) GetAccessibleRole() gtk.AccessibleRole {1668 func (x *TabView) GetAccessibleRole() gtk.AccessibleRole {
1503 1669
1504 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())1670 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
1505 return cret1671 return cret
1506 }1672 }
1507 1673
1508-// Resets the accessible @property to its default value.1674+// Retrieves the implementation for the given accessible object.
1675+func (x *TabView) GetAtContext() *gtk.ATContext {
1676+ var cls *gtk.ATContext
1677+
1678+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
1679+
1680+ if cret == 0 {
1681+ return nil
1682+ }
1683+ cls = &gtk.ATContext{}
1684+ cls.Ptr = cret
1685+ return cls
1686+}
1687+
1688+// Queries the coordinates and dimensions of this accessible
1689+//
1690+// This functionality can be overridden by `GtkAccessible`
1691+// implementations, e.g. to get the bounds from an ignored
1692+// child widget.
1693+func (x *TabView) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
1694+
1695+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
1696+ return cret
1697+}
1698+
1699+// Retrieves the first accessible child of an accessible object.
1700+func (x *TabView) GetFirstAccessibleChild() *gtk.AccessibleBase {
1701+ var cls *gtk.AccessibleBase
1702+
1703+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
1704+
1705+ if cret == 0 {
1706+ return nil
1707+ }
1708+ cls = &gtk.AccessibleBase{}
1709+ cls.Ptr = cret
1710+ return cls
1711+}
1712+
1713+// Retrieves the next accessible sibling of an accessible object
1714+func (x *TabView) GetNextAccessibleSibling() *gtk.AccessibleBase {
1715+ var cls *gtk.AccessibleBase
1716+
1717+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
1718+
1719+ if cret == 0 {
1720+ return nil
1721+ }
1722+ cls = &gtk.AccessibleBase{}
1723+ cls.Ptr = cret
1724+ return cls
1725+}
1726+
1727+// Queries a platform state, such as focus.
1728+//
1729+// This functionality can be overridden by `GtkAccessible`
1730+// implementations, e.g. to get platform state from an ignored
1731+// child widget, as is the case for `GtkText` wrappers.
1732+func (x *TabView) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
1733+
1734+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
1735+ return cret
1736+}
1737+
1738+// Resets the accessible property to its default value.
1509 func (x *TabView) ResetProperty(PropertyVar gtk.AccessibleProperty) {1739 func (x *TabView) ResetProperty(PropertyVar gtk.AccessibleProperty) {
1510 1740
1511 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)1741 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
1512 1742
1513 }1743 }
1514 1744
1515-// Resets the accessible @relation to its default value.1745+// Resets the accessible relation to its default value.
1516 func (x *TabView) ResetRelation(RelationVar gtk.AccessibleRelation) {1746 func (x *TabView) ResetRelation(RelationVar gtk.AccessibleRelation) {
1517 1747
1518 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)1748 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
1519 1749
1520 }1750 }
1521 1751
1522-// Resets the accessible @state to its default value.1752+// Resets the accessible state to its default value.
1523 func (x *TabView) ResetState(StateVar gtk.AccessibleState) {1753 func (x *TabView) ResetState(StateVar gtk.AccessibleState) {
1524 1754
1525 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)1755 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
1526 1756
1527 }1757 }
1528 1758
1759+// Sets the parent and sibling of an accessible object.
1760+//
1761+// This function is meant to be used by accessible implementations that are
1762+// not part of the widget hierarchy, and but act as a logical bridge between
1763+// widgets. For instance, if a widget creates an object that holds metadata
1764+// for each child, and you want that object to implement the `GtkAccessible`
1765+// interface, you will use this function to ensure that the parent of each
1766+// child widget is the metadata object, and the parent of each metadata
1767+// object is the container widget.
1768+func (x *TabView) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
1769+
1770+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
1771+
1772+}
1773+
1774+// Updates the next accessible sibling.
1775+//
1776+// That might be useful when a new child of a custom accessible
1777+// is created, and it needs to be linked to a previous child.
1778+func (x *TabView) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
1779+
1780+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
1781+
1782+}
1783+
1784+// Informs ATs that the platform state has changed.
1785+//
1786+// This function should be used by `GtkAccessible` implementations that
1787+// have a platform state but are not widgets. Widgets handle platform
1788+// states automatically.
1789+func (x *TabView) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
1790+
1791+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
1792+
1793+}
1794+
1529 // Updates a list of accessible properties.1795 // Updates a list of accessible properties.
1530 //1796 //
1531 // See the [enum@Gtk.AccessibleProperty] documentation for the1797 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -1568,7 +1834,7 @@ func (x *TabView) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.Ac
1568 // relation change must be communicated to assistive technologies.1834 // relation change must be communicated to assistive technologies.
1569 //1835 //
1570 // If the [enum@Gtk.AccessibleRelation] requires a list of references,1836 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
1571-// you should pass each reference individually, followed by %NULL, e.g.1837+// you should pass each reference individually, followed by `NULL`, e.g.
1572 //1838 //
1573 // ```c1839 // ```c
1574 // gtk_accessible_update_relation (accessible,1840 // gtk_accessible_update_relation (accessible,
@@ -1598,13 +1864,17 @@ func (x *TabView) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.Acce
1598 1864
1599 }1865 }
1600 1866
1601-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]1867+// Updates a list of accessible states.
1602-// documentation for the value types of accessible states.
1603 //1868 //
1604-// This function should be called by `GtkWidget` types whenever an accessible1869+// See the [enum@Gtk.AccessibleState] documentation for the
1605-// state change must be communicated to assistive technologies.1870+// value types of accessible states.
1871+//
1872+// This function should be called by `GtkWidget` types whenever
1873+// an accessible state change must be communicated to assistive
1874+// technologies.
1606 //1875 //
1607 // Example:1876 // Example:
1877+//
1608 // ```c1878 // ```c
1609 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;1879 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
1610 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),1880 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -1634,7 +1904,7 @@ func (x *TabView) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleSta
1634 // Gets the ID of the @buildable object.1904 // Gets the ID of the @buildable object.
1635 //1905 //
1636 // `GtkBuilder` sets the name based on the ID attribute1906 // `GtkBuilder` sets the name based on the ID attribute
1637-// of the <object> tag used to construct the @buildable.1907+// of the `<object>` tag used to construct the @buildable.
1638 func (x *TabView) GetBuildableId() string {1908 func (x *TabView) GetBuildableId() string {
1639 1909
1640 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())1910 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-toast-overlay.go +161 -11
@@ -35,6 +35,9 @@ func (x *ToastOverlayClass) GoPointer() uintptr {
35 // main child, on top of which it can display a [class@Toast], overlaid.35 // main child, on top of which it can display a [class@Toast], overlaid.
36 // Toasts can be shown with [method@ToastOverlay.add_toast].36 // Toasts can be shown with [method@ToastOverlay.add_toast].
37 //37 //
38+// Use [method@ToastOverlay.dismiss_all] to dismiss all toasts at once, or
39+// [method@Toast.dismiss] to dismiss a single toast.
40+//
38 // See [class@Toast] for details.41 // See [class@Toast] for details.
39 //42 //
40 // ## CSS nodes43 // ## CSS nodes
@@ -64,7 +67,7 @@ func (x *ToastOverlayClass) GoPointer() uintptr {
64 //67 //
65 // ## Accessibility68 // ## Accessibility
66 //69 //
67-// `AdwToastOverlay` uses the `GTK_ACCESSIBLE_ROLE_TAB_GROUP` role.70+// `AdwToastOverlay` uses the [enum@Gtk.AccessibleRole.GROUP] role.
68 type ToastOverlay struct {71 type ToastOverlay struct {
69 gtk.Widget72 gtk.Widget
70 }73 }
@@ -116,6 +119,17 @@ func (x *ToastOverlay) AddToast(ToastVar *Toast) {
116 119
117 }120 }
118 121
122+var xToastOverlayDismissAll func(uintptr)
123+
124+// Dismisses all displayed toasts.
125+//
126+// Use [method@Toast.dismiss] to dismiss a single toast.
127+func (x *ToastOverlay) DismissAll() {
128+
129+ xToastOverlayDismissAll(x.GoPointer())
130+
131+}
132+
119 var xToastOverlayGetChild func(uintptr) uintptr133 var xToastOverlayGetChild func(uintptr) uintptr
120 134
121 // Gets the child widget of @self.135 // Gets the child widget of @self.
@@ -153,34 +167,165 @@ func (c *ToastOverlay) SetGoPointer(ptr uintptr) {
153 c.Ptr = ptr167 c.Ptr = ptr
154 }168 }
155 169
156-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.170+// Requests the user's screen reader to announce the given message.
171+//
172+// This kind of notification is useful for messages that
173+// either have only a visual representation or that are not
174+// exposed visually at all, e.g. a notification about a
175+// successful operation.
176+//
177+// Also, by using this API, you can ensure that the message
178+// does not interrupts the user's current screen reader output.
179+func (x *ToastOverlay) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
180+
181+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
182+
183+}
184+
185+// Retrieves the accessible parent for an accessible object.
186+//
187+// This function returns `NULL` for top level widgets.
188+func (x *ToastOverlay) GetAccessibleParent() *gtk.AccessibleBase {
189+ var cls *gtk.AccessibleBase
190+
191+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
192+
193+ if cret == 0 {
194+ return nil
195+ }
196+ cls = &gtk.AccessibleBase{}
197+ cls.Ptr = cret
198+ return cls
199+}
200+
201+// Retrieves the accessible role of an accessible object.
157 func (x *ToastOverlay) GetAccessibleRole() gtk.AccessibleRole {202 func (x *ToastOverlay) GetAccessibleRole() gtk.AccessibleRole {
158 203
159 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())204 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
160 return cret205 return cret
161 }206 }
162 207
163-// Resets the accessible @property to its default value.208+// Retrieves the implementation for the given accessible object.
209+func (x *ToastOverlay) GetAtContext() *gtk.ATContext {
210+ var cls *gtk.ATContext
211+
212+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
213+
214+ if cret == 0 {
215+ return nil
216+ }
217+ cls = &gtk.ATContext{}
218+ cls.Ptr = cret
219+ return cls
220+}
221+
222+// Queries the coordinates and dimensions of this accessible
223+//
224+// This functionality can be overridden by `GtkAccessible`
225+// implementations, e.g. to get the bounds from an ignored
226+// child widget.
227+func (x *ToastOverlay) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
228+
229+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
230+ return cret
231+}
232+
233+// Retrieves the first accessible child of an accessible object.
234+func (x *ToastOverlay) GetFirstAccessibleChild() *gtk.AccessibleBase {
235+ var cls *gtk.AccessibleBase
236+
237+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
238+
239+ if cret == 0 {
240+ return nil
241+ }
242+ cls = &gtk.AccessibleBase{}
243+ cls.Ptr = cret
244+ return cls
245+}
246+
247+// Retrieves the next accessible sibling of an accessible object
248+func (x *ToastOverlay) GetNextAccessibleSibling() *gtk.AccessibleBase {
249+ var cls *gtk.AccessibleBase
250+
251+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
252+
253+ if cret == 0 {
254+ return nil
255+ }
256+ cls = &gtk.AccessibleBase{}
257+ cls.Ptr = cret
258+ return cls
259+}
260+
261+// Queries a platform state, such as focus.
262+//
263+// This functionality can be overridden by `GtkAccessible`
264+// implementations, e.g. to get platform state from an ignored
265+// child widget, as is the case for `GtkText` wrappers.
266+func (x *ToastOverlay) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
267+
268+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
269+ return cret
270+}
271+
272+// Resets the accessible property to its default value.
164 func (x *ToastOverlay) ResetProperty(PropertyVar gtk.AccessibleProperty) {273 func (x *ToastOverlay) ResetProperty(PropertyVar gtk.AccessibleProperty) {
165 274
166 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)275 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
167 276
168 }277 }
169 278
170-// Resets the accessible @relation to its default value.279+// Resets the accessible relation to its default value.
171 func (x *ToastOverlay) ResetRelation(RelationVar gtk.AccessibleRelation) {280 func (x *ToastOverlay) ResetRelation(RelationVar gtk.AccessibleRelation) {
172 281
173 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)282 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
174 283
175 }284 }
176 285
177-// Resets the accessible @state to its default value.286+// Resets the accessible state to its default value.
178 func (x *ToastOverlay) ResetState(StateVar gtk.AccessibleState) {287 func (x *ToastOverlay) ResetState(StateVar gtk.AccessibleState) {
179 288
180 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)289 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
181 290
182 }291 }
183 292
293+// Sets the parent and sibling of an accessible object.
294+//
295+// This function is meant to be used by accessible implementations that are
296+// not part of the widget hierarchy, and but act as a logical bridge between
297+// widgets. For instance, if a widget creates an object that holds metadata
298+// for each child, and you want that object to implement the `GtkAccessible`
299+// interface, you will use this function to ensure that the parent of each
300+// child widget is the metadata object, and the parent of each metadata
301+// object is the container widget.
302+func (x *ToastOverlay) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
303+
304+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
305+
306+}
307+
308+// Updates the next accessible sibling.
309+//
310+// That might be useful when a new child of a custom accessible
311+// is created, and it needs to be linked to a previous child.
312+func (x *ToastOverlay) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
313+
314+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
315+
316+}
317+
318+// Informs ATs that the platform state has changed.
319+//
320+// This function should be used by `GtkAccessible` implementations that
321+// have a platform state but are not widgets. Widgets handle platform
322+// states automatically.
323+func (x *ToastOverlay) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
324+
325+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
326+
327+}
328+
184 // Updates a list of accessible properties.329 // Updates a list of accessible properties.
185 //330 //
186 // See the [enum@Gtk.AccessibleProperty] documentation for the331 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -223,7 +368,7 @@ func (x *ToastOverlay) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []g
223 // relation change must be communicated to assistive technologies.368 // relation change must be communicated to assistive technologies.
224 //369 //
225 // If the [enum@Gtk.AccessibleRelation] requires a list of references,370 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
226-// you should pass each reference individually, followed by %NULL, e.g.371+// you should pass each reference individually, followed by `NULL`, e.g.
227 //372 //
228 // ```c373 // ```c
229 // gtk_accessible_update_relation (accessible,374 // gtk_accessible_update_relation (accessible,
@@ -253,13 +398,17 @@ func (x *ToastOverlay) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk
253 398
254 }399 }
255 400
256-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]401+// Updates a list of accessible states.
257-// documentation for the value types of accessible states.
258 //402 //
259-// This function should be called by `GtkWidget` types whenever an accessible403+// See the [enum@Gtk.AccessibleState] documentation for the
260-// state change must be communicated to assistive technologies.404+// value types of accessible states.
405+//
406+// This function should be called by `GtkWidget` types whenever
407+// an accessible state change must be communicated to assistive
408+// technologies.
261 //409 //
262 // Example:410 // Example:
411+//
263 // ```c412 // ```c
264 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;413 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
265 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),414 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -289,7 +438,7 @@ func (x *ToastOverlay) UpdateStateValue(NStatesVar int, StatesVar []gtk.Accessib
289 // Gets the ID of the @buildable object.438 // Gets the ID of the @buildable object.
290 //439 //
291 // `GtkBuilder` sets the name based on the ID attribute440 // `GtkBuilder` sets the name based on the ID attribute
292-// of the <object> tag used to construct the @buildable.441+// of the `<object>` tag used to construct the @buildable.
293 func (x *ToastOverlay) GetBuildableId() string {442 func (x *ToastOverlay) GetBuildableId() string {
294 443
295 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())444 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
@@ -309,6 +458,7 @@ func init() {
309 core.PuregoSafeRegister(&xNewToastOverlay, lib, "adw_toast_overlay_new")458 core.PuregoSafeRegister(&xNewToastOverlay, lib, "adw_toast_overlay_new")
310 459
311 core.PuregoSafeRegister(&xToastOverlayAddToast, lib, "adw_toast_overlay_add_toast")460 core.PuregoSafeRegister(&xToastOverlayAddToast, lib, "adw_toast_overlay_add_toast")
461+ core.PuregoSafeRegister(&xToastOverlayDismissAll, lib, "adw_toast_overlay_dismiss_all")
312 core.PuregoSafeRegister(&xToastOverlayGetChild, lib, "adw_toast_overlay_get_child")462 core.PuregoSafeRegister(&xToastOverlayGetChild, lib, "adw_toast_overlay_get_child")
313 core.PuregoSafeRegister(&xToastOverlaySetChild, lib, "adw_toast_overlay_set_child")463 core.PuregoSafeRegister(&xToastOverlaySetChild, lib, "adw_toast_overlay_set_child")
314 464
A v4/adw/adw-toggle-group.go +917 -0
@@ -0,0 +1,917 @@
1+// Package adw was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT
2+package adw
3+
4+import (
5+ "structs"
6+ "unsafe"
7+
8+ "github.com/jwijenbergh/purego"
9+ "github.com/jwijenbergh/puregotk/pkg/core"
10+ "github.com/jwijenbergh/puregotk/v4/gobject"
11+ "github.com/jwijenbergh/puregotk/v4/gobject/types"
12+ "github.com/jwijenbergh/puregotk/v4/gtk"
13+)
14+
15+type ToggleClass struct {
16+ _ structs.HostLayout
17+
18+ ParentClass gobject.ObjectClass
19+}
20+
21+func (x *ToggleClass) GoPointer() uintptr {
22+ return uintptr(unsafe.Pointer(x))
23+}
24+
25+type ToggleGroupClass struct {
26+ _ structs.HostLayout
27+
28+ ParentClass gtk.WidgetClass
29+}
30+
31+func (x *ToggleGroupClass) GoPointer() uintptr {
32+ return uintptr(unsafe.Pointer(x))
33+}
34+
35+// A toggle within [class@ToggleGroup].
36+//
37+// `AdwToggle` can optionally have a name, set with [property@Toggle:name].
38+// If the name is set, [property@ToggleGroup:active-name] can be used to access
39+// toggles instead of index.
40+type Toggle struct {
41+ gobject.Object
42+}
43+
44+var xToggleGLibType func() types.GType
45+
46+func ToggleGLibType() types.GType {
47+ return xToggleGLibType()
48+}
49+
50+func ToggleNewFromInternalPtr(ptr uintptr) *Toggle {
51+ cls := &Toggle{}
52+ cls.Ptr = ptr
53+ return cls
54+}
55+
56+var xNewToggle func() uintptr
57+
58+// Creates a new `AdwToggle`.
59+func NewToggle() *Toggle {
60+ var cls *Toggle
61+
62+ cret := xNewToggle()
63+
64+ if cret == 0 {
65+ return nil
66+ }
67+ cls = &Toggle{}
68+ cls.Ptr = cret
69+ return cls
70+}
71+
72+var xToggleGetChild func(uintptr) uintptr
73+
74+// Gets the child widget of @self.
75+func (x *Toggle) GetChild() *gtk.Widget {
76+ var cls *gtk.Widget
77+
78+ cret := xToggleGetChild(x.GoPointer())
79+
80+ if cret == 0 {
81+ return nil
82+ }
83+ gobject.IncreaseRef(cret)
84+ cls = &gtk.Widget{}
85+ cls.Ptr = cret
86+ return cls
87+}
88+
89+var xToggleGetEnabled func(uintptr) bool
90+
91+// Gets whether @self is enabled.
92+func (x *Toggle) GetEnabled() bool {
93+
94+ cret := xToggleGetEnabled(x.GoPointer())
95+ return cret
96+}
97+
98+var xToggleGetIconName func(uintptr) string
99+
100+// Gets the icon name of @self.
101+func (x *Toggle) GetIconName() string {
102+
103+ cret := xToggleGetIconName(x.GoPointer())
104+ return cret
105+}
106+
107+var xToggleGetIndex func(uintptr) uint
108+
109+// Gets the index of @self within its toggle group.
110+func (x *Toggle) GetIndex() uint {
111+
112+ cret := xToggleGetIndex(x.GoPointer())
113+ return cret
114+}
115+
116+var xToggleGetLabel func(uintptr) string
117+
118+// Gets the label of @self.
119+func (x *Toggle) GetLabel() string {
120+
121+ cret := xToggleGetLabel(x.GoPointer())
122+ return cret
123+}
124+
125+var xToggleGetName func(uintptr) string
126+
127+// Gets the name of @self.
128+func (x *Toggle) GetName() string {
129+
130+ cret := xToggleGetName(x.GoPointer())
131+ return cret
132+}
133+
134+var xToggleGetTooltip func(uintptr) string
135+
136+// Gets the tooltip of @self.
137+func (x *Toggle) GetTooltip() string {
138+
139+ cret := xToggleGetTooltip(x.GoPointer())
140+ return cret
141+}
142+
143+var xToggleGetUseUnderline func(uintptr) bool
144+
145+// Gets whether @self uses underlines.
146+func (x *Toggle) GetUseUnderline() bool {
147+
148+ cret := xToggleGetUseUnderline(x.GoPointer())
149+ return cret
150+}
151+
152+var xToggleSetChild func(uintptr, uintptr)
153+
154+// Sets the child of @self to @child.
155+//
156+// When the child is set, icon and label are not displayed.
157+//
158+// It's recommended to still set the label, as it can still be used by the
159+// screen reader.
160+func (x *Toggle) SetChild(ChildVar *gtk.Widget) {
161+
162+ xToggleSetChild(x.GoPointer(), ChildVar.GoPointer())
163+
164+}
165+
166+var xToggleSetEnabled func(uintptr, bool)
167+
168+// Sets whether @self is enabled.
169+func (x *Toggle) SetEnabled(EnabledVar bool) {
170+
171+ xToggleSetEnabled(x.GoPointer(), EnabledVar)
172+
173+}
174+
175+var xToggleSetIconName func(uintptr, string)
176+
177+// Sets the icon name of @self to @icon_name.
178+//
179+// The icon will be displayed alone or next to the label, unless
180+// [property@Toggle:child] is set.
181+func (x *Toggle) SetIconName(IconNameVar string) {
182+
183+ xToggleSetIconName(x.GoPointer(), IconNameVar)
184+
185+}
186+
187+var xToggleSetLabel func(uintptr, string)
188+
189+// Sets the label of @self to @label.
190+//
191+// The label will be displayed alone or next to the icon, unless
192+// [property@Toggle:child] is set, but will still be read out by the screen
193+// reader.
194+func (x *Toggle) SetLabel(LabelVar string) {
195+
196+ xToggleSetLabel(x.GoPointer(), LabelVar)
197+
198+}
199+
200+var xToggleSetName func(uintptr, string)
201+
202+// Sets the name of @self to @name.
203+//
204+// Allows accessing @self by its name instead of index.
205+//
206+// See [property@ToggleGroup:active-name].
207+func (x *Toggle) SetName(NameVar string) {
208+
209+ xToggleSetName(x.GoPointer(), NameVar)
210+
211+}
212+
213+var xToggleSetTooltip func(uintptr, string)
214+
215+// Sets the tooltip of @self to @tooltip.
216+//
217+// @tooltip can be marked up with the Pango text markup language.
218+func (x *Toggle) SetTooltip(TooltipVar string) {
219+
220+ xToggleSetTooltip(x.GoPointer(), TooltipVar)
221+
222+}
223+
224+var xToggleSetUseUnderline func(uintptr, bool)
225+
226+// Sets whether an embedded underline in the label indicates a mnemonic.
227+//
228+// See [property@Toggle:label].
229+func (x *Toggle) SetUseUnderline(UseUnderlineVar bool) {
230+
231+ xToggleSetUseUnderline(x.GoPointer(), UseUnderlineVar)
232+
233+}
234+
235+func (c *Toggle) GoPointer() uintptr {
236+ if c == nil {
237+ return 0
238+ }
239+ return c.Ptr
240+}
241+
242+func (c *Toggle) SetGoPointer(ptr uintptr) {
243+ c.Ptr = ptr
244+}
245+
246+// A group of exclusive toggles.
247+//
248+// <picture>
249+//
250+// <source srcset="toggle-group-dark.png" media="(prefers-color-scheme: dark)">
251+// <img src="toggle-group.png" alt="toggle-group">
252+//
253+// </picture>
254+//
255+// `AdwToggleGroup` presents a set of exclusive toggles, represented as
256+// [class@Toggle] objects. Each toggle can display an icon, a label, an icon
257+// and a label, or a custom child.
258+//
259+// Toggles are indexed by their position, with the first toggle being equivalent
260+// to 0, and so on. Use the [property@ToggleGroup:active] to get that position.
261+//
262+// Toggles can also have optional names, set via the [property@Toggle:name]
263+// property. The name of the active toggle can be accessed via the
264+// [property@ToggleGroup:active-name] property.
265+//
266+// `AdwToggle` objects can be retrieved via their index or name, using
267+// [method@ToggleGroup.get_toggle] or [method@ToggleGroup.get_toggle_by_name]
268+// respectively. `AdwToggleGroup` also provides a [iface@Gtk.SelectionModel] of
269+// its toggles via the [property@ToggleGroup:toggles] property.
270+//
271+// `AdwToggleGroup` is orientable, and the toggles can be displayed horizontally
272+// or vertically. This is mostly useful for icon-only toggles.
273+//
274+// Use the [property@ToggleGroup:homogeneous] property to make the toggles take
275+// the same size, and the [property@ToggleGroup:can-shrink] to control whether
276+// the toggles can ellipsize.
277+//
278+// Example of an `AdwToggleGroup` UI definition:
279+//
280+// ```xml
281+//
282+// <object class="AdwToggleGroup">
283+// <property name="active-name">picture</property>
284+// <child>
285+// <object class="AdwToggle">
286+// <property name="icon-name">camera-photo-symbolic</property>
287+// <property name="tooltip" translatable="yes">Picture Mode</property>
288+// <property name="name">picture</property>
289+// </object>
290+// </child>
291+// <child>
292+// <object class="AdwToggle">
293+// <property name="icon-name">camera-video-symbolic</property>
294+// <property name="tooltip" translatable="yes">Recording Mode</property>
295+// <property name="name">recording</property>
296+// </object>
297+// </child>
298+// </object>
299+//
300+// ```
301+//
302+// See also: [class@InlineViewSwitcher].
303+//
304+// ## CSS nodes
305+//
306+// `AdwToggleGroup` has a main CSS node with the name `toggle-group`.
307+//
308+// Its toggles have CSS nodes with the name `toggle`, and its separators have nodes
309+// with the name `separator`.
310+//
311+// Toggle nodes will have a different style classes depending on their content:
312+// `.text-button` for labels, `.image-button` for icons, `.image-text-button`
313+// for both or no style class for custom children.
314+//
315+// The hidden separators use the `.hidden` style class.
316+//
317+// ## Style classes
318+//
319+// `AdwToggleGroup` can use the [`.flat`](style-classes.html#flat_1) style class
320+// to remove its background and make it look like a group of buttons.
321+//
322+// <picture>
323+//
324+// <source srcset="toggle-group-flat-dark.png" media="(prefers-color-scheme: dark)">
325+// <img src="toggle-group-flat.png" alt="toggle-group-flat">
326+//
327+// </picture>
328+//
329+// It can also use the [`.round`](style-classes.html#round) style class to make
330+// its toggles and the group itself rounded.
331+//
332+// <picture>
333+//
334+// <source srcset="toggle-group-round-dark.png" media="(prefers-color-scheme: dark)">
335+// <img src="toggle-group-round.png" alt="toggle-group-round">
336+//
337+// </picture>
338+//
339+// They can also be combined with each other.
340+//
341+// <picture>
342+//
343+// <source srcset="toggle-group-flat-round-dark.png" media="(prefers-color-scheme: dark)">
344+// <img src="toggle-group-flat-round.png" alt="toggle-group-flat-round">
345+//
346+// </picture>
347+//
348+// ## Accessibility
349+//
350+// `AdwToggleGroup` uses the `GTK_ACCESSIBLE_ROLE_RADIO_GROUP` role. Its toggles
351+// use the `GTK_ACCESSIBLE_ROLE_RADIO` role.
352+type ToggleGroup struct {
353+ gtk.Widget
354+}
355+
356+var xToggleGroupGLibType func() types.GType
357+
358+func ToggleGroupGLibType() types.GType {
359+ return xToggleGroupGLibType()
360+}
361+
362+func ToggleGroupNewFromInternalPtr(ptr uintptr) *ToggleGroup {
363+ cls := &ToggleGroup{}
364+ cls.Ptr = ptr
365+ return cls
366+}
367+
368+var xNewToggleGroup func() uintptr
369+
370+// Creates a new `AdwToggleGroup`.
371+func NewToggleGroup() *ToggleGroup {
372+ var cls *ToggleGroup
373+
374+ cret := xNewToggleGroup()
375+
376+ if cret == 0 {
377+ return nil
378+ }
379+ gobject.IncreaseRef(cret)
380+ cls = &ToggleGroup{}
381+ cls.Ptr = cret
382+ return cls
383+}
384+
385+var xToggleGroupAdd func(uintptr, uintptr)
386+
387+// Adds a toggle to @self.
388+func (x *ToggleGroup) Add(ToggleVar *Toggle) {
389+
390+ xToggleGroupAdd(x.GoPointer(), ToggleVar.GoPointer())
391+
392+}
393+
394+var xToggleGroupGetActive func(uintptr) uint
395+
396+// Gets the index of the active toggle in @self.
397+//
398+// Returns `GTK_INVALID_LIST_POSITION` if no toggle is active.
399+func (x *ToggleGroup) GetActive() uint {
400+
401+ cret := xToggleGroupGetActive(x.GoPointer())
402+ return cret
403+}
404+
405+var xToggleGroupGetActiveName func(uintptr) string
406+
407+// Gets the name of the active toggle in @self.
408+//
409+// Can be `NULL` if the currently active toggle doesn't have a name.
410+//
411+// See [property@Toggle:name].
412+func (x *ToggleGroup) GetActiveName() string {
413+
414+ cret := xToggleGroupGetActiveName(x.GoPointer())
415+ return cret
416+}
417+
418+var xToggleGroupGetCanShrink func(uintptr) bool
419+
420+// Gets whether the toggles can be smaller than the natural size of their
421+// contents.
422+func (x *ToggleGroup) GetCanShrink() bool {
423+
424+ cret := xToggleGroupGetCanShrink(x.GoPointer())
425+ return cret
426+}
427+
428+var xToggleGroupGetHomogeneous func(uintptr) bool
429+
430+// Gets whether all toggles take the same size.
431+func (x *ToggleGroup) GetHomogeneous() bool {
432+
433+ cret := xToggleGroupGetHomogeneous(x.GoPointer())
434+ return cret
435+}
436+
437+var xToggleGroupGetNToggles func(uintptr) uint
438+
439+// Gets the number of toggles within @self.
440+func (x *ToggleGroup) GetNToggles() uint {
441+
442+ cret := xToggleGroupGetNToggles(x.GoPointer())
443+ return cret
444+}
445+
446+var xToggleGroupGetToggle func(uintptr, uint) uintptr
447+
448+// Gets the toggle with @index from @self.
449+func (x *ToggleGroup) GetToggle(IndexVar uint) *Toggle {
450+ var cls *Toggle
451+
452+ cret := xToggleGroupGetToggle(x.GoPointer(), IndexVar)
453+
454+ if cret == 0 {
455+ return nil
456+ }
457+ gobject.IncreaseRef(cret)
458+ cls = &Toggle{}
459+ cls.Ptr = cret
460+ return cls
461+}
462+
463+var xToggleGroupGetToggleByName func(uintptr, string) uintptr
464+
465+// Gets the toggle with the name @name from @self.
466+func (x *ToggleGroup) GetToggleByName(NameVar string) *Toggle {
467+ var cls *Toggle
468+
469+ cret := xToggleGroupGetToggleByName(x.GoPointer(), NameVar)
470+
471+ if cret == 0 {
472+ return nil
473+ }
474+ gobject.IncreaseRef(cret)
475+ cls = &Toggle{}
476+ cls.Ptr = cret
477+ return cls
478+}
479+
480+var xToggleGroupGetToggles func(uintptr) uintptr
481+
482+// Returns a [iface@Gio.ListModel] that contains the toggles of the group.
483+//
484+// This can be used to keep an up-to-date view. The model also implements
485+// [iface@Gtk.SelectionModel] and can be used to track and change the active
486+// toggle.
487+func (x *ToggleGroup) GetToggles() *gtk.SelectionModelBase {
488+ var cls *gtk.SelectionModelBase
489+
490+ cret := xToggleGroupGetToggles(x.GoPointer())
491+
492+ if cret == 0 {
493+ return nil
494+ }
495+ cls = &gtk.SelectionModelBase{}
496+ cls.Ptr = cret
497+ return cls
498+}
499+
500+var xToggleGroupRemove func(uintptr, uintptr)
501+
502+// Removes @toggle from @self.
503+func (x *ToggleGroup) Remove(ToggleVar *Toggle) {
504+
505+ xToggleGroupRemove(x.GoPointer(), ToggleVar.GoPointer())
506+
507+}
508+
509+var xToggleGroupRemoveAll func(uintptr)
510+
511+// Removes all toggles from @self.
512+func (x *ToggleGroup) RemoveAll() {
513+
514+ xToggleGroupRemoveAll(x.GoPointer())
515+
516+}
517+
518+var xToggleGroupSetActive func(uintptr, uint)
519+
520+// Sets the active toggle for @self.
521+//
522+// If the index is larger than the number of toggles in @self, unsets the
523+// current active toggle.
524+func (x *ToggleGroup) SetActive(ActiveVar uint) {
525+
526+ xToggleGroupSetActive(x.GoPointer(), ActiveVar)
527+
528+}
529+
530+var xToggleGroupSetActiveName func(uintptr, string)
531+
532+// Sets the active toggle for @self.
533+//
534+// The name can be set via [property@Toggle:name].
535+//
536+// If @name is `NULL`, unset the current active toggle instead.
537+func (x *ToggleGroup) SetActiveName(NameVar string) {
538+
539+ xToggleGroupSetActiveName(x.GoPointer(), NameVar)
540+
541+}
542+
543+var xToggleGroupSetCanShrink func(uintptr, bool)
544+
545+// Sets whether the toggles can be smaller than the natural size of their
546+// contents.
547+//
548+// If @can_shrink is `TRUE`, the toggle labels will ellipsize.
549+//
550+// See [property@Gtk.Button:can-shrink].
551+func (x *ToggleGroup) SetCanShrink(CanShrinkVar bool) {
552+
553+ xToggleGroupSetCanShrink(x.GoPointer(), CanShrinkVar)
554+
555+}
556+
557+var xToggleGroupSetHomogeneous func(uintptr, bool)
558+
559+// Sets whether all toggles take the same size.
560+func (x *ToggleGroup) SetHomogeneous(HomogeneousVar bool) {
561+
562+ xToggleGroupSetHomogeneous(x.GoPointer(), HomogeneousVar)
563+
564+}
565+
566+func (c *ToggleGroup) GoPointer() uintptr {
567+ if c == nil {
568+ return 0
569+ }
570+ return c.Ptr
571+}
572+
573+func (c *ToggleGroup) SetGoPointer(ptr uintptr) {
574+ c.Ptr = ptr
575+}
576+
577+// Requests the user's screen reader to announce the given message.
578+//
579+// This kind of notification is useful for messages that
580+// either have only a visual representation or that are not
581+// exposed visually at all, e.g. a notification about a
582+// successful operation.
583+//
584+// Also, by using this API, you can ensure that the message
585+// does not interrupts the user's current screen reader output.
586+func (x *ToggleGroup) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
587+
588+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
589+
590+}
591+
592+// Retrieves the accessible parent for an accessible object.
593+//
594+// This function returns `NULL` for top level widgets.
595+func (x *ToggleGroup) GetAccessibleParent() *gtk.AccessibleBase {
596+ var cls *gtk.AccessibleBase
597+
598+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
599+
600+ if cret == 0 {
601+ return nil
602+ }
603+ cls = &gtk.AccessibleBase{}
604+ cls.Ptr = cret
605+ return cls
606+}
607+
608+// Retrieves the accessible role of an accessible object.
609+func (x *ToggleGroup) GetAccessibleRole() gtk.AccessibleRole {
610+
611+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
612+ return cret
613+}
614+
615+// Retrieves the implementation for the given accessible object.
616+func (x *ToggleGroup) GetAtContext() *gtk.ATContext {
617+ var cls *gtk.ATContext
618+
619+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
620+
621+ if cret == 0 {
622+ return nil
623+ }
624+ cls = &gtk.ATContext{}
625+ cls.Ptr = cret
626+ return cls
627+}
628+
629+// Queries the coordinates and dimensions of this accessible
630+//
631+// This functionality can be overridden by `GtkAccessible`
632+// implementations, e.g. to get the bounds from an ignored
633+// child widget.
634+func (x *ToggleGroup) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
635+
636+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
637+ return cret
638+}
639+
640+// Retrieves the first accessible child of an accessible object.
641+func (x *ToggleGroup) GetFirstAccessibleChild() *gtk.AccessibleBase {
642+ var cls *gtk.AccessibleBase
643+
644+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
645+
646+ if cret == 0 {
647+ return nil
648+ }
649+ cls = &gtk.AccessibleBase{}
650+ cls.Ptr = cret
651+ return cls
652+}
653+
654+// Retrieves the next accessible sibling of an accessible object
655+func (x *ToggleGroup) GetNextAccessibleSibling() *gtk.AccessibleBase {
656+ var cls *gtk.AccessibleBase
657+
658+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
659+
660+ if cret == 0 {
661+ return nil
662+ }
663+ cls = &gtk.AccessibleBase{}
664+ cls.Ptr = cret
665+ return cls
666+}
667+
668+// Queries a platform state, such as focus.
669+//
670+// This functionality can be overridden by `GtkAccessible`
671+// implementations, e.g. to get platform state from an ignored
672+// child widget, as is the case for `GtkText` wrappers.
673+func (x *ToggleGroup) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
674+
675+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
676+ return cret
677+}
678+
679+// Resets the accessible property to its default value.
680+func (x *ToggleGroup) ResetProperty(PropertyVar gtk.AccessibleProperty) {
681+
682+ gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
683+
684+}
685+
686+// Resets the accessible relation to its default value.
687+func (x *ToggleGroup) ResetRelation(RelationVar gtk.AccessibleRelation) {
688+
689+ gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
690+
691+}
692+
693+// Resets the accessible state to its default value.
694+func (x *ToggleGroup) ResetState(StateVar gtk.AccessibleState) {
695+
696+ gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
697+
698+}
699+
700+// Sets the parent and sibling of an accessible object.
701+//
702+// This function is meant to be used by accessible implementations that are
703+// not part of the widget hierarchy, and but act as a logical bridge between
704+// widgets. For instance, if a widget creates an object that holds metadata
705+// for each child, and you want that object to implement the `GtkAccessible`
706+// interface, you will use this function to ensure that the parent of each
707+// child widget is the metadata object, and the parent of each metadata
708+// object is the container widget.
709+func (x *ToggleGroup) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
710+
711+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
712+
713+}
714+
715+// Updates the next accessible sibling.
716+//
717+// That might be useful when a new child of a custom accessible
718+// is created, and it needs to be linked to a previous child.
719+func (x *ToggleGroup) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
720+
721+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
722+
723+}
724+
725+// Informs ATs that the platform state has changed.
726+//
727+// This function should be used by `GtkAccessible` implementations that
728+// have a platform state but are not widgets. Widgets handle platform
729+// states automatically.
730+func (x *ToggleGroup) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
731+
732+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
733+
734+}
735+
736+// Updates a list of accessible properties.
737+//
738+// See the [enum@Gtk.AccessibleProperty] documentation for the
739+// value types of accessible properties.
740+//
741+// This function should be called by `GtkWidget` types whenever
742+// an accessible property change must be communicated to assistive
743+// technologies.
744+//
745+// Example:
746+// ```c
747+// value = gtk_adjustment_get_value (adjustment);
748+// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
749+//
750+// GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
751+// -1);
752+//
753+// ```
754+func (x *ToggleGroup) UpdateProperty(FirstPropertyVar gtk.AccessibleProperty, varArgs ...interface{}) {
755+
756+ gtk.XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
757+
758+}
759+
760+// Updates an array of accessible properties.
761+//
762+// This function should be called by `GtkWidget` types whenever an accessible
763+// property change must be communicated to assistive technologies.
764+//
765+// This function is meant to be used by language bindings.
766+func (x *ToggleGroup) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.AccessibleProperty, ValuesVar []gobject.Value) {
767+
768+ gtk.XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
769+
770+}
771+
772+// Updates a list of accessible relations.
773+//
774+// This function should be called by `GtkWidget` types whenever an accessible
775+// relation change must be communicated to assistive technologies.
776+//
777+// If the [enum@Gtk.AccessibleRelation] requires a list of references,
778+// you should pass each reference individually, followed by `NULL`, e.g.
779+//
780+// ```c
781+// gtk_accessible_update_relation (accessible,
782+//
783+// GTK_ACCESSIBLE_RELATION_CONTROLS,
784+// ref1, NULL,
785+// GTK_ACCESSIBLE_RELATION_LABELLED_BY,
786+// ref1, ref2, ref3, NULL,
787+// -1);
788+//
789+// ```
790+func (x *ToggleGroup) UpdateRelation(FirstRelationVar gtk.AccessibleRelation, varArgs ...interface{}) {
791+
792+ gtk.XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
793+
794+}
795+
796+// Updates an array of accessible relations.
797+//
798+// This function should be called by `GtkWidget` types whenever an accessible
799+// relation change must be communicated to assistive technologies.
800+//
801+// This function is meant to be used by language bindings.
802+func (x *ToggleGroup) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.AccessibleRelation, ValuesVar []gobject.Value) {
803+
804+ gtk.XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
805+
806+}
807+
808+// Updates a list of accessible states.
809+//
810+// See the [enum@Gtk.AccessibleState] documentation for the
811+// value types of accessible states.
812+//
813+// This function should be called by `GtkWidget` types whenever
814+// an accessible state change must be communicated to assistive
815+// technologies.
816+//
817+// Example:
818+//
819+// ```c
820+// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
821+// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
822+//
823+// GTK_ACCESSIBLE_STATE_CHECKED, value,
824+// -1);
825+//
826+// ```
827+func (x *ToggleGroup) UpdateState(FirstStateVar gtk.AccessibleState, varArgs ...interface{}) {
828+
829+ gtk.XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
830+
831+}
832+
833+// Updates an array of accessible states.
834+//
835+// This function should be called by `GtkWidget` types whenever an accessible
836+// state change must be communicated to assistive technologies.
837+//
838+// This function is meant to be used by language bindings.
839+func (x *ToggleGroup) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleState, ValuesVar []gobject.Value) {
840+
841+ gtk.XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
842+
843+}
844+
845+// Gets the ID of the @buildable object.
846+//
847+// `GtkBuilder` sets the name based on the ID attribute
848+// of the `<object>` tag used to construct the @buildable.
849+func (x *ToggleGroup) GetBuildableId() string {
850+
851+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
852+ return cret
853+}
854+
855+// Retrieves the orientation of the @orientable.
856+func (x *ToggleGroup) GetOrientation() gtk.Orientation {
857+
858+ cret := gtk.XGtkOrientableGetOrientation(x.GoPointer())
859+ return cret
860+}
861+
862+// Sets the orientation of the @orientable.
863+func (x *ToggleGroup) SetOrientation(OrientationVar gtk.Orientation) {
864+
865+ gtk.XGtkOrientableSetOrientation(x.GoPointer(), OrientationVar)
866+
867+}
868+
869+func init() {
870+ core.SetPackageName("ADW", "libadwaita-1")
871+ core.SetSharedLibrary("ADW", "libadwaita-1.so.0")
872+ lib, err := purego.Dlopen(core.GetPath("ADW"), purego.RTLD_NOW|purego.RTLD_GLOBAL)
873+ if err != nil {
874+ panic(err)
875+ }
876+
877+ core.PuregoSafeRegister(&xToggleGLibType, lib, "adw_toggle_get_type")
878+
879+ core.PuregoSafeRegister(&xNewToggle, lib, "adw_toggle_new")
880+
881+ core.PuregoSafeRegister(&xToggleGetChild, lib, "adw_toggle_get_child")
882+ core.PuregoSafeRegister(&xToggleGetEnabled, lib, "adw_toggle_get_enabled")
883+ core.PuregoSafeRegister(&xToggleGetIconName, lib, "adw_toggle_get_icon_name")
884+ core.PuregoSafeRegister(&xToggleGetIndex, lib, "adw_toggle_get_index")
885+ core.PuregoSafeRegister(&xToggleGetLabel, lib, "adw_toggle_get_label")
886+ core.PuregoSafeRegister(&xToggleGetName, lib, "adw_toggle_get_name")
887+ core.PuregoSafeRegister(&xToggleGetTooltip, lib, "adw_toggle_get_tooltip")
888+ core.PuregoSafeRegister(&xToggleGetUseUnderline, lib, "adw_toggle_get_use_underline")
889+ core.PuregoSafeRegister(&xToggleSetChild, lib, "adw_toggle_set_child")
890+ core.PuregoSafeRegister(&xToggleSetEnabled, lib, "adw_toggle_set_enabled")
891+ core.PuregoSafeRegister(&xToggleSetIconName, lib, "adw_toggle_set_icon_name")
892+ core.PuregoSafeRegister(&xToggleSetLabel, lib, "adw_toggle_set_label")
893+ core.PuregoSafeRegister(&xToggleSetName, lib, "adw_toggle_set_name")
894+ core.PuregoSafeRegister(&xToggleSetTooltip, lib, "adw_toggle_set_tooltip")
895+ core.PuregoSafeRegister(&xToggleSetUseUnderline, lib, "adw_toggle_set_use_underline")
896+
897+ core.PuregoSafeRegister(&xToggleGroupGLibType, lib, "adw_toggle_group_get_type")
898+
899+ core.PuregoSafeRegister(&xNewToggleGroup, lib, "adw_toggle_group_new")
900+
901+ core.PuregoSafeRegister(&xToggleGroupAdd, lib, "adw_toggle_group_add")
902+ core.PuregoSafeRegister(&xToggleGroupGetActive, lib, "adw_toggle_group_get_active")
903+ core.PuregoSafeRegister(&xToggleGroupGetActiveName, lib, "adw_toggle_group_get_active_name")
904+ core.PuregoSafeRegister(&xToggleGroupGetCanShrink, lib, "adw_toggle_group_get_can_shrink")
905+ core.PuregoSafeRegister(&xToggleGroupGetHomogeneous, lib, "adw_toggle_group_get_homogeneous")
906+ core.PuregoSafeRegister(&xToggleGroupGetNToggles, lib, "adw_toggle_group_get_n_toggles")
907+ core.PuregoSafeRegister(&xToggleGroupGetToggle, lib, "adw_toggle_group_get_toggle")
908+ core.PuregoSafeRegister(&xToggleGroupGetToggleByName, lib, "adw_toggle_group_get_toggle_by_name")
909+ core.PuregoSafeRegister(&xToggleGroupGetToggles, lib, "adw_toggle_group_get_toggles")
910+ core.PuregoSafeRegister(&xToggleGroupRemove, lib, "adw_toggle_group_remove")
911+ core.PuregoSafeRegister(&xToggleGroupRemoveAll, lib, "adw_toggle_group_remove_all")
912+ core.PuregoSafeRegister(&xToggleGroupSetActive, lib, "adw_toggle_group_set_active")
913+ core.PuregoSafeRegister(&xToggleGroupSetActiveName, lib, "adw_toggle_group_set_active_name")
914+ core.PuregoSafeRegister(&xToggleGroupSetCanShrink, lib, "adw_toggle_group_set_can_shrink")
915+ core.PuregoSafeRegister(&xToggleGroupSetHomogeneous, lib, "adw_toggle_group_set_homogeneous")
916+
917+}
M v4/adw/adw-toolbar-view.go +145 -10
@@ -505,34 +505,165 @@ func (c *ToolbarView) SetGoPointer(ptr uintptr) {
505 c.Ptr = ptr505 c.Ptr = ptr
506 }506 }
507 507
508-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.508+// Requests the user's screen reader to announce the given message.
509+//
510+// This kind of notification is useful for messages that
511+// either have only a visual representation or that are not
512+// exposed visually at all, e.g. a notification about a
513+// successful operation.
514+//
515+// Also, by using this API, you can ensure that the message
516+// does not interrupts the user's current screen reader output.
517+func (x *ToolbarView) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
518+
519+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
520+
521+}
522+
523+// Retrieves the accessible parent for an accessible object.
524+//
525+// This function returns `NULL` for top level widgets.
526+func (x *ToolbarView) GetAccessibleParent() *gtk.AccessibleBase {
527+ var cls *gtk.AccessibleBase
528+
529+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
530+
531+ if cret == 0 {
532+ return nil
533+ }
534+ cls = &gtk.AccessibleBase{}
535+ cls.Ptr = cret
536+ return cls
537+}
538+
539+// Retrieves the accessible role of an accessible object.
509 func (x *ToolbarView) GetAccessibleRole() gtk.AccessibleRole {540 func (x *ToolbarView) GetAccessibleRole() gtk.AccessibleRole {
510 541
511 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())542 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
512 return cret543 return cret
513 }544 }
514 545
515-// Resets the accessible @property to its default value.546+// Retrieves the implementation for the given accessible object.
547+func (x *ToolbarView) GetAtContext() *gtk.ATContext {
548+ var cls *gtk.ATContext
549+
550+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
551+
552+ if cret == 0 {
553+ return nil
554+ }
555+ cls = &gtk.ATContext{}
556+ cls.Ptr = cret
557+ return cls
558+}
559+
560+// Queries the coordinates and dimensions of this accessible
561+//
562+// This functionality can be overridden by `GtkAccessible`
563+// implementations, e.g. to get the bounds from an ignored
564+// child widget.
565+func (x *ToolbarView) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
566+
567+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
568+ return cret
569+}
570+
571+// Retrieves the first accessible child of an accessible object.
572+func (x *ToolbarView) GetFirstAccessibleChild() *gtk.AccessibleBase {
573+ var cls *gtk.AccessibleBase
574+
575+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
576+
577+ if cret == 0 {
578+ return nil
579+ }
580+ cls = &gtk.AccessibleBase{}
581+ cls.Ptr = cret
582+ return cls
583+}
584+
585+// Retrieves the next accessible sibling of an accessible object
586+func (x *ToolbarView) GetNextAccessibleSibling() *gtk.AccessibleBase {
587+ var cls *gtk.AccessibleBase
588+
589+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
590+
591+ if cret == 0 {
592+ return nil
593+ }
594+ cls = &gtk.AccessibleBase{}
595+ cls.Ptr = cret
596+ return cls
597+}
598+
599+// Queries a platform state, such as focus.
600+//
601+// This functionality can be overridden by `GtkAccessible`
602+// implementations, e.g. to get platform state from an ignored
603+// child widget, as is the case for `GtkText` wrappers.
604+func (x *ToolbarView) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
605+
606+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
607+ return cret
608+}
609+
610+// Resets the accessible property to its default value.
516 func (x *ToolbarView) ResetProperty(PropertyVar gtk.AccessibleProperty) {611 func (x *ToolbarView) ResetProperty(PropertyVar gtk.AccessibleProperty) {
517 612
518 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)613 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
519 614
520 }615 }
521 616
522-// Resets the accessible @relation to its default value.617+// Resets the accessible relation to its default value.
523 func (x *ToolbarView) ResetRelation(RelationVar gtk.AccessibleRelation) {618 func (x *ToolbarView) ResetRelation(RelationVar gtk.AccessibleRelation) {
524 619
525 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)620 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
526 621
527 }622 }
528 623
529-// Resets the accessible @state to its default value.624+// Resets the accessible state to its default value.
530 func (x *ToolbarView) ResetState(StateVar gtk.AccessibleState) {625 func (x *ToolbarView) ResetState(StateVar gtk.AccessibleState) {
531 626
532 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)627 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
533 628
534 }629 }
535 630
631+// Sets the parent and sibling of an accessible object.
632+//
633+// This function is meant to be used by accessible implementations that are
634+// not part of the widget hierarchy, and but act as a logical bridge between
635+// widgets. For instance, if a widget creates an object that holds metadata
636+// for each child, and you want that object to implement the `GtkAccessible`
637+// interface, you will use this function to ensure that the parent of each
638+// child widget is the metadata object, and the parent of each metadata
639+// object is the container widget.
640+func (x *ToolbarView) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
641+
642+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
643+
644+}
645+
646+// Updates the next accessible sibling.
647+//
648+// That might be useful when a new child of a custom accessible
649+// is created, and it needs to be linked to a previous child.
650+func (x *ToolbarView) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
651+
652+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
653+
654+}
655+
656+// Informs ATs that the platform state has changed.
657+//
658+// This function should be used by `GtkAccessible` implementations that
659+// have a platform state but are not widgets. Widgets handle platform
660+// states automatically.
661+func (x *ToolbarView) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
662+
663+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
664+
665+}
666+
536 // Updates a list of accessible properties.667 // Updates a list of accessible properties.
537 //668 //
538 // See the [enum@Gtk.AccessibleProperty] documentation for the669 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -575,7 +706,7 @@ func (x *ToolbarView) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gt
575 // relation change must be communicated to assistive technologies.706 // relation change must be communicated to assistive technologies.
576 //707 //
577 // If the [enum@Gtk.AccessibleRelation] requires a list of references,708 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
578-// you should pass each reference individually, followed by %NULL, e.g.709+// you should pass each reference individually, followed by `NULL`, e.g.
579 //710 //
580 // ```c711 // ```c
581 // gtk_accessible_update_relation (accessible,712 // gtk_accessible_update_relation (accessible,
@@ -605,13 +736,17 @@ func (x *ToolbarView) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.
605 736
606 }737 }
607 738
608-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]739+// Updates a list of accessible states.
609-// documentation for the value types of accessible states.
610 //740 //
611-// This function should be called by `GtkWidget` types whenever an accessible741+// See the [enum@Gtk.AccessibleState] documentation for the
612-// state change must be communicated to assistive technologies.742+// value types of accessible states.
743+//
744+// This function should be called by `GtkWidget` types whenever
745+// an accessible state change must be communicated to assistive
746+// technologies.
613 //747 //
614 // Example:748 // Example:
749+//
615 // ```c750 // ```c
616 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;751 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
617 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),752 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -641,7 +776,7 @@ func (x *ToolbarView) UpdateStateValue(NStatesVar int, StatesVar []gtk.Accessibl
641 // Gets the ID of the @buildable object.776 // Gets the ID of the @buildable object.
642 //777 //
643 // `GtkBuilder` sets the name based on the ID attribute778 // `GtkBuilder` sets the name based on the ID attribute
644-// of the <object> tag used to construct the @buildable.779+// of the `<object>` tag used to construct the @buildable.
645 func (x *ToolbarView) GetBuildableId() string {780 func (x *ToolbarView) GetBuildableId() string {
646 781
647 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())782 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-version.go +3 -3
@@ -10,12 +10,12 @@ const (
10 // Adwaita major version component (e.g. 1 if the version is 1.2.3).10 // Adwaita major version component (e.g. 1 if the version is 1.2.3).
11 MAJOR_VERSION int = 111 MAJOR_VERSION int = 1
12 // Adwaita micro version component (e.g. 3 if the version is 1.2.3).12 // Adwaita micro version component (e.g. 3 if the version is 1.2.3).
13- MICRO_VERSION int = 413+ MICRO_VERSION int = 7
14 // Adwaita minor version component (e.g. 2 if the version is 1.2.3).14 // Adwaita minor version component (e.g. 2 if the version is 1.2.3).
15- MINOR_VERSION int = 615+ MINOR_VERSION int = 7
16 // Adwaita version, encoded as a string, useful for printing and16 // Adwaita version, encoded as a string, useful for printing and
17 // concatenation.17 // concatenation.
18- VERSION_S string = "1.6.4"18+ VERSION_S string = "1.7.7"
19 )19 )
20 20
21 var xGetMajorVersion func() uint21 var xGetMajorVersion func() uint
M v4/adw/adw-view-stack.go +353 -21
@@ -59,7 +59,9 @@ func (x *ViewStackPagesClass) GoPointer() uintptr {
59 // [property@ViewStackPage:needs-attention], and59 // [property@ViewStackPage:needs-attention], and
60 // [property@ViewStackPage:badge-number] properties.60 // [property@ViewStackPage:badge-number] properties.
61 //61 //
62-// Unlike [class@Gtk.Stack], transitions between views are not animated.62+// Unlike [class@Gtk.Stack], transitions between views can only be animated via
63+// a crossfade and size changes are always interpolated. Animations are disabled
64+// by default. Use [property@ViewStack:enable-transitions] to enable them.
63 //65 //
64 // `AdwViewStack` maintains a [class@ViewStackPage] object for each added child,66 // `AdwViewStack` maintains a [class@ViewStackPage] object for each added child,
65 // which holds additional per-child properties. You obtain the67 // which holds additional per-child properties. You obtain the
@@ -225,6 +227,19 @@ func (x *ViewStack) GetChildByName(NameVar string) *gtk.Widget {
225 return cls227 return cls
226 }228 }
227 229
230+var xViewStackGetEnableTransitions func(uintptr) bool
231+
232+// Gets whether @self uses a crossfade transition between pages.
233+//
234+// Use [property@ViewStack:transition-duration] to control the duration, and
235+// [property@ViewStack:transition-running] to know when the transition is
236+// running.
237+func (x *ViewStack) GetEnableTransitions() bool {
238+
239+ cret := xViewStackGetEnableTransitions(x.GoPointer())
240+ return cret
241+}
242+
228 var xViewStackGetHhomogeneous func(uintptr) bool243 var xViewStackGetHhomogeneous func(uintptr) bool
229 244
230 // Gets whether @self is horizontally homogeneous.245 // Gets whether @self is horizontally homogeneous.
@@ -271,6 +286,28 @@ func (x *ViewStack) GetPages() *gtk.SelectionModelBase {
271 return cls286 return cls
272 }287 }
273 288
289+var xViewStackGetTransitionDuration func(uintptr) uint
290+
291+// Gets the transition animation duration for @self.
292+func (x *ViewStack) GetTransitionDuration() uint {
293+
294+ cret := xViewStackGetTransitionDuration(x.GoPointer())
295+ return cret
296+}
297+
298+var xViewStackGetTransitionRunning func(uintptr) bool
299+
300+// Gets whether a transition is currently running for @self.
301+//
302+// If a transition is impossible, the property value will be set to `TRUE` and
303+// then immediately to `FALSE`, so it's possible to rely on its notifications
304+// to know that a transition has happened.
305+func (x *ViewStack) GetTransitionRunning() bool {
306+
307+ cret := xViewStackGetTransitionRunning(x.GoPointer())
308+ return cret
309+}
310+
274 var xViewStackGetVhomogeneous func(uintptr) bool311 var xViewStackGetVhomogeneous func(uintptr) bool
275 312
276 // Gets whether @self is vertically homogeneous.313 // Gets whether @self is vertically homogeneous.
@@ -315,6 +352,15 @@ func (x *ViewStack) Remove(ChildVar *gtk.Widget) {
315 352
316 }353 }
317 354
355+var xViewStackSetEnableTransitions func(uintptr, bool)
356+
357+// Sets whether @self uses a crossfade transition between pages.
358+func (x *ViewStack) SetEnableTransitions(EnableTransitionsVar bool) {
359+
360+ xViewStackSetEnableTransitions(x.GoPointer(), EnableTransitionsVar)
361+
362+}
363+
318 var xViewStackSetHhomogeneous func(uintptr, bool)364 var xViewStackSetHhomogeneous func(uintptr, bool)
319 365
320 // Sets @self to be horizontally homogeneous or not.366 // Sets @self to be horizontally homogeneous or not.
@@ -330,6 +376,17 @@ func (x *ViewStack) SetHhomogeneous(HhomogeneousVar bool) {
330 376
331 }377 }
332 378
379+var xViewStackSetTransitionDuration func(uintptr, uint)
380+
381+// Sets the transition animation duration for @self.
382+//
383+// Only used when [property@ViewStack:enable-transitions] is set to `TRUE`.
384+func (x *ViewStack) SetTransitionDuration(DurationVar uint) {
385+
386+ xViewStackSetTransitionDuration(x.GoPointer(), DurationVar)
387+
388+}
389+
333 var xViewStackSetVhomogeneous func(uintptr, bool)390 var xViewStackSetVhomogeneous func(uintptr, bool)
334 391
335 // Sets @self to be vertically homogeneous or not.392 // Sets @self to be vertically homogeneous or not.
@@ -376,34 +433,165 @@ func (c *ViewStack) SetGoPointer(ptr uintptr) {
376 c.Ptr = ptr433 c.Ptr = ptr
377 }434 }
378 435
379-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.436+// Requests the user's screen reader to announce the given message.
437+//
438+// This kind of notification is useful for messages that
439+// either have only a visual representation or that are not
440+// exposed visually at all, e.g. a notification about a
441+// successful operation.
442+//
443+// Also, by using this API, you can ensure that the message
444+// does not interrupts the user's current screen reader output.
445+func (x *ViewStack) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
446+
447+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
448+
449+}
450+
451+// Retrieves the accessible parent for an accessible object.
452+//
453+// This function returns `NULL` for top level widgets.
454+func (x *ViewStack) GetAccessibleParent() *gtk.AccessibleBase {
455+ var cls *gtk.AccessibleBase
456+
457+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
458+
459+ if cret == 0 {
460+ return nil
461+ }
462+ cls = &gtk.AccessibleBase{}
463+ cls.Ptr = cret
464+ return cls
465+}
466+
467+// Retrieves the accessible role of an accessible object.
380 func (x *ViewStack) GetAccessibleRole() gtk.AccessibleRole {468 func (x *ViewStack) GetAccessibleRole() gtk.AccessibleRole {
381 469
382 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())470 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
383 return cret471 return cret
384 }472 }
385 473
386-// Resets the accessible @property to its default value.474+// Retrieves the implementation for the given accessible object.
475+func (x *ViewStack) GetAtContext() *gtk.ATContext {
476+ var cls *gtk.ATContext
477+
478+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
479+
480+ if cret == 0 {
481+ return nil
482+ }
483+ cls = &gtk.ATContext{}
484+ cls.Ptr = cret
485+ return cls
486+}
487+
488+// Queries the coordinates and dimensions of this accessible
489+//
490+// This functionality can be overridden by `GtkAccessible`
491+// implementations, e.g. to get the bounds from an ignored
492+// child widget.
493+func (x *ViewStack) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
494+
495+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
496+ return cret
497+}
498+
499+// Retrieves the first accessible child of an accessible object.
500+func (x *ViewStack) GetFirstAccessibleChild() *gtk.AccessibleBase {
501+ var cls *gtk.AccessibleBase
502+
503+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
504+
505+ if cret == 0 {
506+ return nil
507+ }
508+ cls = &gtk.AccessibleBase{}
509+ cls.Ptr = cret
510+ return cls
511+}
512+
513+// Retrieves the next accessible sibling of an accessible object
514+func (x *ViewStack) GetNextAccessibleSibling() *gtk.AccessibleBase {
515+ var cls *gtk.AccessibleBase
516+
517+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
518+
519+ if cret == 0 {
520+ return nil
521+ }
522+ cls = &gtk.AccessibleBase{}
523+ cls.Ptr = cret
524+ return cls
525+}
526+
527+// Queries a platform state, such as focus.
528+//
529+// This functionality can be overridden by `GtkAccessible`
530+// implementations, e.g. to get platform state from an ignored
531+// child widget, as is the case for `GtkText` wrappers.
532+func (x *ViewStack) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
533+
534+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
535+ return cret
536+}
537+
538+// Resets the accessible property to its default value.
387 func (x *ViewStack) ResetProperty(PropertyVar gtk.AccessibleProperty) {539 func (x *ViewStack) ResetProperty(PropertyVar gtk.AccessibleProperty) {
388 540
389 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)541 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
390 542
391 }543 }
392 544
393-// Resets the accessible @relation to its default value.545+// Resets the accessible relation to its default value.
394 func (x *ViewStack) ResetRelation(RelationVar gtk.AccessibleRelation) {546 func (x *ViewStack) ResetRelation(RelationVar gtk.AccessibleRelation) {
395 547
396 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)548 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
397 549
398 }550 }
399 551
400-// Resets the accessible @state to its default value.552+// Resets the accessible state to its default value.
401 func (x *ViewStack) ResetState(StateVar gtk.AccessibleState) {553 func (x *ViewStack) ResetState(StateVar gtk.AccessibleState) {
402 554
403 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)555 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
404 556
405 }557 }
406 558
559+// Sets the parent and sibling of an accessible object.
560+//
561+// This function is meant to be used by accessible implementations that are
562+// not part of the widget hierarchy, and but act as a logical bridge between
563+// widgets. For instance, if a widget creates an object that holds metadata
564+// for each child, and you want that object to implement the `GtkAccessible`
565+// interface, you will use this function to ensure that the parent of each
566+// child widget is the metadata object, and the parent of each metadata
567+// object is the container widget.
568+func (x *ViewStack) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
569+
570+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
571+
572+}
573+
574+// Updates the next accessible sibling.
575+//
576+// That might be useful when a new child of a custom accessible
577+// is created, and it needs to be linked to a previous child.
578+func (x *ViewStack) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
579+
580+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
581+
582+}
583+
584+// Informs ATs that the platform state has changed.
585+//
586+// This function should be used by `GtkAccessible` implementations that
587+// have a platform state but are not widgets. Widgets handle platform
588+// states automatically.
589+func (x *ViewStack) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
590+
591+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
592+
593+}
594+
407 // Updates a list of accessible properties.595 // Updates a list of accessible properties.
408 //596 //
409 // See the [enum@Gtk.AccessibleProperty] documentation for the597 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -446,7 +634,7 @@ func (x *ViewStack) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.
446 // relation change must be communicated to assistive technologies.634 // relation change must be communicated to assistive technologies.
447 //635 //
448 // If the [enum@Gtk.AccessibleRelation] requires a list of references,636 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
449-// you should pass each reference individually, followed by %NULL, e.g.637+// you should pass each reference individually, followed by `NULL`, e.g.
450 //638 //
451 // ```c639 // ```c
452 // gtk_accessible_update_relation (accessible,640 // gtk_accessible_update_relation (accessible,
@@ -476,13 +664,17 @@ func (x *ViewStack) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.Ac
476 664
477 }665 }
478 666
479-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]667+// Updates a list of accessible states.
480-// documentation for the value types of accessible states.
481 //668 //
482-// This function should be called by `GtkWidget` types whenever an accessible669+// See the [enum@Gtk.AccessibleState] documentation for the
483-// state change must be communicated to assistive technologies.670+// value types of accessible states.
671+//
672+// This function should be called by `GtkWidget` types whenever
673+// an accessible state change must be communicated to assistive
674+// technologies.
484 //675 //
485 // Example:676 // Example:
677+//
486 // ```c678 // ```c
487 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;679 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
488 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),680 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -512,7 +704,7 @@ func (x *ViewStack) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleS
512 // Gets the ID of the @buildable object.704 // Gets the ID of the @buildable object.
513 //705 //
514 // `GtkBuilder` sets the name based on the ID attribute706 // `GtkBuilder` sets the name based on the ID attribute
515-// of the <object> tag used to construct the @buildable.707+// of the `<object>` tag used to construct the @buildable.
516 func (x *ViewStack) GetBuildableId() string {708 func (x *ViewStack) GetBuildableId() string {
517 709
518 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())710 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
@@ -703,34 +895,165 @@ func (c *ViewStackPage) SetGoPointer(ptr uintptr) {
703 c.Ptr = ptr895 c.Ptr = ptr
704 }896 }
705 897
706-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.898+// Requests the user's screen reader to announce the given message.
899+//
900+// This kind of notification is useful for messages that
901+// either have only a visual representation or that are not
902+// exposed visually at all, e.g. a notification about a
903+// successful operation.
904+//
905+// Also, by using this API, you can ensure that the message
906+// does not interrupts the user's current screen reader output.
907+func (x *ViewStackPage) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
908+
909+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
910+
911+}
912+
913+// Retrieves the accessible parent for an accessible object.
914+//
915+// This function returns `NULL` for top level widgets.
916+func (x *ViewStackPage) GetAccessibleParent() *gtk.AccessibleBase {
917+ var cls *gtk.AccessibleBase
918+
919+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
920+
921+ if cret == 0 {
922+ return nil
923+ }
924+ cls = &gtk.AccessibleBase{}
925+ cls.Ptr = cret
926+ return cls
927+}
928+
929+// Retrieves the accessible role of an accessible object.
707 func (x *ViewStackPage) GetAccessibleRole() gtk.AccessibleRole {930 func (x *ViewStackPage) GetAccessibleRole() gtk.AccessibleRole {
708 931
709 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())932 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
710 return cret933 return cret
711 }934 }
712 935
713-// Resets the accessible @property to its default value.936+// Retrieves the implementation for the given accessible object.
937+func (x *ViewStackPage) GetAtContext() *gtk.ATContext {
938+ var cls *gtk.ATContext
939+
940+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
941+
942+ if cret == 0 {
943+ return nil
944+ }
945+ cls = &gtk.ATContext{}
946+ cls.Ptr = cret
947+ return cls
948+}
949+
950+// Queries the coordinates and dimensions of this accessible
951+//
952+// This functionality can be overridden by `GtkAccessible`
953+// implementations, e.g. to get the bounds from an ignored
954+// child widget.
955+func (x *ViewStackPage) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
956+
957+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
958+ return cret
959+}
960+
961+// Retrieves the first accessible child of an accessible object.
962+func (x *ViewStackPage) GetFirstAccessibleChild() *gtk.AccessibleBase {
963+ var cls *gtk.AccessibleBase
964+
965+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
966+
967+ if cret == 0 {
968+ return nil
969+ }
970+ cls = &gtk.AccessibleBase{}
971+ cls.Ptr = cret
972+ return cls
973+}
974+
975+// Retrieves the next accessible sibling of an accessible object
976+func (x *ViewStackPage) GetNextAccessibleSibling() *gtk.AccessibleBase {
977+ var cls *gtk.AccessibleBase
978+
979+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
980+
981+ if cret == 0 {
982+ return nil
983+ }
984+ cls = &gtk.AccessibleBase{}
985+ cls.Ptr = cret
986+ return cls
987+}
988+
989+// Queries a platform state, such as focus.
990+//
991+// This functionality can be overridden by `GtkAccessible`
992+// implementations, e.g. to get platform state from an ignored
993+// child widget, as is the case for `GtkText` wrappers.
994+func (x *ViewStackPage) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
995+
996+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
997+ return cret
998+}
999+
1000+// Resets the accessible property to its default value.
714 func (x *ViewStackPage) ResetProperty(PropertyVar gtk.AccessibleProperty) {1001 func (x *ViewStackPage) ResetProperty(PropertyVar gtk.AccessibleProperty) {
715 1002
716 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)1003 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
717 1004
718 }1005 }
719 1006
720-// Resets the accessible @relation to its default value.1007+// Resets the accessible relation to its default value.
721 func (x *ViewStackPage) ResetRelation(RelationVar gtk.AccessibleRelation) {1008 func (x *ViewStackPage) ResetRelation(RelationVar gtk.AccessibleRelation) {
722 1009
723 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)1010 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
724 1011
725 }1012 }
726 1013
727-// Resets the accessible @state to its default value.1014+// Resets the accessible state to its default value.
728 func (x *ViewStackPage) ResetState(StateVar gtk.AccessibleState) {1015 func (x *ViewStackPage) ResetState(StateVar gtk.AccessibleState) {
729 1016
730 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)1017 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
731 1018
732 }1019 }
733 1020
1021+// Sets the parent and sibling of an accessible object.
1022+//
1023+// This function is meant to be used by accessible implementations that are
1024+// not part of the widget hierarchy, and but act as a logical bridge between
1025+// widgets. For instance, if a widget creates an object that holds metadata
1026+// for each child, and you want that object to implement the `GtkAccessible`
1027+// interface, you will use this function to ensure that the parent of each
1028+// child widget is the metadata object, and the parent of each metadata
1029+// object is the container widget.
1030+func (x *ViewStackPage) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
1031+
1032+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
1033+
1034+}
1035+
1036+// Updates the next accessible sibling.
1037+//
1038+// That might be useful when a new child of a custom accessible
1039+// is created, and it needs to be linked to a previous child.
1040+func (x *ViewStackPage) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
1041+
1042+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
1043+
1044+}
1045+
1046+// Informs ATs that the platform state has changed.
1047+//
1048+// This function should be used by `GtkAccessible` implementations that
1049+// have a platform state but are not widgets. Widgets handle platform
1050+// states automatically.
1051+func (x *ViewStackPage) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
1052+
1053+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
1054+
1055+}
1056+
734 // Updates a list of accessible properties.1057 // Updates a list of accessible properties.
735 //1058 //
736 // See the [enum@Gtk.AccessibleProperty] documentation for the1059 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -773,7 +1096,7 @@ func (x *ViewStackPage) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []
773 // relation change must be communicated to assistive technologies.1096 // relation change must be communicated to assistive technologies.
774 //1097 //
775 // If the [enum@Gtk.AccessibleRelation] requires a list of references,1098 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
776-// you should pass each reference individually, followed by %NULL, e.g.1099+// you should pass each reference individually, followed by `NULL`, e.g.
777 //1100 //
778 // ```c1101 // ```c
779 // gtk_accessible_update_relation (accessible,1102 // gtk_accessible_update_relation (accessible,
@@ -803,13 +1126,17 @@ func (x *ViewStackPage) UpdateRelationValue(NRelationsVar int, RelationsVar []gt
803 1126
804 }1127 }
805 1128
806-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]1129+// Updates a list of accessible states.
807-// documentation for the value types of accessible states.
808 //1130 //
809-// This function should be called by `GtkWidget` types whenever an accessible1131+// See the [enum@Gtk.AccessibleState] documentation for the
810-// state change must be communicated to assistive technologies.1132+// value types of accessible states.
1133+//
1134+// This function should be called by `GtkWidget` types whenever
1135+// an accessible state change must be communicated to assistive
1136+// technologies.
811 //1137 //
812 // Example:1138 // Example:
1139+//
813 // ```c1140 // ```c
814 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;1141 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
815 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),1142 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -1043,7 +1370,7 @@ func (x *ViewStackPages) SelectRange(PositionVar uint, NItemsVar uint, UnselectR
1043 1370
1044 // Helper function for implementations of `GtkSelectionModel`.1371 // Helper function for implementations of `GtkSelectionModel`.
1045 //1372 //
1046-// Call this when a the selection changes to emit the1373+// Call this when the selection changes to emit the
1047 // [signal@Gtk.SelectionModel::selection-changed] signal.1374 // [signal@Gtk.SelectionModel::selection-changed] signal.
1048 func (x *ViewStackPages) SelectionChanged(PositionVar uint, NItemsVar uint) {1375 func (x *ViewStackPages) SelectionChanged(PositionVar uint, NItemsVar uint) {
1049 1376
@@ -1131,14 +1458,19 @@ func init() {
1131 core.PuregoSafeRegister(&xViewStackAddTitled, lib, "adw_view_stack_add_titled")1458 core.PuregoSafeRegister(&xViewStackAddTitled, lib, "adw_view_stack_add_titled")
1132 core.PuregoSafeRegister(&xViewStackAddTitledWithIcon, lib, "adw_view_stack_add_titled_with_icon")1459 core.PuregoSafeRegister(&xViewStackAddTitledWithIcon, lib, "adw_view_stack_add_titled_with_icon")
1133 core.PuregoSafeRegister(&xViewStackGetChildByName, lib, "adw_view_stack_get_child_by_name")1460 core.PuregoSafeRegister(&xViewStackGetChildByName, lib, "adw_view_stack_get_child_by_name")
1461+ core.PuregoSafeRegister(&xViewStackGetEnableTransitions, lib, "adw_view_stack_get_enable_transitions")
1134 core.PuregoSafeRegister(&xViewStackGetHhomogeneous, lib, "adw_view_stack_get_hhomogeneous")1462 core.PuregoSafeRegister(&xViewStackGetHhomogeneous, lib, "adw_view_stack_get_hhomogeneous")
1135 core.PuregoSafeRegister(&xViewStackGetPage, lib, "adw_view_stack_get_page")1463 core.PuregoSafeRegister(&xViewStackGetPage, lib, "adw_view_stack_get_page")
1136 core.PuregoSafeRegister(&xViewStackGetPages, lib, "adw_view_stack_get_pages")1464 core.PuregoSafeRegister(&xViewStackGetPages, lib, "adw_view_stack_get_pages")
1465+ core.PuregoSafeRegister(&xViewStackGetTransitionDuration, lib, "adw_view_stack_get_transition_duration")
1466+ core.PuregoSafeRegister(&xViewStackGetTransitionRunning, lib, "adw_view_stack_get_transition_running")
1137 core.PuregoSafeRegister(&xViewStackGetVhomogeneous, lib, "adw_view_stack_get_vhomogeneous")1467 core.PuregoSafeRegister(&xViewStackGetVhomogeneous, lib, "adw_view_stack_get_vhomogeneous")
1138 core.PuregoSafeRegister(&xViewStackGetVisibleChild, lib, "adw_view_stack_get_visible_child")1468 core.PuregoSafeRegister(&xViewStackGetVisibleChild, lib, "adw_view_stack_get_visible_child")
1139 core.PuregoSafeRegister(&xViewStackGetVisibleChildName, lib, "adw_view_stack_get_visible_child_name")1469 core.PuregoSafeRegister(&xViewStackGetVisibleChildName, lib, "adw_view_stack_get_visible_child_name")
1140 core.PuregoSafeRegister(&xViewStackRemove, lib, "adw_view_stack_remove")1470 core.PuregoSafeRegister(&xViewStackRemove, lib, "adw_view_stack_remove")
1471+ core.PuregoSafeRegister(&xViewStackSetEnableTransitions, lib, "adw_view_stack_set_enable_transitions")
1141 core.PuregoSafeRegister(&xViewStackSetHhomogeneous, lib, "adw_view_stack_set_hhomogeneous")1472 core.PuregoSafeRegister(&xViewStackSetHhomogeneous, lib, "adw_view_stack_set_hhomogeneous")
1473+ core.PuregoSafeRegister(&xViewStackSetTransitionDuration, lib, "adw_view_stack_set_transition_duration")
1142 core.PuregoSafeRegister(&xViewStackSetVhomogeneous, lib, "adw_view_stack_set_vhomogeneous")1474 core.PuregoSafeRegister(&xViewStackSetVhomogeneous, lib, "adw_view_stack_set_vhomogeneous")
1143 core.PuregoSafeRegister(&xViewStackSetVisibleChild, lib, "adw_view_stack_set_visible_child")1475 core.PuregoSafeRegister(&xViewStackSetVisibleChild, lib, "adw_view_stack_set_visible_child")
1144 core.PuregoSafeRegister(&xViewStackSetVisibleChildName, lib, "adw_view_stack_set_visible_child_name")1476 core.PuregoSafeRegister(&xViewStackSetVisibleChildName, lib, "adw_view_stack_set_visible_child_name")
M v4/adw/adw-view-switcher-bar.go +145 -10
@@ -173,34 +173,165 @@ func (c *ViewSwitcherBar) SetGoPointer(ptr uintptr) {
173 c.Ptr = ptr173 c.Ptr = ptr
174 }174 }
175 175
176-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.176+// Requests the user's screen reader to announce the given message.
177+//
178+// This kind of notification is useful for messages that
179+// either have only a visual representation or that are not
180+// exposed visually at all, e.g. a notification about a
181+// successful operation.
182+//
183+// Also, by using this API, you can ensure that the message
184+// does not interrupts the user's current screen reader output.
185+func (x *ViewSwitcherBar) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
186+
187+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
188+
189+}
190+
191+// Retrieves the accessible parent for an accessible object.
192+//
193+// This function returns `NULL` for top level widgets.
194+func (x *ViewSwitcherBar) GetAccessibleParent() *gtk.AccessibleBase {
195+ var cls *gtk.AccessibleBase
196+
197+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
198+
199+ if cret == 0 {
200+ return nil
201+ }
202+ cls = &gtk.AccessibleBase{}
203+ cls.Ptr = cret
204+ return cls
205+}
206+
207+// Retrieves the accessible role of an accessible object.
177 func (x *ViewSwitcherBar) GetAccessibleRole() gtk.AccessibleRole {208 func (x *ViewSwitcherBar) GetAccessibleRole() gtk.AccessibleRole {
178 209
179 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())210 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
180 return cret211 return cret
181 }212 }
182 213
183-// Resets the accessible @property to its default value.214+// Retrieves the implementation for the given accessible object.
215+func (x *ViewSwitcherBar) GetAtContext() *gtk.ATContext {
216+ var cls *gtk.ATContext
217+
218+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
219+
220+ if cret == 0 {
221+ return nil
222+ }
223+ cls = &gtk.ATContext{}
224+ cls.Ptr = cret
225+ return cls
226+}
227+
228+// Queries the coordinates and dimensions of this accessible
229+//
230+// This functionality can be overridden by `GtkAccessible`
231+// implementations, e.g. to get the bounds from an ignored
232+// child widget.
233+func (x *ViewSwitcherBar) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
234+
235+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
236+ return cret
237+}
238+
239+// Retrieves the first accessible child of an accessible object.
240+func (x *ViewSwitcherBar) GetFirstAccessibleChild() *gtk.AccessibleBase {
241+ var cls *gtk.AccessibleBase
242+
243+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
244+
245+ if cret == 0 {
246+ return nil
247+ }
248+ cls = &gtk.AccessibleBase{}
249+ cls.Ptr = cret
250+ return cls
251+}
252+
253+// Retrieves the next accessible sibling of an accessible object
254+func (x *ViewSwitcherBar) GetNextAccessibleSibling() *gtk.AccessibleBase {
255+ var cls *gtk.AccessibleBase
256+
257+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
258+
259+ if cret == 0 {
260+ return nil
261+ }
262+ cls = &gtk.AccessibleBase{}
263+ cls.Ptr = cret
264+ return cls
265+}
266+
267+// Queries a platform state, such as focus.
268+//
269+// This functionality can be overridden by `GtkAccessible`
270+// implementations, e.g. to get platform state from an ignored
271+// child widget, as is the case for `GtkText` wrappers.
272+func (x *ViewSwitcherBar) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
273+
274+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
275+ return cret
276+}
277+
278+// Resets the accessible property to its default value.
184 func (x *ViewSwitcherBar) ResetProperty(PropertyVar gtk.AccessibleProperty) {279 func (x *ViewSwitcherBar) ResetProperty(PropertyVar gtk.AccessibleProperty) {
185 280
186 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)281 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
187 282
188 }283 }
189 284
190-// Resets the accessible @relation to its default value.285+// Resets the accessible relation to its default value.
191 func (x *ViewSwitcherBar) ResetRelation(RelationVar gtk.AccessibleRelation) {286 func (x *ViewSwitcherBar) ResetRelation(RelationVar gtk.AccessibleRelation) {
192 287
193 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)288 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
194 289
195 }290 }
196 291
197-// Resets the accessible @state to its default value.292+// Resets the accessible state to its default value.
198 func (x *ViewSwitcherBar) ResetState(StateVar gtk.AccessibleState) {293 func (x *ViewSwitcherBar) ResetState(StateVar gtk.AccessibleState) {
199 294
200 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)295 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
201 296
202 }297 }
203 298
299+// Sets the parent and sibling of an accessible object.
300+//
301+// This function is meant to be used by accessible implementations that are
302+// not part of the widget hierarchy, and but act as a logical bridge between
303+// widgets. For instance, if a widget creates an object that holds metadata
304+// for each child, and you want that object to implement the `GtkAccessible`
305+// interface, you will use this function to ensure that the parent of each
306+// child widget is the metadata object, and the parent of each metadata
307+// object is the container widget.
308+func (x *ViewSwitcherBar) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
309+
310+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
311+
312+}
313+
314+// Updates the next accessible sibling.
315+//
316+// That might be useful when a new child of a custom accessible
317+// is created, and it needs to be linked to a previous child.
318+func (x *ViewSwitcherBar) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
319+
320+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
321+
322+}
323+
324+// Informs ATs that the platform state has changed.
325+//
326+// This function should be used by `GtkAccessible` implementations that
327+// have a platform state but are not widgets. Widgets handle platform
328+// states automatically.
329+func (x *ViewSwitcherBar) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
330+
331+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
332+
333+}
334+
204 // Updates a list of accessible properties.335 // Updates a list of accessible properties.
205 //336 //
206 // See the [enum@Gtk.AccessibleProperty] documentation for the337 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -243,7 +374,7 @@ func (x *ViewSwitcherBar) UpdatePropertyValue(NPropertiesVar int, PropertiesVar
243 // relation change must be communicated to assistive technologies.374 // relation change must be communicated to assistive technologies.
244 //375 //
245 // If the [enum@Gtk.AccessibleRelation] requires a list of references,376 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
246-// you should pass each reference individually, followed by %NULL, e.g.377+// you should pass each reference individually, followed by `NULL`, e.g.
247 //378 //
248 // ```c379 // ```c
249 // gtk_accessible_update_relation (accessible,380 // gtk_accessible_update_relation (accessible,
@@ -273,13 +404,17 @@ func (x *ViewSwitcherBar) UpdateRelationValue(NRelationsVar int, RelationsVar []
273 404
274 }405 }
275 406
276-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]407+// Updates a list of accessible states.
277-// documentation for the value types of accessible states.
278 //408 //
279-// This function should be called by `GtkWidget` types whenever an accessible409+// See the [enum@Gtk.AccessibleState] documentation for the
280-// state change must be communicated to assistive technologies.410+// value types of accessible states.
411+//
412+// This function should be called by `GtkWidget` types whenever
413+// an accessible state change must be communicated to assistive
414+// technologies.
281 //415 //
282 // Example:416 // Example:
417+//
283 // ```c418 // ```c
284 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;419 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
285 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),420 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -309,7 +444,7 @@ func (x *ViewSwitcherBar) UpdateStateValue(NStatesVar int, StatesVar []gtk.Acces
309 // Gets the ID of the @buildable object.444 // Gets the ID of the @buildable object.
310 //445 //
311 // `GtkBuilder` sets the name based on the ID attribute446 // `GtkBuilder` sets the name based on the ID attribute
312-// of the <object> tag used to construct the @buildable.447+// of the `<object>` tag used to construct the @buildable.
313 func (x *ViewSwitcherBar) GetBuildableId() string {448 func (x *ViewSwitcherBar) GetBuildableId() string {
314 449
315 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())450 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-view-switcher-title.go +145 -10
@@ -233,34 +233,165 @@ func (c *ViewSwitcherTitle) SetGoPointer(ptr uintptr) {
233 c.Ptr = ptr233 c.Ptr = ptr
234 }234 }
235 235
236-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.236+// Requests the user's screen reader to announce the given message.
237+//
238+// This kind of notification is useful for messages that
239+// either have only a visual representation or that are not
240+// exposed visually at all, e.g. a notification about a
241+// successful operation.
242+//
243+// Also, by using this API, you can ensure that the message
244+// does not interrupts the user's current screen reader output.
245+func (x *ViewSwitcherTitle) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
246+
247+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
248+
249+}
250+
251+// Retrieves the accessible parent for an accessible object.
252+//
253+// This function returns `NULL` for top level widgets.
254+func (x *ViewSwitcherTitle) GetAccessibleParent() *gtk.AccessibleBase {
255+ var cls *gtk.AccessibleBase
256+
257+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
258+
259+ if cret == 0 {
260+ return nil
261+ }
262+ cls = &gtk.AccessibleBase{}
263+ cls.Ptr = cret
264+ return cls
265+}
266+
267+// Retrieves the accessible role of an accessible object.
237 func (x *ViewSwitcherTitle) GetAccessibleRole() gtk.AccessibleRole {268 func (x *ViewSwitcherTitle) GetAccessibleRole() gtk.AccessibleRole {
238 269
239 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())270 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
240 return cret271 return cret
241 }272 }
242 273
243-// Resets the accessible @property to its default value.274+// Retrieves the implementation for the given accessible object.
275+func (x *ViewSwitcherTitle) GetAtContext() *gtk.ATContext {
276+ var cls *gtk.ATContext
277+
278+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
279+
280+ if cret == 0 {
281+ return nil
282+ }
283+ cls = &gtk.ATContext{}
284+ cls.Ptr = cret
285+ return cls
286+}
287+
288+// Queries the coordinates and dimensions of this accessible
289+//
290+// This functionality can be overridden by `GtkAccessible`
291+// implementations, e.g. to get the bounds from an ignored
292+// child widget.
293+func (x *ViewSwitcherTitle) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
294+
295+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
296+ return cret
297+}
298+
299+// Retrieves the first accessible child of an accessible object.
300+func (x *ViewSwitcherTitle) GetFirstAccessibleChild() *gtk.AccessibleBase {
301+ var cls *gtk.AccessibleBase
302+
303+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
304+
305+ if cret == 0 {
306+ return nil
307+ }
308+ cls = &gtk.AccessibleBase{}
309+ cls.Ptr = cret
310+ return cls
311+}
312+
313+// Retrieves the next accessible sibling of an accessible object
314+func (x *ViewSwitcherTitle) GetNextAccessibleSibling() *gtk.AccessibleBase {
315+ var cls *gtk.AccessibleBase
316+
317+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
318+
319+ if cret == 0 {
320+ return nil
321+ }
322+ cls = &gtk.AccessibleBase{}
323+ cls.Ptr = cret
324+ return cls
325+}
326+
327+// Queries a platform state, such as focus.
328+//
329+// This functionality can be overridden by `GtkAccessible`
330+// implementations, e.g. to get platform state from an ignored
331+// child widget, as is the case for `GtkText` wrappers.
332+func (x *ViewSwitcherTitle) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
333+
334+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
335+ return cret
336+}
337+
338+// Resets the accessible property to its default value.
244 func (x *ViewSwitcherTitle) ResetProperty(PropertyVar gtk.AccessibleProperty) {339 func (x *ViewSwitcherTitle) ResetProperty(PropertyVar gtk.AccessibleProperty) {
245 340
246 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)341 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
247 342
248 }343 }
249 344
250-// Resets the accessible @relation to its default value.345+// Resets the accessible relation to its default value.
251 func (x *ViewSwitcherTitle) ResetRelation(RelationVar gtk.AccessibleRelation) {346 func (x *ViewSwitcherTitle) ResetRelation(RelationVar gtk.AccessibleRelation) {
252 347
253 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)348 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
254 349
255 }350 }
256 351
257-// Resets the accessible @state to its default value.352+// Resets the accessible state to its default value.
258 func (x *ViewSwitcherTitle) ResetState(StateVar gtk.AccessibleState) {353 func (x *ViewSwitcherTitle) ResetState(StateVar gtk.AccessibleState) {
259 354
260 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)355 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
261 356
262 }357 }
263 358
359+// Sets the parent and sibling of an accessible object.
360+//
361+// This function is meant to be used by accessible implementations that are
362+// not part of the widget hierarchy, and but act as a logical bridge between
363+// widgets. For instance, if a widget creates an object that holds metadata
364+// for each child, and you want that object to implement the `GtkAccessible`
365+// interface, you will use this function to ensure that the parent of each
366+// child widget is the metadata object, and the parent of each metadata
367+// object is the container widget.
368+func (x *ViewSwitcherTitle) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
369+
370+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
371+
372+}
373+
374+// Updates the next accessible sibling.
375+//
376+// That might be useful when a new child of a custom accessible
377+// is created, and it needs to be linked to a previous child.
378+func (x *ViewSwitcherTitle) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
379+
380+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
381+
382+}
383+
384+// Informs ATs that the platform state has changed.
385+//
386+// This function should be used by `GtkAccessible` implementations that
387+// have a platform state but are not widgets. Widgets handle platform
388+// states automatically.
389+func (x *ViewSwitcherTitle) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
390+
391+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
392+
393+}
394+
264 // Updates a list of accessible properties.395 // Updates a list of accessible properties.
265 //396 //
266 // See the [enum@Gtk.AccessibleProperty] documentation for the397 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -303,7 +434,7 @@ func (x *ViewSwitcherTitle) UpdatePropertyValue(NPropertiesVar int, PropertiesVa
303 // relation change must be communicated to assistive technologies.434 // relation change must be communicated to assistive technologies.
304 //435 //
305 // If the [enum@Gtk.AccessibleRelation] requires a list of references,436 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
306-// you should pass each reference individually, followed by %NULL, e.g.437+// you should pass each reference individually, followed by `NULL`, e.g.
307 //438 //
308 // ```c439 // ```c
309 // gtk_accessible_update_relation (accessible,440 // gtk_accessible_update_relation (accessible,
@@ -333,13 +464,17 @@ func (x *ViewSwitcherTitle) UpdateRelationValue(NRelationsVar int, RelationsVar
333 464
334 }465 }
335 466
336-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]467+// Updates a list of accessible states.
337-// documentation for the value types of accessible states.
338 //468 //
339-// This function should be called by `GtkWidget` types whenever an accessible469+// See the [enum@Gtk.AccessibleState] documentation for the
340-// state change must be communicated to assistive technologies.470+// value types of accessible states.
471+//
472+// This function should be called by `GtkWidget` types whenever
473+// an accessible state change must be communicated to assistive
474+// technologies.
341 //475 //
342 // Example:476 // Example:
477+//
343 // ```c478 // ```c
344 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;479 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
345 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),480 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -369,7 +504,7 @@ func (x *ViewSwitcherTitle) UpdateStateValue(NStatesVar int, StatesVar []gtk.Acc
369 // Gets the ID of the @buildable object.504 // Gets the ID of the @buildable object.
370 //505 //
371 // `GtkBuilder` sets the name based on the ID attribute506 // `GtkBuilder` sets the name based on the ID attribute
372-// of the <object> tag used to construct the @buildable.507+// of the `<object>` tag used to construct the @buildable.
373 func (x *ViewSwitcherTitle) GetBuildableId() string {508 func (x *ViewSwitcherTitle) GetBuildableId() string {
374 509
375 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())510 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-view-switcher.go +145 -10
@@ -199,34 +199,165 @@ func (c *ViewSwitcher) SetGoPointer(ptr uintptr) {
199 c.Ptr = ptr199 c.Ptr = ptr
200 }200 }
201 201
202-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.202+// Requests the user's screen reader to announce the given message.
203+//
204+// This kind of notification is useful for messages that
205+// either have only a visual representation or that are not
206+// exposed visually at all, e.g. a notification about a
207+// successful operation.
208+//
209+// Also, by using this API, you can ensure that the message
210+// does not interrupts the user's current screen reader output.
211+func (x *ViewSwitcher) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
212+
213+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
214+
215+}
216+
217+// Retrieves the accessible parent for an accessible object.
218+//
219+// This function returns `NULL` for top level widgets.
220+func (x *ViewSwitcher) GetAccessibleParent() *gtk.AccessibleBase {
221+ var cls *gtk.AccessibleBase
222+
223+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
224+
225+ if cret == 0 {
226+ return nil
227+ }
228+ cls = &gtk.AccessibleBase{}
229+ cls.Ptr = cret
230+ return cls
231+}
232+
233+// Retrieves the accessible role of an accessible object.
203 func (x *ViewSwitcher) GetAccessibleRole() gtk.AccessibleRole {234 func (x *ViewSwitcher) GetAccessibleRole() gtk.AccessibleRole {
204 235
205 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())236 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
206 return cret237 return cret
207 }238 }
208 239
209-// Resets the accessible @property to its default value.240+// Retrieves the implementation for the given accessible object.
241+func (x *ViewSwitcher) GetAtContext() *gtk.ATContext {
242+ var cls *gtk.ATContext
243+
244+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
245+
246+ if cret == 0 {
247+ return nil
248+ }
249+ cls = &gtk.ATContext{}
250+ cls.Ptr = cret
251+ return cls
252+}
253+
254+// Queries the coordinates and dimensions of this accessible
255+//
256+// This functionality can be overridden by `GtkAccessible`
257+// implementations, e.g. to get the bounds from an ignored
258+// child widget.
259+func (x *ViewSwitcher) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
260+
261+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
262+ return cret
263+}
264+
265+// Retrieves the first accessible child of an accessible object.
266+func (x *ViewSwitcher) GetFirstAccessibleChild() *gtk.AccessibleBase {
267+ var cls *gtk.AccessibleBase
268+
269+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
270+
271+ if cret == 0 {
272+ return nil
273+ }
274+ cls = &gtk.AccessibleBase{}
275+ cls.Ptr = cret
276+ return cls
277+}
278+
279+// Retrieves the next accessible sibling of an accessible object
280+func (x *ViewSwitcher) GetNextAccessibleSibling() *gtk.AccessibleBase {
281+ var cls *gtk.AccessibleBase
282+
283+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
284+
285+ if cret == 0 {
286+ return nil
287+ }
288+ cls = &gtk.AccessibleBase{}
289+ cls.Ptr = cret
290+ return cls
291+}
292+
293+// Queries a platform state, such as focus.
294+//
295+// This functionality can be overridden by `GtkAccessible`
296+// implementations, e.g. to get platform state from an ignored
297+// child widget, as is the case for `GtkText` wrappers.
298+func (x *ViewSwitcher) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
299+
300+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
301+ return cret
302+}
303+
304+// Resets the accessible property to its default value.
210 func (x *ViewSwitcher) ResetProperty(PropertyVar gtk.AccessibleProperty) {305 func (x *ViewSwitcher) ResetProperty(PropertyVar gtk.AccessibleProperty) {
211 306
212 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)307 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
213 308
214 }309 }
215 310
216-// Resets the accessible @relation to its default value.311+// Resets the accessible relation to its default value.
217 func (x *ViewSwitcher) ResetRelation(RelationVar gtk.AccessibleRelation) {312 func (x *ViewSwitcher) ResetRelation(RelationVar gtk.AccessibleRelation) {
218 313
219 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)314 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
220 315
221 }316 }
222 317
223-// Resets the accessible @state to its default value.318+// Resets the accessible state to its default value.
224 func (x *ViewSwitcher) ResetState(StateVar gtk.AccessibleState) {319 func (x *ViewSwitcher) ResetState(StateVar gtk.AccessibleState) {
225 320
226 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)321 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
227 322
228 }323 }
229 324
325+// Sets the parent and sibling of an accessible object.
326+//
327+// This function is meant to be used by accessible implementations that are
328+// not part of the widget hierarchy, and but act as a logical bridge between
329+// widgets. For instance, if a widget creates an object that holds metadata
330+// for each child, and you want that object to implement the `GtkAccessible`
331+// interface, you will use this function to ensure that the parent of each
332+// child widget is the metadata object, and the parent of each metadata
333+// object is the container widget.
334+func (x *ViewSwitcher) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
335+
336+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
337+
338+}
339+
340+// Updates the next accessible sibling.
341+//
342+// That might be useful when a new child of a custom accessible
343+// is created, and it needs to be linked to a previous child.
344+func (x *ViewSwitcher) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
345+
346+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
347+
348+}
349+
350+// Informs ATs that the platform state has changed.
351+//
352+// This function should be used by `GtkAccessible` implementations that
353+// have a platform state but are not widgets. Widgets handle platform
354+// states automatically.
355+func (x *ViewSwitcher) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
356+
357+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
358+
359+}
360+
230 // Updates a list of accessible properties.361 // Updates a list of accessible properties.
231 //362 //
232 // See the [enum@Gtk.AccessibleProperty] documentation for the363 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -269,7 +400,7 @@ func (x *ViewSwitcher) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []g
269 // relation change must be communicated to assistive technologies.400 // relation change must be communicated to assistive technologies.
270 //401 //
271 // If the [enum@Gtk.AccessibleRelation] requires a list of references,402 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
272-// you should pass each reference individually, followed by %NULL, e.g.403+// you should pass each reference individually, followed by `NULL`, e.g.
273 //404 //
274 // ```c405 // ```c
275 // gtk_accessible_update_relation (accessible,406 // gtk_accessible_update_relation (accessible,
@@ -299,13 +430,17 @@ func (x *ViewSwitcher) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk
299 430
300 }431 }
301 432
302-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]433+// Updates a list of accessible states.
303-// documentation for the value types of accessible states.
304 //434 //
305-// This function should be called by `GtkWidget` types whenever an accessible435+// See the [enum@Gtk.AccessibleState] documentation for the
306-// state change must be communicated to assistive technologies.436+// value types of accessible states.
437+//
438+// This function should be called by `GtkWidget` types whenever
439+// an accessible state change must be communicated to assistive
440+// technologies.
307 //441 //
308 // Example:442 // Example:
443+//
309 // ```c444 // ```c
310 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;445 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
311 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),446 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -335,7 +470,7 @@ func (x *ViewSwitcher) UpdateStateValue(NStatesVar int, StatesVar []gtk.Accessib
335 // Gets the ID of the @buildable object.470 // Gets the ID of the @buildable object.
336 //471 //
337 // `GtkBuilder` sets the name based on the ID attribute472 // `GtkBuilder` sets the name based on the ID attribute
338-// of the <object> tag used to construct the @buildable.473+// of the `<object>` tag used to construct the @buildable.
339 func (x *ViewSwitcher) GetBuildableId() string {474 func (x *ViewSwitcher) GetBuildableId() string {
340 475
341 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())476 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-window-title.go +145 -10
@@ -122,34 +122,165 @@ func (c *WindowTitle) SetGoPointer(ptr uintptr) {
122 c.Ptr = ptr122 c.Ptr = ptr
123 }123 }
124 124
125-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.125+// Requests the user's screen reader to announce the given message.
126+//
127+// This kind of notification is useful for messages that
128+// either have only a visual representation or that are not
129+// exposed visually at all, e.g. a notification about a
130+// successful operation.
131+//
132+// Also, by using this API, you can ensure that the message
133+// does not interrupts the user's current screen reader output.
134+func (x *WindowTitle) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
135+
136+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
137+
138+}
139+
140+// Retrieves the accessible parent for an accessible object.
141+//
142+// This function returns `NULL` for top level widgets.
143+func (x *WindowTitle) GetAccessibleParent() *gtk.AccessibleBase {
144+ var cls *gtk.AccessibleBase
145+
146+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
147+
148+ if cret == 0 {
149+ return nil
150+ }
151+ cls = &gtk.AccessibleBase{}
152+ cls.Ptr = cret
153+ return cls
154+}
155+
156+// Retrieves the accessible role of an accessible object.
126 func (x *WindowTitle) GetAccessibleRole() gtk.AccessibleRole {157 func (x *WindowTitle) GetAccessibleRole() gtk.AccessibleRole {
127 158
128 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())159 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
129 return cret160 return cret
130 }161 }
131 162
132-// Resets the accessible @property to its default value.163+// Retrieves the implementation for the given accessible object.
164+func (x *WindowTitle) GetAtContext() *gtk.ATContext {
165+ var cls *gtk.ATContext
166+
167+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
168+
169+ if cret == 0 {
170+ return nil
171+ }
172+ cls = &gtk.ATContext{}
173+ cls.Ptr = cret
174+ return cls
175+}
176+
177+// Queries the coordinates and dimensions of this accessible
178+//
179+// This functionality can be overridden by `GtkAccessible`
180+// implementations, e.g. to get the bounds from an ignored
181+// child widget.
182+func (x *WindowTitle) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
183+
184+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
185+ return cret
186+}
187+
188+// Retrieves the first accessible child of an accessible object.
189+func (x *WindowTitle) GetFirstAccessibleChild() *gtk.AccessibleBase {
190+ var cls *gtk.AccessibleBase
191+
192+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
193+
194+ if cret == 0 {
195+ return nil
196+ }
197+ cls = &gtk.AccessibleBase{}
198+ cls.Ptr = cret
199+ return cls
200+}
201+
202+// Retrieves the next accessible sibling of an accessible object
203+func (x *WindowTitle) GetNextAccessibleSibling() *gtk.AccessibleBase {
204+ var cls *gtk.AccessibleBase
205+
206+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
207+
208+ if cret == 0 {
209+ return nil
210+ }
211+ cls = &gtk.AccessibleBase{}
212+ cls.Ptr = cret
213+ return cls
214+}
215+
216+// Queries a platform state, such as focus.
217+//
218+// This functionality can be overridden by `GtkAccessible`
219+// implementations, e.g. to get platform state from an ignored
220+// child widget, as is the case for `GtkText` wrappers.
221+func (x *WindowTitle) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
222+
223+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
224+ return cret
225+}
226+
227+// Resets the accessible property to its default value.
133 func (x *WindowTitle) ResetProperty(PropertyVar gtk.AccessibleProperty) {228 func (x *WindowTitle) ResetProperty(PropertyVar gtk.AccessibleProperty) {
134 229
135 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)230 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
136 231
137 }232 }
138 233
139-// Resets the accessible @relation to its default value.234+// Resets the accessible relation to its default value.
140 func (x *WindowTitle) ResetRelation(RelationVar gtk.AccessibleRelation) {235 func (x *WindowTitle) ResetRelation(RelationVar gtk.AccessibleRelation) {
141 236
142 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)237 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
143 238
144 }239 }
145 240
146-// Resets the accessible @state to its default value.241+// Resets the accessible state to its default value.
147 func (x *WindowTitle) ResetState(StateVar gtk.AccessibleState) {242 func (x *WindowTitle) ResetState(StateVar gtk.AccessibleState) {
148 243
149 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)244 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
150 245
151 }246 }
152 247
248+// Sets the parent and sibling of an accessible object.
249+//
250+// This function is meant to be used by accessible implementations that are
251+// not part of the widget hierarchy, and but act as a logical bridge between
252+// widgets. For instance, if a widget creates an object that holds metadata
253+// for each child, and you want that object to implement the `GtkAccessible`
254+// interface, you will use this function to ensure that the parent of each
255+// child widget is the metadata object, and the parent of each metadata
256+// object is the container widget.
257+func (x *WindowTitle) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
258+
259+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
260+
261+}
262+
263+// Updates the next accessible sibling.
264+//
265+// That might be useful when a new child of a custom accessible
266+// is created, and it needs to be linked to a previous child.
267+func (x *WindowTitle) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
268+
269+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
270+
271+}
272+
273+// Informs ATs that the platform state has changed.
274+//
275+// This function should be used by `GtkAccessible` implementations that
276+// have a platform state but are not widgets. Widgets handle platform
277+// states automatically.
278+func (x *WindowTitle) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
279+
280+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
281+
282+}
283+
153 // Updates a list of accessible properties.284 // Updates a list of accessible properties.
154 //285 //
155 // See the [enum@Gtk.AccessibleProperty] documentation for the286 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -192,7 +323,7 @@ func (x *WindowTitle) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gt
192 // relation change must be communicated to assistive technologies.323 // relation change must be communicated to assistive technologies.
193 //324 //
194 // If the [enum@Gtk.AccessibleRelation] requires a list of references,325 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
195-// you should pass each reference individually, followed by %NULL, e.g.326+// you should pass each reference individually, followed by `NULL`, e.g.
196 //327 //
197 // ```c328 // ```c
198 // gtk_accessible_update_relation (accessible,329 // gtk_accessible_update_relation (accessible,
@@ -222,13 +353,17 @@ func (x *WindowTitle) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.
222 353
223 }354 }
224 355
225-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]356+// Updates a list of accessible states.
226-// documentation for the value types of accessible states.
227 //357 //
228-// This function should be called by `GtkWidget` types whenever an accessible358+// See the [enum@Gtk.AccessibleState] documentation for the
229-// state change must be communicated to assistive technologies.359+// value types of accessible states.
360+//
361+// This function should be called by `GtkWidget` types whenever
362+// an accessible state change must be communicated to assistive
363+// technologies.
230 //364 //
231 // Example:365 // Example:
366+//
232 // ```c367 // ```c
233 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;368 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
234 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),369 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -258,7 +393,7 @@ func (x *WindowTitle) UpdateStateValue(NStatesVar int, StatesVar []gtk.Accessibl
258 // Gets the ID of the @buildable object.393 // Gets the ID of the @buildable object.
259 //394 //
260 // `GtkBuilder` sets the name based on the ID attribute395 // `GtkBuilder` sets the name based on the ID attribute
261-// of the <object> tag used to construct the @buildable.396+// of the `<object>` tag used to construct the @buildable.
262 func (x *WindowTitle) GetBuildableId() string {397 func (x *WindowTitle) GetBuildableId() string {
263 398
264 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())399 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
M v4/adw/adw-window.go +179 -10
@@ -106,6 +106,12 @@ func (x *WindowClass) GoPointer() uintptr {
106 // UI state. `AdwWindow` defaults to the minimum size of 360×200 px. If that's106 // UI state. `AdwWindow` defaults to the minimum size of 360×200 px. If that's
107 // too small, set the [property@Gtk.Widget:width-request] and107 // too small, set the [property@Gtk.Widget:width-request] and
108 // [property@Gtk.Widget:height-request] properties manually.108 // [property@Gtk.Widget:height-request] properties manually.
109+//
110+// ## Adaptive Preview
111+//
112+// `AdwWindow` has a debug tool called adaptive preview. It can be opened from
113+// GTK Inspector or by pressing <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>M</kbd>,
114+// and controlled via the [property@Window:adaptive-preview] property.
109 type Window struct {115 type Window struct {
110 gtk.Window116 gtk.Window
111 }117 }
@@ -148,6 +154,15 @@ func (x *Window) AddBreakpoint(BreakpointVar *Breakpoint) {
148 154
149 }155 }
150 156
157+var xWindowGetAdaptivePreview func(uintptr) bool
158+
159+// Gets whether adaptive preview for @self is currently open.
160+func (x *Window) GetAdaptivePreview() bool {
161+
162+ cret := xWindowGetAdaptivePreview(x.GoPointer())
163+ return cret
164+}
165+
151 var xWindowGetContent func(uintptr) uintptr166 var xWindowGetContent func(uintptr) uintptr
152 167
153 // Gets the content widget of @self.168 // Gets the content widget of @self.
@@ -219,6 +234,23 @@ func (x *Window) GetVisibleDialog() *Dialog {
219 return cls234 return cls
220 }235 }
221 236
237+var xWindowSetAdaptivePreview func(uintptr, bool)
238+
239+// Sets whether adaptive preview for @self is currently open.
240+//
241+// Adaptive preview is a debugging tool used for testing the window
242+// contents at specific screen sizes, simulating mobile environment.
243+//
244+// Adaptive preview can always be accessed from inspector. This function
245+// allows applications to open it manually.
246+//
247+// Most applications should not use this function.
248+func (x *Window) SetAdaptivePreview(AdaptivePreviewVar bool) {
249+
250+ xWindowSetAdaptivePreview(x.GoPointer(), AdaptivePreviewVar)
251+
252+}
253+
222 var xWindowSetContent func(uintptr, uintptr)254 var xWindowSetContent func(uintptr, uintptr)
223 255
224 // Sets the content widget of @self.256 // Sets the content widget of @self.
@@ -241,34 +273,165 @@ func (c *Window) SetGoPointer(ptr uintptr) {
241 c.Ptr = ptr273 c.Ptr = ptr
242 }274 }
243 275
244-// Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.276+// Requests the user's screen reader to announce the given message.
277+//
278+// This kind of notification is useful for messages that
279+// either have only a visual representation or that are not
280+// exposed visually at all, e.g. a notification about a
281+// successful operation.
282+//
283+// Also, by using this API, you can ensure that the message
284+// does not interrupts the user's current screen reader output.
285+func (x *Window) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
286+
287+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
288+
289+}
290+
291+// Retrieves the accessible parent for an accessible object.
292+//
293+// This function returns `NULL` for top level widgets.
294+func (x *Window) GetAccessibleParent() *gtk.AccessibleBase {
295+ var cls *gtk.AccessibleBase
296+
297+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
298+
299+ if cret == 0 {
300+ return nil
301+ }
302+ cls = &gtk.AccessibleBase{}
303+ cls.Ptr = cret
304+ return cls
305+}
306+
307+// Retrieves the accessible role of an accessible object.
245 func (x *Window) GetAccessibleRole() gtk.AccessibleRole {308 func (x *Window) GetAccessibleRole() gtk.AccessibleRole {
246 309
247 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())310 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
248 return cret311 return cret
249 }312 }
250 313
251-// Resets the accessible @property to its default value.314+// Retrieves the implementation for the given accessible object.
315+func (x *Window) GetAtContext() *gtk.ATContext {
316+ var cls *gtk.ATContext
317+
318+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
319+
320+ if cret == 0 {
321+ return nil
322+ }
323+ cls = &gtk.ATContext{}
324+ cls.Ptr = cret
325+ return cls
326+}
327+
328+// Queries the coordinates and dimensions of this accessible
329+//
330+// This functionality can be overridden by `GtkAccessible`
331+// implementations, e.g. to get the bounds from an ignored
332+// child widget.
333+func (x *Window) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
334+
335+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
336+ return cret
337+}
338+
339+// Retrieves the first accessible child of an accessible object.
340+func (x *Window) GetFirstAccessibleChild() *gtk.AccessibleBase {
341+ var cls *gtk.AccessibleBase
342+
343+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
344+
345+ if cret == 0 {
346+ return nil
347+ }
348+ cls = &gtk.AccessibleBase{}
349+ cls.Ptr = cret
350+ return cls
351+}
352+
353+// Retrieves the next accessible sibling of an accessible object
354+func (x *Window) GetNextAccessibleSibling() *gtk.AccessibleBase {
355+ var cls *gtk.AccessibleBase
356+
357+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
358+
359+ if cret == 0 {
360+ return nil
361+ }
362+ cls = &gtk.AccessibleBase{}
363+ cls.Ptr = cret
364+ return cls
365+}
366+
367+// Queries a platform state, such as focus.
368+//
369+// This functionality can be overridden by `GtkAccessible`
370+// implementations, e.g. to get platform state from an ignored
371+// child widget, as is the case for `GtkText` wrappers.
372+func (x *Window) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
373+
374+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
375+ return cret
376+}
377+
378+// Resets the accessible property to its default value.
252 func (x *Window) ResetProperty(PropertyVar gtk.AccessibleProperty) {379 func (x *Window) ResetProperty(PropertyVar gtk.AccessibleProperty) {
253 380
254 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)381 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
255 382
256 }383 }
257 384
258-// Resets the accessible @relation to its default value.385+// Resets the accessible relation to its default value.
259 func (x *Window) ResetRelation(RelationVar gtk.AccessibleRelation) {386 func (x *Window) ResetRelation(RelationVar gtk.AccessibleRelation) {
260 387
261 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)388 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
262 389
263 }390 }
264 391
265-// Resets the accessible @state to its default value.392+// Resets the accessible state to its default value.
266 func (x *Window) ResetState(StateVar gtk.AccessibleState) {393 func (x *Window) ResetState(StateVar gtk.AccessibleState) {
267 394
268 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)395 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
269 396
270 }397 }
271 398
399+// Sets the parent and sibling of an accessible object.
400+//
401+// This function is meant to be used by accessible implementations that are
402+// not part of the widget hierarchy, and but act as a logical bridge between
403+// widgets. For instance, if a widget creates an object that holds metadata
404+// for each child, and you want that object to implement the `GtkAccessible`
405+// interface, you will use this function to ensure that the parent of each
406+// child widget is the metadata object, and the parent of each metadata
407+// object is the container widget.
408+func (x *Window) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
409+
410+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
411+
412+}
413+
414+// Updates the next accessible sibling.
415+//
416+// That might be useful when a new child of a custom accessible
417+// is created, and it needs to be linked to a previous child.
418+func (x *Window) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
419+
420+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
421+
422+}
423+
424+// Informs ATs that the platform state has changed.
425+//
426+// This function should be used by `GtkAccessible` implementations that
427+// have a platform state but are not widgets. Widgets handle platform
428+// states automatically.
429+func (x *Window) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
430+
431+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
432+
433+}
434+
272 // Updates a list of accessible properties.435 // Updates a list of accessible properties.
273 //436 //
274 // See the [enum@Gtk.AccessibleProperty] documentation for the437 // See the [enum@Gtk.AccessibleProperty] documentation for the
@@ -311,7 +474,7 @@ func (x *Window) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.Acc
311 // relation change must be communicated to assistive technologies.474 // relation change must be communicated to assistive technologies.
312 //475 //
313 // If the [enum@Gtk.AccessibleRelation] requires a list of references,476 // If the [enum@Gtk.AccessibleRelation] requires a list of references,
314-// you should pass each reference individually, followed by %NULL, e.g.477+// you should pass each reference individually, followed by `NULL`, e.g.
315 //478 //
316 // ```c479 // ```c
317 // gtk_accessible_update_relation (accessible,480 // gtk_accessible_update_relation (accessible,
@@ -341,13 +504,17 @@ func (x *Window) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.Acces
341 504
342 }505 }
343 506
344-// Updates a list of accessible states. See the [enum@Gtk.AccessibleState]507+// Updates a list of accessible states.
345-// documentation for the value types of accessible states.
346 //508 //
347-// This function should be called by `GtkWidget` types whenever an accessible509+// See the [enum@Gtk.AccessibleState] documentation for the
348-// state change must be communicated to assistive technologies.510+// value types of accessible states.
511+//
512+// This function should be called by `GtkWidget` types whenever
513+// an accessible state change must be communicated to assistive
514+// technologies.
349 //515 //
350 // Example:516 // Example:
517+//
351 // ```c518 // ```c
352 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;519 // value = GTK_ACCESSIBLE_TRISTATE_MIXED;
353 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),520 // gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
@@ -377,7 +544,7 @@ func (x *Window) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleStat
377 // Gets the ID of the @buildable object.544 // Gets the ID of the @buildable object.
378 //545 //
379 // `GtkBuilder` sets the name based on the ID attribute546 // `GtkBuilder` sets the name based on the ID attribute
380-// of the <object> tag used to construct the @buildable.547+// of the `<object>` tag used to construct the @buildable.
381 func (x *Window) GetBuildableId() string {548 func (x *Window) GetBuildableId() string {
382 549
383 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())550 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
@@ -504,10 +671,12 @@ func init() {
504 core.PuregoSafeRegister(&xNewWindow, lib, "adw_window_new")671 core.PuregoSafeRegister(&xNewWindow, lib, "adw_window_new")
505 672
506 core.PuregoSafeRegister(&xWindowAddBreakpoint, lib, "adw_window_add_breakpoint")673 core.PuregoSafeRegister(&xWindowAddBreakpoint, lib, "adw_window_add_breakpoint")
674+ core.PuregoSafeRegister(&xWindowGetAdaptivePreview, lib, "adw_window_get_adaptive_preview")
507 core.PuregoSafeRegister(&xWindowGetContent, lib, "adw_window_get_content")675 core.PuregoSafeRegister(&xWindowGetContent, lib, "adw_window_get_content")
508 core.PuregoSafeRegister(&xWindowGetCurrentBreakpoint, lib, "adw_window_get_current_breakpoint")676 core.PuregoSafeRegister(&xWindowGetCurrentBreakpoint, lib, "adw_window_get_current_breakpoint")
509 core.PuregoSafeRegister(&xWindowGetDialogs, lib, "adw_window_get_dialogs")677 core.PuregoSafeRegister(&xWindowGetDialogs, lib, "adw_window_get_dialogs")
510 core.PuregoSafeRegister(&xWindowGetVisibleDialog, lib, "adw_window_get_visible_dialog")678 core.PuregoSafeRegister(&xWindowGetVisibleDialog, lib, "adw_window_get_visible_dialog")
679+ core.PuregoSafeRegister(&xWindowSetAdaptivePreview, lib, "adw_window_set_adaptive_preview")
511 core.PuregoSafeRegister(&xWindowSetContent, lib, "adw_window_set_content")680 core.PuregoSafeRegister(&xWindowSetContent, lib, "adw_window_set_content")
512 681
513 }682 }
A v4/adw/adw-wrap-box.go +810 -0
@@ -0,0 +1,810 @@
1+// Package adw was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT
2+package adw
3+
4+import (
5+ "structs"
6+ "unsafe"
7+
8+ "github.com/jwijenbergh/purego"
9+ "github.com/jwijenbergh/puregotk/pkg/core"
10+ "github.com/jwijenbergh/puregotk/v4/gobject"
11+ "github.com/jwijenbergh/puregotk/v4/gobject/types"
12+ "github.com/jwijenbergh/puregotk/v4/gtk"
13+)
14+
15+type WrapBoxClass struct {
16+ _ structs.HostLayout
17+
18+ ParentClass gtk.WidgetClass
19+}
20+
21+func (x *WrapBoxClass) GoPointer() uintptr {
22+ return uintptr(unsafe.Pointer(x))
23+}
24+
25+// A box-like widget that can wrap into multiple lines.
26+//
27+// <picture>
28+//
29+// <source srcset="wrap-box-dark.png" media="(prefers-color-scheme: dark)">
30+// <img src="wrap-box.png" alt="wrap-box">
31+//
32+// </picture>
33+//
34+// `AdwWrapBox` is similar to [class@Gtk.Box], but can wrap lines when the
35+// widgets cannot fit otherwise. Unlike [class@Gtk.FlowBox], the children aren't
36+// arranged into a grid and behave more like words in a wrapping label.
37+//
38+// Like `GtkBox`, `AdwWrapBox` is orientable and has spacing:
39+//
40+// - [property@WrapBox:child-spacing] between children in the same line;
41+// - [property@WrapBox:line-spacing] between lines.
42+//
43+// ::: note
44+//
45+// Unlike `GtkBox`, `AdwWrapBox` cannot follow the CSS `border-spacing`
46+// property.
47+//
48+// Use the [property@WrapBox:natural-line-length] property to determine the
49+// layout's natural size, e.g. when using it in a [class@Gtk.Popover].
50+//
51+// Normally, a horizontal `AdwWrapBox` wraps left to right and top to bottom
52+// for left-to-right languages. Both of these directions can be reversed, using
53+// the [property@WrapBox:pack-direction] and [property@WrapBox:wrap-reverse]
54+// properties. Additionally, the alignment of each line can be controlled with
55+// the [property@WrapBox:align] property.
56+//
57+// Lines can be justified using the [property@WrapBox:justify] property, filling
58+// the entire line by either increasing child size or spacing depending on the
59+// value. Set [property@WrapBox:justify-last-line] to justify the last line as
60+// well.
61+//
62+// By default, `AdwWrapBox` wraps as soon as the previous line cannot fit any
63+// more children without shrinking them past their natural size. Set
64+// [property@WrapBox:wrap-policy] to [enum@Adw.WrapPolicy.MINIMUM] to only wrap
65+// once all the children in the previous line have been shrunk to their minimum
66+// size.
67+//
68+// To make each line take the same amount of space, set
69+// [property@WrapBox:line-homogeneous] to `TRUE`.
70+//
71+// Spacing and natural line length can scale with the text scale factor, use the
72+// [property@WrapBox:child-spacing-unit], [property@WrapBox:line-spacing-unit]
73+// and/or [property@WrapBox:natural-line-length-unit] properties to enable that
74+// behavior.
75+//
76+// See [class@WrapLayout].
77+//
78+// ## CSS nodes
79+//
80+// `AdwWrapBox` uses a single CSS node with name `wrap-box`.
81+//
82+// ## Accessibility
83+//
84+// `AdwWrapBox` uses the `GTK_ACCESSIBLE_ROLE_GROUP` role.
85+type WrapBox struct {
86+ gtk.Widget
87+}
88+
89+var xWrapBoxGLibType func() types.GType
90+
91+func WrapBoxGLibType() types.GType {
92+ return xWrapBoxGLibType()
93+}
94+
95+func WrapBoxNewFromInternalPtr(ptr uintptr) *WrapBox {
96+ cls := &WrapBox{}
97+ cls.Ptr = ptr
98+ return cls
99+}
100+
101+var xNewWrapBox func() uintptr
102+
103+// Creates a new `AdwWrapBox`.
104+func NewWrapBox() *WrapBox {
105+ var cls *WrapBox
106+
107+ cret := xNewWrapBox()
108+
109+ if cret == 0 {
110+ return nil
111+ }
112+ gobject.IncreaseRef(cret)
113+ cls = &WrapBox{}
114+ cls.Ptr = cret
115+ return cls
116+}
117+
118+var xWrapBoxAppend func(uintptr, uintptr)
119+
120+// Adds @child as the last child to @self.
121+func (x *WrapBox) Append(ChildVar *gtk.Widget) {
122+
123+ xWrapBoxAppend(x.GoPointer(), ChildVar.GoPointer())
124+
125+}
126+
127+var xWrapBoxGetAlign func(uintptr) float32
128+
129+// Gets the alignment of the children within each line.
130+func (x *WrapBox) GetAlign() float32 {
131+
132+ cret := xWrapBoxGetAlign(x.GoPointer())
133+ return cret
134+}
135+
136+var xWrapBoxGetChildSpacing func(uintptr) int
137+
138+// Gets spacing between widgets on the same line.
139+func (x *WrapBox) GetChildSpacing() int {
140+
141+ cret := xWrapBoxGetChildSpacing(x.GoPointer())
142+ return cret
143+}
144+
145+var xWrapBoxGetChildSpacingUnit func(uintptr) LengthUnit
146+
147+// Gets the length unit for child spacing.
148+func (x *WrapBox) GetChildSpacingUnit() LengthUnit {
149+
150+ cret := xWrapBoxGetChildSpacingUnit(x.GoPointer())
151+ return cret
152+}
153+
154+var xWrapBoxGetJustify func(uintptr) JustifyMode
155+
156+// Gets whether and how each complete line is stretched to fill the entire widget.
157+func (x *WrapBox) GetJustify() JustifyMode {
158+
159+ cret := xWrapBoxGetJustify(x.GoPointer())
160+ return cret
161+}
162+
163+var xWrapBoxGetJustifyLastLine func(uintptr) bool
164+
165+// Gets whether the last line should be stretched to fill the entire widget.
166+func (x *WrapBox) GetJustifyLastLine() bool {
167+
168+ cret := xWrapBoxGetJustifyLastLine(x.GoPointer())
169+ return cret
170+}
171+
172+var xWrapBoxGetLineHomogeneous func(uintptr) bool
173+
174+// Gets whether all lines should take the same amount of space.
175+func (x *WrapBox) GetLineHomogeneous() bool {
176+
177+ cret := xWrapBoxGetLineHomogeneous(x.GoPointer())
178+ return cret
179+}
180+
181+var xWrapBoxGetLineSpacing func(uintptr) int
182+
183+// Gets the spacing between lines.
184+//
185+// See [property@WrapBox:line-spacing-unit].
186+func (x *WrapBox) GetLineSpacing() int {
187+
188+ cret := xWrapBoxGetLineSpacing(x.GoPointer())
189+ return cret
190+}
191+
192+var xWrapBoxGetLineSpacingUnit func(uintptr) LengthUnit
193+
194+// Gets the length unit for line spacing.
195+func (x *WrapBox) GetLineSpacingUnit() LengthUnit {
196+
197+ cret := xWrapBoxGetLineSpacingUnit(x.GoPointer())
198+ return cret
199+}
200+
201+var xWrapBoxGetNaturalLineLength func(uintptr) int
202+
203+// Gets the natural size for each line.
204+func (x *WrapBox) GetNaturalLineLength() int {
205+
206+ cret := xWrapBoxGetNaturalLineLength(x.GoPointer())
207+ return cret
208+}
209+
210+var xWrapBoxGetNaturalLineLengthUnit func(uintptr) LengthUnit
211+
212+// Gets the length unit for line spacing.
213+func (x *WrapBox) GetNaturalLineLengthUnit() LengthUnit {
214+
215+ cret := xWrapBoxGetNaturalLineLengthUnit(x.GoPointer())
216+ return cret
217+}
218+
219+var xWrapBoxGetPackDirection func(uintptr) PackDirection
220+
221+// Gets the direction children are packed in each line.
222+func (x *WrapBox) GetPackDirection() PackDirection {
223+
224+ cret := xWrapBoxGetPackDirection(x.GoPointer())
225+ return cret
226+}
227+
228+var xWrapBoxGetWrapPolicy func(uintptr) WrapPolicy
229+
230+// Gets the policy for line wrapping.
231+func (x *WrapBox) GetWrapPolicy() WrapPolicy {
232+
233+ cret := xWrapBoxGetWrapPolicy(x.GoPointer())
234+ return cret
235+}
236+
237+var xWrapBoxGetWrapReverse func(uintptr) bool
238+
239+// Gets whether wrap direction is reversed.
240+func (x *WrapBox) GetWrapReverse() bool {
241+
242+ cret := xWrapBoxGetWrapReverse(x.GoPointer())
243+ return cret
244+}
245+
246+var xWrapBoxInsertChildAfter func(uintptr, uintptr, uintptr)
247+
248+// Inserts @child in the position after @sibling in the list of @self children.
249+//
250+// If @sibling is `NULL`, inserts @child at the first position.
251+func (x *WrapBox) InsertChildAfter(ChildVar *gtk.Widget, SiblingVar *gtk.Widget) {
252+
253+ xWrapBoxInsertChildAfter(x.GoPointer(), ChildVar.GoPointer(), SiblingVar.GoPointer())
254+
255+}
256+
257+var xWrapBoxPrepend func(uintptr, uintptr)
258+
259+// Adds @child as the first child to @self.
260+func (x *WrapBox) Prepend(ChildVar *gtk.Widget) {
261+
262+ xWrapBoxPrepend(x.GoPointer(), ChildVar.GoPointer())
263+
264+}
265+
266+var xWrapBoxRemove func(uintptr, uintptr)
267+
268+// Removes a child widget from @self.
269+//
270+// The child must have been added before with [method@Adw.WrapBox.append],
271+// [method@Adw.WrapBox.prepend], or [method@Adw.WrapBox.insert_child_after].
272+func (x *WrapBox) Remove(ChildVar *gtk.Widget) {
273+
274+ xWrapBoxRemove(x.GoPointer(), ChildVar.GoPointer())
275+
276+}
277+
278+var xWrapBoxReorderChildAfter func(uintptr, uintptr, uintptr)
279+
280+// Moves @child to the position after @sibling in the list of @self children.
281+//
282+// If @sibling is `NULL`, moves @child to the first position.
283+func (x *WrapBox) ReorderChildAfter(ChildVar *gtk.Widget, SiblingVar *gtk.Widget) {
284+
285+ xWrapBoxReorderChildAfter(x.GoPointer(), ChildVar.GoPointer(), SiblingVar.GoPointer())
286+
287+}
288+
289+var xWrapBoxSetAlign func(uintptr, float32)
290+
291+// Sets the alignment of the children within each line.
292+//
293+// 0 means the children are placed at the start of the line, 1 means they are
294+// placed at the end of the line. 0.5 means they are placed in the middle of the
295+// line.
296+//
297+// Alignment is only used when [property@WrapBox:justify] is set to
298+// `ADW_JUSTIFY_NONE`, or on the last line when the
299+// [property@WrapBox:justify-last-line] is `FALSE`.
300+func (x *WrapBox) SetAlign(AlignVar float32) {
301+
302+ xWrapBoxSetAlign(x.GoPointer(), AlignVar)
303+
304+}
305+
306+var xWrapBoxSetChildSpacing func(uintptr, int)
307+
308+// Sets the spacing between widgets on the same line.
309+//
310+// See [property@WrapBox:child-spacing-unit].
311+func (x *WrapBox) SetChildSpacing(ChildSpacingVar int) {
312+
313+ xWrapBoxSetChildSpacing(x.GoPointer(), ChildSpacingVar)
314+
315+}
316+
317+var xWrapBoxSetChildSpacingUnit func(uintptr, LengthUnit)
318+
319+// Sets the length unit for child spacing.
320+//
321+// Allows the spacing to vary depending on the text scale factor.
322+//
323+// See [property@WrapBox:child-spacing].
324+func (x *WrapBox) SetChildSpacingUnit(UnitVar LengthUnit) {
325+
326+ xWrapBoxSetChildSpacingUnit(x.GoPointer(), UnitVar)
327+
328+}
329+
330+var xWrapBoxSetJustify func(uintptr, JustifyMode)
331+
332+// Determines whether and how each complete line should be stretched to fill
333+// the entire widget.
334+//
335+// If set to `ADW_JUSTIFY_FILL`, each widget in the line will be stretched,
336+// keeping consistent spacing, so that the line fills the entire widget.
337+//
338+// If set to `ADW_JUSTIFY_SPREAD`, the spacing between widgets will be
339+// increased, keeping widget sizes intact. The first and last widget will be
340+// aligned with the beginning and end of the line. If the line only contains a
341+// single widget, it will be stretched regardless.
342+//
343+// If set to `ADW_JUSTIFY_NONE`, the line will not be stretched and the children
344+// will be placed together within the line, according to
345+// [property@WrapBox:align].
346+//
347+// By default this doesn't affect the last line, as it will be incomplete. Use
348+// [property@WrapBox:justify-last-line] to justify it as well.
349+func (x *WrapBox) SetJustify(JustifyVar JustifyMode) {
350+
351+ xWrapBoxSetJustify(x.GoPointer(), JustifyVar)
352+
353+}
354+
355+var xWrapBoxSetJustifyLastLine func(uintptr, bool)
356+
357+// Sets whether the last line should be stretched to fill the entire widget.
358+//
359+// See [property@WrapBox:justify].
360+func (x *WrapBox) SetJustifyLastLine(JustifyLastLineVar bool) {
361+
362+ xWrapBoxSetJustifyLastLine(x.GoPointer(), JustifyLastLineVar)
363+
364+}
365+
366+var xWrapBoxSetLineHomogeneous func(uintptr, bool)
367+
368+// Sets whether all lines should take the same amount of space.
369+func (x *WrapBox) SetLineHomogeneous(HomogeneousVar bool) {
370+
371+ xWrapBoxSetLineHomogeneous(x.GoPointer(), HomogeneousVar)
372+
373+}
374+
375+var xWrapBoxSetLineSpacing func(uintptr, int)
376+
377+// Sets the spacing between lines.
378+func (x *WrapBox) SetLineSpacing(LineSpacingVar int) {
379+
380+ xWrapBoxSetLineSpacing(x.GoPointer(), LineSpacingVar)
381+
382+}
383+
384+var xWrapBoxSetLineSpacingUnit func(uintptr, LengthUnit)
385+
386+// Sets the length unit for line spacing.
387+//
388+// Allows the spacing to vary depending on the text scale factor.
389+//
390+// See [property@WrapBox:line-spacing].
391+func (x *WrapBox) SetLineSpacingUnit(UnitVar LengthUnit) {
392+
393+ xWrapBoxSetLineSpacingUnit(x.GoPointer(), UnitVar)
394+
395+}
396+
397+var xWrapBoxSetNaturalLineLength func(uintptr, int)
398+
399+// Sets the natural size for each line.
400+//
401+// It should be used to limit the line lengths, for example when used in
402+// popovers.
403+//
404+// See [property@WrapBox:natural-line-length-unit].
405+func (x *WrapBox) SetNaturalLineLength(NaturalLineLengthVar int) {
406+
407+ xWrapBoxSetNaturalLineLength(x.GoPointer(), NaturalLineLengthVar)
408+
409+}
410+
411+var xWrapBoxSetNaturalLineLengthUnit func(uintptr, LengthUnit)
412+
413+// Sets the length unit for natural line length.
414+//
415+// Allows the length to vary depending on the text scale factor.
416+//
417+// See [property@WrapBox:natural-line-length].
418+func (x *WrapBox) SetNaturalLineLengthUnit(UnitVar LengthUnit) {
419+
420+ xWrapBoxSetNaturalLineLengthUnit(x.GoPointer(), UnitVar)
421+
422+}
423+
424+var xWrapBoxSetPackDirection func(uintptr, PackDirection)
425+
426+// Sets the direction children are packed in each line.
427+func (x *WrapBox) SetPackDirection(PackDirectionVar PackDirection) {
428+
429+ xWrapBoxSetPackDirection(x.GoPointer(), PackDirectionVar)
430+
431+}
432+
433+var xWrapBoxSetWrapPolicy func(uintptr, WrapPolicy)
434+
435+// Sets the policy for line wrapping.
436+//
437+// If set to `ADW_WRAP_NATURAL`, the box will wrap to the next line as soon as
438+// the previous line cannot fit any more children without shrinking them past
439+// their natural size.
440+//
441+// If set to `ADW_WRAP_MINIMUM`, the box will try to fit as many children into
442+// each line as possible, shrinking them down to their minimum size before
443+// wrapping to the next line.
444+func (x *WrapBox) SetWrapPolicy(WrapPolicyVar WrapPolicy) {
445+
446+ xWrapBoxSetWrapPolicy(x.GoPointer(), WrapPolicyVar)
447+
448+}
449+
450+var xWrapBoxSetWrapReverse func(uintptr, bool)
451+
452+// Sets whether wrap direction should be reversed.
453+//
454+// By default, lines wrap downwards in a horizontal box, and towards the end
455+// in a vertical box. If set to `TRUE`, they wrap upwards or towards the start
456+// respectively.
457+func (x *WrapBox) SetWrapReverse(WrapReverseVar bool) {
458+
459+ xWrapBoxSetWrapReverse(x.GoPointer(), WrapReverseVar)
460+
461+}
462+
463+func (c *WrapBox) GoPointer() uintptr {
464+ if c == nil {
465+ return 0
466+ }
467+ return c.Ptr
468+}
469+
470+func (c *WrapBox) SetGoPointer(ptr uintptr) {
471+ c.Ptr = ptr
472+}
473+
474+// Requests the user's screen reader to announce the given message.
475+//
476+// This kind of notification is useful for messages that
477+// either have only a visual representation or that are not
478+// exposed visually at all, e.g. a notification about a
479+// successful operation.
480+//
481+// Also, by using this API, you can ensure that the message
482+// does not interrupts the user's current screen reader output.
483+func (x *WrapBox) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
484+
485+ gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
486+
487+}
488+
489+// Retrieves the accessible parent for an accessible object.
490+//
491+// This function returns `NULL` for top level widgets.
492+func (x *WrapBox) GetAccessibleParent() *gtk.AccessibleBase {
493+ var cls *gtk.AccessibleBase
494+
495+ cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
496+
497+ if cret == 0 {
498+ return nil
499+ }
500+ cls = &gtk.AccessibleBase{}
501+ cls.Ptr = cret
502+ return cls
503+}
504+
505+// Retrieves the accessible role of an accessible object.
506+func (x *WrapBox) GetAccessibleRole() gtk.AccessibleRole {
507+
508+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
509+ return cret
510+}
511+
512+// Retrieves the implementation for the given accessible object.
513+func (x *WrapBox) GetAtContext() *gtk.ATContext {
514+ var cls *gtk.ATContext
515+
516+ cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
517+
518+ if cret == 0 {
519+ return nil
520+ }
521+ cls = &gtk.ATContext{}
522+ cls.Ptr = cret
523+ return cls
524+}
525+
526+// Queries the coordinates and dimensions of this accessible
527+//
528+// This functionality can be overridden by `GtkAccessible`
529+// implementations, e.g. to get the bounds from an ignored
530+// child widget.
531+func (x *WrapBox) GetBounds(XVar int, YVar int, WidthVar int, HeightVar int) bool {
532+
533+ cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
534+ return cret
535+}
536+
537+// Retrieves the first accessible child of an accessible object.
538+func (x *WrapBox) GetFirstAccessibleChild() *gtk.AccessibleBase {
539+ var cls *gtk.AccessibleBase
540+
541+ cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
542+
543+ if cret == 0 {
544+ return nil
545+ }
546+ cls = &gtk.AccessibleBase{}
547+ cls.Ptr = cret
548+ return cls
549+}
550+
551+// Retrieves the next accessible sibling of an accessible object
552+func (x *WrapBox) GetNextAccessibleSibling() *gtk.AccessibleBase {
553+ var cls *gtk.AccessibleBase
554+
555+ cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
556+
557+ if cret == 0 {
558+ return nil
559+ }
560+ cls = &gtk.AccessibleBase{}
561+ cls.Ptr = cret
562+ return cls
563+}
564+
565+// Queries a platform state, such as focus.
566+//
567+// This functionality can be overridden by `GtkAccessible`
568+// implementations, e.g. to get platform state from an ignored
569+// child widget, as is the case for `GtkText` wrappers.
570+func (x *WrapBox) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
571+
572+ cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
573+ return cret
574+}
575+
576+// Resets the accessible property to its default value.
577+func (x *WrapBox) ResetProperty(PropertyVar gtk.AccessibleProperty) {
578+
579+ gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
580+
581+}
582+
583+// Resets the accessible relation to its default value.
584+func (x *WrapBox) ResetRelation(RelationVar gtk.AccessibleRelation) {
585+
586+ gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
587+
588+}
589+
590+// Resets the accessible state to its default value.
591+func (x *WrapBox) ResetState(StateVar gtk.AccessibleState) {
592+
593+ gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
594+
595+}
596+
597+// Sets the parent and sibling of an accessible object.
598+//
599+// This function is meant to be used by accessible implementations that are
600+// not part of the widget hierarchy, and but act as a logical bridge between
601+// widgets. For instance, if a widget creates an object that holds metadata
602+// for each child, and you want that object to implement the `GtkAccessible`
603+// interface, you will use this function to ensure that the parent of each
604+// child widget is the metadata object, and the parent of each metadata
605+// object is the container widget.
606+func (x *WrapBox) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
607+
608+ gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
609+
610+}
611+
612+// Updates the next accessible sibling.
613+//
614+// That might be useful when a new child of a custom accessible
615+// is created, and it needs to be linked to a previous child.
616+func (x *WrapBox) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
617+
618+ gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
619+
620+}
621+
622+// Informs ATs that the platform state has changed.
623+//
624+// This function should be used by `GtkAccessible` implementations that
625+// have a platform state but are not widgets. Widgets handle platform
626+// states automatically.
627+func (x *WrapBox) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
628+
629+ gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
630+
631+}
632+
633+// Updates a list of accessible properties.
634+//
635+// See the [enum@Gtk.AccessibleProperty] documentation for the
636+// value types of accessible properties.
637+//
638+// This function should be called by `GtkWidget` types whenever
639+// an accessible property change must be communicated to assistive
640+// technologies.
641+//
642+// Example:
643+// ```c
644+// value = gtk_adjustment_get_value (adjustment);
645+// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
646+//
647+// GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
648+// -1);
649+//
650+// ```
651+func (x *WrapBox) UpdateProperty(FirstPropertyVar gtk.AccessibleProperty, varArgs ...interface{}) {
652+
653+ gtk.XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
654+
655+}
656+
657+// Updates an array of accessible properties.
658+//
659+// This function should be called by `GtkWidget` types whenever an accessible
660+// property change must be communicated to assistive technologies.
661+//
662+// This function is meant to be used by language bindings.
663+func (x *WrapBox) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.AccessibleProperty, ValuesVar []gobject.Value) {
664+
665+ gtk.XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
666+
667+}
668+
669+// Updates a list of accessible relations.
670+//
671+// This function should be called by `GtkWidget` types whenever an accessible
672+// relation change must be communicated to assistive technologies.
673+//
674+// If the [enum@Gtk.AccessibleRelation] requires a list of references,
675+// you should pass each reference individually, followed by `NULL`, e.g.
676+//
677+// ```c
678+// gtk_accessible_update_relation (accessible,
679+//
680+// GTK_ACCESSIBLE_RELATION_CONTROLS,
681+// ref1, NULL,
682+// GTK_ACCESSIBLE_RELATION_LABELLED_BY,
683+// ref1, ref2, ref3, NULL,
684+// -1);
685+//
686+// ```
687+func (x *WrapBox) UpdateRelation(FirstRelationVar gtk.AccessibleRelation, varArgs ...interface{}) {
688+
689+ gtk.XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
690+
691+}
692+
693+// Updates an array of accessible relations.
694+//
695+// This function should be called by `GtkWidget` types whenever an accessible
696+// relation change must be communicated to assistive technologies.
697+//
698+// This function is meant to be used by language bindings.
699+func (x *WrapBox) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.AccessibleRelation, ValuesVar []gobject.Value) {
700+
701+ gtk.XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
702+
703+}
704+
705+// Updates a list of accessible states.
706+//
707+// See the [enum@Gtk.AccessibleState] documentation for the
708+// value types of accessible states.
709+//
710+// This function should be called by `GtkWidget` types whenever
711+// an accessible state change must be communicated to assistive
712+// technologies.
713+//
714+// Example:
715+//
716+// ```c
717+// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
718+// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
719+//
720+// GTK_ACCESSIBLE_STATE_CHECKED, value,
721+// -1);
722+//
723+// ```
724+func (x *WrapBox) UpdateState(FirstStateVar gtk.AccessibleState, varArgs ...interface{}) {
725+
726+ gtk.XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
727+
728+}
729+
730+// Updates an array of accessible states.
731+//
732+// This function should be called by `GtkWidget` types whenever an accessible
733+// state change must be communicated to assistive technologies.
734+//
735+// This function is meant to be used by language bindings.
736+func (x *WrapBox) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleState, ValuesVar []gobject.Value) {
737+
738+ gtk.XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
739+
740+}
741+
742+// Gets the ID of the @buildable object.
743+//
744+// `GtkBuilder` sets the name based on the ID attribute
745+// of the `<object>` tag used to construct the @buildable.
746+func (x *WrapBox) GetBuildableId() string {
747+
748+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
749+ return cret
750+}
751+
752+// Retrieves the orientation of the @orientable.
753+func (x *WrapBox) GetOrientation() gtk.Orientation {
754+
755+ cret := gtk.XGtkOrientableGetOrientation(x.GoPointer())
756+ return cret
757+}
758+
759+// Sets the orientation of the @orientable.
760+func (x *WrapBox) SetOrientation(OrientationVar gtk.Orientation) {
761+
762+ gtk.XGtkOrientableSetOrientation(x.GoPointer(), OrientationVar)
763+
764+}
765+
766+func init() {
767+ core.SetPackageName("ADW", "libadwaita-1")
768+ core.SetSharedLibrary("ADW", "libadwaita-1.so.0")
769+ lib, err := purego.Dlopen(core.GetPath("ADW"), purego.RTLD_NOW|purego.RTLD_GLOBAL)
770+ if err != nil {
771+ panic(err)
772+ }
773+
774+ core.PuregoSafeRegister(&xWrapBoxGLibType, lib, "adw_wrap_box_get_type")
775+
776+ core.PuregoSafeRegister(&xNewWrapBox, lib, "adw_wrap_box_new")
777+
778+ core.PuregoSafeRegister(&xWrapBoxAppend, lib, "adw_wrap_box_append")
779+ core.PuregoSafeRegister(&xWrapBoxGetAlign, lib, "adw_wrap_box_get_align")
780+ core.PuregoSafeRegister(&xWrapBoxGetChildSpacing, lib, "adw_wrap_box_get_child_spacing")
781+ core.PuregoSafeRegister(&xWrapBoxGetChildSpacingUnit, lib, "adw_wrap_box_get_child_spacing_unit")
782+ core.PuregoSafeRegister(&xWrapBoxGetJustify, lib, "adw_wrap_box_get_justify")
783+ core.PuregoSafeRegister(&xWrapBoxGetJustifyLastLine, lib, "adw_wrap_box_get_justify_last_line")
784+ core.PuregoSafeRegister(&xWrapBoxGetLineHomogeneous, lib, "adw_wrap_box_get_line_homogeneous")
785+ core.PuregoSafeRegister(&xWrapBoxGetLineSpacing, lib, "adw_wrap_box_get_line_spacing")
786+ core.PuregoSafeRegister(&xWrapBoxGetLineSpacingUnit, lib, "adw_wrap_box_get_line_spacing_unit")
787+ core.PuregoSafeRegister(&xWrapBoxGetNaturalLineLength, lib, "adw_wrap_box_get_natural_line_length")
788+ core.PuregoSafeRegister(&xWrapBoxGetNaturalLineLengthUnit, lib, "adw_wrap_box_get_natural_line_length_unit")
789+ core.PuregoSafeRegister(&xWrapBoxGetPackDirection, lib, "adw_wrap_box_get_pack_direction")
790+ core.PuregoSafeRegister(&xWrapBoxGetWrapPolicy, lib, "adw_wrap_box_get_wrap_policy")
791+ core.PuregoSafeRegister(&xWrapBoxGetWrapReverse, lib, "adw_wrap_box_get_wrap_reverse")
792+ core.PuregoSafeRegister(&xWrapBoxInsertChildAfter, lib, "adw_wrap_box_insert_child_after")
793+ core.PuregoSafeRegister(&xWrapBoxPrepend, lib, "adw_wrap_box_prepend")
794+ core.PuregoSafeRegister(&xWrapBoxRemove, lib, "adw_wrap_box_remove")
795+ core.PuregoSafeRegister(&xWrapBoxReorderChildAfter, lib, "adw_wrap_box_reorder_child_after")
796+ core.PuregoSafeRegister(&xWrapBoxSetAlign, lib, "adw_wrap_box_set_align")
797+ core.PuregoSafeRegister(&xWrapBoxSetChildSpacing, lib, "adw_wrap_box_set_child_spacing")
798+ core.PuregoSafeRegister(&xWrapBoxSetChildSpacingUnit, lib, "adw_wrap_box_set_child_spacing_unit")
799+ core.PuregoSafeRegister(&xWrapBoxSetJustify, lib, "adw_wrap_box_set_justify")
800+ core.PuregoSafeRegister(&xWrapBoxSetJustifyLastLine, lib, "adw_wrap_box_set_justify_last_line")
801+ core.PuregoSafeRegister(&xWrapBoxSetLineHomogeneous, lib, "adw_wrap_box_set_line_homogeneous")
802+ core.PuregoSafeRegister(&xWrapBoxSetLineSpacing, lib, "adw_wrap_box_set_line_spacing")
803+ core.PuregoSafeRegister(&xWrapBoxSetLineSpacingUnit, lib, "adw_wrap_box_set_line_spacing_unit")
804+ core.PuregoSafeRegister(&xWrapBoxSetNaturalLineLength, lib, "adw_wrap_box_set_natural_line_length")
805+ core.PuregoSafeRegister(&xWrapBoxSetNaturalLineLengthUnit, lib, "adw_wrap_box_set_natural_line_length_unit")
806+ core.PuregoSafeRegister(&xWrapBoxSetPackDirection, lib, "adw_wrap_box_set_pack_direction")
807+ core.PuregoSafeRegister(&xWrapBoxSetWrapPolicy, lib, "adw_wrap_box_set_wrap_policy")
808+ core.PuregoSafeRegister(&xWrapBoxSetWrapReverse, lib, "adw_wrap_box_set_wrap_reverse")
809+
810+}
A v4/adw/adw-wrap-layout.go +540 -0
@@ -0,0 +1,540 @@
1+// Package adw was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT
2+package adw
3+
4+import (
5+ "structs"
6+ "unsafe"
7+
8+ "github.com/jwijenbergh/purego"
9+ "github.com/jwijenbergh/puregotk/pkg/core"
10+ "github.com/jwijenbergh/puregotk/v4/gobject/types"
11+ "github.com/jwijenbergh/puregotk/v4/gtk"
12+)
13+
14+type WrapLayoutClass struct {
15+ _ structs.HostLayout
16+
17+ ParentClass gtk.LayoutManagerClass
18+}
19+
20+func (x *WrapLayoutClass) GoPointer() uintptr {
21+ return uintptr(unsafe.Pointer(x))
22+}
23+
24+// Describes line justify behaviors in a [class@WrapLayout] or [class@WrapBox].
25+//
26+// See [property@WrapLayout:justify] and [property@WrapBox:justify].
27+type JustifyMode int
28+
29+var xJustifyModeGLibType func() types.GType
30+
31+func JustifyModeGLibType() types.GType {
32+ return xJustifyModeGLibType()
33+}
34+
35+const (
36+
37+ // Don't justify children within a line.
38+ JustifyNoneValue JustifyMode = 0
39+ // Stretch each child within the line, keeping consistent
40+ // spacing, so that the line fills the entire length.
41+ JustifyFillValue JustifyMode = 1
42+ // Increase spacing between children, moving the children
43+ // so that the first and last child are aligned with the beginning and end
44+ // of the line. If the line only contains a single widget, it will be
45+ // stretched regardless.
46+ JustifySpreadValue JustifyMode = 2
47+)
48+
49+// Describes child packing behavior in a [class@WrapLayout] or [class@WrapBox].
50+//
51+// See [property@WrapLayout:pack-direction] and
52+// [property@WrapBox:pack-direction].
53+type PackDirection int
54+
55+var xPackDirectionGLibType func() types.GType
56+
57+func PackDirectionGLibType() types.GType {
58+ return xPackDirectionGLibType()
59+}
60+
61+const (
62+
63+ // Pack children from left to right for LTR languages,
64+ // or top to bottom vertically.
65+ PackStartToEndValue PackDirection = 0
66+ // Pack children from right to left for LTR languages,
67+ // or bottom to top vertically.
68+ PackEndToStartValue PackDirection = 1
69+)
70+
71+// Describes line wrapping behavior in a [class@WrapLayout] or [class@WrapBox].
72+//
73+// See [property@WrapLayout:wrap-policy] and [property@WrapBox:wrap-policy].
74+type WrapPolicy int
75+
76+var xWrapPolicyGLibType func() types.GType
77+
78+func WrapPolicyGLibType() types.GType {
79+ return xWrapPolicyGLibType()
80+}
81+
82+const (
83+
84+ // Fit as many children into each line as possible, shrinking
85+ // them down to their minimum size before wrapping to the next line.
86+ WrapMinimumValue WrapPolicy = 0
87+ // Wrap to the next line as soon as the previous line cannot
88+ // fit any more children without shrinking them past their natural size.
89+ WrapNaturalValue WrapPolicy = 1
90+)
91+
92+// A box-like layout that can wrap into multiple lines.
93+//
94+// <picture>
95+//
96+// <source srcset="wrap-box-dark.png" media="(prefers-color-scheme: dark)">
97+// <img src="wrap-box.png" alt="wrap-box">
98+//
99+// </picture>
100+//
101+// `AdwWrapLayout` is similar to [class@Gtk.BoxLayout], but can wrap lines when
102+// the widgets cannot fit otherwise. Unlike [class@Gtk.FlowBox], the children
103+// aren't arranged into a grid and behave more like words in a wrapping label.
104+//
105+// Like `GtkBoxLayout`, `AdwWrapLayout` is orientable and has spacing:
106+//
107+// - [property@WrapLayout:child-spacing] between children in the same line;
108+// - [property@WrapLayout:line-spacing] between lines.
109+//
110+// ::: note
111+//
112+// Unlike `GtkBoxLayout`, `AdwWrapLayout` cannot follow the CSS
113+// `border-spacing` property.
114+//
115+// Use the [property@WrapLayout:natural-line-length] property to determine the
116+// layout's natural size, e.g. when using it in a [class@Gtk.Popover].
117+//
118+// Normally, a horizontal `AdwWrapLayout` wraps left to right and top to bottom
119+// for left-to-right languages. Both of these directions can be reversed, using
120+// the [property@WrapLayout:pack-direction] and
121+// [property@WrapLayout:wrap-reverse] properties. Additionally, the alignment
122+// of each line can be controlled with the [property@WrapLayout:align] property.
123+//
124+// Lines can be justified using the [property@WrapLayout:justify] property,
125+// filling the entire line by either increasing child size or spacing depending
126+// on the value. Set [property@WrapLayout:justify-last-line] to justify the last
127+// line as well.
128+//
129+// By default, `AdwWrapLayout` wraps as soon as the previous line cannot fit
130+// any more children without shrinking them past their natural size. Set
131+// [property@WrapLayout:wrap-policy] to [enum@Adw.WrapPolicy.MINIMUM] to only
132+// wrap once all the children in the previous line have been shrunk to their
133+// minimum size.
134+//
135+// To make each line take the same amount of space, set
136+// [property@WrapLayout:line-homogeneous] to `TRUE`.
137+//
138+// Spacing and natural line length can scale with the text scale factor, use the
139+// [property@WrapLayout:child-spacing-unit],
140+// [property@WrapLayout:line-spacing-unit] and/or
141+// [property@WrapLayout:natural-line-length-unit] properties to enable that
142+// behavior.
143+//
144+// See [class@WrapBox].
145+type WrapLayout struct {
146+ gtk.LayoutManager
147+}
148+
149+var xWrapLayoutGLibType func() types.GType
150+
151+func WrapLayoutGLibType() types.GType {
152+ return xWrapLayoutGLibType()
153+}
154+
155+func WrapLayoutNewFromInternalPtr(ptr uintptr) *WrapLayout {
156+ cls := &WrapLayout{}
157+ cls.Ptr = ptr
158+ return cls
159+}
160+
161+var xNewWrapLayout func() uintptr
162+
163+// Creates a new `AdwWrapLayout`.
164+func NewWrapLayout() *WrapLayout {
165+ var cls *WrapLayout
166+
167+ cret := xNewWrapLayout()
168+
169+ if cret == 0 {
170+ return nil
171+ }
172+ cls = &WrapLayout{}
173+ cls.Ptr = cret
174+ return cls
175+}
176+
177+var xWrapLayoutGetAlign func(uintptr) float32
178+
179+// Gets the alignment of the children within each line.
180+func (x *WrapLayout) GetAlign() float32 {
181+
182+ cret := xWrapLayoutGetAlign(x.GoPointer())
183+ return cret
184+}
185+
186+var xWrapLayoutGetChildSpacing func(uintptr) int
187+
188+// Gets spacing between widgets on the same line.
189+func (x *WrapLayout) GetChildSpacing() int {
190+
191+ cret := xWrapLayoutGetChildSpacing(x.GoPointer())
192+ return cret
193+}
194+
195+var xWrapLayoutGetChildSpacingUnit func(uintptr) LengthUnit
196+
197+// Gets the length unit for child spacing.
198+func (x *WrapLayout) GetChildSpacingUnit() LengthUnit {
199+
200+ cret := xWrapLayoutGetChildSpacingUnit(x.GoPointer())
201+ return cret
202+}
203+
204+var xWrapLayoutGetJustify func(uintptr) JustifyMode
205+
206+// Gets whether and how each complete line is stretched to fill the entire widget.
207+func (x *WrapLayout) GetJustify() JustifyMode {
208+
209+ cret := xWrapLayoutGetJustify(x.GoPointer())
210+ return cret
211+}
212+
213+var xWrapLayoutGetJustifyLastLine func(uintptr) bool
214+
215+// Gets whether the last line should be stretched to fill the entire widget.
216+func (x *WrapLayout) GetJustifyLastLine() bool {
217+
218+ cret := xWrapLayoutGetJustifyLastLine(x.GoPointer())
219+ return cret
220+}
221+
222+var xWrapLayoutGetLineHomogeneous func(uintptr) bool
223+
224+// Gets whether all lines should take the same amount of space.
225+func (x *WrapLayout) GetLineHomogeneous() bool {
226+
227+ cret := xWrapLayoutGetLineHomogeneous(x.GoPointer())
228+ return cret
229+}
230+
231+var xWrapLayoutGetLineSpacing func(uintptr) int
232+
233+// Gets the spacing between lines.
234+func (x *WrapLayout) GetLineSpacing() int {
235+
236+ cret := xWrapLayoutGetLineSpacing(x.GoPointer())
237+ return cret
238+}
239+
240+var xWrapLayoutGetLineSpacingUnit func(uintptr) LengthUnit
241+
242+// Gets the length unit for line spacing.
243+func (x *WrapLayout) GetLineSpacingUnit() LengthUnit {
244+
245+ cret := xWrapLayoutGetLineSpacingUnit(x.GoPointer())
246+ return cret
247+}
248+
249+var xWrapLayoutGetNaturalLineLength func(uintptr) int
250+
251+// Gets the natural size for each line.
252+func (x *WrapLayout) GetNaturalLineLength() int {
253+
254+ cret := xWrapLayoutGetNaturalLineLength(x.GoPointer())
255+ return cret
256+}
257+
258+var xWrapLayoutGetNaturalLineLengthUnit func(uintptr) LengthUnit
259+
260+// Gets the length unit for line spacing.
261+func (x *WrapLayout) GetNaturalLineLengthUnit() LengthUnit {
262+
263+ cret := xWrapLayoutGetNaturalLineLengthUnit(x.GoPointer())
264+ return cret
265+}
266+
267+var xWrapLayoutGetPackDirection func(uintptr) PackDirection
268+
269+// Gets the direction children are packed in each line.
270+func (x *WrapLayout) GetPackDirection() PackDirection {
271+
272+ cret := xWrapLayoutGetPackDirection(x.GoPointer())
273+ return cret
274+}
275+
276+var xWrapLayoutGetWrapPolicy func(uintptr) WrapPolicy
277+
278+// Gets the policy for line wrapping.
279+func (x *WrapLayout) GetWrapPolicy() WrapPolicy {
280+
281+ cret := xWrapLayoutGetWrapPolicy(x.GoPointer())
282+ return cret
283+}
284+
285+var xWrapLayoutGetWrapReverse func(uintptr) bool
286+
287+// Gets whether wrap direction is reversed.
288+func (x *WrapLayout) GetWrapReverse() bool {
289+
290+ cret := xWrapLayoutGetWrapReverse(x.GoPointer())
291+ return cret
292+}
293+
294+var xWrapLayoutSetAlign func(uintptr, float32)
295+
296+// Sets the alignment of the children within each line.
297+//
298+// 0 means the children are placed at the start of the line, 1 means they are
299+// placed at the end of the line. 0.5 means they are placed in the middle of the
300+// line.
301+//
302+// Alignment is only used when [property@WrapLayout:justify] is set to
303+// `ADW_JUSTIFY_NONE`, or on the last line when the
304+// [property@WrapLayout:justify-last-line] is `FALSE`.
305+func (x *WrapLayout) SetAlign(AlignVar float32) {
306+
307+ xWrapLayoutSetAlign(x.GoPointer(), AlignVar)
308+
309+}
310+
311+var xWrapLayoutSetChildSpacing func(uintptr, int)
312+
313+// Sets the spacing between widgets on the same line.
314+//
315+// See [property@WrapLayout:child-spacing-unit].
316+func (x *WrapLayout) SetChildSpacing(ChildSpacingVar int) {
317+
318+ xWrapLayoutSetChildSpacing(x.GoPointer(), ChildSpacingVar)
319+
320+}
321+
322+var xWrapLayoutSetChildSpacingUnit func(uintptr, LengthUnit)
323+
324+// Sets the length unit for child spacing.
325+//
326+// Allows the spacing to vary depending on the text scale factor.
327+//
328+// See [property@WrapLayout:child-spacing].
329+func (x *WrapLayout) SetChildSpacingUnit(UnitVar LengthUnit) {
330+
331+ xWrapLayoutSetChildSpacingUnit(x.GoPointer(), UnitVar)
332+
333+}
334+
335+var xWrapLayoutSetJustify func(uintptr, JustifyMode)
336+
337+// Sets whether and how each complete line should be stretched to fill the
338+// entire widget.
339+//
340+// If set to `ADW_JUSTIFY_FILL`, each widget in the line will be stretched,
341+// keeping consistent spacing, so that the line fills the entire widget.
342+//
343+// If set to `ADW_JUSTIFY_SPREAD`, the spacing between widgets will be
344+// increased, keeping widget sizes intact. The first and last widget will be
345+// aligned with the beginning and end of the line. If the line only contains a
346+// single widget, it will be stretched regardless.
347+//
348+// If set to `ADW_JUSTIFY_NONE`, the line will not be stretched and the children
349+// will be placed together within the line, according to
350+// [property@WrapLayout:align].
351+//
352+// By default this doesn't affect the last line, as it will be incomplete. Use
353+// [property@WrapLayout:justify-last-line] to justify it as well.
354+func (x *WrapLayout) SetJustify(JustifyVar JustifyMode) {
355+
356+ xWrapLayoutSetJustify(x.GoPointer(), JustifyVar)
357+
358+}
359+
360+var xWrapLayoutSetJustifyLastLine func(uintptr, bool)
361+
362+// Sets whether the last line should be stretched to fill the entire widget.
363+//
364+// See [property@WrapLayout:justify].
365+func (x *WrapLayout) SetJustifyLastLine(JustifyLastLineVar bool) {
366+
367+ xWrapLayoutSetJustifyLastLine(x.GoPointer(), JustifyLastLineVar)
368+
369+}
370+
371+var xWrapLayoutSetLineHomogeneous func(uintptr, bool)
372+
373+// Sets whether all lines should take the same amount of space.
374+func (x *WrapLayout) SetLineHomogeneous(HomogeneousVar bool) {
375+
376+ xWrapLayoutSetLineHomogeneous(x.GoPointer(), HomogeneousVar)
377+
378+}
379+
380+var xWrapLayoutSetLineSpacing func(uintptr, int)
381+
382+// Sets the spacing between lines.
383+//
384+// See [property@WrapLayout:line-spacing-unit].
385+func (x *WrapLayout) SetLineSpacing(LineSpacingVar int) {
386+
387+ xWrapLayoutSetLineSpacing(x.GoPointer(), LineSpacingVar)
388+
389+}
390+
391+var xWrapLayoutSetLineSpacingUnit func(uintptr, LengthUnit)
392+
393+// Sets the length unit for line spacing.
394+//
395+// Allows the spacing to vary depending on the text scale factor.
396+//
397+// See [property@WrapLayout:line-spacing].
398+func (x *WrapLayout) SetLineSpacingUnit(UnitVar LengthUnit) {
399+
400+ xWrapLayoutSetLineSpacingUnit(x.GoPointer(), UnitVar)
401+
402+}
403+
404+var xWrapLayoutSetNaturalLineLength func(uintptr, int)
405+
406+// Sets the natural size for each line.
407+//
408+// It should be used to limit the line lengths, for example when used in
409+// popovers.
410+//
411+// See [property@WrapLayout:natural-line-length-unit].
412+func (x *WrapLayout) SetNaturalLineLength(NaturalLineLengthVar int) {
413+
414+ xWrapLayoutSetNaturalLineLength(x.GoPointer(), NaturalLineLengthVar)
415+
416+}
417+
418+var xWrapLayoutSetNaturalLineLengthUnit func(uintptr, LengthUnit)
419+
420+// Sets the length unit for natural line length.
421+//
422+// Allows the length to vary depending on the text scale factor.
423+//
424+// See [property@WrapLayout:natural-line-length].
425+func (x *WrapLayout) SetNaturalLineLengthUnit(UnitVar LengthUnit) {
426+
427+ xWrapLayoutSetNaturalLineLengthUnit(x.GoPointer(), UnitVar)
428+
429+}
430+
431+var xWrapLayoutSetPackDirection func(uintptr, PackDirection)
432+
433+// Sets the direction children are packed in each line.
434+func (x *WrapLayout) SetPackDirection(PackDirectionVar PackDirection) {
435+
436+ xWrapLayoutSetPackDirection(x.GoPointer(), PackDirectionVar)
437+
438+}
439+
440+var xWrapLayoutSetWrapPolicy func(uintptr, WrapPolicy)
441+
442+// Sets the policy for line wrapping.
443+//
444+// If set to `ADW_WRAP_NATURAL`, the box will wrap to the next line as soon as
445+// the previous line cannot fit any more children without shrinking them past
446+// their natural size.
447+//
448+// If set to `ADW_WRAP_MINIMUM`, the box will try to fit as many children into
449+// each line as possible, shrinking them down to their minimum size before
450+// wrapping to the next line.
451+func (x *WrapLayout) SetWrapPolicy(WrapPolicyVar WrapPolicy) {
452+
453+ xWrapLayoutSetWrapPolicy(x.GoPointer(), WrapPolicyVar)
454+
455+}
456+
457+var xWrapLayoutSetWrapReverse func(uintptr, bool)
458+
459+// Sets whether wrap direction should be reversed.
460+//
461+// By default, lines wrap downwards in a horizontal box, and towards the end
462+// in a vertical box. If set to `TRUE`, they wrap upwards or towards the start
463+// respectively.
464+func (x *WrapLayout) SetWrapReverse(WrapReverseVar bool) {
465+
466+ xWrapLayoutSetWrapReverse(x.GoPointer(), WrapReverseVar)
467+
468+}
469+
470+func (c *WrapLayout) GoPointer() uintptr {
471+ if c == nil {
472+ return 0
473+ }
474+ return c.Ptr
475+}
476+
477+func (c *WrapLayout) SetGoPointer(ptr uintptr) {
478+ c.Ptr = ptr
479+}
480+
481+// Retrieves the orientation of the @orientable.
482+func (x *WrapLayout) GetOrientation() gtk.Orientation {
483+
484+ cret := gtk.XGtkOrientableGetOrientation(x.GoPointer())
485+ return cret
486+}
487+
488+// Sets the orientation of the @orientable.
489+func (x *WrapLayout) SetOrientation(OrientationVar gtk.Orientation) {
490+
491+ gtk.XGtkOrientableSetOrientation(x.GoPointer(), OrientationVar)
492+
493+}
494+
495+func init() {
496+ core.SetPackageName("ADW", "libadwaita-1")
497+ core.SetSharedLibrary("ADW", "libadwaita-1.so.0")
498+ lib, err := purego.Dlopen(core.GetPath("ADW"), purego.RTLD_NOW|purego.RTLD_GLOBAL)
499+ if err != nil {
500+ panic(err)
501+ }
502+
503+ core.PuregoSafeRegister(&xJustifyModeGLibType, lib, "adw_justify_mode_get_type")
504+
505+ core.PuregoSafeRegister(&xPackDirectionGLibType, lib, "adw_pack_direction_get_type")
506+
507+ core.PuregoSafeRegister(&xWrapPolicyGLibType, lib, "adw_wrap_policy_get_type")
508+
509+ core.PuregoSafeRegister(&xWrapLayoutGLibType, lib, "adw_wrap_layout_get_type")
510+
511+ core.PuregoSafeRegister(&xNewWrapLayout, lib, "adw_wrap_layout_new")
512+
513+ core.PuregoSafeRegister(&xWrapLayoutGetAlign, lib, "adw_wrap_layout_get_align")
514+ core.PuregoSafeRegister(&xWrapLayoutGetChildSpacing, lib, "adw_wrap_layout_get_child_spacing")
515+ core.PuregoSafeRegister(&xWrapLayoutGetChildSpacingUnit, lib, "adw_wrap_layout_get_child_spacing_unit")
516+ core.PuregoSafeRegister(&xWrapLayoutGetJustify, lib, "adw_wrap_layout_get_justify")
517+ core.PuregoSafeRegister(&xWrapLayoutGetJustifyLastLine, lib, "adw_wrap_layout_get_justify_last_line")
518+ core.PuregoSafeRegister(&xWrapLayoutGetLineHomogeneous, lib, "adw_wrap_layout_get_line_homogeneous")
519+ core.PuregoSafeRegister(&xWrapLayoutGetLineSpacing, lib, "adw_wrap_layout_get_line_spacing")
520+ core.PuregoSafeRegister(&xWrapLayoutGetLineSpacingUnit, lib, "adw_wrap_layout_get_line_spacing_unit")
521+ core.PuregoSafeRegister(&xWrapLayoutGetNaturalLineLength, lib, "adw_wrap_layout_get_natural_line_length")
522+ core.PuregoSafeRegister(&xWrapLayoutGetNaturalLineLengthUnit, lib, "adw_wrap_layout_get_natural_line_length_unit")
523+ core.PuregoSafeRegister(&xWrapLayoutGetPackDirection, lib, "adw_wrap_layout_get_pack_direction")
524+ core.PuregoSafeRegister(&xWrapLayoutGetWrapPolicy, lib, "adw_wrap_layout_get_wrap_policy")
525+ core.PuregoSafeRegister(&xWrapLayoutGetWrapReverse, lib, "adw_wrap_layout_get_wrap_reverse")
526+ core.PuregoSafeRegister(&xWrapLayoutSetAlign, lib, "adw_wrap_layout_set_align")
527+ core.PuregoSafeRegister(&xWrapLayoutSetChildSpacing, lib, "adw_wrap_layout_set_child_spacing")
528+ core.PuregoSafeRegister(&xWrapLayoutSetChildSpacingUnit, lib, "adw_wrap_layout_set_child_spacing_unit")
529+ core.PuregoSafeRegister(&xWrapLayoutSetJustify, lib, "adw_wrap_layout_set_justify")
530+ core.PuregoSafeRegister(&xWrapLayoutSetJustifyLastLine, lib, "adw_wrap_layout_set_justify_last_line")
531+ core.PuregoSafeRegister(&xWrapLayoutSetLineHomogeneous, lib, "adw_wrap_layout_set_line_homogeneous")
532+ core.PuregoSafeRegister(&xWrapLayoutSetLineSpacing, lib, "adw_wrap_layout_set_line_spacing")
533+ core.PuregoSafeRegister(&xWrapLayoutSetLineSpacingUnit, lib, "adw_wrap_layout_set_line_spacing_unit")
534+ core.PuregoSafeRegister(&xWrapLayoutSetNaturalLineLength, lib, "adw_wrap_layout_set_natural_line_length")
535+ core.PuregoSafeRegister(&xWrapLayoutSetNaturalLineLengthUnit, lib, "adw_wrap_layout_set_natural_line_length_unit")
536+ core.PuregoSafeRegister(&xWrapLayoutSetPackDirection, lib, "adw_wrap_layout_set_pack_direction")
537+ core.PuregoSafeRegister(&xWrapLayoutSetWrapPolicy, lib, "adw_wrap_layout_set_wrap_policy")
538+ core.PuregoSafeRegister(&xWrapLayoutSetWrapReverse, lib, "adw_wrap_layout_set_wrap_reverse")
539+
540+}
M v4/gdk/gdkapplaunchcontext.go +1 -1
@@ -9,7 +9,7 @@ import (
9 "github.com/jwijenbergh/puregotk/v4/gobject/types"9 "github.com/jwijenbergh/puregotk/v4/gobject/types"
10 )10 )
11 11
12-// `GdkAppLaunchContext` handles launching an application in a graphical context.12+// Handles launching an application in a graphical context.
13 //13 //
14 // It is an implementation of `GAppLaunchContext` that provides startup14 // It is an implementation of `GAppLaunchContext` that provides startup
15 // notification and allows to launch applications on a specific workspace.15 // notification and allows to launch applications on a specific workspace.
M v4/gdk/gdkcairo.go +1 -1
@@ -10,7 +10,7 @@ import (
10 10
11 var xCairoDrawFromGl func(*cairo.Context, uintptr, int, int, int, int, int, int, int)11 var xCairoDrawFromGl func(*cairo.Context, uintptr, int, int, int, int, int, int, int)
12 12
13-// The main way to not draw GL content in GTK.13+// Draws GL content onto a cairo context.
14 //14 //
15 // It takes a render buffer ID (@source_type == GL_RENDERBUFFER) or a texture15 // It takes a render buffer ID (@source_type == GL_RENDERBUFFER) or a texture
16 // id (@source_type == GL_TEXTURE) and draws it onto @cr with an OVER operation,16 // id (@source_type == GL_TEXTURE) and draws it onto @cr with an OVER operation,
M v4/gdk/gdkcairocontext.go +1 -2
@@ -8,8 +8,7 @@ import (
8 "github.com/jwijenbergh/puregotk/v4/gobject/types"8 "github.com/jwijenbergh/puregotk/v4/gobject/types"
9 )9 )
10 10
11-// `GdkCairoContext` is an object representing the platform-specific11+// Represents the platform-specific draw context.
12-// draw context.
13 //12 //
14 // `GdkCairoContext`s are created for a surface using13 // `GdkCairoContext`s are created for a surface using
15 // [method@Gdk.Surface.create_cairo_context], and the context14 // [method@Gdk.Surface.create_cairo_context], and the context
A v4/gdk/gdkcicpparams.go +226 -0
@@ -0,0 +1,226 @@
1+// Package gdk was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT
2+package gdk
3+
4+import (
5+ "structs"
6+ "unsafe"
7+
8+ "github.com/jwijenbergh/purego"
9+ "github.com/jwijenbergh/puregotk/pkg/core"
10+ "github.com/jwijenbergh/puregotk/v4/glib"
11+ "github.com/jwijenbergh/puregotk/v4/gobject"
12+ "github.com/jwijenbergh/puregotk/v4/gobject/types"
13+)
14+
15+type CicpParamsClass struct {
16+ _ structs.HostLayout
17+}
18+
19+func (x *CicpParamsClass) GoPointer() uintptr {
20+ return uintptr(unsafe.Pointer(x))
21+}
22+
23+// The values of this enumeration describe whether image data uses
24+// the full range of 8-bit values.
25+//
26+// In digital broadcasting, it is common to reserve the lowest and
27+// highest values. Typically the allowed values for the narrow range
28+// are 16-235 for Y and 16-240 for u,v (when dealing with YUV data).
29+type CicpRange int
30+
31+var xCicpRangeGLibType func() types.GType
32+
33+func CicpRangeGLibType() types.GType {
34+ return xCicpRangeGLibType()
35+}
36+
37+const (
38+
39+ // The values use the range of 16-235 (for Y) and 16-240 for u and v.
40+ CicpRangeNarrowValue CicpRange = 0
41+ // The values use the full range.
42+ CicpRangeFullValue CicpRange = 1
43+)
44+
45+// Contains the parameters that define a colorstate with cicp parameters.
46+//
47+// Cicp parameters are specified in the ITU-T H.273
48+// [specification](https://www.itu.int/rec/T-REC-H.273/en).
49+//
50+// See the documentation of individual properties for supported values.
51+//
52+// The 'unspecified' value (2) is not treated in any special way, and
53+// must be replaced by a different value before creating a color state.
54+//
55+// `GdkCicpParams` can be used as a builder object to construct a color
56+// state from Cicp data with [method@Gdk.CicpParams.build_color_state].
57+// The function will return an error if the given parameters are not
58+// supported.
59+//
60+// You can obtain a `GdkCicpParams` object from a color state with
61+// [method@Gdk.ColorState.create_cicp_params]. This can be used to
62+// create a variant of a color state, by changing just one of the cicp
63+// parameters, or just to obtain information about the color state.
64+type CicpParams struct {
65+ gobject.Object
66+}
67+
68+var xCicpParamsGLibType func() types.GType
69+
70+func CicpParamsGLibType() types.GType {
71+ return xCicpParamsGLibType()
72+}
73+
74+func CicpParamsNewFromInternalPtr(ptr uintptr) *CicpParams {
75+ cls := &CicpParams{}
76+ cls.Ptr = ptr
77+ return cls
78+}
79+
80+var xNewCicpParams func() uintptr
81+
82+// Creates a new `GdkCicpParams` object.
83+//
84+// The initial values of the properties are the values for "undefined"
85+// and need to be set before a color state object can be built.
86+func NewCicpParams() *CicpParams {
87+ var cls *CicpParams
88+
89+ cret := xNewCicpParams()
90+
91+ if cret == 0 {
92+ return nil
93+ }
94+ cls = &CicpParams{}
95+ cls.Ptr = cret
96+ return cls
97+}
98+
99+var xCicpParamsBuildColorState func(uintptr) *ColorState
100+
101+// Creates a new `GdkColorState` object for the cicp parameters in @self.
102+//
103+// Note that this may fail if the cicp parameters in @self are not
104+// supported by GTK. In that case, `NULL` is returned, and @error is set
105+// with an error message that can be presented to the user.
106+func (x *CicpParams) BuildColorState() (*ColorState, error) {
107+ var cerr *glib.Error
108+
109+ cret := xCicpParamsBuildColorState(x.GoPointer())
110+ if cerr == nil {
111+ return cret, nil
112+ }
113+ return cret, cerr
114+
115+}
116+
117+var xCicpParamsGetColorPrimaries func(uintptr) uint
118+
119+// Returns the value of the color-primaries property
120+// of @self.
121+func (x *CicpParams) GetColorPrimaries() uint {
122+
123+ cret := xCicpParamsGetColorPrimaries(x.GoPointer())
124+ return cret
125+}
126+
127+var xCicpParamsGetMatrixCoefficients func(uintptr) uint
128+
129+// Gets the matrix-coefficients property of @self.
130+func (x *CicpParams) GetMatrixCoefficients() uint {
131+
132+ cret := xCicpParamsGetMatrixCoefficients(x.GoPointer())
133+ return cret
134+}
135+
136+var xCicpParamsGetRange func(uintptr) CicpRange
137+
138+// Gets the range property of @self.
139+func (x *CicpParams) GetRange() CicpRange {
140+
141+ cret := xCicpParamsGetRange(x.GoPointer())
142+ return cret
143+}
144+
145+var xCicpParamsGetTransferFunction func(uintptr) uint
146+
147+// Gets the transfer-function property of @self.
148+func (x *CicpParams) GetTransferFunction() uint {
149+
150+ cret := xCicpParamsGetTransferFunction(x.GoPointer())
151+ return cret
152+}
153+
154+var xCicpParamsSetColorPrimaries func(uintptr, uint)
155+
156+// Sets the color-primaries property of @self.
157+func (x *CicpParams) SetColorPrimaries(ColorPrimariesVar uint) {
158+
159+ xCicpParamsSetColorPrimaries(x.GoPointer(), ColorPrimariesVar)
160+
161+}
162+
163+var xCicpParamsSetMatrixCoefficients func(uintptr, uint)
164+
165+// @self a `GdkCicpParams`
166+// Sets the matrix-coefficients property of @self.
167+func (x *CicpParams) SetMatrixCoefficients(MatrixCoefficientsVar uint) {
168+
169+ xCicpParamsSetMatrixCoefficients(x.GoPointer(), MatrixCoefficientsVar)
170+
171+}
172+
173+var xCicpParamsSetRange func(uintptr, CicpRange)
174+
175+// Sets the range property of @self
176+func (x *CicpParams) SetRange(RangeVar CicpRange) {
177+
178+ xCicpParamsSetRange(x.GoPointer(), RangeVar)
179+
180+}
181+
182+var xCicpParamsSetTransferFunction func(uintptr, uint)
183+
184+// Sets the transfer-function property of @self.
185+func (x *CicpParams) SetTransferFunction(TransferFunctionVar uint) {
186+
187+ xCicpParamsSetTransferFunction(x.GoPointer(), TransferFunctionVar)
188+
189+}
190+
191+func (c *CicpParams) GoPointer() uintptr {
192+ if c == nil {
193+ return 0
194+ }
195+ return c.Ptr
196+}
197+
198+func (c *CicpParams) SetGoPointer(ptr uintptr) {
199+ c.Ptr = ptr
200+}
201+
202+func init() {
203+ core.SetPackageName("GDK", "gtk4")
204+ core.SetSharedLibrary("GDK", "libgtk-4.so.1")
205+ lib, err := purego.Dlopen(core.GetPath("GDK"), purego.RTLD_NOW|purego.RTLD_GLOBAL)
206+ if err != nil {
207+ panic(err)
208+ }
209+
210+ core.PuregoSafeRegister(&xCicpRangeGLibType, lib, "gdk_cicp_range_get_type")
211+
212+ core.PuregoSafeRegister(&xCicpParamsGLibType, lib, "gdk_cicp_params_get_type")
213+
214+ core.PuregoSafeRegister(&xNewCicpParams, lib, "gdk_cicp_params_new")
215+
216+ core.PuregoSafeRegister(&xCicpParamsBuildColorState, lib, "gdk_cicp_params_build_color_state")
217+ core.PuregoSafeRegister(&xCicpParamsGetColorPrimaries, lib, "gdk_cicp_params_get_color_primaries")
218+ core.PuregoSafeRegister(&xCicpParamsGetMatrixCoefficients, lib, "gdk_cicp_params_get_matrix_coefficients")
219+ core.PuregoSafeRegister(&xCicpParamsGetRange, lib, "gdk_cicp_params_get_range")
220+ core.PuregoSafeRegister(&xCicpParamsGetTransferFunction, lib, "gdk_cicp_params_get_transfer_function")
221+ core.PuregoSafeRegister(&xCicpParamsSetColorPrimaries, lib, "gdk_cicp_params_set_color_primaries")
222+ core.PuregoSafeRegister(&xCicpParamsSetMatrixCoefficients, lib, "gdk_cicp_params_set_matrix_coefficients")
223+ core.PuregoSafeRegister(&xCicpParamsSetRange, lib, "gdk_cicp_params_set_range")
224+ core.PuregoSafeRegister(&xCicpParamsSetTransferFunction, lib, "gdk_cicp_params_set_transfer_function")
225+
226+}
M v4/gdk/gdkclipboard.go +6 -20
@@ -12,8 +12,7 @@ import (
12 "github.com/jwijenbergh/puregotk/v4/gobject/types"12 "github.com/jwijenbergh/puregotk/v4/gobject/types"
13 )13 )
14 14
15-// The `GdkClipboard` object represents data shared between applications or15+// Represents data shared between applications or inside an application.
16-// inside an application.
17 //16 //
18 // To get a `GdkClipboard` object, use [method@Gdk.Display.get_clipboard] or17 // To get a `GdkClipboard` object, use [method@Gdk.Display.get_clipboard] or
19 // [method@Gdk.Display.get_primary_clipboard]. You can find out about the data18 // [method@Gdk.Display.get_primary_clipboard]. You can find out about the data
@@ -111,9 +110,6 @@ var xClipboardReadAsync func(uintptr, []string, int, uintptr, uintptr, uintptr)
111 // Asynchronously requests an input stream to read the @clipboard's110 // Asynchronously requests an input stream to read the @clipboard's
112 // contents from.111 // contents from.
113 //112 //
114-// When the operation is finished @callback will be called. You must then
115-// call [method@Gdk.Clipboard.read_finish] to get the result of the operation.
116-//
117 // The clipboard will choose the most suitable mime type from the given list113 // The clipboard will choose the most suitable mime type from the given list
118 // to fulfill the request, preferring the ones listed first.114 // to fulfill the request, preferring the ones listed first.
119 func (x *Clipboard) ReadAsync(MimeTypesVar []string, IoPriorityVar int, CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) {115 func (x *Clipboard) ReadAsync(MimeTypesVar []string, IoPriorityVar int, CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) {
@@ -149,9 +145,6 @@ var xClipboardReadTextAsync func(uintptr, uintptr, uintptr, uintptr)
149 145
150 // Asynchronously request the @clipboard contents converted to a string.146 // Asynchronously request the @clipboard contents converted to a string.
151 //147 //
152-// When the operation is finished @callback will be called. You must then
153-// call [method@Gdk.Clipboard.read_text_finish] to get the result.
154-//
155 // This is a simple wrapper around [method@Gdk.Clipboard.read_value_async].148 // This is a simple wrapper around [method@Gdk.Clipboard.read_value_async].
156 // Use that function or [method@Gdk.Clipboard.read_async] directly if you149 // Use that function or [method@Gdk.Clipboard.read_async] directly if you
157 // need more control over the operation.150 // need more control over the operation.
@@ -181,9 +174,6 @@ var xClipboardReadTextureAsync func(uintptr, uintptr, uintptr, uintptr)
181 174
182 // Asynchronously request the @clipboard contents converted to a `GdkPixbuf`.175 // Asynchronously request the @clipboard contents converted to a `GdkPixbuf`.
183 //176 //
184-// When the operation is finished @callback will be called. You must then
185-// call [method@Gdk.Clipboard.read_texture_finish] to get the result.
186-//
187 // This is a simple wrapper around [method@Gdk.Clipboard.read_value_async].177 // This is a simple wrapper around [method@Gdk.Clipboard.read_value_async].
188 // Use that function or [method@Gdk.Clipboard.read_async] directly if you178 // Use that function or [method@Gdk.Clipboard.read_async] directly if you
189 // need more control over the operation.179 // need more control over the operation.
@@ -221,9 +211,6 @@ var xClipboardReadValueAsync func(uintptr, types.GType, int, uintptr, uintptr, u
221 // Asynchronously request the @clipboard contents converted to the given211 // Asynchronously request the @clipboard contents converted to the given
222 // @type.212 // @type.
223 //213 //
224-// When the operation is finished @callback will be called. You must then call
225-// [method@Gdk.Clipboard.read_value_finish] to get the resulting `GValue`.
226-//
227 // For local clipboard contents that are available in the given `GType`,214 // For local clipboard contents that are available in the given `GType`,
228 // the value will be copied directly. Otherwise, GDK will try to use215 // the value will be copied directly. Otherwise, GDK will try to use
229 // [func@content_deserialize_async] to convert the clipboard's data.216 // [func@content_deserialize_async] to convert the clipboard's data.
@@ -254,8 +241,8 @@ var xClipboardSet func(uintptr, types.GType, ...interface{})
254 // Sets the clipboard to contain the value collected from the given varargs.241 // Sets the clipboard to contain the value collected from the given varargs.
255 //242 //
256 // Values should be passed the same way they are passed to other value243 // Values should be passed the same way they are passed to other value
257-// collecting APIs, such as [`method@GObject.Object.set`] or244+// collecting APIs, such as [method@GObject.Object.set] or
258-// [`func@GObject.signal_emit`].245+// [func@GObject.signal_emit].
259 //246 //
260 // ```c247 // ```c
261 // gdk_clipboard_set (clipboard, GTK_TYPE_STRING, "Hello World");248 // gdk_clipboard_set (clipboard, GTK_TYPE_STRING, "Hello World");
@@ -330,15 +317,14 @@ var xClipboardStoreAsync func(uintptr, int, uintptr, uintptr, uintptr)
330 //317 //
331 // If the clipboard is not local, this function does nothing but report success.318 // If the clipboard is not local, this function does nothing but report success.
332 //319 //
333-// The @callback must call [method@Gdk.Clipboard.store_finish].
334-//
335 // The purpose of this call is to preserve clipboard contents beyond the320 // The purpose of this call is to preserve clipboard contents beyond the
336 // lifetime of an application, so this function is typically called on321 // lifetime of an application, so this function is typically called on
337 // exit. Depending on the platform, the functionality may not be available322 // exit. Depending on the platform, the functionality may not be available
338 // unless a "clipboard manager" is running.323 // unless a "clipboard manager" is running.
339 //324 //
340-// This function is called automatically when a [class@Gtk.Application] is325+// This function is called automatically when a
341-// shut down, so you likely don't need to call it.326+// [GtkApplication](../gtk4/class.Application.html)
327+// is shut down, so you likely don't need to call it.
342 func (x *Clipboard) StoreAsync(IoPriorityVar int, CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) {328 func (x *Clipboard) StoreAsync(IoPriorityVar int, CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) {
343 329
344 xClipboardStoreAsync(x.GoPointer(), IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)330 xClipboardStoreAsync(x.GoPointer(), IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
A v4/gdk/gdkcolorstate.go +114 -0
@@ -0,0 +1,114 @@
1+// Package gdk was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT
2+package gdk
3+
4+import (
5+ "github.com/jwijenbergh/purego"
6+ "github.com/jwijenbergh/puregotk/pkg/core"
7+)
8+
9+var xColorStateGetOklab func() *ColorState
10+
11+// Returns the color state object representing the oklab color space.
12+//
13+// This is a perceptually uniform color state.
14+func ColorStateGetOklab() *ColorState {
15+
16+ cret := xColorStateGetOklab()
17+ return cret
18+}
19+
20+var xColorStateGetOklch func() *ColorState
21+
22+// Returns the color state object representing the oklch color space.
23+//
24+// This is the polar variant of oklab, in which the hue is encoded as
25+// a polar coordinate.
26+func ColorStateGetOklch() *ColorState {
27+
28+ cret := xColorStateGetOklch()
29+ return cret
30+}
31+
32+var xColorStateGetRec2100Linear func() *ColorState
33+
34+// Returns the color state object representing the linear rec2100 color space.
35+//
36+// This color state uses the primaries defined by BT.2020-2 and BT.2100-0 and a linear
37+// transfer function.
38+//
39+// It is equivalent to the [Cicp](class.CicpParams.html) tuple 9/8/0/1.
40+//
41+// See e.g. [the CSS HDR Module](https://drafts.csswg.org/css-color-hdr/#valdef-color-rec2100-linear)
42+// for details about this colorstate.
43+func ColorStateGetRec2100Linear() *ColorState {
44+
45+ cret := xColorStateGetRec2100Linear()
46+ return cret
47+}
48+
49+var xColorStateGetRec2100Pq func() *ColorState
50+
51+// Returns the color state object representing the rec2100-pq color space.
52+//
53+// This color state uses the primaries defined by BT.2020-2 and BT.2100-0 and the transfer
54+// function defined by SMPTE ST 2084 and BT.2100-2.
55+//
56+// It is equivalent to the [Cicp](class.CicpParams.html) tuple 9/16/0/1.
57+//
58+// See e.g. [the CSS HDR Module](https://drafts.csswg.org/css-color-hdr/#valdef-color-rec2100-pq)
59+// for details about this colorstate.
60+func ColorStateGetRec2100Pq() *ColorState {
61+
62+ cret := xColorStateGetRec2100Pq()
63+ return cret
64+}
65+
66+var xColorStateGetSrgb func() *ColorState
67+
68+// Returns the color state object representing the sRGB color space.
69+//
70+// This color state uses the primaries defined by BT.709-6 and the transfer function
71+// defined by IEC 61966-2-1.
72+//
73+// It is equivalent to the [Cicp](class.CicpParams.html) tuple 1/13/0/1.
74+//
75+// See e.g. [the CSS Color Module](https://www.w3.org/TR/css-color-4/#predefined-sRGB)
76+// for details about this colorstate.
77+func ColorStateGetSrgb() *ColorState {
78+
79+ cret := xColorStateGetSrgb()
80+ return cret
81+}
82+
83+var xColorStateGetSrgbLinear func() *ColorState
84+
85+// Returns the color state object representing the linearized sRGB color space.
86+//
87+// This color state uses the primaries defined by BT.709-6 and a linear transfer function.
88+//
89+// It is equivalent to the [Cicp](class.CicpParams.html) tuple 1/8/0/1.
90+//
91+// See e.g. [the CSS Color Module](https://www.w3.org/TR/css-color-4/#predefined-sRGB-linear)
92+// for details about this colorstate.
93+func ColorStateGetSrgbLinear() *ColorState {
94+
95+ cret := xColorStateGetSrgbLinear()
96+ return cret
97+}
98+
99+func init() {
100+ core.SetPackageName("GDK", "gtk4")
101+ core.SetSharedLibrary("GDK", "libgtk-4.so.1")
102+ lib, err := purego.Dlopen(core.GetPath("GDK"), purego.RTLD_NOW|purego.RTLD_GLOBAL)
103+ if err != nil {
104+ panic(err)
105+ }
106+
107+ core.PuregoSafeRegister(&xColorStateGetOklab, lib, "gdk_color_state_get_oklab")
108+ core.PuregoSafeRegister(&xColorStateGetOklch, lib, "gdk_color_state_get_oklch")
109+ core.PuregoSafeRegister(&xColorStateGetRec2100Linear, lib, "gdk_color_state_get_rec2100_linear")
110+ core.PuregoSafeRegister(&xColorStateGetRec2100Pq, lib, "gdk_color_state_get_rec2100_pq")
111+ core.PuregoSafeRegister(&xColorStateGetSrgb, lib, "gdk_color_state_get_srgb")
112+ core.PuregoSafeRegister(&xColorStateGetSrgbLinear, lib, "gdk_color_state_get_srgb_linear")
113+
114+}
M v4/gdk/gdkcontentdeserializer.go +10 -14
@@ -19,13 +19,10 @@ type ContentDeserializeFunc func(uintptr)
19 19
20 var xContentDeserializeAsync func(uintptr, string, types.GType, int, uintptr, uintptr, uintptr)20 var xContentDeserializeAsync func(uintptr, string, types.GType, int, uintptr, uintptr, uintptr)
21 21
22-// Read content from the given input stream and deserialize it, asynchronously.22+// Reads content from the given input stream and deserialize it, asynchronously.
23 //23 //
24-// The default I/O priority is %G_PRIORITY_DEFAULT (i.e. 0), and lower numbers24+// The default I/O priority is `G_PRIORITY_DEFAULT` (i.e. 0), and lower numbers
25 // indicate a higher priority.25 // indicate a higher priority.
26-//
27-// When the operation is finished, @callback will be called. You must then
28-// call [func@Gdk.content_deserialize_finish] to get the result of the operation.
29 func ContentDeserializeAsync(StreamVar *gio.InputStream, MimeTypeVar string, TypeVar types.GType, IoPriorityVar int, CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) {26 func ContentDeserializeAsync(StreamVar *gio.InputStream, MimeTypeVar string, TypeVar types.GType, IoPriorityVar int, CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) {
30 27
31 xContentDeserializeAsync(StreamVar.GoPointer(), MimeTypeVar, TypeVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)28 xContentDeserializeAsync(StreamVar.GoPointer(), MimeTypeVar, TypeVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
@@ -55,8 +52,7 @@ func ContentRegisterDeserializer(MimeTypeVar string, TypeVar types.GType, Deseri
55 52
56 }53 }
57 54
58-// A `GdkContentDeserializer` is used to deserialize content received via55+// Deserializes content received via inter-application data transfers.
59-// inter-application data transfers.
60 //56 //
61 // The `GdkContentDeserializer` transforms serialized content that is57 // The `GdkContentDeserializer` transforms serialized content that is
62 // identified by a mime type into an object identified by a GType.58 // identified by a mime type into an object identified by a GType.
@@ -218,7 +214,7 @@ func (c *ContentDeserializer) SetGoPointer(ptr uintptr) {
218 c.Ptr = ptr214 c.Ptr = ptr
219 }215 }
220 216
221-// Gets the source object from a #GAsyncResult.217+// Gets the source object from a [iface@Gio.AsyncResult].
222 func (x *ContentDeserializer) GetSourceObject() *gobject.Object {218 func (x *ContentDeserializer) GetSourceObject() *gobject.Object {
223 var cls *gobject.Object219 var cls *gobject.Object
224 220
@@ -240,14 +236,14 @@ func (x *ContentDeserializer) IsTagged(SourceTagVar uintptr) bool {
240 return cret236 return cret
241 }237 }
242 238
243-// If @res is a #GSimpleAsyncResult, this is equivalent to239+// If @res is a [class@Gio.SimpleAsyncResult], this is equivalent to
244-// g_simple_async_result_propagate_error(). Otherwise it returns240+// [method@Gio.SimpleAsyncResult.propagate_error]. Otherwise it returns
245-// %FALSE.241+// `FALSE`.
246 //242 //
247-// This can be used for legacy error handling in async *_finish()243+// This can be used for legacy error handling in async `*_finish()`
248-// wrapper functions that traditionally handled #GSimpleAsyncResult244+// wrapper functions that traditionally handled [class@Gio.SimpleAsyncResult]
249 // error returns themselves rather than calling into the virtual method.245 // error returns themselves rather than calling into the virtual method.
250-// This should not be used in new code; #GAsyncResult errors that are246+// This should not be used in new code; [iface@Gio.AsyncResult] errors that are
251 // set by virtual methods should also be extracted by virtual methods,247 // set by virtual methods should also be extracted by virtual methods,
252 // to enable subclasses to chain up correctly.248 // to enable subclasses to chain up correctly.
253 func (x *ContentDeserializer) LegacyPropagateError() (bool, error) {249 func (x *ContentDeserializer) LegacyPropagateError() (bool, error) {
M v4/gdk/gdkcontentformats.go +1 -2
@@ -11,8 +11,7 @@ import (
11 "github.com/jwijenbergh/puregotk/v4/gobject/types"11 "github.com/jwijenbergh/puregotk/v4/gobject/types"
12 )12 )
13 13
14-// A `GdkContentFormatsBuilder` is an auxiliary struct used to create14+// Creates `GdkContentFormats` objects.
15-// new `GdkContentFormats`, and should not be kept around.
16 type ContentFormatsBuilder struct {15 type ContentFormatsBuilder struct {
17 _ structs.HostLayout16 _ structs.HostLayout
18 }17 }
M v4/gdk/gdkcontentprovider.go +5 -7
@@ -43,6 +43,7 @@ func (x *ContentProviderClass) GoPointer() uintptr {
43 }43 }
44 44
45 // OverrideContentChanged sets the callback function.45 // OverrideContentChanged sets the callback function.
46+// Signal class closure for `GdkContentProvider::content-changed`
46 func (x *ContentProviderClass) OverrideContentChanged(cb func(*ContentProvider)) {47 func (x *ContentProviderClass) OverrideContentChanged(cb func(*ContentProvider)) {
47 if cb == nil {48 if cb == nil {
48 x.xContentChanged = 049 x.xContentChanged = 0
@@ -54,6 +55,7 @@ func (x *ContentProviderClass) OverrideContentChanged(cb func(*ContentProvider))
54 }55 }
55 56
56 // GetContentChanged gets the callback function.57 // GetContentChanged gets the callback function.
58+// Signal class closure for `GdkContentProvider::content-changed`
57 func (x *ContentProviderClass) GetContentChanged() func(*ContentProvider) {59 func (x *ContentProviderClass) GetContentChanged() func(*ContentProvider) {
58 if x.xContentChanged == 0 {60 if x.xContentChanged == 0 {
59 return nil61 return nil
@@ -226,8 +228,8 @@ func (x *ContentProviderClass) GetGetValue() func(*ContentProvider, *gobject.Val
226 }228 }
227 }229 }
228 230
229-// A `GdkContentProvider` is used to provide content for the clipboard or231+// Provides content for the clipboard or for drag-and-drop operations
230-// for drag-and-drop operations in a number of formats.232+// in a number of formats.
231 //233 //
232 // To create a `GdkContentProvider`, use [ctor@Gdk.ContentProvider.new_for_value]234 // To create a `GdkContentProvider`, use [ctor@Gdk.ContentProvider.new_for_value]
233 // or [ctor@Gdk.ContentProvider.new_for_bytes].235 // or [ctor@Gdk.ContentProvider.new_for_bytes].
@@ -319,7 +321,7 @@ var xNewContentProviderUnion func(uintptr, uint) uintptr
319 //321 //
320 // gdk_content_provider_new_union ((GdkContentProvider *[2]) {322 // gdk_content_provider_new_union ((GdkContentProvider *[2]) {
321 // gdk_content_provider_new_typed (G_TYPE_FILE, file),323 // gdk_content_provider_new_typed (G_TYPE_FILE, file),
322-// gdk_content_provider_new_typed (G_TYPE_TEXTURE, texture)324+// gdk_content_provider_new_typed (GDK_TYPE_TEXTURE, texture)
323 // }, 2);325 // }, 2);
324 //326 //
325 // ```327 // ```
@@ -393,10 +395,6 @@ var xContentProviderWriteMimeTypeAsync func(uintptr, string, uintptr, int, uintp
393 // Asynchronously writes the contents of @provider to @stream in the given395 // Asynchronously writes the contents of @provider to @stream in the given
394 // @mime_type.396 // @mime_type.
395 //397 //
396-// When the operation is finished @callback will be called. You must then call
397-// [method@Gdk.ContentProvider.write_mime_type_finish] to get the result
398-// of the operation.
399-//
400 // The given mime type does not need to be listed in the formats returned by398 // The given mime type does not need to be listed in the formats returned by
401 // [method@Gdk.ContentProvider.ref_formats]. However, if the given `GType` is399 // [method@Gdk.ContentProvider.ref_formats]. However, if the given `GType` is
402 // not supported, `G_IO_ERROR_NOT_SUPPORTED` will be reported.400 // not supported, `G_IO_ERROR_NOT_SUPPORTED` will be reported.
M v4/gdk/gdkcontentserializer.go +8 -12
@@ -32,9 +32,6 @@ var xContentSerializeAsync func(uintptr, string, *gobject.Value, int, uintptr, u
32 //32 //
33 // The default I/O priority is %G_PRIORITY_DEFAULT (i.e. 0), and lower numbers33 // The default I/O priority is %G_PRIORITY_DEFAULT (i.e. 0), and lower numbers
34 // indicate a higher priority.34 // indicate a higher priority.
35-//
36-// When the operation is finished, @callback will be called. You must then
37-// call [func@Gdk.content_serialize_finish] to get the result of the operation.
38 func ContentSerializeAsync(StreamVar *gio.OutputStream, MimeTypeVar string, ValueVar *gobject.Value, IoPriorityVar int, CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) {35 func ContentSerializeAsync(StreamVar *gio.OutputStream, MimeTypeVar string, ValueVar *gobject.Value, IoPriorityVar int, CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) {
39 36
40 xContentSerializeAsync(StreamVar.GoPointer(), MimeTypeVar, ValueVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)37 xContentSerializeAsync(StreamVar.GoPointer(), MimeTypeVar, ValueVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
@@ -55,8 +52,7 @@ func ContentSerializeFinish(ResultVar gio.AsyncResult) (bool, error) {
55 52
56 }53 }
57 54
58-// A `GdkContentSerializer` is used to serialize content for55+// Serializes content for inter-application data transfers.
59-// inter-application data transfers.
60 //56 //
61 // The `GdkContentSerializer` transforms an object that is identified57 // The `GdkContentSerializer` transforms an object that is identified
62 // by a GType into a serialized form (i.e. a byte stream) that is58 // by a GType into a serialized form (i.e. a byte stream) that is
@@ -219,7 +215,7 @@ func (c *ContentSerializer) SetGoPointer(ptr uintptr) {
219 c.Ptr = ptr215 c.Ptr = ptr
220 }216 }
221 217
222-// Gets the source object from a #GAsyncResult.218+// Gets the source object from a [iface@Gio.AsyncResult].
223 func (x *ContentSerializer) GetSourceObject() *gobject.Object {219 func (x *ContentSerializer) GetSourceObject() *gobject.Object {
224 var cls *gobject.Object220 var cls *gobject.Object
225 221
@@ -241,14 +237,14 @@ func (x *ContentSerializer) IsTagged(SourceTagVar uintptr) bool {
241 return cret237 return cret
242 }238 }
243 239
244-// If @res is a #GSimpleAsyncResult, this is equivalent to240+// If @res is a [class@Gio.SimpleAsyncResult], this is equivalent to
245-// g_simple_async_result_propagate_error(). Otherwise it returns241+// [method@Gio.SimpleAsyncResult.propagate_error]. Otherwise it returns
246-// %FALSE.242+// `FALSE`.
247 //243 //
248-// This can be used for legacy error handling in async *_finish()244+// This can be used for legacy error handling in async `*_finish()`
249-// wrapper functions that traditionally handled #GSimpleAsyncResult245+// wrapper functions that traditionally handled [class@Gio.SimpleAsyncResult]
250 // error returns themselves rather than calling into the virtual method.246 // error returns themselves rather than calling into the virtual method.
251-// This should not be used in new code; #GAsyncResult errors that are247+// This should not be used in new code; [iface@Gio.AsyncResult] errors that are
252 // set by virtual methods should also be extracted by virtual methods,248 // set by virtual methods should also be extracted by virtual methods,
253 // to enable subclasses to chain up correctly.249 // to enable subclasses to chain up correctly.
254 func (x *ContentSerializer) LegacyPropagateError() (bool, error) {250 func (x *ContentSerializer) LegacyPropagateError() (bool, error) {
M v4/gdk/gdkcursor.go +77 -13
@@ -4,11 +4,26 @@ package gdk
4 import (4 import (
5 "github.com/jwijenbergh/purego"5 "github.com/jwijenbergh/purego"
6 "github.com/jwijenbergh/puregotk/pkg/core"6 "github.com/jwijenbergh/puregotk/pkg/core"
7+ "github.com/jwijenbergh/puregotk/v4/glib"
7 "github.com/jwijenbergh/puregotk/v4/gobject"8 "github.com/jwijenbergh/puregotk/v4/gobject"
8 "github.com/jwijenbergh/puregotk/v4/gobject/types"9 "github.com/jwijenbergh/puregotk/v4/gobject/types"
9 )10 )
10 11
11-// `GdkCursor` is used to create and destroy cursors.12+// The type of callback used by a dynamic `GdkCursor` to generate
13+// a texture for the cursor image at the given @cursor_size
14+// and @scale.
15+//
16+// The actual cursor size in application pixels may be different
17+// from @cursor_size x @cursor_size, and will be returned in
18+// @width, @height. The returned texture should have a size that
19+// corresponds to the actual cursor size, in device pixels (i.e.
20+// application pixels, multiplied by @scale).
21+//
22+// This function may fail and return `NULL`, in which case
23+// the fallback cursor will be used.
24+type CursorGetTextureCallback func(uintptr, int, float64, int, int, int, int, uintptr) uintptr
25+
26+// Used to create and destroy cursors.
12 //27 //
13 // Cursors are immutable objects, so once you created them, there is no way28 // Cursors are immutable objects, so once you created them, there is no way
14 // to modify them later. You should create a new cursor when you want to change29 // to modify them later. You should create a new cursor when you want to change
@@ -17,7 +32,8 @@ import (
17 // Cursors by themselves are not very interesting: they must be bound to a32 // Cursors by themselves are not very interesting: they must be bound to a
18 // window for users to see them. This is done with [method@Gdk.Surface.set_cursor]33 // window for users to see them. This is done with [method@Gdk.Surface.set_cursor]
19 // or [method@Gdk.Surface.set_device_cursor]. Applications will typically34 // or [method@Gdk.Surface.set_device_cursor]. Applications will typically
20-// use higher-level GTK functions such as [method@Gtk.Widget.set_cursor] instead.35+// use higher-level GTK functions such as [gtk_widget_set_cursor()](../gtk4/method.Widget.set_cursor.html)
36+// instead.
21 //37 //
22 // Cursors are not bound to a given [class@Gdk.Display], so they can be shared.38 // Cursors are not bound to a given [class@Gdk.Display], so they can be shared.
23 // However, the appearance of cursors may vary when used on different39 // However, the appearance of cursors may vary when used on different
@@ -57,6 +73,25 @@ func CursorNewFromInternalPtr(ptr uintptr) *Cursor {
57 return cls73 return cls
58 }74 }
59 75
76+var xNewCursorFromCallback func(uintptr, uintptr, uintptr, uintptr) uintptr
77+
78+// Creates a new callback-based cursor object.
79+//
80+// Cursors of this kind produce textures for the cursor
81+// image on demand, when the @callback is called.
82+func NewCursorFromCallback(CallbackVar *CursorGetTextureCallback, DataVar uintptr, DestroyVar *glib.DestroyNotify, FallbackVar *Cursor) *Cursor {
83+ var cls *Cursor
84+
85+ cret := xNewCursorFromCallback(glib.NewCallback(CallbackVar), DataVar, glib.NewCallback(DestroyVar), FallbackVar.GoPointer())
86+
87+ if cret == 0 {
88+ return nil
89+ }
90+ cls = &Cursor{}
91+ cls.Ptr = cret
92+ return cls
93+}
94+
60 var xNewCursorFromName func(string, uintptr) uintptr95 var xNewCursorFromName func(string, uintptr) uintptr
61 96
62 // Creates a new cursor by looking up @name in the current cursor97 // Creates a new cursor by looking up @name in the current cursor
@@ -65,17 +100,45 @@ var xNewCursorFromName func(string, uintptr) uintptr
65 // A recommended set of cursor names that will work across different100 // A recommended set of cursor names that will work across different
66 // platforms can be found in the CSS specification:101 // platforms can be found in the CSS specification:
67 //102 //
68-// | | | | |103+// | | | |
69-// | --- | --- | ---- | --- |104+// | --- | --- | --- |
70-// | "none" | ![](default_cursor.png) "default" | ![](help_cursor.png) "help" | ![](pointer_cursor.png) "pointer" |105+// | | "none" | No cursor |
71-// | ![](context_menu_cursor.png) "context-menu" | ![](progress_cursor.png) "progress" | ![](wait_cursor.png) "wait" | ![](cell_cursor.png) "cell" |106+// | ![](default_cursor.png) | "default" | The default cursor |
72-// | ![](crosshair_cursor.png) "crosshair" | ![](text_cursor.png) "text" | ![](vertical_text_cursor.png) "vertical-text" | ![](alias_cursor.png) "alias" |107+// | ![](help_cursor.png) | "help" | Help is available |
73-// | ![](copy_cursor.png) "copy" | ![](no_drop_cursor.png) "no-drop" | ![](move_cursor.png) "move" | ![](not_allowed_cursor.png) "not-allowed" |108+// | ![](pointer_cursor.png) | "pointer" | Indicates a link or interactive element |
74-// | ![](grab_cursor.png) "grab" | ![](grabbing_cursor.png) "grabbing" | ![](all_scroll_cursor.png) "all-scroll" | ![](col_resize_cursor.png) "col-resize" |109+// | ![](context_menu_cursor.png) |"context-menu" | A context menu is available |
75-// | ![](row_resize_cursor.png) "row-resize" | ![](n_resize_cursor.png) "n-resize" | ![](e_resize_cursor.png) "e-resize" | ![](s_resize_cursor.png) "s-resize" |110+// | ![](progress_cursor.png) | "progress" | Progress indicator |
76-// | ![](w_resize_cursor.png) "w-resize" | ![](ne_resize_cursor.png) "ne-resize" | ![](nw_resize_cursor.png) "nw-resize" | ![](sw_resize_cursor.png) "sw-resize" |111+// | ![](wait_cursor.png) | "wait" | Busy cursor |
77-// | ![](se_resize_cursor.png) "se-resize" | ![](ew_resize_cursor.png) "ew-resize" | ![](ns_resize_cursor.png) "ns-resize" | ![](nesw_resize_cursor.png) "nesw-resize" |112+// | ![](cell_cursor.png) | "cell" | Cell(s) may be selected |
78-// | ![](nwse_resize_cursor.png) "nwse-resize" | ![](zoom_in_cursor.png) "zoom-in" | ![](zoom_out_cursor.png) "zoom-out" | |113+// | ![](crosshair_cursor.png) | "crosshair" | Simple crosshair |
114+// | ![](text_cursor.png) | "text" | Text may be selected |
115+// | ![](vertical_text_cursor.png) | "vertical-text" | Vertical text may be selected |
116+// | ![](alias_cursor.png) | "alias" | DND: Something will be linked |
117+// | ![](copy_cursor.png) | "copy" | DND: Something will be copied |
118+// | ![](move_cursor.png) | "move" | DND: Something will be moved |
119+// | ![](dnd_ask_cursor.png) | "dnd-ask" | DND: User can choose action to be carried out |
120+// | ![](no_drop_cursor.png) | "no-drop" | DND: Can't drop here |
121+// | ![](not_allowed_cursor.png) | "not-allowed" | DND: Action will not be carried out |
122+// | ![](grab_cursor.png) | "grab" | DND: Something can be grabbed |
123+// | ![](grabbing_cursor.png) | "grabbing" | DND: Something is being grabbed |
124+// | ![](n_resize_cursor.png) | "n-resize" | Resizing: Move north border |
125+// | ![](e_resize_cursor.png) | "e-resize" | Resizing: Move east border |
126+// | ![](s_resize_cursor.png) | "s-resize" | Resizing: Move south border |
127+// | ![](w_resize_cursor.png) | "w-resize" | Resizing: Move west border |
128+// | ![](ne_resize_cursor.png) | "ne-resize" | Resizing: Move north-east corner |
129+// | ![](nw_resize_cursor.png) | "nw-resize" | Resizing: Move north-west corner |
130+// | ![](sw_resize_cursor.png) | "sw-resize" | Resizing: Move south-west corner |
131+// | ![](se_resize_cursor.png) | "se-resize" | Resizing: Move south-east corner |
132+// | ![](col_resize_cursor.png) | "col-resize" | Resizing: Move an item or border horizontally |
133+// | ![](row_resize_cursor.png) | "row-resize" | Resizing: Move an item or border vertically |
134+// | ![](ew_resize_cursor.png) | "ew-resize" | Moving: Something can be moved horizontally |
135+// | ![](ns_resize_cursor.png) | "ns-resize" | Moving: Something can be moved vertically |
136+// | ![](nesw_resize_cursor.png) | "nesw-resize" | Moving: Something can be moved diagonally, north-east to south-west |
137+// | ![](nwse_resize_cursor.png) | "nwse-resize" | Moving: something can be moved diagonally, north-west to south-east |
138+// | ![](all_resize_cursor.png) | "all-resize" | Moving: Something can be moved in any direction |
139+// | ![](all_scroll_cursor.png) | "all-scroll" | Can scroll in any direction |
140+// | ![](zoom_in_cursor.png) | "zoom-in" | Zoom in |
141+// | ![](zoom_out_cursor.png) | "zoom-out" | Zoom out |
79 func NewCursorFromName(NameVar string, FallbackVar *Cursor) *Cursor {142 func NewCursorFromName(NameVar string, FallbackVar *Cursor) *Cursor {
80 var cls *Cursor143 var cls *Cursor
81 144
@@ -209,6 +272,7 @@ func init() {
209 272
210 core.PuregoSafeRegister(&xCursorGLibType, lib, "gdk_cursor_get_type")273 core.PuregoSafeRegister(&xCursorGLibType, lib, "gdk_cursor_get_type")
211 274
275+ core.PuregoSafeRegister(&xNewCursorFromCallback, lib, "gdk_cursor_new_from_callback")
212 core.PuregoSafeRegister(&xNewCursorFromName, lib, "gdk_cursor_new_from_name")276 core.PuregoSafeRegister(&xNewCursorFromName, lib, "gdk_cursor_new_from_name")
213 core.PuregoSafeRegister(&xNewCursorFromTexture, lib, "gdk_cursor_new_from_texture")277 core.PuregoSafeRegister(&xNewCursorFromTexture, lib, "gdk_cursor_new_from_texture")
214 278
M v4/gdk/gdkdevice.go +29 -3
@@ -13,7 +13,7 @@ import (
13 "github.com/jwijenbergh/puregotk/v4/pango"13 "github.com/jwijenbergh/puregotk/v4/pango"
14 )14 )
15 15
16-// A `GdkTimeCoord` stores a single event in a motion history.16+// Stores a single event in a motion history.
17 //17 //
18 // To check whether an axis is present, check whether the corresponding18 // To check whether an axis is present, check whether the corresponding
19 // flag from the [flags@Gdk.AxisFlags] enumeration is set in the @flags19 // flag from the [flags@Gdk.AxisFlags] enumeration is set in the @flags
@@ -64,8 +64,7 @@ const (
64 SourceTabletPadValue InputSource = 664 SourceTabletPadValue InputSource = 6
65 )65 )
66 66
67-// The `GdkDevice` object represents an input device, such67+// Represents an input device, such as a keyboard, mouse or touchpad.
68-// as a keyboard, a mouse, or a touchpad.
69 //68 //
70 // See the [class@Gdk.Seat] documentation for more information69 // See the [class@Gdk.Seat] documentation for more information
71 // about the various kinds of devices, and their relationships.70 // about the various kinds of devices, and their relationships.
@@ -85,6 +84,20 @@ func DeviceNewFromInternalPtr(ptr uintptr) *Device {
85 return cls84 return cls
86 }85 }
87 86
87+var xDeviceGetActiveLayoutIndex func(uintptr) int
88+
89+// Retrieves the index of the active layout of the keyboard.
90+//
91+// If there is no valid active layout for the `GdkDevice`, this function will
92+// return -1;
93+//
94+// This is only relevant for keyboard devices.
95+func (x *Device) GetActiveLayoutIndex() int {
96+
97+ cret := xDeviceGetActiveLayoutIndex(x.GoPointer())
98+ return cret
99+}
100+
88 var xDeviceGetCapsLockState func(uintptr) bool101 var xDeviceGetCapsLockState func(uintptr) bool
89 102
90 // Retrieves whether the Caps Lock modifier of the keyboard is locked.103 // Retrieves whether the Caps Lock modifier of the keyboard is locked.
@@ -156,6 +169,17 @@ func (x *Device) GetHasCursor() bool {
156 return cret169 return cret
157 }170 }
158 171
172+var xDeviceGetLayoutNames func(uintptr) []string
173+
174+// Retrieves the names of the layouts of the keyboard.
175+//
176+// This is only relevant for keyboard devices.
177+func (x *Device) GetLayoutNames() []string {
178+
179+ cret := xDeviceGetLayoutNames(x.GoPointer())
180+ return cret
181+}
182+
159 var xDeviceGetModifierState func(uintptr) ModifierType183 var xDeviceGetModifierState func(uintptr) ModifierType
160 184
161 // Retrieves the current modifier state of the keyboard.185 // Retrieves the current modifier state of the keyboard.
@@ -398,11 +422,13 @@ func init() {
398 422
399 core.PuregoSafeRegister(&xDeviceGLibType, lib, "gdk_device_get_type")423 core.PuregoSafeRegister(&xDeviceGLibType, lib, "gdk_device_get_type")
400 424
425+ core.PuregoSafeRegister(&xDeviceGetActiveLayoutIndex, lib, "gdk_device_get_active_layout_index")
401 core.PuregoSafeRegister(&xDeviceGetCapsLockState, lib, "gdk_device_get_caps_lock_state")426 core.PuregoSafeRegister(&xDeviceGetCapsLockState, lib, "gdk_device_get_caps_lock_state")
402 core.PuregoSafeRegister(&xDeviceGetDeviceTool, lib, "gdk_device_get_device_tool")427 core.PuregoSafeRegister(&xDeviceGetDeviceTool, lib, "gdk_device_get_device_tool")
403 core.PuregoSafeRegister(&xDeviceGetDirection, lib, "gdk_device_get_direction")428 core.PuregoSafeRegister(&xDeviceGetDirection, lib, "gdk_device_get_direction")
404 core.PuregoSafeRegister(&xDeviceGetDisplay, lib, "gdk_device_get_display")429 core.PuregoSafeRegister(&xDeviceGetDisplay, lib, "gdk_device_get_display")
405 core.PuregoSafeRegister(&xDeviceGetHasCursor, lib, "gdk_device_get_has_cursor")430 core.PuregoSafeRegister(&xDeviceGetHasCursor, lib, "gdk_device_get_has_cursor")
431+ core.PuregoSafeRegister(&xDeviceGetLayoutNames, lib, "gdk_device_get_layout_names")
406 core.PuregoSafeRegister(&xDeviceGetModifierState, lib, "gdk_device_get_modifier_state")432 core.PuregoSafeRegister(&xDeviceGetModifierState, lib, "gdk_device_get_modifier_state")
407 core.PuregoSafeRegister(&xDeviceGetName, lib, "gdk_device_get_name")433 core.PuregoSafeRegister(&xDeviceGetName, lib, "gdk_device_get_name")
408 core.PuregoSafeRegister(&xDeviceGetNumLockState, lib, "gdk_device_get_num_lock_state")434 core.PuregoSafeRegister(&xDeviceGetNumLockState, lib, "gdk_device_get_num_lock_state")
M v4/gdk/gdkdevicepad.go +1 -2
@@ -18,8 +18,7 @@ func (x *DevicePadInterface) GoPointer() uintptr {
18 return uintptr(unsafe.Pointer(x))18 return uintptr(unsafe.Pointer(x))
19 }19 }
20 20
21-// `GdkDevicePad` is an interface implemented by devices of type21+// An interface for tablet pad devices.
22-// %GDK_SOURCE_TABLET_PAD
23 //22 //
24 // It allows querying the features provided by the pad device.23 // It allows querying the features provided by the pad device.
25 //24 //
M v4/gdk/gdkdevicetool.go +2 -2
@@ -68,7 +68,7 @@ var xDeviceToolGetHardwareId func(uintptr) uint64
68 68
69 // Gets the hardware ID of this tool, or 0 if it's not known.69 // Gets the hardware ID of this tool, or 0 if it's not known.
70 //70 //
71-// When non-zero, the identificator is unique for the given tool model,71+// When non-zero, the identifier is unique for the given tool model,
72 // meaning that two identical tools will share the same @hardware_id,72 // meaning that two identical tools will share the same @hardware_id,
73 // but will have different serial numbers (see73 // but will have different serial numbers (see
74 // [method@Gdk.DeviceTool.get_serial]).74 // [method@Gdk.DeviceTool.get_serial]).
@@ -76,7 +76,7 @@ var xDeviceToolGetHardwareId func(uintptr) uint64
76 // This is a more concrete (and device specific) method to identify76 // This is a more concrete (and device specific) method to identify
77 // a `GdkDeviceTool` than [method@Gdk.DeviceTool.get_tool_type],77 // a `GdkDeviceTool` than [method@Gdk.DeviceTool.get_tool_type],
78 // as a tablet may support multiple devices with the same78 // as a tablet may support multiple devices with the same
79-// `GdkDeviceToolType`, but different hardware identificators.79+// `GdkDeviceToolType`, but different hardware identifiers.
80 func (x *DeviceTool) GetHardwareId() uint64 {80 func (x *DeviceTool) GetHardwareId() uint64 {
81 81
82 cret := xDeviceToolGetHardwareId(x.GoPointer())82 cret := xDeviceToolGetHardwareId(x.GoPointer())
M v4/gdk/gdkdisplay.go +35 -11
@@ -12,7 +12,7 @@ import (
12 "github.com/jwijenbergh/puregotk/v4/gobject/types"12 "github.com/jwijenbergh/puregotk/v4/gobject/types"
13 )13 )
14 14
15-// `GdkDisplay` objects are the GDK representation of a workstation.15+// A representation of a workstation.
16 //16 //
17 // Their purpose are two-fold:17 // Their purpose are two-fold:
18 //18 //
@@ -172,13 +172,27 @@ func (x *Display) GetDefaultSeat() *Seat {
172 return cls172 return cls
173 }173 }
174 174
175+var xDisplayGetDmabufFormats func(uintptr) *DmabufFormats
176+
177+// Returns the dma-buf formats that are supported on this display.
178+//
179+// GTK may use OpenGL or Vulkan to support some formats.
180+// Calling this function will then initialize them if they aren't yet.
181+//
182+// The formats returned by this function can be used for negotiating
183+// buffer formats with producers such as v4l, pipewire or GStreamer.
184+//
185+// To learn more about dma-bufs, see [class@Gdk.DmabufTextureBuilder].
186+func (x *Display) GetDmabufFormats() *DmabufFormats {
187+
188+ cret := xDisplayGetDmabufFormats(x.GoPointer())
189+ return cret
190+}
191+
175 var xDisplayGetMonitorAtSurface func(uintptr, uintptr) uintptr192 var xDisplayGetMonitorAtSurface func(uintptr, uintptr) uintptr
176 193
177 // Gets the monitor in which the largest area of @surface194 // Gets the monitor in which the largest area of @surface
178 // resides.195 // resides.
179-//
180-// Returns a monitor close to @surface if it is outside
181-// of all monitors.
182 func (x *Display) GetMonitorAtSurface(SurfaceVar *Surface) *Monitor {196 func (x *Display) GetMonitorAtSurface(SurfaceVar *Surface) *Monitor {
183 var cls *Monitor197 var cls *Monitor
184 198
@@ -365,9 +379,9 @@ var xDisplayNotifyStartupComplete func(uintptr, string)
365 // Indicates to the GUI environment that the application has379 // Indicates to the GUI environment that the application has
366 // finished loading, using a given identifier.380 // finished loading, using a given identifier.
367 //381 //
368-// GTK will call this function automatically for [class@Gtk.Window]382+// GTK will call this function automatically for [GtkWindow](../gtk4/class.Window.html)
369 // with custom startup-notification identifier unless383 // with custom startup-notification identifier unless
370-// [method@Gtk.Window.set_auto_startup_notification]384+// [gtk_window_set_auto_startup_notification()](../gtk4/method.Window.set_auto_startup_notification.html)
371 // is called to disable that feature.385 // is called to disable that feature.
372 func (x *Display) NotifyStartupComplete(StartupIdVar string) {386 func (x *Display) NotifyStartupComplete(StartupIdVar string) {
373 387
@@ -404,11 +418,7 @@ func (x *Display) PrepareGl() (bool, error) {
404 418
405 var xDisplayPutEvent func(uintptr, uintptr)419 var xDisplayPutEvent func(uintptr, uintptr)
406 420
407-// Appends the given event onto the front of the event421+// Adds the given event to the event queue for @display.
408-// queue for @display.
409-//
410-// This function is only useful in very special situations
411-// and should not be used by applications.
412 func (x *Display) PutEvent(EventVar *Event) {422 func (x *Display) PutEvent(EventVar *Event) {
413 423
414 xDisplayPutEvent(x.GoPointer(), EventVar.GoPointer())424 xDisplayPutEvent(x.GoPointer(), EventVar.GoPointer())
@@ -429,6 +439,18 @@ func (x *Display) SupportsInputShapes() bool {
429 return cret439 return cret
430 }440 }
431 441
442+var xDisplaySupportsShadowWidth func(uintptr) bool
443+
444+// Returns whether it's possible for a surface to draw outside of the window area.
445+//
446+// If %TRUE is returned the application decides if it wants to draw shadows.
447+// If %FALSE is returned, the compositor decides if it wants to draw shadows.
448+func (x *Display) SupportsShadowWidth() bool {
449+
450+ cret := xDisplaySupportsShadowWidth(x.GoPointer())
451+ return cret
452+}
453+
432 var xDisplaySync func(uintptr)454 var xDisplaySync func(uintptr)
433 455
434 // Flushes any requests queued for the windowing system and waits until all456 // Flushes any requests queued for the windowing system and waits until all
@@ -643,6 +665,7 @@ func init() {
643 core.PuregoSafeRegister(&xDisplayGetAppLaunchContext, lib, "gdk_display_get_app_launch_context")665 core.PuregoSafeRegister(&xDisplayGetAppLaunchContext, lib, "gdk_display_get_app_launch_context")
644 core.PuregoSafeRegister(&xDisplayGetClipboard, lib, "gdk_display_get_clipboard")666 core.PuregoSafeRegister(&xDisplayGetClipboard, lib, "gdk_display_get_clipboard")
645 core.PuregoSafeRegister(&xDisplayGetDefaultSeat, lib, "gdk_display_get_default_seat")667 core.PuregoSafeRegister(&xDisplayGetDefaultSeat, lib, "gdk_display_get_default_seat")
668+ core.PuregoSafeRegister(&xDisplayGetDmabufFormats, lib, "gdk_display_get_dmabuf_formats")
646 core.PuregoSafeRegister(&xDisplayGetMonitorAtSurface, lib, "gdk_display_get_monitor_at_surface")669 core.PuregoSafeRegister(&xDisplayGetMonitorAtSurface, lib, "gdk_display_get_monitor_at_surface")
647 core.PuregoSafeRegister(&xDisplayGetMonitors, lib, "gdk_display_get_monitors")670 core.PuregoSafeRegister(&xDisplayGetMonitors, lib, "gdk_display_get_monitors")
648 core.PuregoSafeRegister(&xDisplayGetName, lib, "gdk_display_get_name")671 core.PuregoSafeRegister(&xDisplayGetName, lib, "gdk_display_get_name")
@@ -659,6 +682,7 @@ func init() {
659 core.PuregoSafeRegister(&xDisplayPrepareGl, lib, "gdk_display_prepare_gl")682 core.PuregoSafeRegister(&xDisplayPrepareGl, lib, "gdk_display_prepare_gl")
660 core.PuregoSafeRegister(&xDisplayPutEvent, lib, "gdk_display_put_event")683 core.PuregoSafeRegister(&xDisplayPutEvent, lib, "gdk_display_put_event")
661 core.PuregoSafeRegister(&xDisplaySupportsInputShapes, lib, "gdk_display_supports_input_shapes")684 core.PuregoSafeRegister(&xDisplaySupportsInputShapes, lib, "gdk_display_supports_input_shapes")
685+ core.PuregoSafeRegister(&xDisplaySupportsShadowWidth, lib, "gdk_display_supports_shadow_width")
662 core.PuregoSafeRegister(&xDisplaySync, lib, "gdk_display_sync")686 core.PuregoSafeRegister(&xDisplaySync, lib, "gdk_display_sync")
663 core.PuregoSafeRegister(&xDisplayTranslateKey, lib, "gdk_display_translate_key")687 core.PuregoSafeRegister(&xDisplayTranslateKey, lib, "gdk_display_translate_key")
664 688
M v4/gdk/gdkdisplaymanager.go +4 -3
@@ -52,8 +52,9 @@ func SetAllowedBackends(BackendsVar string) {
52 52
53 }53 }
54 54
55-// A singleton object that offers notification when displays appear or55+// Offers notification when displays appear or disappear.
56-// disappear.56+//
57+// `GdkDisplayManager` is a singleton object.
57 //58 //
58 // You can use [func@Gdk.DisplayManager.get] to obtain the `GdkDisplayManager`59 // You can use [func@Gdk.DisplayManager.get] to obtain the `GdkDisplayManager`
59 // singleton, but that should be rarely necessary. Typically, initializing60 // singleton, but that should be rarely necessary. Typically, initializing
@@ -209,7 +210,7 @@ var xDisplayManagerGet func() uintptr
209 // with multiple backends).210 // with multiple backends).
210 //211 //
211 // Applications can use [func@set_allowed_backends] to limit what212 // Applications can use [func@set_allowed_backends] to limit what
212-// backends wil be used.213+// backends will be used.
213 func DisplayManagerGet() *DisplayManager {214 func DisplayManagerGet() *DisplayManager {
214 var cls *DisplayManager215 var cls *DisplayManager
215 216
A v4/gdk/gdkdmabuftexture.go +316 -0
@@ -0,0 +1,316 @@
1+// Package gdk was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT
2+package gdk
3+
4+import (
5+ "structs"
6+ "unsafe"
7+
8+ "github.com/jwijenbergh/purego"
9+ "github.com/jwijenbergh/puregotk/pkg/core"
10+ "github.com/jwijenbergh/puregotk/v4/gio"
11+ "github.com/jwijenbergh/puregotk/v4/glib"
12+ "github.com/jwijenbergh/puregotk/v4/gobject/types"
13+)
14+
15+type DmabufTextureClass struct {
16+ _ structs.HostLayout
17+}
18+
19+func (x *DmabufTextureClass) GoPointer() uintptr {
20+ return uintptr(unsafe.Pointer(x))
21+}
22+
23+var xDmabufErrorQuark func() glib.Quark
24+
25+// Registers an error quark for [class@Gdk.DmabufTexture] errors.
26+func DmabufErrorQuark() glib.Quark {
27+
28+ cret := xDmabufErrorQuark()
29+ return cret
30+}
31+
32+// A `GdkTexture` representing a DMA buffer.
33+//
34+// To create a `GdkDmabufTexture`, use the auxiliary
35+// [class@Gdk.DmabufTextureBuilder] object.
36+//
37+// Dma-buf textures can only be created on Linux.
38+type DmabufTexture struct {
39+ Texture
40+}
41+
42+var xDmabufTextureGLibType func() types.GType
43+
44+func DmabufTextureGLibType() types.GType {
45+ return xDmabufTextureGLibType()
46+}
47+
48+func DmabufTextureNewFromInternalPtr(ptr uintptr) *DmabufTexture {
49+ cls := &DmabufTexture{}
50+ cls.Ptr = ptr
51+ return cls
52+}
53+
54+func (c *DmabufTexture) GoPointer() uintptr {
55+ if c == nil {
56+ return 0
57+ }
58+ return c.Ptr
59+}
60+
61+func (c *DmabufTexture) SetGoPointer(ptr uintptr) {
62+ c.Ptr = ptr
63+}
64+
65+// Compute a concrete size for the `GdkPaintable`.
66+//
67+// Applies the sizing algorithm outlined in the
68+// [CSS Image spec](https://drafts.csswg.org/css-images-3/#default-sizing)
69+// to the given @paintable. See that link for more details.
70+//
71+// It is not necessary to call this function when both @specified_width
72+// and @specified_height are known, but it is useful to call this
73+// function in GtkWidget:measure implementations to compute the
74+// other dimension when only one dimension is given.
75+func (x *DmabufTexture) ComputeConcreteSize(SpecifiedWidthVar float64, SpecifiedHeightVar float64, DefaultWidthVar float64, DefaultHeightVar float64, ConcreteWidthVar float64, ConcreteHeightVar float64) {
76+
77+ XGdkPaintableComputeConcreteSize(x.GoPointer(), SpecifiedWidthVar, SpecifiedHeightVar, DefaultWidthVar, DefaultHeightVar, ConcreteWidthVar, ConcreteHeightVar)
78+
79+}
80+
81+// Gets an immutable paintable for the current contents displayed by @paintable.
82+//
83+// This is useful when you want to retain the current state of an animation,
84+// for example to take a screenshot of a running animation.
85+//
86+// If the @paintable is already immutable, it will return itself.
87+func (x *DmabufTexture) GetCurrentImage() *PaintableBase {
88+ var cls *PaintableBase
89+
90+ cret := XGdkPaintableGetCurrentImage(x.GoPointer())
91+
92+ if cret == 0 {
93+ return nil
94+ }
95+ cls = &PaintableBase{}
96+ cls.Ptr = cret
97+ return cls
98+}
99+
100+// Get flags for the paintable.
101+//
102+// This is oftentimes useful for optimizations.
103+//
104+// See [flags@Gdk.PaintableFlags] for the flags and what they mean.
105+func (x *DmabufTexture) GetFlags() PaintableFlags {
106+
107+ cret := XGdkPaintableGetFlags(x.GoPointer())
108+ return cret
109+}
110+
111+// Gets the preferred aspect ratio the @paintable would like to be displayed at.
112+//
113+// The aspect ratio is the width divided by the height, so a value of 0.5
114+// means that the @paintable prefers to be displayed twice as high as it
115+// is wide. Consumers of this interface can use this to preserve aspect
116+// ratio when displaying the paintable.
117+//
118+// This is a purely informational value and does not in any way limit the
119+// values that may be passed to [method@Gdk.Paintable.snapshot].
120+//
121+// Usually when a @paintable returns nonzero values from
122+// [method@Gdk.Paintable.get_intrinsic_width] and
123+// [method@Gdk.Paintable.get_intrinsic_height] the aspect ratio
124+// should conform to those values, though that is not required.
125+//
126+// If the @paintable does not have a preferred aspect ratio,
127+// it returns 0. Negative values are never returned.
128+func (x *DmabufTexture) GetIntrinsicAspectRatio() float64 {
129+
130+ cret := XGdkPaintableGetIntrinsicAspectRatio(x.GoPointer())
131+ return cret
132+}
133+
134+// Gets the preferred height the @paintable would like to be displayed at.
135+//
136+// Consumers of this interface can use this to reserve enough space to draw
137+// the paintable.
138+//
139+// This is a purely informational value and does not in any way limit the
140+// values that may be passed to [method@Gdk.Paintable.snapshot].
141+//
142+// If the @paintable does not have a preferred height, it returns 0.
143+// Negative values are never returned.
144+func (x *DmabufTexture) GetIntrinsicHeight() int {
145+
146+ cret := XGdkPaintableGetIntrinsicHeight(x.GoPointer())
147+ return cret
148+}
149+
150+// Gets the preferred width the @paintable would like to be displayed at.
151+//
152+// Consumers of this interface can use this to reserve enough space to draw
153+// the paintable.
154+//
155+// This is a purely informational value and does not in any way limit the
156+// values that may be passed to [method@Gdk.Paintable.snapshot].
157+//
158+// If the @paintable does not have a preferred width, it returns 0.
159+// Negative values are never returned.
160+func (x *DmabufTexture) GetIntrinsicWidth() int {
161+
162+ cret := XGdkPaintableGetIntrinsicWidth(x.GoPointer())
163+ return cret
164+}
165+
166+// Called by implementations of `GdkPaintable` to invalidate their contents.
167+//
168+// Unless the contents are invalidated, implementations must guarantee that
169+// multiple calls of [method@Gdk.Paintable.snapshot] produce the same output.
170+//
171+// This function will emit the [signal@Gdk.Paintable::invalidate-contents]
172+// signal.
173+//
174+// If a @paintable reports the %GDK_PAINTABLE_STATIC_CONTENTS flag,
175+// it must not call this function.
176+func (x *DmabufTexture) InvalidateContents() {
177+
178+ XGdkPaintableInvalidateContents(x.GoPointer())
179+
180+}
181+
182+// Called by implementations of `GdkPaintable` to invalidate their size.
183+//
184+// As long as the size is not invalidated, @paintable must return the same
185+// values for its intrinsic width, height and aspect ratio.
186+//
187+// This function will emit the [signal@Gdk.Paintable::invalidate-size]
188+// signal.
189+//
190+// If a @paintable reports the %GDK_PAINTABLE_STATIC_SIZE flag,
191+// it must not call this function.
192+func (x *DmabufTexture) InvalidateSize() {
193+
194+ XGdkPaintableInvalidateSize(x.GoPointer())
195+
196+}
197+
198+// Snapshots the given paintable with the given @width and @height.
199+//
200+// The paintable is drawn at the current (0,0) offset of the @snapshot.
201+// If @width and @height are not larger than zero, this function will
202+// do nothing.
203+func (x *DmabufTexture) Snapshot(SnapshotVar *Snapshot, WidthVar float64, HeightVar float64) {
204+
205+ XGdkPaintableSnapshot(x.GoPointer(), SnapshotVar.GoPointer(), WidthVar, HeightVar)
206+
207+}
208+
209+// Checks if two icons are equal.
210+func (x *DmabufTexture) Equal(Icon2Var gio.Icon) bool {
211+
212+ cret := gio.XGIconEqual(x.GoPointer(), Icon2Var.GoPointer())
213+ return cret
214+}
215+
216+// Gets a hash for an icon.
217+func (x *DmabufTexture) Hash() uint {
218+
219+ cret := gio.XGIconHash(x.GoPointer())
220+ return cret
221+}
222+
223+// Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved
224+// back by calling g_icon_deserialize() on the returned value.
225+// As serialization will avoid using raw icon data when possible, it only
226+// makes sense to transfer the #GVariant between processes on the same machine,
227+// (as opposed to over the network), and within the same file system namespace.
228+func (x *DmabufTexture) Serialize() *glib.Variant {
229+
230+ cret := gio.XGIconSerialize(x.GoPointer())
231+ return cret
232+}
233+
234+// Generates a textual representation of @icon that can be used for
235+// serialization such as when passing @icon to a different process or
236+// saving it to persistent storage. Use g_icon_new_for_string() to
237+// get @icon back from the returned string.
238+//
239+// The encoding of the returned string is proprietary to #GIcon except
240+// in the following two cases
241+//
242+// - If @icon is a #GFileIcon, the returned string is a native path
243+// (such as `/path/to/my icon.png`) without escaping
244+// if the #GFile for @icon is a native file. If the file is not
245+// native, the returned string is the result of g_file_get_uri()
246+// (such as `sftp://path/to/my%20icon.png`).
247+//
248+// - If @icon is a #GThemedIcon with exactly one name and no fallbacks,
249+// the encoding is simply the name (such as `network-server`).
250+func (x *DmabufTexture) ToString() string {
251+
252+ cret := gio.XGIconToString(x.GoPointer())
253+ return cret
254+}
255+
256+// Loads a loadable icon. For the asynchronous version of this function,
257+// see g_loadable_icon_load_async().
258+func (x *DmabufTexture) Load(SizeVar int, TypeVar string, CancellableVar *gio.Cancellable) (*gio.InputStream, error) {
259+ var cls *gio.InputStream
260+ var cerr *glib.Error
261+
262+ cret := gio.XGLoadableIconLoad(x.GoPointer(), SizeVar, TypeVar, CancellableVar.GoPointer(), &cerr)
263+
264+ if cret == 0 {
265+ return nil, cerr
266+ }
267+ cls = &gio.InputStream{}
268+ cls.Ptr = cret
269+ if cerr == nil {
270+ return cls, nil
271+ }
272+ return cls, cerr
273+
274+}
275+
276+// Loads an icon asynchronously. To finish this function, see
277+// g_loadable_icon_load_finish(). For the synchronous, blocking
278+// version of this function, see g_loadable_icon_load().
279+func (x *DmabufTexture) LoadAsync(SizeVar int, CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) {
280+
281+ gio.XGLoadableIconLoadAsync(x.GoPointer(), SizeVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
282+
283+}
284+
285+// Finishes an asynchronous icon load started in g_loadable_icon_load_async().
286+func (x *DmabufTexture) LoadFinish(ResVar gio.AsyncResult, TypeVar string) (*gio.InputStream, error) {
287+ var cls *gio.InputStream
288+ var cerr *glib.Error
289+
290+ cret := gio.XGLoadableIconLoadFinish(x.GoPointer(), ResVar.GoPointer(), TypeVar, &cerr)
291+
292+ if cret == 0 {
293+ return nil, cerr
294+ }
295+ cls = &gio.InputStream{}
296+ cls.Ptr = cret
297+ if cerr == nil {
298+ return cls, nil
299+ }
300+ return cls, cerr
301+
302+}
303+
304+func init() {
305+ core.SetPackageName("GDK", "gtk4")
306+ core.SetSharedLibrary("GDK", "libgtk-4.so.1")
307+ lib, err := purego.Dlopen(core.GetPath("GDK"), purego.RTLD_NOW|purego.RTLD_GLOBAL)
308+ if err != nil {
309+ panic(err)
310+ }
311+
312+ core.PuregoSafeRegister(&xDmabufErrorQuark, lib, "gdk_dmabuf_error_quark")
313+
314+ core.PuregoSafeRegister(&xDmabufTextureGLibType, lib, "gdk_dmabuf_texture_get_type")
315+
316+}
A v4/gdk/gdkdmabuftexturebuilder.go +488 -0
@@ -0,0 +1,488 @@
1+// Package gdk was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT
2+package gdk
3+
4+import (
5+ "structs"
6+ "unsafe"
7+
8+ "github.com/jwijenbergh/purego"
9+ "github.com/jwijenbergh/puregotk/pkg/core"
10+ "github.com/jwijenbergh/puregotk/v4/cairo"
11+ "github.com/jwijenbergh/puregotk/v4/glib"
12+ "github.com/jwijenbergh/puregotk/v4/gobject"
13+ "github.com/jwijenbergh/puregotk/v4/gobject/types"
14+)
15+
16+type DmabufTextureBuilderClass struct {
17+ _ structs.HostLayout
18+}
19+
20+func (x *DmabufTextureBuilderClass) GoPointer() uintptr {
21+ return uintptr(unsafe.Pointer(x))
22+}
23+
24+// Constructs [class@Gdk.Texture] objects from DMA buffers.
25+//
26+// DMA buffers are commonly called **_dma-bufs_**.
27+//
28+// DMA buffers are a feature of the Linux kernel to enable efficient buffer and
29+// memory sharing between hardware such as codecs, GPUs, displays, cameras and the
30+// kernel drivers controlling them. For example, a decoder may want its output to
31+// be directly shared with the display server for rendering without a copy.
32+//
33+// Any device driver which participates in DMA buffer sharing, can do so as either
34+// the exporter or importer of buffers (or both).
35+//
36+// The memory that is shared via DMA buffers is usually stored in non-system memory
37+// (maybe in device's local memory or something else not directly accessible by the
38+// CPU), and accessing this memory from the CPU may have higher-than-usual overhead.
39+//
40+// In particular for graphics data, it is not uncommon that data consists of multiple
41+// separate blocks of memory, for example one block for each of the red, green and
42+// blue channels. These blocks are called **_planes_**. DMA buffers can have up to
43+// four planes. Even if the memory is a single block, the data can be organized in
44+// multiple planes, by specifying offsets from the beginning of the data.
45+//
46+// DMA buffers are exposed to user-space as file descriptors allowing to pass them
47+// between processes. If a DMA buffer has multiple planes, there is one file
48+// descriptor per plane.
49+//
50+// The format of the data (for graphics data, essentially its colorspace) is described
51+// by a 32-bit integer. These format identifiers are defined in the header file `drm_fourcc.h`
52+// and commonly referred to as **_fourcc_** values, since they are identified by 4 ASCII
53+// characters. Additionally, each DMA buffer has a **_modifier_**, which is a 64-bit integer
54+// that describes driver-specific details of the memory layout, such as tiling or compression.
55+//
56+// For historical reasons, some producers of dma-bufs don't provide an explicit modifier, but
57+// instead return `DMA_FORMAT_MOD_INVALID` to indicate that their modifier is **_implicit_**.
58+// GTK tries to accommodate this situation by accepting `DMA_FORMAT_MOD_INVALID` as modifier.
59+//
60+// The operation of `GdkDmabufTextureBuilder` is quite simple: Create a texture builder,
61+// set all the necessary properties, and then call [method@Gdk.DmabufTextureBuilder.build]
62+// to create the new texture.
63+//
64+// The required properties for a dma-buf texture are
65+//
66+// - The width and height in pixels
67+//
68+// - The `fourcc` code and `modifier` which identify the format and memory layout of the dma-buf
69+//
70+// - The file descriptor, offset and stride for each of the planes
71+//
72+// `GdkDmabufTextureBuilder` can be used for quick one-shot construction of
73+// textures as well as kept around and reused to construct multiple textures.
74+//
75+// # For further information, see
76+//
77+// * The Linux kernel [documentation](https://docs.kernel.org/driver-api/dma-buf.html)
78+//
79+// * The header file [drm_fourcc.h](https://gitlab.freedesktop.org/mesa/drm/-/blob/main/include/drm/drm_fourcc.h)
80+type DmabufTextureBuilder struct {
81+ gobject.Object
82+}
83+
84+var xDmabufTextureBuilderGLibType func() types.GType
85+
86+func DmabufTextureBuilderGLibType() types.GType {
87+ return xDmabufTextureBuilderGLibType()
88+}
89+
90+func DmabufTextureBuilderNewFromInternalPtr(ptr uintptr) *DmabufTextureBuilder {
91+ cls := &DmabufTextureBuilder{}
92+ cls.Ptr = ptr
93+ return cls
94+}
95+
96+var xNewDmabufTextureBuilder func() uintptr
97+
98+// Creates a new texture builder.
99+func NewDmabufTextureBuilder() *DmabufTextureBuilder {
100+ var cls *DmabufTextureBuilder
101+
102+ cret := xNewDmabufTextureBuilder()
103+
104+ if cret == 0 {
105+ return nil
106+ }
107+ cls = &DmabufTextureBuilder{}
108+ cls.Ptr = cret
109+ return cls
110+}
111+
112+var xDmabufTextureBuilderBuild func(uintptr, uintptr, uintptr, **glib.Error) uintptr
113+
114+// Builds a new `GdkTexture` with the values set up in the builder.
115+//
116+// It is a programming error to call this function if any mandatory property has not been set.
117+//
118+// Not all formats defined in the `drm_fourcc.h` header are supported. You can use
119+// [method@Gdk.Display.get_dmabuf_formats] to get a list of supported formats. If the
120+// format is not supported by GTK, %NULL will be returned and @error will be set.
121+//
122+// The `destroy` function gets called when the returned texture gets released.
123+//
124+// It is the responsibility of the caller to keep the file descriptors for the planes
125+// open until the created texture is no longer used, and close them afterwards (possibly
126+// using the @destroy notify).
127+//
128+// It is possible to call this function multiple times to create multiple textures,
129+// possibly with changing properties in between.
130+func (x *DmabufTextureBuilder) Build(DestroyVar *glib.DestroyNotify, DataVar uintptr) (*Texture, error) {
131+ var cls *Texture
132+ var cerr *glib.Error
133+
134+ cret := xDmabufTextureBuilderBuild(x.GoPointer(), glib.NewCallbackNullable(DestroyVar), DataVar, &cerr)
135+
136+ if cret == 0 {
137+ return nil, cerr
138+ }
139+ cls = &Texture{}
140+ cls.Ptr = cret
141+ if cerr == nil {
142+ return cls, nil
143+ }
144+ return cls, cerr
145+
146+}
147+
148+var xDmabufTextureBuilderGetColorState func(uintptr) *ColorState
149+
150+// Gets the color state previously set via gdk_dmabuf_texture_builder_set_color_state().
151+func (x *DmabufTextureBuilder) GetColorState() *ColorState {
152+
153+ cret := xDmabufTextureBuilderGetColorState(x.GoPointer())
154+ return cret
155+}
156+
157+var xDmabufTextureBuilderGetDisplay func(uintptr) uintptr
158+
159+// Returns the display that this texture builder is
160+// associated with.
161+func (x *DmabufTextureBuilder) GetDisplay() *Display {
162+ var cls *Display
163+
164+ cret := xDmabufTextureBuilderGetDisplay(x.GoPointer())
165+
166+ if cret == 0 {
167+ return nil
168+ }
169+ gobject.IncreaseRef(cret)
170+ cls = &Display{}
171+ cls.Ptr = cret
172+ return cls
173+}
174+
175+var xDmabufTextureBuilderGetFd func(uintptr, uint) int
176+
177+// Gets the file descriptor for a plane.
178+func (x *DmabufTextureBuilder) GetFd(PlaneVar uint) int {
179+
180+ cret := xDmabufTextureBuilderGetFd(x.GoPointer(), PlaneVar)
181+ return cret
182+}
183+
184+var xDmabufTextureBuilderGetFourcc func(uintptr) uint32
185+
186+// Gets the format previously set via gdk_dmabuf_texture_builder_set_fourcc()
187+// or 0 if the format wasn't set.
188+//
189+// The format is specified as a fourcc code.
190+func (x *DmabufTextureBuilder) GetFourcc() uint32 {
191+
192+ cret := xDmabufTextureBuilderGetFourcc(x.GoPointer())
193+ return cret
194+}
195+
196+var xDmabufTextureBuilderGetHeight func(uintptr) uint
197+
198+// Gets the height previously set via gdk_dmabuf_texture_builder_set_height() or
199+// 0 if the height wasn't set.
200+func (x *DmabufTextureBuilder) GetHeight() uint {
201+
202+ cret := xDmabufTextureBuilderGetHeight(x.GoPointer())
203+ return cret
204+}
205+
206+var xDmabufTextureBuilderGetModifier func(uintptr) uint64
207+
208+// Gets the modifier value.
209+func (x *DmabufTextureBuilder) GetModifier() uint64 {
210+
211+ cret := xDmabufTextureBuilderGetModifier(x.GoPointer())
212+ return cret
213+}
214+
215+var xDmabufTextureBuilderGetNPlanes func(uintptr) uint
216+
217+// Gets the number of planes.
218+func (x *DmabufTextureBuilder) GetNPlanes() uint {
219+
220+ cret := xDmabufTextureBuilderGetNPlanes(x.GoPointer())
221+ return cret
222+}
223+
224+var xDmabufTextureBuilderGetOffset func(uintptr, uint) uint
225+
226+// Gets the offset value for a plane.
227+func (x *DmabufTextureBuilder) GetOffset(PlaneVar uint) uint {
228+
229+ cret := xDmabufTextureBuilderGetOffset(x.GoPointer(), PlaneVar)
230+ return cret
231+}
232+
233+var xDmabufTextureBuilderGetPremultiplied func(uintptr) bool
234+
235+// Whether the data is premultiplied.
236+func (x *DmabufTextureBuilder) GetPremultiplied() bool {
237+
238+ cret := xDmabufTextureBuilderGetPremultiplied(x.GoPointer())
239+ return cret
240+}
241+
242+var xDmabufTextureBuilderGetStride func(uintptr, uint) uint
243+
244+// Gets the stride value for a plane.
245+func (x *DmabufTextureBuilder) GetStride(PlaneVar uint) uint {
246+
247+ cret := xDmabufTextureBuilderGetStride(x.GoPointer(), PlaneVar)
248+ return cret
249+}
250+
251+var xDmabufTextureBuilderGetUpdateRegion func(uintptr) *cairo.Region
252+
253+// Gets the region previously set via gdk_dmabuf_texture_builder_set_update_region() or
254+// %NULL if none was set.
255+func (x *DmabufTextureBuilder) GetUpdateRegion() *cairo.Region {
256+
257+ cret := xDmabufTextureBuilderGetUpdateRegion(x.GoPointer())
258+ return cret
259+}
260+
261+var xDmabufTextureBuilderGetUpdateTexture func(uintptr) uintptr
262+
263+// Gets the texture previously set via gdk_dmabuf_texture_builder_set_update_texture() or
264+// %NULL if none was set.
265+func (x *DmabufTextureBuilder) GetUpdateTexture() *Texture {
266+ var cls *Texture
267+
268+ cret := xDmabufTextureBuilderGetUpdateTexture(x.GoPointer())
269+
270+ if cret == 0 {
271+ return nil
272+ }
273+ gobject.IncreaseRef(cret)
274+ cls = &Texture{}
275+ cls.Ptr = cret
276+ return cls
277+}
278+
279+var xDmabufTextureBuilderGetWidth func(uintptr) uint
280+
281+// Gets the width previously set via gdk_dmabuf_texture_builder_set_width() or
282+// 0 if the width wasn't set.
283+func (x *DmabufTextureBuilder) GetWidth() uint {
284+
285+ cret := xDmabufTextureBuilderGetWidth(x.GoPointer())
286+ return cret
287+}
288+
289+var xDmabufTextureBuilderSetColorState func(uintptr, *ColorState)
290+
291+// Sets the color state for the texture.
292+//
293+// By default, the colorstate is `NULL`. In that case, GTK will choose the
294+// correct colorstate based on the format.
295+// If you don't know what colorstates are, this is probably the right thing.
296+func (x *DmabufTextureBuilder) SetColorState(ColorStateVar *ColorState) {
297+
298+ xDmabufTextureBuilderSetColorState(x.GoPointer(), ColorStateVar)
299+
300+}
301+
302+var xDmabufTextureBuilderSetDisplay func(uintptr, uintptr)
303+
304+// Sets the display that this texture builder is
305+// associated with.
306+//
307+// The display is used to determine the supported
308+// dma-buf formats.
309+func (x *DmabufTextureBuilder) SetDisplay(DisplayVar *Display) {
310+
311+ xDmabufTextureBuilderSetDisplay(x.GoPointer(), DisplayVar.GoPointer())
312+
313+}
314+
315+var xDmabufTextureBuilderSetFd func(uintptr, uint, int)
316+
317+// Sets the file descriptor for a plane.
318+func (x *DmabufTextureBuilder) SetFd(PlaneVar uint, FdVar int) {
319+
320+ xDmabufTextureBuilderSetFd(x.GoPointer(), PlaneVar, FdVar)
321+
322+}
323+
324+var xDmabufTextureBuilderSetFourcc func(uintptr, uint32)
325+
326+// Sets the format of the texture.
327+//
328+// The format is specified as a fourcc code.
329+//
330+// The format must be set before calling [method@Gdk.DmabufTextureBuilder.build].
331+func (x *DmabufTextureBuilder) SetFourcc(FourccVar uint32) {
332+
333+ xDmabufTextureBuilderSetFourcc(x.GoPointer(), FourccVar)
334+
335+}
336+
337+var xDmabufTextureBuilderSetHeight func(uintptr, uint)
338+
339+// Sets the height of the texture.
340+//
341+// The height must be set before calling [method@Gdk.DmabufTextureBuilder.build].
342+func (x *DmabufTextureBuilder) SetHeight(HeightVar uint) {
343+
344+ xDmabufTextureBuilderSetHeight(x.GoPointer(), HeightVar)
345+
346+}
347+
348+var xDmabufTextureBuilderSetModifier func(uintptr, uint64)
349+
350+// Sets the modifier.
351+func (x *DmabufTextureBuilder) SetModifier(ModifierVar uint64) {
352+
353+ xDmabufTextureBuilderSetModifier(x.GoPointer(), ModifierVar)
354+
355+}
356+
357+var xDmabufTextureBuilderSetNPlanes func(uintptr, uint)
358+
359+// Sets the number of planes of the texture.
360+func (x *DmabufTextureBuilder) SetNPlanes(NPlanesVar uint) {
361+
362+ xDmabufTextureBuilderSetNPlanes(x.GoPointer(), NPlanesVar)
363+
364+}
365+
366+var xDmabufTextureBuilderSetOffset func(uintptr, uint, uint)
367+
368+// Sets the offset for a plane.
369+func (x *DmabufTextureBuilder) SetOffset(PlaneVar uint, OffsetVar uint) {
370+
371+ xDmabufTextureBuilderSetOffset(x.GoPointer(), PlaneVar, OffsetVar)
372+
373+}
374+
375+var xDmabufTextureBuilderSetPremultiplied func(uintptr, bool)
376+
377+// Sets whether the data is premultiplied.
378+//
379+// Unless otherwise specified, all formats including alpha channels are assumed
380+// to be premultiplied.
381+func (x *DmabufTextureBuilder) SetPremultiplied(PremultipliedVar bool) {
382+
383+ xDmabufTextureBuilderSetPremultiplied(x.GoPointer(), PremultipliedVar)
384+
385+}
386+
387+var xDmabufTextureBuilderSetStride func(uintptr, uint, uint)
388+
389+// Sets the stride for a plane.
390+//
391+// The stride must be set for all planes before calling [method@Gdk.DmabufTextureBuilder.build].
392+func (x *DmabufTextureBuilder) SetStride(PlaneVar uint, StrideVar uint) {
393+
394+ xDmabufTextureBuilderSetStride(x.GoPointer(), PlaneVar, StrideVar)
395+
396+}
397+
398+var xDmabufTextureBuilderSetUpdateRegion func(uintptr, *cairo.Region)
399+
400+// Sets the region to be updated by this texture. Together with
401+// [property@Gdk.DmabufTextureBuilder:update-texture] this describes an
402+// update of a previous texture.
403+//
404+// When rendering animations of large textures, it is possible that
405+// consecutive textures are only updating contents in parts of the texture.
406+// It is then possible to describe this update via these two properties,
407+// so that GTK can avoid rerendering parts that did not change.
408+//
409+// An example would be a screen recording where only the mouse pointer moves.
410+func (x *DmabufTextureBuilder) SetUpdateRegion(RegionVar *cairo.Region) {
411+
412+ xDmabufTextureBuilderSetUpdateRegion(x.GoPointer(), RegionVar)
413+
414+}
415+
416+var xDmabufTextureBuilderSetUpdateTexture func(uintptr, uintptr)
417+
418+// Sets the texture to be updated by this texture. See
419+// [method@Gdk.DmabufTextureBuilder.set_update_region] for an explanation.
420+func (x *DmabufTextureBuilder) SetUpdateTexture(TextureVar *Texture) {
421+
422+ xDmabufTextureBuilderSetUpdateTexture(x.GoPointer(), TextureVar.GoPointer())
423+
424+}
425+
426+var xDmabufTextureBuilderSetWidth func(uintptr, uint)
427+
428+// Sets the width of the texture.
429+//
430+// The width must be set before calling [method@Gdk.DmabufTextureBuilder.build].
431+func (x *DmabufTextureBuilder) SetWidth(WidthVar uint) {
432+
433+ xDmabufTextureBuilderSetWidth(x.GoPointer(), WidthVar)
434+
435+}
436+
437+func (c *DmabufTextureBuilder) GoPointer() uintptr {
438+ if c == nil {
439+ return 0
440+ }
441+ return c.Ptr
442+}
443+
444+func (c *DmabufTextureBuilder) SetGoPointer(ptr uintptr) {
445+ c.Ptr = ptr
446+}
447+
448+func init() {
449+ core.SetPackageName("GDK", "gtk4")
450+ core.SetSharedLibrary("GDK", "libgtk-4.so.1")
451+ lib, err := purego.Dlopen(core.GetPath("GDK"), purego.RTLD_NOW|purego.RTLD_GLOBAL)
452+ if err != nil {
453+ panic(err)
454+ }
455+
456+ core.PuregoSafeRegister(&xDmabufTextureBuilderGLibType, lib, "gdk_dmabuf_texture_builder_get_type")
457+
458+ core.PuregoSafeRegister(&xNewDmabufTextureBuilder, lib, "gdk_dmabuf_texture_builder_new")
459+
460+ core.PuregoSafeRegister(&xDmabufTextureBuilderBuild, lib, "gdk_dmabuf_texture_builder_build")
461+ core.PuregoSafeRegister(&xDmabufTextureBuilderGetColorState, lib, "gdk_dmabuf_texture_builder_get_color_state")
462+ core.PuregoSafeRegister(&xDmabufTextureBuilderGetDisplay, lib, "gdk_dmabuf_texture_builder_get_display")
463+ core.PuregoSafeRegister(&xDmabufTextureBuilderGetFd, lib, "gdk_dmabuf_texture_builder_get_fd")
464+ core.PuregoSafeRegister(&xDmabufTextureBuilderGetFourcc, lib, "gdk_dmabuf_texture_builder_get_fourcc")
465+ core.PuregoSafeRegister(&xDmabufTextureBuilderGetHeight, lib, "gdk_dmabuf_texture_builder_get_height")
466+ core.PuregoSafeRegister(&xDmabufTextureBuilderGetModifier, lib, "gdk_dmabuf_texture_builder_get_modifier")
467+ core.PuregoSafeRegister(&xDmabufTextureBuilderGetNPlanes, lib, "gdk_dmabuf_texture_builder_get_n_planes")
468+ core.PuregoSafeRegister(&xDmabufTextureBuilderGetOffset, lib, "gdk_dmabuf_texture_builder_get_offset")
469+ core.PuregoSafeRegister(&xDmabufTextureBuilderGetPremultiplied, lib, "gdk_dmabuf_texture_builder_get_premultiplied")
470+ core.PuregoSafeRegister(&xDmabufTextureBuilderGetStride, lib, "gdk_dmabuf_texture_builder_get_stride")
471+ core.PuregoSafeRegister(&xDmabufTextureBuilderGetUpdateRegion, lib, "gdk_dmabuf_texture_builder_get_update_region")
472+ core.PuregoSafeRegister(&xDmabufTextureBuilderGetUpdateTexture, lib, "gdk_dmabuf_texture_builder_get_update_texture")
473+ core.PuregoSafeRegister(&xDmabufTextureBuilderGetWidth, lib, "gdk_dmabuf_texture_builder_get_width")
474+ core.PuregoSafeRegister(&xDmabufTextureBuilderSetColorState, lib, "gdk_dmabuf_texture_builder_set_color_state")
475+ core.PuregoSafeRegister(&xDmabufTextureBuilderSetDisplay, lib, "gdk_dmabuf_texture_builder_set_display")
476+ core.PuregoSafeRegister(&xDmabufTextureBuilderSetFd, lib, "gdk_dmabuf_texture_builder_set_fd")
477+ core.PuregoSafeRegister(&xDmabufTextureBuilderSetFourcc, lib, "gdk_dmabuf_texture_builder_set_fourcc")
478+ core.PuregoSafeRegister(&xDmabufTextureBuilderSetHeight, lib, "gdk_dmabuf_texture_builder_set_height")
479+ core.PuregoSafeRegister(&xDmabufTextureBuilderSetModifier, lib, "gdk_dmabuf_texture_builder_set_modifier")
480+ core.PuregoSafeRegister(&xDmabufTextureBuilderSetNPlanes, lib, "gdk_dmabuf_texture_builder_set_n_planes")
481+ core.PuregoSafeRegister(&xDmabufTextureBuilderSetOffset, lib, "gdk_dmabuf_texture_builder_set_offset")
482+ core.PuregoSafeRegister(&xDmabufTextureBuilderSetPremultiplied, lib, "gdk_dmabuf_texture_builder_set_premultiplied")
483+ core.PuregoSafeRegister(&xDmabufTextureBuilderSetStride, lib, "gdk_dmabuf_texture_builder_set_stride")
484+ core.PuregoSafeRegister(&xDmabufTextureBuilderSetUpdateRegion, lib, "gdk_dmabuf_texture_builder_set_update_region")
485+ core.PuregoSafeRegister(&xDmabufTextureBuilderSetUpdateTexture, lib, "gdk_dmabuf_texture_builder_set_update_texture")
486+ core.PuregoSafeRegister(&xDmabufTextureBuilderSetWidth, lib, "gdk_dmabuf_texture_builder_set_width")
487+
488+}
M v4/gdk/gdkdrag.go +1 -1
@@ -43,7 +43,7 @@ func DragActionIsUnique(ActionVar DragAction) bool {
43 return cret43 return cret
44 }44 }
45 45
46-// The `GdkDrag` object represents the source of an ongoing DND operation.46+// Represents the source of an ongoing DND operation.
47 //47 //
48 // A `GdkDrag` is created when a drag is started, and stays alive for duration of48 // A `GdkDrag` is created when a drag is started, and stays alive for duration of
49 // the DND operation. After a drag has been started with [func@Gdk.Drag.begin],49 // the DND operation. After a drag has been started with [func@Gdk.Drag.begin],
M v4/gdk/gdkdragsurface.go +1 -1
@@ -19,7 +19,7 @@ func (x *DragSurfaceInterface) GoPointer() uintptr {
19 return uintptr(unsafe.Pointer(x))19 return uintptr(unsafe.Pointer(x))
20 }20 }
21 21
22-// A `GdkDragSurface` is an interface for surfaces used during DND.22+// A surface that is used during DND.
23 type DragSurface interface {23 type DragSurface interface {
24 GoPointer() uintptr24 GoPointer() uintptr
25 SetGoPointer(uintptr)25 SetGoPointer(uintptr)
A v4/gdk/gdkdragsurfacesize.go +49 -0
@@ -0,0 +1,49 @@
1+// Package gdk was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT
2+package gdk
3+
4+import (
5+ "structs"
6+ "unsafe"
7+
8+ "github.com/jwijenbergh/purego"
9+ "github.com/jwijenbergh/puregotk/pkg/core"
10+ "github.com/jwijenbergh/puregotk/v4/gobject/types"
11+)
12+
13+// Contains information that is useful to compute the size of a drag surface.
14+type DragSurfaceSize struct {
15+ _ structs.HostLayout
16+}
17+
18+var xDragSurfaceSizeGLibType func() types.GType
19+
20+func DragSurfaceSizeGLibType() types.GType {
21+ return xDragSurfaceSizeGLibType()
22+}
23+
24+func (x *DragSurfaceSize) GoPointer() uintptr {
25+ return uintptr(unsafe.Pointer(x))
26+}
27+
28+var xDragSurfaceSizeSetSize func(uintptr, int, int)
29+
30+// Sets the size the drag surface prefers to be resized to.
31+func (x *DragSurfaceSize) SetSize(WidthVar int, HeightVar int) {
32+
33+ xDragSurfaceSizeSetSize(x.GoPointer(), WidthVar, HeightVar)
34+
35+}
36+
37+func init() {
38+ core.SetPackageName("GDK", "gtk4")
39+ core.SetSharedLibrary("GDK", "libgtk-4.so.1")
40+ lib, err := purego.Dlopen(core.GetPath("GDK"), purego.RTLD_NOW|purego.RTLD_GLOBAL)
41+ if err != nil {
42+ panic(err)
43+ }
44+
45+ core.PuregoSafeRegister(&xDragSurfaceSizeGLibType, lib, "gdk_drag_surface_size_get_type")
46+
47+ core.PuregoSafeRegister(&xDragSurfaceSizeSetSize, lib, "gdk_drag_surface_size_set_size")
48+
49+}
M v4/gdk/gdkdrawcontext.go +2 -2
@@ -58,8 +58,8 @@ var xDrawContextBeginFrame func(uintptr, *cairo.Region)
58 //58 //
59 // When using GTK, the widget system automatically places calls to59 // When using GTK, the widget system automatically places calls to
60 // gdk_draw_context_begin_frame() and gdk_draw_context_end_frame() via the60 // gdk_draw_context_begin_frame() and gdk_draw_context_end_frame() via the
61-// use of [class@Gsk.Renderer]s, so application code does not need to call61+// use of [GskRenderer](../gsk4/class.Renderer.html)s, so application code
62-// these functions explicitly.62+// does not need to call these functions explicitly.
63 func (x *DrawContext) BeginFrame(RegionVar *cairo.Region) {63 func (x *DrawContext) BeginFrame(RegionVar *cairo.Region) {
64 64
65 xDrawContextBeginFrame(x.GoPointer(), RegionVar)65 xDrawContextBeginFrame(x.GoPointer(), RegionVar)
M v4/gdk/gdkdrop.go +1 -5
@@ -10,7 +10,7 @@ import (
10 "github.com/jwijenbergh/puregotk/v4/gobject/types"10 "github.com/jwijenbergh/puregotk/v4/gobject/types"
11 )11 )
12 12
13-// The `GdkDrop` object represents the target of an ongoing DND operation.13+// Represents the target of an ongoing DND operation.
14 //14 //
15 // Possible drop sites get informed about the status of the ongoing drag15 // Possible drop sites get informed about the status of the ongoing drag
16 // operation with events of type %GDK_DRAG_ENTER, %GDK_DRAG_LEAVE,16 // operation with events of type %GDK_DRAG_ENTER, %GDK_DRAG_LEAVE,
@@ -198,10 +198,6 @@ var xDropReadValueAsync func(uintptr, types.GType, int, uintptr, uintptr, uintpt
198 // Asynchronously request the drag operation's contents converted198 // Asynchronously request the drag operation's contents converted
199 // to the given @type.199 // to the given @type.
200 //200 //
201-// When the operation is finished @callback will be called. You must
202-// then call [method@Gdk.Drop.read_value_finish] to get the resulting
203-// `GValue`.
204-//
205 // For local drag-and-drop operations that are available in the given201 // For local drag-and-drop operations that are available in the given
206 // `GType`, the value will be copied directly. Otherwise, GDK will202 // `GType`, the value will be copied directly. Otherwise, GDK will
207 // try to use [func@Gdk.content_deserialize_async] to convert the data.203 // try to use [func@Gdk.content_deserialize_async] to convert the data.
M v4/gdk/gdkenums.go +97 -31
@@ -73,6 +73,23 @@ const (
73 ActionAskValue DragAction = 873 ActionAskValue DragAction = 8
74 )74 )
75 75
76+// The list of the different APIs that GdkGLContext can potentially support.
77+type GLAPI int
78+
79+var xGLAPIGLibType func() types.GType
80+
81+func GLAPIGLibType() types.GType {
82+ return xGLAPIGLibType()
83+}
84+
85+const (
86+
87+ // The OpenGL API
88+ GlApiGlValue GLAPI = 1
89+ // The OpenGL ES API
90+ GlApiGlesValue GLAPI = 2
91+)
92+
76 // Flags to indicate the state of modifier keys and mouse buttons93 // Flags to indicate the state of modifier keys and mouse buttons
77 // in events.94 // in events.
78 //95 //
@@ -80,7 +97,7 @@ const (
80 // Apple, CapsLock or ShiftLock.97 // Apple, CapsLock or ShiftLock.
81 //98 //
82 // Note that GDK may add internal values to events which include values outside99 // Note that GDK may add internal values to events which include values outside
83-// of this enumeration. Your code should preserve and ignore them. You can use100+// of this enumeration. Your code should preserve and ignore them. You can use
84 // %GDK_MODIFIER_MASK to remove all private values.101 // %GDK_MODIFIER_MASK to remove all private values.
85 type ModifierType int102 type ModifierType int
86 103
@@ -92,16 +109,18 @@ func ModifierTypeGLibType() types.GType {
92 109
93 const (110 const (
94 111
112+ // No modifier.
113+ NoModifierMaskValue ModifierType = 0
95 // the Shift key.114 // the Shift key.
96 ShiftMaskValue ModifierType = 1115 ShiftMaskValue ModifierType = 1
97- // a Lock key (depending on the modifier mapping of the116+ // a Lock key (depending on the Windowing System configuration,
98- // X server this may either be CapsLock or ShiftLock).117+ // this may either be <kbd>CapsLock</kbd> or <kbd>ShiftLock</kbd>).
99 LockMaskValue ModifierType = 2118 LockMaskValue ModifierType = 2
100 // the Control key.119 // the Control key.
101 ControlMaskValue ModifierType = 4120 ControlMaskValue ModifierType = 4
102- // the fourth modifier key (it depends on the modifier121+ // the fourth modifier key (it depends on the Windowing System
103- // mapping of the X server which key is interpreted as this modifier, but122+ // configuration which key is interpreted as this modifier, but normally it
104- // normally it is the Alt key).123+ // is the <kbd>Alt</kbd> key).
105 AltMaskValue ModifierType = 8124 AltMaskValue ModifierType = 8
106 // the first mouse button.125 // the first mouse button.
107 Button1MaskValue ModifierType = 256126 Button1MaskValue ModifierType = 256
@@ -113,11 +132,11 @@ const (
113 Button4MaskValue ModifierType = 2048132 Button4MaskValue ModifierType = 2048
114 // the fifth mouse button.133 // the fifth mouse button.
115 Button5MaskValue ModifierType = 4096134 Button5MaskValue ModifierType = 4096
116- // the Super modifier135+ // the Super modifier.
117 SuperMaskValue ModifierType = 67108864136 SuperMaskValue ModifierType = 67108864
118- // the Hyper modifier137+ // the Hyper modifier.
119 HyperMaskValue ModifierType = 134217728138 HyperMaskValue ModifierType = 134217728
120- // the Meta modifier139+ // the Meta modifier. Maps to Command on macOS.
121 MetaMaskValue ModifierType = 268435456140 MetaMaskValue ModifierType = 268435456
122 )141 )
123 142
@@ -164,6 +183,27 @@ const (
164 AxisLastValue AxisUse = 12183 AxisLastValue AxisUse = 12
165 )184 )
166 185
186+// Error enumeration for `GdkDmabufTexture`.
187+type DmabufError int
188+
189+var xDmabufErrorGLibType func() types.GType
190+
191+func DmabufErrorGLibType() types.GType {
192+ return xDmabufErrorGLibType()
193+}
194+
195+const (
196+
197+ // Dmabuf support is not available, because the OS
198+ // is not Linux, or it was explicitly disabled at compile- or runtime
199+ DmabufErrorNotAvailableValue DmabufError = 0
200+ // The requested format is not supported
201+ DmabufErrorUnsupportedFormatValue DmabufError = 1
202+ // GTK failed to create the resource for other
203+ // reasons
204+ DmabufErrorCreationFailedValue DmabufError = 2
205+)
206+
167 // Error enumeration for `GdkGLContext`.207 // Error enumeration for `GdkGLContext`.
168 type GLError int208 type GLError int
169 209
@@ -221,12 +261,12 @@ const (
221 GravityStaticValue Gravity = 10261 GravityStaticValue Gravity = 10
222 )262 )
223 263
224-// `GdkMemoryFormat` describes formats that image data can have in memory.264+// Describes formats that image data can have in memory.
225 //265 //
226 // It describes formats by listing the contents of the memory passed to it.266 // It describes formats by listing the contents of the memory passed to it.
227-// So GDK_MEMORY_A8R8G8B8 will be 1 byte (8 bits) of alpha, followed by a267+// So `GDK_MEMORY_A8R8G8B8` will be 1 byte (8 bits) of alpha, followed by a
228 // byte each of red, green and blue. It is not endian-dependent, so268 // byte each of red, green and blue. It is not endian-dependent, so
229-// CAIRO_FORMAT_ARGB32 is represented by different `GdkMemoryFormats`269+// `CAIRO_FORMAT_ARGB32` is represented by different `GdkMemoryFormats`
230 // on architectures with different endiannesses.270 // on architectures with different endiannesses.
231 //271 //
232 // Its naming is modelled after272 // Its naming is modelled after
@@ -263,37 +303,63 @@ const (
263 MemoryR8g8b8Value MemoryFormat = 7303 MemoryR8g8b8Value MemoryFormat = 7
264 // 3 bytes; for blue, green, red. The data is opaque.304 // 3 bytes; for blue, green, red. The data is opaque.
265 MemoryB8g8r8Value MemoryFormat = 8305 MemoryB8g8r8Value MemoryFormat = 8
266- // 3 guint16 values; for red, green, blue. Since: 4.6306+ // 3 guint16 values; for red, green, blue.
267 MemoryR16g16b16Value MemoryFormat = 9307 MemoryR16g16b16Value MemoryFormat = 9
268- // 4 guint16 values; for red, green,308+ // 4 guint16 values; for red, green, blue, alpha. The color values are
269- // blue, alpha. The color values are premultiplied with the alpha value.309+ // premultiplied with the alpha value.
270- // Since: 4.6
271 MemoryR16g16b16a16PremultipliedValue MemoryFormat = 10310 MemoryR16g16b16a16PremultipliedValue MemoryFormat = 10
272 // 4 guint16 values; for red, green, blue, alpha.311 // 4 guint16 values; for red, green, blue, alpha.
273- // Since: 4.6
274 MemoryR16g16b16a16Value MemoryFormat = 11312 MemoryR16g16b16a16Value MemoryFormat = 11
275- // 3 half-float values; for red, green, blue.313+ // 3 half-float values; for red, green, blue. The data is opaque.
276- // The data is opaque. Since: 4.6
277 MemoryR16g16b16FloatValue MemoryFormat = 12314 MemoryR16g16b16FloatValue MemoryFormat = 12
278- // 4 half-float values; for315+ // 4 half-float values; for red, green, blue and alpha. The color values are
279- // red, green, blue and alpha. The color values are premultiplied with316+ // premultiplied with the alpha value.
280- // the alpha value. Since: 4.6
281 MemoryR16g16b16a16FloatPremultipliedValue MemoryFormat = 13317 MemoryR16g16b16a16FloatPremultipliedValue MemoryFormat = 13
282- // 4 half-float values; for red, green,318+ // 4 half-float values; for red, green, blue and alpha.
283- // blue and alpha. Since: 4.6
284 MemoryR16g16b16a16FloatValue MemoryFormat = 14319 MemoryR16g16b16a16FloatValue MemoryFormat = 14
285-320+ // 3 float values; for red, green, blue.
286 MemoryR32g32b32FloatValue MemoryFormat = 15321 MemoryR32g32b32FloatValue MemoryFormat = 15
287- // 4 float values; for322+ // 4 float values; for red, green, blue and alpha. The color values are
288- // red, green, blue and alpha. The color values are premultiplied with323+ // premultiplied with the alpha value.
289- // the alpha value. Since: 4.6
290 MemoryR32g32b32a32FloatPremultipliedValue MemoryFormat = 16324 MemoryR32g32b32a32FloatPremultipliedValue MemoryFormat = 16
291- // 4 float values; for red, green, blue and325+ // 4 float values; for red, green, blue and alpha.
292- // alpha. Since: 4.6
293 MemoryR32g32b32a32FloatValue MemoryFormat = 17326 MemoryR32g32b32a32FloatValue MemoryFormat = 17
327+ // 2 bytes; for grayscale, alpha. The color values are premultiplied with the
328+ // alpha value.
329+ MemoryG8a8PremultipliedValue MemoryFormat = 18
330+ // 2 bytes; for grayscale, alpha.
331+ MemoryG8a8Value MemoryFormat = 19
332+ // One byte; for grayscale. The data is opaque.
333+ MemoryG8Value MemoryFormat = 20
334+ // 2 guint16 values; for grayscale, alpha. The color values are premultiplied
335+ // with the alpha value.
336+ MemoryG16a16PremultipliedValue MemoryFormat = 21
337+ // 2 guint16 values; for grayscale, alpha.
338+ MemoryG16a16Value MemoryFormat = 22
339+ // One guint16 value; for grayscale. The data is opaque.
340+ MemoryG16Value MemoryFormat = 23
341+ // One byte; for alpha.
342+ MemoryA8Value MemoryFormat = 24
343+ // One guint16 value; for alpha.
344+ MemoryA16Value MemoryFormat = 25
345+ // One half-float value; for alpha.
346+ MemoryA16FloatValue MemoryFormat = 26
347+ // One float value; for alpha.
348+ MemoryA32FloatValue MemoryFormat = 27
349+ // 4 bytes; for alpha, blue, green, red, The color values are premultiplied with
350+ // the alpha value.
351+ MemoryA8b8g8r8PremultipliedValue MemoryFormat = 28
352+ // 4 bytes; for blue, green, red, unused.
353+ MemoryB8g8r8x8Value MemoryFormat = 29
354+ // 4 bytes; for unused, red, green, blue.
355+ MemoryX8r8g8b8Value MemoryFormat = 30
356+ // 4 bytes; for red, green, blue, unused.
357+ MemoryR8g8b8x8Value MemoryFormat = 31
358+ // 4 bytes; for unused, blue, green, red.
359+ MemoryX8b8g8r8Value MemoryFormat = 32
294 // The number of formats. This value will change as360 // The number of formats. This value will change as
295 // more formats get added, so do not rely on its concrete integer.361 // more formats get added, so do not rely on its concrete integer.
296- MemoryNFormatsValue MemoryFormat = 18362+ MemoryNFormatsValue MemoryFormat = 33
297 )363 )
298 364
299 // Error enumeration for `GdkVulkanContext`.365 // Error enumeration for `GdkVulkanContext`.
M v4/gdk/gdkevents.go +15 -9
@@ -11,8 +11,7 @@ import (
11 "github.com/jwijenbergh/puregotk/v4/gobject/types"11 "github.com/jwijenbergh/puregotk/v4/gobject/types"
12 )12 )
13 13
14-// `GdkEventSequence` is an opaque type representing a sequence14+// An opaque type representing a sequence of related events.
15-// of related touch events.
16 type EventSequence struct {15 type EventSequence struct {
17 _ structs.HostLayout16 _ structs.HostLayout
18 }17 }
@@ -157,8 +156,8 @@ const (
157 PadStripValue EventType = 26156 PadStripValue EventType = 26
158 // A tablet pad group mode change.157 // A tablet pad group mode change.
159 PadGroupModeValue EventType = 27158 PadGroupModeValue EventType = 27
160- // A touchpad hold gesture event, the current state159+ // A touchpad hold gesture event, the current state is determined by its phase
161- // is determined by its phase field. Since: 4.6160+ // field.
162 TouchpadHoldValue EventType = 28161 TouchpadHoldValue EventType = 28
163 // marks the end of the GdkEventType enumeration.162 // marks the end of the GdkEventType enumeration.
164 EventLastValue EventType = 29163 EventLastValue EventType = 29
@@ -523,12 +522,13 @@ func (c *DeleteEvent) SetGoPointer(ptr uintptr) {
523 c.Ptr = ptr522 c.Ptr = ptr
524 }523 }
525 524
526-// `GdkEvent`s are immutable data structures, created by GDK to525+// Represents windowing system events.
527-// represent windowing system events.
528 //526 //
529 // In GTK applications the events are handled automatically by toplevel527 // In GTK applications the events are handled automatically by toplevel
530 // widgets and passed on to the event controllers of appropriate widgets,528 // widgets and passed on to the event controllers of appropriate widgets,
531 // so using `GdkEvent` and its related API is rarely needed.529 // so using `GdkEvent` and its related API is rarely needed.
530+//
531+// `GdkEvent` structs are immutable.
532 type Event struct {532 type Event struct {
533 Ptr uintptr533 Ptr uintptr
534 }534 }
@@ -672,7 +672,7 @@ func (x *Event) GetDisplay() *Display {
672 672
673 var xEventGetEventSequence func(uintptr) *EventSequence673 var xEventGetEventSequence func(uintptr) *EventSequence
674 674
675-// Retuns the event sequence to which the event belongs.675+// Returns the event sequence to which the event belongs.
676 //676 //
677 // Related touch events are connected in a sequence. Other677 // Related touch events are connected in a sequence. Other
678 // events typically don't have event sequence information.678 // events typically don't have event sequence information.
@@ -731,6 +731,8 @@ func (x *Event) GetPointerEmulated() bool {
731 var xEventGetPosition func(uintptr, float64, float64) bool731 var xEventGetPosition func(uintptr, float64, float64) bool
732 732
733 // Extract the event surface relative x/y coordinates from an event.733 // Extract the event surface relative x/y coordinates from an event.
734+//
735+// This position is in [surface coordinates](coordinates.html).
734 func (x *Event) GetPosition(XVar float64, YVar float64) bool {736 func (x *Event) GetPosition(XVar float64, YVar float64) bool {
735 737
736 cret := xEventGetPosition(x.GoPointer(), XVar, YVar)738 cret := xEventGetPosition(x.GoPointer(), XVar, YVar)
@@ -805,9 +807,13 @@ var xEventTriggersContextMenu func(uintptr) bool
805 // according to platform conventions.807 // according to platform conventions.
806 //808 //
807 // The right mouse button typically triggers context menus.809 // The right mouse button typically triggers context menus.
810+// On macOS, Control+left mouse button also triggers.
811+//
812+// # This function should always be used instead of simply checking for
808 //813 //
809-// This function should always be used instead of simply checking for814+// ```c
810-// event->button == %GDK_BUTTON_SECONDARY.815+// event->button == GDK_BUTTON_SECONDARY
816+// ```
811 func (x *Event) TriggersContextMenu() bool {817 func (x *Event) TriggersContextMenu() bool {
812 818
813 cret := xEventTriggersContextMenu(x.GoPointer())819 cret := xEventTriggersContextMenu(x.GoPointer())
M v4/gdk/gdkframeclock.go +7 -6
@@ -59,8 +59,7 @@ const (
59 FrameClockPhaseAfterPaintValue FrameClockPhase = 6459 FrameClockPhaseAfterPaintValue FrameClockPhase = 64
60 )60 )
61 61
62-// A `GdkFrameClock` tells the application when to update and repaint62+// Tells the application when to update and repaint a surface.
63-// a surface.
64 //63 //
65 // This may be synced to the vertical refresh rate of the monitor, for example.64 // This may be synced to the vertical refresh rate of the monitor, for example.
66 // Even when the frame clock uses a simple timer rather than a hardware-based65 // Even when the frame clock uses a simple timer rather than a hardware-based
@@ -78,7 +77,7 @@ const (
78 // for the synchronization being implemented, the clock will process a frame and77 // for the synchronization being implemented, the clock will process a frame and
79 // emit signals for each phase that has been requested. (See the signals of the78 // emit signals for each phase that has been requested. (See the signals of the
80 // `GdkFrameClock` class for documentation of the phases.79 // `GdkFrameClock` class for documentation of the phases.
81-// %GDK_FRAME_CLOCK_PHASE_UPDATE and the [signal@GdkFrameClock::update] signal80+// %GDK_FRAME_CLOCK_PHASE_UPDATE and the [signal@Gdk.FrameClock::update] signal
82 // are most interesting for application writers, and are used to update the81 // are most interesting for application writers, and are used to update the
83 // animations, using the frame time given by [method@Gdk.FrameClock.get_frame_time].82 // animations, using the frame time given by [method@Gdk.FrameClock.get_frame_time].
84 //83 //
@@ -90,7 +89,7 @@ const (
90 // are called at a “similar” time get the same value. This means that89 // are called at a “similar” time get the same value. This means that
91 // if different animations are timed by looking at the difference in90 // if different animations are timed by looking at the difference in
92 // time between an initial value from [method@Gdk.FrameClock.get_frame_time]91 // time between an initial value from [method@Gdk.FrameClock.get_frame_time]
93-// and the value inside the [signal@GdkFrameClock::update] signal of the clock,92+// and the value inside the [signal@Gdk.FrameClock::update] signal of the clock,
94 // they will stay exactly synchronized.93 // they will stay exactly synchronized.
95 type FrameClock struct {94 type FrameClock struct {
96 gobject.Object95 gobject.Object
@@ -349,7 +348,8 @@ func (x *FrameClock) ConnectLayout(cb *func(FrameClock)) uint32 {
349 //348 //
350 // The frame is repainted. GDK normally handles this internally and349 // The frame is repainted. GDK normally handles this internally and
351 // emits [signal@Gdk.Surface::render] signals which are turned into350 // emits [signal@Gdk.Surface::render] signals which are turned into
352-// [signal@Gtk.Widget::snapshot] signals by GTK.351+// [GtkWidget::snapshot](../gtk4/signal.Widget.snapshot.html) signals
352+// by GTK.
353 func (x *FrameClock) ConnectPaint(cb *func(FrameClock)) uint32 {353 func (x *FrameClock) ConnectPaint(cb *func(FrameClock)) uint32 {
354 cbPtr := uintptr(unsafe.Pointer(cb))354 cbPtr := uintptr(unsafe.Pointer(cb))
355 if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {355 if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
@@ -397,7 +397,8 @@ func (x *FrameClock) ConnectResumeEvents(cb *func(FrameClock)) uint32 {
397 //397 //
398 // Animations should be updated using [method@Gdk.FrameClock.get_frame_time].398 // Animations should be updated using [method@Gdk.FrameClock.get_frame_time].
399 // Applications can connect directly to this signal, or use399 // Applications can connect directly to this signal, or use
400-// [method@Gtk.Widget.add_tick_callback] as a more convenient interface.400+// [gtk_widget_add_tick_callback()](../gtk4/method.Widget.add_tick_callback.html)
401+// as a more convenient interface.
401 func (x *FrameClock) ConnectUpdate(cb *func(FrameClock)) uint32 {402 func (x *FrameClock) ConnectUpdate(cb *func(FrameClock)) uint32 {
402 cbPtr := uintptr(unsafe.Pointer(cb))403 cbPtr := uintptr(unsafe.Pointer(cb))
403 if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {404 if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
M v4/gdk/gdkframetimings.go +1 -2
@@ -10,8 +10,7 @@ import (
10 "github.com/jwijenbergh/puregotk/v4/gobject/types"10 "github.com/jwijenbergh/puregotk/v4/gobject/types"
11 )11 )
12 12
13-// A `GdkFrameTimings` object holds timing information for a single frame13+// Holds timing information for a single frame of the application’s displays.
14-// of the application’s displays.
15 //14 //
16 // To retrieve `GdkFrameTimings` objects, use [method@Gdk.FrameClock.get_timings]15 // To retrieve `GdkFrameTimings` objects, use [method@Gdk.FrameClock.get_timings]
17 // or [method@Gdk.FrameClock.get_current_timings]. The information in16 // or [method@Gdk.FrameClock.get_current_timings]. The information in
M v4/gdk/gdkglcontext.go +7 -19
@@ -9,25 +9,16 @@ import (
9 "github.com/jwijenbergh/puregotk/v4/gobject/types"9 "github.com/jwijenbergh/puregotk/v4/gobject/types"
10 )10 )
11 11
12-// The list of the different APIs that GdkGLContext can potentially support.12+var xGlErrorQuark func() glib.Quark
13-type GLAPI int
14 13
15-var xGLAPIGLibType func() types.GType14+// Registers an error quark for [class@Gdk.GLContext] errors.
15+func GlErrorQuark() glib.Quark {
16 16
17-func GLAPIGLibType() types.GType {17+ cret := xGlErrorQuark()
18- return xGLAPIGLibType()18+ return cret
19 }19 }
20 20
21-const (21+// Represents a platform-specific OpenGL draw context.
22-
23- // The OpenGL API
24- GlApiGlValue GLAPI = 1
25- // The OpenGL ES API
26- GlApiGlesValue GLAPI = 2
27-)
28-
29-// `GdkGLContext` is an object representing a platform-specific
30-// OpenGL draw context.
31 //22 //
32 // `GdkGLContext`s are created for a surface using23 // `GdkGLContext`s are created for a surface using
33 // [method@Gdk.Surface.create_gl_context], and the context will match24 // [method@Gdk.Surface.create_gl_context], and the context will match
@@ -215,9 +206,6 @@ var xGLContextGetVersion func(uintptr, int, int)
215 // Retrieves the OpenGL version of the @context.206 // Retrieves the OpenGL version of the @context.
216 //207 //
217 // The @context must be realized prior to calling this function.208 // The @context must be realized prior to calling this function.
218-//
219-// If the @context has never been made current, the version cannot
220-// be known and it will return 0 for both @major and @minor.
221 func (x *GLContext) GetVersion(MajorVar int, MinorVar int) {209 func (x *GLContext) GetVersion(MajorVar int, MinorVar int) {
222 210
223 xGLContextGetVersion(x.GoPointer(), MajorVar, MinorVar)211 xGLContextGetVersion(x.GoPointer(), MajorVar, MinorVar)
@@ -426,7 +414,7 @@ func init() {
426 panic(err)414 panic(err)
427 }415 }
428 416
429- core.PuregoSafeRegister(&xGLAPIGLibType, lib, "gdk_gl_api_get_type")417+ core.PuregoSafeRegister(&xGlErrorQuark, lib, "gdk_gl_error_quark")
430 418
431 core.PuregoSafeRegister(&xGLContextGLibType, lib, "gdk_gl_context_get_type")419 core.PuregoSafeRegister(&xGLContextGLibType, lib, "gdk_gl_context_get_type")
432 420
M v4/gdk/gdkgltexture.go +8 -1
@@ -20,7 +20,7 @@ func (x *GLTextureClass) GoPointer() uintptr {
20 return uintptr(unsafe.Pointer(x))20 return uintptr(unsafe.Pointer(x))
21 }21 }
22 22
23-// A GdkTexture representing a GL texture object.23+// A `GdkTexture` representing a GL texture object.
24 type GLTexture struct {24 type GLTexture struct {
25 Texture25 Texture
26 }26 }
@@ -232,6 +232,13 @@ func (x *GLTexture) Equal(Icon2Var gio.Icon) bool {
232 return cret232 return cret
233 }233 }
234 234
235+// Gets a hash for an icon.
236+func (x *GLTexture) Hash() uint {
237+
238+ cret := gio.XGIconHash(x.GoPointer())
239+ return cret
240+}
241+
235 // Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved242 // Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved
236 // back by calling g_icon_deserialize() on the returned value.243 // back by calling g_icon_deserialize() on the returned value.
237 // As serialization will avoid using raw icon data when possible, it only244 // As serialization will avoid using raw icon data when possible, it only
A v4/gdk/gdkgltexturebuilder.go +390 -0
@@ -0,0 +1,390 @@
1+// Package gdk was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT
2+package gdk
3+
4+import (
5+ "structs"
6+ "unsafe"
7+
8+ "github.com/jwijenbergh/purego"
9+ "github.com/jwijenbergh/puregotk/pkg/core"
10+ "github.com/jwijenbergh/puregotk/v4/cairo"
11+ "github.com/jwijenbergh/puregotk/v4/glib"
12+ "github.com/jwijenbergh/puregotk/v4/gobject"
13+ "github.com/jwijenbergh/puregotk/v4/gobject/types"
14+)
15+
16+type GLTextureBuilderClass struct {
17+ _ structs.HostLayout
18+}
19+
20+func (x *GLTextureBuilderClass) GoPointer() uintptr {
21+ return uintptr(unsafe.Pointer(x))
22+}
23+
24+// Constructs [class@Gdk.Texture] objects from GL textures.
25+//
26+// The operation is quite simple: Create a texture builder, set all the necessary
27+// properties - keep in mind that the properties [property@Gdk.GLTextureBuilder:context],
28+// [property@Gdk.GLTextureBuilder:id], [property@Gdk.GLTextureBuilder:width], and
29+// [property@Gdk.GLTextureBuilder:height] are mandatory - and then call
30+// [method@Gdk.GLTextureBuilder.build] to create the new texture.
31+//
32+// `GdkGLTextureBuilder` can be used for quick one-shot construction of
33+// textures as well as kept around and reused to construct multiple textures.
34+type GLTextureBuilder struct {
35+ gobject.Object
36+}
37+
38+var xGLTextureBuilderGLibType func() types.GType
39+
40+func GLTextureBuilderGLibType() types.GType {
41+ return xGLTextureBuilderGLibType()
42+}
43+
44+func GLTextureBuilderNewFromInternalPtr(ptr uintptr) *GLTextureBuilder {
45+ cls := &GLTextureBuilder{}
46+ cls.Ptr = ptr
47+ return cls
48+}
49+
50+var xNewGLTextureBuilder func() uintptr
51+
52+// Creates a new texture builder.
53+func NewGLTextureBuilder() *GLTextureBuilder {
54+ var cls *GLTextureBuilder
55+
56+ cret := xNewGLTextureBuilder()
57+
58+ if cret == 0 {
59+ return nil
60+ }
61+ cls = &GLTextureBuilder{}
62+ cls.Ptr = cret
63+ return cls
64+}
65+
66+var xGLTextureBuilderBuild func(uintptr, uintptr, uintptr) uintptr
67+
68+// Builds a new `GdkTexture` with the values set up in the builder.
69+//
70+// The `destroy` function gets called when the returned texture gets released;
71+// either when the texture is finalized or by an explicit call to
72+// [method@Gdk.GLTexture.release]. It should release all GL resources associated
73+// with the texture, such as the [property@Gdk.GLTextureBuilder:id] and the
74+// [property@Gdk.GLTextureBuilder:sync].
75+//
76+// Note that it is a programming error to call this function if any mandatory
77+// property has not been set.
78+//
79+// It is possible to call this function multiple times to create multiple textures,
80+// possibly with changing properties in between.
81+func (x *GLTextureBuilder) Build(DestroyVar *glib.DestroyNotify, DataVar uintptr) *Texture {
82+ var cls *Texture
83+
84+ cret := xGLTextureBuilderBuild(x.GoPointer(), glib.NewCallbackNullable(DestroyVar), DataVar)
85+
86+ if cret == 0 {
87+ return nil
88+ }
89+ cls = &Texture{}
90+ cls.Ptr = cret
91+ return cls
92+}
93+
94+var xGLTextureBuilderGetColorState func(uintptr) *ColorState
95+
96+// Gets the color state previously set via gdk_gl_texture_builder_set_color_state().
97+func (x *GLTextureBuilder) GetColorState() *ColorState {
98+
99+ cret := xGLTextureBuilderGetColorState(x.GoPointer())
100+ return cret
101+}
102+
103+var xGLTextureBuilderGetContext func(uintptr) uintptr
104+
105+// Gets the context previously set via gdk_gl_texture_builder_set_context() or
106+// %NULL if none was set.
107+func (x *GLTextureBuilder) GetContext() *GLContext {
108+ var cls *GLContext
109+
110+ cret := xGLTextureBuilderGetContext(x.GoPointer())
111+
112+ if cret == 0 {
113+ return nil
114+ }
115+ gobject.IncreaseRef(cret)
116+ cls = &GLContext{}
117+ cls.Ptr = cret
118+ return cls
119+}
120+
121+var xGLTextureBuilderGetFormat func(uintptr) MemoryFormat
122+
123+// Gets the format previously set via gdk_gl_texture_builder_set_format().
124+func (x *GLTextureBuilder) GetFormat() MemoryFormat {
125+
126+ cret := xGLTextureBuilderGetFormat(x.GoPointer())
127+ return cret
128+}
129+
130+var xGLTextureBuilderGetHasMipmap func(uintptr) bool
131+
132+// Gets whether the texture has a mipmap.
133+func (x *GLTextureBuilder) GetHasMipmap() bool {
134+
135+ cret := xGLTextureBuilderGetHasMipmap(x.GoPointer())
136+ return cret
137+}
138+
139+var xGLTextureBuilderGetHeight func(uintptr) int
140+
141+// Gets the height previously set via gdk_gl_texture_builder_set_height() or
142+// 0 if the height wasn't set.
143+func (x *GLTextureBuilder) GetHeight() int {
144+
145+ cret := xGLTextureBuilderGetHeight(x.GoPointer())
146+ return cret
147+}
148+
149+var xGLTextureBuilderGetId func(uintptr) uint
150+
151+// Gets the texture id previously set via gdk_gl_texture_builder_set_id() or
152+// 0 if the id wasn't set.
153+func (x *GLTextureBuilder) GetId() uint {
154+
155+ cret := xGLTextureBuilderGetId(x.GoPointer())
156+ return cret
157+}
158+
159+var xGLTextureBuilderGetSync func(uintptr) uintptr
160+
161+// Gets the `GLsync` previously set via gdk_gl_texture_builder_set_sync().
162+func (x *GLTextureBuilder) GetSync() uintptr {
163+
164+ cret := xGLTextureBuilderGetSync(x.GoPointer())
165+ return cret
166+}
167+
168+var xGLTextureBuilderGetUpdateRegion func(uintptr) *cairo.Region
169+
170+// Gets the region previously set via gdk_gl_texture_builder_set_update_region() or
171+// %NULL if none was set.
172+func (x *GLTextureBuilder) GetUpdateRegion() *cairo.Region {
173+
174+ cret := xGLTextureBuilderGetUpdateRegion(x.GoPointer())
175+ return cret
176+}
177+
178+var xGLTextureBuilderGetUpdateTexture func(uintptr) uintptr
179+
180+// Gets the texture previously set via gdk_gl_texture_builder_set_update_texture() or
181+// %NULL if none was set.
182+func (x *GLTextureBuilder) GetUpdateTexture() *Texture {
183+ var cls *Texture
184+
185+ cret := xGLTextureBuilderGetUpdateTexture(x.GoPointer())
186+
187+ if cret == 0 {
188+ return nil
189+ }
190+ gobject.IncreaseRef(cret)
191+ cls = &Texture{}
192+ cls.Ptr = cret
193+ return cls
194+}
195+
196+var xGLTextureBuilderGetWidth func(uintptr) int
197+
198+// Gets the width previously set via gdk_gl_texture_builder_set_width() or
199+// 0 if the width wasn't set.
200+func (x *GLTextureBuilder) GetWidth() int {
201+
202+ cret := xGLTextureBuilderGetWidth(x.GoPointer())
203+ return cret
204+}
205+
206+var xGLTextureBuilderSetColorState func(uintptr, *ColorState)
207+
208+// Sets the color state for the texture.
209+//
210+// By default, the sRGB colorstate is used. If you don't know what
211+// colorstates are, this is probably the right thing.
212+func (x *GLTextureBuilder) SetColorState(ColorStateVar *ColorState) {
213+
214+ xGLTextureBuilderSetColorState(x.GoPointer(), ColorStateVar)
215+
216+}
217+
218+var xGLTextureBuilderSetContext func(uintptr, uintptr)
219+
220+// Sets the context to be used for the texture. This is the context that owns
221+// the texture.
222+//
223+// The context must be set before calling [method@Gdk.GLTextureBuilder.build].
224+func (x *GLTextureBuilder) SetContext(ContextVar *GLContext) {
225+
226+ xGLTextureBuilderSetContext(x.GoPointer(), ContextVar.GoPointer())
227+
228+}
229+
230+var xGLTextureBuilderSetFormat func(uintptr, MemoryFormat)
231+
232+// Sets the format of the texture. The default is `GDK_MEMORY_R8G8B8A8_PREMULTIPLIED`.
233+//
234+// The format is the preferred format the texture data should be downloaded to. The
235+// format must be supported by the GL version of [property@Gdk.GLTextureBuilder:context].
236+//
237+// GDK's texture download code assumes that the format corresponds to the storage
238+// parameters of the GL texture in an obvious way. For example, a format of
239+// `GDK_MEMORY_R16G16B16A16_PREMULTIPLIED` is expected to be stored as `GL_RGBA16`
240+// texture, and `GDK_MEMORY_G8A8` is expected to be stored as `GL_RG8` texture.
241+//
242+// Setting the right format is particularly useful when using high bit depth textures
243+// to preserve the bit depth, to set the correct value for unpremultiplied textures
244+// and to make sure opaque textures are treated as such.
245+//
246+// Non-RGBA textures need to have swizzling parameters set up properly to be usable
247+// in GSK's shaders.
248+func (x *GLTextureBuilder) SetFormat(FormatVar MemoryFormat) {
249+
250+ xGLTextureBuilderSetFormat(x.GoPointer(), FormatVar)
251+
252+}
253+
254+var xGLTextureBuilderSetHasMipmap func(uintptr, bool)
255+
256+// Sets whether the texture has a mipmap. This allows the renderer and other users of the
257+// generated texture to use a higher quality downscaling.
258+//
259+// Typically, the `glGenerateMipmap` function is used to generate a mimap.
260+func (x *GLTextureBuilder) SetHasMipmap(HasMipmapVar bool) {
261+
262+ xGLTextureBuilderSetHasMipmap(x.GoPointer(), HasMipmapVar)
263+
264+}
265+
266+var xGLTextureBuilderSetHeight func(uintptr, int)
267+
268+// Sets the height of the texture.
269+//
270+// The height must be set before calling [method@Gdk.GLTextureBuilder.build].
271+func (x *GLTextureBuilder) SetHeight(HeightVar int) {
272+
273+ xGLTextureBuilderSetHeight(x.GoPointer(), HeightVar)
274+
275+}
276+
277+var xGLTextureBuilderSetId func(uintptr, uint)
278+
279+// Sets the texture id of the texture. The texture id must remain unmodified
280+// until the texture was finalized. See [method@Gdk.GLTextureBuilder.build]
281+// for a longer discussion.
282+//
283+// The id must be set before calling [method@Gdk.GLTextureBuilder.build].
284+func (x *GLTextureBuilder) SetId(IdVar uint) {
285+
286+ xGLTextureBuilderSetId(x.GoPointer(), IdVar)
287+
288+}
289+
290+var xGLTextureBuilderSetSync func(uintptr, uintptr)
291+
292+// Sets the GLSync object to use for the texture.
293+//
294+// GTK will wait on this object before using the created `GdkTexture`.
295+//
296+// The `destroy` function that is passed to [method@Gdk.GLTextureBuilder.build]
297+// is responsible for freeing the sync object when it is no longer needed.
298+// The texture builder does not destroy it and it is the callers
299+// responsibility to make sure it doesn't leak.
300+func (x *GLTextureBuilder) SetSync(SyncVar uintptr) {
301+
302+ xGLTextureBuilderSetSync(x.GoPointer(), SyncVar)
303+
304+}
305+
306+var xGLTextureBuilderSetUpdateRegion func(uintptr, *cairo.Region)
307+
308+// Sets the region to be updated by this texture. Together with
309+// [property@Gdk.GLTextureBuilder:update-texture] this describes an
310+// update of a previous texture.
311+//
312+// When rendering animations of large textures, it is possible that
313+// consecutive textures are only updating contents in parts of the texture.
314+// It is then possible to describe this update via these two properties,
315+// so that GTK can avoid rerendering parts that did not change.
316+//
317+// An example would be a screen recording where only the mouse pointer moves.
318+func (x *GLTextureBuilder) SetUpdateRegion(RegionVar *cairo.Region) {
319+
320+ xGLTextureBuilderSetUpdateRegion(x.GoPointer(), RegionVar)
321+
322+}
323+
324+var xGLTextureBuilderSetUpdateTexture func(uintptr, uintptr)
325+
326+// Sets the texture to be updated by this texture. See
327+// [method@Gdk.GLTextureBuilder.set_update_region] for an explanation.
328+func (x *GLTextureBuilder) SetUpdateTexture(TextureVar *Texture) {
329+
330+ xGLTextureBuilderSetUpdateTexture(x.GoPointer(), TextureVar.GoPointer())
331+
332+}
333+
334+var xGLTextureBuilderSetWidth func(uintptr, int)
335+
336+// Sets the width of the texture.
337+//
338+// The width must be set before calling [method@Gdk.GLTextureBuilder.build].
339+func (x *GLTextureBuilder) SetWidth(WidthVar int) {
340+
341+ xGLTextureBuilderSetWidth(x.GoPointer(), WidthVar)
342+
343+}
344+
345+func (c *GLTextureBuilder) GoPointer() uintptr {
346+ if c == nil {
347+ return 0
348+ }
349+ return c.Ptr
350+}
351+
352+func (c *GLTextureBuilder) SetGoPointer(ptr uintptr) {
353+ c.Ptr = ptr
354+}
355+
356+func init() {
357+ core.SetPackageName("GDK", "gtk4")
358+ core.SetSharedLibrary("GDK", "libgtk-4.so.1")
359+ lib, err := purego.Dlopen(core.GetPath("GDK"), purego.RTLD_NOW|purego.RTLD_GLOBAL)
360+ if err != nil {
361+ panic(err)
362+ }
363+
364+ core.PuregoSafeRegister(&xGLTextureBuilderGLibType, lib, "gdk_gl_texture_builder_get_type")
365+
366+ core.PuregoSafeRegister(&xNewGLTextureBuilder, lib, "gdk_gl_texture_builder_new")
367+
368+ core.PuregoSafeRegister(&xGLTextureBuilderBuild, lib, "gdk_gl_texture_builder_build")
369+ core.PuregoSafeRegister(&xGLTextureBuilderGetColorState, lib, "gdk_gl_texture_builder_get_color_state")
370+ core.PuregoSafeRegister(&xGLTextureBuilderGetContext, lib, "gdk_gl_texture_builder_get_context")
371+ core.PuregoSafeRegister(&xGLTextureBuilderGetFormat, lib, "gdk_gl_texture_builder_get_format")
372+ core.PuregoSafeRegister(&xGLTextureBuilderGetHasMipmap, lib, "gdk_gl_texture_builder_get_has_mipmap")
373+ core.PuregoSafeRegister(&xGLTextureBuilderGetHeight, lib, "gdk_gl_texture_builder_get_height")
374+ core.PuregoSafeRegister(&xGLTextureBuilderGetId, lib, "gdk_gl_texture_builder_get_id")
375+ core.PuregoSafeRegister(&xGLTextureBuilderGetSync, lib, "gdk_gl_texture_builder_get_sync")
376+ core.PuregoSafeRegister(&xGLTextureBuilderGetUpdateRegion, lib, "gdk_gl_texture_builder_get_update_region")
377+ core.PuregoSafeRegister(&xGLTextureBuilderGetUpdateTexture, lib, "gdk_gl_texture_builder_get_update_texture")
378+ core.PuregoSafeRegister(&xGLTextureBuilderGetWidth, lib, "gdk_gl_texture_builder_get_width")
379+ core.PuregoSafeRegister(&xGLTextureBuilderSetColorState, lib, "gdk_gl_texture_builder_set_color_state")
380+ core.PuregoSafeRegister(&xGLTextureBuilderSetContext, lib, "gdk_gl_texture_builder_set_context")
381+ core.PuregoSafeRegister(&xGLTextureBuilderSetFormat, lib, "gdk_gl_texture_builder_set_format")
382+ core.PuregoSafeRegister(&xGLTextureBuilderSetHasMipmap, lib, "gdk_gl_texture_builder_set_has_mipmap")
383+ core.PuregoSafeRegister(&xGLTextureBuilderSetHeight, lib, "gdk_gl_texture_builder_set_height")
384+ core.PuregoSafeRegister(&xGLTextureBuilderSetId, lib, "gdk_gl_texture_builder_set_id")
385+ core.PuregoSafeRegister(&xGLTextureBuilderSetSync, lib, "gdk_gl_texture_builder_set_sync")
386+ core.PuregoSafeRegister(&xGLTextureBuilderSetUpdateRegion, lib, "gdk_gl_texture_builder_set_update_region")
387+ core.PuregoSafeRegister(&xGLTextureBuilderSetUpdateTexture, lib, "gdk_gl_texture_builder_set_update_texture")
388+ core.PuregoSafeRegister(&xGLTextureBuilderSetWidth, lib, "gdk_gl_texture_builder_set_width")
389+
390+}
M v4/gdk/gdkkeys.go +5 -5
@@ -32,7 +32,7 @@ func KeyvalFromName(KeyvalNameVar string) uint {
32 32
33 var xKeyvalIsLower func(uint) bool33 var xKeyvalIsLower func(uint) bool
34 34
35-// Returns %TRUE if the given key value is in lower case.35+// Returns true if the given key value is in lower case.
36 func KeyvalIsLower(KeyvalVar uint) bool {36 func KeyvalIsLower(KeyvalVar uint) bool {
37 37
38 cret := xKeyvalIsLower(KeyvalVar)38 cret := xKeyvalIsLower(KeyvalVar)
@@ -41,7 +41,7 @@ func KeyvalIsLower(KeyvalVar uint) bool {
41 41
42 var xKeyvalIsUpper func(uint) bool42 var xKeyvalIsUpper func(uint) bool
43 43
44-// Returns %TRUE if the given key value is in upper case.44+// Returns true if the given key value is in upper case.
45 func KeyvalIsUpper(KeyvalVar uint) bool {45 func KeyvalIsUpper(KeyvalVar uint) bool {
46 46
47 cret := xKeyvalIsUpper(KeyvalVar)47 cret := xKeyvalIsUpper(KeyvalVar)
@@ -72,12 +72,12 @@ func KeyvalToLower(KeyvalVar uint) uint {
72 72
73 var xKeyvalToUnicode func(uint) uint3273 var xKeyvalToUnicode func(uint) uint32
74 74
75-// Convert from a GDK key symbol to the corresponding Unicode75+// Converts from a GDK key symbol to the corresponding Unicode
76 // character.76 // character.
77 //77 //
78 // Note that the conversion does not take the current locale78 // Note that the conversion does not take the current locale
79 // into consideration, which might be expected for particular79 // into consideration, which might be expected for particular
80-// keyvals, such as %GDK_KEY_KP_Decimal.80+// keyvals, such as `GDK_KEY_KP_Decimal`.
81 func KeyvalToUnicode(KeyvalVar uint) uint32 {81 func KeyvalToUnicode(KeyvalVar uint) uint32 {
82 82
83 cret := xKeyvalToUnicode(KeyvalVar)83 cret := xKeyvalToUnicode(KeyvalVar)
@@ -95,7 +95,7 @@ func KeyvalToUpper(KeyvalVar uint) uint {
95 95
96 var xUnicodeToKeyval func(uint32) uint96 var xUnicodeToKeyval func(uint32) uint
97 97
98-// Convert from a Unicode character to a key symbol.98+// Converts from a Unicode character to a key symbol.
99 func UnicodeToKeyval(WcVar uint32) uint {99 func UnicodeToKeyval(WcVar uint32) uint {
100 100
101 cret := xUnicodeToKeyval(WcVar)101 cret := xUnicodeToKeyval(WcVar)
M v4/gdk/gdkkeysyms.go +344 -0
@@ -6,6 +6,10 @@ const (
6 6
7 KEY_1 int = 497 KEY_1 int = 49
8 8
9+ KEY_10ChannelsDown int = 268964281
10+
11+ KEY_10ChannelsUp int = 268964280
12+
9 KEY_2 int = 5013 KEY_2 int = 50
10 14
11 KEY_3 int = 5115 KEY_3 int = 51
@@ -70,6 +74,8 @@ const (
70 74
71 KEY_3270_Test int = 6478175 KEY_3270_Test int = 64781
72 76
77+ KEY_3DMode int = 268964463
78+
73 KEY_4 int = 5279 KEY_4 int = 52
74 80
75 KEY_5 int = 5381 KEY_5 int = 53
@@ -86,6 +92,8 @@ const (
86 92
87 KEY_AE int = 19893 KEY_AE int = 198
88 94
95+ KEY_ALSToggle int = 268964400
96+
89 KEY_Aacute int = 19397 KEY_Aacute int = 193
90 98
91 KEY_Abelowdot int = 1678505699 KEY_Abelowdot int = 16785056
@@ -106,6 +114,8 @@ const (
106 114
107 KEY_AccessX_Feedback_Enable int = 65137115 KEY_AccessX_Feedback_Enable int = 65137
108 116
117+ KEY_Accessibility int = 268964430
118+
109 KEY_Acircumflex int = 194119 KEY_Acircumflex int = 194
110 120
111 KEY_Acircumflexacute int = 16785060121 KEY_Acircumflexacute int = 16785060
@@ -120,6 +130,8 @@ const (
120 130
121 KEY_AddFavorite int = 269025081131 KEY_AddFavorite int = 269025081
122 132
133+ KEY_Addressbook int = 268964269
134+
123 KEY_Adiaeresis int = 196135 KEY_Adiaeresis int = 196
124 136
125 KEY_Agrave int = 192137 KEY_Agrave int = 192
@@ -134,6 +146,8 @@ const (
134 146
135 KEY_Aogonek int = 417147 KEY_Aogonek int = 417
136 148
149+ KEY_AppSelect int = 268964420
150+
137 KEY_ApplicationLeft int = 269025104151 KEY_ApplicationLeft int = 269025104
138 152
139 KEY_ApplicationRight int = 269025105153 KEY_ApplicationRight int = 269025105
@@ -480,12 +494,26 @@ const (
480 494
481 KEY_Armenian_zhe int = 16778602495 KEY_Armenian_zhe int = 16778602
482 496
497+ KEY_AspectRatio int = 268964215
498+
499+ KEY_Assistant int = 268964423
500+
483 KEY_Atilde int = 195501 KEY_Atilde int = 195
484 502
503+ KEY_AttendantOff int = 268964380
504+
505+ KEY_AttendantOn int = 268964379
506+
507+ KEY_AttendantToggle int = 268964381
508+
485 KEY_AudibleBell_Enable int = 65146509 KEY_AudibleBell_Enable int = 65146
486 510
511+ KEY_Audio int = 268964232
512+
487 KEY_AudioCycleTrack int = 269025179513 KEY_AudioCycleTrack int = 269025179
488 514
515+ KEY_AudioDesc int = 268964462
516+
489 KEY_AudioForward int = 269025175517 KEY_AudioForward int = 269025175
490 518
491 KEY_AudioLowerVolume int = 269025041519 KEY_AudioLowerVolume int = 269025041
@@ -518,6 +546,8 @@ const (
518 546
519 KEY_AudioStop int = 269025045547 KEY_AudioStop int = 269025045
520 548
549+ KEY_AutopilotEngageToggle int = 268964477
550+
521 KEY_Away int = 269025165551 KEY_Away int = 269025165
522 552
523 KEY_B int = 66553 KEY_B int = 66
@@ -546,6 +576,14 @@ const (
546 576
547 KEY_BrightnessAdjust int = 269025083577 KEY_BrightnessAdjust int = 269025083
548 578
579+ KEY_BrightnessAuto int = 268964084
580+
581+ KEY_BrightnessMax int = 268964433
582+
583+ KEY_BrightnessMin int = 268964432
584+
585+ KEY_Buttonconfig int = 268964416
586+
549 KEY_Byelorussian_SHORTU int = 1726587 KEY_Byelorussian_SHORTU int = 1726
550 588
551 KEY_Byelorussian_shortu int = 1710589 KEY_Byelorussian_shortu int = 1710
@@ -568,6 +606,26 @@ const (
568 606
569 KEY_Calendar int = 269025056607 KEY_Calendar int = 269025056
570 608
609+ KEY_CameraAccessDisable int = 268964428
610+
611+ KEY_CameraAccessEnable int = 268964427
612+
613+ KEY_CameraAccessToggle int = 268964429
614+
615+ KEY_CameraDown int = 268964376
616+
617+ KEY_CameraFocus int = 268964368
618+
619+ KEY_CameraLeft int = 268964377
620+
621+ KEY_CameraRight int = 268964378
622+
623+ KEY_CameraUp int = 268964375
624+
625+ KEY_CameraZoomIn int = 268964373
626+
627+ KEY_CameraZoomOut int = 268964374
628+
571 KEY_Cancel int = 65385629 KEY_Cancel int = 65385
572 630
573 KEY_Caps_Lock int = 65509631 KEY_Caps_Lock int = 65509
@@ -580,10 +638,16 @@ const (
580 638
581 KEY_Ch int = 65185639 KEY_Ch int = 65185
582 640
641+ KEY_ChannelDown int = 268964243
642+
643+ KEY_ChannelUp int = 268964242
644+
583 KEY_Clear int = 65291645 KEY_Clear int = 65291
584 646
585 KEY_ClearGrab int = 269024801647 KEY_ClearGrab int = 269024801
586 648
649+ KEY_ClearvuSonar int = 268964486
650+
587 KEY_Close int = 269025110651 KEY_Close int = 269025110
588 652
589 KEY_Codeinput int = 65335653 KEY_Codeinput int = 65335
@@ -592,8 +656,12 @@ const (
592 656
593 KEY_Community int = 269025085657 KEY_Community int = 269025085
594 658
659+ KEY_ContextMenu int = 268964278
660+
595 KEY_ContrastAdjust int = 269025058661 KEY_ContrastAdjust int = 269025058
596 662
663+ KEY_ControlPanel int = 268964419
664+
597 KEY_Control_L int = 65507665 KEY_Control_L int = 65507
598 666
599 KEY_Control_R int = 65508667 KEY_Control_R int = 65508
@@ -818,14 +886,28 @@ const (
818 886
819 KEY_DOS int = 269025114887 KEY_DOS int = 269025114
820 888
889+ KEY_DVD int = 268964229
890+
821 KEY_Dabovedot int = 16784906891 KEY_Dabovedot int = 16784906
822 892
893+ KEY_Data int = 268964471
894+
895+ KEY_Database int = 268964266
896+
823 KEY_Dcaron int = 463897 KEY_Dcaron int = 463
824 898
825 KEY_Delete int = 65535899 KEY_Delete int = 65535
826 900
901+ KEY_Dictate int = 268964426
902+
827 KEY_Display int = 269025113903 KEY_Display int = 269025113
828 904
905+ KEY_DisplayOff int = 268964085
906+
907+ KEY_DisplayToggle int = 268964271
908+
909+ KEY_DoNotDisturb int = 268964431
910+
829 KEY_Documents int = 269025115911 KEY_Documents int = 269025115
830 912
831 KEY_DongSign int = 16785579913 KEY_DongSign int = 16785579
@@ -834,6 +916,8 @@ const (
834 916
835 KEY_Dstroke int = 464917 KEY_Dstroke int = 464
836 918
919+ KEY_DualRangeRadar int = 268964483
920+
837 KEY_E int = 69921 KEY_E int = 69
838 922
839 KEY_ENG int = 957923 KEY_ENG int = 957
@@ -866,6 +950,8 @@ const (
866 950
867 KEY_Ediaeresis int = 203951 KEY_Ediaeresis int = 203
868 952
953+ KEY_Editor int = 268964262
954+
869 KEY_Egrave int = 200955 KEY_Egrave int = 200
870 956
871 KEY_Ehook int = 16785082957 KEY_Ehook int = 16785082
@@ -878,6 +964,8 @@ const (
878 964
879 KEY_Emacron int = 938965 KEY_Emacron int = 938
880 966
967+ KEY_EmojiPicker int = 268964425
968+
881 KEY_End int = 65367969 KEY_End int = 65367
882 970
883 KEY_Eogonek int = 458971 KEY_Eogonek int = 458
@@ -994,6 +1082,8 @@ const (
994 1082
995 KEY_Farsi_yeh int = 167789561083 KEY_Farsi_yeh int = 16778956
996 1084
1085+ KEY_FastReverse int = 268964469
1086+
997 KEY_Favorites int = 2690250721087 KEY_Favorites int = 269025072
998 1088
999 KEY_Finance int = 2690250841089 KEY_Finance int = 269025084
@@ -1002,12 +1092,22 @@ const (
1002 1092
1003 KEY_First_Virtual_Screen int = 652321093 KEY_First_Virtual_Screen int = 65232
1004 1094
1095+ KEY_FishingChart int = 268964481
1096+
1097+ KEY_Fn int = 268964304
1098+
1099+ KEY_FnRightShift int = 268964325
1100+
1101+ KEY_Fn_Esc int = 268964305
1102+
1005 KEY_Forward int = 2690250631103 KEY_Forward int = 269025063
1006 1104
1007 KEY_FrameBack int = 2690251811105 KEY_FrameBack int = 269025181
1008 1106
1009 KEY_FrameForward int = 2690251821107 KEY_FrameForward int = 269025182
1010 1108
1109+ KEY_FullScreen int = 269025208
1110+
1011 KEY_G int = 711111 KEY_G int = 71
1012 1112
1013 KEY_Gabovedot int = 7251113 KEY_Gabovedot int = 725
@@ -1102,6 +1202,8 @@ const (
1102 1202
1103 KEY_Go int = 2690251191203 KEY_Go int = 269025119
1104 1204
1205+ KEY_GraphicsEditor int = 268964264
1206+
1105 KEY_Greek_ALPHA int = 19851207 KEY_Greek_ALPHA int = 1985
1106 1208
1107 KEY_Greek_ALPHAaccent int = 19531209 KEY_Greek_ALPHAaccent int = 1953
@@ -1468,6 +1570,8 @@ const (
1468 1570
1469 KEY_Hangul_switch int = 654061571 KEY_Hangul_switch int = 65406
1470 1572
1573+ KEY_HangupPhone int = 268964286
1574+
1471 KEY_Hankaku int = 653211575 KEY_Hankaku int = 65321
1472 1576
1473 KEY_Hcircumflex int = 6781577 KEY_Hcircumflex int = 678
@@ -1600,6 +1704,10 @@ const (
1600 1704
1601 KEY_Imacron int = 9751705 KEY_Imacron int = 975
1602 1706
1707+ KEY_Images int = 268964282
1708+
1709+ KEY_Info int = 268964198
1710+
1603 KEY_Insert int = 653791711 KEY_Insert int = 65379
1604 1712
1605 KEY_Iogonek int = 9671713 KEY_Iogonek int = 967
@@ -1610,6 +1718,8 @@ const (
1610 1718
1611 KEY_Jcircumflex int = 6841719 KEY_Jcircumflex int = 684
1612 1720
1721+ KEY_Journal int = 268964418
1722+
1613 KEY_K int = 751723 KEY_K int = 75
1614 1724
1615 KEY_KP_0 int = 654561725 KEY_KP_0 int = 65456
@@ -1700,6 +1810,28 @@ const (
1700 1810
1701 KEY_KbdBrightnessUp int = 2690250291811 KEY_KbdBrightnessUp int = 269025029
1702 1812
1813+ KEY_KbdInputAssistAccept int = 268964452
1814+
1815+ KEY_KbdInputAssistCancel int = 268964453
1816+
1817+ KEY_KbdInputAssistNext int = 268964449
1818+
1819+ KEY_KbdInputAssistNextgroup int = 268964451
1820+
1821+ KEY_KbdInputAssistPrev int = 268964448
1822+
1823+ KEY_KbdInputAssistPrevgroup int = 268964450
1824+
1825+ KEY_KbdLcdMenu1 int = 268964536
1826+
1827+ KEY_KbdLcdMenu2 int = 268964537
1828+
1829+ KEY_KbdLcdMenu3 int = 268964538
1830+
1831+ KEY_KbdLcdMenu4 int = 268964539
1832+
1833+ KEY_KbdLcdMenu5 int = 268964540
1834+
1703 KEY_KbdLightOnOff int = 2690250281835 KEY_KbdLightOnOff int = 269025028
1704 1836
1705 KEY_Kcedilla int = 9791837 KEY_Kcedilla int = 979
@@ -1774,8 +1906,14 @@ const (
1774 1906
1775 KEY_Left int = 653611907 KEY_Left int = 65361
1776 1908
1909+ KEY_LeftDown int = 268964457
1910+
1911+ KEY_LeftUp int = 268964456
1912+
1777 KEY_LightBulb int = 2690250771913 KEY_LightBulb int = 269025077
1778 1914
1915+ KEY_LightsToggle int = 268964382
1916+
1779 KEY_Linefeed int = 652901917 KEY_Linefeed int = 65290
1780 1918
1781 KEY_LiraSign int = 167855721919 KEY_LiraSign int = 16785572
@@ -1804,16 +1942,94 @@ const (
1804 1942
1805 KEY_Macedonia_kje int = 17081943 KEY_Macedonia_kje int = 1708
1806 1944
1945+ KEY_Macro1 int = 268964496
1946+
1947+ KEY_Macro10 int = 268964505
1948+
1949+ KEY_Macro11 int = 268964506
1950+
1951+ KEY_Macro12 int = 268964507
1952+
1953+ KEY_Macro13 int = 268964508
1954+
1955+ KEY_Macro14 int = 268964509
1956+
1957+ KEY_Macro15 int = 268964510
1958+
1959+ KEY_Macro16 int = 268964511
1960+
1961+ KEY_Macro17 int = 268964512
1962+
1963+ KEY_Macro18 int = 268964513
1964+
1965+ KEY_Macro19 int = 268964514
1966+
1967+ KEY_Macro2 int = 268964497
1968+
1969+ KEY_Macro20 int = 268964515
1970+
1971+ KEY_Macro21 int = 268964516
1972+
1973+ KEY_Macro22 int = 268964517
1974+
1975+ KEY_Macro23 int = 268964518
1976+
1977+ KEY_Macro24 int = 268964519
1978+
1979+ KEY_Macro25 int = 268964520
1980+
1981+ KEY_Macro26 int = 268964521
1982+
1983+ KEY_Macro27 int = 268964522
1984+
1985+ KEY_Macro28 int = 268964523
1986+
1987+ KEY_Macro29 int = 268964524
1988+
1989+ KEY_Macro3 int = 268964498
1990+
1991+ KEY_Macro30 int = 268964525
1992+
1993+ KEY_Macro4 int = 268964499
1994+
1995+ KEY_Macro5 int = 268964500
1996+
1997+ KEY_Macro6 int = 268964501
1998+
1999+ KEY_Macro7 int = 268964502
2000+
2001+ KEY_Macro8 int = 268964503
2002+
2003+ KEY_Macro9 int = 268964504
2004+
2005+ KEY_MacroPreset1 int = 268964531
2006+
2007+ KEY_MacroPreset2 int = 268964532
2008+
2009+ KEY_MacroPreset3 int = 268964533
2010+
2011+ KEY_MacroPresetCycle int = 268964530
2012+
2013+ KEY_MacroRecordStart int = 268964528
2014+
2015+ KEY_MacroRecordStop int = 268964529
2016+
1807 KEY_Mae_Koho int = 653422017 KEY_Mae_Koho int = 65342
1808 2018
1809 KEY_Mail int = 2690250492019 KEY_Mail int = 269025049
1810 2020
1811 KEY_MailForward int = 2690251682021 KEY_MailForward int = 269025168
1812 2022
2023+ KEY_MarkWaypoint int = 268964478
2024+
1813 KEY_Market int = 2690251222025 KEY_Market int = 269025122
1814 2026
1815 KEY_Massyo int = 653242027 KEY_Massyo int = 65324
1816 2028
2029+ KEY_MediaRepeat int = 268964279
2030+
2031+ KEY_MediaTopMenu int = 268964459
2032+
1817 KEY_Meeting int = 2690251232033 KEY_Meeting int = 269025123
1818 2034
1819 KEY_Memo int = 2690250542035 KEY_Memo int = 269025054
@@ -1836,6 +2052,8 @@ const (
1836 2052
1837 KEY_Mode_switch int = 654062053 KEY_Mode_switch int = 65406
1838 2054
2055+ KEY_MonBrightnessCycle int = 269025031
2056+
1839 KEY_MonBrightnessDown int = 2690250272057 KEY_MonBrightnessDown int = 269025027
1840 2058
1841 KEY_MonBrightnessUp int = 2690250262059 KEY_MonBrightnessUp int = 269025026
@@ -1862,6 +2080,10 @@ const (
1862 2080
1863 KEY_NairaSign int = 167855742081 KEY_NairaSign int = 16785574
1864 2082
2083+ KEY_NavChart int = 268964480
2084+
2085+ KEY_NavInfo int = 268964488
2086+
1865 KEY_Ncaron int = 4662087 KEY_Ncaron int = 466
1866 2088
1867 KEY_Ncedilla int = 9772089 KEY_Ncedilla int = 977
@@ -1874,14 +2096,56 @@ const (
1874 2096
1875 KEY_Next int = 653662097 KEY_Next int = 65366
1876 2098
2099+ KEY_NextElement int = 268964475
2100+
2101+ KEY_NextFavorite int = 268964464
2102+
1877 KEY_Next_VMode int = 2690248022103 KEY_Next_VMode int = 269024802
1878 2104
1879 KEY_Next_Virtual_Screen int = 652342105 KEY_Next_Virtual_Screen int = 65234
1880 2106
2107+ KEY_NotificationCenter int = 268964284
2108+
1881 KEY_Ntilde int = 2092109 KEY_Ntilde int = 209
1882 2110
1883 KEY_Num_Lock int = 654072111 KEY_Num_Lock int = 65407
1884 2112
2113+ KEY_Numeric0 int = 268964352
2114+
2115+ KEY_Numeric1 int = 268964353
2116+
2117+ KEY_Numeric11 int = 268964460
2118+
2119+ KEY_Numeric12 int = 268964461
2120+
2121+ KEY_Numeric2 int = 268964354
2122+
2123+ KEY_Numeric3 int = 268964355
2124+
2125+ KEY_Numeric4 int = 268964356
2126+
2127+ KEY_Numeric5 int = 268964357
2128+
2129+ KEY_Numeric6 int = 268964358
2130+
2131+ KEY_Numeric7 int = 268964359
2132+
2133+ KEY_Numeric8 int = 268964360
2134+
2135+ KEY_Numeric9 int = 268964361
2136+
2137+ KEY_NumericA int = 268964364
2138+
2139+ KEY_NumericB int = 268964365
2140+
2141+ KEY_NumericC int = 268964366
2142+
2143+ KEY_NumericD int = 268964367
2144+
2145+ KEY_NumericPound int = 268964363
2146+
2147+ KEY_NumericStar int = 268964362
2148+
1885 KEY_O int = 792149 KEY_O int = 79
1886 2150
1887 KEY_OE int = 50522151 KEY_OE int = 5052
@@ -1930,6 +2194,8 @@ const (
1930 2194
1931 KEY_Omacron int = 9782195 KEY_Omacron int = 978
1932 2196
2197+ KEY_OnScreenKeyboard int = 268964472
2198+
1933 KEY_Ooblique int = 2162199 KEY_Ooblique int = 216
1934 2200
1935 KEY_Open int = 2690251312201 KEY_Open int = 269025131
@@ -1958,10 +2224,14 @@ const (
1958 2224
1959 KEY_Pause int = 652992225 KEY_Pause int = 65299
1960 2226
2227+ KEY_PauseRecord int = 268964466
2228+
1961 KEY_PesetaSign int = 167855752229 KEY_PesetaSign int = 16785575
1962 2230
1963 KEY_Phone int = 2690251342231 KEY_Phone int = 269025134
1964 2232
2233+ KEY_PickupPhone int = 268964285
2234+
1965 KEY_Pictures int = 2690251692235 KEY_Pictures int = 269025169
1966 2236
1967 KEY_Pointer_Accelerate int = 652742237 KEY_Pointer_Accelerate int = 65274
@@ -2028,16 +2298,22 @@ const (
2028 2298
2029 KEY_PowerOff int = 2690250662299 KEY_PowerOff int = 269025066
2030 2300
2301+ KEY_Presentation int = 268964265
2302+
2031 KEY_Prev_VMode int = 2690248032303 KEY_Prev_VMode int = 269024803
2032 2304
2033 KEY_Prev_Virtual_Screen int = 652332305 KEY_Prev_Virtual_Screen int = 65233
2034 2306
2035 KEY_PreviousCandidate int = 653422307 KEY_PreviousCandidate int = 65342
2036 2308
2309+ KEY_PreviousElement int = 268964476
2310+
2037 KEY_Print int = 653772311 KEY_Print int = 65377
2038 2312
2039 KEY_Prior int = 653652313 KEY_Prior int = 65365
2040 2314
2315+ KEY_PrivacyScreenToggle int = 268964473
2316+
2041 KEY_Q int = 812317 KEY_Q int = 81
2042 2318
2043 KEY_R int = 822319 KEY_R int = 82
@@ -2076,6 +2352,8 @@ const (
2076 2352
2077 KEY_Racute int = 4482353 KEY_Racute int = 448
2078 2354
2355+ KEY_RadarOverlay int = 268964484
2356+
2079 KEY_Rcaron int = 4722357 KEY_Rcaron int = 472
2080 2358
2081 KEY_Rcedilla int = 9312359 KEY_Rcedilla int = 931
@@ -2086,6 +2364,8 @@ const (
2086 2364
2087 KEY_Refresh int = 2690250652365 KEY_Refresh int = 269025065
2088 2366
2367+ KEY_RefreshRateToggle int = 268964402
2368+
2089 KEY_Reload int = 2690251392369 KEY_Reload int = 269025139
2090 2370
2091 KEY_RepeatKeys_Enable int = 651382371 KEY_RepeatKeys_Enable int = 65138
@@ -2096,6 +2376,10 @@ const (
2096 2376
2097 KEY_Right int = 653632377 KEY_Right int = 65363
2098 2378
2379+ KEY_RightDown int = 268964455
2380+
2381+ KEY_RightUp int = 268964454
2382+
2099 KEY_RockerDown int = 2690250602383 KEY_RockerDown int = 269025060
2100 2384
2101 KEY_RockerEnter int = 2690250612385 KEY_RockerEnter int = 269025061
@@ -2104,10 +2388,14 @@ const (
2104 2388
2105 KEY_Romaji int = 653162389 KEY_Romaji int = 65316
2106 2390
2391+ KEY_RootMenu int = 268964458
2392+
2107 KEY_RotateWindows int = 2690251402393 KEY_RotateWindows int = 269025140
2108 2394
2109 KEY_RotationKB int = 2690251422395 KEY_RotationKB int = 269025142
2110 2396
2397+ KEY_RotationLockToggle int = 269025207
2398+
2111 KEY_RotationPB int = 2690251412399 KEY_RotationPB int = 269025141
2112 2400
2113 KEY_RupeeSign int = 167855762401 KEY_RupeeSign int = 16785576
@@ -2130,6 +2418,8 @@ const (
2130 2418
2131 KEY_ScreenSaver int = 2690250692419 KEY_ScreenSaver int = 269025069
2132 2420
2421+ KEY_Screensaver int = 268964421
2422+
2133 KEY_ScrollClick int = 2690251462423 KEY_ScrollClick int = 269025146
2134 2424
2135 KEY_ScrollDown int = 2690251452425 KEY_ScrollDown int = 269025145
@@ -2144,6 +2434,8 @@ const (
2144 2434
2145 KEY_SelectButton int = 2690251842435 KEY_SelectButton int = 269025184
2146 2436
2437+ KEY_SelectiveScreenshot int = 268964474
2438+
2147 KEY_Send int = 2690251472439 KEY_Send int = 269025147
2148 2440
2149 KEY_Serbian_DJE int = 17132441 KEY_Serbian_DJE int = 1713
@@ -2178,8 +2470,12 @@ const (
2178 2470
2179 KEY_Shop int = 2690250782471 KEY_Shop int = 269025078
2180 2472
2473+ KEY_SidevuSonar int = 268964487
2474+
2181 KEY_SingleCandidate int = 653402475 KEY_SingleCandidate int = 65340
2182 2476
2477+ KEY_SingleRangeRadar int = 268964482
2478+
2183 KEY_Sinh_a int = 167806772479 KEY_Sinh_a int = 16780677
2184 2480
2185 KEY_Sinh_aa int = 167806782481 KEY_Sinh_aa int = 16780678
@@ -2344,8 +2640,14 @@ const (
2344 2640
2345 KEY_SlowKeys_Enable int = 651392641 KEY_SlowKeys_Enable int = 65139
2346 2642
2643+ KEY_SlowReverse int = 268964470
2644+
2645+ KEY_Sos int = 268964479
2646+
2347 KEY_Spell int = 2690251482647 KEY_Spell int = 269025148
2348 2648
2649+ KEY_SpellCheck int = 268964272
2650+
2349 KEY_SplitScreen int = 2690251492651 KEY_SplitScreen int = 269025149
2350 2652
2351 KEY_Standby int = 2690250402653 KEY_Standby int = 269025040
@@ -2356,6 +2658,8 @@ const (
2356 2658
2357 KEY_Stop int = 2690250642659 KEY_Stop int = 269025064
2358 2660
2661+ KEY_StopRecord int = 268964465
2662+
2359 KEY_Subtitle int = 2690251782663 KEY_Subtitle int = 269025178
2360 2664
2361 KEY_Super_L int = 655152665 KEY_Super_L int = 65515
@@ -2402,6 +2706,8 @@ const (
2402 2706
2403 KEY_TaskPane int = 2690251512707 KEY_TaskPane int = 269025151
2404 2708
2709+ KEY_Taskmanager int = 268964417
2710+
2405 KEY_Tcaron int = 4272711 KEY_Tcaron int = 427
2406 2712
2407 KEY_Tcedilla int = 4782713 KEY_Tcedilla int = 478
@@ -2596,6 +2902,8 @@ const (
2596 2902
2597 KEY_Touroku int = 653232903 KEY_Touroku int = 65323
2598 2904
2905+ KEY_TraditionalSonar int = 268964485
2906+
2599 KEY_Travel int = 2690251542907 KEY_Travel int = 269025154
2600 2908
2601 KEY_Tslash int = 9402909 KEY_Tslash int = 940
@@ -2666,6 +2974,8 @@ const (
2666 2974
2667 KEY_Ungrab int = 2690248002975 KEY_Ungrab int = 269024800
2668 2976
2977+ KEY_Unmute int = 268964468
2978+
2669 KEY_Uogonek int = 9852979 KEY_Uogonek int = 985
2670 2980
2671 KEY_Up int = 653622981 KEY_Up int = 65362
@@ -2682,18 +2992,28 @@ const (
2682 2992
2683 KEY_V int = 862993 KEY_V int = 86
2684 2994
2995+ KEY_VOD int = 268964467
2996+
2685 KEY_VendorHome int = 2690250762997 KEY_VendorHome int = 269025076
2686 2998
2687 KEY_Video int = 2690251592999 KEY_Video int = 269025159
2688 3000
3001+ KEY_VideoPhone int = 268964256
3002+
2689 KEY_View int = 2690251853003 KEY_View int = 269025185
2690 3004
3005+ KEY_VoiceCommand int = 268964422
3006+
3007+ KEY_Voicemail int = 268964268
3008+
2691 KEY_VoidSymbol int = 167772153009 KEY_VoidSymbol int = 16777215
2692 3010
2693 KEY_W int = 873011 KEY_W int = 87
2694 3012
2695 KEY_WLAN int = 2690251733013 KEY_WLAN int = 269025173
2696 3014
3015+ KEY_WPSButton int = 268964369
3016+
2697 KEY_WWAN int = 2690252043017 KEY_WWAN int = 269025204
2698 3018
2699 KEY_WWW int = 2690250703019 KEY_WWW int = 269025070
@@ -2760,6 +3080,8 @@ const (
2760 3080
2761 KEY_ZoomOut int = 2690251643081 KEY_ZoomOut int = 269025164
2762 3082
3083+ KEY_ZoomReset int = 268964260
3084+
2763 KEY_Zstroke int = 167776533085 KEY_Zstroke int = 16777653
2764 3086
2765 KEY_a int = 973087 KEY_a int = 97
@@ -3440,6 +3762,16 @@ const (
3440 3762
3441 KEY_colon int = 583763 KEY_colon int = 58
3442 3764
3765+ KEY_combining_acute int = 16777985
3766+
3767+ KEY_combining_belowdot int = 16778019
3768+
3769+ KEY_combining_grave int = 16777984
3770+
3771+ KEY_combining_hook int = 16777993
3772+
3773+ KEY_combining_tilde int = 16777987
3774+
3443 KEY_comma int = 443775 KEY_comma int = 44
3444 3776
3445 KEY_containsas int = 167859313777 KEY_containsas int = 16785931
@@ -3472,6 +3804,8 @@ const (
3472 3804
3473 KEY_dead_O int = 651593805 KEY_dead_O int = 65159
3474 3806
3807+ KEY_dead_SCHWA int = 65163
3808+
3475 KEY_dead_U int = 651613809 KEY_dead_U int = 65161
3476 3810
3477 KEY_dead_a int = 651523811 KEY_dead_a int = 65152
@@ -3532,6 +3866,8 @@ const (
3532 3866
3533 KEY_dead_greek int = 651643867 KEY_dead_greek int = 65164
3534 3868
3869+ KEY_dead_hamza int = 65165
3870+
3535 KEY_dead_hook int = 651213871 KEY_dead_hook int = 65121
3536 3872
3537 KEY_dead_horn int = 651223873 KEY_dead_horn int = 65122
@@ -3556,6 +3892,8 @@ const (
3556 3892
3557 KEY_dead_psili int = 651243893 KEY_dead_psili int = 65124
3558 3894
3895+ KEY_dead_schwa int = 65162
3896+
3559 KEY_dead_semivoiced_sound int = 651193897 KEY_dead_semivoiced_sound int = 65119
3560 3898
3561 KEY_dead_small_schwa int = 651623899 KEY_dead_small_schwa int = 65162
@@ -3744,6 +4082,10 @@ const (
3744 4082
3745 KEY_greaterthanequal int = 22384083 KEY_greaterthanequal int = 2238
3746 4084
4085+ KEY_guillemetleft int = 171
4086+
4087+ KEY_guillemetright int = 187
4088+
3747 KEY_guillemotleft int = 1714089 KEY_guillemotleft int = 171
3748 4090
3749 KEY_guillemotright int = 1874091 KEY_guillemotright int = 187
@@ -4230,6 +4572,8 @@ const (
4230 4572
4231 KEY_ordfeminine int = 1704573 KEY_ordfeminine int = 170
4232 4574
4575+ KEY_ordmasculine int = 186
4576+
4233 KEY_oslash int = 2484577 KEY_oslash int = 248
4234 4578
4235 KEY_otilde int = 2454579 KEY_otilde int = 245
M v4/gdk/gdkmemorytexture.go +7 -0
@@ -218,6 +218,13 @@ func (x *MemoryTexture) Equal(Icon2Var gio.Icon) bool {
218 return cret218 return cret
219 }219 }
220 220
221+// Gets a hash for an icon.
222+func (x *MemoryTexture) Hash() uint {
223+
224+ cret := gio.XGIconHash(x.GoPointer())
225+ return cret
226+}
227+
221 // Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved228 // Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved
222 // back by calling g_icon_deserialize() on the returned value.229 // back by calling g_icon_deserialize() on the returned value.
223 // As serialization will avoid using raw icon data when possible, it only230 // As serialization will avoid using raw icon data when possible, it only
A v4/gdk/gdkmemorytexturebuilder.go +312 -0
@@ -0,0 +1,312 @@
1+// Package gdk was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT
2+package gdk
3+
4+import (
5+ "structs"
6+ "unsafe"
7+
8+ "github.com/jwijenbergh/purego"
9+ "github.com/jwijenbergh/puregotk/pkg/core"
10+ "github.com/jwijenbergh/puregotk/v4/cairo"
11+ "github.com/jwijenbergh/puregotk/v4/glib"
12+ "github.com/jwijenbergh/puregotk/v4/gobject"
13+ "github.com/jwijenbergh/puregotk/v4/gobject/types"
14+)
15+
16+type MemoryTextureBuilderClass struct {
17+ _ structs.HostLayout
18+}
19+
20+func (x *MemoryTextureBuilderClass) GoPointer() uintptr {
21+ return uintptr(unsafe.Pointer(x))
22+}
23+
24+// Constructs [class@Gdk.Texture] objects from system memory provided
25+// via [struct@GLib.Bytes].
26+//
27+// The operation is quite simple: Create a texture builder, set all the necessary
28+// properties - keep in mind that the properties [property@Gdk.MemoryTextureBuilder:bytes],
29+// [property@Gdk.MemoryTextureBuilder:stride], [property@Gdk.MemoryTextureBuilder:width],
30+// and [property@Gdk.MemoryTextureBuilder:height] are mandatory - and then call
31+// [method@Gdk.MemoryTextureBuilder.build] to create the new texture.
32+//
33+// `GdkMemoryTextureBuilder` can be used for quick one-shot construction of
34+// textures as well as kept around and reused to construct multiple textures.
35+type MemoryTextureBuilder struct {
36+ gobject.Object
37+}
38+
39+var xMemoryTextureBuilderGLibType func() types.GType
40+
41+func MemoryTextureBuilderGLibType() types.GType {
42+ return xMemoryTextureBuilderGLibType()
43+}
44+
45+func MemoryTextureBuilderNewFromInternalPtr(ptr uintptr) *MemoryTextureBuilder {
46+ cls := &MemoryTextureBuilder{}
47+ cls.Ptr = ptr
48+ return cls
49+}
50+
51+var xNewMemoryTextureBuilder func() uintptr
52+
53+// Creates a new texture builder.
54+func NewMemoryTextureBuilder() *MemoryTextureBuilder {
55+ var cls *MemoryTextureBuilder
56+
57+ cret := xNewMemoryTextureBuilder()
58+
59+ if cret == 0 {
60+ return nil
61+ }
62+ cls = &MemoryTextureBuilder{}
63+ cls.Ptr = cret
64+ return cls
65+}
66+
67+var xMemoryTextureBuilderBuild func(uintptr) uintptr
68+
69+// Builds a new `GdkTexture` with the values set up in the builder.
70+//
71+// Note that it is a programming error to call this function if any mandatory
72+// property has not been set.
73+//
74+// It is possible to call this function multiple times to create multiple textures,
75+// possibly with changing properties in between.
76+func (x *MemoryTextureBuilder) Build() *Texture {
77+ var cls *Texture
78+
79+ cret := xMemoryTextureBuilderBuild(x.GoPointer())
80+
81+ if cret == 0 {
82+ return nil
83+ }
84+ cls = &Texture{}
85+ cls.Ptr = cret
86+ return cls
87+}
88+
89+var xMemoryTextureBuilderGetBytes func(uintptr) *glib.Bytes
90+
91+// Gets the bytes previously set via gdk_memory_texture_builder_set_bytes()
92+// or %NULL if none was set.
93+func (x *MemoryTextureBuilder) GetBytes() *glib.Bytes {
94+
95+ cret := xMemoryTextureBuilderGetBytes(x.GoPointer())
96+ return cret
97+}
98+
99+var xMemoryTextureBuilderGetColorState func(uintptr) *ColorState
100+
101+// Gets the colorstate previously set via gdk_memory_texture_builder_set_color_state().
102+func (x *MemoryTextureBuilder) GetColorState() *ColorState {
103+
104+ cret := xMemoryTextureBuilderGetColorState(x.GoPointer())
105+ return cret
106+}
107+
108+var xMemoryTextureBuilderGetFormat func(uintptr) MemoryFormat
109+
110+// Gets the format previously set via gdk_memory_texture_builder_set_format().
111+func (x *MemoryTextureBuilder) GetFormat() MemoryFormat {
112+
113+ cret := xMemoryTextureBuilderGetFormat(x.GoPointer())
114+ return cret
115+}
116+
117+var xMemoryTextureBuilderGetHeight func(uintptr) int
118+
119+// Gets the height previously set via gdk_memory_texture_builder_set_height()
120+// or 0 if the height wasn't set.
121+func (x *MemoryTextureBuilder) GetHeight() int {
122+
123+ cret := xMemoryTextureBuilderGetHeight(x.GoPointer())
124+ return cret
125+}
126+
127+var xMemoryTextureBuilderGetStride func(uintptr) uint
128+
129+// Gets the stride previously set via gdk_memory_texture_builder_set_stride().
130+func (x *MemoryTextureBuilder) GetStride() uint {
131+
132+ cret := xMemoryTextureBuilderGetStride(x.GoPointer())
133+ return cret
134+}
135+
136+var xMemoryTextureBuilderGetUpdateRegion func(uintptr) *cairo.Region
137+
138+// Gets the region previously set via gdk_memory_texture_builder_set_update_region()
139+// or %NULL if none was set.
140+func (x *MemoryTextureBuilder) GetUpdateRegion() *cairo.Region {
141+
142+ cret := xMemoryTextureBuilderGetUpdateRegion(x.GoPointer())
143+ return cret
144+}
145+
146+var xMemoryTextureBuilderGetUpdateTexture func(uintptr) uintptr
147+
148+// Gets the texture previously set via gdk_memory_texture_builder_set_update_texture()
149+// or %NULL if none was set.
150+func (x *MemoryTextureBuilder) GetUpdateTexture() *Texture {
151+ var cls *Texture
152+
153+ cret := xMemoryTextureBuilderGetUpdateTexture(x.GoPointer())
154+
155+ if cret == 0 {
156+ return nil
157+ }
158+ gobject.IncreaseRef(cret)
159+ cls = &Texture{}
160+ cls.Ptr = cret
161+ return cls
162+}
163+
164+var xMemoryTextureBuilderGetWidth func(uintptr) int
165+
166+// Gets the width previously set via gdk_memory_texture_builder_set_width()
167+// or 0 if the width wasn't set.
168+func (x *MemoryTextureBuilder) GetWidth() int {
169+
170+ cret := xMemoryTextureBuilderGetWidth(x.GoPointer())
171+ return cret
172+}
173+
174+var xMemoryTextureBuilderSetBytes func(uintptr, *glib.Bytes)
175+
176+// Sets the data to be shown but the texture.
177+//
178+// The bytes must be set before calling [method@Gdk.MemoryTextureBuilder.build].
179+func (x *MemoryTextureBuilder) SetBytes(BytesVar *glib.Bytes) {
180+
181+ xMemoryTextureBuilderSetBytes(x.GoPointer(), BytesVar)
182+
183+}
184+
185+var xMemoryTextureBuilderSetColorState func(uintptr, *ColorState)
186+
187+// Sets the colorstate describing the data.
188+//
189+// By default, the sRGB colorstate is used. If you don't know
190+// what colorstates are, this is probably the right thing.
191+func (x *MemoryTextureBuilder) SetColorState(ColorStateVar *ColorState) {
192+
193+ xMemoryTextureBuilderSetColorState(x.GoPointer(), ColorStateVar)
194+
195+}
196+
197+var xMemoryTextureBuilderSetFormat func(uintptr, MemoryFormat)
198+
199+// Sets the format of the bytes.
200+//
201+// The default is `GDK_MEMORY_R8G8B8A8_PREMULTIPLIED`.
202+func (x *MemoryTextureBuilder) SetFormat(FormatVar MemoryFormat) {
203+
204+ xMemoryTextureBuilderSetFormat(x.GoPointer(), FormatVar)
205+
206+}
207+
208+var xMemoryTextureBuilderSetHeight func(uintptr, int)
209+
210+// Sets the height of the texture.
211+//
212+// The height must be set before calling [method@Gdk.MemoryTextureBuilder.build].
213+func (x *MemoryTextureBuilder) SetHeight(HeightVar int) {
214+
215+ xMemoryTextureBuilderSetHeight(x.GoPointer(), HeightVar)
216+
217+}
218+
219+var xMemoryTextureBuilderSetStride func(uintptr, uint)
220+
221+// Sets the rowstride of the bytes used.
222+//
223+// The rowstride must be set before calling [method@Gdk.MemoryTextureBuilder.build].
224+func (x *MemoryTextureBuilder) SetStride(StrideVar uint) {
225+
226+ xMemoryTextureBuilderSetStride(x.GoPointer(), StrideVar)
227+
228+}
229+
230+var xMemoryTextureBuilderSetUpdateRegion func(uintptr, *cairo.Region)
231+
232+// Sets the region to be updated by this texture.
233+//
234+// Together with [property@Gdk.MemoryTextureBuilder:update-texture],
235+// this describes an update of a previous texture.
236+//
237+// When rendering animations of large textures, it is possible that
238+// consecutive textures are only updating contents in parts of the texture.
239+// It is then possible to describe this update via these two properties,
240+// so that GTK can avoid rerendering parts that did not change.
241+//
242+// An example would be a screen recording where only the mouse pointer moves.
243+func (x *MemoryTextureBuilder) SetUpdateRegion(RegionVar *cairo.Region) {
244+
245+ xMemoryTextureBuilderSetUpdateRegion(x.GoPointer(), RegionVar)
246+
247+}
248+
249+var xMemoryTextureBuilderSetUpdateTexture func(uintptr, uintptr)
250+
251+// Sets the texture to be updated by this texture.
252+//
253+// See [method@Gdk.MemoryTextureBuilder.set_update_region] for an explanation.
254+func (x *MemoryTextureBuilder) SetUpdateTexture(TextureVar *Texture) {
255+
256+ xMemoryTextureBuilderSetUpdateTexture(x.GoPointer(), TextureVar.GoPointer())
257+
258+}
259+
260+var xMemoryTextureBuilderSetWidth func(uintptr, int)
261+
262+// Sets the width of the texture.
263+//
264+// The width must be set before calling [method@Gdk.MemoryTextureBuilder.build].
265+func (x *MemoryTextureBuilder) SetWidth(WidthVar int) {
266+
267+ xMemoryTextureBuilderSetWidth(x.GoPointer(), WidthVar)
268+
269+}
270+
271+func (c *MemoryTextureBuilder) GoPointer() uintptr {
272+ if c == nil {
273+ return 0
274+ }
275+ return c.Ptr
276+}
277+
278+func (c *MemoryTextureBuilder) SetGoPointer(ptr uintptr) {
279+ c.Ptr = ptr
280+}
281+
282+func init() {
283+ core.SetPackageName("GDK", "gtk4")
284+ core.SetSharedLibrary("GDK", "libgtk-4.so.1")
285+ lib, err := purego.Dlopen(core.GetPath("GDK"), purego.RTLD_NOW|purego.RTLD_GLOBAL)
286+ if err != nil {
287+ panic(err)
288+ }
289+
290+ core.PuregoSafeRegister(&xMemoryTextureBuilderGLibType, lib, "gdk_memory_texture_builder_get_type")
291+
292+ core.PuregoSafeRegister(&xNewMemoryTextureBuilder, lib, "gdk_memory_texture_builder_new")
293+
294+ core.PuregoSafeRegister(&xMemoryTextureBuilderBuild, lib, "gdk_memory_texture_builder_build")
295+ core.PuregoSafeRegister(&xMemoryTextureBuilderGetBytes, lib, "gdk_memory_texture_builder_get_bytes")
296+ core.PuregoSafeRegister(&xMemoryTextureBuilderGetColorState, lib, "gdk_memory_texture_builder_get_color_state")
297+ core.PuregoSafeRegister(&xMemoryTextureBuilderGetFormat, lib, "gdk_memory_texture_builder_get_format")
298+ core.PuregoSafeRegister(&xMemoryTextureBuilderGetHeight, lib, "gdk_memory_texture_builder_get_height")
299+ core.PuregoSafeRegister(&xMemoryTextureBuilderGetStride, lib, "gdk_memory_texture_builder_get_stride")
300+ core.PuregoSafeRegister(&xMemoryTextureBuilderGetUpdateRegion, lib, "gdk_memory_texture_builder_get_update_region")
301+ core.PuregoSafeRegister(&xMemoryTextureBuilderGetUpdateTexture, lib, "gdk_memory_texture_builder_get_update_texture")
302+ core.PuregoSafeRegister(&xMemoryTextureBuilderGetWidth, lib, "gdk_memory_texture_builder_get_width")
303+ core.PuregoSafeRegister(&xMemoryTextureBuilderSetBytes, lib, "gdk_memory_texture_builder_set_bytes")
304+ core.PuregoSafeRegister(&xMemoryTextureBuilderSetColorState, lib, "gdk_memory_texture_builder_set_color_state")
305+ core.PuregoSafeRegister(&xMemoryTextureBuilderSetFormat, lib, "gdk_memory_texture_builder_set_format")
306+ core.PuregoSafeRegister(&xMemoryTextureBuilderSetHeight, lib, "gdk_memory_texture_builder_set_height")
307+ core.PuregoSafeRegister(&xMemoryTextureBuilderSetStride, lib, "gdk_memory_texture_builder_set_stride")
308+ core.PuregoSafeRegister(&xMemoryTextureBuilderSetUpdateRegion, lib, "gdk_memory_texture_builder_set_update_region")
309+ core.PuregoSafeRegister(&xMemoryTextureBuilderSetUpdateTexture, lib, "gdk_memory_texture_builder_set_update_texture")
310+ core.PuregoSafeRegister(&xMemoryTextureBuilderSetWidth, lib, "gdk_memory_texture_builder_set_width")
311+
312+}
M v4/gdk/gdkmonitor.go +33 -3
@@ -46,8 +46,7 @@ const (
46 SubpixelLayoutVerticalBgrValue SubpixelLayout = 546 SubpixelLayoutVerticalBgrValue SubpixelLayout = 5
47 )47 )
48 48
49-// `GdkMonitor` objects represent the individual outputs that are49+// Represents the individual outputs that are associated with a `GdkDisplay`.
50-// associated with a `GdkDisplay`.
51 //50 //
52 // `GdkDisplay` keeps a `GListModel` to enumerate and monitor51 // `GdkDisplay` keeps a `GListModel` to enumerate and monitor
53 // monitors with [method@Gdk.Display.get_monitors]. You can use52 // monitors with [method@Gdk.Display.get_monitors]. You can use
@@ -72,12 +71,27 @@ func MonitorNewFromInternalPtr(ptr uintptr) *Monitor {
72 var xMonitorGetConnector func(uintptr) string71 var xMonitorGetConnector func(uintptr) string
73 72
74 // Gets the name of the monitor's connector, if available.73 // Gets the name of the monitor's connector, if available.
74+//
75+// These are strings such as "eDP-1", or "HDMI-2". They depend
76+// on software and hardware configuration, and should not be
77+// relied on as stable identifiers of a specific monitor.
75 func (x *Monitor) GetConnector() string {78 func (x *Monitor) GetConnector() string {
76 79
77 cret := xMonitorGetConnector(x.GoPointer())80 cret := xMonitorGetConnector(x.GoPointer())
78 return cret81 return cret
79 }82 }
80 83
84+var xMonitorGetDescription func(uintptr) string
85+
86+// Gets a string describing the monitor, if available.
87+//
88+// This can be used to identify a monitor in the UI.
89+func (x *Monitor) GetDescription() string {
90+
91+ cret := xMonitorGetDescription(x.GoPointer())
92+ return cret
93+}
94+
81 var xMonitorGetDisplay func(uintptr) uintptr95 var xMonitorGetDisplay func(uintptr) uintptr
82 96
83 // Gets the display that this monitor belongs to.97 // Gets the display that this monitor belongs to.
@@ -101,7 +115,7 @@ var xMonitorGetGeometry func(uintptr, *Rectangle)
101 // display coordinate space.115 // display coordinate space.
102 //116 //
103 // The returned geometry is in ”application pixels”, not in117 // The returned geometry is in ”application pixels”, not in
104-// ”device pixels” (see [method@Gdk.Monitor.get_scale_factor]).118+// ”device pixels” (see [method@Gdk.Monitor.get_scale]).
105 func (x *Monitor) GetGeometry(GeometryVar *Rectangle) {119 func (x *Monitor) GetGeometry(GeometryVar *Rectangle) {
106 120
107 xMonitorGetGeometry(x.GoPointer(), GeometryVar)121 xMonitorGetGeometry(x.GoPointer(), GeometryVar)
@@ -153,6 +167,20 @@ func (x *Monitor) GetRefreshRate() int {
153 return cret167 return cret
154 }168 }
155 169
170+var xMonitorGetScale func(uintptr) float64
171+
172+// Gets the internal scale factor that maps from monitor coordinates
173+// to device pixels.
174+//
175+// This can be used if you want to create pixel based data for a
176+// particular monitor, but most of the time you’re drawing to a surface
177+// where it is better to use [method@Gdk.Surface.get_scale] instead.
178+func (x *Monitor) GetScale() float64 {
179+
180+ cret := xMonitorGetScale(x.GoPointer())
181+ return cret
182+}
183+
156 var xMonitorGetScaleFactor func(uintptr) int184 var xMonitorGetScaleFactor func(uintptr) int
157 185
158 // Gets the internal scale factor that maps from monitor coordinates186 // Gets the internal scale factor that maps from monitor coordinates
@@ -246,12 +274,14 @@ func init() {
246 core.PuregoSafeRegister(&xMonitorGLibType, lib, "gdk_monitor_get_type")274 core.PuregoSafeRegister(&xMonitorGLibType, lib, "gdk_monitor_get_type")
247 275
248 core.PuregoSafeRegister(&xMonitorGetConnector, lib, "gdk_monitor_get_connector")276 core.PuregoSafeRegister(&xMonitorGetConnector, lib, "gdk_monitor_get_connector")
277+ core.PuregoSafeRegister(&xMonitorGetDescription, lib, "gdk_monitor_get_description")
249 core.PuregoSafeRegister(&xMonitorGetDisplay, lib, "gdk_monitor_get_display")278 core.PuregoSafeRegister(&xMonitorGetDisplay, lib, "gdk_monitor_get_display")
250 core.PuregoSafeRegister(&xMonitorGetGeometry, lib, "gdk_monitor_get_geometry")279 core.PuregoSafeRegister(&xMonitorGetGeometry, lib, "gdk_monitor_get_geometry")
251 core.PuregoSafeRegister(&xMonitorGetHeightMm, lib, "gdk_monitor_get_height_mm")280 core.PuregoSafeRegister(&xMonitorGetHeightMm, lib, "gdk_monitor_get_height_mm")
252 core.PuregoSafeRegister(&xMonitorGetManufacturer, lib, "gdk_monitor_get_manufacturer")281 core.PuregoSafeRegister(&xMonitorGetManufacturer, lib, "gdk_monitor_get_manufacturer")
253 core.PuregoSafeRegister(&xMonitorGetModel, lib, "gdk_monitor_get_model")282 core.PuregoSafeRegister(&xMonitorGetModel, lib, "gdk_monitor_get_model")
254 core.PuregoSafeRegister(&xMonitorGetRefreshRate, lib, "gdk_monitor_get_refresh_rate")283 core.PuregoSafeRegister(&xMonitorGetRefreshRate, lib, "gdk_monitor_get_refresh_rate")
284+ core.PuregoSafeRegister(&xMonitorGetScale, lib, "gdk_monitor_get_scale")
255 core.PuregoSafeRegister(&xMonitorGetScaleFactor, lib, "gdk_monitor_get_scale_factor")285 core.PuregoSafeRegister(&xMonitorGetScaleFactor, lib, "gdk_monitor_get_scale_factor")
256 core.PuregoSafeRegister(&xMonitorGetSubpixelLayout, lib, "gdk_monitor_get_subpixel_layout")286 core.PuregoSafeRegister(&xMonitorGetSubpixelLayout, lib, "gdk_monitor_get_subpixel_layout")
257 core.PuregoSafeRegister(&xMonitorGetWidthMm, lib, "gdk_monitor_get_width_mm")287 core.PuregoSafeRegister(&xMonitorGetWidthMm, lib, "gdk_monitor_get_width_mm")
M v4/gdk/gdkpaintable.go +58 -8
@@ -42,6 +42,11 @@ func (x *PaintableInterface) GoPointer() uintptr {
42 }42 }
43 43
44 // OverrideSnapshot sets the callback function.44 // OverrideSnapshot sets the callback function.
45+// Snapshot the paintable. The given @width and @height are
46+//
47+// guaranteed to be larger than 0.0. The resulting snapshot must modify
48+// only the area in the rectangle from (0,0) to (width, height).
49+// This is the only function that must be implemented for this interface.
45 func (x *PaintableInterface) OverrideSnapshot(cb func(Paintable, *Snapshot, float64, float64)) {50 func (x *PaintableInterface) OverrideSnapshot(cb func(Paintable, *Snapshot, float64, float64)) {
46 if cb == nil {51 if cb == nil {
47 x.xSnapshot = 052 x.xSnapshot = 0
@@ -53,6 +58,11 @@ func (x *PaintableInterface) OverrideSnapshot(cb func(Paintable, *Snapshot, floa
53 }58 }
54 59
55 // GetSnapshot gets the callback function.60 // GetSnapshot gets the callback function.
61+// Snapshot the paintable. The given @width and @height are
62+//
63+// guaranteed to be larger than 0.0. The resulting snapshot must modify
64+// only the area in the rectangle from (0,0) to (width, height).
65+// This is the only function that must be implemented for this interface.
56 func (x *PaintableInterface) GetSnapshot() func(Paintable, *Snapshot, float64, float64) {66 func (x *PaintableInterface) GetSnapshot() func(Paintable, *Snapshot, float64, float64) {
57 if x.xSnapshot == 0 {67 if x.xSnapshot == 0 {
58 return nil68 return nil
@@ -65,6 +75,10 @@ func (x *PaintableInterface) GetSnapshot() func(Paintable, *Snapshot, float64, f
65 }75 }
66 76
67 // OverrideGetCurrentImage sets the callback function.77 // OverrideGetCurrentImage sets the callback function.
78+// return a `GdkPaintable` that does not change over
79+//
80+// time. This means the `GDK_PAINTABLE_STATIC_SIZE` and
81+// `GDK_PAINTABLE_STATIC_CONTENTS` flag are set.
68 func (x *PaintableInterface) OverrideGetCurrentImage(cb func(Paintable) *PaintableBase) {82 func (x *PaintableInterface) OverrideGetCurrentImage(cb func(Paintable) *PaintableBase) {
69 if cb == nil {83 if cb == nil {
70 x.xGetCurrentImage = 084 x.xGetCurrentImage = 0
@@ -80,6 +94,10 @@ func (x *PaintableInterface) OverrideGetCurrentImage(cb func(Paintable) *Paintab
80 }94 }
81 95
82 // GetGetCurrentImage gets the callback function.96 // GetGetCurrentImage gets the callback function.
97+// return a `GdkPaintable` that does not change over
98+//
99+// time. This means the `GDK_PAINTABLE_STATIC_SIZE` and
100+// `GDK_PAINTABLE_STATIC_CONTENTS` flag are set.
83 func (x *PaintableInterface) GetGetCurrentImage() func(Paintable) *PaintableBase {101 func (x *PaintableInterface) GetGetCurrentImage() func(Paintable) *PaintableBase {
84 if x.xGetCurrentImage == 0 {102 if x.xGetCurrentImage == 0 {
85 return nil103 return nil
@@ -98,6 +116,9 @@ func (x *PaintableInterface) GetGetCurrentImage() func(Paintable) *PaintableBase
98 }116 }
99 117
100 // OverrideGetFlags sets the callback function.118 // OverrideGetFlags sets the callback function.
119+// Get the flags for this instance. See [flags@Gdk.PaintableFlags]
120+//
121+// for details.
101 func (x *PaintableInterface) OverrideGetFlags(cb func(Paintable) PaintableFlags) {122 func (x *PaintableInterface) OverrideGetFlags(cb func(Paintable) PaintableFlags) {
102 if cb == nil {123 if cb == nil {
103 x.xGetFlags = 0124 x.xGetFlags = 0
@@ -109,6 +130,9 @@ func (x *PaintableInterface) OverrideGetFlags(cb func(Paintable) PaintableFlags)
109 }130 }
110 131
111 // GetGetFlags gets the callback function.132 // GetGetFlags gets the callback function.
133+// Get the flags for this instance. See [flags@Gdk.PaintableFlags]
134+//
135+// for details.
112 func (x *PaintableInterface) GetGetFlags() func(Paintable) PaintableFlags {136 func (x *PaintableInterface) GetGetFlags() func(Paintable) PaintableFlags {
113 if x.xGetFlags == 0 {137 if x.xGetFlags == 0 {
114 return nil138 return nil
@@ -121,6 +145,10 @@ func (x *PaintableInterface) GetGetFlags() func(Paintable) PaintableFlags {
121 }145 }
122 146
123 // OverrideGetIntrinsicWidth sets the callback function.147 // OverrideGetIntrinsicWidth sets the callback function.
148+// The preferred width for this object to be
149+//
150+// snapshot at or 0 if none. This is purely a hint. The object must still
151+// be able to render at any size.
124 func (x *PaintableInterface) OverrideGetIntrinsicWidth(cb func(Paintable) int) {152 func (x *PaintableInterface) OverrideGetIntrinsicWidth(cb func(Paintable) int) {
125 if cb == nil {153 if cb == nil {
126 x.xGetIntrinsicWidth = 0154 x.xGetIntrinsicWidth = 0
@@ -132,6 +160,10 @@ func (x *PaintableInterface) OverrideGetIntrinsicWidth(cb func(Paintable) int) {
132 }160 }
133 161
134 // GetGetIntrinsicWidth gets the callback function.162 // GetGetIntrinsicWidth gets the callback function.
163+// The preferred width for this object to be
164+//
165+// snapshot at or 0 if none. This is purely a hint. The object must still
166+// be able to render at any size.
135 func (x *PaintableInterface) GetGetIntrinsicWidth() func(Paintable) int {167 func (x *PaintableInterface) GetGetIntrinsicWidth() func(Paintable) int {
136 if x.xGetIntrinsicWidth == 0 {168 if x.xGetIntrinsicWidth == 0 {
137 return nil169 return nil
@@ -144,6 +176,10 @@ func (x *PaintableInterface) GetGetIntrinsicWidth() func(Paintable) int {
144 }176 }
145 177
146 // OverrideGetIntrinsicHeight sets the callback function.178 // OverrideGetIntrinsicHeight sets the callback function.
179+// The preferred height for this object to be
180+//
181+// snapshot at or 0 if none. This is purely a hint. The object must still
182+// be able to render at any size.
147 func (x *PaintableInterface) OverrideGetIntrinsicHeight(cb func(Paintable) int) {183 func (x *PaintableInterface) OverrideGetIntrinsicHeight(cb func(Paintable) int) {
148 if cb == nil {184 if cb == nil {
149 x.xGetIntrinsicHeight = 0185 x.xGetIntrinsicHeight = 0
@@ -155,6 +191,10 @@ func (x *PaintableInterface) OverrideGetIntrinsicHeight(cb func(Paintable) int)
155 }191 }
156 192
157 // GetGetIntrinsicHeight gets the callback function.193 // GetGetIntrinsicHeight gets the callback function.
194+// The preferred height for this object to be
195+//
196+// snapshot at or 0 if none. This is purely a hint. The object must still
197+// be able to render at any size.
158 func (x *PaintableInterface) GetGetIntrinsicHeight() func(Paintable) int {198 func (x *PaintableInterface) GetGetIntrinsicHeight() func(Paintable) int {
159 if x.xGetIntrinsicHeight == 0 {199 if x.xGetIntrinsicHeight == 0 {
160 return nil200 return nil
@@ -167,6 +207,11 @@ func (x *PaintableInterface) GetGetIntrinsicHeight() func(Paintable) int {
167 }207 }
168 208
169 // OverrideGetIntrinsicAspectRatio sets the callback function.209 // OverrideGetIntrinsicAspectRatio sets the callback function.
210+// The preferred aspect ratio for this object
211+//
212+// or 0 if none. If both [vfunc@Gdk.Paintable.get_intrinsic_width]
213+// and [vfunc@Gdk.Paintable.get_intrinsic_height] return non-zero
214+// values, this function should return the aspect ratio computed from those.
170 func (x *PaintableInterface) OverrideGetIntrinsicAspectRatio(cb func(Paintable) float64) {215 func (x *PaintableInterface) OverrideGetIntrinsicAspectRatio(cb func(Paintable) float64) {
171 if cb == nil {216 if cb == nil {
172 x.xGetIntrinsicAspectRatio = 0217 x.xGetIntrinsicAspectRatio = 0
@@ -178,6 +223,11 @@ func (x *PaintableInterface) OverrideGetIntrinsicAspectRatio(cb func(Paintable)
178 }223 }
179 224
180 // GetGetIntrinsicAspectRatio gets the callback function.225 // GetGetIntrinsicAspectRatio gets the callback function.
226+// The preferred aspect ratio for this object
227+//
228+// or 0 if none. If both [vfunc@Gdk.Paintable.get_intrinsic_width]
229+// and [vfunc@Gdk.Paintable.get_intrinsic_height] return non-zero
230+// values, this function should return the aspect ratio computed from those.
181 func (x *PaintableInterface) GetGetIntrinsicAspectRatio() func(Paintable) float64 {231 func (x *PaintableInterface) GetGetIntrinsicAspectRatio() func(Paintable) float64 {
182 if x.xGetIntrinsicAspectRatio == 0 {232 if x.xGetIntrinsicAspectRatio == 0 {
183 return nil233 return nil
@@ -189,8 +239,7 @@ func (x *PaintableInterface) GetGetIntrinsicAspectRatio() func(Paintable) float6
189 }239 }
190 }240 }
191 241
192-// `GdkPaintable` is a simple interface used by GTK to represent content that242+// An interface for content that can be painted.
193-// can be painted.
194 //243 //
195 // The content of a `GdkPaintable` can be painted anywhere at any size244 // The content of a `GdkPaintable` can be painted anywhere at any size
196 // without requiring any sort of layout. The interface is inspired by245 // without requiring any sort of layout. The interface is inspired by
@@ -206,7 +255,7 @@ func (x *PaintableInterface) GetGetIntrinsicAspectRatio() func(Paintable) float6
206 // to do, it is suggested that you scale your paintable ignoring any potential255 // to do, it is suggested that you scale your paintable ignoring any potential
207 // aspect ratio.256 // aspect ratio.
208 //257 //
209-// The contents that a `GdkPaintable` produces may depend on the [class@GdkSnapshot]258+// The contents that a `GdkPaintable` produces may depend on the [class@Gdk.Snapshot]
210 // passed to it. For example, paintables may decide to use more detailed images259 // passed to it. For example, paintables may decide to use more detailed images
211 // on higher resolution screens or when OpenGL is available. A `GdkPaintable`260 // on higher resolution screens or when OpenGL is available. A `GdkPaintable`
212 // will however always produce the same output for the same snapshot.261 // will however always produce the same output for the same snapshot.
@@ -214,7 +263,7 @@ func (x *PaintableInterface) GetGetIntrinsicAspectRatio() func(Paintable) float6
214 // A `GdkPaintable` may change its contents, meaning that it will now produce263 // A `GdkPaintable` may change its contents, meaning that it will now produce
215 // a different output with the same snapshot. Once that happens, it will call264 // a different output with the same snapshot. Once that happens, it will call
216 // [method@Gdk.Paintable.invalidate_contents] which will emit the265 // [method@Gdk.Paintable.invalidate_contents] which will emit the
217-// [signal@GdkPaintable::invalidate-contents] signal. If a paintable is known266+// [signal@Gdk.Paintable::invalidate-contents] signal. If a paintable is known
218 // to never change its contents, it will set the %GDK_PAINTABLE_STATIC_CONTENTS267 // to never change its contents, it will set the %GDK_PAINTABLE_STATIC_CONTENTS
219 // flag. If a consumer cannot deal with changing contents, it may call268 // flag. If a consumer cannot deal with changing contents, it may call
220 // [method@Gdk.Paintable.get_current_image] which will return a static269 // [method@Gdk.Paintable.get_current_image] which will return a static
@@ -225,7 +274,7 @@ func (x *PaintableInterface) GetGetIntrinsicAspectRatio() func(Paintable) float6
225 // can use this information to layout thepaintable appropriately. Just like the274 // can use this information to layout thepaintable appropriately. Just like the
226 // contents, the size of a paintable can change. A paintable will indicate this275 // contents, the size of a paintable can change. A paintable will indicate this
227 // by calling [method@Gdk.Paintable.invalidate_size] which will emit the276 // by calling [method@Gdk.Paintable.invalidate_size] which will emit the
228-// [signal@GdkPaintable::invalidate-size] signal. And just like for contents,277+// [signal@Gdk.Paintable::invalidate-size] signal. And just like for contents,
229 // if a paintable is known to never change its size, it will set the278 // if a paintable is known to never change its size, it will set the
230 // %GDK_PAINTABLE_STATIC_SIZE flag.279 // %GDK_PAINTABLE_STATIC_SIZE flag.
231 //280 //
@@ -437,11 +486,11 @@ func PaintableFlagsGLibType() types.GType {
437 const (486 const (
438 487
439 // The size is immutable.488 // The size is immutable.
440- // The [signal@GdkPaintable::invalidate-size] signal will never be489+ // The [signal@Gdk.Paintable::invalidate-size] signal will never be
441 // emitted.490 // emitted.
442 PaintableStaticSizeValue PaintableFlags = 1491 PaintableStaticSizeValue PaintableFlags = 1
443 // The content is immutable.492 // The content is immutable.
444- // The [signal@GdkPaintable::invalidate-contents] signal will never be493+ // The [signal@Gdk.Paintable::invalidate-contents] signal will never be
445 // emitted.494 // emitted.
446 PaintableStaticContentsValue PaintableFlags = 2495 PaintableStaticContentsValue PaintableFlags = 2
447 )496 )
@@ -453,7 +502,8 @@ var xPaintableNewEmpty func(int, int) uintptr
453 // This is often useful for implementing the502 // This is often useful for implementing the
454 // [vfunc@Gdk.Paintable.get_current_image] virtual function503 // [vfunc@Gdk.Paintable.get_current_image] virtual function
455 // when the paintable is in an incomplete state (like a504 // when the paintable is in an incomplete state (like a
456-// [class@Gtk.MediaStream] before receiving the first frame).505+// [GtkMediaStream](../gtk4/class.MediaStream.html) before receiving
506+// the first frame).
457 func PaintableNewEmpty(IntrinsicWidthVar int, IntrinsicHeightVar int) *PaintableBase {507 func PaintableNewEmpty(IntrinsicWidthVar int, IntrinsicHeightVar int) *PaintableBase {
458 var cls *PaintableBase508 var cls *PaintableBase
459 509
M v4/gdk/gdkpopup.go +4 -4
@@ -19,12 +19,12 @@ func (x *PopupInterface) GoPointer() uintptr {
19 return uintptr(unsafe.Pointer(x))19 return uintptr(unsafe.Pointer(x))
20 }20 }
21 21
22-// A `GdkPopup` is a surface that is attached to another surface.22+// A surface that is attached to another surface.
23 //23 //
24 // The `GdkPopup` is positioned relative to its parent surface.24 // The `GdkPopup` is positioned relative to its parent surface.
25 //25 //
26 // `GdkPopup`s are typically used to implement menus and similar popups.26 // `GdkPopup`s are typically used to implement menus and similar popups.
27-// They can be modal, which is indicated by the [property@GdkPopup:autohide]27+// They can be modal, which is indicated by the [property@Gdk.Popup:autohide]
28 // property.28 // property.
29 type Popup interface {29 type Popup interface {
30 GoPointer() uintptr30 GoPointer() uintptr
@@ -117,11 +117,11 @@ func (x *PopupBase) GetSurfaceAnchor() Gravity {
117 117
118 // Present @popup after having processed the `GdkPopupLayout` rules.118 // Present @popup after having processed the `GdkPopupLayout` rules.
119 //119 //
120-// If the popup was previously now showing, it will be showed,120+// If the popup was previously not showing, it will be shown,
121 // otherwise it will change position according to @layout.121 // otherwise it will change position according to @layout.
122 //122 //
123 // After calling this function, the result should be handled in response123 // After calling this function, the result should be handled in response
124-// to the [signal@GdkSurface::layout] signal being emitted. The resulting124+// to the [signal@Gdk.Surface::layout] signal being emitted. The resulting
125 // popup position can be queried using [method@Gdk.Popup.get_position_x],125 // popup position can be queried using [method@Gdk.Popup.get_position_x],
126 // [method@Gdk.Popup.get_position_y], and the resulting size will be sent as126 // [method@Gdk.Popup.get_position_y], and the resulting size will be sent as
127 // parameters in the layout signal. Use [method@Gdk.Popup.get_rect_anchor]127 // parameters in the layout signal. Use [method@Gdk.Popup.get_rect_anchor]
M v4/gdk/gdkpopuplayout.go +5 -5
@@ -10,8 +10,8 @@ import (
10 "github.com/jwijenbergh/puregotk/v4/gobject/types"10 "github.com/jwijenbergh/puregotk/v4/gobject/types"
11 )11 )
12 12
13-// The `GdkPopupLayout` struct contains information that is13+// Contains information that is necessary position a [iface@Gdk.Popup]
14-// necessary position a [iface@Gdk.Popup] relative to its parent.14+// relative to its parent.
15 //15 //
16 // The positioning requires a negotiation with the windowing system,16 // The positioning requires a negotiation with the windowing system,
17 // since it depends on external constraints, such as the position of17 // since it depends on external constraints, such as the position of
@@ -40,9 +40,9 @@ import (
40 // [method@Gdk.Popup.get_position_x], [method@Gdk.Popup.get_position_y],40 // [method@Gdk.Popup.get_position_x], [method@Gdk.Popup.get_position_y],
41 // [method@Gdk.Popup.get_rect_anchor] and [method@Gdk.Popup.get_surface_anchor]41 // [method@Gdk.Popup.get_rect_anchor] and [method@Gdk.Popup.get_surface_anchor]
42 // after the popup has been presented. This can be used to adjust the rendering.42 // after the popup has been presented. This can be used to adjust the rendering.
43-// For example, [class@Gtk.Popover] changes its arrow position accordingly.43+// For example, [GtkPopover](../gtk4/class.Popover.html) changes its arrow position
44-// But you have to be careful avoid changing the size of the popover, or it44+// accordingly. But you have to be careful avoid changing the size of the popover,
45-// has to be presented again.45+// or it has to be presented again.
46 type PopupLayout struct {46 type PopupLayout struct {
47 _ structs.HostLayout47 _ structs.HostLayout
48 }48 }
M v4/gdk/gdkrgba.go +4 -3
@@ -10,8 +10,7 @@ import (
10 "github.com/jwijenbergh/puregotk/v4/gobject/types"10 "github.com/jwijenbergh/puregotk/v4/gobject/types"
11 )11 )
12 12
13-// A `GdkRGBA` is used to represent a color, in a way that is compatible13+// Represents a color, in a way that is compatible with cairo’s notion of color.
14-// with cairo’s notion of color.
15 //14 //
16 // `GdkRGBA` is a convenient way to pass colors around. It’s based on15 // `GdkRGBA` is a convenient way to pass colors around. It’s based on
17 // cairo’s way to deal with colors and mirrors its behavior. All values16 // cairo’s way to deal with colors and mirrors its behavior. All values
@@ -109,7 +108,7 @@ var xRGBAParse func(uintptr, string) bool
109 //108 //
110 // The string can be either one of:109 // The string can be either one of:
111 //110 //
112-// - A standard name (Taken from the Css specification).111+// - A standard name (Taken from the CSS specification).
113 // - A hexadecimal value in the form “\#rgb”, “\#rrggbb”,112 // - A hexadecimal value in the form “\#rgb”, “\#rrggbb”,
114 // “\#rrrgggbbb” or ”\#rrrrggggbbbb”113 // “\#rrrgggbbb” or ”\#rrrrggggbbbb”
115 // - A hexadecimal value in the form “\#rgba”, “\#rrggbbaa”,114 // - A hexadecimal value in the form “\#rgba”, “\#rrggbbaa”,
@@ -117,6 +116,8 @@ var xRGBAParse func(uintptr, string) bool
117 // - A RGB color in the form “rgb(r,g,b)” (In this case the color116 // - A RGB color in the form “rgb(r,g,b)” (In this case the color
118 // will have full opacity)117 // will have full opacity)
119 // - A RGBA color in the form “rgba(r,g,b,a)”118 // - A RGBA color in the form “rgba(r,g,b,a)”
119+// - A HSL color in the form "hsl(hue, saturation, lightness)"
120+// - A HSLA color in the form "hsla(hue, saturation, lightness, alpha)"
120 //121 //
121 // Where “r”, “g”, “b” and “a” are respectively the red, green,122 // Where “r”, “g”, “b” and “a” are respectively the red, green,
122 // blue and alpha color values. In the last two cases, “r”, “g”,123 // blue and alpha color values. In the last two cases, “r”, “g”,
M v4/gdk/gdkseat.go +2 -3
@@ -37,11 +37,10 @@ const (
37 // The union of all pointing capabilities37 // The union of all pointing capabilities
38 SeatCapabilityAllPointingValue SeatCapabilities = 738 SeatCapabilityAllPointingValue SeatCapabilities = 7
39 // The union of all capabilities39 // The union of all capabilities
40- SeatCapabilityAllValue SeatCapabilities = 1540+ SeatCapabilityAllValue SeatCapabilities = 31
41 )41 )
42 42
43-// The `GdkSeat` object represents a collection of input devices43+// Represents a collection of input devices that belong to a user.
44-// that belong to a user.
45 type Seat struct {44 type Seat struct {
46 gobject.Object45 gobject.Object
47 }46 }
M v4/gdk/gdksnapshot.go +1 -1
@@ -19,7 +19,7 @@ func (x *SnapshotClass) GoPointer() uintptr {
19 19
20 // Base type for snapshot operations.20 // Base type for snapshot operations.
21 //21 //
22-// The subclass of `GdkSnapshot` used by GTK is [class@Gtk.Snapshot].22+// The subclass of `GdkSnapshot` used by GTK is [GtkSnapshot](../gtk4/class.Snapshot.html).
23 type Snapshot struct {23 type Snapshot struct {
24 gobject.Object24 gobject.Object
25 }25 }
M v4/gdk/gdksurface.go +26 -8
@@ -21,10 +21,10 @@ func (x *SurfaceClass) GoPointer() uintptr {
21 return uintptr(unsafe.Pointer(x))21 return uintptr(unsafe.Pointer(x))
22 }22 }
23 23
24-// A `GdkSurface` is a rectangular region on the screen.24+// Represents a rectangular region on the screen.
25 //25 //
26 // It’s a low-level object, used to implement high-level objects26 // It’s a low-level object, used to implement high-level objects
27-// such as [class@Gtk.Window] or [class@Gtk.Dialog] in GTK.27+// such as [GtkWindow](../gtk4/class.Window.html).
28 //28 //
29 // The surfaces you see in practice are either [iface@Gdk.Toplevel] or29 // The surfaces you see in practice are either [iface@Gdk.Toplevel] or
30 // [iface@Gdk.Popup], and those interfaces provide much of the required30 // [iface@Gdk.Popup], and those interfaces provide much of the required
@@ -160,9 +160,7 @@ func (x *Surface) CreateSimilarSurface(ContentVar cairo.Content, WidthVar int, H
160 160
161 var xSurfaceCreateVulkanContext func(uintptr) uintptr161 var xSurfaceCreateVulkanContext func(uintptr) uintptr
162 162
163-// Creates a new `GdkVulkanContext` for rendering on @surface.163+// Sets an error and returns %NULL.
164-//
165-// If the creation of the `GdkVulkanContext` failed, @error will be set.
166 func (x *Surface) CreateVulkanContext() (*VulkanContext, error) {164 func (x *Surface) CreateVulkanContext() (*VulkanContext, error) {
167 var cls *VulkanContext165 var cls *VulkanContext
168 var cerr *glib.Error166 var cerr *glib.Error
@@ -317,6 +315,25 @@ func (x *Surface) GetMapped() bool {
317 return cret315 return cret
318 }316 }
319 317
318+var xSurfaceGetScale func(uintptr) float64
319+
320+// Returns the internal scale that maps from surface coordinates
321+// to the actual device pixels.
322+//
323+// When the scale is bigger than 1, the windowing system prefers to get
324+// buffers with a resolution that is bigger than the surface size (e.g.
325+// to show the surface on a high-resolution display, or in a magnifier).
326+//
327+// Compare with [method@Gdk.Surface.get_scale_factor], which returns the
328+// next larger integer.
329+//
330+// The scale may change during the lifetime of the surface.
331+func (x *Surface) GetScale() float64 {
332+
333+ cret := xSurfaceGetScale(x.GoPointer())
334+ return cret
335+}
336+
320 var xSurfaceGetScaleFactor func(uintptr) int337 var xSurfaceGetScaleFactor func(uintptr) int
321 338
322 // Returns the internal scale factor that maps from surface coordinates339 // Returns the internal scale factor that maps from surface coordinates
@@ -329,7 +346,7 @@ var xSurfaceGetScaleFactor func(uintptr) int
329 // pixel-based data the scale value can be used to determine whether to346 // pixel-based data the scale value can be used to determine whether to
330 // use a pixel resource with higher resolution data.347 // use a pixel resource with higher resolution data.
331 //348 //
332-// The scale of a surface may change during runtime.349+// The scale factor may change during the lifetime of the surface.
333 func (x *Surface) GetScaleFactor() int {350 func (x *Surface) GetScaleFactor() int {
334 351
335 cret := xSurfaceGetScaleFactor(x.GoPointer())352 cret := xSurfaceGetScaleFactor(x.GoPointer())
@@ -355,7 +372,7 @@ var xSurfaceHide func(uintptr)
355 // For toplevel surfaces, withdraws them, so they will no longer be372 // For toplevel surfaces, withdraws them, so they will no longer be
356 // known to the window manager; for all surfaces, unmaps them, so373 // known to the window manager; for all surfaces, unmaps them, so
357 // they won’t be displayed. Normally done automatically as374 // they won’t be displayed. Normally done automatically as
358-// part of [method@Gtk.Widget.hide].375+// part of [gtk_widget_hide()](../gtk4/method.Widget.hide.html).
359 func (x *Surface) Hide() {376 func (x *Surface) Hide() {
360 377
361 xSurfaceHide(x.GoPointer())378 xSurfaceHide(x.GoPointer())
@@ -464,7 +481,7 @@ var xSurfaceSetOpaqueRegion func(uintptr, *cairo.Region)
464 // GTK will update this property automatically if the @surface background481 // GTK will update this property automatically if the @surface background
465 // is opaque, as we know where the opaque regions are. If your surface482 // is opaque, as we know where the opaque regions are. If your surface
466 // background is not opaque, please update this property in your483 // background is not opaque, please update this property in your
467-// [vfunc@Gtk.Widget.css_changed] handler.484+// [GtkWidgetClass.css_changed](../gtk4/vfunc.Widget.css_changed.html) handler.
468 func (x *Surface) SetOpaqueRegion(RegionVar *cairo.Region) {485 func (x *Surface) SetOpaqueRegion(RegionVar *cairo.Region) {
469 486
470 xSurfaceSetOpaqueRegion(x.GoPointer(), RegionVar)487 xSurfaceSetOpaqueRegion(x.GoPointer(), RegionVar)
@@ -624,6 +641,7 @@ func init() {
624 core.PuregoSafeRegister(&xSurfaceGetFrameClock, lib, "gdk_surface_get_frame_clock")641 core.PuregoSafeRegister(&xSurfaceGetFrameClock, lib, "gdk_surface_get_frame_clock")
625 core.PuregoSafeRegister(&xSurfaceGetHeight, lib, "gdk_surface_get_height")642 core.PuregoSafeRegister(&xSurfaceGetHeight, lib, "gdk_surface_get_height")
626 core.PuregoSafeRegister(&xSurfaceGetMapped, lib, "gdk_surface_get_mapped")643 core.PuregoSafeRegister(&xSurfaceGetMapped, lib, "gdk_surface_get_mapped")
644+ core.PuregoSafeRegister(&xSurfaceGetScale, lib, "gdk_surface_get_scale")
627 core.PuregoSafeRegister(&xSurfaceGetScaleFactor, lib, "gdk_surface_get_scale_factor")645 core.PuregoSafeRegister(&xSurfaceGetScaleFactor, lib, "gdk_surface_get_scale_factor")
628 core.PuregoSafeRegister(&xSurfaceGetWidth, lib, "gdk_surface_get_width")646 core.PuregoSafeRegister(&xSurfaceGetWidth, lib, "gdk_surface_get_width")
629 core.PuregoSafeRegister(&xSurfaceHide, lib, "gdk_surface_hide")647 core.PuregoSafeRegister(&xSurfaceHide, lib, "gdk_surface_hide")
M v4/gdk/gdktexture.go +67 -6
@@ -44,20 +44,41 @@ const (
44 TextureErrorUnsupportedFormatValue TextureError = 344 TextureErrorUnsupportedFormatValue TextureError = 3
45 )45 )
46 46
47-// `GdkTexture` is the basic element used to refer to pixel data.47+var xTextureErrorQuark func() glib.Quark
48+
49+// Registers an error quark for [class@Gdk.Texture] errors.
50+func TextureErrorQuark() glib.Quark {
51+
52+ cret := xTextureErrorQuark()
53+ return cret
54+}
55+
56+// Refers to pixel data in various forms.
48 //57 //
49 // It is primarily meant for pixel data that will not change over58 // It is primarily meant for pixel data that will not change over
50 // multiple frames, and will be used for a long time.59 // multiple frames, and will be used for a long time.
51 //60 //
52 // There are various ways to create `GdkTexture` objects from a61 // There are various ways to create `GdkTexture` objects from a
53-// [class@GdkPixbuf.Pixbuf], or a Cairo surface, or other pixel data.62+// [class@GdkPixbuf.Pixbuf], or from bytes stored in memory, a file, or a
63+// [struct@Gio.Resource].
54 //64 //
55 // The ownership of the pixel data is transferred to the `GdkTexture`65 // The ownership of the pixel data is transferred to the `GdkTexture`
56 // instance; you can only make a copy of it, via [method@Gdk.Texture.download].66 // instance; you can only make a copy of it, via [method@Gdk.Texture.download].
57 //67 //
58 // `GdkTexture` is an immutable object: That means you cannot change68 // `GdkTexture` is an immutable object: That means you cannot change
59 // anything about it other than increasing the reference count via69 // anything about it other than increasing the reference count via
60-// [method@GObject.Object.ref], and consequently, it is a thread-safe object.70+// [method@GObject.Object.ref], and consequently, it is a threadsafe object.
71+//
72+// GDK provides a number of threadsafe texture loading functions:
73+// [ctor@Gdk.Texture.new_from_resource],
74+// [ctor@Gdk.Texture.new_from_bytes],
75+// [ctor@Gdk.Texture.new_from_file],
76+// [ctor@Gdk.Texture.new_from_filename],
77+// [ctor@Gdk.Texture.new_for_pixbuf]. Note that these are meant for loading
78+// icons and resources that are shipped with the toolkit or application. It
79+// is recommended that you use a dedicated image loading framework such as
80+// [glycin](https://lib.rs/crates/glycin), if you need to load untrusted image
81+// data.
61 type Texture struct {82 type Texture struct {
62 gobject.Object83 gobject.Object
63 }84 }
@@ -99,7 +120,7 @@ var xNewTextureFromBytes func(*glib.Bytes, **glib.Error) uintptr
99 // Creates a new texture by loading an image from memory,120 // Creates a new texture by loading an image from memory,
100 //121 //
101 // The file format is detected automatically. The supported formats122 // The file format is detected automatically. The supported formats
102-// are PNG and JPEG, though more formats might be available.123+// are PNG, JPEG and TIFF, though more formats might be available.
103 //124 //
104 // If %NULL is returned, then @error will be set.125 // If %NULL is returned, then @error will be set.
105 //126 //
@@ -129,7 +150,7 @@ var xNewTextureFromFile func(uintptr, **glib.Error) uintptr
129 // Creates a new texture by loading an image from a file.150 // Creates a new texture by loading an image from a file.
130 //151 //
131 // The file format is detected automatically. The supported formats152 // The file format is detected automatically. The supported formats
132-// are PNG and JPEG, though more formats might be available.153+// are PNG, JPEG and TIFF, though more formats might be available.
133 //154 //
134 // If %NULL is returned, then @error will be set.155 // If %NULL is returned, then @error will be set.
135 //156 //
@@ -159,7 +180,7 @@ var xNewTextureFromFilename func(string, **glib.Error) uintptr
159 // Creates a new texture by loading an image from a file.180 // Creates a new texture by loading an image from a file.
160 //181 //
161 // The file format is detected automatically. The supported formats182 // The file format is detected automatically. The supported formats
162-// are PNG and JPEG, though more formats might be available.183+// are PNG, JPEG and TIFF, though more formats might be available.
163 //184 //
164 // If %NULL is returned, then @error will be set.185 // If %NULL is returned, then @error will be set.
165 //186 //
@@ -237,12 +258,41 @@ var xTextureDownload func(uintptr, []byte, uint)
237 //258 //
238 // cairo_surface_mark_dirty (surface);259 // cairo_surface_mark_dirty (surface);
239 // ```260 // ```
261+//
262+// For more flexible download capabilities, see
263+// [struct@Gdk.TextureDownloader].
240 func (x *Texture) Download(DataVar []byte, StrideVar uint) {264 func (x *Texture) Download(DataVar []byte, StrideVar uint) {
241 265
242 xTextureDownload(x.GoPointer(), DataVar, StrideVar)266 xTextureDownload(x.GoPointer(), DataVar, StrideVar)
243 267
244 }268 }
245 269
270+var xTextureGetColorState func(uintptr) *ColorState
271+
272+// Returns the color state associated with the texture.
273+func (x *Texture) GetColorState() *ColorState {
274+
275+ cret := xTextureGetColorState(x.GoPointer())
276+ return cret
277+}
278+
279+var xTextureGetFormat func(uintptr) MemoryFormat
280+
281+// Gets the memory format most closely associated with the data of
282+// the texture.
283+//
284+// Note that it may not be an exact match for texture data
285+// stored on the GPU or with compression.
286+//
287+// The format can give an indication about the bit depth and opacity
288+// of the texture and is useful to determine the best format for
289+// downloading the texture.
290+func (x *Texture) GetFormat() MemoryFormat {
291+
292+ cret := xTextureGetFormat(x.GoPointer())
293+ return cret
294+}
295+
246 var xTextureGetHeight func(uintptr) int296 var xTextureGetHeight func(uintptr) int
247 297
248 // Returns the height of the @texture, in pixels.298 // Returns the height of the @texture, in pixels.
@@ -491,6 +541,13 @@ func (x *Texture) Equal(Icon2Var gio.Icon) bool {
491 return cret541 return cret
492 }542 }
493 543
544+// Gets a hash for an icon.
545+func (x *Texture) Hash() uint {
546+
547+ cret := gio.XGIconHash(x.GoPointer())
548+ return cret
549+}
550+
494 // Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved551 // Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved
495 // back by calling g_icon_deserialize() on the returned value.552 // back by calling g_icon_deserialize() on the returned value.
496 // As serialization will avoid using raw icon data when possible, it only553 // As serialization will avoid using raw icon data when possible, it only
@@ -582,6 +639,8 @@ func init() {
582 639
583 core.PuregoSafeRegister(&xTextureErrorGLibType, lib, "gdk_texture_error_get_type")640 core.PuregoSafeRegister(&xTextureErrorGLibType, lib, "gdk_texture_error_get_type")
584 641
642+ core.PuregoSafeRegister(&xTextureErrorQuark, lib, "gdk_texture_error_quark")
643+
585 core.PuregoSafeRegister(&xTextureGLibType, lib, "gdk_texture_get_type")644 core.PuregoSafeRegister(&xTextureGLibType, lib, "gdk_texture_get_type")
586 645
587 core.PuregoSafeRegister(&xNewTextureForPixbuf, lib, "gdk_texture_new_for_pixbuf")646 core.PuregoSafeRegister(&xNewTextureForPixbuf, lib, "gdk_texture_new_for_pixbuf")
@@ -591,6 +650,8 @@ func init() {
591 core.PuregoSafeRegister(&xNewTextureFromResource, lib, "gdk_texture_new_from_resource")650 core.PuregoSafeRegister(&xNewTextureFromResource, lib, "gdk_texture_new_from_resource")
592 651
593 core.PuregoSafeRegister(&xTextureDownload, lib, "gdk_texture_download")652 core.PuregoSafeRegister(&xTextureDownload, lib, "gdk_texture_download")
653+ core.PuregoSafeRegister(&xTextureGetColorState, lib, "gdk_texture_get_color_state")
654+ core.PuregoSafeRegister(&xTextureGetFormat, lib, "gdk_texture_get_format")
594 core.PuregoSafeRegister(&xTextureGetHeight, lib, "gdk_texture_get_height")655 core.PuregoSafeRegister(&xTextureGetHeight, lib, "gdk_texture_get_height")
595 core.PuregoSafeRegister(&xTextureGetWidth, lib, "gdk_texture_get_width")656 core.PuregoSafeRegister(&xTextureGetWidth, lib, "gdk_texture_get_width")
596 core.PuregoSafeRegister(&xTextureSaveToPng, lib, "gdk_texture_save_to_png")657 core.PuregoSafeRegister(&xTextureSaveToPng, lib, "gdk_texture_save_to_png")
M v4/gdk/gdktoplevel.go +33 -7
@@ -19,7 +19,7 @@ func (x *ToplevelInterface) GoPointer() uintptr {
19 return uintptr(unsafe.Pointer(x))19 return uintptr(unsafe.Pointer(x))
20 }20 }
21 21
22-// A `GdkToplevel` is a freestanding toplevel surface.22+// A freestanding toplevel surface.
23 //23 //
24 // The `GdkToplevel` interface provides useful APIs for interacting with24 // The `GdkToplevel` interface provides useful APIs for interacting with
25 // the windowing system, such as controlling maximization and size of the25 // the windowing system, such as controlling maximization and size of the
@@ -89,8 +89,9 @@ func (x *ToplevelBase) BeginResize(EdgeVar SurfaceEdge, DeviceVar *Device, Butto
89 89
90 // Sets keyboard focus to @surface.90 // Sets keyboard focus to @surface.
91 //91 //
92-// In most cases, [method@Gtk.Window.present_with_time] should be92+// In most cases, [gtk_window_present_with_time()](../gtk4/method.Window.present_with_time.html)
93-// used on a [class@Gtk.Window], rather than calling this function.93+// should be used on a [GtkWindow](../gtk4/class.Window.html), rather than
94+// calling this function.
94 func (x *ToplevelBase) Focus(TimestampVar uint32) {95 func (x *ToplevelBase) Focus(TimestampVar uint32) {
95 96
96 XGdkToplevelFocus(x.GoPointer(), TimestampVar)97 XGdkToplevelFocus(x.GoPointer(), TimestampVar)
@@ -231,8 +232,8 @@ func (x *ToplevelBase) SetModal(ModalVar bool) {
231 // Sets the startup notification ID.232 // Sets the startup notification ID.
232 //233 //
233 // When using GTK, typically you should use234 // When using GTK, typically you should use
234-// [method@Gtk.Window.set_startup_id] instead of this235+// [gtk_window_set_startup_id()](../gtk4/method.Window.set_startup_id.html)
235-// low-level function.236+// instead of this low-level function.
236 func (x *ToplevelBase) SetStartupId(StartupIdVar string) {237 func (x *ToplevelBase) SetStartupId(StartupIdVar string) {
237 238
238 XGdkToplevelSetStartupId(x.GoPointer(), StartupIdVar)239 XGdkToplevelSetStartupId(x.GoPointer(), StartupIdVar)
@@ -256,8 +257,8 @@ func (x *ToplevelBase) SetTitle(TitleVar string) {
256 // allows the window manager to do things like center @surface257 // allows the window manager to do things like center @surface
257 // on @parent and keep @surface above @parent.258 // on @parent and keep @surface above @parent.
258 //259 //
259-// See [method@Gtk.Window.set_transient_for] if you’re using260+// See [gtk_window_set_transient_for()](../gtk4/method.Window.set_transient_for.html)
260-// [class@Gtk.Window] or [class@Gtk.Dialog].261+// if you’re using [GtkWindow](../gtk4/class.Window.html).
261 func (x *ToplevelBase) SetTransientFor(ParentVar *Surface) {262 func (x *ToplevelBase) SetTransientFor(ParentVar *Surface) {
262 263
263 XGdkToplevelSetTransientFor(x.GoPointer(), ParentVar.GoPointer())264 XGdkToplevelSetTransientFor(x.GoPointer(), ParentVar.GoPointer())
@@ -284,6 +285,7 @@ func (x *ToplevelBase) SupportsEdgeConstraints() bool {
284 return cret285 return cret
285 }286 }
286 287
288+// Performs a title bar gesture.
287 func (x *ToplevelBase) TitlebarGesture(GestureVar TitlebarGesture) bool {289 func (x *ToplevelBase) TitlebarGesture(GestureVar TitlebarGesture) bool {
288 290
289 cret := XGdkToplevelTitlebarGesture(x.GoPointer(), GestureVar)291 cret := XGdkToplevelTitlebarGesture(x.GoPointer(), GestureVar)
@@ -359,6 +361,8 @@ const (
359 ToplevelStateLeftTiledValue ToplevelState = 16384361 ToplevelStateLeftTiledValue ToplevelState = 16384
360 // whether the left edge is resizable362 // whether the left edge is resizable
361 ToplevelStateLeftResizableValue ToplevelState = 32768363 ToplevelStateLeftResizableValue ToplevelState = 32768
364+ // The surface is not visible to the user.
365+ ToplevelStateSuspendedValue ToplevelState = 65536
362 )366 )
363 367
364 // Indicates which monitor a surface should span over when in fullscreen mode.368 // Indicates which monitor a surface should span over when in fullscreen mode.
@@ -407,6 +411,26 @@ const (
407 SurfaceEdgeSouthEastValue SurfaceEdge = 7411 SurfaceEdgeSouthEastValue SurfaceEdge = 7
408 )412 )
409 413
414+// The kind of title bar gesture to emit with
415+// [method@Gdk.Toplevel.titlebar_gesture].
416+type TitlebarGesture int
417+
418+var xTitlebarGestureGLibType func() types.GType
419+
420+func TitlebarGestureGLibType() types.GType {
421+ return xTitlebarGestureGLibType()
422+}
423+
424+const (
425+
426+ // double click gesture
427+ TitlebarGestureDoubleClickValue TitlebarGesture = 1
428+ // right click gesture
429+ TitlebarGestureRightClickValue TitlebarGesture = 2
430+ // middle click gesture
431+ TitlebarGestureMiddleClickValue TitlebarGesture = 3
432+)
433+
410 func init() {434 func init() {
411 core.SetPackageName("GDK", "gtk4")435 core.SetPackageName("GDK", "gtk4")
412 core.SetSharedLibrary("GDK", "libgtk-4.so.1")436 core.SetSharedLibrary("GDK", "libgtk-4.so.1")
@@ -421,6 +445,8 @@ func init() {
421 445
422 core.PuregoSafeRegister(&xSurfaceEdgeGLibType, lib, "gdk_surface_edge_get_type")446 core.PuregoSafeRegister(&xSurfaceEdgeGLibType, lib, "gdk_surface_edge_get_type")
423 447
448+ core.PuregoSafeRegister(&xTitlebarGestureGLibType, lib, "gdk_titlebar_gesture_get_type")
449+
424 core.PuregoSafeRegister(&xToplevelGLibType, lib, "gdk_toplevel_get_type")450 core.PuregoSafeRegister(&xToplevelGLibType, lib, "gdk_toplevel_get_type")
425 451
426 core.PuregoSafeRegister(&XGdkToplevelBeginMove, lib, "gdk_toplevel_begin_move")452 core.PuregoSafeRegister(&XGdkToplevelBeginMove, lib, "gdk_toplevel_begin_move")
M v4/gdk/gdktoplevellayout.go +2 -2
@@ -11,8 +11,8 @@ import (
11 "github.com/jwijenbergh/puregotk/v4/gobject/types"11 "github.com/jwijenbergh/puregotk/v4/gobject/types"
12 )12 )
13 13
14-// The `GdkToplevelLayout` struct contains information that14+// Contains information that is necessary to present a sovereign
15-// is necessary to present a sovereign window on screen.15+// window on screen.
16 //16 //
17 // The `GdkToplevelLayout` struct is necessary for using17 // The `GdkToplevelLayout` struct is necessary for using
18 // [method@Gdk.Toplevel.present].18 // [method@Gdk.Toplevel.present].
M v4/gdk/gdktoplevelsize.go +11 -11
@@ -10,12 +10,17 @@ import (
10 "github.com/jwijenbergh/puregotk/v4/gobject/types"10 "github.com/jwijenbergh/puregotk/v4/gobject/types"
11 )11 )
12 12
13-// The `GdkToplevelSize` struct contains information that is useful13+// Contains information that is useful to compute the size of a toplevel.
14-// to compute the size of a toplevel.
15 type ToplevelSize struct {14 type ToplevelSize struct {
16 _ structs.HostLayout15 _ structs.HostLayout
17 }16 }
18 17
18+var xToplevelSizeGLibType func() types.GType
19+
20+func ToplevelSizeGLibType() types.GType {
21+ return xToplevelSizeGLibType()
22+}
23+
19 func (x *ToplevelSize) GoPointer() uintptr {24 func (x *ToplevelSize) GoPointer() uintptr {
20 return uintptr(unsafe.Pointer(x))25 return uintptr(unsafe.Pointer(x))
21 }26 }
@@ -59,6 +64,9 @@ var xToplevelSizeSetShadowWidth func(uintptr, int, int, int, int)
59 // The shadow width corresponds to the part of the computed surface size64 // The shadow width corresponds to the part of the computed surface size
60 // that would consist of the shadow margin surrounding the window, would65 // that would consist of the shadow margin surrounding the window, would
61 // there be any.66 // there be any.
67+//
68+// Shadow width should only be set if
69+// [method@Gtk.Display.supports_shadow_width] is %TRUE.
62 func (x *ToplevelSize) SetShadowWidth(LeftVar int, RightVar int, TopVar int, BottomVar int) {70 func (x *ToplevelSize) SetShadowWidth(LeftVar int, RightVar int, TopVar int, BottomVar int) {
63 71
64 xToplevelSizeSetShadowWidth(x.GoPointer(), LeftVar, RightVar, TopVar, BottomVar)72 xToplevelSizeSetShadowWidth(x.GoPointer(), LeftVar, RightVar, TopVar, BottomVar)
@@ -79,14 +87,6 @@ func (x *ToplevelSize) SetSize(WidthVar int, HeightVar int) {
79 87
80 }88 }
81 89
82-var xToplevelSizeGetType func() types.GType
83-
84-func ToplevelSizeGetType() types.GType {
85-
86- cret := xToplevelSizeGetType()
87- return cret
88-}
89-
90 func init() {90 func init() {
91 core.SetPackageName("GDK", "gtk4")91 core.SetPackageName("GDK", "gtk4")
92 core.SetSharedLibrary("GDK", "libgtk-4.so.1")92 core.SetSharedLibrary("GDK", "libgtk-4.so.1")
@@ -95,7 +95,7 @@ func init() {
95 panic(err)95 panic(err)
96 }96 }
97 97
98- core.PuregoSafeRegister(&xToplevelSizeGetType, lib, "gdk_toplevel_size_get_type")98+ core.PuregoSafeRegister(&xToplevelSizeGLibType, lib, "gdk_toplevel_size_get_type")
99 99
100 core.PuregoSafeRegister(&xToplevelSizeGetBounds, lib, "gdk_toplevel_size_get_bounds")100 core.PuregoSafeRegister(&xToplevelSizeGetBounds, lib, "gdk_toplevel_size_get_bounds")
101 core.PuregoSafeRegister(&xToplevelSizeSetMinSize, lib, "gdk_toplevel_size_set_min_size")101 core.PuregoSafeRegister(&xToplevelSizeSetMinSize, lib, "gdk_toplevel_size_set_min_size")
M v4/gdk/gdktypes.go +365 -4
@@ -8,11 +8,88 @@ import (
8 "github.com/jwijenbergh/purego"8 "github.com/jwijenbergh/purego"
9 "github.com/jwijenbergh/puregotk/pkg/core"9 "github.com/jwijenbergh/puregotk/pkg/core"
10 "github.com/jwijenbergh/puregotk/v4/glib"10 "github.com/jwijenbergh/puregotk/v4/glib"
11+ "github.com/jwijenbergh/puregotk/v4/gobject"
11 "github.com/jwijenbergh/puregotk/v4/gobject/types"12 "github.com/jwijenbergh/puregotk/v4/gobject/types"
12 )13 )
13 14
14-// The `GdkContentFormats` structure is used to advertise and negotiate the15+// Provides information to interpret colors and pixels in a variety of ways.
15-// format of content.16+//
17+// They are also known as
18+// [*color spaces*](https://en.wikipedia.org/wiki/Color_space).
19+//
20+// Crucially, GTK knows how to convert colors from one color
21+// state to another.
22+//
23+// `GdkColorState` objects are immutable and therefore threadsafe.
24+type ColorState struct {
25+ _ structs.HostLayout
26+}
27+
28+var xColorStateGLibType func() types.GType
29+
30+func ColorStateGLibType() types.GType {
31+ return xColorStateGLibType()
32+}
33+
34+func (x *ColorState) GoPointer() uintptr {
35+ return uintptr(unsafe.Pointer(x))
36+}
37+
38+var xColorStateCreateCicpParams func(uintptr) uintptr
39+
40+// Create a [class@Gdk.CicpParams] representing the colorstate.
41+//
42+// It is not guaranteed that every `GdkColorState` can be
43+// represented with Cicp parameters. If that is the case,
44+// this function returns `NULL`.
45+func (x *ColorState) CreateCicpParams() *CicpParams {
46+ var cls *CicpParams
47+
48+ cret := xColorStateCreateCicpParams(x.GoPointer())
49+
50+ if cret == 0 {
51+ return nil
52+ }
53+ cls = &CicpParams{}
54+ cls.Ptr = cret
55+ return cls
56+}
57+
58+var xColorStateEqual func(uintptr, *ColorState) bool
59+
60+// Compares two `GdkColorStates` for equality.
61+//
62+// Note that this function is not guaranteed to be perfect and two objects
63+// describing the same color state may compare not equal. However, different
64+// color states will never compare equal.
65+func (x *ColorState) Equal(OtherVar *ColorState) bool {
66+
67+ cret := xColorStateEqual(x.GoPointer(), OtherVar)
68+ return cret
69+}
70+
71+var xColorStateRef func(uintptr) *ColorState
72+
73+// Increase the reference count of @self.
74+func (x *ColorState) Ref() *ColorState {
75+
76+ cret := xColorStateRef(x.GoPointer())
77+ return cret
78+}
79+
80+var xColorStateUnref func(uintptr)
81+
82+// Decrease the reference count of @self.
83+//
84+// Unless @self is static, it will be freed
85+// when the reference count reaches zero.
86+func (x *ColorState) Unref() {
87+
88+ xColorStateUnref(x.GoPointer())
89+
90+}
91+
92+// Used to advertise and negotiate the format of content.
16 //93 //
17 // You will encounter `GdkContentFormats` when interacting with objects94 // You will encounter `GdkContentFormats` when interacting with objects
18 // controlling operations that pass data between different widgets, window95 // controlling operations that pass data between different widgets, window
@@ -121,6 +198,15 @@ func (x *ContentFormats) GetMimeTypes(NMimeTypesVar uint) []string {
121 return cret198 return cret
122 }199 }
123 200
201+var xContentFormatsIsEmpty func(uintptr) bool
202+
203+// Returns whether the content formats contain any formats.
204+func (x *ContentFormats) IsEmpty() bool {
205+
206+ cret := xContentFormatsIsEmpty(x.GoPointer())
207+ return cret
208+}
209+
124 var xContentFormatsMatch func(uintptr, *ContentFormats) bool210 var xContentFormatsMatch func(uintptr, *ContentFormats) bool
125 211
126 // Checks if @first and @second have any matching formats.212 // Checks if @first and @second have any matching formats.
@@ -250,7 +336,104 @@ func (x *ContentFormats) Unref() {
250 336
251 }337 }
252 338
253-// A `GdkKeymapKey` is a hardware key that can be mapped to a keyval.339+// Provides information about supported DMA buffer formats.
340+//
341+// You can query whether a given format is supported with
342+// [method@Gdk.DmabufFormats.contains] and you can iterate
343+// over the list of all supported formats with
344+// [method@Gdk.DmabufFormats.get_n_formats] and
345+// [method@Gdk.DmabufFormats.get_format].
346+//
347+// The list of supported formats is sorted by preference,
348+// with the best formats coming first.
349+//
350+// The list may contains (format, modifier) pairs where the modifier
351+// is `DMA_FORMAT_MOD_INVALID`, indicating that **_implicit modifiers_**
352+// may be used with this format.
353+//
354+// See [class@Gdk.DmabufTextureBuilder] for more information
355+// about DMA buffers.
356+//
357+// Note that DMA buffers only exist on Linux.
358+type DmabufFormats struct {
359+ _ structs.HostLayout
360+}
361+
362+var xDmabufFormatsGLibType func() types.GType
363+
364+func DmabufFormatsGLibType() types.GType {
365+ return xDmabufFormatsGLibType()
366+}
367+
368+func (x *DmabufFormats) GoPointer() uintptr {
369+ return uintptr(unsafe.Pointer(x))
370+}
371+
372+var xDmabufFormatsContains func(uintptr, uint32, uint64) bool
373+
374+// Returns whether a given format is contained in @formats.
375+func (x *DmabufFormats) Contains(FourccVar uint32, ModifierVar uint64) bool {
376+
377+ cret := xDmabufFormatsContains(x.GoPointer(), FourccVar, ModifierVar)
378+ return cret
379+}
380+
381+var xDmabufFormatsEqual func(uintptr, *DmabufFormats) bool
382+
383+// Returns whether @formats1 and @formats2 contain the
384+// same dmabuf formats, in the same order.
385+func (x *DmabufFormats) Equal(Formats2Var *DmabufFormats) bool {
386+
387+ cret := xDmabufFormatsEqual(x.GoPointer(), Formats2Var)
388+ return cret
389+}
390+
391+var xDmabufFormatsGetFormat func(uintptr, uint, uint32, uint64)
392+
393+// Gets the fourcc code and modifier for a format
394+// that is contained in @formats.
395+func (x *DmabufFormats) GetFormat(IdxVar uint, FourccVar uint32, ModifierVar uint64) {
396+
397+ xDmabufFormatsGetFormat(x.GoPointer(), IdxVar, FourccVar, ModifierVar)
398+
399+}
400+
401+var xDmabufFormatsGetNFormats func(uintptr) uint
402+
403+// Returns the number of formats that the @formats object
404+// contains.
405+//
406+// Note that DMA buffers are a Linux concept, so on other
407+// platforms, [method@Gdk.DmabufFormats.get_n_formats] will
408+// always return zero.
409+func (x *DmabufFormats) GetNFormats() uint {
410+
411+ cret := xDmabufFormatsGetNFormats(x.GoPointer())
412+ return cret
413+}
414+
415+var xDmabufFormatsRef func(uintptr) *DmabufFormats
416+
417+// Increases the reference count of @formats.
418+func (x *DmabufFormats) Ref() *DmabufFormats {
419+
420+ cret := xDmabufFormatsRef(x.GoPointer())
421+ return cret
422+}
423+
424+var xDmabufFormatsUnref func(uintptr)
425+
426+// Decreases the reference count of @formats.
427+//
428+// When the reference count reaches zero,
429+// the object is freed.
430+func (x *DmabufFormats) Unref() {
431+
432+ xDmabufFormatsUnref(x.GoPointer())
433+
434+}
435+
436+// Represents a hardware key that can be mapped to a keyval.
254 type KeymapKey struct {437 type KeymapKey struct {
255 _ structs.HostLayout438 _ structs.HostLayout
256 439
@@ -265,7 +448,7 @@ func (x *KeymapKey) GoPointer() uintptr {
265 return uintptr(unsafe.Pointer(x))448 return uintptr(unsafe.Pointer(x))
266 }449 }
267 450
268-// A `GdkRectangle` data type for representing rectangles.451+// Represents a rectangle.
269 //452 //
270 // `GdkRectangle` is identical to `cairo_rectangle_t`. Together with Cairo’s453 // `GdkRectangle` is identical to `cairo_rectangle_t`. Together with Cairo’s
271 // `cairo_region_t` data type, these are the central types for representing454 // `cairo_region_t` data type, these are the central types for representing
@@ -351,6 +534,152 @@ func (x *Rectangle) Union(Src2Var *Rectangle, DestVar *Rectangle) {
351 534
352 }535 }
353 536
537+// Used to download the contents of a [class@Gdk.Texture].
538+//
539+// It is intended to be created as a short-term object for a single download,
540+// but can be used for multiple downloads of different textures or with different
541+// settings.
542+//
543+// `GdkTextureDownloader` can be used to convert data between different formats.
544+// Create a `GdkTexture` for the existing format and then download it in a
545+// different format.
546+type TextureDownloader struct {
547+ _ structs.HostLayout
548+}
549+
550+var xTextureDownloaderGLibType func() types.GType
551+
552+func TextureDownloaderGLibType() types.GType {
553+ return xTextureDownloaderGLibType()
554+}
555+
556+func (x *TextureDownloader) GoPointer() uintptr {
557+ return uintptr(unsafe.Pointer(x))
558+}
559+
560+var xNewTextureDownloader func(uintptr) *TextureDownloader
561+
562+// Creates a new texture downloader for @texture.
563+//
564+// By default, the downloader will convert the data to
565+// the default memory format, and to the sRGB color state.
566+func NewTextureDownloader(TextureVar *Texture) *TextureDownloader {
567+
568+ cret := xNewTextureDownloader(TextureVar.GoPointer())
569+ return cret
570+}
571+
572+var xTextureDownloaderCopy func(uintptr) *TextureDownloader
573+
574+// Creates a copy of the downloader.
575+//
576+// This function is meant for language bindings.
577+func (x *TextureDownloader) Copy() *TextureDownloader {
578+
579+ cret := xTextureDownloaderCopy(x.GoPointer())
580+ return cret
581+}
582+
583+var xTextureDownloaderDownloadBytes func(uintptr, uint) *glib.Bytes
584+
585+// Downloads the given texture pixels into a `GBytes`. The rowstride will
586+// be stored in the stride value.
587+//
588+// This function will abort if it tries to download a large texture and
589+// fails to allocate memory. If you think that may happen, you should handle
590+// memory allocation yourself and use [method@Gdk.TextureDownloader.download_into]
591+// once allocation succeeded.
592+func (x *TextureDownloader) DownloadBytes(OutStrideVar uint) *glib.Bytes {
593+
594+ cret := xTextureDownloaderDownloadBytes(x.GoPointer(), OutStrideVar)
595+ return cret
596+}
597+
598+var xTextureDownloaderDownloadInto func(uintptr, []byte, uint)
599+
600+// Downloads the @texture into local memory.
601+func (x *TextureDownloader) DownloadInto(DataVar []byte, StrideVar uint) {
602+
603+ xTextureDownloaderDownloadInto(x.GoPointer(), DataVar, StrideVar)
604+
605+}
606+
607+var xTextureDownloaderFree func(uintptr)
608+
609+// Frees the given downloader and all its associated resources.
610+func (x *TextureDownloader) Free() {
611+
612+ xTextureDownloaderFree(x.GoPointer())
613+
614+}
615+
616+var xTextureDownloaderGetColorState func(uintptr) *ColorState
617+
618+// Gets the color state that the data will be downloaded in.
619+func (x *TextureDownloader) GetColorState() *ColorState {
620+
621+ cret := xTextureDownloaderGetColorState(x.GoPointer())
622+ return cret
623+}
624+
625+var xTextureDownloaderGetFormat func(uintptr) MemoryFormat
626+
627+// Gets the format that the data will be downloaded in.
628+func (x *TextureDownloader) GetFormat() MemoryFormat {
629+
630+ cret := xTextureDownloaderGetFormat(x.GoPointer())
631+ return cret
632+}
633+
634+var xTextureDownloaderGetTexture func(uintptr) uintptr
635+
636+// Gets the texture that the downloader will download.
637+func (x *TextureDownloader) GetTexture() *Texture {
638+ var cls *Texture
639+
640+ cret := xTextureDownloaderGetTexture(x.GoPointer())
641+
642+ if cret == 0 {
643+ return nil
644+ }
645+ gobject.IncreaseRef(cret)
646+ cls = &Texture{}
647+ cls.Ptr = cret
648+ return cls
649+}
650+
651+var xTextureDownloaderSetColorState func(uintptr, *ColorState)
652+
653+// Sets the color state the downloader will convert the data to.
654+//
655+// By default, the sRGB colorstate returned by [func@ColorState.get_srgb]
656+// is used.
657+func (x *TextureDownloader) SetColorState(ColorStateVar *ColorState) {
658+
659+ xTextureDownloaderSetColorState(x.GoPointer(), ColorStateVar)
660+
661+}
662+
663+var xTextureDownloaderSetFormat func(uintptr, MemoryFormat)
664+
665+// Sets the format the downloader will download.
666+//
667+// By default, GDK_MEMORY_DEFAULT is set.
668+func (x *TextureDownloader) SetFormat(FormatVar MemoryFormat) {
669+
670+ xTextureDownloaderSetFormat(x.GoPointer(), FormatVar)
671+
672+}
673+
674+var xTextureDownloaderSetTexture func(uintptr, uintptr)
675+
676+// Changes the texture the downloader will download.
677+func (x *TextureDownloader) SetTexture(TextureVar *Texture) {
678+
679+ xTextureDownloaderSetTexture(x.GoPointer(), TextureVar.GoPointer())
680+
681+}
682+
354 const (683 const (
355 // Represents the current time, and can be used anywhere a time is expected.684 // Represents the current time, and can be used anywhere a time is expected.
356 CURRENT_TIME int = 0685 CURRENT_TIME int = 0
@@ -364,6 +693,13 @@ func init() {
364 panic(err)693 panic(err)
365 }694 }
366 695
696+ core.PuregoSafeRegister(&xColorStateGLibType, lib, "gdk_color_state_get_type")
697+
698+ core.PuregoSafeRegister(&xColorStateCreateCicpParams, lib, "gdk_color_state_create_cicp_params")
699+ core.PuregoSafeRegister(&xColorStateEqual, lib, "gdk_color_state_equal")
700+ core.PuregoSafeRegister(&xColorStateRef, lib, "gdk_color_state_ref")
701+ core.PuregoSafeRegister(&xColorStateUnref, lib, "gdk_color_state_unref")
702+
367 core.PuregoSafeRegister(&xContentFormatsGLibType, lib, "gdk_content_formats_get_type")703 core.PuregoSafeRegister(&xContentFormatsGLibType, lib, "gdk_content_formats_get_type")
368 704
369 core.PuregoSafeRegister(&xNewContentFormats, lib, "gdk_content_formats_new")705 core.PuregoSafeRegister(&xNewContentFormats, lib, "gdk_content_formats_new")
@@ -373,6 +709,7 @@ func init() {
373 core.PuregoSafeRegister(&xContentFormatsContainMimeType, lib, "gdk_content_formats_contain_mime_type")709 core.PuregoSafeRegister(&xContentFormatsContainMimeType, lib, "gdk_content_formats_contain_mime_type")
374 core.PuregoSafeRegister(&xContentFormatsGetGtypes, lib, "gdk_content_formats_get_gtypes")710 core.PuregoSafeRegister(&xContentFormatsGetGtypes, lib, "gdk_content_formats_get_gtypes")
375 core.PuregoSafeRegister(&xContentFormatsGetMimeTypes, lib, "gdk_content_formats_get_mime_types")711 core.PuregoSafeRegister(&xContentFormatsGetMimeTypes, lib, "gdk_content_formats_get_mime_types")
712+ core.PuregoSafeRegister(&xContentFormatsIsEmpty, lib, "gdk_content_formats_is_empty")
376 core.PuregoSafeRegister(&xContentFormatsMatch, lib, "gdk_content_formats_match")713 core.PuregoSafeRegister(&xContentFormatsMatch, lib, "gdk_content_formats_match")
377 core.PuregoSafeRegister(&xContentFormatsMatchGtype, lib, "gdk_content_formats_match_gtype")714 core.PuregoSafeRegister(&xContentFormatsMatchGtype, lib, "gdk_content_formats_match_gtype")
378 core.PuregoSafeRegister(&xContentFormatsMatchMimeType, lib, "gdk_content_formats_match_mime_type")715 core.PuregoSafeRegister(&xContentFormatsMatchMimeType, lib, "gdk_content_formats_match_mime_type")
@@ -386,6 +723,15 @@ func init() {
386 core.PuregoSafeRegister(&xContentFormatsUnionSerializeMimeTypes, lib, "gdk_content_formats_union_serialize_mime_types")723 core.PuregoSafeRegister(&xContentFormatsUnionSerializeMimeTypes, lib, "gdk_content_formats_union_serialize_mime_types")
387 core.PuregoSafeRegister(&xContentFormatsUnref, lib, "gdk_content_formats_unref")724 core.PuregoSafeRegister(&xContentFormatsUnref, lib, "gdk_content_formats_unref")
388 725
726+ core.PuregoSafeRegister(&xDmabufFormatsGLibType, lib, "gdk_dmabuf_formats_get_type")
727+
728+ core.PuregoSafeRegister(&xDmabufFormatsContains, lib, "gdk_dmabuf_formats_contains")
729+ core.PuregoSafeRegister(&xDmabufFormatsEqual, lib, "gdk_dmabuf_formats_equal")
730+ core.PuregoSafeRegister(&xDmabufFormatsGetFormat, lib, "gdk_dmabuf_formats_get_format")
731+ core.PuregoSafeRegister(&xDmabufFormatsGetNFormats, lib, "gdk_dmabuf_formats_get_n_formats")
732+ core.PuregoSafeRegister(&xDmabufFormatsRef, lib, "gdk_dmabuf_formats_ref")
733+ core.PuregoSafeRegister(&xDmabufFormatsUnref, lib, "gdk_dmabuf_formats_unref")
734+
389 core.PuregoSafeRegister(&xRectangleGLibType, lib, "gdk_rectangle_get_type")735 core.PuregoSafeRegister(&xRectangleGLibType, lib, "gdk_rectangle_get_type")
390 736
391 core.PuregoSafeRegister(&xRectangleContainsPoint, lib, "gdk_rectangle_contains_point")737 core.PuregoSafeRegister(&xRectangleContainsPoint, lib, "gdk_rectangle_contains_point")
@@ -393,4 +739,19 @@ func init() {
393 core.PuregoSafeRegister(&xRectangleIntersect, lib, "gdk_rectangle_intersect")739 core.PuregoSafeRegister(&xRectangleIntersect, lib, "gdk_rectangle_intersect")
394 core.PuregoSafeRegister(&xRectangleUnion, lib, "gdk_rectangle_union")740 core.PuregoSafeRegister(&xRectangleUnion, lib, "gdk_rectangle_union")
395 741
742+ core.PuregoSafeRegister(&xTextureDownloaderGLibType, lib, "gdk_texture_downloader_get_type")
743+
744+ core.PuregoSafeRegister(&xNewTextureDownloader, lib, "gdk_texture_downloader_new")
745+
746+ core.PuregoSafeRegister(&xTextureDownloaderCopy, lib, "gdk_texture_downloader_copy")
747+ core.PuregoSafeRegister(&xTextureDownloaderDownloadBytes, lib, "gdk_texture_downloader_download_bytes")
748+ core.PuregoSafeRegister(&xTextureDownloaderDownloadInto, lib, "gdk_texture_downloader_download_into")
749+ core.PuregoSafeRegister(&xTextureDownloaderFree, lib, "gdk_texture_downloader_free")
750+ core.PuregoSafeRegister(&xTextureDownloaderGetColorState, lib, "gdk_texture_downloader_get_color_state")
751+ core.PuregoSafeRegister(&xTextureDownloaderGetFormat, lib, "gdk_texture_downloader_get_format")
752+ core.PuregoSafeRegister(&xTextureDownloaderGetTexture, lib, "gdk_texture_downloader_get_texture")
753+ core.PuregoSafeRegister(&xTextureDownloaderSetColorState, lib, "gdk_texture_downloader_set_color_state")
754+ core.PuregoSafeRegister(&xTextureDownloaderSetFormat, lib, "gdk_texture_downloader_set_format")
755+ core.PuregoSafeRegister(&xTextureDownloaderSetTexture, lib, "gdk_texture_downloader_set_texture")
756+
396 }757 }
M v4/gdk/gdkvulkancontext.go +26 -3
@@ -5,14 +5,23 @@ import (
5 "unsafe"5 "unsafe"
6 6
7 "github.com/jwijenbergh/purego"7 "github.com/jwijenbergh/purego"
8+ "github.com/jwijenbergh/puregotk/pkg/core"
8 "github.com/jwijenbergh/puregotk/v4/gio"9 "github.com/jwijenbergh/puregotk/v4/gio"
9 "github.com/jwijenbergh/puregotk/v4/glib"10 "github.com/jwijenbergh/puregotk/v4/glib"
10 "github.com/jwijenbergh/puregotk/v4/gobject"11 "github.com/jwijenbergh/puregotk/v4/gobject"
11 "github.com/jwijenbergh/puregotk/v4/gobject/types"12 "github.com/jwijenbergh/puregotk/v4/gobject/types"
12 )13 )
13 14
14-// `GdkVulkanContext` is an object representing the platform-specific15+var xVulkanErrorQuark func() glib.Quark
15-// Vulkan draw context.16+
17+// Registers an error quark for [class@Gdk.VulkanContext] errors.
18+func VulkanErrorQuark() glib.Quark {
19+
20+ cret := xVulkanErrorQuark()
21+ return cret
22+}
23+
24+// Represents the platform-specific Vulkan draw context.
16 //25 //
17 // `GdkVulkanContext`s are created for a surface using26 // `GdkVulkanContext`s are created for a surface using
18 // [method@Gdk.Surface.create_vulkan_context], and the context will match27 // [method@Gdk.Surface.create_vulkan_context], and the context will match
@@ -88,7 +97,7 @@ func (x *VulkanContext) ConnectImagesUpdated(cb *func(VulkanContext)) uint32 {
88 // If the object is not initialized, or initialization returns with an97 // If the object is not initialized, or initialization returns with an
89 // error, then all operations on the object except g_object_ref() and98 // error, then all operations on the object except g_object_ref() and
90 // g_object_unref() are considered to be invalid, and have undefined99 // g_object_unref() are considered to be invalid, and have undefined
91-// behaviour. See the [introduction][ginitable] for more details.100+// behaviour. See the [description][iface@Gio.Initable#description] for more details.
92 //101 //
93 // Callers should not assume that a class which implements #GInitable can be102 // Callers should not assume that a class which implements #GInitable can be
94 // initialized multiple times, unless the class explicitly documents itself as103 // initialized multiple times, unless the class explicitly documents itself as
@@ -118,3 +127,17 @@ func (x *VulkanContext) Init(CancellableVar *gio.Cancellable) (bool, error) {
118 return cret, cerr127 return cret, cerr
119 128
120 }129 }
130+
131+func init() {
132+ core.SetPackageName("GDK", "gtk4")
133+ core.SetSharedLibrary("GDK", "libgtk-4.so.1")
134+ lib, err := purego.Dlopen(core.GetPath("GDK"), purego.RTLD_NOW|purego.RTLD_GLOBAL)
135+ if err != nil {
136+ panic(err)
137+ }
138+
139+ core.PuregoSafeRegister(&xVulkanErrorQuark, lib, "gdk_vulkan_error_quark")
140+
141+ core.PuregoSafeRegister(&xVulkanContextGLibType, lib, "gdk_vulkan_context_get_type")
142+
143+}
D v4/gdk/main.go +0 -65
@@ -1,65 +0,0 @@
1-// Package gdk was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT
2-package gdk
3-
4-import (
5- "github.com/jwijenbergh/purego"
6- "github.com/jwijenbergh/puregotk/pkg/core"
7- "github.com/jwijenbergh/puregotk/v4/glib"
8- "github.com/jwijenbergh/puregotk/v4/gobject/types"
9-)
10-
11-type TitlebarGesture int
12-
13-var xTitlebarGestureGLibType func() types.GType
14-
15-func TitlebarGestureGLibType() types.GType {
16- return xTitlebarGestureGLibType()
17-}
18-
19-const (
20- TitlebarGestureDoubleClickValue TitlebarGesture = 1
21-
22- TitlebarGestureRightClickValue TitlebarGesture = 2
23-
24- TitlebarGestureMiddleClickValue TitlebarGesture = 3
25-)
26-
27-var xGlErrorQuark func() glib.Quark
28-
29-func GlErrorQuark() glib.Quark {
30-
31- cret := xGlErrorQuark()
32- return cret
33-}
34-
35-var xTextureErrorQuark func() glib.Quark
36-
37-func TextureErrorQuark() glib.Quark {
38-
39- cret := xTextureErrorQuark()
40- return cret
41-}
42-
43-var xVulkanErrorQuark func() glib.Quark
44-
45-func VulkanErrorQuark() glib.Quark {
46-
47- cret := xVulkanErrorQuark()
48- return cret
49-}
50-
51-func init() {
52- core.SetPackageName("GDK", "gtk4")
53- core.SetSharedLibrary("GDK", "libgtk-4.so.1")
54- lib, err := purego.Dlopen(core.GetPath("GDK"), purego.RTLD_NOW|purego.RTLD_GLOBAL)
55- if err != nil {
56- panic(err)
57- }
58-
59- core.PuregoSafeRegister(&xTitlebarGestureGLibType, lib, "gdk_titlebar_gesture_get_type")
60-
61- core.PuregoSafeRegister(&xGlErrorQuark, lib, "gdk_gl_error_quark")
62- core.PuregoSafeRegister(&xTextureErrorQuark, lib, "gdk_texture_error_quark")
63- core.PuregoSafeRegister(&xVulkanErrorQuark, lib, "gdk_vulkan_error_quark")
64-
65-}
M v4/gdkpixbuf/gdk-pixbuf-animation.go +28 -0
@@ -35,6 +35,7 @@ func (x *PixbufAnimationClass) GoPointer() uintptr {
35 }35 }
36 36
37 // OverrideIsStaticImage sets the callback function.37 // OverrideIsStaticImage sets the callback function.
38+// returns whether the given animation is just a static image.
38 func (x *PixbufAnimationClass) OverrideIsStaticImage(cb func(*PixbufAnimation) bool) {39 func (x *PixbufAnimationClass) OverrideIsStaticImage(cb func(*PixbufAnimation) bool) {
39 if cb == nil {40 if cb == nil {
40 x.xIsStaticImage = 041 x.xIsStaticImage = 0
@@ -46,6 +47,7 @@ func (x *PixbufAnimationClass) OverrideIsStaticImage(cb func(*PixbufAnimation) b
46 }47 }
47 48
48 // GetIsStaticImage gets the callback function.49 // GetIsStaticImage gets the callback function.
50+// returns whether the given animation is just a static image.
49 func (x *PixbufAnimationClass) GetIsStaticImage() func(*PixbufAnimation) bool {51 func (x *PixbufAnimationClass) GetIsStaticImage() func(*PixbufAnimation) bool {
50 if x.xIsStaticImage == 0 {52 if x.xIsStaticImage == 0 {
51 return nil53 return nil
@@ -58,6 +60,7 @@ func (x *PixbufAnimationClass) GetIsStaticImage() func(*PixbufAnimation) bool {
58 }60 }
59 61
60 // OverrideGetStaticImage sets the callback function.62 // OverrideGetStaticImage sets the callback function.
63+// returns a static image representing the given animation.
61 func (x *PixbufAnimationClass) OverrideGetStaticImage(cb func(*PixbufAnimation) *Pixbuf) {64 func (x *PixbufAnimationClass) OverrideGetStaticImage(cb func(*PixbufAnimation) *Pixbuf) {
62 if cb == nil {65 if cb == nil {
63 x.xGetStaticImage = 066 x.xGetStaticImage = 0
@@ -73,6 +76,7 @@ func (x *PixbufAnimationClass) OverrideGetStaticImage(cb func(*PixbufAnimation)
73 }76 }
74 77
75 // GetGetStaticImage gets the callback function.78 // GetGetStaticImage gets the callback function.
79+// returns a static image representing the given animation.
76 func (x *PixbufAnimationClass) GetGetStaticImage() func(*PixbufAnimation) *Pixbuf {80 func (x *PixbufAnimationClass) GetGetStaticImage() func(*PixbufAnimation) *Pixbuf {
77 if x.xGetStaticImage == 0 {81 if x.xGetStaticImage == 0 {
78 return nil82 return nil
@@ -91,6 +95,7 @@ func (x *PixbufAnimationClass) GetGetStaticImage() func(*PixbufAnimation) *Pixbu
91 }95 }
92 96
93 // OverrideGetSize sets the callback function.97 // OverrideGetSize sets the callback function.
98+// fills @width and @height with the frame size of the animation.
94 func (x *PixbufAnimationClass) OverrideGetSize(cb func(*PixbufAnimation, int, int)) {99 func (x *PixbufAnimationClass) OverrideGetSize(cb func(*PixbufAnimation, int, int)) {
95 if cb == nil {100 if cb == nil {
96 x.xGetSize = 0101 x.xGetSize = 0
@@ -102,6 +107,7 @@ func (x *PixbufAnimationClass) OverrideGetSize(cb func(*PixbufAnimation, int, in
102 }107 }
103 108
104 // GetGetSize gets the callback function.109 // GetGetSize gets the callback function.
110+// fills @width and @height with the frame size of the animation.
105 func (x *PixbufAnimationClass) GetGetSize() func(*PixbufAnimation, int, int) {111 func (x *PixbufAnimationClass) GetGetSize() func(*PixbufAnimation, int, int) {
106 if x.xGetSize == 0 {112 if x.xGetSize == 0 {
107 return nil113 return nil
@@ -114,6 +120,7 @@ func (x *PixbufAnimationClass) GetGetSize() func(*PixbufAnimation, int, int) {
114 }120 }
115 121
116 // OverrideGetIter sets the callback function.122 // OverrideGetIter sets the callback function.
123+// returns an iterator for the given animation.
117 func (x *PixbufAnimationClass) OverrideGetIter(cb func(*PixbufAnimation, *glib.TimeVal) *PixbufAnimationIter) {124 func (x *PixbufAnimationClass) OverrideGetIter(cb func(*PixbufAnimation, *glib.TimeVal) *PixbufAnimationIter) {
118 if cb == nil {125 if cb == nil {
119 x.xGetIter = 0126 x.xGetIter = 0
@@ -129,6 +136,7 @@ func (x *PixbufAnimationClass) OverrideGetIter(cb func(*PixbufAnimation, *glib.T
129 }136 }
130 137
131 // GetGetIter gets the callback function.138 // GetGetIter gets the callback function.
139+// returns an iterator for the given animation.
132 func (x *PixbufAnimationClass) GetGetIter() func(*PixbufAnimation, *glib.TimeVal) *PixbufAnimationIter {140 func (x *PixbufAnimationClass) GetGetIter() func(*PixbufAnimation, *glib.TimeVal) *PixbufAnimationIter {
133 if x.xGetIter == 0 {141 if x.xGetIter == 0 {
134 return nil142 return nil
@@ -168,6 +176,9 @@ func (x *PixbufAnimationIterClass) GoPointer() uintptr {
168 }176 }
169 177
170 // OverrideGetDelayTime sets the callback function.178 // OverrideGetDelayTime sets the callback function.
179+// returns the time in milliseconds that the current frame
180+//
181+// should be shown.
171 func (x *PixbufAnimationIterClass) OverrideGetDelayTime(cb func(*PixbufAnimationIter) int) {182 func (x *PixbufAnimationIterClass) OverrideGetDelayTime(cb func(*PixbufAnimationIter) int) {
172 if cb == nil {183 if cb == nil {
173 x.xGetDelayTime = 0184 x.xGetDelayTime = 0
@@ -179,6 +190,9 @@ func (x *PixbufAnimationIterClass) OverrideGetDelayTime(cb func(*PixbufAnimation
179 }190 }
180 191
181 // GetGetDelayTime gets the callback function.192 // GetGetDelayTime gets the callback function.
193+// returns the time in milliseconds that the current frame
194+//
195+// should be shown.
182 func (x *PixbufAnimationIterClass) GetGetDelayTime() func(*PixbufAnimationIter) int {196 func (x *PixbufAnimationIterClass) GetGetDelayTime() func(*PixbufAnimationIter) int {
183 if x.xGetDelayTime == 0 {197 if x.xGetDelayTime == 0 {
184 return nil198 return nil
@@ -191,6 +205,7 @@ func (x *PixbufAnimationIterClass) GetGetDelayTime() func(*PixbufAnimationIter)
191 }205 }
192 206
193 // OverrideGetPixbuf sets the callback function.207 // OverrideGetPixbuf sets the callback function.
208+// returns the current frame.
194 func (x *PixbufAnimationIterClass) OverrideGetPixbuf(cb func(*PixbufAnimationIter) *Pixbuf) {209 func (x *PixbufAnimationIterClass) OverrideGetPixbuf(cb func(*PixbufAnimationIter) *Pixbuf) {
195 if cb == nil {210 if cb == nil {
196 x.xGetPixbuf = 0211 x.xGetPixbuf = 0
@@ -206,6 +221,7 @@ func (x *PixbufAnimationIterClass) OverrideGetPixbuf(cb func(*PixbufAnimationIte
206 }221 }
207 222
208 // GetGetPixbuf gets the callback function.223 // GetGetPixbuf gets the callback function.
224+// returns the current frame.
209 func (x *PixbufAnimationIterClass) GetGetPixbuf() func(*PixbufAnimationIter) *Pixbuf {225 func (x *PixbufAnimationIterClass) GetGetPixbuf() func(*PixbufAnimationIter) *Pixbuf {
210 if x.xGetPixbuf == 0 {226 if x.xGetPixbuf == 0 {
211 return nil227 return nil
@@ -224,6 +240,9 @@ func (x *PixbufAnimationIterClass) GetGetPixbuf() func(*PixbufAnimationIter) *Pi
224 }240 }
225 241
226 // OverrideOnCurrentlyLoadingFrame sets the callback function.242 // OverrideOnCurrentlyLoadingFrame sets the callback function.
243+// returns whether the current frame of @iter is
244+//
245+// being loaded.
227 func (x *PixbufAnimationIterClass) OverrideOnCurrentlyLoadingFrame(cb func(*PixbufAnimationIter) bool) {246 func (x *PixbufAnimationIterClass) OverrideOnCurrentlyLoadingFrame(cb func(*PixbufAnimationIter) bool) {
228 if cb == nil {247 if cb == nil {
229 x.xOnCurrentlyLoadingFrame = 0248 x.xOnCurrentlyLoadingFrame = 0
@@ -235,6 +254,9 @@ func (x *PixbufAnimationIterClass) OverrideOnCurrentlyLoadingFrame(cb func(*Pixb
235 }254 }
236 255
237 // GetOnCurrentlyLoadingFrame gets the callback function.256 // GetOnCurrentlyLoadingFrame gets the callback function.
257+// returns whether the current frame of @iter is
258+//
259+// being loaded.
238 func (x *PixbufAnimationIterClass) GetOnCurrentlyLoadingFrame() func(*PixbufAnimationIter) bool {260 func (x *PixbufAnimationIterClass) GetOnCurrentlyLoadingFrame() func(*PixbufAnimationIter) bool {
239 if x.xOnCurrentlyLoadingFrame == 0 {261 if x.xOnCurrentlyLoadingFrame == 0 {
240 return nil262 return nil
@@ -247,6 +269,9 @@ func (x *PixbufAnimationIterClass) GetOnCurrentlyLoadingFrame() func(*PixbufAnim
247 }269 }
248 270
249 // OverrideAdvance sets the callback function.271 // OverrideAdvance sets the callback function.
272+// advances the iterator to @current_time, possibly changing the
273+//
274+// current frame.
250 func (x *PixbufAnimationIterClass) OverrideAdvance(cb func(*PixbufAnimationIter, *glib.TimeVal) bool) {275 func (x *PixbufAnimationIterClass) OverrideAdvance(cb func(*PixbufAnimationIter, *glib.TimeVal) bool) {
251 if cb == nil {276 if cb == nil {
252 x.xAdvance = 0277 x.xAdvance = 0
@@ -258,6 +283,9 @@ func (x *PixbufAnimationIterClass) OverrideAdvance(cb func(*PixbufAnimationIter,
258 }283 }
259 284
260 // GetAdvance gets the callback function.285 // GetAdvance gets the callback function.
286+// advances the iterator to @current_time, possibly changing the
287+//
288+// current frame.
261 func (x *PixbufAnimationIterClass) GetAdvance() func(*PixbufAnimationIter, *glib.TimeVal) bool {289 func (x *PixbufAnimationIterClass) GetAdvance() func(*PixbufAnimationIter, *glib.TimeVal) bool {
262 if x.xAdvance == 0 {290 if x.xAdvance == 0 {
263 return nil291 return nil
M v4/gdkpixbuf/gdk-pixbuf-features.go +2 -2
@@ -7,7 +7,7 @@ const (
7 PIXBUF_MAJOR int = 27 PIXBUF_MAJOR int = 2
8 // Micro version of gdk-pixbuf library, that is the "2" in8 // Micro version of gdk-pixbuf library, that is the "2" in
9 // "0.8.2" for example.9 // "0.8.2" for example.
10- PIXBUF_MICRO int = 1010+ PIXBUF_MICRO int = 12
11 // Minor version of gdk-pixbuf library, that is the "8" in11 // Minor version of gdk-pixbuf library, that is the "8" in
12 // "0.8.2" for example.12 // "0.8.2" for example.
13 PIXBUF_MINOR int = 4213 PIXBUF_MINOR int = 42
@@ -15,5 +15,5 @@ const (
15 //15 //
16 // This is the version being compiled against; contrast with16 // This is the version being compiled against; contrast with
17 // `gdk_pixbuf_version`.17 // `gdk_pixbuf_version`.
18- PIXBUF_VERSION string = "2.42.10"18+ PIXBUF_VERSION string = "2.42.12"
19 )19 )
M v4/gdkpixbuf/gdk-pixbuf.go +7 -0
@@ -1357,6 +1357,13 @@ func (x *Pixbuf) Equal(Icon2Var gio.Icon) bool {
1357 return cret1357 return cret
1358 }1358 }
1359 1359
1360+// Gets a hash for an icon.
1361+func (x *Pixbuf) Hash() uint {
1362+
1363+ cret := gio.XGIconHash(x.GoPointer())
1364+ return cret
1365+}
1366+
1360 // Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved1367 // Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved
1361 // back by calling g_icon_deserialize() on the returned value.1368 // back by calling g_icon_deserialize() on the returned value.
1362 // As serialization will avoid using raw icon data when possible, it only1369 // As serialization will avoid using raw icon data when possible, it only
M v4/gio/gaction.go +85 -58
@@ -11,7 +11,7 @@ import (
11 "github.com/jwijenbergh/puregotk/v4/gobject/types"11 "github.com/jwijenbergh/puregotk/v4/gobject/types"
12 )12 )
13 13
14-// The virtual function table for #GAction.14+// The virtual function table for [type@Gio.Action].
15 type ActionInterface struct {15 type ActionInterface struct {
16 _ structs.HostLayout16 _ structs.HostLayout
17 17
@@ -39,6 +39,7 @@ func (x *ActionInterface) GoPointer() uintptr {
39 }39 }
40 40
41 // OverrideGetName sets the callback function.41 // OverrideGetName sets the callback function.
42+// the virtual function pointer for [method@Gio.Action.get_name]
42 func (x *ActionInterface) OverrideGetName(cb func(Action) string) {43 func (x *ActionInterface) OverrideGetName(cb func(Action) string) {
43 if cb == nil {44 if cb == nil {
44 x.xGetName = 045 x.xGetName = 0
@@ -50,6 +51,7 @@ func (x *ActionInterface) OverrideGetName(cb func(Action) string) {
50 }51 }
51 52
52 // GetGetName gets the callback function.53 // GetGetName gets the callback function.
54+// the virtual function pointer for [method@Gio.Action.get_name]
53 func (x *ActionInterface) GetGetName() func(Action) string {55 func (x *ActionInterface) GetGetName() func(Action) string {
54 if x.xGetName == 0 {56 if x.xGetName == 0 {
55 return nil57 return nil
@@ -62,6 +64,7 @@ func (x *ActionInterface) GetGetName() func(Action) string {
62 }64 }
63 65
64 // OverrideGetParameterType sets the callback function.66 // OverrideGetParameterType sets the callback function.
67+// the virtual function pointer for [method@Gio.Action.get_parameter_type]
65 func (x *ActionInterface) OverrideGetParameterType(cb func(Action) *glib.VariantType) {68 func (x *ActionInterface) OverrideGetParameterType(cb func(Action) *glib.VariantType) {
66 if cb == nil {69 if cb == nil {
67 x.xGetParameterType = 070 x.xGetParameterType = 0
@@ -73,6 +76,7 @@ func (x *ActionInterface) OverrideGetParameterType(cb func(Action) *glib.Variant
73 }76 }
74 77
75 // GetGetParameterType gets the callback function.78 // GetGetParameterType gets the callback function.
79+// the virtual function pointer for [method@Gio.Action.get_parameter_type]
76 func (x *ActionInterface) GetGetParameterType() func(Action) *glib.VariantType {80 func (x *ActionInterface) GetGetParameterType() func(Action) *glib.VariantType {
77 if x.xGetParameterType == 0 {81 if x.xGetParameterType == 0 {
78 return nil82 return nil
@@ -85,6 +89,7 @@ func (x *ActionInterface) GetGetParameterType() func(Action) *glib.VariantType {
85 }89 }
86 90
87 // OverrideGetStateType sets the callback function.91 // OverrideGetStateType sets the callback function.
92+// the virtual function pointer for [method@Gio.Action.get_state_type]
88 func (x *ActionInterface) OverrideGetStateType(cb func(Action) *glib.VariantType) {93 func (x *ActionInterface) OverrideGetStateType(cb func(Action) *glib.VariantType) {
89 if cb == nil {94 if cb == nil {
90 x.xGetStateType = 095 x.xGetStateType = 0
@@ -96,6 +101,7 @@ func (x *ActionInterface) OverrideGetStateType(cb func(Action) *glib.VariantType
96 }101 }
97 102
98 // GetGetStateType gets the callback function.103 // GetGetStateType gets the callback function.
104+// the virtual function pointer for [method@Gio.Action.get_state_type]
99 func (x *ActionInterface) GetGetStateType() func(Action) *glib.VariantType {105 func (x *ActionInterface) GetGetStateType() func(Action) *glib.VariantType {
100 if x.xGetStateType == 0 {106 if x.xGetStateType == 0 {
101 return nil107 return nil
@@ -108,6 +114,7 @@ func (x *ActionInterface) GetGetStateType() func(Action) *glib.VariantType {
108 }114 }
109 115
110 // OverrideGetStateHint sets the callback function.116 // OverrideGetStateHint sets the callback function.
117+// the virtual function pointer for [method@Gio.Action.get_state_hint]
111 func (x *ActionInterface) OverrideGetStateHint(cb func(Action) *glib.Variant) {118 func (x *ActionInterface) OverrideGetStateHint(cb func(Action) *glib.Variant) {
112 if cb == nil {119 if cb == nil {
113 x.xGetStateHint = 0120 x.xGetStateHint = 0
@@ -119,6 +126,7 @@ func (x *ActionInterface) OverrideGetStateHint(cb func(Action) *glib.Variant) {
119 }126 }
120 127
121 // GetGetStateHint gets the callback function.128 // GetGetStateHint gets the callback function.
129+// the virtual function pointer for [method@Gio.Action.get_state_hint]
122 func (x *ActionInterface) GetGetStateHint() func(Action) *glib.Variant {130 func (x *ActionInterface) GetGetStateHint() func(Action) *glib.Variant {
123 if x.xGetStateHint == 0 {131 if x.xGetStateHint == 0 {
124 return nil132 return nil
@@ -131,6 +139,7 @@ func (x *ActionInterface) GetGetStateHint() func(Action) *glib.Variant {
131 }139 }
132 140
133 // OverrideGetEnabled sets the callback function.141 // OverrideGetEnabled sets the callback function.
142+// the virtual function pointer for [method@Gio.Action.get_enabled]
134 func (x *ActionInterface) OverrideGetEnabled(cb func(Action) bool) {143 func (x *ActionInterface) OverrideGetEnabled(cb func(Action) bool) {
135 if cb == nil {144 if cb == nil {
136 x.xGetEnabled = 0145 x.xGetEnabled = 0
@@ -142,6 +151,7 @@ func (x *ActionInterface) OverrideGetEnabled(cb func(Action) bool) {
142 }151 }
143 152
144 // GetGetEnabled gets the callback function.153 // GetGetEnabled gets the callback function.
154+// the virtual function pointer for [method@Gio.Action.get_enabled]
145 func (x *ActionInterface) GetGetEnabled() func(Action) bool {155 func (x *ActionInterface) GetGetEnabled() func(Action) bool {
146 if x.xGetEnabled == 0 {156 if x.xGetEnabled == 0 {
147 return nil157 return nil
@@ -154,6 +164,7 @@ func (x *ActionInterface) GetGetEnabled() func(Action) bool {
154 }164 }
155 165
156 // OverrideGetState sets the callback function.166 // OverrideGetState sets the callback function.
167+// the virtual function pointer for [method@Gio.Action.get_state]
157 func (x *ActionInterface) OverrideGetState(cb func(Action) *glib.Variant) {168 func (x *ActionInterface) OverrideGetState(cb func(Action) *glib.Variant) {
158 if cb == nil {169 if cb == nil {
159 x.xGetState = 0170 x.xGetState = 0
@@ -165,6 +176,7 @@ func (x *ActionInterface) OverrideGetState(cb func(Action) *glib.Variant) {
165 }176 }
166 177
167 // GetGetState gets the callback function.178 // GetGetState gets the callback function.
179+// the virtual function pointer for [method@Gio.Action.get_state]
168 func (x *ActionInterface) GetGetState() func(Action) *glib.Variant {180 func (x *ActionInterface) GetGetState() func(Action) *glib.Variant {
169 if x.xGetState == 0 {181 if x.xGetState == 0 {
170 return nil182 return nil
@@ -177,6 +189,7 @@ func (x *ActionInterface) GetGetState() func(Action) *glib.Variant {
177 }189 }
178 190
179 // OverrideChangeState sets the callback function.191 // OverrideChangeState sets the callback function.
192+// the virtual function pointer for [method@Gio.Action.change_state]
180 func (x *ActionInterface) OverrideChangeState(cb func(Action, *glib.Variant)) {193 func (x *ActionInterface) OverrideChangeState(cb func(Action, *glib.Variant)) {
181 if cb == nil {194 if cb == nil {
182 x.xChangeState = 0195 x.xChangeState = 0
@@ -188,6 +201,7 @@ func (x *ActionInterface) OverrideChangeState(cb func(Action, *glib.Variant)) {
188 }201 }
189 202
190 // GetChangeState gets the callback function.203 // GetChangeState gets the callback function.
204+// the virtual function pointer for [method@Gio.Action.change_state]
191 func (x *ActionInterface) GetChangeState() func(Action, *glib.Variant) {205 func (x *ActionInterface) GetChangeState() func(Action, *glib.Variant) {
192 if x.xChangeState == 0 {206 if x.xChangeState == 0 {
193 return nil207 return nil
@@ -200,6 +214,9 @@ func (x *ActionInterface) GetChangeState() func(Action, *glib.Variant) {
200 }214 }
201 215
202 // OverrideActivate sets the callback function.216 // OverrideActivate sets the callback function.
217+// the virtual function pointer for [method@Gio.Action.activate]. Note that [type@Gio.Action] does not have an
218+//
219+// 'activate' signal but that implementations of it may have one.
203 func (x *ActionInterface) OverrideActivate(cb func(Action, *glib.Variant)) {220 func (x *ActionInterface) OverrideActivate(cb func(Action, *glib.Variant)) {
204 if cb == nil {221 if cb == nil {
205 x.xActivate = 0222 x.xActivate = 0
@@ -211,6 +228,9 @@ func (x *ActionInterface) OverrideActivate(cb func(Action, *glib.Variant)) {
211 }228 }
212 229
213 // GetActivate gets the callback function.230 // GetActivate gets the callback function.
231+// the virtual function pointer for [method@Gio.Action.activate]. Note that [type@Gio.Action] does not have an
232+//
233+// 'activate' signal but that implementations of it may have one.
214 func (x *ActionInterface) GetActivate() func(Action, *glib.Variant) {234 func (x *ActionInterface) GetActivate() func(Action, *glib.Variant) {
215 if x.xActivate == 0 {235 if x.xActivate == 0 {
216 return nil236 return nil
@@ -222,35 +242,35 @@ func (x *ActionInterface) GetActivate() func(Action, *glib.Variant) {
222 }242 }
223 }243 }
224 244
225-// #GAction represents a single named action.245+// `GAction` represents a single named action.
226 //246 //
227 // The main interface to an action is that it can be activated with247 // The main interface to an action is that it can be activated with
228-// g_action_activate(). This results in the 'activate' signal being248+// [method@Gio.Action.activate]. This results in the 'activate' signal being
229-// emitted. An activation has a #GVariant parameter (which may be249+// emitted. An activation has a `GVariant` parameter (which may be
230-// %NULL). The correct type for the parameter is determined by a static250+// `NULL`). The correct type for the parameter is determined by a static
231 // parameter type (which is given at construction time).251 // parameter type (which is given at construction time).
232 //252 //
233 // An action may optionally have a state, in which case the state may be253 // An action may optionally have a state, in which case the state may be
234-// set with g_action_change_state(). This call takes a #GVariant. The254+// set with [method@Gio.Action.change_state]. This call takes a [type@GLib.Variant]. The
235 // correct type for the state is determined by a static state type255 // correct type for the state is determined by a static state type
236 // (which is given at construction time).256 // (which is given at construction time).
237 //257 //
238 // The state may have a hint associated with it, specifying its valid258 // The state may have a hint associated with it, specifying its valid
239 // range.259 // range.
240 //260 //
241-// #GAction is merely the interface to the concept of an action, as261+// `GAction` is merely the interface to the concept of an action, as
242 // described above. Various implementations of actions exist, including262 // described above. Various implementations of actions exist, including
243-// #GSimpleAction.263+// [class@Gio.SimpleAction].
244 //264 //
245 // In all cases, the implementing class is responsible for storing the265 // In all cases, the implementing class is responsible for storing the
246-// name of the action, the parameter type, the enabled state, the266+// name of the action, the parameter type, the enabled state, the optional
247-// optional state type and the state and emitting the appropriate267+// state type and the state and emitting the appropriate signals when these
248-// signals when these change. The implementor is responsible for filtering268+// change. The implementor is responsible for filtering calls to
249-// calls to g_action_activate() and g_action_change_state() for type269+// [method@Gio.Action.activate] and [method@Gio.Action.change_state]
250-// safety and for the state being enabled.270+// for type safety and for the state being enabled.
251-//271+//
252-// Probably the only useful thing to do with a #GAction is to put it272+// Probably the only useful thing to do with a `GAction` is to put it
253-// inside of a #GSimpleActionGroup.273+// inside of a [class@Gio.SimpleActionGroup].
254 type Action interface {274 type Action interface {
255 GoPointer() uintptr275 GoPointer() uintptr
256 SetGoPointer(uintptr)276 SetGoPointer(uintptr)
@@ -289,9 +309,9 @@ func (x *ActionBase) SetGoPointer(ptr uintptr) {
289 //309 //
290 // @parameter must be the correct type of parameter for the action (ie:310 // @parameter must be the correct type of parameter for the action (ie:
291 // the parameter type given at construction time). If the parameter311 // the parameter type given at construction time). If the parameter
292-// type was %NULL then @parameter must also be %NULL.312+// type was `NULL` then @parameter must also be `NULL`.
293 //313 //
294-// If the @parameter GVariant is floating, it is consumed.314+// If the @parameter [type@GLib.Variant] is floating, it is consumed.
295 func (x *ActionBase) Activate(ParameterVar *glib.Variant) {315 func (x *ActionBase) Activate(ParameterVar *glib.Variant) {
296 316
297 XGActionActivate(x.GoPointer(), ParameterVar)317 XGActionActivate(x.GoPointer(), ParameterVar)
@@ -301,13 +321,13 @@ func (x *ActionBase) Activate(ParameterVar *glib.Variant) {
301 // Request for the state of @action to be changed to @value.321 // Request for the state of @action to be changed to @value.
302 //322 //
303 // The action must be stateful and @value must be of the correct type.323 // The action must be stateful and @value must be of the correct type.
304-// See g_action_get_state_type().324+// See [method@Gio.Action.get_state_type].
305 //325 //
306 // This call merely requests a change. The action may refuse to change326 // This call merely requests a change. The action may refuse to change
307 // its state or may change its state to something other than @value.327 // its state or may change its state to something other than @value.
308-// See g_action_get_state_hint().328+// See [method@Gio.Action.get_state_hint].
309 //329 //
310-// If the @value GVariant is floating, it is consumed.330+// If the @value [type@GLib.Variant] is floating, it is consumed.
311 func (x *ActionBase) ChangeState(ValueVar *glib.Variant) {331 func (x *ActionBase) ChangeState(ValueVar *glib.Variant) {
312 332
313 XGActionChangeState(x.GoPointer(), ValueVar)333 XGActionChangeState(x.GoPointer(), ValueVar)
@@ -334,11 +354,12 @@ func (x *ActionBase) GetName() string {
334 // Queries the type of the parameter that must be given when activating354 // Queries the type of the parameter that must be given when activating
335 // @action.355 // @action.
336 //356 //
337-// When activating the action using g_action_activate(), the #GVariant357+// When activating the action using [method@Gio.Action.activate], the
338-// given to that function must be of the type returned by this function.358+// [type@GLib.Variant] given to that function must be of the type returned by
359+// this function.
339 //360 //
340-// In the case that this function returns %NULL, you must not give any361+// In the case that this function returns `NULL`, you must not give any
341-// #GVariant, but %NULL instead.362+// [type@GLib.Variant], but `NULL` instead.
342 func (x *ActionBase) GetParameterType() *glib.VariantType {363 func (x *ActionBase) GetParameterType() *glib.VariantType {
343 364
344 cret := XGActionGetParameterType(x.GoPointer())365 cret := XGActionGetParameterType(x.GoPointer())
@@ -347,12 +368,12 @@ func (x *ActionBase) GetParameterType() *glib.VariantType {
347 368
348 // Queries the current state of @action.369 // Queries the current state of @action.
349 //370 //
350-// If the action is not stateful then %NULL will be returned. If the371+// If the action is not stateful then `NULL` will be returned. If the
351 // action is stateful then the type of the return value is the type372 // action is stateful then the type of the return value is the type
352-// given by g_action_get_state_type().373+// given by [method@Gio.Action.get_state_type].
353 //374 //
354-// The return value (if non-%NULL) should be freed with375+// The return value (if non-`NULL`) should be freed with
355-// g_variant_unref() when it is no longer required.376+// [method@GLib.Variant.unref] when it is no longer required.
356 func (x *ActionBase) GetState() *glib.Variant {377 func (x *ActionBase) GetState() *glib.Variant {
357 378
358 cret := XGActionGetState(x.GoPointer())379 cret := XGActionGetState(x.GoPointer())
@@ -362,12 +383,12 @@ func (x *ActionBase) GetState() *glib.Variant {
362 // Requests a hint about the valid range of values for the state of383 // Requests a hint about the valid range of values for the state of
363 // @action.384 // @action.
364 //385 //
365-// If %NULL is returned it either means that the action is not stateful386+// If `NULL` is returned it either means that the action is not stateful
366 // or that there is no hint about the valid range of values for the387 // or that there is no hint about the valid range of values for the
367 // state of the action.388 // state of the action.
368 //389 //
369-// If a #GVariant array is returned then each item in the array is a390+// If a [type@GLib.Variant] array is returned then each item in the array is a
370-// possible value for the state. If a #GVariant pair (ie: two-tuple) is391+// possible value for the state. If a [type@GLib.Variant] pair (ie: two-tuple) is
371 // returned then the tuple specifies the inclusive lower and upper bound392 // returned then the tuple specifies the inclusive lower and upper bound
372 // of valid values for the state.393 // of valid values for the state.
373 //394 //
@@ -375,8 +396,8 @@ func (x *ActionBase) GetState() *glib.Variant {
375 // have a state value outside of the hinted range and setting a value396 // have a state value outside of the hinted range and setting a value
376 // within the range may fail.397 // within the range may fail.
377 //398 //
378-// The return value (if non-%NULL) should be freed with399+// The return value (if non-`NULL`) should be freed with
379-// g_variant_unref() when it is no longer required.400+// [method@GLib.Variant.unref] when it is no longer required.
380 func (x *ActionBase) GetStateHint() *glib.Variant {401 func (x *ActionBase) GetStateHint() *glib.Variant {
381 402
382 cret := XGActionGetStateHint(x.GoPointer())403 cret := XGActionGetStateHint(x.GoPointer())
@@ -386,15 +407,15 @@ func (x *ActionBase) GetStateHint() *glib.Variant {
386 // Queries the type of the state of @action.407 // Queries the type of the state of @action.
387 //408 //
388 // If the action is stateful (e.g. created with409 // If the action is stateful (e.g. created with
389-// g_simple_action_new_stateful()) then this function returns the410+// [ctor@Gio.SimpleAction.new_stateful]) then this function returns the
390-// #GVariantType of the state. This is the type of the initial value411+// [type@GLib.VariantType] of the state. This is the type of the initial value
391-// given as the state. All calls to g_action_change_state() must give a412+// given as the state. All calls to [method@Gio.Action.change_state] must give a
392-// #GVariant of this type and g_action_get_state() will return a413+// [type@GLib.Variant] of this type and [method@Gio.Action.get_state] will return a
393-// #GVariant of the same type.414+// [type@GLib.Variant] of the same type.
394-//415+//
395-// If the action is not stateful (e.g. created with g_simple_action_new())416+// If the action is not stateful (e.g. created with [ctor@Gio.SimpleAction.new])
396-// then this function will return %NULL. In that case, g_action_get_state()417+// then this function will return `NULL`. In that case, [method@Gio.Action.get_state]
397-// will return %NULL and you must not call g_action_change_state().418+// will return `NULL` and you must not call [method@Gio.Action.change_state].
398 func (x *ActionBase) GetStateType() *glib.VariantType {419 func (x *ActionBase) GetStateType() *glib.VariantType {
399 420
400 cret := XGActionGetStateType(x.GoPointer())421 cret := XGActionGetStateType(x.GoPointer())
@@ -415,10 +436,10 @@ var xActionNameIsValid func(string) bool
415 // Checks if @action_name is valid.436 // Checks if @action_name is valid.
416 //437 //
417 // @action_name is valid if it consists only of alphanumeric characters,438 // @action_name is valid if it consists only of alphanumeric characters,
418-// plus '-' and '.'. The empty string is not a valid action name.439+// plus `-` and `.`. The empty string is not a valid action name.
419 //440 //
420-// It is an error to call this function with a non-utf8 @action_name.441+// It is an error to call this function with a non-UTF-8 @action_name.
421-// @action_name must not be %NULL.442+// @action_name must not be `NULL`.
422 func ActionNameIsValid(ActionNameVar string) bool {443 func ActionNameIsValid(ActionNameVar string) bool {
423 444
424 cret := xActionNameIsValid(ActionNameVar)445 cret := xActionNameIsValid(ActionNameVar)
@@ -434,23 +455,29 @@ var xActionParseDetailedName func(string, string, **glib.Variant, **glib.Error)
434 //455 //
435 // The first format is used to represent an action name with no target456 // The first format is used to represent an action name with no target
436 // value and consists of just an action name containing no whitespace457 // value and consists of just an action name containing no whitespace
437-// nor the characters ':', '(' or ')'. For example: "app.action".458+// nor the characters `:`, `(` or `)`. For example: `app.action`.
438 //459 //
439 // The second format is used to represent an action with a target value460 // The second format is used to represent an action with a target value
440-// that is a non-empty string consisting only of alphanumerics, plus '-'461+// that is a non-empty string consisting only of alphanumerics, plus `-`
441-// and '.'. In that case, the action name and target value are462+// and `.`. In that case, the action name and target value are
442-// separated by a double colon ("::"). For example:463+// separated by a double colon (`::`). For example:
443-// "app.action::target".464+// `app.action::target`.
444 //465 //
445 // The third format is used to represent an action with any type of466 // The third format is used to represent an action with any type of
446 // target value, including strings. The target value follows the action467 // target value, including strings. The target value follows the action
447-// name, surrounded in parens. For example: "app.action(42)". The468+// name, surrounded in parens. For example: `app.action(42)`. The
448-// target value is parsed using g_variant_parse(). If a tuple-typed469+// target value is parsed using [func@GLib.Variant.parse]. If a tuple-typed
449 // value is desired, it must be specified in the same way, resulting in470 // value is desired, it must be specified in the same way, resulting in
450-// two sets of parens, for example: "app.action((1,2,3))". A string471+// two sets of parens, for example: `app.action((1,2,3))`. A string
451-// target can be specified this way as well: "app.action('target')".472+// target can be specified this way as well: `app.action('target')`.
452-// For strings, this third format must be used if * target value is473+// For strings, this third format must be used if target value is
453-// empty or contains characters other than alphanumerics, '-' and '.'.474+// empty or contains characters other than alphanumerics, `-` and `.`.
475+//
476+// If this function returns `TRUE`, a non-`NULL` value is guaranteed to be returned
477+// in @action_name (if a pointer is passed in). A `NULL` value may still be
478+// returned in @target_value, as the @detailed_name may not contain a target.
479+//
480+// If returned, the [type@GLib.Variant] in @target_value is guaranteed to not be floating.
454 func ActionParseDetailedName(DetailedNameVar string, ActionNameVar string, TargetValueVar **glib.Variant) (bool, error) {481 func ActionParseDetailedName(DetailedNameVar string, ActionNameVar string, TargetValueVar **glib.Variant) (bool, error) {
455 var cerr *glib.Error482 var cerr *glib.Error
456 483
@@ -468,7 +495,7 @@ var xActionPrintDetailedName func(string, *glib.Variant) string
468 //495 //
469 // It is an error to call this function with an invalid action name.496 // It is an error to call this function with an invalid action name.
470 //497 //
471-// This function is the opposite of g_action_parse_detailed_name().498+// This function is the opposite of [func@Gio.Action.parse_detailed_name].
472 // It will produce a string that can be parsed back to the @action_name499 // It will produce a string that can be parsed back to the @action_name
473 // and @target_value by that function.500 // and @target_value by that function.
474 //501 //
M v4/gio/gactiongroup.go +109 -82
@@ -11,7 +11,7 @@ import (
11 "github.com/jwijenbergh/puregotk/v4/gobject/types"11 "github.com/jwijenbergh/puregotk/v4/gobject/types"
12 )12 )
13 13
14-// The virtual function table for #GActionGroup.14+// The virtual function table for [type@Gio.ActionGroup].
15 type ActionGroupInterface struct {15 type ActionGroupInterface struct {
16 _ structs.HostLayout16 _ structs.HostLayout
17 17
@@ -51,6 +51,7 @@ func (x *ActionGroupInterface) GoPointer() uintptr {
51 }51 }
52 52
53 // OverrideHasAction sets the callback function.53 // OverrideHasAction sets the callback function.
54+// the virtual function pointer for [method@Gio.ActionGroup.has_action]
54 func (x *ActionGroupInterface) OverrideHasAction(cb func(ActionGroup, string) bool) {55 func (x *ActionGroupInterface) OverrideHasAction(cb func(ActionGroup, string) bool) {
55 if cb == nil {56 if cb == nil {
56 x.xHasAction = 057 x.xHasAction = 0
@@ -62,6 +63,7 @@ func (x *ActionGroupInterface) OverrideHasAction(cb func(ActionGroup, string) bo
62 }63 }
63 64
64 // GetHasAction gets the callback function.65 // GetHasAction gets the callback function.
66+// the virtual function pointer for [method@Gio.ActionGroup.has_action]
65 func (x *ActionGroupInterface) GetHasAction() func(ActionGroup, string) bool {67 func (x *ActionGroupInterface) GetHasAction() func(ActionGroup, string) bool {
66 if x.xHasAction == 0 {68 if x.xHasAction == 0 {
67 return nil69 return nil
@@ -74,6 +76,7 @@ func (x *ActionGroupInterface) GetHasAction() func(ActionGroup, string) bool {
74 }76 }
75 77
76 // OverrideListActions sets the callback function.78 // OverrideListActions sets the callback function.
79+// the virtual function pointer for [method@Gio.ActionGroup.list_actions]
77 func (x *ActionGroupInterface) OverrideListActions(cb func(ActionGroup) []string) {80 func (x *ActionGroupInterface) OverrideListActions(cb func(ActionGroup) []string) {
78 if cb == nil {81 if cb == nil {
79 x.xListActions = 082 x.xListActions = 0
@@ -85,6 +88,7 @@ func (x *ActionGroupInterface) OverrideListActions(cb func(ActionGroup) []string
85 }88 }
86 89
87 // GetListActions gets the callback function.90 // GetListActions gets the callback function.
91+// the virtual function pointer for [method@Gio.ActionGroup.list_actions]
88 func (x *ActionGroupInterface) GetListActions() func(ActionGroup) []string {92 func (x *ActionGroupInterface) GetListActions() func(ActionGroup) []string {
89 if x.xListActions == 0 {93 if x.xListActions == 0 {
90 return nil94 return nil
@@ -97,6 +101,7 @@ func (x *ActionGroupInterface) GetListActions() func(ActionGroup) []string {
97 }101 }
98 102
99 // OverrideGetActionEnabled sets the callback function.103 // OverrideGetActionEnabled sets the callback function.
104+// the virtual function pointer for [method@Gio.ActionGroup.get_action_enabled]
100 func (x *ActionGroupInterface) OverrideGetActionEnabled(cb func(ActionGroup, string) bool) {105 func (x *ActionGroupInterface) OverrideGetActionEnabled(cb func(ActionGroup, string) bool) {
101 if cb == nil {106 if cb == nil {
102 x.xGetActionEnabled = 0107 x.xGetActionEnabled = 0
@@ -108,6 +113,7 @@ func (x *ActionGroupInterface) OverrideGetActionEnabled(cb func(ActionGroup, str
108 }113 }
109 114
110 // GetGetActionEnabled gets the callback function.115 // GetGetActionEnabled gets the callback function.
116+// the virtual function pointer for [method@Gio.ActionGroup.get_action_enabled]
111 func (x *ActionGroupInterface) GetGetActionEnabled() func(ActionGroup, string) bool {117 func (x *ActionGroupInterface) GetGetActionEnabled() func(ActionGroup, string) bool {
112 if x.xGetActionEnabled == 0 {118 if x.xGetActionEnabled == 0 {
113 return nil119 return nil
@@ -120,6 +126,7 @@ func (x *ActionGroupInterface) GetGetActionEnabled() func(ActionGroup, string) b
120 }126 }
121 127
122 // OverrideGetActionParameterType sets the callback function.128 // OverrideGetActionParameterType sets the callback function.
129+// the virtual function pointer for [method@Gio.ActionGroup.get_action_parameter_type]
123 func (x *ActionGroupInterface) OverrideGetActionParameterType(cb func(ActionGroup, string) *glib.VariantType) {130 func (x *ActionGroupInterface) OverrideGetActionParameterType(cb func(ActionGroup, string) *glib.VariantType) {
124 if cb == nil {131 if cb == nil {
125 x.xGetActionParameterType = 0132 x.xGetActionParameterType = 0
@@ -131,6 +138,7 @@ func (x *ActionGroupInterface) OverrideGetActionParameterType(cb func(ActionGrou
131 }138 }
132 139
133 // GetGetActionParameterType gets the callback function.140 // GetGetActionParameterType gets the callback function.
141+// the virtual function pointer for [method@Gio.ActionGroup.get_action_parameter_type]
134 func (x *ActionGroupInterface) GetGetActionParameterType() func(ActionGroup, string) *glib.VariantType {142 func (x *ActionGroupInterface) GetGetActionParameterType() func(ActionGroup, string) *glib.VariantType {
135 if x.xGetActionParameterType == 0 {143 if x.xGetActionParameterType == 0 {
136 return nil144 return nil
@@ -143,6 +151,7 @@ func (x *ActionGroupInterface) GetGetActionParameterType() func(ActionGroup, str
143 }151 }
144 152
145 // OverrideGetActionStateType sets the callback function.153 // OverrideGetActionStateType sets the callback function.
154+// the virtual function pointer for [method@Gio.ActionGroup.get_action_state_type]
146 func (x *ActionGroupInterface) OverrideGetActionStateType(cb func(ActionGroup, string) *glib.VariantType) {155 func (x *ActionGroupInterface) OverrideGetActionStateType(cb func(ActionGroup, string) *glib.VariantType) {
147 if cb == nil {156 if cb == nil {
148 x.xGetActionStateType = 0157 x.xGetActionStateType = 0
@@ -154,6 +163,7 @@ func (x *ActionGroupInterface) OverrideGetActionStateType(cb func(ActionGroup, s
154 }163 }
155 164
156 // GetGetActionStateType gets the callback function.165 // GetGetActionStateType gets the callback function.
166+// the virtual function pointer for [method@Gio.ActionGroup.get_action_state_type]
157 func (x *ActionGroupInterface) GetGetActionStateType() func(ActionGroup, string) *glib.VariantType {167 func (x *ActionGroupInterface) GetGetActionStateType() func(ActionGroup, string) *glib.VariantType {
158 if x.xGetActionStateType == 0 {168 if x.xGetActionStateType == 0 {
159 return nil169 return nil
@@ -166,6 +176,7 @@ func (x *ActionGroupInterface) GetGetActionStateType() func(ActionGroup, string)
166 }176 }
167 177
168 // OverrideGetActionStateHint sets the callback function.178 // OverrideGetActionStateHint sets the callback function.
179+// the virtual function pointer for [method@Gio.ActionGroup.get_action_state_hint]
169 func (x *ActionGroupInterface) OverrideGetActionStateHint(cb func(ActionGroup, string) *glib.Variant) {180 func (x *ActionGroupInterface) OverrideGetActionStateHint(cb func(ActionGroup, string) *glib.Variant) {
170 if cb == nil {181 if cb == nil {
171 x.xGetActionStateHint = 0182 x.xGetActionStateHint = 0
@@ -177,6 +188,7 @@ func (x *ActionGroupInterface) OverrideGetActionStateHint(cb func(ActionGroup, s
177 }188 }
178 189
179 // GetGetActionStateHint gets the callback function.190 // GetGetActionStateHint gets the callback function.
191+// the virtual function pointer for [method@Gio.ActionGroup.get_action_state_hint]
180 func (x *ActionGroupInterface) GetGetActionStateHint() func(ActionGroup, string) *glib.Variant {192 func (x *ActionGroupInterface) GetGetActionStateHint() func(ActionGroup, string) *glib.Variant {
181 if x.xGetActionStateHint == 0 {193 if x.xGetActionStateHint == 0 {
182 return nil194 return nil
@@ -189,6 +201,7 @@ func (x *ActionGroupInterface) GetGetActionStateHint() func(ActionGroup, string)
189 }201 }
190 202
191 // OverrideGetActionState sets the callback function.203 // OverrideGetActionState sets the callback function.
204+// the virtual function pointer for [method@Gio.ActionGroup.get_action_state]
192 func (x *ActionGroupInterface) OverrideGetActionState(cb func(ActionGroup, string) *glib.Variant) {205 func (x *ActionGroupInterface) OverrideGetActionState(cb func(ActionGroup, string) *glib.Variant) {
193 if cb == nil {206 if cb == nil {
194 x.xGetActionState = 0207 x.xGetActionState = 0
@@ -200,6 +213,7 @@ func (x *ActionGroupInterface) OverrideGetActionState(cb func(ActionGroup, strin
200 }213 }
201 214
202 // GetGetActionState gets the callback function.215 // GetGetActionState gets the callback function.
216+// the virtual function pointer for [method@Gio.ActionGroup.get_action_state]
203 func (x *ActionGroupInterface) GetGetActionState() func(ActionGroup, string) *glib.Variant {217 func (x *ActionGroupInterface) GetGetActionState() func(ActionGroup, string) *glib.Variant {
204 if x.xGetActionState == 0 {218 if x.xGetActionState == 0 {
205 return nil219 return nil
@@ -212,6 +226,7 @@ func (x *ActionGroupInterface) GetGetActionState() func(ActionGroup, string) *gl
212 }226 }
213 227
214 // OverrideChangeActionState sets the callback function.228 // OverrideChangeActionState sets the callback function.
229+// the virtual function pointer for [method@Gio.ActionGroup.change_action_state]
215 func (x *ActionGroupInterface) OverrideChangeActionState(cb func(ActionGroup, string, *glib.Variant)) {230 func (x *ActionGroupInterface) OverrideChangeActionState(cb func(ActionGroup, string, *glib.Variant)) {
216 if cb == nil {231 if cb == nil {
217 x.xChangeActionState = 0232 x.xChangeActionState = 0
@@ -223,6 +238,7 @@ func (x *ActionGroupInterface) OverrideChangeActionState(cb func(ActionGroup, st
223 }238 }
224 239
225 // GetChangeActionState gets the callback function.240 // GetChangeActionState gets the callback function.
241+// the virtual function pointer for [method@Gio.ActionGroup.change_action_state]
226 func (x *ActionGroupInterface) GetChangeActionState() func(ActionGroup, string, *glib.Variant) {242 func (x *ActionGroupInterface) GetChangeActionState() func(ActionGroup, string, *glib.Variant) {
227 if x.xChangeActionState == 0 {243 if x.xChangeActionState == 0 {
228 return nil244 return nil
@@ -235,6 +251,7 @@ func (x *ActionGroupInterface) GetChangeActionState() func(ActionGroup, string,
235 }251 }
236 252
237 // OverrideActivateAction sets the callback function.253 // OverrideActivateAction sets the callback function.
254+// the virtual function pointer for [method@Gio.ActionGroup.activate_action]
238 func (x *ActionGroupInterface) OverrideActivateAction(cb func(ActionGroup, string, *glib.Variant)) {255 func (x *ActionGroupInterface) OverrideActivateAction(cb func(ActionGroup, string, *glib.Variant)) {
239 if cb == nil {256 if cb == nil {
240 x.xActivateAction = 0257 x.xActivateAction = 0
@@ -246,6 +263,7 @@ func (x *ActionGroupInterface) OverrideActivateAction(cb func(ActionGroup, strin
246 }263 }
247 264
248 // GetActivateAction gets the callback function.265 // GetActivateAction gets the callback function.
266+// the virtual function pointer for [method@Gio.ActionGroup.activate_action]
249 func (x *ActionGroupInterface) GetActivateAction() func(ActionGroup, string, *glib.Variant) {267 func (x *ActionGroupInterface) GetActivateAction() func(ActionGroup, string, *glib.Variant) {
250 if x.xActivateAction == 0 {268 if x.xActivateAction == 0 {
251 return nil269 return nil
@@ -258,6 +276,7 @@ func (x *ActionGroupInterface) GetActivateAction() func(ActionGroup, string, *gl
258 }276 }
259 277
260 // OverrideActionAdded sets the callback function.278 // OverrideActionAdded sets the callback function.
279+// the class closure for the [signal@Gio.ActionGroup::action-added] signal
261 func (x *ActionGroupInterface) OverrideActionAdded(cb func(ActionGroup, string)) {280 func (x *ActionGroupInterface) OverrideActionAdded(cb func(ActionGroup, string)) {
262 if cb == nil {281 if cb == nil {
263 x.xActionAdded = 0282 x.xActionAdded = 0
@@ -269,6 +288,7 @@ func (x *ActionGroupInterface) OverrideActionAdded(cb func(ActionGroup, string))
269 }288 }
270 289
271 // GetActionAdded gets the callback function.290 // GetActionAdded gets the callback function.
291+// the class closure for the [signal@Gio.ActionGroup::action-added] signal
272 func (x *ActionGroupInterface) GetActionAdded() func(ActionGroup, string) {292 func (x *ActionGroupInterface) GetActionAdded() func(ActionGroup, string) {
273 if x.xActionAdded == 0 {293 if x.xActionAdded == 0 {
274 return nil294 return nil
@@ -281,6 +301,7 @@ func (x *ActionGroupInterface) GetActionAdded() func(ActionGroup, string) {
281 }301 }
282 302
283 // OverrideActionRemoved sets the callback function.303 // OverrideActionRemoved sets the callback function.
304+// the class closure for the [signal@Gio.ActionGroup::action-removed] signal
284 func (x *ActionGroupInterface) OverrideActionRemoved(cb func(ActionGroup, string)) {305 func (x *ActionGroupInterface) OverrideActionRemoved(cb func(ActionGroup, string)) {
285 if cb == nil {306 if cb == nil {
286 x.xActionRemoved = 0307 x.xActionRemoved = 0
@@ -292,6 +313,7 @@ func (x *ActionGroupInterface) OverrideActionRemoved(cb func(ActionGroup, string
292 }313 }
293 314
294 // GetActionRemoved gets the callback function.315 // GetActionRemoved gets the callback function.
316+// the class closure for the [signal@Gio.ActionGroup::action-removed] signal
295 func (x *ActionGroupInterface) GetActionRemoved() func(ActionGroup, string) {317 func (x *ActionGroupInterface) GetActionRemoved() func(ActionGroup, string) {
296 if x.xActionRemoved == 0 {318 if x.xActionRemoved == 0 {
297 return nil319 return nil
@@ -304,6 +326,7 @@ func (x *ActionGroupInterface) GetActionRemoved() func(ActionGroup, string) {
304 }326 }
305 327
306 // OverrideActionEnabledChanged sets the callback function.328 // OverrideActionEnabledChanged sets the callback function.
329+// the class closure for the [signal@Gio.ActionGroup::action-enabled-changed] signal
307 func (x *ActionGroupInterface) OverrideActionEnabledChanged(cb func(ActionGroup, string, bool)) {330 func (x *ActionGroupInterface) OverrideActionEnabledChanged(cb func(ActionGroup, string, bool)) {
308 if cb == nil {331 if cb == nil {
309 x.xActionEnabledChanged = 0332 x.xActionEnabledChanged = 0
@@ -315,6 +338,7 @@ func (x *ActionGroupInterface) OverrideActionEnabledChanged(cb func(ActionGroup,
315 }338 }
316 339
317 // GetActionEnabledChanged gets the callback function.340 // GetActionEnabledChanged gets the callback function.
341+// the class closure for the [signal@Gio.ActionGroup::action-enabled-changed] signal
318 func (x *ActionGroupInterface) GetActionEnabledChanged() func(ActionGroup, string, bool) {342 func (x *ActionGroupInterface) GetActionEnabledChanged() func(ActionGroup, string, bool) {
319 if x.xActionEnabledChanged == 0 {343 if x.xActionEnabledChanged == 0 {
320 return nil344 return nil
@@ -327,6 +351,7 @@ func (x *ActionGroupInterface) GetActionEnabledChanged() func(ActionGroup, strin
327 }351 }
328 352
329 // OverrideActionStateChanged sets the callback function.353 // OverrideActionStateChanged sets the callback function.
354+// the class closure for the [signal@Gio.ActionGroup::action-enabled-changed] signal
330 func (x *ActionGroupInterface) OverrideActionStateChanged(cb func(ActionGroup, string, *glib.Variant)) {355 func (x *ActionGroupInterface) OverrideActionStateChanged(cb func(ActionGroup, string, *glib.Variant)) {
331 if cb == nil {356 if cb == nil {
332 x.xActionStateChanged = 0357 x.xActionStateChanged = 0
@@ -338,6 +363,7 @@ func (x *ActionGroupInterface) OverrideActionStateChanged(cb func(ActionGroup, s
338 }363 }
339 364
340 // GetActionStateChanged gets the callback function.365 // GetActionStateChanged gets the callback function.
366+// the class closure for the [signal@Gio.ActionGroup::action-enabled-changed] signal
341 func (x *ActionGroupInterface) GetActionStateChanged() func(ActionGroup, string, *glib.Variant) {367 func (x *ActionGroupInterface) GetActionStateChanged() func(ActionGroup, string, *glib.Variant) {
342 if x.xActionStateChanged == 0 {368 if x.xActionStateChanged == 0 {
343 return nil369 return nil
@@ -350,6 +376,7 @@ func (x *ActionGroupInterface) GetActionStateChanged() func(ActionGroup, string,
350 }376 }
351 377
352 // OverrideQueryAction sets the callback function.378 // OverrideQueryAction sets the callback function.
379+// the virtual function pointer for [method@Gio.ActionGroup.query_action]
353 func (x *ActionGroupInterface) OverrideQueryAction(cb func(ActionGroup, string, bool, **glib.VariantType, **glib.VariantType, **glib.Variant, **glib.Variant) bool) {380 func (x *ActionGroupInterface) OverrideQueryAction(cb func(ActionGroup, string, bool, **glib.VariantType, **glib.VariantType, **glib.Variant, **glib.Variant) bool) {
354 if cb == nil {381 if cb == nil {
355 x.xQueryAction = 0382 x.xQueryAction = 0
@@ -361,6 +388,7 @@ func (x *ActionGroupInterface) OverrideQueryAction(cb func(ActionGroup, string,
361 }388 }
362 389
363 // GetQueryAction gets the callback function.390 // GetQueryAction gets the callback function.
391+// the virtual function pointer for [method@Gio.ActionGroup.query_action]
364 func (x *ActionGroupInterface) GetQueryAction() func(ActionGroup, string, bool, **glib.VariantType, **glib.VariantType, **glib.Variant, **glib.Variant) bool {392 func (x *ActionGroupInterface) GetQueryAction() func(ActionGroup, string, bool, **glib.VariantType, **glib.VariantType, **glib.Variant, **glib.Variant) bool {
365 if x.xQueryAction == 0 {393 if x.xQueryAction == 0 {
366 return nil394 return nil
@@ -372,51 +400,50 @@ func (x *ActionGroupInterface) GetQueryAction() func(ActionGroup, string, bool,
372 }400 }
373 }401 }
374 402
375-// #GActionGroup represents a group of actions. Actions can be used to403+// `GActionGroup` represents a group of actions.
376-// expose functionality in a structured way, either from one part of a
377-// program to another, or to the outside world. Action groups are often
378-// used together with a #GMenuModel that provides additional
379-// representation data for displaying the actions to the user, e.g. in
380-// a menu.
381 //404 //
382-// The main way to interact with the actions in a GActionGroup is to405+// Actions can be used to expose functionality in a structured way, either
383-// activate them with g_action_group_activate_action(). Activating an406+// from one part of a program to another, or to the outside world. Action
384-// action may require a #GVariant parameter. The required type of the407+// groups are often used together with a [type@Gio.MenuModel] that provides additional
385-// parameter can be inquired with g_action_group_get_action_parameter_type().408+// representation data for displaying the actions to the user, e.g. in a menu.
386-// Actions may be disabled, see g_action_group_get_action_enabled().409+//
410+// The main way to interact with the actions in a `GActionGroup` is to
411+// activate them with [method@Gio.ActionGroup.activate_action]. Activating an
412+// action may require a [type@GLib.Variant] parameter. The required type of the
413+// parameter can be inquired with [method@Gio.ActionGroup.get_action_parameter_type].
414+// Actions may be disabled, see [method@Gio.ActionGroup.get_action_enabled].
387 // Activating a disabled action has no effect.415 // Activating a disabled action has no effect.
388 //416 //
389-// Actions may optionally have a state in the form of a #GVariant. The417+// Actions may optionally have a state in the form of a [type@GLib.Variant]. The current
390-// current state of an action can be inquired with418+// state of an action can be inquired with [method@Gio.ActionGroup.get_action_state].
391-// g_action_group_get_action_state(). Activating a stateful action may419+// Activating a stateful action may change its state, but it is also possible to
392-// change its state, but it is also possible to set the state by calling420+// set the state by calling [method@Gio.ActionGroup.change_action_state].
393-// g_action_group_change_action_state().
394 //421 //
395 // As typical example, consider a text editing application which has an422 // As typical example, consider a text editing application which has an
396-// option to change the current font to 'bold'. A good way to represent423+// option to change the current font to ‘bold’. A good way to represent
397 // this would be a stateful action, with a boolean state. Activating the424 // this would be a stateful action, with a boolean state. Activating the
398 // action would toggle the state.425 // action would toggle the state.
399 //426 //
400 // Each action in the group has a unique name (which is a string). All427 // Each action in the group has a unique name (which is a string). All
401-// method calls, except g_action_group_list_actions() take the name of428+// method calls, except [method@Gio.ActionGroup.list_actions] take the name of
402 // an action as an argument.429 // an action as an argument.
403 //430 //
404-// The #GActionGroup API is meant to be the 'public' API to the action431+// The `GActionGroup` API is meant to be the ‘public’ API to the action
405-// group. The calls here are exactly the interaction that 'external432+// group. The calls here are exactly the interaction that ‘external
406-// forces' (eg: UI, incoming D-Bus messages, etc.) are supposed to have433+// forces’ (eg: UI, incoming D-Bus messages, etc.) are supposed to have
407-// with actions. 'Internal' APIs (ie: ones meant only to be accessed by434+// with actions. ‘Internal’ APIs (ie: ones meant only to be accessed by
408-// the action group implementation) are found on subclasses. This is435+// the action group implementation) are found on subclasses. This is
409-// why you will find - for example - g_action_group_get_action_enabled()436+// why you will find – for example – [method@Gio.ActionGroup.get_action_enabled]
410-// but not an equivalent set() call.437+// but not an equivalent `set_action_enabled()` method.
411 //438 //
412 // Signals are emitted on the action group in response to state changes439 // Signals are emitted on the action group in response to state changes
413 // on individual actions.440 // on individual actions.
414 //441 //
415-// Implementations of #GActionGroup should provide implementations for442+// Implementations of `GActionGroup` should provide implementations for
416-// the virtual functions g_action_group_list_actions() and443+// the virtual functions [method@Gio.ActionGroup.list_actions] and
417-// g_action_group_query_action(). The other virtual functions should444+// [method@Gio.ActionGroup.query_action]. The other virtual functions should
418-// not be implemented - their "wrappers" are actually implemented with445+// not be implemented — their ‘wrappers’ are actually implemented with
419-// calls to g_action_group_query_action().446+// calls to [method@Gio.ActionGroup.query_action].
420 type ActionGroup interface {447 type ActionGroup interface {
421 GoPointer() uintptr448 GoPointer() uintptr
422 SetGoPointer(uintptr)449 SetGoPointer(uintptr)
@@ -457,36 +484,36 @@ func (x *ActionGroupBase) SetGoPointer(ptr uintptr) {
457 x.Ptr = ptr484 x.Ptr = ptr
458 }485 }
459 486
460-// Emits the #GActionGroup::action-added signal on @action_group.487+// Emits the [signal@Gio.ActionGroup::action-added] signal on @action_group.
461 //488 //
462-// This function should only be called by #GActionGroup implementations.489+// This function should only be called by [type@Gio.ActionGroup] implementations.
463 func (x *ActionGroupBase) ActionAdded(ActionNameVar string) {490 func (x *ActionGroupBase) ActionAdded(ActionNameVar string) {
464 491
465 XGActionGroupActionAdded(x.GoPointer(), ActionNameVar)492 XGActionGroupActionAdded(x.GoPointer(), ActionNameVar)
466 493
467 }494 }
468 495
469-// Emits the #GActionGroup::action-enabled-changed signal on @action_group.496+// Emits the [signal@Gio.ActionGroup::action-enabled-changed] signal on @action_group.
470 //497 //
471-// This function should only be called by #GActionGroup implementations.498+// This function should only be called by [type@Gio.ActionGroup] implementations.
472 func (x *ActionGroupBase) ActionEnabledChanged(ActionNameVar string, EnabledVar bool) {499 func (x *ActionGroupBase) ActionEnabledChanged(ActionNameVar string, EnabledVar bool) {
473 500
474 XGActionGroupActionEnabledChanged(x.GoPointer(), ActionNameVar, EnabledVar)501 XGActionGroupActionEnabledChanged(x.GoPointer(), ActionNameVar, EnabledVar)
475 502
476 }503 }
477 504
478-// Emits the #GActionGroup::action-removed signal on @action_group.505+// Emits the [signal@Gio.ActionGroup::action-removed] signal on @action_group.
479 //506 //
480-// This function should only be called by #GActionGroup implementations.507+// This function should only be called by [type@Gio.ActionGroup] implementations.
481 func (x *ActionGroupBase) ActionRemoved(ActionNameVar string) {508 func (x *ActionGroupBase) ActionRemoved(ActionNameVar string) {
482 509
483 XGActionGroupActionRemoved(x.GoPointer(), ActionNameVar)510 XGActionGroupActionRemoved(x.GoPointer(), ActionNameVar)
484 511
485 }512 }
486 513
487-// Emits the #GActionGroup::action-state-changed signal on @action_group.514+// Emits the [signal@Gio.ActionGroup::action-state-changed] signal on @action_group.
488 //515 //
489-// This function should only be called by #GActionGroup implementations.516+// This function should only be called by [type@Gio.ActionGroup] implementations.
490 func (x *ActionGroupBase) ActionStateChanged(ActionNameVar string, StateVar *glib.Variant) {517 func (x *ActionGroupBase) ActionStateChanged(ActionNameVar string, StateVar *glib.Variant) {
491 518
492 XGActionGroupActionStateChanged(x.GoPointer(), ActionNameVar, StateVar)519 XGActionGroupActionStateChanged(x.GoPointer(), ActionNameVar, StateVar)
@@ -497,35 +524,35 @@ func (x *ActionGroupBase) ActionStateChanged(ActionNameVar string, StateVar *gli
497 //524 //
498 // If the action is expecting a parameter, then the correct type of525 // If the action is expecting a parameter, then the correct type of
499 // parameter must be given as @parameter. If the action is expecting no526 // parameter must be given as @parameter. If the action is expecting no
500-// parameters then @parameter must be %NULL. See527+// parameters then @parameter must be `NULL`. See
501-// g_action_group_get_action_parameter_type().528+// [method@Gio.ActionGroup.get_action_parameter_type].
502 //529 //
503-// If the #GActionGroup implementation supports asynchronous remote530+// If the [type@Gio.ActionGroup] implementation supports asynchronous remote
504 // activation over D-Bus, this call may return before the relevant531 // activation over D-Bus, this call may return before the relevant
505 // D-Bus traffic has been sent, or any replies have been received. In532 // D-Bus traffic has been sent, or any replies have been received. In
506 // order to block on such asynchronous activation calls,533 // order to block on such asynchronous activation calls,
507-// g_dbus_connection_flush() should be called prior to the code, which534+// [method@Gio.DBusConnection.flush] should be called prior to the code, which
508 // depends on the result of the action activation. Without flushing535 // depends on the result of the action activation. Without flushing
509 // the D-Bus connection, there is no guarantee that the action would536 // the D-Bus connection, there is no guarantee that the action would
510 // have been activated.537 // have been activated.
511 //538 //
512 // The following code which runs in a remote app instance, shows an539 // The following code which runs in a remote app instance, shows an
513-// example of a "quit" action being activated on the primary app540+// example of a ‘quit’ action being activated on the primary app
514-// instance over D-Bus. Here g_dbus_connection_flush() is called541+// instance over D-Bus. Here [method@Gio.DBusConnection.flush] is called
515-// before `exit()`. Without g_dbus_connection_flush(), the "quit" action542+// before `exit()`. Without `g_dbus_connection_flush()`, the ‘quit’ action
516 // may fail to be activated on the primary instance.543 // may fail to be activated on the primary instance.
517 //544 //
518-// |[<!-- language="C" -->545+// ```c
519-// // call "quit" action on primary instance546+// // call ‘quit’ action on primary instance
520 // g_action_group_activate_action (G_ACTION_GROUP (app), "quit", NULL);547 // g_action_group_activate_action (G_ACTION_GROUP (app), "quit", NULL);
521 //548 //
522 // // make sure the action is activated now549 // // make sure the action is activated now
523-// g_dbus_connection_flush (...);550+// g_dbus_connection_flush (…);
524 //551 //
525-// g_debug ("application has been terminated. exiting.");552+// g_debug ("Application has been terminated. Exiting.");
526 //553 //
527 // exit (0);554 // exit (0);
528-// ]|555+// ```
529 func (x *ActionGroupBase) ActivateAction(ActionNameVar string, ParameterVar *glib.Variant) {556 func (x *ActionGroupBase) ActivateAction(ActionNameVar string, ParameterVar *glib.Variant) {
530 557
531 XGActionGroupActivateAction(x.GoPointer(), ActionNameVar, ParameterVar)558 XGActionGroupActivateAction(x.GoPointer(), ActionNameVar, ParameterVar)
@@ -536,11 +563,11 @@ func (x *ActionGroupBase) ActivateAction(ActionNameVar string, ParameterVar *gli
536 // changed to @value.563 // changed to @value.
537 //564 //
538 // The action must be stateful and @value must be of the correct type.565 // The action must be stateful and @value must be of the correct type.
539-// See g_action_group_get_action_state_type().566+// See [method@Gio.ActionGroup.get_action_state_type].
540 //567 //
541 // This call merely requests a change. The action may refuse to change568 // This call merely requests a change. The action may refuse to change
542 // its state or may change its state to something other than @value.569 // its state or may change its state to something other than @value.
543-// See g_action_group_get_action_state_hint().570+// See [method@Gio.ActionGroup.get_action_state_hint].
544 //571 //
545 // If the @value GVariant is floating, it is consumed.572 // If the @value GVariant is floating, it is consumed.
546 func (x *ActionGroupBase) ChangeActionState(ActionNameVar string, ValueVar *glib.Variant) {573 func (x *ActionGroupBase) ChangeActionState(ActionNameVar string, ValueVar *glib.Variant) {
@@ -562,12 +589,12 @@ func (x *ActionGroupBase) GetActionEnabled(ActionNameVar string) bool {
562 // Queries the type of the parameter that must be given when activating589 // Queries the type of the parameter that must be given when activating
563 // the named action within @action_group.590 // the named action within @action_group.
564 //591 //
565-// When activating the action using g_action_group_activate_action(),592+// When activating the action using [method@Gio.ActionGroup.activate_action],
566-// the #GVariant given to that function must be of the type returned593+// the [type@GLib.Variant] given to that function must be of the type returned
567 // by this function.594 // by this function.
568 //595 //
569-// In the case that this function returns %NULL, you must not give any596+// In the case that this function returns `NULL`, you must not give any
570-// #GVariant, but %NULL instead.597+// [type@GLib.Variant], but `NULL` instead.
571 //598 //
572 // The parameter type of a particular action will never change but it is599 // The parameter type of a particular action will never change but it is
573 // possible for an action to be removed and for a new action to be added600 // possible for an action to be removed and for a new action to be added
@@ -580,12 +607,12 @@ func (x *ActionGroupBase) GetActionParameterType(ActionNameVar string) *glib.Var
580 607
581 // Queries the current state of the named action within @action_group.608 // Queries the current state of the named action within @action_group.
582 //609 //
583-// If the action is not stateful then %NULL will be returned. If the610+// If the action is not stateful then `NULL` will be returned. If the
584 // action is stateful then the type of the return value is the type611 // action is stateful then the type of the return value is the type
585-// given by g_action_group_get_action_state_type().612+// given by [method@Gio.ActionGroup.get_action_state_type].
586 //613 //
587-// The return value (if non-%NULL) should be freed with614+// The return value (if non-`NULL`) should be freed with
588-// g_variant_unref() when it is no longer required.615+// [method@GLib.Variant.unref] when it is no longer required.
589 func (x *ActionGroupBase) GetActionState(ActionNameVar string) *glib.Variant {616 func (x *ActionGroupBase) GetActionState(ActionNameVar string) *glib.Variant {
590 617
591 cret := XGActionGroupGetActionState(x.GoPointer(), ActionNameVar)618 cret := XGActionGroupGetActionState(x.GoPointer(), ActionNameVar)
@@ -595,12 +622,12 @@ func (x *ActionGroupBase) GetActionState(ActionNameVar string) *glib.Variant {
595 // Requests a hint about the valid range of values for the state of the622 // Requests a hint about the valid range of values for the state of the
596 // named action within @action_group.623 // named action within @action_group.
597 //624 //
598-// If %NULL is returned it either means that the action is not stateful625+// If `NULL` is returned it either means that the action is not stateful
599 // or that there is no hint about the valid range of values for the626 // or that there is no hint about the valid range of values for the
600 // state of the action.627 // state of the action.
601 //628 //
602-// If a #GVariant array is returned then each item in the array is a629+// If a [type@GLib.Variant] array is returned then each item in the array is a
603-// possible value for the state. If a #GVariant pair (ie: two-tuple) is630+// possible value for the state. If a [type@GLib.Variant] pair (ie: two-tuple) is
604 // returned then the tuple specifies the inclusive lower and upper bound631 // returned then the tuple specifies the inclusive lower and upper bound
605 // of valid values for the state.632 // of valid values for the state.
606 //633 //
@@ -608,8 +635,8 @@ func (x *ActionGroupBase) GetActionState(ActionNameVar string) *glib.Variant {
608 // have a state value outside of the hinted range and setting a value635 // have a state value outside of the hinted range and setting a value
609 // within the range may fail.636 // within the range may fail.
610 //637 //
611-// The return value (if non-%NULL) should be freed with638+// The return value (if non-`NULL`) should be freed with
612-// g_variant_unref() when it is no longer required.639+// [method@GLib.Variant.unref] when it is no longer required.
613 func (x *ActionGroupBase) GetActionStateHint(ActionNameVar string) *glib.Variant {640 func (x *ActionGroupBase) GetActionStateHint(ActionNameVar string) *glib.Variant {
614 641
615 cret := XGActionGroupGetActionStateHint(x.GoPointer(), ActionNameVar)642 cret := XGActionGroupGetActionStateHint(x.GoPointer(), ActionNameVar)
@@ -620,14 +647,14 @@ func (x *ActionGroupBase) GetActionStateHint(ActionNameVar string) *glib.Variant
620 // @action_group.647 // @action_group.
621 //648 //
622 // If the action is stateful then this function returns the649 // If the action is stateful then this function returns the
623-// #GVariantType of the state. All calls to650+// [type@GLib.VariantType] of the state. All calls to
624-// g_action_group_change_action_state() must give a #GVariant of this651+// [method@Gio.ActionGroup.change_action_state] must give a [type@GLib.Variant] of this
625-// type and g_action_group_get_action_state() will return a #GVariant652+// type and [method@Gio.ActionGroup.get_action_state] will return a [type@GLib.Variant]
626 // of the same type.653 // of the same type.
627 //654 //
628-// If the action is not stateful then this function will return %NULL.655+// If the action is not stateful then this function will return `NULL`.
629-// In that case, g_action_group_get_action_state() will return %NULL656+// In that case, [method@Gio.ActionGroup.get_action_state] will return `NULL`
630-// and you must not call g_action_group_change_action_state().657+// and you must not call [method@Gio.ActionGroup.change_action_state].
631 //658 //
632 // The state type of a particular action will never change but it is659 // The state type of a particular action will never change but it is
633 // possible for an action to be removed and for a new action to be added660 // possible for an action to be removed and for a new action to be added
@@ -647,7 +674,7 @@ func (x *ActionGroupBase) HasAction(ActionNameVar string) bool {
647 674
648 // Lists the actions contained within @action_group.675 // Lists the actions contained within @action_group.
649 //676 //
650-// The caller is responsible for freeing the list with g_strfreev() when677+// The caller is responsible for freeing the list with [func@GLib.strfreev] when
651 // it is no longer required.678 // it is no longer required.
652 func (x *ActionGroupBase) ListActions() []string {679 func (x *ActionGroupBase) ListActions() []string {
653 680
@@ -658,18 +685,18 @@ func (x *ActionGroupBase) ListActions() []string {
658 // Queries all aspects of the named action within an @action_group.685 // Queries all aspects of the named action within an @action_group.
659 //686 //
660 // This function acquires the information available from687 // This function acquires the information available from
661-// g_action_group_has_action(), g_action_group_get_action_enabled(),688+// [method@Gio.ActionGroup.has_action], [method@Gio.ActionGroup.get_action_enabled],
662-// g_action_group_get_action_parameter_type(),689+// [method@Gio.ActionGroup.get_action_parameter_type],
663-// g_action_group_get_action_state_type(),690+// [method@Gio.ActionGroup.get_action_state_type],
664-// g_action_group_get_action_state_hint() and691+// [method@Gio.ActionGroup.get_action_state_hint] and
665-// g_action_group_get_action_state() with a single function call.692+// [method@Gio.ActionGroup.get_action_state] with a single function call.
666 //693 //
667 // This provides two main benefits.694 // This provides two main benefits.
668 //695 //
669 // The first is the improvement in efficiency that comes with not having696 // The first is the improvement in efficiency that comes with not having
670 // to perform repeated lookups of the action in order to discover697 // to perform repeated lookups of the action in order to discover
671 // different things about it. The second is that implementing698 // different things about it. The second is that implementing
672-// #GActionGroup can now be done by only overriding this one virtual699+// [type@Gio.ActionGroup] can now be done by only overriding this one virtual
673 // function.700 // function.
674 //701 //
675 // The interface provides a default implementation of this function that702 // The interface provides a default implementation of this function that
@@ -678,9 +705,9 @@ func (x *ActionGroupBase) ListActions() []string {
678 // those functions that call this function. All implementations,705 // those functions that call this function. All implementations,
679 // therefore, must override either this function or all of the others.706 // therefore, must override either this function or all of the others.
680 //707 //
681-// If the action exists, %TRUE is returned and any of the requested708+// If the action exists, `TRUE` is returned and any of the requested
682-// fields (as indicated by having a non-%NULL reference passed in) are709+// fields (as indicated by having a non-`NULL` reference passed in) are
683-// filled. If the action doesn't exist, %FALSE is returned and the710+// filled. If the action doesn’t exist, `FALSE` is returned and the
684 // fields may or may not have been modified.711 // fields may or may not have been modified.
685 func (x *ActionGroupBase) QueryAction(ActionNameVar string, EnabledVar bool, ParameterTypeVar **glib.VariantType, StateTypeVar **glib.VariantType, StateHintVar **glib.Variant, StateVar **glib.Variant) bool {712 func (x *ActionGroupBase) QueryAction(ActionNameVar string, EnabledVar bool, ParameterTypeVar **glib.VariantType, StateTypeVar **glib.VariantType, StateHintVar **glib.Variant, StateVar **glib.Variant) bool {
686 713
M v4/gio/gactionmap.go +90 -14
@@ -13,15 +13,15 @@ import (
13 )13 )
14 14
15 // This struct defines a single action. It is for use with15 // This struct defines a single action. It is for use with
16-// g_action_map_add_action_entries().16+// [method@Gio.ActionMap.add_action_entries].
17 //17 //
18 // The order of the items in the structure are intended to reflect18 // The order of the items in the structure are intended to reflect
19 // frequency of use. It is permissible to use an incomplete initialiser19 // frequency of use. It is permissible to use an incomplete initialiser
20-// in order to leave some of the later values as %NULL. All values20+// in order to leave some of the later values as `NULL`. All values
21 // after @name are optional. Additional optional fields may be added in21 // after @name are optional. Additional optional fields may be added in
22 // the future.22 // the future.
23 //23 //
24-// See g_action_map_add_action_entries() for an example.24+// See [method@Gio.ActionMap.add_action_entries] for an example.
25 type ActionEntry struct {25 type ActionEntry struct {
26 _ structs.HostLayout26 _ structs.HostLayout
27 27
@@ -43,6 +43,13 @@ func (x *ActionEntry) GoPointer() uintptr {
43 }43 }
44 44
45 // OverrideActivate sets the callback function.45 // OverrideActivate sets the callback function.
46+// the callback to connect to the "activate" signal of the action.
47+//
48+// Since GLib 2.40, this can be `NULL` for stateful actions, in which case
49+// the default handler is used. For boolean-stated actions with no
50+// parameter, this is a toggle. For other state types (and parameter type
51+// equal to the state type) this will be a function that just calls
52+// @change_state (which you should provide).
46 func (x *ActionEntry) OverrideActivate(cb func(*SimpleAction, *glib.Variant, uintptr)) {53 func (x *ActionEntry) OverrideActivate(cb func(*SimpleAction, *glib.Variant, uintptr)) {
47 if cb == nil {54 if cb == nil {
48 x.xActivate = 055 x.xActivate = 0
@@ -54,6 +61,13 @@ func (x *ActionEntry) OverrideActivate(cb func(*SimpleAction, *glib.Variant, uin
54 }61 }
55 62
56 // GetActivate gets the callback function.63 // GetActivate gets the callback function.
64+// the callback to connect to the "activate" signal of the action.
65+//
66+// Since GLib 2.40, this can be `NULL` for stateful actions, in which case
67+// the default handler is used. For boolean-stated actions with no
68+// parameter, this is a toggle. For other state types (and parameter type
69+// equal to the state type) this will be a function that just calls
70+// @change_state (which you should provide).
57 func (x *ActionEntry) GetActivate() func(*SimpleAction, *glib.Variant, uintptr) {71 func (x *ActionEntry) GetActivate() func(*SimpleAction, *glib.Variant, uintptr) {
58 if x.xActivate == 0 {72 if x.xActivate == 0 {
59 return nil73 return nil
@@ -66,6 +80,10 @@ func (x *ActionEntry) GetActivate() func(*SimpleAction, *glib.Variant, uintptr)
66 }80 }
67 81
68 // OverrideChangeState sets the callback function.82 // OverrideChangeState sets the callback function.
83+// the callback to connect to the "change-state" signal of the
84+//
85+// action. All stateful actions should provide a handler here; stateless
86+// actions should not.
69 func (x *ActionEntry) OverrideChangeState(cb func(*SimpleAction, *glib.Variant, uintptr)) {87 func (x *ActionEntry) OverrideChangeState(cb func(*SimpleAction, *glib.Variant, uintptr)) {
70 if cb == nil {88 if cb == nil {
71 x.xChangeState = 089 x.xChangeState = 0
@@ -77,6 +95,10 @@ func (x *ActionEntry) OverrideChangeState(cb func(*SimpleAction, *glib.Variant,
77 }95 }
78 96
79 // GetChangeState gets the callback function.97 // GetChangeState gets the callback function.
98+// the callback to connect to the "change-state" signal of the
99+//
100+// action. All stateful actions should provide a handler here; stateless
101+// actions should not.
80 func (x *ActionEntry) GetChangeState() func(*SimpleAction, *glib.Variant, uintptr) {102 func (x *ActionEntry) GetChangeState() func(*SimpleAction, *glib.Variant, uintptr) {
81 if x.xChangeState == 0 {103 if x.xChangeState == 0 {
82 return nil104 return nil
@@ -88,7 +110,7 @@ func (x *ActionEntry) GetChangeState() func(*SimpleAction, *glib.Variant, uintpt
88 }110 }
89 }111 }
90 112
91-// The virtual function table for #GActionMap.113+// The virtual function table for [iface@Gio.ActionMap].
92 type ActionMapInterface struct {114 type ActionMapInterface struct {
93 _ structs.HostLayout115 _ structs.HostLayout
94 116
@@ -106,6 +128,9 @@ func (x *ActionMapInterface) GoPointer() uintptr {
106 }128 }
107 129
108 // OverrideLookupAction sets the callback function.130 // OverrideLookupAction sets the callback function.
131+// the virtual function pointer for
132+//
133+// [method@Gio.ActionMap.lookup_action]
109 func (x *ActionMapInterface) OverrideLookupAction(cb func(ActionMap, string) *ActionBase) {134 func (x *ActionMapInterface) OverrideLookupAction(cb func(ActionMap, string) *ActionBase) {
110 if cb == nil {135 if cb == nil {
111 x.xLookupAction = 0136 x.xLookupAction = 0
@@ -121,6 +146,9 @@ func (x *ActionMapInterface) OverrideLookupAction(cb func(ActionMap, string) *Ac
121 }146 }
122 147
123 // GetLookupAction gets the callback function.148 // GetLookupAction gets the callback function.
149+// the virtual function pointer for
150+//
151+// [method@Gio.ActionMap.lookup_action]
124 func (x *ActionMapInterface) GetLookupAction() func(ActionMap, string) *ActionBase {152 func (x *ActionMapInterface) GetLookupAction() func(ActionMap, string) *ActionBase {
125 if x.xLookupAction == 0 {153 if x.xLookupAction == 0 {
126 return nil154 return nil
@@ -139,6 +167,9 @@ func (x *ActionMapInterface) GetLookupAction() func(ActionMap, string) *ActionBa
139 }167 }
140 168
141 // OverrideAddAction sets the callback function.169 // OverrideAddAction sets the callback function.
170+// the virtual function pointer for
171+//
172+// [method@Gio.ActionMap.add_action]
142 func (x *ActionMapInterface) OverrideAddAction(cb func(ActionMap, Action)) {173 func (x *ActionMapInterface) OverrideAddAction(cb func(ActionMap, Action)) {
143 if cb == nil {174 if cb == nil {
144 x.xAddAction = 0175 x.xAddAction = 0
@@ -150,6 +181,9 @@ func (x *ActionMapInterface) OverrideAddAction(cb func(ActionMap, Action)) {
150 }181 }
151 182
152 // GetAddAction gets the callback function.183 // GetAddAction gets the callback function.
184+// the virtual function pointer for
185+//
186+// [method@Gio.ActionMap.add_action]
153 func (x *ActionMapInterface) GetAddAction() func(ActionMap, Action) {187 func (x *ActionMapInterface) GetAddAction() func(ActionMap, Action) {
154 if x.xAddAction == 0 {188 if x.xAddAction == 0 {
155 return nil189 return nil
@@ -162,6 +196,9 @@ func (x *ActionMapInterface) GetAddAction() func(ActionMap, Action) {
162 }196 }
163 197
164 // OverrideRemoveAction sets the callback function.198 // OverrideRemoveAction sets the callback function.
199+// the virtual function pointer for
200+//
201+// [method@Gio.ActionMap.remove_action]
165 func (x *ActionMapInterface) OverrideRemoveAction(cb func(ActionMap, string)) {202 func (x *ActionMapInterface) OverrideRemoveAction(cb func(ActionMap, string)) {
166 if cb == nil {203 if cb == nil {
167 x.xRemoveAction = 0204 x.xRemoveAction = 0
@@ -173,6 +210,9 @@ func (x *ActionMapInterface) OverrideRemoveAction(cb func(ActionMap, string)) {
173 }210 }
174 211
175 // GetRemoveAction gets the callback function.212 // GetRemoveAction gets the callback function.
213+// the virtual function pointer for
214+//
215+// [method@Gio.ActionMap.remove_action]
176 func (x *ActionMapInterface) GetRemoveAction() func(ActionMap, string) {216 func (x *ActionMapInterface) GetRemoveAction() func(ActionMap, string) {
177 if x.xRemoveAction == 0 {217 if x.xRemoveAction == 0 {
178 return nil218 return nil
@@ -184,14 +224,16 @@ func (x *ActionMapInterface) GetRemoveAction() func(ActionMap, string) {
184 }224 }
185 }225 }
186 226
187-// The GActionMap interface is implemented by #GActionGroup227+// `GActionMap` is an interface for action containers.
188-// implementations that operate by containing a number of228+//
189-// named #GAction instances, such as #GSimpleActionGroup.229+// The `GActionMap` interface is implemented by [iface@Gio.ActionGroup]
230+// implementations that operate by containing a number of named
231+// [iface@Gio.Action] instances, such as [class@Gio.SimpleActionGroup].
190 //232 //
191 // One useful application of this interface is to map the233 // One useful application of this interface is to map the
192 // names of actions from various action groups to unique,234 // names of actions from various action groups to unique,
193 // prefixed names (e.g. by prepending "app." or "win.").235 // prefixed names (e.g. by prepending "app." or "win.").
194-// This is the motivation for the 'Map' part of the interface236+// This is the motivation for the ‘Map’ part of the interface
195 // name.237 // name.
196 type ActionMap interface {238 type ActionMap interface {
197 GoPointer() uintptr239 GoPointer() uintptr
@@ -200,6 +242,7 @@ type ActionMap interface {
200 AddActionEntries(EntriesVar []ActionEntry, NEntriesVar int, UserDataVar uintptr)242 AddActionEntries(EntriesVar []ActionEntry, NEntriesVar int, UserDataVar uintptr)
201 LookupAction(ActionNameVar string) *ActionBase243 LookupAction(ActionNameVar string) *ActionBase
202 RemoveAction(ActionNameVar string)244 RemoveAction(ActionNameVar string)
245+ RemoveActionEntries(EntriesVar []ActionEntry, NEntriesVar int)
203 }246 }
204 247
205 var xActionMapGLibType func() types.GType248 var xActionMapGLibType func() types.GType
@@ -235,12 +278,12 @@ func (x *ActionMapBase) AddAction(ActionVar Action) {
235 278
236 }279 }
237 280
238-// A convenience function for creating multiple #GSimpleAction instances281+// A convenience function for creating multiple [class@Gio.SimpleAction]
239-// and adding them to a #GActionMap.282+// instances and adding them to a [iface@Gio.ActionMap].
240 //283 //
241-// Each action is constructed as per one #GActionEntry.284+// Each action is constructed as per one [struct@Gio.ActionEntry].
242 //285 //
243-// |[<!-- language="C" -->286+// ```c
244 // static void287 // static void
245 // activate_quit (GSimpleAction *simple,288 // activate_quit (GSimpleAction *simple,
246 //289 //
@@ -277,7 +320,7 @@ func (x *ActionMapBase) AddAction(ActionVar Action) {
277 // return G_ACTION_GROUP (group);320 // return G_ACTION_GROUP (group);
278 // }321 // }
279 //322 //
280-// ]|323+// ```
281 func (x *ActionMapBase) AddActionEntries(EntriesVar []ActionEntry, NEntriesVar int, UserDataVar uintptr) {324 func (x *ActionMapBase) AddActionEntries(EntriesVar []ActionEntry, NEntriesVar int, UserDataVar uintptr) {
282 325
283 XGActionMapAddActionEntries(x.GoPointer(), EntriesVar, NEntriesVar, UserDataVar)326 XGActionMapAddActionEntries(x.GoPointer(), EntriesVar, NEntriesVar, UserDataVar)
@@ -286,7 +329,7 @@ func (x *ActionMapBase) AddActionEntries(EntriesVar []ActionEntry, NEntriesVar i
286 329
287 // Looks up the action with the name @action_name in @action_map.330 // Looks up the action with the name @action_name in @action_map.
288 //331 //
289-// If no such action exists, returns %NULL.332+// If no such action exists, returns `NULL`.
290 func (x *ActionMapBase) LookupAction(ActionNameVar string) *ActionBase {333 func (x *ActionMapBase) LookupAction(ActionNameVar string) *ActionBase {
291 var cls *ActionBase334 var cls *ActionBase
292 335
@@ -310,10 +353,42 @@ func (x *ActionMapBase) RemoveAction(ActionNameVar string) {
310 353
311 }354 }
312 355
356+// Remove actions from a [iface@Gio.ActionMap]. This is meant as the reverse of
357+// [method@Gio.ActionMap.add_action_entries].
358+//
359+// ```c
360+//
361+// static const GActionEntry entries[] = {
362+// { "quit", activate_quit },
363+// { "print-string", activate_print_string, "s" }
364+// };
365+//
366+// void
367+// add_actions (GActionMap *map)
368+//
369+// {
370+// g_action_map_add_action_entries (map, entries, G_N_ELEMENTS (entries), NULL);
371+// }
372+//
373+// void
374+// remove_actions (GActionMap *map)
375+//
376+// {
377+// g_action_map_remove_action_entries (map, entries, G_N_ELEMENTS (entries));
378+// }
379+//
380+// ```
381+func (x *ActionMapBase) RemoveActionEntries(EntriesVar []ActionEntry, NEntriesVar int) {
382+
383+ XGActionMapRemoveActionEntries(x.GoPointer(), EntriesVar, NEntriesVar)
384+
385+}
386+
313 var XGActionMapAddAction func(uintptr, uintptr)387 var XGActionMapAddAction func(uintptr, uintptr)
314 var XGActionMapAddActionEntries func(uintptr, []ActionEntry, int, uintptr)388 var XGActionMapAddActionEntries func(uintptr, []ActionEntry, int, uintptr)
315 var XGActionMapLookupAction func(uintptr, string) uintptr389 var XGActionMapLookupAction func(uintptr, string) uintptr
316 var XGActionMapRemoveAction func(uintptr, string)390 var XGActionMapRemoveAction func(uintptr, string)
391+var XGActionMapRemoveActionEntries func(uintptr, []ActionEntry, int)
317 392
318 func init() {393 func init() {
319 core.SetPackageName("GIO", "gio-2.0")394 core.SetPackageName("GIO", "gio-2.0")
@@ -329,5 +404,6 @@ func init() {
329 core.PuregoSafeRegister(&XGActionMapAddActionEntries, lib, "g_action_map_add_action_entries")404 core.PuregoSafeRegister(&XGActionMapAddActionEntries, lib, "g_action_map_add_action_entries")
330 core.PuregoSafeRegister(&XGActionMapLookupAction, lib, "g_action_map_lookup_action")405 core.PuregoSafeRegister(&XGActionMapLookupAction, lib, "g_action_map_lookup_action")
331 core.PuregoSafeRegister(&XGActionMapRemoveAction, lib, "g_action_map_remove_action")406 core.PuregoSafeRegister(&XGActionMapRemoveAction, lib, "g_action_map_remove_action")
407+ core.PuregoSafeRegister(&XGActionMapRemoveActionEntries, lib, "g_action_map_remove_action_entries")
332 408
333 }409 }
M v4/gio/gappinfo.go +478 -119
@@ -74,6 +74,7 @@ func (x *AppInfoIface) GoPointer() uintptr {
74 }74 }
75 75
76 // OverrideDup sets the callback function.76 // OverrideDup sets the callback function.
77+// Copies a [iface@Gio.AppInfo].
77 func (x *AppInfoIface) OverrideDup(cb func(AppInfo) *AppInfoBase) {78 func (x *AppInfoIface) OverrideDup(cb func(AppInfo) *AppInfoBase) {
78 if cb == nil {79 if cb == nil {
79 x.xDup = 080 x.xDup = 0
@@ -89,6 +90,7 @@ func (x *AppInfoIface) OverrideDup(cb func(AppInfo) *AppInfoBase) {
89 }90 }
90 91
91 // GetDup gets the callback function.92 // GetDup gets the callback function.
93+// Copies a [iface@Gio.AppInfo].
92 func (x *AppInfoIface) GetDup() func(AppInfo) *AppInfoBase {94 func (x *AppInfoIface) GetDup() func(AppInfo) *AppInfoBase {
93 if x.xDup == 0 {95 if x.xDup == 0 {
94 return nil96 return nil
@@ -107,6 +109,7 @@ func (x *AppInfoIface) GetDup() func(AppInfo) *AppInfoBase {
107 }109 }
108 110
109 // OverrideEqual sets the callback function.111 // OverrideEqual sets the callback function.
112+// Checks two [iface@Gio.AppInfo]s for equality.
110 func (x *AppInfoIface) OverrideEqual(cb func(AppInfo, AppInfo) bool) {113 func (x *AppInfoIface) OverrideEqual(cb func(AppInfo, AppInfo) bool) {
111 if cb == nil {114 if cb == nil {
112 x.xEqual = 0115 x.xEqual = 0
@@ -118,6 +121,7 @@ func (x *AppInfoIface) OverrideEqual(cb func(AppInfo, AppInfo) bool) {
118 }121 }
119 122
120 // GetEqual gets the callback function.123 // GetEqual gets the callback function.
124+// Checks two [iface@Gio.AppInfo]s for equality.
121 func (x *AppInfoIface) GetEqual() func(AppInfo, AppInfo) bool {125 func (x *AppInfoIface) GetEqual() func(AppInfo, AppInfo) bool {
122 if x.xEqual == 0 {126 if x.xEqual == 0 {
123 return nil127 return nil
@@ -130,6 +134,7 @@ func (x *AppInfoIface) GetEqual() func(AppInfo, AppInfo) bool {
130 }134 }
131 135
132 // OverrideGetId sets the callback function.136 // OverrideGetId sets the callback function.
137+// Gets a string identifier for a [iface@Gio.AppInfo].
133 func (x *AppInfoIface) OverrideGetId(cb func(AppInfo) string) {138 func (x *AppInfoIface) OverrideGetId(cb func(AppInfo) string) {
134 if cb == nil {139 if cb == nil {
135 x.xGetId = 0140 x.xGetId = 0
@@ -141,6 +146,7 @@ func (x *AppInfoIface) OverrideGetId(cb func(AppInfo) string) {
141 }146 }
142 147
143 // GetGetId gets the callback function.148 // GetGetId gets the callback function.
149+// Gets a string identifier for a [iface@Gio.AppInfo].
144 func (x *AppInfoIface) GetGetId() func(AppInfo) string {150 func (x *AppInfoIface) GetGetId() func(AppInfo) string {
145 if x.xGetId == 0 {151 if x.xGetId == 0 {
146 return nil152 return nil
@@ -153,6 +159,7 @@ func (x *AppInfoIface) GetGetId() func(AppInfo) string {
153 }159 }
154 160
155 // OverrideGetName sets the callback function.161 // OverrideGetName sets the callback function.
162+// Gets the name of the application for a [iface@Gio.AppInfo].
156 func (x *AppInfoIface) OverrideGetName(cb func(AppInfo) string) {163 func (x *AppInfoIface) OverrideGetName(cb func(AppInfo) string) {
157 if cb == nil {164 if cb == nil {
158 x.xGetName = 0165 x.xGetName = 0
@@ -164,6 +171,7 @@ func (x *AppInfoIface) OverrideGetName(cb func(AppInfo) string) {
164 }171 }
165 172
166 // GetGetName gets the callback function.173 // GetGetName gets the callback function.
174+// Gets the name of the application for a [iface@Gio.AppInfo].
167 func (x *AppInfoIface) GetGetName() func(AppInfo) string {175 func (x *AppInfoIface) GetGetName() func(AppInfo) string {
168 if x.xGetName == 0 {176 if x.xGetName == 0 {
169 return nil177 return nil
@@ -176,6 +184,9 @@ func (x *AppInfoIface) GetGetName() func(AppInfo) string {
176 }184 }
177 185
178 // OverrideGetDescription sets the callback function.186 // OverrideGetDescription sets the callback function.
187+// Gets a short description for the application described by
188+//
189+// the [iface@Gio.AppInfo].
179 func (x *AppInfoIface) OverrideGetDescription(cb func(AppInfo) string) {190 func (x *AppInfoIface) OverrideGetDescription(cb func(AppInfo) string) {
180 if cb == nil {191 if cb == nil {
181 x.xGetDescription = 0192 x.xGetDescription = 0
@@ -187,6 +198,9 @@ func (x *AppInfoIface) OverrideGetDescription(cb func(AppInfo) string) {
187 }198 }
188 199
189 // GetGetDescription gets the callback function.200 // GetGetDescription gets the callback function.
201+// Gets a short description for the application described by
202+//
203+// the [iface@Gio.AppInfo].
190 func (x *AppInfoIface) GetGetDescription() func(AppInfo) string {204 func (x *AppInfoIface) GetGetDescription() func(AppInfo) string {
191 if x.xGetDescription == 0 {205 if x.xGetDescription == 0 {
192 return nil206 return nil
@@ -199,6 +213,7 @@ func (x *AppInfoIface) GetGetDescription() func(AppInfo) string {
199 }213 }
200 214
201 // OverrideGetExecutable sets the callback function.215 // OverrideGetExecutable sets the callback function.
216+// Gets the executable name for the [iface@Gio.AppInfo].
202 func (x *AppInfoIface) OverrideGetExecutable(cb func(AppInfo) string) {217 func (x *AppInfoIface) OverrideGetExecutable(cb func(AppInfo) string) {
203 if cb == nil {218 if cb == nil {
204 x.xGetExecutable = 0219 x.xGetExecutable = 0
@@ -210,6 +225,7 @@ func (x *AppInfoIface) OverrideGetExecutable(cb func(AppInfo) string) {
210 }225 }
211 226
212 // GetGetExecutable gets the callback function.227 // GetGetExecutable gets the callback function.
228+// Gets the executable name for the [iface@Gio.AppInfo].
213 func (x *AppInfoIface) GetGetExecutable() func(AppInfo) string {229 func (x *AppInfoIface) GetGetExecutable() func(AppInfo) string {
214 if x.xGetExecutable == 0 {230 if x.xGetExecutable == 0 {
215 return nil231 return nil
@@ -222,6 +238,7 @@ func (x *AppInfoIface) GetGetExecutable() func(AppInfo) string {
222 }238 }
223 239
224 // OverrideGetIcon sets the callback function.240 // OverrideGetIcon sets the callback function.
241+// Gets the [iface@Gio.Icon] for the [iface@Gio.AppInfo].
225 func (x *AppInfoIface) OverrideGetIcon(cb func(AppInfo) *IconBase) {242 func (x *AppInfoIface) OverrideGetIcon(cb func(AppInfo) *IconBase) {
226 if cb == nil {243 if cb == nil {
227 x.xGetIcon = 0244 x.xGetIcon = 0
@@ -237,6 +254,7 @@ func (x *AppInfoIface) OverrideGetIcon(cb func(AppInfo) *IconBase) {
237 }254 }
238 255
239 // GetGetIcon gets the callback function.256 // GetGetIcon gets the callback function.
257+// Gets the [iface@Gio.Icon] for the [iface@Gio.AppInfo].
240 func (x *AppInfoIface) GetGetIcon() func(AppInfo) *IconBase {258 func (x *AppInfoIface) GetGetIcon() func(AppInfo) *IconBase {
241 if x.xGetIcon == 0 {259 if x.xGetIcon == 0 {
242 return nil260 return nil
@@ -255,6 +273,7 @@ func (x *AppInfoIface) GetGetIcon() func(AppInfo) *IconBase {
255 }273 }
256 274
257 // OverrideLaunch sets the callback function.275 // OverrideLaunch sets the callback function.
276+// Launches an application specified by the [iface@Gio.AppInfo].
258 func (x *AppInfoIface) OverrideLaunch(cb func(AppInfo, *glib.List, *AppLaunchContext) bool) {277 func (x *AppInfoIface) OverrideLaunch(cb func(AppInfo, *glib.List, *AppLaunchContext) bool) {
259 if cb == nil {278 if cb == nil {
260 x.xLaunch = 0279 x.xLaunch = 0
@@ -266,6 +285,7 @@ func (x *AppInfoIface) OverrideLaunch(cb func(AppInfo, *glib.List, *AppLaunchCon
266 }285 }
267 286
268 // GetLaunch gets the callback function.287 // GetLaunch gets the callback function.
288+// Launches an application specified by the [iface@Gio.AppInfo].
269 func (x *AppInfoIface) GetLaunch() func(AppInfo, *glib.List, *AppLaunchContext) bool {289 func (x *AppInfoIface) GetLaunch() func(AppInfo, *glib.List, *AppLaunchContext) bool {
270 if x.xLaunch == 0 {290 if x.xLaunch == 0 {
271 return nil291 return nil
@@ -278,6 +298,9 @@ func (x *AppInfoIface) GetLaunch() func(AppInfo, *glib.List, *AppLaunchContext)
278 }298 }
279 299
280 // OverrideSupportsUris sets the callback function.300 // OverrideSupportsUris sets the callback function.
301+// Indicates whether the application specified supports
302+//
303+// launching URIs.
281 func (x *AppInfoIface) OverrideSupportsUris(cb func(AppInfo) bool) {304 func (x *AppInfoIface) OverrideSupportsUris(cb func(AppInfo) bool) {
282 if cb == nil {305 if cb == nil {
283 x.xSupportsUris = 0306 x.xSupportsUris = 0
@@ -289,6 +312,9 @@ func (x *AppInfoIface) OverrideSupportsUris(cb func(AppInfo) bool) {
289 }312 }
290 313
291 // GetSupportsUris gets the callback function.314 // GetSupportsUris gets the callback function.
315+// Indicates whether the application specified supports
316+//
317+// launching URIs.
292 func (x *AppInfoIface) GetSupportsUris() func(AppInfo) bool {318 func (x *AppInfoIface) GetSupportsUris() func(AppInfo) bool {
293 if x.xSupportsUris == 0 {319 if x.xSupportsUris == 0 {
294 return nil320 return nil
@@ -301,6 +327,9 @@ func (x *AppInfoIface) GetSupportsUris() func(AppInfo) bool {
301 }327 }
302 328
303 // OverrideSupportsFiles sets the callback function.329 // OverrideSupportsFiles sets the callback function.
330+// Indicates whether the application specified accepts
331+//
332+// filename arguments.
304 func (x *AppInfoIface) OverrideSupportsFiles(cb func(AppInfo) bool) {333 func (x *AppInfoIface) OverrideSupportsFiles(cb func(AppInfo) bool) {
305 if cb == nil {334 if cb == nil {
306 x.xSupportsFiles = 0335 x.xSupportsFiles = 0
@@ -312,6 +341,9 @@ func (x *AppInfoIface) OverrideSupportsFiles(cb func(AppInfo) bool) {
312 }341 }
313 342
314 // GetSupportsFiles gets the callback function.343 // GetSupportsFiles gets the callback function.
344+// Indicates whether the application specified accepts
345+//
346+// filename arguments.
315 func (x *AppInfoIface) GetSupportsFiles() func(AppInfo) bool {347 func (x *AppInfoIface) GetSupportsFiles() func(AppInfo) bool {
316 if x.xSupportsFiles == 0 {348 if x.xSupportsFiles == 0 {
317 return nil349 return nil
@@ -324,6 +356,7 @@ func (x *AppInfoIface) GetSupportsFiles() func(AppInfo) bool {
324 }356 }
325 357
326 // OverrideLaunchUris sets the callback function.358 // OverrideLaunchUris sets the callback function.
359+// Launches an application with a list of URIs.
327 func (x *AppInfoIface) OverrideLaunchUris(cb func(AppInfo, *glib.List, *AppLaunchContext) bool) {360 func (x *AppInfoIface) OverrideLaunchUris(cb func(AppInfo, *glib.List, *AppLaunchContext) bool) {
328 if cb == nil {361 if cb == nil {
329 x.xLaunchUris = 0362 x.xLaunchUris = 0
@@ -335,6 +368,7 @@ func (x *AppInfoIface) OverrideLaunchUris(cb func(AppInfo, *glib.List, *AppLaunc
335 }368 }
336 369
337 // GetLaunchUris gets the callback function.370 // GetLaunchUris gets the callback function.
371+// Launches an application with a list of URIs.
338 func (x *AppInfoIface) GetLaunchUris() func(AppInfo, *glib.List, *AppLaunchContext) bool {372 func (x *AppInfoIface) GetLaunchUris() func(AppInfo, *glib.List, *AppLaunchContext) bool {
339 if x.xLaunchUris == 0 {373 if x.xLaunchUris == 0 {
340 return nil374 return nil
@@ -347,6 +381,10 @@ func (x *AppInfoIface) GetLaunchUris() func(AppInfo, *glib.List, *AppLaunchConte
347 }381 }
348 382
349 // OverrideShouldShow sets the callback function.383 // OverrideShouldShow sets the callback function.
384+// Returns whether an application should be shown (e.g. when
385+//
386+// getting a list of installed applications).
387+// [FreeDesktop.Org Startup Notification Specification](http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt).
350 func (x *AppInfoIface) OverrideShouldShow(cb func(AppInfo) bool) {388 func (x *AppInfoIface) OverrideShouldShow(cb func(AppInfo) bool) {
351 if cb == nil {389 if cb == nil {
352 x.xShouldShow = 0390 x.xShouldShow = 0
@@ -358,6 +396,10 @@ func (x *AppInfoIface) OverrideShouldShow(cb func(AppInfo) bool) {
358 }396 }
359 397
360 // GetShouldShow gets the callback function.398 // GetShouldShow gets the callback function.
399+// Returns whether an application should be shown (e.g. when
400+//
401+// getting a list of installed applications).
402+// [FreeDesktop.Org Startup Notification Specification](http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt).
361 func (x *AppInfoIface) GetShouldShow() func(AppInfo) bool {403 func (x *AppInfoIface) GetShouldShow() func(AppInfo) bool {
362 if x.xShouldShow == 0 {404 if x.xShouldShow == 0 {
363 return nil405 return nil
@@ -370,6 +412,9 @@ func (x *AppInfoIface) GetShouldShow() func(AppInfo) bool {
370 }412 }
371 413
372 // OverrideSetAsDefaultForType sets the callback function.414 // OverrideSetAsDefaultForType sets the callback function.
415+// Sets an application as default for a given content
416+//
417+// type.
373 func (x *AppInfoIface) OverrideSetAsDefaultForType(cb func(AppInfo, string) bool) {418 func (x *AppInfoIface) OverrideSetAsDefaultForType(cb func(AppInfo, string) bool) {
374 if cb == nil {419 if cb == nil {
375 x.xSetAsDefaultForType = 0420 x.xSetAsDefaultForType = 0
@@ -381,6 +426,9 @@ func (x *AppInfoIface) OverrideSetAsDefaultForType(cb func(AppInfo, string) bool
381 }426 }
382 427
383 // GetSetAsDefaultForType gets the callback function.428 // GetSetAsDefaultForType gets the callback function.
429+// Sets an application as default for a given content
430+//
431+// type.
384 func (x *AppInfoIface) GetSetAsDefaultForType() func(AppInfo, string) bool {432 func (x *AppInfoIface) GetSetAsDefaultForType() func(AppInfo, string) bool {
385 if x.xSetAsDefaultForType == 0 {433 if x.xSetAsDefaultForType == 0 {
386 return nil434 return nil
@@ -393,6 +441,9 @@ func (x *AppInfoIface) GetSetAsDefaultForType() func(AppInfo, string) bool {
393 }441 }
394 442
395 // OverrideSetAsDefaultForExtension sets the callback function.443 // OverrideSetAsDefaultForExtension sets the callback function.
444+// Sets an application as default for a given
445+//
446+// file extension.
396 func (x *AppInfoIface) OverrideSetAsDefaultForExtension(cb func(AppInfo, string) bool) {447 func (x *AppInfoIface) OverrideSetAsDefaultForExtension(cb func(AppInfo, string) bool) {
397 if cb == nil {448 if cb == nil {
398 x.xSetAsDefaultForExtension = 0449 x.xSetAsDefaultForExtension = 0
@@ -404,6 +455,9 @@ func (x *AppInfoIface) OverrideSetAsDefaultForExtension(cb func(AppInfo, string)
404 }455 }
405 456
406 // GetSetAsDefaultForExtension gets the callback function.457 // GetSetAsDefaultForExtension gets the callback function.
458+// Sets an application as default for a given
459+//
460+// file extension.
407 func (x *AppInfoIface) GetSetAsDefaultForExtension() func(AppInfo, string) bool {461 func (x *AppInfoIface) GetSetAsDefaultForExtension() func(AppInfo, string) bool {
408 if x.xSetAsDefaultForExtension == 0 {462 if x.xSetAsDefaultForExtension == 0 {
409 return nil463 return nil
@@ -416,6 +470,9 @@ func (x *AppInfoIface) GetSetAsDefaultForExtension() func(AppInfo, string) bool
416 }470 }
417 471
418 // OverrideAddSupportsType sets the callback function.472 // OverrideAddSupportsType sets the callback function.
473+// Adds to the [iface@Gio.AppInfo] information about
474+//
475+// supported file types.
419 func (x *AppInfoIface) OverrideAddSupportsType(cb func(AppInfo, string) bool) {476 func (x *AppInfoIface) OverrideAddSupportsType(cb func(AppInfo, string) bool) {
420 if cb == nil {477 if cb == nil {
421 x.xAddSupportsType = 0478 x.xAddSupportsType = 0
@@ -427,6 +484,9 @@ func (x *AppInfoIface) OverrideAddSupportsType(cb func(AppInfo, string) bool) {
427 }484 }
428 485
429 // GetAddSupportsType gets the callback function.486 // GetAddSupportsType gets the callback function.
487+// Adds to the [iface@Gio.AppInfo] information about
488+//
489+// supported file types.
430 func (x *AppInfoIface) GetAddSupportsType() func(AppInfo, string) bool {490 func (x *AppInfoIface) GetAddSupportsType() func(AppInfo, string) bool {
431 if x.xAddSupportsType == 0 {491 if x.xAddSupportsType == 0 {
432 return nil492 return nil
@@ -439,6 +499,9 @@ func (x *AppInfoIface) GetAddSupportsType() func(AppInfo, string) bool {
439 }499 }
440 500
441 // OverrideCanRemoveSupportsType sets the callback function.501 // OverrideCanRemoveSupportsType sets the callback function.
502+// Checks for support for removing supported file
503+//
504+// types from a [iface@Gio.AppInfo].
442 func (x *AppInfoIface) OverrideCanRemoveSupportsType(cb func(AppInfo) bool) {505 func (x *AppInfoIface) OverrideCanRemoveSupportsType(cb func(AppInfo) bool) {
443 if cb == nil {506 if cb == nil {
444 x.xCanRemoveSupportsType = 0507 x.xCanRemoveSupportsType = 0
@@ -450,6 +513,9 @@ func (x *AppInfoIface) OverrideCanRemoveSupportsType(cb func(AppInfo) bool) {
450 }513 }
451 514
452 // GetCanRemoveSupportsType gets the callback function.515 // GetCanRemoveSupportsType gets the callback function.
516+// Checks for support for removing supported file
517+//
518+// types from a [iface@Gio.AppInfo].
453 func (x *AppInfoIface) GetCanRemoveSupportsType() func(AppInfo) bool {519 func (x *AppInfoIface) GetCanRemoveSupportsType() func(AppInfo) bool {
454 if x.xCanRemoveSupportsType == 0 {520 if x.xCanRemoveSupportsType == 0 {
455 return nil521 return nil
@@ -462,6 +528,9 @@ func (x *AppInfoIface) GetCanRemoveSupportsType() func(AppInfo) bool {
462 }528 }
463 529
464 // OverrideRemoveSupportsType sets the callback function.530 // OverrideRemoveSupportsType sets the callback function.
531+// Removes a supported application type from a
532+//
533+// [iface@Gio.AppInfo].
465 func (x *AppInfoIface) OverrideRemoveSupportsType(cb func(AppInfo, string) bool) {534 func (x *AppInfoIface) OverrideRemoveSupportsType(cb func(AppInfo, string) bool) {
466 if cb == nil {535 if cb == nil {
467 x.xRemoveSupportsType = 0536 x.xRemoveSupportsType = 0
@@ -473,6 +542,9 @@ func (x *AppInfoIface) OverrideRemoveSupportsType(cb func(AppInfo, string) bool)
473 }542 }
474 543
475 // GetRemoveSupportsType gets the callback function.544 // GetRemoveSupportsType gets the callback function.
545+// Removes a supported application type from a
546+//
547+// [iface@Gio.AppInfo].
476 func (x *AppInfoIface) GetRemoveSupportsType() func(AppInfo, string) bool {548 func (x *AppInfoIface) GetRemoveSupportsType() func(AppInfo, string) bool {
477 if x.xRemoveSupportsType == 0 {549 if x.xRemoveSupportsType == 0 {
478 return nil550 return nil
@@ -485,6 +557,7 @@ func (x *AppInfoIface) GetRemoveSupportsType() func(AppInfo, string) bool {
485 }557 }
486 558
487 // OverrideCanDelete sets the callback function.559 // OverrideCanDelete sets the callback function.
560+// Checks if a [iface@Gio.AppInfo] can be deleted. (Since 2.20)
488 func (x *AppInfoIface) OverrideCanDelete(cb func(AppInfo) bool) {561 func (x *AppInfoIface) OverrideCanDelete(cb func(AppInfo) bool) {
489 if cb == nil {562 if cb == nil {
490 x.xCanDelete = 0563 x.xCanDelete = 0
@@ -496,6 +569,7 @@ func (x *AppInfoIface) OverrideCanDelete(cb func(AppInfo) bool) {
496 }569 }
497 570
498 // GetCanDelete gets the callback function.571 // GetCanDelete gets the callback function.
572+// Checks if a [iface@Gio.AppInfo] can be deleted. (Since 2.20)
499 func (x *AppInfoIface) GetCanDelete() func(AppInfo) bool {573 func (x *AppInfoIface) GetCanDelete() func(AppInfo) bool {
500 if x.xCanDelete == 0 {574 if x.xCanDelete == 0 {
501 return nil575 return nil
@@ -508,6 +582,7 @@ func (x *AppInfoIface) GetCanDelete() func(AppInfo) bool {
508 }582 }
509 583
510 // OverrideDoDelete sets the callback function.584 // OverrideDoDelete sets the callback function.
585+// Deletes a [iface@Gio.AppInfo]. (Since 2.20)
511 func (x *AppInfoIface) OverrideDoDelete(cb func(AppInfo) bool) {586 func (x *AppInfoIface) OverrideDoDelete(cb func(AppInfo) bool) {
512 if cb == nil {587 if cb == nil {
513 x.xDoDelete = 0588 x.xDoDelete = 0
@@ -519,6 +594,7 @@ func (x *AppInfoIface) OverrideDoDelete(cb func(AppInfo) bool) {
519 }594 }
520 595
521 // GetDoDelete gets the callback function.596 // GetDoDelete gets the callback function.
597+// Deletes a [iface@Gio.AppInfo]. (Since 2.20)
522 func (x *AppInfoIface) GetDoDelete() func(AppInfo) bool {598 func (x *AppInfoIface) GetDoDelete() func(AppInfo) bool {
523 if x.xDoDelete == 0 {599 if x.xDoDelete == 0 {
524 return nil600 return nil
@@ -531,6 +607,9 @@ func (x *AppInfoIface) GetDoDelete() func(AppInfo) bool {
531 }607 }
532 608
533 // OverrideGetCommandline sets the callback function.609 // OverrideGetCommandline sets the callback function.
610+// Gets the commandline for the [iface@Gio.AppInfo].
611+//
612+// (Since 2.20)
534 func (x *AppInfoIface) OverrideGetCommandline(cb func(AppInfo) string) {613 func (x *AppInfoIface) OverrideGetCommandline(cb func(AppInfo) string) {
535 if cb == nil {614 if cb == nil {
536 x.xGetCommandline = 0615 x.xGetCommandline = 0
@@ -542,6 +621,9 @@ func (x *AppInfoIface) OverrideGetCommandline(cb func(AppInfo) string) {
542 }621 }
543 622
544 // GetGetCommandline gets the callback function.623 // GetGetCommandline gets the callback function.
624+// Gets the commandline for the [iface@Gio.AppInfo].
625+//
626+// (Since 2.20)
545 func (x *AppInfoIface) GetGetCommandline() func(AppInfo) string {627 func (x *AppInfoIface) GetGetCommandline() func(AppInfo) string {
546 if x.xGetCommandline == 0 {628 if x.xGetCommandline == 0 {
547 return nil629 return nil
@@ -554,6 +636,9 @@ func (x *AppInfoIface) GetGetCommandline() func(AppInfo) string {
554 }636 }
555 637
556 // OverrideGetDisplayName sets the callback function.638 // OverrideGetDisplayName sets the callback function.
639+// Gets the display name for the [iface@Gio.AppInfo].
640+//
641+// (Since 2.24)
557 func (x *AppInfoIface) OverrideGetDisplayName(cb func(AppInfo) string) {642 func (x *AppInfoIface) OverrideGetDisplayName(cb func(AppInfo) string) {
558 if cb == nil {643 if cb == nil {
559 x.xGetDisplayName = 0644 x.xGetDisplayName = 0
@@ -565,6 +650,9 @@ func (x *AppInfoIface) OverrideGetDisplayName(cb func(AppInfo) string) {
565 }650 }
566 651
567 // GetGetDisplayName gets the callback function.652 // GetGetDisplayName gets the callback function.
653+// Gets the display name for the [iface@Gio.AppInfo].
654+//
655+// (Since 2.24)
568 func (x *AppInfoIface) GetGetDisplayName() func(AppInfo) string {656 func (x *AppInfoIface) GetGetDisplayName() func(AppInfo) string {
569 if x.xGetDisplayName == 0 {657 if x.xGetDisplayName == 0 {
570 return nil658 return nil
@@ -577,6 +665,9 @@ func (x *AppInfoIface) GetGetDisplayName() func(AppInfo) string {
577 }665 }
578 666
579 // OverrideSetAsLastUsedForType sets the callback function.667 // OverrideSetAsLastUsedForType sets the callback function.
668+// Sets the application as the last used. See
669+//
670+// [method@Gio.AppInfo.set_as_last_used_for_type].
580 func (x *AppInfoIface) OverrideSetAsLastUsedForType(cb func(AppInfo, string) bool) {671 func (x *AppInfoIface) OverrideSetAsLastUsedForType(cb func(AppInfo, string) bool) {
581 if cb == nil {672 if cb == nil {
582 x.xSetAsLastUsedForType = 0673 x.xSetAsLastUsedForType = 0
@@ -588,6 +679,9 @@ func (x *AppInfoIface) OverrideSetAsLastUsedForType(cb func(AppInfo, string) boo
588 }679 }
589 680
590 // GetSetAsLastUsedForType gets the callback function.681 // GetSetAsLastUsedForType gets the callback function.
682+// Sets the application as the last used. See
683+//
684+// [method@Gio.AppInfo.set_as_last_used_for_type].
591 func (x *AppInfoIface) GetSetAsLastUsedForType() func(AppInfo, string) bool {685 func (x *AppInfoIface) GetSetAsLastUsedForType() func(AppInfo, string) bool {
592 if x.xSetAsLastUsedForType == 0 {686 if x.xSetAsLastUsedForType == 0 {
593 return nil687 return nil
@@ -600,6 +694,9 @@ func (x *AppInfoIface) GetSetAsLastUsedForType() func(AppInfo, string) bool {
600 }694 }
601 695
602 // OverrideGetSupportedTypes sets the callback function.696 // OverrideGetSupportedTypes sets the callback function.
697+// Retrieves the list of content types that @app_info
698+//
699+// claims to support.
603 func (x *AppInfoIface) OverrideGetSupportedTypes(cb func(AppInfo) []string) {700 func (x *AppInfoIface) OverrideGetSupportedTypes(cb func(AppInfo) []string) {
604 if cb == nil {701 if cb == nil {
605 x.xGetSupportedTypes = 0702 x.xGetSupportedTypes = 0
@@ -611,6 +708,9 @@ func (x *AppInfoIface) OverrideGetSupportedTypes(cb func(AppInfo) []string) {
611 }708 }
612 709
613 // GetGetSupportedTypes gets the callback function.710 // GetGetSupportedTypes gets the callback function.
711+// Retrieves the list of content types that @app_info
712+//
713+// claims to support.
614 func (x *AppInfoIface) GetGetSupportedTypes() func(AppInfo) []string {714 func (x *AppInfoIface) GetGetSupportedTypes() func(AppInfo) []string {
615 if x.xGetSupportedTypes == 0 {715 if x.xGetSupportedTypes == 0 {
616 return nil716 return nil
@@ -623,6 +723,9 @@ func (x *AppInfoIface) GetGetSupportedTypes() func(AppInfo) []string {
623 }723 }
624 724
625 // OverrideLaunchUrisAsync sets the callback function.725 // OverrideLaunchUrisAsync sets the callback function.
726+// Asynchronously launches an application with a list of
727+//
728+// URIs. (Since: 2.60)
626 func (x *AppInfoIface) OverrideLaunchUrisAsync(cb func(AppInfo, *glib.List, *AppLaunchContext, *Cancellable, *AsyncReadyCallback, uintptr)) {729 func (x *AppInfoIface) OverrideLaunchUrisAsync(cb func(AppInfo, *glib.List, *AppLaunchContext, *Cancellable, *AsyncReadyCallback, uintptr)) {
627 if cb == nil {730 if cb == nil {
628 x.xLaunchUrisAsync = 0731 x.xLaunchUrisAsync = 0
@@ -634,6 +737,9 @@ func (x *AppInfoIface) OverrideLaunchUrisAsync(cb func(AppInfo, *glib.List, *App
634 }737 }
635 738
636 // GetLaunchUrisAsync gets the callback function.739 // GetLaunchUrisAsync gets the callback function.
740+// Asynchronously launches an application with a list of
741+//
742+// URIs. (Since: 2.60)
637 func (x *AppInfoIface) GetLaunchUrisAsync() func(AppInfo, *glib.List, *AppLaunchContext, *Cancellable, *AsyncReadyCallback, uintptr) {743 func (x *AppInfoIface) GetLaunchUrisAsync() func(AppInfo, *glib.List, *AppLaunchContext, *Cancellable, *AsyncReadyCallback, uintptr) {
638 if x.xLaunchUrisAsync == 0 {744 if x.xLaunchUrisAsync == 0 {
639 return nil745 return nil
@@ -646,6 +752,9 @@ func (x *AppInfoIface) GetLaunchUrisAsync() func(AppInfo, *glib.List, *AppLaunch
646 }752 }
647 753
648 // OverrideLaunchUrisFinish sets the callback function.754 // OverrideLaunchUrisFinish sets the callback function.
755+// Finishes an operation started with @launch_uris_async.
756+//
757+// (Since: 2.60)
649 func (x *AppInfoIface) OverrideLaunchUrisFinish(cb func(AppInfo, AsyncResult) bool) {758 func (x *AppInfoIface) OverrideLaunchUrisFinish(cb func(AppInfo, AsyncResult) bool) {
650 if cb == nil {759 if cb == nil {
651 x.xLaunchUrisFinish = 0760 x.xLaunchUrisFinish = 0
@@ -657,6 +766,9 @@ func (x *AppInfoIface) OverrideLaunchUrisFinish(cb func(AppInfo, AsyncResult) bo
657 }766 }
658 767
659 // GetLaunchUrisFinish gets the callback function.768 // GetLaunchUrisFinish gets the callback function.
769+// Finishes an operation started with @launch_uris_async.
770+//
771+// (Since: 2.60)
660 func (x *AppInfoIface) GetLaunchUrisFinish() func(AppInfo, AsyncResult) bool {772 func (x *AppInfoIface) GetLaunchUrisFinish() func(AppInfo, AsyncResult) bool {
661 if x.xLaunchUrisFinish == 0 {773 if x.xLaunchUrisFinish == 0 {
662 return nil774 return nil
@@ -886,32 +998,39 @@ func (x *AppLaunchContextPrivate) GoPointer() uintptr {
886 return uintptr(unsafe.Pointer(x))998 return uintptr(unsafe.Pointer(x))
887 }999 }
888 1000
889-// #GAppInfo and #GAppLaunchContext are used for describing and launching1001+// Information about an installed application and methods to launch
1002+// it (with file arguments).
1003+//
1004+// `GAppInfo` and `GAppLaunchContext` are used for describing and launching
890 // applications installed on the system.1005 // applications installed on the system.
891 //1006 //
892 // As of GLib 2.20, URIs will always be converted to POSIX paths1007 // As of GLib 2.20, URIs will always be converted to POSIX paths
893-// (using g_file_get_path()) when using g_app_info_launch() even if1008+// (using [method@Gio.File.get_path]) when using [method@Gio.AppInfo.launch]
894-// the application requested an URI and not a POSIX path. For example1009+// even if the application requested an URI and not a POSIX path. For example
895-// for a desktop-file based application with Exec key `totem1010+// for a desktop-file based application with the following Exec key:
896-// %U` and a single URI, `sftp://foo/file.avi`, then1011+//
897-// `/home/user/.gvfs/sftp on foo/file.avi` will be passed. This will1012+// ```
898-// only work if a set of suitable GIO extensions (such as gvfs 2.261013+// Exec=totem %U
899-// compiled with FUSE support), is available and operational; if this1014+// ```
900-// is not the case, the URI will be passed unmodified to the application.1015+//
901-// Some URIs, such as `mailto:`, of course cannot be mapped to a POSIX1016+// and a single URI, `sftp://foo/file.avi`, then
902-// path (in gvfs there's no FUSE mount for it); such URIs will be1017+// `/home/user/.gvfs/sftp on foo/file.avi` will be passed. This will only work
903-// passed unmodified to the application.1018+// if a set of suitable GIO extensions (such as GVfs 2.26 compiled with FUSE
904-//1019+// support), is available and operational; if this is not the case, the URI
905-// Specifically for gvfs 2.26 and later, the POSIX URI will be mapped1020+// will be passed unmodified to the application. Some URIs, such as `mailto:`,
906-// back to the GIO URI in the #GFile constructors (since gvfs1021+// of course cannot be mapped to a POSIX path (in GVfs there’s no FUSE mount
907-// implements the #GVfs extension point). As such, if the application1022+// for it); such URIs will be passed unmodified to the application.
908-// needs to examine the URI, it needs to use g_file_get_uri() or1023+//
909-// similar on #GFile. In other words, an application cannot assume1024+// Specifically for GVfs 2.26 and later, the POSIX URI will be mapped
910-// that the URI passed to e.g. g_file_new_for_commandline_arg() is1025+// back to the GIO URI in the [iface@Gio.File] constructors (since GVfs
911-// equal to the result of g_file_get_uri(). The following snippet1026+// implements the GVfs extension point). As such, if the application
1027+// needs to examine the URI, it needs to use [method@Gio.File.get_uri]
1028+// or similar on [iface@Gio.File]. In other words, an application cannot
1029+// assume that the URI passed to e.g. [func@Gio.File.new_for_commandline_arg]
1030+// is equal to the result of [method@Gio.File.get_uri]. The following snippet
912 // illustrates this:1031 // illustrates this:
913 //1032 //
914-// |[1033+// ```c
915 // GFile *f;1034 // GFile *f;
916 // char *uri;1035 // char *uri;
917 //1036 //
@@ -928,11 +1047,11 @@ func (x *AppLaunchContextPrivate) GoPointer() uintptr {
928 // }1047 // }
929 //1048 //
930 // g_object_unref (file);1049 // g_object_unref (file);
931-// ]|1050+// ```
932 //1051 //
933 // This code will work when both `cdda://sr0/Track 1.wav` and1052 // This code will work when both `cdda://sr0/Track 1.wav` and
934 // `/home/user/.gvfs/cdda on sr0/Track 1.wav` is passed to the1053 // `/home/user/.gvfs/cdda on sr0/Track 1.wav` is passed to the
935-// application. It should be noted that it's generally not safe1054+// application. It should be noted that it’s generally not safe
936 // for applications to rely on the format of a particular URIs.1055 // for applications to rely on the format of a particular URIs.
937 // Different launcher applications (e.g. file managers) may have1056 // Different launcher applications (e.g. file managers) may have
938 // different ideas of what a given URI means.1057 // different ideas of what a given URI means.
@@ -1000,8 +1119,8 @@ func (x *AppInfoBase) AddSupportsType(ContentTypeVar string) (bool, error) {
1000 1119
1001 }1120 }
1002 1121
1003-// Obtains the information whether the #GAppInfo can be deleted.1122+// Obtains the information whether the [iface@Gio.AppInfo] can be deleted.
1004-// See g_app_info_delete().1123+// See [method@Gio.AppInfo.delete].
1005 func (x *AppInfoBase) CanDelete() bool {1124 func (x *AppInfoBase) CanDelete() bool {
1006 1125
1007 cret := XGAppInfoCanDelete(x.GoPointer())1126 cret := XGAppInfoCanDelete(x.GoPointer())
@@ -1015,18 +1134,18 @@ func (x *AppInfoBase) CanRemoveSupportsType() bool {
1015 return cret1134 return cret
1016 }1135 }
1017 1136
1018-// Tries to delete a #GAppInfo.1137+// Tries to delete a [iface@Gio.AppInfo].
1019 //1138 //
1020 // On some platforms, there may be a difference between user-defined1139 // On some platforms, there may be a difference between user-defined
1021-// #GAppInfos which can be deleted, and system-wide ones which cannot.1140+// [iface@Gio.AppInfo]s which can be deleted, and system-wide ones which cannot.
1022-// See g_app_info_can_delete().1141+// See [method@Gio.AppInfo.can_delete].
1023 func (x *AppInfoBase) Delete() bool {1142 func (x *AppInfoBase) Delete() bool {
1024 1143
1025 cret := XGAppInfoDelete(x.GoPointer())1144 cret := XGAppInfoDelete(x.GoPointer())
1026 return cret1145 return cret
1027 }1146 }
1028 1147
1029-// Creates a duplicate of a #GAppInfo.1148+// Creates a duplicate of a [iface@Gio.AppInfo].
1030 func (x *AppInfoBase) Dup() *AppInfoBase {1149 func (x *AppInfoBase) Dup() *AppInfoBase {
1031 var cls *AppInfoBase1150 var cls *AppInfoBase
1032 1151
@@ -1040,11 +1159,11 @@ func (x *AppInfoBase) Dup() *AppInfoBase {
1040 return cls1159 return cls
1041 }1160 }
1042 1161
1043-// Checks if two #GAppInfos are equal.1162+// Checks if two [iface@Gio.AppInfo]s are equal.
1044 //1163 //
1045-// Note that the check *may not* compare each individual1164+// Note that the check *may not* compare each individual field, and only does
1046-// field, and only does an identity check. In case detecting changes in the1165+// an identity check. In case detecting changes in the contents is needed,
1047-// contents is needed, program code must additionally compare relevant fields.1166+// program code must additionally compare relevant fields.
1048 func (x *AppInfoBase) Equal(Appinfo2Var AppInfo) bool {1167 func (x *AppInfoBase) Equal(Appinfo2Var AppInfo) bool {
1049 1168
1050 cret := XGAppInfoEqual(x.GoPointer(), Appinfo2Var.GoPointer())1169 cret := XGAppInfoEqual(x.GoPointer(), Appinfo2Var.GoPointer())
@@ -1074,7 +1193,11 @@ func (x *AppInfoBase) GetDisplayName() string {
1074 return cret1193 return cret
1075 }1194 }
1076 1195
1077-// Gets the executable's name for the installed application.1196+// Gets the executable’s name for the installed application.
1197+//
1198+// This is intended to be used for debugging or labelling what program is going
1199+// to be run. To launch the executable, use [method@Gio.AppInfo.launch] and related
1200+// functions, rather than spawning the return value from this function.
1078 func (x *AppInfoBase) GetExecutable() string {1201 func (x *AppInfoBase) GetExecutable() string {
1079 1202
1080 cret := XGAppInfoGetExecutable(x.GoPointer())1203 cret := XGAppInfoGetExecutable(x.GoPointer())
@@ -1096,13 +1219,12 @@ func (x *AppInfoBase) GetIcon() *IconBase {
1096 return cls1219 return cls
1097 }1220 }
1098 1221
1099-// Gets the ID of an application. An id is a string that1222+// Gets the ID of an application. An id is a string that identifies the
1100-// identifies the application. The exact format of the id is1223+// application. The exact format of the id is platform dependent. For instance,
1101-// platform dependent. For instance, on Unix this is the1224+// on Unix this is the desktop file id from the xdg menu specification.
1102-// desktop file id from the xdg menu specification.
1103 //1225 //
1104-// Note that the returned ID may be %NULL, depending on how1226+// Note that the returned ID may be `NULL`, depending on how the @appinfo has
1105-// the @appinfo has been constructed.1227+// been constructed.
1106 func (x *AppInfoBase) GetId() string {1228 func (x *AppInfoBase) GetId() string {
1107 1229
1108 cret := XGAppInfoGetId(x.GoPointer())1230 cret := XGAppInfoGetId(x.GoPointer())
@@ -1118,9 +1240,10 @@ func (x *AppInfoBase) GetName() string {
1118 1240
1119 // Retrieves the list of content types that @app_info claims to support.1241 // Retrieves the list of content types that @app_info claims to support.
1120 // If this information is not provided by the environment, this function1242 // If this information is not provided by the environment, this function
1121-// will return %NULL.1243+// will return `NULL`.
1244+//
1122 // This function does not take in consideration associations added with1245 // This function does not take in consideration associations added with
1123-// g_app_info_add_supports_type(), but only those exported directly by1246+// [method@Gio.AppInfo.add_supports_type], but only those exported directly by
1124 // the application.1247 // the application.
1125 func (x *AppInfoBase) GetSupportedTypes() []string {1248 func (x *AppInfoBase) GetSupportedTypes() []string {
1126 1249
@@ -1133,7 +1256,7 @@ func (x *AppInfoBase) GetSupportedTypes() []string {
1133 // about the details of the launcher (like what screen it is on).1256 // about the details of the launcher (like what screen it is on).
1134 // On error, @error will be set accordingly.1257 // On error, @error will be set accordingly.
1135 //1258 //
1136-// To launch the application without arguments pass a %NULL @files list.1259+// To launch the application without arguments pass a `NULL` @files list.
1137 //1260 //
1138 // Note that even if the launch is successful the application launched1261 // Note that even if the launch is successful the application launched
1139 // can fail to start if it runs into problems during startup. There is1262 // can fail to start if it runs into problems during startup. There is
@@ -1142,19 +1265,19 @@ func (x *AppInfoBase) GetSupportedTypes() []string {
1142 // Some URIs can be changed when passed through a GFile (for instance1265 // Some URIs can be changed when passed through a GFile (for instance
1143 // unsupported URIs with strange formats like mailto:), so if you have1266 // unsupported URIs with strange formats like mailto:), so if you have
1144 // a textual URI you want to pass in as argument, consider using1267 // a textual URI you want to pass in as argument, consider using
1145-// g_app_info_launch_uris() instead.1268+// [method@Gio.AppInfo.launch_uris] instead.
1146 //1269 //
1147 // The launched application inherits the environment of the launching1270 // The launched application inherits the environment of the launching
1148-// process, but it can be modified with g_app_launch_context_setenv()1271+// process, but it can be modified with [method@Gio.AppLaunchContext.setenv]
1149-// and g_app_launch_context_unsetenv().1272+// and [method@Gio.AppLaunchContext.unsetenv].
1150 //1273 //
1151 // On UNIX, this function sets the `GIO_LAUNCHED_DESKTOP_FILE`1274 // On UNIX, this function sets the `GIO_LAUNCHED_DESKTOP_FILE`
1152 // environment variable with the path of the launched desktop file and1275 // environment variable with the path of the launched desktop file and
1153 // `GIO_LAUNCHED_DESKTOP_FILE_PID` to the process id of the launched1276 // `GIO_LAUNCHED_DESKTOP_FILE_PID` to the process id of the launched
1154 // process. This can be used to ignore `GIO_LAUNCHED_DESKTOP_FILE`,1277 // process. This can be used to ignore `GIO_LAUNCHED_DESKTOP_FILE`,
1155-// should it be inherited by further processes. The `DISPLAY` and1278+// should it be inherited by further processes. The `DISPLAY`,
1156-// `DESKTOP_STARTUP_ID` environment variables are also set, based1279+// `XDG_ACTIVATION_TOKEN` and `DESKTOP_STARTUP_ID` environment
1157-// on information provided in @context.1280+// variables are also set, based on information provided in @context.
1158 func (x *AppInfoBase) Launch(FilesVar *glib.List, ContextVar *AppLaunchContext) (bool, error) {1281 func (x *AppInfoBase) Launch(FilesVar *glib.List, ContextVar *AppLaunchContext) (bool, error) {
1159 var cerr *glib.Error1282 var cerr *glib.Error
1160 1283
@@ -1169,9 +1292,11 @@ func (x *AppInfoBase) Launch(FilesVar *glib.List, ContextVar *AppLaunchContext)
1169 // Launches the application. This passes the @uris to the launched application1292 // Launches the application. This passes the @uris to the launched application
1170 // as arguments, using the optional @context to get information1293 // as arguments, using the optional @context to get information
1171 // about the details of the launcher (like what screen it is on).1294 // about the details of the launcher (like what screen it is on).
1172-// On error, @error will be set accordingly.1295+// On error, @error will be set accordingly. If the application only supports
1296+// one URI per invocation as part of their command-line, multiple instances
1297+// of the application will be spawned.
1173 //1298 //
1174-// To launch the application without arguments pass a %NULL @uris list.1299+// To launch the application without arguments pass a `NULL` @uris list.
1175 //1300 //
1176 // Note that even if the launch is successful the application launched1301 // Note that even if the launch is successful the application launched
1177 // can fail to start if it runs into problems during startup. There is1302 // can fail to start if it runs into problems during startup. There is
@@ -1187,19 +1312,19 @@ func (x *AppInfoBase) LaunchUris(UrisVar *glib.List, ContextVar *AppLaunchContex
1187 1312
1188 }1313 }
1189 1314
1190-// Async version of g_app_info_launch_uris().1315+// Async version of [method@Gio.AppInfo.launch_uris].
1191 //1316 //
1192 // The @callback is invoked immediately after the application launch, but it1317 // The @callback is invoked immediately after the application launch, but it
1193 // waits for activation in case of D-Bus–activated applications and also provides1318 // waits for activation in case of D-Bus–activated applications and also provides
1194 // extended error information for sandboxed applications, see notes for1319 // extended error information for sandboxed applications, see notes for
1195-// g_app_info_launch_default_for_uri_async().1320+// [func@Gio.AppInfo.launch_default_for_uri_async].
1196 func (x *AppInfoBase) LaunchUrisAsync(UrisVar *glib.List, ContextVar *AppLaunchContext, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {1321 func (x *AppInfoBase) LaunchUrisAsync(UrisVar *glib.List, ContextVar *AppLaunchContext, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
1197 1322
1198 XGAppInfoLaunchUrisAsync(x.GoPointer(), UrisVar, ContextVar.GoPointer(), CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)1323 XGAppInfoLaunchUrisAsync(x.GoPointer(), UrisVar, ContextVar.GoPointer(), CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
1199 1324
1200 }1325 }
1201 1326
1202-// Finishes a g_app_info_launch_uris_async() operation.1327+// Finishes a [method@Gio.AppInfo.launch_uris_async] operation.
1203 func (x *AppInfoBase) LaunchUrisFinish(ResultVar AsyncResult) (bool, error) {1328 func (x *AppInfoBase) LaunchUrisFinish(ResultVar AsyncResult) (bool, error) {
1204 var cerr *glib.Error1329 var cerr *glib.Error
1205 1330
@@ -1247,9 +1372,9 @@ func (x *AppInfoBase) SetAsDefaultForType(ContentTypeVar string) (bool, error) {
1247 1372
1248 }1373 }
1249 1374
1250-// Sets the application as the last used application for a given type.1375+// Sets the application as the last used application for a given type. This
1251-// This will make the application appear as first in the list returned1376+// will make the application appear as first in the list returned by
1252-// by g_app_info_get_recommended_for_type(), regardless of the default1377+// [func@Gio.AppInfo.get_recommended_for_type], regardless of the default
1253 // application for that content type.1378 // application for that content type.
1254 func (x *AppInfoBase) SetAsLastUsedForType(ContentTypeVar string) (bool, error) {1379 func (x *AppInfoBase) SetAsLastUsedForType(ContentTypeVar string) (bool, error) {
1255 var cerr *glib.Error1380 var cerr *glib.Error
@@ -1312,13 +1437,15 @@ var XGAppInfoSupportsUris func(uintptr) bool
1312 1437
1313 var xAppInfoCreateFromCommandline func(string, string, AppInfoCreateFlags, **glib.Error) uintptr1438 var xAppInfoCreateFromCommandline func(string, string, AppInfoCreateFlags, **glib.Error) uintptr
1314 1439
1315-// Creates a new #GAppInfo from the given information.1440+// Creates a new [iface@Gio.AppInfo] from the given information.
1316 //1441 //
1317-// Note that for @commandline, the quoting rules of the Exec key of the1442+// Note that for @commandline, the quoting rules of the `Exec` key of the
1318 // [freedesktop.org Desktop Entry Specification](http://freedesktop.org/Standards/desktop-entry-spec)1443 // [freedesktop.org Desktop Entry Specification](http://freedesktop.org/Standards/desktop-entry-spec)
1319 // are applied. For example, if the @commandline contains1444 // are applied. For example, if the @commandline contains
1320 // percent-encoded URIs, the percent-character must be doubled in order to prevent it from1445 // percent-encoded URIs, the percent-character must be doubled in order to prevent it from
1321-// being swallowed by Exec key unquoting. See the specification for exact quoting rules.1446+// being swallowed by `Exec` key unquoting. See
1447+// [the specification](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s07.html)
1448+// for exact quoting rules.
1322 func AppInfoCreateFromCommandline(CommandlineVar string, ApplicationNameVar string, FlagsVar AppInfoCreateFlags) (*AppInfoBase, error) {1449 func AppInfoCreateFromCommandline(CommandlineVar string, ApplicationNameVar string, FlagsVar AppInfoCreateFlags) (*AppInfoBase, error) {
1323 var cls *AppInfoBase1450 var cls *AppInfoBase
1324 var cerr *glib.Error1451 var cerr *glib.Error
@@ -1343,10 +1470,15 @@ var xAppInfoGetAll func() *glib.List
1343 // on this system.1470 // on this system.
1344 //1471 //
1345 // For desktop files, this includes applications that have1472 // For desktop files, this includes applications that have
1346-// `NoDisplay=true` set or are excluded from display by means1473+// [`NoDisplay=true`](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html#key-nodisplay)
1347-// of `OnlyShowIn` or `NotShowIn`. See g_app_info_should_show().1474+// set or are excluded from display by means of
1348-// The returned list does not include applications which have1475+// [`OnlyShowIn`](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html#key-onlyshowin)
1349-// the `Hidden` key set.1476+// or [`NotShowIn`](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html#key-notshowin).
1477+// See [method@Gio.AppInfo.should_show].
1478+//
1479+// The returned list does not include applications which have the
1480+// [`Hidden` key](https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html#key-hidden)
1481+// set.
1350 func AppInfoGetAll() *glib.List {1482 func AppInfoGetAll() *glib.List {
1351 1483
1352 cret := xAppInfoGetAll()1484 cret := xAppInfoGetAll()
@@ -1355,10 +1487,10 @@ func AppInfoGetAll() *glib.List {
1355 1487
1356 var xAppInfoGetAllForType func(string) *glib.List1488 var xAppInfoGetAllForType func(string) *glib.List
1357 1489
1358-// Gets a list of all #GAppInfos for a given content type,1490+// Gets a list of all [iface@Gio.AppInfo]s for a given content type,
1359-// including the recommended and fallback #GAppInfos. See1491+// including the recommended and fallback [iface@Gio.AppInfo]s. See
1360-// g_app_info_get_recommended_for_type() and1492+// [func@Gio.AppInfo.get_recommended_for_type] and
1361-// g_app_info_get_fallback_for_type().1493+// [func@Gio.AppInfo.get_fallback_for_type].
1362 func AppInfoGetAllForType(ContentTypeVar string) *glib.List {1494 func AppInfoGetAllForType(ContentTypeVar string) *glib.List {
1363 1495
1364 cret := xAppInfoGetAllForType(ContentTypeVar)1496 cret := xAppInfoGetAllForType(ContentTypeVar)
@@ -1367,7 +1499,7 @@ func AppInfoGetAllForType(ContentTypeVar string) *glib.List {
1367 1499
1368 var xAppInfoGetDefaultForType func(string, bool) uintptr1500 var xAppInfoGetDefaultForType func(string, bool) uintptr
1369 1501
1370-// Gets the default #GAppInfo for a given content type.1502+// Gets the default [iface@Gio.AppInfo] for a given content type.
1371 func AppInfoGetDefaultForType(ContentTypeVar string, MustSupportUrisVar bool) *AppInfoBase {1503 func AppInfoGetDefaultForType(ContentTypeVar string, MustSupportUrisVar bool) *AppInfoBase {
1372 var cls *AppInfoBase1504 var cls *AppInfoBase
1373 1505
@@ -1381,12 +1513,47 @@ func AppInfoGetDefaultForType(ContentTypeVar string, MustSupportUrisVar bool) *A
1381 return cls1513 return cls
1382 }1514 }
1383 1515
1516+var xAppInfoGetDefaultForTypeAsync func(string, bool, uintptr, uintptr, uintptr)
1517+
1518+// Asynchronously gets the default [iface@Gio.AppInfo] for a given content
1519+// type.
1520+func AppInfoGetDefaultForTypeAsync(ContentTypeVar string, MustSupportUrisVar bool, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
1521+
1522+ xAppInfoGetDefaultForTypeAsync(ContentTypeVar, MustSupportUrisVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
1523+
1524+}
1525+
1526+var xAppInfoGetDefaultForTypeFinish func(uintptr, **glib.Error) uintptr
1527+
1528+// Finishes a default [iface@Gio.AppInfo] lookup started by
1529+// [func@Gio.AppInfo.get_default_for_type_async].
1530+//
1531+// If no #[iface@Gio.AppInfo] is found, then @error will be set to
1532+// [error@Gio.IOErrorEnum.NOT_FOUND].
1533+func AppInfoGetDefaultForTypeFinish(ResultVar AsyncResult) (*AppInfoBase, error) {
1534+ var cls *AppInfoBase
1535+ var cerr *glib.Error
1536+
1537+ cret := xAppInfoGetDefaultForTypeFinish(ResultVar.GoPointer(), &cerr)
1538+
1539+ if cret == 0 {
1540+ return nil, cerr
1541+ }
1542+ cls = &AppInfoBase{}
1543+ cls.Ptr = cret
1544+ if cerr == nil {
1545+ return cls, nil
1546+ }
1547+ return cls, cerr
1548+
1549+}
1550+
1384 var xAppInfoGetDefaultForUriScheme func(string) uintptr1551 var xAppInfoGetDefaultForUriScheme func(string) uintptr
1385 1552
1386-// Gets the default application for handling URIs with1553+// Gets the default application for handling URIs with the given URI scheme.
1387-// the given URI scheme. A URI scheme is the initial part1554+//
1388-// of the URI, up to but not including the ':', e.g. "http",1555+// A URI scheme is the initial part of the URI, up to but not including the `:`.
1389-// "ftp" or "sip".1556+// For example, `http`, `ftp` or `sip`.
1390 func AppInfoGetDefaultForUriScheme(UriSchemeVar string) *AppInfoBase {1557 func AppInfoGetDefaultForUriScheme(UriSchemeVar string) *AppInfoBase {
1391 var cls *AppInfoBase1558 var cls *AppInfoBase
1392 1559
@@ -1400,11 +1567,48 @@ func AppInfoGetDefaultForUriScheme(UriSchemeVar string) *AppInfoBase {
1400 return cls1567 return cls
1401 }1568 }
1402 1569
1570+var xAppInfoGetDefaultForUriSchemeAsync func(string, uintptr, uintptr, uintptr)
1571+
1572+// Asynchronously gets the default application for handling URIs with
1573+// the given URI scheme. A URI scheme is the initial part
1574+// of the URI, up to but not including the `:`, e.g. `http`,
1575+// `ftp` or `sip`.
1576+func AppInfoGetDefaultForUriSchemeAsync(UriSchemeVar string, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
1577+
1578+ xAppInfoGetDefaultForUriSchemeAsync(UriSchemeVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
1579+
1580+}
1581+
1582+var xAppInfoGetDefaultForUriSchemeFinish func(uintptr, **glib.Error) uintptr
1583+
1584+// Finishes a default [iface@Gio.AppInfo] lookup started by
1585+// [func@Gio.AppInfo.get_default_for_uri_scheme_async].
1586+//
1587+// If no [iface@Gio.AppInfo] is found, then @error will be set to
1588+// [error@Gio.IOErrorEnum.NOT_FOUND].
1589+func AppInfoGetDefaultForUriSchemeFinish(ResultVar AsyncResult) (*AppInfoBase, error) {
1590+ var cls *AppInfoBase
1591+ var cerr *glib.Error
1592+
1593+ cret := xAppInfoGetDefaultForUriSchemeFinish(ResultVar.GoPointer(), &cerr)
1594+
1595+ if cret == 0 {
1596+ return nil, cerr
1597+ }
1598+ cls = &AppInfoBase{}
1599+ cls.Ptr = cret
1600+ if cerr == nil {
1601+ return cls, nil
1602+ }
1603+ return cls, cerr
1604+
1605+}
1606+
1403 var xAppInfoGetFallbackForType func(string) *glib.List1607 var xAppInfoGetFallbackForType func(string) *glib.List
1404 1608
1405-// Gets a list of fallback #GAppInfos for a given content type, i.e.1609+// Gets a list of fallback [iface@Gio.AppInfo]s for a given content type, i.e.
1406-// those applications which claim to support the given content type1610+// those applications which claim to support the given content type by MIME
1407-// by MIME type subclassing and not directly.1611+// type subclassing and not directly.
1408 func AppInfoGetFallbackForType(ContentTypeVar string) *glib.List {1612 func AppInfoGetFallbackForType(ContentTypeVar string) *glib.List {
1409 1613
1410 cret := xAppInfoGetFallbackForType(ContentTypeVar)1614 cret := xAppInfoGetFallbackForType(ContentTypeVar)
@@ -1413,12 +1617,13 @@ func AppInfoGetFallbackForType(ContentTypeVar string) *glib.List {
1413 1617
1414 var xAppInfoGetRecommendedForType func(string) *glib.List1618 var xAppInfoGetRecommendedForType func(string) *glib.List
1415 1619
1416-// Gets a list of recommended #GAppInfos for a given content type, i.e.1620+// Gets a list of recommended [iface@Gio.AppInfo]s for a given content type,
1417-// those applications which claim to support the given content type exactly,1621+// i.e. those applications which claim to support the given content type
1418-// and not by MIME type subclassing.1622+// exactly, and not by MIME type subclassing.
1623+//
1419 // Note that the first application of the list is the last used one, i.e.1624 // Note that the first application of the list is the last used one, i.e.
1420-// the last one for which g_app_info_set_as_last_used_for_type() has been1625+// the last one for which [method@Gio.AppInfo.set_as_last_used_for_type] has
1421-// called.1626+// been called.
1422 func AppInfoGetRecommendedForType(ContentTypeVar string) *glib.List {1627 func AppInfoGetRecommendedForType(ContentTypeVar string) *glib.List {
1423 1628
1424 cret := xAppInfoGetRecommendedForType(ContentTypeVar)1629 cret := xAppInfoGetRecommendedForType(ContentTypeVar)
@@ -1427,14 +1632,13 @@ func AppInfoGetRecommendedForType(ContentTypeVar string) *glib.List {
1427 1632
1428 var xAppInfoLaunchDefaultForUri func(string, uintptr, **glib.Error) bool1633 var xAppInfoLaunchDefaultForUri func(string, uintptr, **glib.Error) bool
1429 1634
1430-// Utility function that launches the default application1635+// Utility function that launches the default application registered to handle
1431-// registered to handle the specified uri. Synchronous I/O1636+// the specified uri. Synchronous I/O is done on the uri to detect the type of
1432-// is done on the uri to detect the type of the file if1637+// the file if required.
1433-// required.
1434 //1638 //
1435-// The D-Bus–activated applications don't have to be started if your application1639+// The D-Bus–activated applications don’t have to be started if your application
1436 // terminates too soon after this function. To prevent this, use1640 // terminates too soon after this function. To prevent this, use
1437-// g_app_info_launch_default_for_uri_async() instead.1641+// [func@Gio.AppInfo.launch_default_for_uri_async] instead.
1438 func AppInfoLaunchDefaultForUri(UriVar string, ContextVar *AppLaunchContext) (bool, error) {1642 func AppInfoLaunchDefaultForUri(UriVar string, ContextVar *AppLaunchContext) (bool, error) {
1439 var cerr *glib.Error1643 var cerr *glib.Error
1440 1644
@@ -1448,12 +1652,11 @@ func AppInfoLaunchDefaultForUri(UriVar string, ContextVar *AppLaunchContext) (bo
1448 1652
1449 var xAppInfoLaunchDefaultForUriAsync func(string, uintptr, uintptr, uintptr, uintptr)1653 var xAppInfoLaunchDefaultForUriAsync func(string, uintptr, uintptr, uintptr, uintptr)
1450 1654
1451-// Async version of g_app_info_launch_default_for_uri().1655+// Async version of [func@Gio.AppInfo.launch_default_for_uri].
1452 //1656 //
1453-// This version is useful if you are interested in receiving1657+// This version is useful if you are interested in receiving error information
1454-// error information in the case where the application is1658+// in the case where the application is sandboxed and the portal may present an
1455-// sandboxed and the portal may present an application chooser1659+// application chooser dialog to the user.
1456-// dialog to the user.
1457 //1660 //
1458 // This is also useful if you want to be sure that the D-Bus–activated1661 // This is also useful if you want to be sure that the D-Bus–activated
1459 // applications are really started before termination and if you are interested1662 // applications are really started before termination and if you are interested
@@ -1481,16 +1684,131 @@ func AppInfoLaunchDefaultForUriFinish(ResultVar AsyncResult) (bool, error) {
1481 var xAppInfoResetTypeAssociations func(string)1684 var xAppInfoResetTypeAssociations func(string)
1482 1685
1483 // Removes all changes to the type associations done by1686 // Removes all changes to the type associations done by
1484-// g_app_info_set_as_default_for_type(),1687+// [method@Gio.AppInfo.set_as_default_for_type],
1485-// g_app_info_set_as_default_for_extension(),1688+// [method@Gio.AppInfo.set_as_default_for_extension],
1486-// g_app_info_add_supports_type() or1689+// [method@Gio.AppInfo.add_supports_type] or
1487-// g_app_info_remove_supports_type().1690+// [method@Gio.AppInfo.remove_supports_type].
1488 func AppInfoResetTypeAssociations(ContentTypeVar string) {1691 func AppInfoResetTypeAssociations(ContentTypeVar string) {
1489 1692
1490 xAppInfoResetTypeAssociations(ContentTypeVar)1693 xAppInfoResetTypeAssociations(ContentTypeVar)
1491 1694
1492 }1695 }
1493 1696
1697+// `GAppInfoMonitor` monitors application information for changes.
1698+//
1699+// `GAppInfoMonitor` is a very simple object used for monitoring the app
1700+// info database for changes (newly installed or removed applications).
1701+//
1702+// Call [func@Gio.AppInfoMonitor.get] to get a `GAppInfoMonitor` and connect
1703+// to the [signal@Gio.AppInfoMonitor::changed] signal. The signal will be emitted once when
1704+// the app info database changes, and will not be emitted again until after the
1705+// next call to [func@Gio.AppInfo.get_all] or another `g_app_info_*()` function.
1706+// This is because monitoring the app info database for changes is expensive.
1707+//
1708+// The following functions will re-arm the [signal@Gio.AppInfoMonitor::changed]
1709+// signal so it can be emitted again:
1710+//
1711+// - [func@Gio.AppInfo.get_all]
1712+// - [func@Gio.AppInfo.get_all_for_type]
1713+// - [func@Gio.AppInfo.get_default_for_type]
1714+// - [func@Gio.AppInfo.get_fallback_for_type]
1715+// - [func@Gio.AppInfo.get_recommended_for_type]
1716+// - [`g_desktop_app_info_get_implementations()`](../gio-unix/type_func.DesktopAppInfo.get_implementation.html)
1717+// - [`g_desktop_app_info_new()`](../gio-unix/ctor.DesktopAppInfo.new.html)
1718+// - [`g_desktop_app_info_new_from_filename()`](../gio-unix/ctor.DesktopAppInfo.new_from_filename.html)
1719+// - [`g_desktop_app_info_new_from_keyfile()`](../gio-unix/ctor.DesktopAppInfo.new_from_keyfile.html)
1720+// - [`g_desktop_app_info_search()`](../gio-unix/type_func.DesktopAppInfo.search.html)
1721+//
1722+// The latter functions are available if using
1723+// [`GDesktopAppInfo`](../gio-unix/class.DesktopAppInfo.html) from
1724+// `gio-unix-2.0.pc` (GIR namespace `GioUnix-2.0`).
1725+//
1726+// In the usual case, applications should try to make note of the change
1727+// (doing things like invalidating caches) but not act on it. In
1728+// particular, applications should avoid making calls to `GAppInfo` APIs
1729+// in response to the change signal, deferring these until the time that
1730+// the updated data is actually required. The exception to this case is when
1731+// application information is actually being displayed on the screen
1732+// (for example, during a search or when the list of all applications is shown).
1733+// The reason for this is that changes to the list of installed applications
1734+// often come in groups (like during system updates) and rescanning the list
1735+// on every change is pointless and expensive.
1736+type AppInfoMonitor struct {
1737+ gobject.Object
1738+}
1739+
1740+var xAppInfoMonitorGLibType func() types.GType
1741+
1742+func AppInfoMonitorGLibType() types.GType {
1743+ return xAppInfoMonitorGLibType()
1744+}
1745+
1746+func AppInfoMonitorNewFromInternalPtr(ptr uintptr) *AppInfoMonitor {
1747+ cls := &AppInfoMonitor{}
1748+ cls.Ptr = ptr
1749+ return cls
1750+}
1751+
1752+func (c *AppInfoMonitor) GoPointer() uintptr {
1753+ if c == nil {
1754+ return 0
1755+ }
1756+ return c.Ptr
1757+}
1758+
1759+func (c *AppInfoMonitor) SetGoPointer(ptr uintptr) {
1760+ c.Ptr = ptr
1761+}
1762+
1763+// Signal emitted when the app info database changes, when applications are
1764+// installed or removed.
1765+func (x *AppInfoMonitor) ConnectChanged(cb *func(AppInfoMonitor)) uint32 {
1766+ cbPtr := uintptr(unsafe.Pointer(cb))
1767+ if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
1768+ return gobject.SignalConnect(x.GoPointer(), "changed", cbRefPtr)
1769+ }
1770+
1771+ fcb := func(clsPtr uintptr) {
1772+ fa := AppInfoMonitor{}
1773+ fa.Ptr = clsPtr
1774+ cbFn := *cb
1775+
1776+ cbFn(fa)
1777+
1778+ }
1779+ cbRefPtr := purego.NewCallback(fcb)
1780+ glib.SaveCallback(cbPtr, cbRefPtr)
1781+ return gobject.SignalConnect(x.GoPointer(), "changed", cbRefPtr)
1782+}
1783+
1784+var xAppInfoMonitorGet func() uintptr
1785+
1786+// Gets the #GAppInfoMonitor for the current thread-default main
1787+// context.
1788+//
1789+// The #GAppInfoMonitor will emit a “changed” signal in the
1790+// thread-default main context whenever the list of installed
1791+// applications (as reported by g_app_info_get_all()) may have changed.
1792+//
1793+// The #GAppInfoMonitor::changed signal will only be emitted once until
1794+// g_app_info_get_all() (or another `g_app_info_*()` function) is called. Doing
1795+// so will re-arm the signal ready to notify about the next change.
1796+//
1797+// You must only call g_object_unref() on the return value from under
1798+// the same main context as you created it.
1799+func AppInfoMonitorGet() *AppInfoMonitor {
1800+ var cls *AppInfoMonitor
1801+
1802+ cret := xAppInfoMonitorGet()
1803+
1804+ if cret == 0 {
1805+ return nil
1806+ }
1807+ cls = &AppInfoMonitor{}
1808+ cls.Ptr = cret
1809+ return cls
1810+}
1811+
1494 // Integrating the launch with the launching application. This is used to1812 // Integrating the launch with the launching application. This is used to
1495 // handle for instance startup notification and launching the new application1813 // handle for instance startup notification and launching the new application
1496 // on the same screen as the launching window.1814 // on the same screen as the launching window.
@@ -1513,7 +1831,8 @@ func AppLaunchContextNewFromInternalPtr(ptr uintptr) *AppLaunchContext {
1513 var xNewAppLaunchContext func() uintptr1831 var xNewAppLaunchContext func() uintptr
1514 1832
1515 // Creates a new application launch context. This is not normally used,1833 // Creates a new application launch context. This is not normally used,
1516-// instead you instantiate a subclass of this, such as #GdkAppLaunchContext.1834+// instead you instantiate a subclass of this, such as
1835+// [`GdkAppLaunchContext`](https://docs.gtk.org/gdk4/class.AppLaunchContext.html).
1517 func NewAppLaunchContext() *AppLaunchContext {1836 func NewAppLaunchContext() *AppLaunchContext {
1518 var cls *AppLaunchContext1837 var cls *AppLaunchContext
1519 1838
@@ -1542,7 +1861,7 @@ var xAppLaunchContextGetEnvironment func(uintptr) []string
1542 1861
1543 // Gets the complete environment variable list to be passed to1862 // Gets the complete environment variable list to be passed to
1544 // the child process when @context is used to launch an application.1863 // the child process when @context is used to launch an application.
1545-// This is a %NULL-terminated array of strings, where each string has1864+// This is a `NULL`-terminated array of strings, where each string has
1546 // the form `KEY=VALUE`.1865 // the form `KEY=VALUE`.
1547 func (x *AppLaunchContext) GetEnvironment() []string {1866 func (x *AppLaunchContext) GetEnvironment() []string {
1548 1867
@@ -1553,10 +1872,20 @@ func (x *AppLaunchContext) GetEnvironment() []string {
1553 var xAppLaunchContextGetStartupNotifyId func(uintptr, uintptr, *glib.List) string1872 var xAppLaunchContextGetStartupNotifyId func(uintptr, uintptr, *glib.List) string
1554 1873
1555 // Initiates startup notification for the application and returns the1874 // Initiates startup notification for the application and returns the
1556-// `DESKTOP_STARTUP_ID` for the launched operation, if supported.1875+// `XDG_ACTIVATION_TOKEN` or `DESKTOP_STARTUP_ID` for the launched operation,
1876+// if supported.
1557 //1877 //
1558-// Startup notification IDs are defined in the1878+// The returned token may be referred to equivalently as an ‘activation token’
1559-// [FreeDesktop.Org Startup Notifications standard](http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt).1879+// (using Wayland terminology) or a ‘startup sequence ID’ (using X11 terminology).
1880+// The two [are interoperable](https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/staging/xdg-activation/x11-interoperation.rst).
1881+//
1882+// Activation tokens are defined in the [XDG Activation Protocol](https://wayland.app/protocols/xdg-activation-v1),
1883+// and startup notification IDs are defined in the
1884+// [freedesktop.org Startup Notification Protocol](http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt).
1885+//
1886+// Support for the XDG Activation Protocol was added in GLib 2.76.
1887+// Since GLib 2.82 @info and @files can be `NULL`. If that’s not supported by the backend,
1888+// the returned token will be `NULL`.
1560 func (x *AppLaunchContext) GetStartupNotifyId(InfoVar AppInfo, FilesVar *glib.List) string {1889 func (x *AppLaunchContext) GetStartupNotifyId(InfoVar AppInfo, FilesVar *glib.List) string {
1561 1890
1562 cret := xAppLaunchContextGetStartupNotifyId(x.GoPointer(), InfoVar.GoPointer(), FilesVar)1891 cret := xAppLaunchContextGetStartupNotifyId(x.GoPointer(), InfoVar.GoPointer(), FilesVar)
@@ -1566,7 +1895,8 @@ func (x *AppLaunchContext) GetStartupNotifyId(InfoVar AppInfo, FilesVar *glib.Li
1566 var xAppLaunchContextLaunchFailed func(uintptr, string)1895 var xAppLaunchContextLaunchFailed func(uintptr, string)
1567 1896
1568 // Called when an application has failed to launch, so that it can cancel1897 // Called when an application has failed to launch, so that it can cancel
1569-// the application startup notification started in g_app_launch_context_get_startup_notify_id().1898+// the application startup notification started in
1899+// [method@Gio.AppLaunchContext.get_startup_notify_id].
1570 func (x *AppLaunchContext) LaunchFailed(StartupNotifyIdVar string) {1900 func (x *AppLaunchContext) LaunchFailed(StartupNotifyIdVar string) {
1571 1901
1572 xAppLaunchContextLaunchFailed(x.GoPointer(), StartupNotifyIdVar)1902 xAppLaunchContextLaunchFailed(x.GoPointer(), StartupNotifyIdVar)
@@ -1575,8 +1905,8 @@ func (x *AppLaunchContext) LaunchFailed(StartupNotifyIdVar string) {
1575 1905
1576 var xAppLaunchContextSetenv func(uintptr, string, string)1906 var xAppLaunchContextSetenv func(uintptr, string, string)
1577 1907
1578-// Arranges for @variable to be set to @value in the child's1908+// Arranges for @variable to be set to @value in the child’s environment when
1579-// environment when @context is used to launch an application.1909+// @context is used to launch an application.
1580 func (x *AppLaunchContext) Setenv(VariableVar string, ValueVar string) {1910 func (x *AppLaunchContext) Setenv(VariableVar string, ValueVar string) {
1581 1911
1582 xAppLaunchContextSetenv(x.GoPointer(), VariableVar, ValueVar)1912 xAppLaunchContextSetenv(x.GoPointer(), VariableVar, ValueVar)
@@ -1585,8 +1915,8 @@ func (x *AppLaunchContext) Setenv(VariableVar string, ValueVar string) {
1585 1915
1586 var xAppLaunchContextUnsetenv func(uintptr, string)1916 var xAppLaunchContextUnsetenv func(uintptr, string)
1587 1917
1588-// Arranges for @variable to be unset in the child's environment1918+// Arranges for @variable to be unset in the child’s environment when @context
1589-// when @context is used to launch an application.1919+// is used to launch an application.
1590 func (x *AppLaunchContext) Unsetenv(VariableVar string) {1920 func (x *AppLaunchContext) Unsetenv(VariableVar string) {
1591 1921
1592 xAppLaunchContextUnsetenv(x.GoPointer(), VariableVar)1922 xAppLaunchContextUnsetenv(x.GoPointer(), VariableVar)
@@ -1604,9 +1934,13 @@ func (c *AppLaunchContext) SetGoPointer(ptr uintptr) {
1604 c.Ptr = ptr1934 c.Ptr = ptr
1605 }1935 }
1606 1936
1607-// The #GAppLaunchContext::launch-failed signal is emitted when a #GAppInfo launch1937+// The [signal@Gio.AppLaunchContext::launch-failed] signal is emitted when a
1608-// fails. The startup notification id is provided, so that the launcher1938+// [iface@Gio.AppInfo] launch fails. The startup notification id is provided,
1609-// can cancel the startup notification.1939+// so that the launcher can cancel the startup notification.
1940+//
1941+// Because a launch operation may involve spawning multiple instances of the
1942+// target application, you should expect this signal to be emitted multiple
1943+// times, one for each spawned instance.
1610 func (x *AppLaunchContext) ConnectLaunchFailed(cb *func(AppLaunchContext, string)) uint32 {1944 func (x *AppLaunchContext) ConnectLaunchFailed(cb *func(AppLaunchContext, string)) uint32 {
1611 cbPtr := uintptr(unsafe.Pointer(cb))1945 cbPtr := uintptr(unsafe.Pointer(cb))
1612 if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {1946 if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
@@ -1626,11 +1960,11 @@ func (x *AppLaunchContext) ConnectLaunchFailed(cb *func(AppLaunchContext, string
1626 return gobject.SignalConnect(x.GoPointer(), "launch-failed", cbRefPtr)1960 return gobject.SignalConnect(x.GoPointer(), "launch-failed", cbRefPtr)
1627 }1961 }
1628 1962
1629-// The #GAppLaunchContext::launch-started signal is emitted when a #GAppInfo is1963+// The [signal@Gio.AppLaunchContext::launch-started] signal is emitted when a
1630-// about to be launched. If non-null the @platform_data is an1964+// [iface@Gio.AppInfo] is about to be launched. If non-null the
1631-// GVariant dictionary mapping strings to variants (ie `a{sv}`), which1965+// @platform_data is an GVariant dictionary mapping strings to variants
1632-// contains additional, platform-specific data about this launch. On1966+// (ie `a{sv}`), which contains additional, platform-specific data about this
1633-// UNIX, at least the `startup-notification-id` keys will be1967+// launch. On UNIX, at least the `startup-notification-id` keys will be
1634 // present.1968 // present.
1635 //1969 //
1636 // The value of the `startup-notification-id` key (type `s`) is a startup1970 // The value of the `startup-notification-id` key (type `s`) is a startup
@@ -1638,8 +1972,13 @@ func (x *AppLaunchContext) ConnectLaunchFailed(cb *func(AppLaunchContext, string
1638 // specification](https://specifications.freedesktop.org/startup-notification-spec/startup-notification-0.1.txt).1972 // specification](https://specifications.freedesktop.org/startup-notification-spec/startup-notification-0.1.txt).
1639 // It allows tracking the progress of the launchee through startup.1973 // It allows tracking the progress of the launchee through startup.
1640 //1974 //
1641-// It is guaranteed that this signal is followed by either a #GAppLaunchContext::launched or1975+// It is guaranteed that this signal is followed by either a
1642-// #GAppLaunchContext::launch-failed signal.1976+// [signal@Gio.AppLaunchContext::launched] or
1977+// [signal@Gio.AppLaunchContext::launch-failed] signal.
1978+//
1979+// Because a launch operation may involve spawning multiple instances of the
1980+// target application, you should expect this signal to be emitted multiple
1981+// times, one for each spawned instance.
1643 func (x *AppLaunchContext) ConnectLaunchStarted(cb *func(AppLaunchContext, uintptr, uintptr)) uint32 {1982 func (x *AppLaunchContext) ConnectLaunchStarted(cb *func(AppLaunchContext, uintptr, uintptr)) uint32 {
1644 cbPtr := uintptr(unsafe.Pointer(cb))1983 cbPtr := uintptr(unsafe.Pointer(cb))
1645 if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {1984 if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
@@ -1659,15 +1998,27 @@ func (x *AppLaunchContext) ConnectLaunchStarted(cb *func(AppLaunchContext, uintp
1659 return gobject.SignalConnect(x.GoPointer(), "launch-started", cbRefPtr)1998 return gobject.SignalConnect(x.GoPointer(), "launch-started", cbRefPtr)
1660 }1999 }
1661 2000
1662-// The #GAppLaunchContext::launched signal is emitted when a #GAppInfo is successfully2001+// The [signal@Gio.AppLaunchContext::launched] signal is emitted when a
1663-// launched. The @platform_data is an GVariant dictionary mapping2002+// [iface@Gio.AppInfo] is successfully launched.
2003+//
2004+// Because a launch operation may involve spawning multiple instances of the
2005+// target application, you should expect this signal to be emitted multiple
2006+// times, one time for each spawned instance.
2007+//
2008+// The @platform_data is an GVariant dictionary mapping
1664 // strings to variants (ie `a{sv}`), which contains additional,2009 // strings to variants (ie `a{sv}`), which contains additional,
1665 // platform-specific data about this launch. On UNIX, at least the2010 // platform-specific data about this launch. On UNIX, at least the
1666 // `pid` and `startup-notification-id` keys will be present.2011 // `pid` and `startup-notification-id` keys will be present.
1667 //2012 //
1668-// Since 2.72 the `pid` may be 0 if the process id wasn't known (for2013+// Since 2.72 the `pid` may be 0 if the process id wasn’t known (for
1669 // example if the process was launched via D-Bus). The `pid` may not be2014 // example if the process was launched via D-Bus). The `pid` may not be
1670 // set at all in subsequent releases.2015 // set at all in subsequent releases.
2016+//
2017+// On Windows, `pid` is guaranteed to be valid only for the duration of the
2018+// [signal@Gio.AppLaunchContext::launched] signal emission; after the signal
2019+// is emitted, GLib will call [func@GLib.spawn_close_pid]. If you need to
2020+// keep the [alias@GLib.Pid] after the signal has been emitted, then you can
2021+// duplicate `pid` using `DuplicateHandle()`.
1671 func (x *AppLaunchContext) ConnectLaunched(cb *func(AppLaunchContext, uintptr, uintptr)) uint32 {2022 func (x *AppLaunchContext) ConnectLaunched(cb *func(AppLaunchContext, uintptr, uintptr)) uint32 {
1672 cbPtr := uintptr(unsafe.Pointer(cb))2023 cbPtr := uintptr(unsafe.Pointer(cb))
1673 if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {2024 if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
@@ -1699,7 +2050,11 @@ func init() {
1699 core.PuregoSafeRegister(&xAppInfoGetAll, lib, "g_app_info_get_all")2050 core.PuregoSafeRegister(&xAppInfoGetAll, lib, "g_app_info_get_all")
1700 core.PuregoSafeRegister(&xAppInfoGetAllForType, lib, "g_app_info_get_all_for_type")2051 core.PuregoSafeRegister(&xAppInfoGetAllForType, lib, "g_app_info_get_all_for_type")
1701 core.PuregoSafeRegister(&xAppInfoGetDefaultForType, lib, "g_app_info_get_default_for_type")2052 core.PuregoSafeRegister(&xAppInfoGetDefaultForType, lib, "g_app_info_get_default_for_type")
2053+ core.PuregoSafeRegister(&xAppInfoGetDefaultForTypeAsync, lib, "g_app_info_get_default_for_type_async")
2054+ core.PuregoSafeRegister(&xAppInfoGetDefaultForTypeFinish, lib, "g_app_info_get_default_for_type_finish")
1702 core.PuregoSafeRegister(&xAppInfoGetDefaultForUriScheme, lib, "g_app_info_get_default_for_uri_scheme")2055 core.PuregoSafeRegister(&xAppInfoGetDefaultForUriScheme, lib, "g_app_info_get_default_for_uri_scheme")
2056+ core.PuregoSafeRegister(&xAppInfoGetDefaultForUriSchemeAsync, lib, "g_app_info_get_default_for_uri_scheme_async")
2057+ core.PuregoSafeRegister(&xAppInfoGetDefaultForUriSchemeFinish, lib, "g_app_info_get_default_for_uri_scheme_finish")
1703 core.PuregoSafeRegister(&xAppInfoGetFallbackForType, lib, "g_app_info_get_fallback_for_type")2058 core.PuregoSafeRegister(&xAppInfoGetFallbackForType, lib, "g_app_info_get_fallback_for_type")
1704 core.PuregoSafeRegister(&xAppInfoGetRecommendedForType, lib, "g_app_info_get_recommended_for_type")2059 core.PuregoSafeRegister(&xAppInfoGetRecommendedForType, lib, "g_app_info_get_recommended_for_type")
1705 core.PuregoSafeRegister(&xAppInfoLaunchDefaultForUri, lib, "g_app_info_launch_default_for_uri")2060 core.PuregoSafeRegister(&xAppInfoLaunchDefaultForUri, lib, "g_app_info_launch_default_for_uri")
@@ -1707,6 +2062,10 @@ func init() {
1707 core.PuregoSafeRegister(&xAppInfoLaunchDefaultForUriFinish, lib, "g_app_info_launch_default_for_uri_finish")2062 core.PuregoSafeRegister(&xAppInfoLaunchDefaultForUriFinish, lib, "g_app_info_launch_default_for_uri_finish")
1708 core.PuregoSafeRegister(&xAppInfoResetTypeAssociations, lib, "g_app_info_reset_type_associations")2063 core.PuregoSafeRegister(&xAppInfoResetTypeAssociations, lib, "g_app_info_reset_type_associations")
1709 2064
2065+ core.PuregoSafeRegister(&xAppInfoMonitorGLibType, lib, "g_app_info_monitor_get_type")
2066+
2067+ core.PuregoSafeRegister(&xAppInfoMonitorGet, lib, "g_app_info_monitor_get")
2068+
1710 core.PuregoSafeRegister(&xAppLaunchContextGLibType, lib, "g_app_launch_context_get_type")2069 core.PuregoSafeRegister(&xAppLaunchContextGLibType, lib, "g_app_launch_context_get_type")
1711 2070
1712 core.PuregoSafeRegister(&xNewAppLaunchContext, lib, "g_app_launch_context_new")2071 core.PuregoSafeRegister(&xNewAppLaunchContext, lib, "g_app_launch_context_new")
M v4/gio/gapplication.go +288 -117
@@ -56,6 +56,7 @@ func (x *ApplicationClass) GoPointer() uintptr {
56 }56 }
57 57
58 // OverrideStartup sets the callback function.58 // OverrideStartup sets the callback function.
59+// invoked on the primary instance immediately after registration
59 func (x *ApplicationClass) OverrideStartup(cb func(*Application)) {60 func (x *ApplicationClass) OverrideStartup(cb func(*Application)) {
60 if cb == nil {61 if cb == nil {
61 x.xStartup = 062 x.xStartup = 0
@@ -67,6 +68,7 @@ func (x *ApplicationClass) OverrideStartup(cb func(*Application)) {
67 }68 }
68 69
69 // GetStartup gets the callback function.70 // GetStartup gets the callback function.
71+// invoked on the primary instance immediately after registration
70 func (x *ApplicationClass) GetStartup() func(*Application) {72 func (x *ApplicationClass) GetStartup() func(*Application) {
71 if x.xStartup == 0 {73 if x.xStartup == 0 {
72 return nil74 return nil
@@ -79,6 +81,7 @@ func (x *ApplicationClass) GetStartup() func(*Application) {
79 }81 }
80 82
81 // OverrideActivate sets the callback function.83 // OverrideActivate sets the callback function.
84+// invoked on the primary instance when an activation occurs
82 func (x *ApplicationClass) OverrideActivate(cb func(*Application)) {85 func (x *ApplicationClass) OverrideActivate(cb func(*Application)) {
83 if cb == nil {86 if cb == nil {
84 x.xActivate = 087 x.xActivate = 0
@@ -90,6 +93,7 @@ func (x *ApplicationClass) OverrideActivate(cb func(*Application)) {
90 }93 }
91 94
92 // GetActivate gets the callback function.95 // GetActivate gets the callback function.
96+// invoked on the primary instance when an activation occurs
93 func (x *ApplicationClass) GetActivate() func(*Application) {97 func (x *ApplicationClass) GetActivate() func(*Application) {
94 if x.xActivate == 0 {98 if x.xActivate == 0 {
95 return nil99 return nil
@@ -102,6 +106,7 @@ func (x *ApplicationClass) GetActivate() func(*Application) {
102 }106 }
103 107
104 // OverrideOpen sets the callback function.108 // OverrideOpen sets the callback function.
109+// invoked on the primary instance when there are files to open
105 func (x *ApplicationClass) OverrideOpen(cb func(*Application, uintptr, int, string)) {110 func (x *ApplicationClass) OverrideOpen(cb func(*Application, uintptr, int, string)) {
106 if cb == nil {111 if cb == nil {
107 x.xOpen = 0112 x.xOpen = 0
@@ -113,6 +118,7 @@ func (x *ApplicationClass) OverrideOpen(cb func(*Application, uintptr, int, stri
113 }118 }
114 119
115 // GetOpen gets the callback function.120 // GetOpen gets the callback function.
121+// invoked on the primary instance when there are files to open
116 func (x *ApplicationClass) GetOpen() func(*Application, uintptr, int, string) {122 func (x *ApplicationClass) GetOpen() func(*Application, uintptr, int, string) {
117 if x.xOpen == 0 {123 if x.xOpen == 0 {
118 return nil124 return nil
@@ -125,6 +131,9 @@ func (x *ApplicationClass) GetOpen() func(*Application, uintptr, int, string) {
125 }131 }
126 132
127 // OverrideCommandLine sets the callback function.133 // OverrideCommandLine sets the callback function.
134+// invoked on the primary instance when a command-line is
135+//
136+// not handled locally
128 func (x *ApplicationClass) OverrideCommandLine(cb func(*Application, *ApplicationCommandLine) int) {137 func (x *ApplicationClass) OverrideCommandLine(cb func(*Application, *ApplicationCommandLine) int) {
129 if cb == nil {138 if cb == nil {
130 x.xCommandLine = 0139 x.xCommandLine = 0
@@ -136,6 +145,9 @@ func (x *ApplicationClass) OverrideCommandLine(cb func(*Application, *Applicatio
136 }145 }
137 146
138 // GetCommandLine gets the callback function.147 // GetCommandLine gets the callback function.
148+// invoked on the primary instance when a command-line is
149+//
150+// not handled locally
139 func (x *ApplicationClass) GetCommandLine() func(*Application, *ApplicationCommandLine) int {151 func (x *ApplicationClass) GetCommandLine() func(*Application, *ApplicationCommandLine) int {
140 if x.xCommandLine == 0 {152 if x.xCommandLine == 0 {
141 return nil153 return nil
@@ -148,6 +160,12 @@ func (x *ApplicationClass) GetCommandLine() func(*Application, *ApplicationComma
148 }160 }
149 161
150 // OverrideLocalCommandLine sets the callback function.162 // OverrideLocalCommandLine sets the callback function.
163+// invoked (locally). The virtual function has the chance
164+//
165+// to inspect (and possibly replace) command line arguments. See
166+// g_application_run() for more information. Also see the
167+// #GApplication::handle-local-options signal, which is a simpler
168+// alternative to handling some commandline options locally
151 func (x *ApplicationClass) OverrideLocalCommandLine(cb func(*Application, []string, int) bool) {169 func (x *ApplicationClass) OverrideLocalCommandLine(cb func(*Application, []string, int) bool) {
152 if cb == nil {170 if cb == nil {
153 x.xLocalCommandLine = 0171 x.xLocalCommandLine = 0
@@ -159,6 +177,12 @@ func (x *ApplicationClass) OverrideLocalCommandLine(cb func(*Application, []stri
159 }177 }
160 178
161 // GetLocalCommandLine gets the callback function.179 // GetLocalCommandLine gets the callback function.
180+// invoked (locally). The virtual function has the chance
181+//
182+// to inspect (and possibly replace) command line arguments. See
183+// g_application_run() for more information. Also see the
184+// #GApplication::handle-local-options signal, which is a simpler
185+// alternative to handling some commandline options locally
162 func (x *ApplicationClass) GetLocalCommandLine() func(*Application, []string, int) bool {186 func (x *ApplicationClass) GetLocalCommandLine() func(*Application, []string, int) bool {
163 if x.xLocalCommandLine == 0 {187 if x.xLocalCommandLine == 0 {
164 return nil188 return nil
@@ -171,6 +195,10 @@ func (x *ApplicationClass) GetLocalCommandLine() func(*Application, []string, in
171 }195 }
172 196
173 // OverrideBeforeEmit sets the callback function.197 // OverrideBeforeEmit sets the callback function.
198+// invoked on the primary instance before 'activate', 'open',
199+//
200+// 'command-line' or any action invocation, gets the 'platform data' from
201+// the calling instance
174 func (x *ApplicationClass) OverrideBeforeEmit(cb func(*Application, *glib.Variant)) {202 func (x *ApplicationClass) OverrideBeforeEmit(cb func(*Application, *glib.Variant)) {
175 if cb == nil {203 if cb == nil {
176 x.xBeforeEmit = 0204 x.xBeforeEmit = 0
@@ -182,6 +210,10 @@ func (x *ApplicationClass) OverrideBeforeEmit(cb func(*Application, *glib.Varian
182 }210 }
183 211
184 // GetBeforeEmit gets the callback function.212 // GetBeforeEmit gets the callback function.
213+// invoked on the primary instance before 'activate', 'open',
214+//
215+// 'command-line' or any action invocation, gets the 'platform data' from
216+// the calling instance
185 func (x *ApplicationClass) GetBeforeEmit() func(*Application, *glib.Variant) {217 func (x *ApplicationClass) GetBeforeEmit() func(*Application, *glib.Variant) {
186 if x.xBeforeEmit == 0 {218 if x.xBeforeEmit == 0 {
187 return nil219 return nil
@@ -194,6 +226,10 @@ func (x *ApplicationClass) GetBeforeEmit() func(*Application, *glib.Variant) {
194 }226 }
195 227
196 // OverrideAfterEmit sets the callback function.228 // OverrideAfterEmit sets the callback function.
229+// invoked on the primary instance after 'activate', 'open',
230+//
231+// 'command-line' or any action invocation, gets the 'platform data' from
232+// the calling instance
197 func (x *ApplicationClass) OverrideAfterEmit(cb func(*Application, *glib.Variant)) {233 func (x *ApplicationClass) OverrideAfterEmit(cb func(*Application, *glib.Variant)) {
198 if cb == nil {234 if cb == nil {
199 x.xAfterEmit = 0235 x.xAfterEmit = 0
@@ -205,6 +241,10 @@ func (x *ApplicationClass) OverrideAfterEmit(cb func(*Application, *glib.Variant
205 }241 }
206 242
207 // GetAfterEmit gets the callback function.243 // GetAfterEmit gets the callback function.
244+// invoked on the primary instance after 'activate', 'open',
245+//
246+// 'command-line' or any action invocation, gets the 'platform data' from
247+// the calling instance
208 func (x *ApplicationClass) GetAfterEmit() func(*Application, *glib.Variant) {248 func (x *ApplicationClass) GetAfterEmit() func(*Application, *glib.Variant) {
209 if x.xAfterEmit == 0 {249 if x.xAfterEmit == 0 {
210 return nil250 return nil
@@ -217,6 +257,9 @@ func (x *ApplicationClass) GetAfterEmit() func(*Application, *glib.Variant) {
217 }257 }
218 258
219 // OverrideAddPlatformData sets the callback function.259 // OverrideAddPlatformData sets the callback function.
260+// invoked (locally) to add 'platform data' to be sent to
261+//
262+// the primary instance when activating, opening or invoking actions
220 func (x *ApplicationClass) OverrideAddPlatformData(cb func(*Application, *glib.VariantBuilder)) {263 func (x *ApplicationClass) OverrideAddPlatformData(cb func(*Application, *glib.VariantBuilder)) {
221 if cb == nil {264 if cb == nil {
222 x.xAddPlatformData = 0265 x.xAddPlatformData = 0
@@ -228,6 +271,9 @@ func (x *ApplicationClass) OverrideAddPlatformData(cb func(*Application, *glib.V
228 }271 }
229 272
230 // GetAddPlatformData gets the callback function.273 // GetAddPlatformData gets the callback function.
274+// invoked (locally) to add 'platform data' to be sent to
275+//
276+// the primary instance when activating, opening or invoking actions
231 func (x *ApplicationClass) GetAddPlatformData() func(*Application, *glib.VariantBuilder) {277 func (x *ApplicationClass) GetAddPlatformData() func(*Application, *glib.VariantBuilder) {
232 if x.xAddPlatformData == 0 {278 if x.xAddPlatformData == 0 {
233 return nil279 return nil
@@ -240,6 +286,10 @@ func (x *ApplicationClass) GetAddPlatformData() func(*Application, *glib.Variant
240 }286 }
241 287
242 // OverrideQuitMainloop sets the callback function.288 // OverrideQuitMainloop sets the callback function.
289+// Used to be invoked on the primary instance when the use
290+//
291+// count of the application drops to zero (and after any inactivity
292+// timeout, if requested). Not used anymore since 2.32
243 func (x *ApplicationClass) OverrideQuitMainloop(cb func(*Application)) {293 func (x *ApplicationClass) OverrideQuitMainloop(cb func(*Application)) {
244 if cb == nil {294 if cb == nil {
245 x.xQuitMainloop = 0295 x.xQuitMainloop = 0
@@ -251,6 +301,10 @@ func (x *ApplicationClass) OverrideQuitMainloop(cb func(*Application)) {
251 }301 }
252 302
253 // GetQuitMainloop gets the callback function.303 // GetQuitMainloop gets the callback function.
304+// Used to be invoked on the primary instance when the use
305+//
306+// count of the application drops to zero (and after any inactivity
307+// timeout, if requested). Not used anymore since 2.32
254 func (x *ApplicationClass) GetQuitMainloop() func(*Application) {308 func (x *ApplicationClass) GetQuitMainloop() func(*Application) {
255 if x.xQuitMainloop == 0 {309 if x.xQuitMainloop == 0 {
256 return nil310 return nil
@@ -263,6 +317,11 @@ func (x *ApplicationClass) GetQuitMainloop() func(*Application) {
263 }317 }
264 318
265 // OverrideRunMainloop sets the callback function.319 // OverrideRunMainloop sets the callback function.
320+// Used to be invoked on the primary instance from
321+//
322+// g_application_run() if the use-count is non-zero. Since 2.32,
323+// GApplication is iterating the main context directly and is not
324+// using @run_mainloop anymore
266 func (x *ApplicationClass) OverrideRunMainloop(cb func(*Application)) {325 func (x *ApplicationClass) OverrideRunMainloop(cb func(*Application)) {
267 if cb == nil {326 if cb == nil {
268 x.xRunMainloop = 0327 x.xRunMainloop = 0
@@ -274,6 +333,11 @@ func (x *ApplicationClass) OverrideRunMainloop(cb func(*Application)) {
274 }333 }
275 334
276 // GetRunMainloop gets the callback function.335 // GetRunMainloop gets the callback function.
336+// Used to be invoked on the primary instance from
337+//
338+// g_application_run() if the use-count is non-zero. Since 2.32,
339+// GApplication is iterating the main context directly and is not
340+// using @run_mainloop anymore
277 func (x *ApplicationClass) GetRunMainloop() func(*Application) {341 func (x *ApplicationClass) GetRunMainloop() func(*Application) {
278 if x.xRunMainloop == 0 {342 if x.xRunMainloop == 0 {
279 return nil343 return nil
@@ -286,6 +350,9 @@ func (x *ApplicationClass) GetRunMainloop() func(*Application) {
286 }350 }
287 351
288 // OverrideShutdown sets the callback function.352 // OverrideShutdown sets the callback function.
353+// invoked only on the registered primary instance immediately
354+//
355+// after the main loop terminates
289 func (x *ApplicationClass) OverrideShutdown(cb func(*Application)) {356 func (x *ApplicationClass) OverrideShutdown(cb func(*Application)) {
290 if cb == nil {357 if cb == nil {
291 x.xShutdown = 0358 x.xShutdown = 0
@@ -297,6 +364,9 @@ func (x *ApplicationClass) OverrideShutdown(cb func(*Application)) {
297 }364 }
298 365
299 // GetShutdown gets the callback function.366 // GetShutdown gets the callback function.
367+// invoked only on the registered primary instance immediately
368+//
369+// after the main loop terminates
300 func (x *ApplicationClass) GetShutdown() func(*Application) {370 func (x *ApplicationClass) GetShutdown() func(*Application) {
301 if x.xShutdown == 0 {371 if x.xShutdown == 0 {
302 return nil372 return nil
@@ -309,6 +379,14 @@ func (x *ApplicationClass) GetShutdown() func(*Application) {
309 }379 }
310 380
311 // OverrideDbusRegister sets the callback function.381 // OverrideDbusRegister sets the callback function.
382+// invoked locally during registration, if the application is
383+//
384+// using its D-Bus backend. You can use this to export extra objects on the
385+// bus, that need to exist before the application tries to own the bus name.
386+// The function is passed the #GDBusConnection to to session bus, and the
387+// object path that #GApplication will use to export its D-Bus API.
388+// If this function returns %TRUE, registration will proceed; otherwise
389+// registration will abort. Since: 2.34
312 func (x *ApplicationClass) OverrideDbusRegister(cb func(*Application, *DBusConnection, string) bool) {390 func (x *ApplicationClass) OverrideDbusRegister(cb func(*Application, *DBusConnection, string) bool) {
313 if cb == nil {391 if cb == nil {
314 x.xDbusRegister = 0392 x.xDbusRegister = 0
@@ -320,6 +398,14 @@ func (x *ApplicationClass) OverrideDbusRegister(cb func(*Application, *DBusConne
320 }398 }
321 399
322 // GetDbusRegister gets the callback function.400 // GetDbusRegister gets the callback function.
401+// invoked locally during registration, if the application is
402+//
403+// using its D-Bus backend. You can use this to export extra objects on the
404+// bus, that need to exist before the application tries to own the bus name.
405+// The function is passed the #GDBusConnection to to session bus, and the
406+// object path that #GApplication will use to export its D-Bus API.
407+// If this function returns %TRUE, registration will proceed; otherwise
408+// registration will abort. Since: 2.34
323 func (x *ApplicationClass) GetDbusRegister() func(*Application, *DBusConnection, string) bool {409 func (x *ApplicationClass) GetDbusRegister() func(*Application, *DBusConnection, string) bool {
324 if x.xDbusRegister == 0 {410 if x.xDbusRegister == 0 {
325 return nil411 return nil
@@ -332,6 +418,10 @@ func (x *ApplicationClass) GetDbusRegister() func(*Application, *DBusConnection,
332 }418 }
333 419
334 // OverrideDbusUnregister sets the callback function.420 // OverrideDbusUnregister sets the callback function.
421+// invoked locally during unregistration, if the application
422+//
423+// is using its D-Bus backend. Use this to undo anything done by
424+// the @dbus_register vfunc. Since: 2.34
335 func (x *ApplicationClass) OverrideDbusUnregister(cb func(*Application, *DBusConnection, string)) {425 func (x *ApplicationClass) OverrideDbusUnregister(cb func(*Application, *DBusConnection, string)) {
336 if cb == nil {426 if cb == nil {
337 x.xDbusUnregister = 0427 x.xDbusUnregister = 0
@@ -343,6 +433,10 @@ func (x *ApplicationClass) OverrideDbusUnregister(cb func(*Application, *DBusCon
343 }433 }
344 434
345 // GetDbusUnregister gets the callback function.435 // GetDbusUnregister gets the callback function.
436+// invoked locally during unregistration, if the application
437+//
438+// is using its D-Bus backend. Use this to undo anything done by
439+// the @dbus_register vfunc. Since: 2.34
346 func (x *ApplicationClass) GetDbusUnregister() func(*Application, *DBusConnection, string) {440 func (x *ApplicationClass) GetDbusUnregister() func(*Application, *DBusConnection, string) {
347 if x.xDbusUnregister == 0 {441 if x.xDbusUnregister == 0 {
348 return nil442 return nil
@@ -355,6 +449,9 @@ func (x *ApplicationClass) GetDbusUnregister() func(*Application, *DBusConnectio
355 }449 }
356 450
357 // OverrideHandleLocalOptions sets the callback function.451 // OverrideHandleLocalOptions sets the callback function.
452+// invoked locally after the parsing of the commandline
453+//
454+// options has occurred. Since: 2.40
358 func (x *ApplicationClass) OverrideHandleLocalOptions(cb func(*Application, *glib.VariantDict) int) {455 func (x *ApplicationClass) OverrideHandleLocalOptions(cb func(*Application, *glib.VariantDict) int) {
359 if cb == nil {456 if cb == nil {
360 x.xHandleLocalOptions = 0457 x.xHandleLocalOptions = 0
@@ -366,6 +463,9 @@ func (x *ApplicationClass) OverrideHandleLocalOptions(cb func(*Application, *gli
366 }463 }
367 464
368 // GetHandleLocalOptions gets the callback function.465 // GetHandleLocalOptions gets the callback function.
466+// invoked locally after the parsing of the commandline
467+//
468+// options has occurred. Since: 2.40
369 func (x *ApplicationClass) GetHandleLocalOptions() func(*Application, *glib.VariantDict) int {469 func (x *ApplicationClass) GetHandleLocalOptions() func(*Application, *glib.VariantDict) int {
370 if x.xHandleLocalOptions == 0 {470 if x.xHandleLocalOptions == 0 {
371 return nil471 return nil
@@ -378,6 +478,7 @@ func (x *ApplicationClass) GetHandleLocalOptions() func(*Application, *glib.Vari
378 }478 }
379 479
380 // OverrideNameLost sets the callback function.480 // OverrideNameLost sets the callback function.
481+// invoked when another instance is taking over the name. Since: 2.60
381 func (x *ApplicationClass) OverrideNameLost(cb func(*Application) bool) {482 func (x *ApplicationClass) OverrideNameLost(cb func(*Application) bool) {
382 if cb == nil {483 if cb == nil {
383 x.xNameLost = 0484 x.xNameLost = 0
@@ -389,6 +490,7 @@ func (x *ApplicationClass) OverrideNameLost(cb func(*Application) bool) {
389 }490 }
390 491
391 // GetNameLost gets the callback function.492 // GetNameLost gets the callback function.
493+// invoked when another instance is taking over the name. Since: 2.60
392 func (x *ApplicationClass) GetNameLost() func(*Application) bool {494 func (x *ApplicationClass) GetNameLost() func(*Application) bool {
393 if x.xNameLost == 0 {495 if x.xNameLost == 0 {
394 return nil496 return nil
@@ -408,20 +510,23 @@ func (x *ApplicationPrivate) GoPointer() uintptr {
408 return uintptr(unsafe.Pointer(x))510 return uintptr(unsafe.Pointer(x))
409 }511 }
410 512
411-// A #GApplication is the foundation of an application. It wraps some513+// `GApplication` is the core class for application support.
514+//
515+// A `GApplication` is the foundation of an application. It wraps some
412 // low-level platform-specific services and is intended to act as the516 // low-level platform-specific services and is intended to act as the
413 // foundation for higher-level application classes such as517 // foundation for higher-level application classes such as
414-// #GtkApplication or #MxApplication. In general, you should not use518+// `GtkApplication` or `MxApplication`. In general, you should not use
415 // this class outside of a higher level framework.519 // this class outside of a higher level framework.
416 //520 //
417-// GApplication provides convenient life cycle management by maintaining521+// `GApplication` provides convenient life-cycle management by maintaining
418 // a "use count" for the primary application instance. The use count can522 // a "use count" for the primary application instance. The use count can
419-// be changed using g_application_hold() and g_application_release(). If523+// be changed using [method@Gio.Application.hold] and
420-// it drops to zero, the application exits. Higher-level classes such as524+// [method@Gio.Application.release]. If it drops to zero, the application
421-// #GtkApplication employ the use count to ensure that the application525+// exits. Higher-level classes such as `GtkApplication` employ the use count
422-// stays alive as long as it has any opened windows.526+// to ensure that the application stays alive as long as it has any opened
527+// windows.
423 //528 //
424-// Another feature that GApplication (optionally) provides is process529+// Another feature that `GApplication` (optionally) provides is process
425 // uniqueness. Applications can make use of this functionality by530 // uniqueness. Applications can make use of this functionality by
426 // providing a unique application ID. If given, only one application531 // providing a unique application ID. If given, only one application
427 // with this ID can be running at a time per session. The session532 // with this ID can be running at a time per session. The session
@@ -433,49 +538,54 @@ func (x *ApplicationPrivate) GoPointer() uintptr {
433 // always the current instance. On Linux, the D-Bus session bus538 // always the current instance. On Linux, the D-Bus session bus
434 // is used for communication.539 // is used for communication.
435 //540 //
436-// The use of #GApplication differs from some other commonly-used541+// The use of `GApplication` differs from some other commonly-used
437 // uniqueness libraries (such as libunique) in important ways. The542 // uniqueness libraries (such as libunique) in important ways. The
438 // application is not expected to manually register itself and check543 // application is not expected to manually register itself and check
439 // if it is the primary instance. Instead, the main() function of a544 // if it is the primary instance. Instead, the main() function of a
440-// #GApplication should do very little more than instantiating the545+// `GApplication` should do very little more than instantiating the
441 // application instance, possibly connecting signal handlers, then546 // application instance, possibly connecting signal handlers, then
442-// calling g_application_run(). All checks for uniqueness are done547+// calling [method@Gio.Application.run]. All checks for uniqueness are done
443 // internally. If the application is the primary instance then the548 // internally. If the application is the primary instance then the
444 // startup signal is emitted and the mainloop runs. If the application549 // startup signal is emitted and the mainloop runs. If the application
445 // is not the primary instance then a signal is sent to the primary550 // is not the primary instance then a signal is sent to the primary
446-// instance and g_application_run() promptly returns. See the code551+// instance and [method@Gio.Application.run] promptly returns. See the code
447 // examples below.552 // examples below.
448 //553 //
449-// If used, the expected form of an application identifier is the same as554+// If used, the expected form of an application identifier is the
450-// that of of a555+// same as that of a
451 // [D-Bus well-known bus name](https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus).556 // [D-Bus well-known bus name](https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus).
452 // Examples include: `com.example.MyApp`, `org.example.internal_apps.Calculator`,557 // Examples include: `com.example.MyApp`, `org.example.internal_apps.Calculator`,
453 // `org._7_zip.Archiver`.558 // `org._7_zip.Archiver`.
454-// For details on valid application identifiers, see g_application_id_is_valid().559+// For details on valid application identifiers, see [func@Gio.Application.id_is_valid].
455 //560 //
456 // On Linux, the application identifier is claimed as a well-known bus name561 // On Linux, the application identifier is claimed as a well-known bus name
457-// on the user's session bus. This means that the uniqueness of your562+// on the user's session bus. This means that the uniqueness of your
458-// application is scoped to the current session. It also means that your563+// application is scoped to the current session. It also means that your
459 // application may provide additional services (through registration of other564 // application may provide additional services (through registration of other
460-// object paths) at that bus name. The registration of these object paths565+// object paths) at that bus name. The registration of these object paths
461-// should be done with the shared GDBus session bus. Note that due to the566+// should be done with the shared GDBus session bus. Note that due to the
462 // internal architecture of GDBus, method calls can be dispatched at any time567 // internal architecture of GDBus, method calls can be dispatched at any time
463-// (even if a main loop is not running). For this reason, you must ensure that568+// (even if a main loop is not running). For this reason, you must ensure that
464 // any object paths that you wish to register are registered before #GApplication569 // any object paths that you wish to register are registered before #GApplication
465 // attempts to acquire the bus name of your application (which happens in570 // attempts to acquire the bus name of your application (which happens in
466-// g_application_register()). Unfortunately, this means that you cannot use571+// [method@Gio.Application.register]). Unfortunately, this means that you cannot
467-// g_application_get_is_remote() to decide if you want to register object paths.572+// use [property@Gio.Application:is-remote] to decide if you want to register
573+// object paths.
468 //574 //
469-// GApplication also implements the #GActionGroup and #GActionMap575+// `GApplication` also implements the [iface@Gio.ActionGroup] and [iface@Gio.ActionMap]
470 // interfaces and lets you easily export actions by adding them with576 // interfaces and lets you easily export actions by adding them with
471-// g_action_map_add_action(). When invoking an action by calling577+// [method@Gio.ActionMap.add_action]. When invoking an action by calling
472-// g_action_group_activate_action() on the application, it is always578+// [method@Gio.ActionGroup.activate_action] on the application, it is always
473 // invoked in the primary instance. The actions are also exported on579 // invoked in the primary instance. The actions are also exported on
474-// the session bus, and GIO provides the #GDBusActionGroup wrapper to580+// the session bus, and GIO provides the [class@Gio.DBusActionGroup] wrapper to
475-// conveniently access them remotely. GIO provides a #GDBusMenuModel wrapper581+// conveniently access them remotely. GIO provides a [class@Gio.DBusMenuModel] wrapper
476-// for remote access to exported #GMenuModels.582+// for remote access to exported [class@Gio.MenuModel]s.
583+//
584+// Note: Due to the fact that actions are exported on the session bus,
585+// using `maybe` parameters is not supported, since D-Bus does not support
586+// `maybe` types.
477 //587 //
478-// There is a number of different entry points into a GApplication:588+// There is a number of different entry points into a `GApplication`:
479 //589 //
480 // - via 'Activate' (i.e. just starting the application)590 // - via 'Activate' (i.e. just starting the application)
481 //591 //
@@ -485,42 +595,43 @@ func (x *ApplicationPrivate) GoPointer() uintptr {
485 //595 //
486 // - via activating an action596 // - via activating an action
487 //597 //
488-// The #GApplication::startup signal lets you handle the application598+// The [signal@Gio.Application::startup] signal lets you handle the application
489 // initialization for all of these in a single place.599 // initialization for all of these in a single place.
490 //600 //
491 // Regardless of which of these entry points is used to start the601 // Regardless of which of these entry points is used to start the
492-// application, GApplication passes some ‘platform data’ from the602+// application, `GApplication` passes some ‘platform data’ from the
493 // launching instance to the primary instance, in the form of a603 // launching instance to the primary instance, in the form of a
494-// #GVariant dictionary mapping strings to variants. To use platform604+// [struct@GLib.Variant] dictionary mapping strings to variants. To use platform
495-// data, override the @before_emit or @after_emit virtual functions605+// data, override the [vfunc@Gio.Application.before_emit] or
496-// in your #GApplication subclass. When dealing with606+// [vfunc@Gio.Application.after_emit] virtual functions
497-// #GApplicationCommandLine objects, the platform data is607+// in your `GApplication` subclass. When dealing with
498-// directly available via g_application_command_line_get_cwd(),608+// [class@Gio.ApplicationCommandLine] objects, the platform data is
499-// g_application_command_line_get_environ() and609+// directly available via [method@Gio.ApplicationCommandLine.get_cwd],
500-// g_application_command_line_get_platform_data().610+// [method@Gio.ApplicationCommandLine.get_environ] and
611+// [method@Gio.ApplicationCommandLine.get_platform_data].
501 //612 //
502 // As the name indicates, the platform data may vary depending on the613 // As the name indicates, the platform data may vary depending on the
503 // operating system, but it always includes the current directory (key614 // operating system, but it always includes the current directory (key
504-// "cwd"), and optionally the environment (ie the set of environment615+// `cwd`), and optionally the environment (ie the set of environment
505-// variables and their values) of the calling process (key "environ").616+// variables and their values) of the calling process (key `environ`).
506 // The environment is only added to the platform data if the617 // The environment is only added to the platform data if the
507-// %G_APPLICATION_SEND_ENVIRONMENT flag is set. #GApplication subclasses618+// `G_APPLICATION_SEND_ENVIRONMENT` flag is set. `GApplication` subclasses
508-// can add their own platform data by overriding the @add_platform_data619+// can add their own platform data by overriding the
509-// virtual function. For instance, #GtkApplication adds startup notification620+// [vfunc@Gio.Application.add_platform_data] virtual function. For instance,
510-// data in this way.621+// `GtkApplication` adds startup notification data in this way.
511 //622 //
512 // To parse commandline arguments you may handle the623 // To parse commandline arguments you may handle the
513-// #GApplication::command-line signal or override the local_command_line()624+// [signal@Gio.Application::command-line] signal or override the
514-// vfunc, to parse them in either the primary instance or the local instance,625+// [vfunc@Gio.Application.local_command_line] virtual function, to parse them in
515-// respectively.626+// either the primary instance or the local instance, respectively.
516 //627 //
517-// For an example of opening files with a GApplication, see628+// For an example of opening files with a `GApplication`, see
518 // [gapplication-example-open.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gapplication-example-open.c).629 // [gapplication-example-open.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gapplication-example-open.c).
519 //630 //
520-// For an example of using actions with GApplication, see631+// For an example of using actions with `GApplication`, see
521 // [gapplication-example-actions.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gapplication-example-actions.c).632 // [gapplication-example-actions.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gapplication-example-actions.c).
522 //633 //
523-// For an example of using extra D-Bus hooks with GApplication, see634+// For an example of using extra D-Bus hooks with `GApplication`, see
524 // [gapplication-example-dbushooks.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gapplication-example-dbushooks.c).635 // [gapplication-example-dbushooks.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gapplication-example-dbushooks.c).
525 type Application struct {636 type Application struct {
526 gobject.Object637 gobject.Object
@@ -613,6 +724,8 @@ var xApplicationAddMainOptionEntries func(uintptr, []glib.OptionEntry)
613 // inspected and modified. If %G_APPLICATION_HANDLES_COMMAND_LINE is724 // inspected and modified. If %G_APPLICATION_HANDLES_COMMAND_LINE is
614 // set, then the resulting dictionary is sent to the primary instance,725 // set, then the resulting dictionary is sent to the primary instance,
615 // where g_application_command_line_get_options_dict() will return it.726 // where g_application_command_line_get_options_dict() will return it.
727+// As it has been passed outside the process at this point, the types of all
728+// values in the options dict must be checked before being used.
616 // This "packing" is done according to the type of the argument --729 // This "packing" is done according to the type of the argument --
617 // booleans for normal flags, strings for strings, bytestrings for730 // booleans for normal flags, strings for strings, bytestrings for
618 // filenames, etc. The packing only occurs if the flag is given (ie: we731 // filenames, etc. The packing only occurs if the flag is given (ie: we
@@ -629,8 +742,8 @@ var xApplicationAddMainOptionEntries func(uintptr, []glib.OptionEntry)
629 // was to send all of the commandline arguments (options and all) to the742 // was to send all of the commandline arguments (options and all) to the
630 // primary instance for handling. #GApplication ignored them completely743 // primary instance for handling. #GApplication ignored them completely
631 // on the local side. Calling this function "opts in" to the new744 // on the local side. Calling this function "opts in" to the new
632-// behaviour, and in particular, means that unrecognised options will be745+// behaviour, and in particular, means that unrecognized options will be
633-// treated as errors. Unrecognised options have never been ignored when746+// treated as errors. Unrecognized options have never been ignored when
634 // %G_APPLICATION_HANDLES_COMMAND_LINE is unset.747 // %G_APPLICATION_HANDLES_COMMAND_LINE is unset.
635 //748 //
636 // If #GApplication::handle-local-options needs to see the list of749 // If #GApplication::handle-local-options needs to see the list of
@@ -682,7 +795,7 @@ var xApplicationAddOptionGroup func(uintptr, *glib.OptionGroup)
682 //795 //
683 // Calling this function will cause the options in the supplied option796 // Calling this function will cause the options in the supplied option
684 // group to be parsed, but it does not cause you to be "opted in" to the797 // group to be parsed, but it does not cause you to be "opted in" to the
685-// new functionality whereby unrecognised options are rejected even if798+// new functionality whereby unrecognized options are rejected even if
686 // %G_APPLICATION_HANDLES_COMMAND_LINE was given.799 // %G_APPLICATION_HANDLES_COMMAND_LINE was given.
687 func (x *Application) AddOptionGroup(GroupVar *glib.OptionGroup) {800 func (x *Application) AddOptionGroup(GroupVar *glib.OptionGroup) {
688 801
@@ -838,12 +951,21 @@ func (x *Application) GetResourceBasePath() string {
838 return cret951 return cret
839 }952 }
840 953
954+var xApplicationGetVersion func(uintptr) string
955+
956+// Gets the version of @application.
957+func (x *Application) GetVersion() string {
958+
959+ cret := xApplicationGetVersion(x.GoPointer())
960+ return cret
961+}
962+
841 var xApplicationHold func(uintptr)963 var xApplicationHold func(uintptr)
842 964
843 // Increases the use count of @application.965 // Increases the use count of @application.
844 //966 //
845 // Use this function to indicate that the application has a reason to967 // Use this function to indicate that the application has a reason to
846-// continue to run. For example, g_application_hold() is called by GTK+968+// continue to run. For example, g_application_hold() is called by GTK
847 // when a toplevel window is on the screen.969 // when a toplevel window is on the screen.
848 //970 //
849 // To cancel the hold, call g_application_release().971 // To cancel the hold, call g_application_release().
@@ -1079,11 +1201,14 @@ var xApplicationSendNotification func(uintptr, string, uintptr)
1079 // notification. This works even for notifications sent from a previous1201 // notification. This works even for notifications sent from a previous
1080 // execution of the application, as long as @id is the same string.1202 // execution of the application, as long as @id is the same string.
1081 //1203 //
1082-// @id may be %NULL, but it is impossible to replace or withdraw1204+// @id may be `NULL`, but it is impossible to replace or withdraw
1083 // notifications without an id.1205 // notifications without an id.
1084 //1206 //
1085 // If @notification is no longer relevant, it can be withdrawn with1207 // If @notification is no longer relevant, it can be withdrawn with
1086-// g_application_withdraw_notification().1208+// [method@Gio.Application.withdraw_notification].
1209+//
1210+// It is an error to call this function if @application has no
1211+// application ID.
1087 func (x *Application) SendNotification(IdVar string, NotificationVar *Notification) {1212 func (x *Application) SendNotification(IdVar string, NotificationVar *Notification) {
1088 1213
1089 xApplicationSendNotification(x.GoPointer(), IdVar, NotificationVar.GoPointer())1214 xApplicationSendNotification(x.GoPointer(), IdVar, NotificationVar.GoPointer())
@@ -1199,10 +1324,10 @@ var xApplicationSetResourceBasePath func(uintptr, string)
1199 1324
1200 // Sets (or unsets) the base resource path of @application.1325 // Sets (or unsets) the base resource path of @application.
1201 //1326 //
1202-// The path is used to automatically load various [application1327+// The path is used to automatically load various
1203-// resources][gresource] such as menu layouts and action descriptions.1328+// [application resources][struct@Gio.Resource] such as menu layouts and
1204-// The various types of resources will be found at fixed names relative1329+// action descriptions. The various types of resources will be found at
1205-// to the given base path.1330+// fixed names relative to the given base path.
1206 //1331 //
1207 // By default, the resource base path is determined from the application1332 // By default, the resource base path is determined from the application
1208 // ID by prefixing '/' and replacing each '.' with '/'. This is done at1333 // ID by prefixing '/' and replacing each '.' with '/'. This is done at
@@ -1236,6 +1361,19 @@ func (x *Application) SetResourceBasePath(ResourcePathVar string) {
1236 1361
1237 }1362 }
1238 1363
1364+var xApplicationSetVersion func(uintptr, string)
1365+
1366+// Sets the version number of @application. This will be used to implement
1367+// a `--version` command line argument
1368+//
1369+// The application version can only be modified if @application has not yet
1370+// been registered.
1371+func (x *Application) SetVersion(VersionVar string) {
1372+
1373+ xApplicationSetVersion(x.GoPointer(), VersionVar)
1374+
1375+}
1376+
1239 var xApplicationUnbindBusyProperty func(uintptr, uintptr, string)1377 var xApplicationUnbindBusyProperty func(uintptr, uintptr, string)
1240 1378
1241 // Destroys a binding between @property and the busy state of1379 // Destroys a binding between @property and the busy state of
@@ -1484,36 +1622,36 @@ func (x *Application) ConnectStartup(cb *func(Application)) uint32 {
1484 return gobject.SignalConnect(x.GoPointer(), "startup", cbRefPtr)1622 return gobject.SignalConnect(x.GoPointer(), "startup", cbRefPtr)
1485 }1623 }
1486 1624
1487-// Emits the #GActionGroup::action-added signal on @action_group.1625+// Emits the [signal@Gio.ActionGroup::action-added] signal on @action_group.
1488 //1626 //
1489-// This function should only be called by #GActionGroup implementations.1627+// This function should only be called by [type@Gio.ActionGroup] implementations.
1490 func (x *Application) ActionAdded(ActionNameVar string) {1628 func (x *Application) ActionAdded(ActionNameVar string) {
1491 1629
1492 XGActionGroupActionAdded(x.GoPointer(), ActionNameVar)1630 XGActionGroupActionAdded(x.GoPointer(), ActionNameVar)
1493 1631
1494 }1632 }
1495 1633
1496-// Emits the #GActionGroup::action-enabled-changed signal on @action_group.1634+// Emits the [signal@Gio.ActionGroup::action-enabled-changed] signal on @action_group.
1497 //1635 //
1498-// This function should only be called by #GActionGroup implementations.1636+// This function should only be called by [type@Gio.ActionGroup] implementations.
1499 func (x *Application) ActionEnabledChanged(ActionNameVar string, EnabledVar bool) {1637 func (x *Application) ActionEnabledChanged(ActionNameVar string, EnabledVar bool) {
1500 1638
1501 XGActionGroupActionEnabledChanged(x.GoPointer(), ActionNameVar, EnabledVar)1639 XGActionGroupActionEnabledChanged(x.GoPointer(), ActionNameVar, EnabledVar)
1502 1640
1503 }1641 }
1504 1642
1505-// Emits the #GActionGroup::action-removed signal on @action_group.1643+// Emits the [signal@Gio.ActionGroup::action-removed] signal on @action_group.
1506 //1644 //
1507-// This function should only be called by #GActionGroup implementations.1645+// This function should only be called by [type@Gio.ActionGroup] implementations.
1508 func (x *Application) ActionRemoved(ActionNameVar string) {1646 func (x *Application) ActionRemoved(ActionNameVar string) {
1509 1647
1510 XGActionGroupActionRemoved(x.GoPointer(), ActionNameVar)1648 XGActionGroupActionRemoved(x.GoPointer(), ActionNameVar)
1511 1649
1512 }1650 }
1513 1651
1514-// Emits the #GActionGroup::action-state-changed signal on @action_group.1652+// Emits the [signal@Gio.ActionGroup::action-state-changed] signal on @action_group.
1515 //1653 //
1516-// This function should only be called by #GActionGroup implementations.1654+// This function should only be called by [type@Gio.ActionGroup] implementations.
1517 func (x *Application) ActionStateChanged(ActionNameVar string, StateVar *glib.Variant) {1655 func (x *Application) ActionStateChanged(ActionNameVar string, StateVar *glib.Variant) {
1518 1656
1519 XGActionGroupActionStateChanged(x.GoPointer(), ActionNameVar, StateVar)1657 XGActionGroupActionStateChanged(x.GoPointer(), ActionNameVar, StateVar)
@@ -1524,35 +1662,35 @@ func (x *Application) ActionStateChanged(ActionNameVar string, StateVar *glib.Va
1524 //1662 //
1525 // If the action is expecting a parameter, then the correct type of1663 // If the action is expecting a parameter, then the correct type of
1526 // parameter must be given as @parameter. If the action is expecting no1664 // parameter must be given as @parameter. If the action is expecting no
1527-// parameters then @parameter must be %NULL. See1665+// parameters then @parameter must be `NULL`. See
1528-// g_action_group_get_action_parameter_type().1666+// [method@Gio.ActionGroup.get_action_parameter_type].
1529 //1667 //
1530-// If the #GActionGroup implementation supports asynchronous remote1668+// If the [type@Gio.ActionGroup] implementation supports asynchronous remote
1531 // activation over D-Bus, this call may return before the relevant1669 // activation over D-Bus, this call may return before the relevant
1532 // D-Bus traffic has been sent, or any replies have been received. In1670 // D-Bus traffic has been sent, or any replies have been received. In
1533 // order to block on such asynchronous activation calls,1671 // order to block on such asynchronous activation calls,
1534-// g_dbus_connection_flush() should be called prior to the code, which1672+// [method@Gio.DBusConnection.flush] should be called prior to the code, which
1535 // depends on the result of the action activation. Without flushing1673 // depends on the result of the action activation. Without flushing
1536 // the D-Bus connection, there is no guarantee that the action would1674 // the D-Bus connection, there is no guarantee that the action would
1537 // have been activated.1675 // have been activated.
1538 //1676 //
1539 // The following code which runs in a remote app instance, shows an1677 // The following code which runs in a remote app instance, shows an
1540-// example of a "quit" action being activated on the primary app1678+// example of a ‘quit’ action being activated on the primary app
1541-// instance over D-Bus. Here g_dbus_connection_flush() is called1679+// instance over D-Bus. Here [method@Gio.DBusConnection.flush] is called
1542-// before `exit()`. Without g_dbus_connection_flush(), the "quit" action1680+// before `exit()`. Without `g_dbus_connection_flush()`, the ‘quit’ action
1543 // may fail to be activated on the primary instance.1681 // may fail to be activated on the primary instance.
1544 //1682 //
1545-// |[<!-- language="C" -->1683+// ```c
1546-// // call "quit" action on primary instance1684+// // call ‘quit’ action on primary instance
1547 // g_action_group_activate_action (G_ACTION_GROUP (app), "quit", NULL);1685 // g_action_group_activate_action (G_ACTION_GROUP (app), "quit", NULL);
1548 //1686 //
1549 // // make sure the action is activated now1687 // // make sure the action is activated now
1550-// g_dbus_connection_flush (...);1688+// g_dbus_connection_flush (…);
1551 //1689 //
1552-// g_debug ("application has been terminated. exiting.");1690+// g_debug ("Application has been terminated. Exiting.");
1553 //1691 //
1554 // exit (0);1692 // exit (0);
1555-// ]|1693+// ```
1556 func (x *Application) ActivateAction(ActionNameVar string, ParameterVar *glib.Variant) {1694 func (x *Application) ActivateAction(ActionNameVar string, ParameterVar *glib.Variant) {
1557 1695
1558 XGActionGroupActivateAction(x.GoPointer(), ActionNameVar, ParameterVar)1696 XGActionGroupActivateAction(x.GoPointer(), ActionNameVar, ParameterVar)
@@ -1563,11 +1701,11 @@ func (x *Application) ActivateAction(ActionNameVar string, ParameterVar *glib.Va
1563 // changed to @value.1701 // changed to @value.
1564 //1702 //
1565 // The action must be stateful and @value must be of the correct type.1703 // The action must be stateful and @value must be of the correct type.
1566-// See g_action_group_get_action_state_type().1704+// See [method@Gio.ActionGroup.get_action_state_type].
1567 //1705 //
1568 // This call merely requests a change. The action may refuse to change1706 // This call merely requests a change. The action may refuse to change
1569 // its state or may change its state to something other than @value.1707 // its state or may change its state to something other than @value.
1570-// See g_action_group_get_action_state_hint().1708+// See [method@Gio.ActionGroup.get_action_state_hint].
1571 //1709 //
1572 // If the @value GVariant is floating, it is consumed.1710 // If the @value GVariant is floating, it is consumed.
1573 func (x *Application) ChangeActionState(ActionNameVar string, ValueVar *glib.Variant) {1711 func (x *Application) ChangeActionState(ActionNameVar string, ValueVar *glib.Variant) {
@@ -1589,12 +1727,12 @@ func (x *Application) GetActionEnabled(ActionNameVar string) bool {
1589 // Queries the type of the parameter that must be given when activating1727 // Queries the type of the parameter that must be given when activating
1590 // the named action within @action_group.1728 // the named action within @action_group.
1591 //1729 //
1592-// When activating the action using g_action_group_activate_action(),1730+// When activating the action using [method@Gio.ActionGroup.activate_action],
1593-// the #GVariant given to that function must be of the type returned1731+// the [type@GLib.Variant] given to that function must be of the type returned
1594 // by this function.1732 // by this function.
1595 //1733 //
1596-// In the case that this function returns %NULL, you must not give any1734+// In the case that this function returns `NULL`, you must not give any
1597-// #GVariant, but %NULL instead.1735+// [type@GLib.Variant], but `NULL` instead.
1598 //1736 //
1599 // The parameter type of a particular action will never change but it is1737 // The parameter type of a particular action will never change but it is
1600 // possible for an action to be removed and for a new action to be added1738 // possible for an action to be removed and for a new action to be added
@@ -1607,12 +1745,12 @@ func (x *Application) GetActionParameterType(ActionNameVar string) *glib.Variant
1607 1745
1608 // Queries the current state of the named action within @action_group.1746 // Queries the current state of the named action within @action_group.
1609 //1747 //
1610-// If the action is not stateful then %NULL will be returned. If the1748+// If the action is not stateful then `NULL` will be returned. If the
1611 // action is stateful then the type of the return value is the type1749 // action is stateful then the type of the return value is the type
1612-// given by g_action_group_get_action_state_type().1750+// given by [method@Gio.ActionGroup.get_action_state_type].
1613 //1751 //
1614-// The return value (if non-%NULL) should be freed with1752+// The return value (if non-`NULL`) should be freed with
1615-// g_variant_unref() when it is no longer required.1753+// [method@GLib.Variant.unref] when it is no longer required.
1616 func (x *Application) GetActionState(ActionNameVar string) *glib.Variant {1754 func (x *Application) GetActionState(ActionNameVar string) *glib.Variant {
1617 1755
1618 cret := XGActionGroupGetActionState(x.GoPointer(), ActionNameVar)1756 cret := XGActionGroupGetActionState(x.GoPointer(), ActionNameVar)
@@ -1622,12 +1760,12 @@ func (x *Application) GetActionState(ActionNameVar string) *glib.Variant {
1622 // Requests a hint about the valid range of values for the state of the1760 // Requests a hint about the valid range of values for the state of the
1623 // named action within @action_group.1761 // named action within @action_group.
1624 //1762 //
1625-// If %NULL is returned it either means that the action is not stateful1763+// If `NULL` is returned it either means that the action is not stateful
1626 // or that there is no hint about the valid range of values for the1764 // or that there is no hint about the valid range of values for the
1627 // state of the action.1765 // state of the action.
1628 //1766 //
1629-// If a #GVariant array is returned then each item in the array is a1767+// If a [type@GLib.Variant] array is returned then each item in the array is a
1630-// possible value for the state. If a #GVariant pair (ie: two-tuple) is1768+// possible value for the state. If a [type@GLib.Variant] pair (ie: two-tuple) is
1631 // returned then the tuple specifies the inclusive lower and upper bound1769 // returned then the tuple specifies the inclusive lower and upper bound
1632 // of valid values for the state.1770 // of valid values for the state.
1633 //1771 //
@@ -1635,8 +1773,8 @@ func (x *Application) GetActionState(ActionNameVar string) *glib.Variant {
1635 // have a state value outside of the hinted range and setting a value1773 // have a state value outside of the hinted range and setting a value
1636 // within the range may fail.1774 // within the range may fail.
1637 //1775 //
1638-// The return value (if non-%NULL) should be freed with1776+// The return value (if non-`NULL`) should be freed with
1639-// g_variant_unref() when it is no longer required.1777+// [method@GLib.Variant.unref] when it is no longer required.
1640 func (x *Application) GetActionStateHint(ActionNameVar string) *glib.Variant {1778 func (x *Application) GetActionStateHint(ActionNameVar string) *glib.Variant {
1641 1779
1642 cret := XGActionGroupGetActionStateHint(x.GoPointer(), ActionNameVar)1780 cret := XGActionGroupGetActionStateHint(x.GoPointer(), ActionNameVar)
@@ -1647,14 +1785,14 @@ func (x *Application) GetActionStateHint(ActionNameVar string) *glib.Variant {
1647 // @action_group.1785 // @action_group.
1648 //1786 //
1649 // If the action is stateful then this function returns the1787 // If the action is stateful then this function returns the
1650-// #GVariantType of the state. All calls to1788+// [type@GLib.VariantType] of the state. All calls to
1651-// g_action_group_change_action_state() must give a #GVariant of this1789+// [method@Gio.ActionGroup.change_action_state] must give a [type@GLib.Variant] of this
1652-// type and g_action_group_get_action_state() will return a #GVariant1790+// type and [method@Gio.ActionGroup.get_action_state] will return a [type@GLib.Variant]
1653 // of the same type.1791 // of the same type.
1654 //1792 //
1655-// If the action is not stateful then this function will return %NULL.1793+// If the action is not stateful then this function will return `NULL`.
1656-// In that case, g_action_group_get_action_state() will return %NULL1794+// In that case, [method@Gio.ActionGroup.get_action_state] will return `NULL`
1657-// and you must not call g_action_group_change_action_state().1795+// and you must not call [method@Gio.ActionGroup.change_action_state].
1658 //1796 //
1659 // The state type of a particular action will never change but it is1797 // The state type of a particular action will never change but it is
1660 // possible for an action to be removed and for a new action to be added1798 // possible for an action to be removed and for a new action to be added
@@ -1674,7 +1812,7 @@ func (x *Application) HasAction(ActionNameVar string) bool {
1674 1812
1675 // Lists the actions contained within @action_group.1813 // Lists the actions contained within @action_group.
1676 //1814 //
1677-// The caller is responsible for freeing the list with g_strfreev() when1815+// The caller is responsible for freeing the list with [func@GLib.strfreev] when
1678 // it is no longer required.1816 // it is no longer required.
1679 func (x *Application) ListActions() []string {1817 func (x *Application) ListActions() []string {
1680 1818
@@ -1685,18 +1823,18 @@ func (x *Application) ListActions() []string {
1685 // Queries all aspects of the named action within an @action_group.1823 // Queries all aspects of the named action within an @action_group.
1686 //1824 //
1687 // This function acquires the information available from1825 // This function acquires the information available from
1688-// g_action_group_has_action(), g_action_group_get_action_enabled(),1826+// [method@Gio.ActionGroup.has_action], [method@Gio.ActionGroup.get_action_enabled],
1689-// g_action_group_get_action_parameter_type(),1827+// [method@Gio.ActionGroup.get_action_parameter_type],
1690-// g_action_group_get_action_state_type(),1828+// [method@Gio.ActionGroup.get_action_state_type],
1691-// g_action_group_get_action_state_hint() and1829+// [method@Gio.ActionGroup.get_action_state_hint] and
1692-// g_action_group_get_action_state() with a single function call.1830+// [method@Gio.ActionGroup.get_action_state] with a single function call.
1693 //1831 //
1694 // This provides two main benefits.1832 // This provides two main benefits.
1695 //1833 //
1696 // The first is the improvement in efficiency that comes with not having1834 // The first is the improvement in efficiency that comes with not having
1697 // to perform repeated lookups of the action in order to discover1835 // to perform repeated lookups of the action in order to discover
1698 // different things about it. The second is that implementing1836 // different things about it. The second is that implementing
1699-// #GActionGroup can now be done by only overriding this one virtual1837+// [type@Gio.ActionGroup] can now be done by only overriding this one virtual
1700 // function.1838 // function.
1701 //1839 //
1702 // The interface provides a default implementation of this function that1840 // The interface provides a default implementation of this function that
@@ -1705,9 +1843,9 @@ func (x *Application) ListActions() []string {
1705 // those functions that call this function. All implementations,1843 // those functions that call this function. All implementations,
1706 // therefore, must override either this function or all of the others.1844 // therefore, must override either this function or all of the others.
1707 //1845 //
1708-// If the action exists, %TRUE is returned and any of the requested1846+// If the action exists, `TRUE` is returned and any of the requested
1709-// fields (as indicated by having a non-%NULL reference passed in) are1847+// fields (as indicated by having a non-`NULL` reference passed in) are
1710-// filled. If the action doesn't exist, %FALSE is returned and the1848+// filled. If the action doesn’t exist, `FALSE` is returned and the
1711 // fields may or may not have been modified.1849 // fields may or may not have been modified.
1712 func (x *Application) QueryAction(ActionNameVar string, EnabledVar bool, ParameterTypeVar **glib.VariantType, StateTypeVar **glib.VariantType, StateHintVar **glib.Variant, StateVar **glib.Variant) bool {1850 func (x *Application) QueryAction(ActionNameVar string, EnabledVar bool, ParameterTypeVar **glib.VariantType, StateTypeVar **glib.VariantType, StateHintVar **glib.Variant, StateVar **glib.Variant) bool {
1713 1851
@@ -1727,12 +1865,12 @@ func (x *Application) AddAction(ActionVar Action) {
1727 1865
1728 }1866 }
1729 1867
1730-// A convenience function for creating multiple #GSimpleAction instances1868+// A convenience function for creating multiple [class@Gio.SimpleAction]
1731-// and adding them to a #GActionMap.1869+// instances and adding them to a [iface@Gio.ActionMap].
1732 //1870 //
1733-// Each action is constructed as per one #GActionEntry.1871+// Each action is constructed as per one [struct@Gio.ActionEntry].
1734 //1872 //
1735-// |[<!-- language="C" -->1873+// ```c
1736 // static void1874 // static void
1737 // activate_quit (GSimpleAction *simple,1875 // activate_quit (GSimpleAction *simple,
1738 //1876 //
@@ -1769,7 +1907,7 @@ func (x *Application) AddAction(ActionVar Action) {
1769 // return G_ACTION_GROUP (group);1907 // return G_ACTION_GROUP (group);
1770 // }1908 // }
1771 //1909 //
1772-// ]|1910+// ```
1773 func (x *Application) AddActionEntries(EntriesVar []ActionEntry, NEntriesVar int, UserDataVar uintptr) {1911 func (x *Application) AddActionEntries(EntriesVar []ActionEntry, NEntriesVar int, UserDataVar uintptr) {
1774 1912
1775 XGActionMapAddActionEntries(x.GoPointer(), EntriesVar, NEntriesVar, UserDataVar)1913 XGActionMapAddActionEntries(x.GoPointer(), EntriesVar, NEntriesVar, UserDataVar)
@@ -1778,7 +1916,7 @@ func (x *Application) AddActionEntries(EntriesVar []ActionEntry, NEntriesVar int
1778 1916
1779 // Looks up the action with the name @action_name in @action_map.1917 // Looks up the action with the name @action_name in @action_map.
1780 //1918 //
1781-// If no such action exists, returns %NULL.1919+// If no such action exists, returns `NULL`.
1782 func (x *Application) LookupAction(ActionNameVar string) *ActionBase {1920 func (x *Application) LookupAction(ActionNameVar string) *ActionBase {
1783 var cls *ActionBase1921 var cls *ActionBase
1784 1922
@@ -1802,6 +1940,37 @@ func (x *Application) RemoveAction(ActionNameVar string) {
1802 1940
1803 }1941 }
1804 1942
1943+// Remove actions from a [iface@Gio.ActionMap]. This is meant as the reverse of
1944+// [method@Gio.ActionMap.add_action_entries].
1945+//
1946+// ```c
1947+//
1948+// static const GActionEntry entries[] = {
1949+// { "quit", activate_quit },
1950+// { "print-string", activate_print_string, "s" }
1951+// };
1952+//
1953+// void
1954+// add_actions (GActionMap *map)
1955+//
1956+// {
1957+// g_action_map_add_action_entries (map, entries, G_N_ELEMENTS (entries), NULL);
1958+// }
1959+//
1960+// void
1961+// remove_actions (GActionMap *map)
1962+//
1963+// {
1964+// g_action_map_remove_action_entries (map, entries, G_N_ELEMENTS (entries));
1965+// }
1966+//
1967+// ```
1968+func (x *Application) RemoveActionEntries(EntriesVar []ActionEntry, NEntriesVar int) {
1969+
1970+ XGActionMapRemoveActionEntries(x.GoPointer(), EntriesVar, NEntriesVar)
1971+
1972+}
1973+
1805 var xApplicationGetDefault func() uintptr1974 var xApplicationGetDefault func() uintptr
1806 1975
1807 // Returns the default #GApplication instance for this process.1976 // Returns the default #GApplication instance for this process.
@@ -1904,6 +2073,7 @@ func init() {
1904 core.PuregoSafeRegister(&xApplicationGetIsRegistered, lib, "g_application_get_is_registered")2073 core.PuregoSafeRegister(&xApplicationGetIsRegistered, lib, "g_application_get_is_registered")
1905 core.PuregoSafeRegister(&xApplicationGetIsRemote, lib, "g_application_get_is_remote")2074 core.PuregoSafeRegister(&xApplicationGetIsRemote, lib, "g_application_get_is_remote")
1906 core.PuregoSafeRegister(&xApplicationGetResourceBasePath, lib, "g_application_get_resource_base_path")2075 core.PuregoSafeRegister(&xApplicationGetResourceBasePath, lib, "g_application_get_resource_base_path")
2076+ core.PuregoSafeRegister(&xApplicationGetVersion, lib, "g_application_get_version")
1907 core.PuregoSafeRegister(&xApplicationHold, lib, "g_application_hold")2077 core.PuregoSafeRegister(&xApplicationHold, lib, "g_application_hold")
1908 core.PuregoSafeRegister(&xApplicationMarkBusy, lib, "g_application_mark_busy")2078 core.PuregoSafeRegister(&xApplicationMarkBusy, lib, "g_application_mark_busy")
1909 core.PuregoSafeRegister(&xApplicationOpen, lib, "g_application_open")2079 core.PuregoSafeRegister(&xApplicationOpen, lib, "g_application_open")
@@ -1921,6 +2091,7 @@ func init() {
1921 core.PuregoSafeRegister(&xApplicationSetOptionContextParameterString, lib, "g_application_set_option_context_parameter_string")2091 core.PuregoSafeRegister(&xApplicationSetOptionContextParameterString, lib, "g_application_set_option_context_parameter_string")
1922 core.PuregoSafeRegister(&xApplicationSetOptionContextSummary, lib, "g_application_set_option_context_summary")2092 core.PuregoSafeRegister(&xApplicationSetOptionContextSummary, lib, "g_application_set_option_context_summary")
1923 core.PuregoSafeRegister(&xApplicationSetResourceBasePath, lib, "g_application_set_resource_base_path")2093 core.PuregoSafeRegister(&xApplicationSetResourceBasePath, lib, "g_application_set_resource_base_path")
2094+ core.PuregoSafeRegister(&xApplicationSetVersion, lib, "g_application_set_version")
1924 core.PuregoSafeRegister(&xApplicationUnbindBusyProperty, lib, "g_application_unbind_busy_property")2095 core.PuregoSafeRegister(&xApplicationUnbindBusyProperty, lib, "g_application_unbind_busy_property")
1925 core.PuregoSafeRegister(&xApplicationUnmarkBusy, lib, "g_application_unmark_busy")2096 core.PuregoSafeRegister(&xApplicationUnmarkBusy, lib, "g_application_unmark_busy")
1926 core.PuregoSafeRegister(&xApplicationWithdrawNotification, lib, "g_application_withdraw_notification")2097 core.PuregoSafeRegister(&xApplicationWithdrawNotification, lib, "g_application_withdraw_notification")
M v4/gio/gapplicationcommandline.go +122 -28
@@ -25,7 +25,9 @@ type ApplicationCommandLineClass struct {
25 25
26 xGetStdin uintptr26 xGetStdin uintptr
27 27
28- Padding [11]uintptr28+ xDone uintptr
29+
30+ Padding [10]uintptr
29 }31 }
30 32
31 func (x *ApplicationCommandLineClass) GoPointer() uintptr {33 func (x *ApplicationCommandLineClass) GoPointer() uintptr {
@@ -111,6 +113,29 @@ func (x *ApplicationCommandLineClass) GetGetStdin() func(*ApplicationCommandLine
111 }113 }
112 }114 }
113 115
116+// OverrideDone sets the callback function.
117+func (x *ApplicationCommandLineClass) OverrideDone(cb func(*ApplicationCommandLine)) {
118+ if cb == nil {
119+ x.xDone = 0
120+ } else {
121+ x.xDone = purego.NewCallback(func(CmdlineVarp uintptr) {
122+ cb(ApplicationCommandLineNewFromInternalPtr(CmdlineVarp))
123+ })
124+ }
125+}
126+
127+// GetDone gets the callback function.
128+func (x *ApplicationCommandLineClass) GetDone() func(*ApplicationCommandLine) {
129+ if x.xDone == 0 {
130+ return nil
131+ }
132+ var rawCallback func(CmdlineVarp uintptr)
133+ purego.RegisterFunc(&rawCallback, x.xDone)
134+ return func(CmdlineVar *ApplicationCommandLine) {
135+ rawCallback(CmdlineVar.GoPointer())
136+ }
137+}
138+
114 type ApplicationCommandLinePrivate struct {139 type ApplicationCommandLinePrivate struct {
115 _ structs.HostLayout140 _ structs.HostLayout
116 }141 }
@@ -119,30 +144,33 @@ func (x *ApplicationCommandLinePrivate) GoPointer() uintptr {
119 return uintptr(unsafe.Pointer(x))144 return uintptr(unsafe.Pointer(x))
120 }145 }
121 146
122-// #GApplicationCommandLine represents a command-line invocation of147+// `GApplicationCommandLine` represents a command-line invocation of
123-// an application. It is created by #GApplication and emitted148+// an application.
124-// in the #GApplication::command-line signal and virtual function.149+//
150+// It is created by [class@Gio.Application] and emitted
151+// in the [signal@Gio.Application::command-line] signal and virtual function.
125 //152 //
126 // The class contains the list of arguments that the program was invoked153 // The class contains the list of arguments that the program was invoked
127-// with. It is also possible to query if the commandline invocation was154+// with. It is also possible to query if the commandline invocation was
128 // local (ie: the current process is running in direct response to the155 // local (ie: the current process is running in direct response to the
129 // invocation) or remote (ie: some other process forwarded the156 // invocation) or remote (ie: some other process forwarded the
130 // commandline to this process).157 // commandline to this process).
131 //158 //
132-// The GApplicationCommandLine object can provide the @argc and @argv159+// The `GApplicationCommandLine` object can provide the @argc and @argv
133-// parameters for use with the #GOptionContext command-line parsing API,160+// parameters for use with the [struct@GLib.OptionContext] command-line parsing API,
134-// with the g_application_command_line_get_arguments() function. See161+// with the [method@Gio.ApplicationCommandLine.get_arguments] function. See
135-// [gapplication-example-cmdline3.c][gapplication-example-cmdline3]162+// [gapplication-example-cmdline3.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gapplication-example-cmdline3.c)
136 // for an example.163 // for an example.
137 //164 //
138 // The exit status of the originally-invoked process may be set and165 // The exit status of the originally-invoked process may be set and
139-// messages can be printed to stdout or stderr of that process. The166+// messages can be printed to stdout or stderr of that process.
140-// lifecycle of the originally-invoked process is tied to the lifecycle167+//
141-// of this object (ie: the process exits when the last reference is168+// For remote invocation, the originally-invoked process exits when
142-// dropped).169+// [method@Gio.ApplicationCommandLine.done] method is called. This method is
170+// also automatically called when the object is disposed.
143 //171 //
144-// The main use for #GApplicationCommandLine (and the172+// The main use for `GApplicationCommandLine` (and the
145-// #GApplication::command-line signal) is 'Emacs server' like use cases:173+// [signal@Gio.Application::command-line] signal) is 'Emacs server' like use cases:
146 // You can set the `EDITOR` environment variable to have e.g. git use174 // You can set the `EDITOR` environment variable to have e.g. git use
147 // your favourite editor to edit commit messages, and if you already175 // your favourite editor to edit commit messages, and if you already
148 // have an instance of the editor running, the editing will happen176 // have an instance of the editor running, the editing will happen
@@ -151,11 +179,12 @@ func (x *ApplicationCommandLinePrivate) GoPointer() uintptr {
151 // does not return until the editing is done.179 // does not return until the editing is done.
152 //180 //
153 // Normally, the commandline is completely handled in the181 // Normally, the commandline is completely handled in the
154-// #GApplication::command-line handler. The launching instance exits182+// [signal@Gio.Application::command-line] handler. The launching instance exits
155 // once the signal handler in the primary instance has returned, and183 // once the signal handler in the primary instance has returned, and
156 // the return value of the signal handler becomes the exit status184 // the return value of the signal handler becomes the exit status
157 // of the launching instance.185 // of the launching instance.
158-// |[<!-- language="C" -->186+//
187+// ```c
159 // static int188 // static int
160 // command_line (GApplication *application,189 // command_line (GApplication *application,
161 //190 //
@@ -180,13 +209,15 @@ func (x *ApplicationCommandLinePrivate) GoPointer() uintptr {
180 // return 0;209 // return 0;
181 // }210 // }
182 //211 //
183-// ]|212+// ```
213+//
184 // The complete example can be found here:214 // The complete example can be found here:
185 // [gapplication-example-cmdline.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gapplication-example-cmdline.c)215 // [gapplication-example-cmdline.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gapplication-example-cmdline.c)
186 //216 //
187 // In more complicated cases, the handling of the commandline can be217 // In more complicated cases, the handling of the commandline can be
188 // split between the launcher and the primary instance.218 // split between the launcher and the primary instance.
189-// |[<!-- language="C" -->219+//
220+// ```c
190 // static gboolean221 // static gboolean
191 //222 //
192 // test_local_cmdline (GApplication *application,223 // test_local_cmdline (GApplication *application,
@@ -236,18 +267,19 @@ func (x *ApplicationCommandLinePrivate) GoPointer() uintptr {
236 // ...267 // ...
237 // }268 // }
238 //269 //
239-// ]|270+// ```
271+//
240 // In this example of split commandline handling, options that start272 // In this example of split commandline handling, options that start
241 // with `--local-` are handled locally, all other options are passed273 // with `--local-` are handled locally, all other options are passed
242-// to the #GApplication::command-line handler which runs in the primary274+// to the [signal@Gio.Application::command-line] handler which runs in the primary
243 // instance.275 // instance.
244 //276 //
245 // The complete example can be found here:277 // The complete example can be found here:
246 // [gapplication-example-cmdline2.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gapplication-example-cmdline2.c)278 // [gapplication-example-cmdline2.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gapplication-example-cmdline2.c)
247 //279 //
248-// If handling the commandline requires a lot of work, it may280+// If handling the commandline requires a lot of work, it may be better to defer it.
249-// be better to defer it.281+//
250-// |[<!-- language="C" -->282+// ```c
251 // static gboolean283 // static gboolean
252 // my_cmdline_handler (gpointer data)284 // my_cmdline_handler (gpointer data)
253 //285 //
@@ -281,10 +313,11 @@ func (x *ApplicationCommandLinePrivate) GoPointer() uintptr {
281 // return 0;313 // return 0;
282 // }314 // }
283 //315 //
284-// ]|316+// ```
317+//
285 // In this example the commandline is not completely handled before318 // In this example the commandline is not completely handled before
286-// the #GApplication::command-line handler returns. Instead, we keep319+// the [signal@Gio.Application::command-line] handler returns. Instead, we keep
287-// a reference to the #GApplicationCommandLine object and handle it320+// a reference to the `GApplicationCommandLine` object and handle it
288 // later (in this example, in an idle). Note that it is necessary to321 // later (in this example, in an idle). Note that it is necessary to
289 // hold the application until you are done with the commandline.322 // hold the application until you are done with the commandline.
290 //323 //
@@ -327,6 +360,29 @@ func (x *ApplicationCommandLine) CreateFileForArg(ArgVar string) *FileBase {
327 return cls360 return cls
328 }361 }
329 362
363+var xApplicationCommandLineDone func(uintptr)
364+
365+// Signals that command line processing is completed.
366+//
367+// For remote invocation, it causes the invoking process to terminate.
368+//
369+// For local invocation, it does nothing.
370+//
371+// This method should be called in the [signal@Gio.Application::command-line]
372+// handler, after the exit status is set and all messages are printed.
373+//
374+// After this call, g_application_command_line_set_exit_status() has no effect.
375+// Subsequent calls to this method are no-ops.
376+//
377+// This method is automatically called when the #GApplicationCommandLine
378+// object is disposed — so you can omit the call in non-garbage collected
379+// languages.
380+func (x *ApplicationCommandLine) Done() {
381+
382+ xApplicationCommandLineDone(x.GoPointer())
383+
384+}
385+
330 var xApplicationCommandLineGetArguments func(uintptr, int) []string386 var xApplicationCommandLineGetArguments func(uintptr, int) []string
331 387
332 // Gets the list of arguments that was passed on the command line.388 // Gets the list of arguments that was passed on the command line.
@@ -406,7 +462,7 @@ func (x *ApplicationCommandLine) GetIsRemote() bool {
406 462
407 var xApplicationCommandLineGetOptionsDict func(uintptr) *glib.VariantDict463 var xApplicationCommandLineGetOptionsDict func(uintptr) *glib.VariantDict
408 464
409-// Gets the options there were passed to g_application_command_line().465+// Gets the options that were passed to g_application_command_line().
410 //466 //
411 // If you did not override local_command_line() then these are the same467 // If you did not override local_command_line() then these are the same
412 // options that were parsed according to the #GOptionEntrys added to the468 // options that were parsed according to the #GOptionEntrys added to the
@@ -415,6 +471,9 @@ var xApplicationCommandLineGetOptionsDict func(uintptr) *glib.VariantDict
415 //471 //
416 // If no options were sent then an empty dictionary is returned so that472 // If no options were sent then an empty dictionary is returned so that
417 // you don't need to check for %NULL.473 // you don't need to check for %NULL.
474+//
475+// The data has been passed via an untrusted external process, so the types of
476+// all values must be checked before being used.
418 func (x *ApplicationCommandLine) GetOptionsDict() *glib.VariantDict {477 func (x *ApplicationCommandLine) GetOptionsDict() *glib.VariantDict {
419 478
420 cret := xApplicationCommandLineGetOptionsDict(x.GoPointer())479 cret := xApplicationCommandLineGetOptionsDict(x.GoPointer())
@@ -430,6 +489,9 @@ var xApplicationCommandLineGetPlatformData func(uintptr) *glib.Variant
430 // information like the current working directory and the startup489 // information like the current working directory and the startup
431 // notification ID.490 // notification ID.
432 //491 //
492+// It comes from an untrusted external process and hence the types of all
493+// values must be validated before being used.
494+//
433 // For local invocation, it will be %NULL.495 // For local invocation, it will be %NULL.
434 func (x *ApplicationCommandLine) GetPlatformData() *glib.Variant {496 func (x *ApplicationCommandLine) GetPlatformData() *glib.Variant {
435 497
@@ -495,6 +557,19 @@ func (x *ApplicationCommandLine) Print(FormatVar string, varArgs ...interface{})
495 557
496 }558 }
497 559
560+var xApplicationCommandLinePrintLiteral func(uintptr, string)
561+
562+// Prints a message using the stdout print handler in the invoking process.
563+//
564+// Unlike g_application_command_line_print(), @message is not a `printf()`-style
565+// format string. Use this function if @message contains text you don't have
566+// control over, that could include `printf()` escape sequences.
567+func (x *ApplicationCommandLine) PrintLiteral(MessageVar string) {
568+
569+ xApplicationCommandLinePrintLiteral(x.GoPointer(), MessageVar)
570+
571+}
572+
498 var xApplicationCommandLinePrinterr func(uintptr, string, ...interface{})573 var xApplicationCommandLinePrinterr func(uintptr, string, ...interface{})
499 574
500 // Formats a message and prints it using the stderr print handler in the575 // Formats a message and prints it using the stderr print handler in the
@@ -509,6 +584,19 @@ func (x *ApplicationCommandLine) Printerr(FormatVar string, varArgs ...interface
509 584
510 }585 }
511 586
587+var xApplicationCommandLinePrinterrLiteral func(uintptr, string)
588+
589+// Prints a message using the stderr print handler in the invoking process.
590+//
591+// Unlike g_application_command_line_printerr(), @message is not
592+// a `printf()`-style format string. Use this function if @message contains text
593+// you don't have control over, that could include `printf()` escape sequences.
594+func (x *ApplicationCommandLine) PrinterrLiteral(MessageVar string) {
595+
596+ xApplicationCommandLinePrinterrLiteral(x.GoPointer(), MessageVar)
597+
598+}
599+
512 var xApplicationCommandLineSetExitStatus func(uintptr, int)600 var xApplicationCommandLineSetExitStatus func(uintptr, int)
513 601
514 // Sets the exit status that will be used when the invoking process602 // Sets the exit status that will be used when the invoking process
@@ -532,6 +620,9 @@ var xApplicationCommandLineSetExitStatus func(uintptr, int)
532 // have been 'successful' in a certain sense, and the exit status is620 // have been 'successful' in a certain sense, and the exit status is
533 // always zero. If the application use count is zero, though, the exit621 // always zero. If the application use count is zero, though, the exit
534 // status of the local #GApplicationCommandLine is used.622 // status of the local #GApplicationCommandLine is used.
623+//
624+// This method is a no-op if g_application_command_line_done() has
625+// been called.
535 func (x *ApplicationCommandLine) SetExitStatus(ExitStatusVar int) {626 func (x *ApplicationCommandLine) SetExitStatus(ExitStatusVar int) {
536 627
537 xApplicationCommandLineSetExitStatus(x.GoPointer(), ExitStatusVar)628 xApplicationCommandLineSetExitStatus(x.GoPointer(), ExitStatusVar)
@@ -560,6 +651,7 @@ func init() {
560 core.PuregoSafeRegister(&xApplicationCommandLineGLibType, lib, "g_application_command_line_get_type")651 core.PuregoSafeRegister(&xApplicationCommandLineGLibType, lib, "g_application_command_line_get_type")
561 652
562 core.PuregoSafeRegister(&xApplicationCommandLineCreateFileForArg, lib, "g_application_command_line_create_file_for_arg")653 core.PuregoSafeRegister(&xApplicationCommandLineCreateFileForArg, lib, "g_application_command_line_create_file_for_arg")
654+ core.PuregoSafeRegister(&xApplicationCommandLineDone, lib, "g_application_command_line_done")
563 core.PuregoSafeRegister(&xApplicationCommandLineGetArguments, lib, "g_application_command_line_get_arguments")655 core.PuregoSafeRegister(&xApplicationCommandLineGetArguments, lib, "g_application_command_line_get_arguments")
564 core.PuregoSafeRegister(&xApplicationCommandLineGetCwd, lib, "g_application_command_line_get_cwd")656 core.PuregoSafeRegister(&xApplicationCommandLineGetCwd, lib, "g_application_command_line_get_cwd")
565 core.PuregoSafeRegister(&xApplicationCommandLineGetEnviron, lib, "g_application_command_line_get_environ")657 core.PuregoSafeRegister(&xApplicationCommandLineGetEnviron, lib, "g_application_command_line_get_environ")
@@ -570,7 +662,9 @@ func init() {
570 core.PuregoSafeRegister(&xApplicationCommandLineGetStdin, lib, "g_application_command_line_get_stdin")662 core.PuregoSafeRegister(&xApplicationCommandLineGetStdin, lib, "g_application_command_line_get_stdin")
571 core.PuregoSafeRegister(&xApplicationCommandLineGetenv, lib, "g_application_command_line_getenv")663 core.PuregoSafeRegister(&xApplicationCommandLineGetenv, lib, "g_application_command_line_getenv")
572 core.PuregoSafeRegister(&xApplicationCommandLinePrint, lib, "g_application_command_line_print")664 core.PuregoSafeRegister(&xApplicationCommandLinePrint, lib, "g_application_command_line_print")
665+ core.PuregoSafeRegister(&xApplicationCommandLinePrintLiteral, lib, "g_application_command_line_print_literal")
573 core.PuregoSafeRegister(&xApplicationCommandLinePrinterr, lib, "g_application_command_line_printerr")666 core.PuregoSafeRegister(&xApplicationCommandLinePrinterr, lib, "g_application_command_line_printerr")
667+ core.PuregoSafeRegister(&xApplicationCommandLinePrinterrLiteral, lib, "g_application_command_line_printerr_literal")
574 core.PuregoSafeRegister(&xApplicationCommandLineSetExitStatus, lib, "g_application_command_line_set_exit_status")668 core.PuregoSafeRegister(&xApplicationCommandLineSetExitStatus, lib, "g_application_command_line_set_exit_status")
575 669
576 }670 }
M v4/gio/gasyncinitable.go +14 -8
@@ -29,6 +29,7 @@ func (x *AsyncInitableIface) GoPointer() uintptr {
29 }29 }
30 30
31 // OverrideInitAsync sets the callback function.31 // OverrideInitAsync sets the callback function.
32+// Starts initialization of the object.
32 func (x *AsyncInitableIface) OverrideInitAsync(cb func(AsyncInitable, int, *Cancellable, *AsyncReadyCallback, uintptr)) {33 func (x *AsyncInitableIface) OverrideInitAsync(cb func(AsyncInitable, int, *Cancellable, *AsyncReadyCallback, uintptr)) {
33 if cb == nil {34 if cb == nil {
34 x.xInitAsync = 035 x.xInitAsync = 0
@@ -40,6 +41,7 @@ func (x *AsyncInitableIface) OverrideInitAsync(cb func(AsyncInitable, int, *Canc
40 }41 }
41 42
42 // GetInitAsync gets the callback function.43 // GetInitAsync gets the callback function.
44+// Starts initialization of the object.
43 func (x *AsyncInitableIface) GetInitAsync() func(AsyncInitable, int, *Cancellable, *AsyncReadyCallback, uintptr) {45 func (x *AsyncInitableIface) GetInitAsync() func(AsyncInitable, int, *Cancellable, *AsyncReadyCallback, uintptr) {
44 if x.xInitAsync == 0 {46 if x.xInitAsync == 0 {
45 return nil47 return nil
@@ -52,6 +54,7 @@ func (x *AsyncInitableIface) GetInitAsync() func(AsyncInitable, int, *Cancellabl
52 }54 }
53 55
54 // OverrideInitFinish sets the callback function.56 // OverrideInitFinish sets the callback function.
57+// Finishes initialization of the object.
55 func (x *AsyncInitableIface) OverrideInitFinish(cb func(AsyncInitable, AsyncResult) bool) {58 func (x *AsyncInitableIface) OverrideInitFinish(cb func(AsyncInitable, AsyncResult) bool) {
56 if cb == nil {59 if cb == nil {
57 x.xInitFinish = 060 x.xInitFinish = 0
@@ -63,6 +66,7 @@ func (x *AsyncInitableIface) OverrideInitFinish(cb func(AsyncInitable, AsyncResu
63 }66 }
64 67
65 // GetInitFinish gets the callback function.68 // GetInitFinish gets the callback function.
69+// Finishes initialization of the object.
66 func (x *AsyncInitableIface) GetInitFinish() func(AsyncInitable, AsyncResult) bool {70 func (x *AsyncInitableIface) GetInitFinish() func(AsyncInitable, AsyncResult) bool {
67 if x.xInitFinish == 0 {71 if x.xInitFinish == 0 {
68 return nil72 return nil
@@ -74,22 +78,24 @@ func (x *AsyncInitableIface) GetInitFinish() func(AsyncInitable, AsyncResult) bo
74 }78 }
75 }79 }
76 80
77-// This is the asynchronous version of #GInitable; it behaves the same81+// `GAsyncInitable` is an interface for asynchronously initializable objects.
82+//
83+// This is the asynchronous version of [iface@Gio.Initable]; it behaves the same
78 // in all ways except that initialization is asynchronous. For more details84 // in all ways except that initialization is asynchronous. For more details
79-// see the descriptions on #GInitable.85+// see the descriptions on `GInitable`.
80 //86 //
81-// A class may implement both the #GInitable and #GAsyncInitable interfaces.87+// A class may implement both the `GInitable` and `GAsyncInitable` interfaces.
82 //88 //
83 // Users of objects implementing this are not intended to use the interface89 // Users of objects implementing this are not intended to use the interface
84 // method directly; instead it will be used automatically in various ways.90 // method directly; instead it will be used automatically in various ways.
85-// For C applications you generally just call g_async_initable_new_async()91+// For C applications you generally just call [func@Gio.AsyncInitable.new_async]
86 // directly, or indirectly via a foo_thing_new_async() wrapper. This will call92 // directly, or indirectly via a foo_thing_new_async() wrapper. This will call
87-// g_async_initable_init_async() under the cover, calling back with %NULL and93+// [method@Gio.AsyncInitable.init_async] under the covers, calling back with `NULL`
88-// a set %GError on failure.94+// and a set `GError` on failure.
89 //95 //
90 // A typical implementation might look something like this:96 // A typical implementation might look something like this:
91 //97 //
92-// |[<!-- language="C" -->98+// ```c
93 //99 //
94 // enum {100 // enum {
95 // NOT_INITIALIZED,101 // NOT_INITIALIZED,
@@ -181,7 +187,7 @@ func (x *AsyncInitableIface) GetInitFinish() func(AsyncInitable, AsyncResult) bo
181 // iface->init_finish = foo_init_finish;187 // iface->init_finish = foo_init_finish;
182 // }188 // }
183 //189 //
184-// ]|190+// ```
185 type AsyncInitable interface {191 type AsyncInitable interface {
186 GoPointer() uintptr192 GoPointer() uintptr
187 SetGoPointer(uintptr)193 SetGoPointer(uintptr)
M v4/gio/gasyncresult.go +39 -32
@@ -12,7 +12,7 @@ import (
12 "github.com/jwijenbergh/puregotk/v4/gobject/types"12 "github.com/jwijenbergh/puregotk/v4/gobject/types"
13 )13 )
14 14
15-// Interface definition for #GAsyncResult.15+// Interface definition for [iface@Gio.AsyncResult].
16 type AsyncResultIface struct {16 type AsyncResultIface struct {
17 _ structs.HostLayout17 _ structs.HostLayout
18 18
@@ -30,6 +30,7 @@ func (x *AsyncResultIface) GoPointer() uintptr {
30 }30 }
31 31
32 // OverrideGetUserData sets the callback function.32 // OverrideGetUserData sets the callback function.
33+// Gets the user data passed to the callback.
33 func (x *AsyncResultIface) OverrideGetUserData(cb func(AsyncResult) uintptr) {34 func (x *AsyncResultIface) OverrideGetUserData(cb func(AsyncResult) uintptr) {
34 if cb == nil {35 if cb == nil {
35 x.xGetUserData = 036 x.xGetUserData = 0
@@ -41,6 +42,7 @@ func (x *AsyncResultIface) OverrideGetUserData(cb func(AsyncResult) uintptr) {
41 }42 }
42 43
43 // GetGetUserData gets the callback function.44 // GetGetUserData gets the callback function.
45+// Gets the user data passed to the callback.
44 func (x *AsyncResultIface) GetGetUserData() func(AsyncResult) uintptr {46 func (x *AsyncResultIface) GetGetUserData() func(AsyncResult) uintptr {
45 if x.xGetUserData == 0 {47 if x.xGetUserData == 0 {
46 return nil48 return nil
@@ -53,6 +55,7 @@ func (x *AsyncResultIface) GetGetUserData() func(AsyncResult) uintptr {
53 }55 }
54 56
55 // OverrideGetSourceObject sets the callback function.57 // OverrideGetSourceObject sets the callback function.
58+// Gets the source object that issued the asynchronous operation.
56 func (x *AsyncResultIface) OverrideGetSourceObject(cb func(AsyncResult) *gobject.Object) {59 func (x *AsyncResultIface) OverrideGetSourceObject(cb func(AsyncResult) *gobject.Object) {
57 if cb == nil {60 if cb == nil {
58 x.xGetSourceObject = 061 x.xGetSourceObject = 0
@@ -68,6 +71,7 @@ func (x *AsyncResultIface) OverrideGetSourceObject(cb func(AsyncResult) *gobject
68 }71 }
69 72
70 // GetGetSourceObject gets the callback function.73 // GetGetSourceObject gets the callback function.
74+// Gets the source object that issued the asynchronous operation.
71 func (x *AsyncResultIface) GetGetSourceObject() func(AsyncResult) *gobject.Object {75 func (x *AsyncResultIface) GetGetSourceObject() func(AsyncResult) *gobject.Object {
72 if x.xGetSourceObject == 0 {76 if x.xGetSourceObject == 0 {
73 return nil77 return nil
@@ -86,6 +90,7 @@ func (x *AsyncResultIface) GetGetSourceObject() func(AsyncResult) *gobject.Objec
86 }90 }
87 91
88 // OverrideIsTagged sets the callback function.92 // OverrideIsTagged sets the callback function.
93+// Checks if a result is tagged with a particular source.
89 func (x *AsyncResultIface) OverrideIsTagged(cb func(AsyncResult, uintptr) bool) {94 func (x *AsyncResultIface) OverrideIsTagged(cb func(AsyncResult, uintptr) bool) {
90 if cb == nil {95 if cb == nil {
91 x.xIsTagged = 096 x.xIsTagged = 0
@@ -97,6 +102,7 @@ func (x *AsyncResultIface) OverrideIsTagged(cb func(AsyncResult, uintptr) bool)
97 }102 }
98 103
99 // GetIsTagged gets the callback function.104 // GetIsTagged gets the callback function.
105+// Checks if a result is tagged with a particular source.
100 func (x *AsyncResultIface) GetIsTagged() func(AsyncResult, uintptr) bool {106 func (x *AsyncResultIface) GetIsTagged() func(AsyncResult, uintptr) bool {
101 if x.xIsTagged == 0 {107 if x.xIsTagged == 0 {
102 return nil108 return nil
@@ -108,37 +114,38 @@ func (x *AsyncResultIface) GetIsTagged() func(AsyncResult, uintptr) bool {
108 }114 }
109 }115 }
110 116
111-// Provides a base class for implementing asynchronous function results.117+// `GAsyncResult` provides a base class for implementing asynchronous function results.
112 //118 //
113 // Asynchronous operations are broken up into two separate operations119 // Asynchronous operations are broken up into two separate operations
114-// which are chained together by a #GAsyncReadyCallback. To begin120+// which are chained together by a `GAsyncReadyCallback`. To begin
115-// an asynchronous operation, provide a #GAsyncReadyCallback to the121+// an asynchronous operation, provide a `GAsyncReadyCallback` to the
116 // asynchronous function. This callback will be triggered when the122 // asynchronous function. This callback will be triggered when the
117 // operation has completed, and must be run in a later iteration of123 // operation has completed, and must be run in a later iteration of
118-// the [thread-default main context][g-main-context-push-thread-default]124+// the thread-default main context (see
119-// from where the operation was initiated. It will be passed a125+// [method@GLib.MainContext.push_thread_default]) from where the operation was
120-// #GAsyncResult instance filled with the details of the operation's126+// initiated. It will be passed a `GAsyncResult` instance filled with the
121-// success or failure, the object the asynchronous function was127+// details of the operation's success or failure, the object the asynchronous
122-// started for and any error codes returned. The asynchronous callback128+// function was started for and any error codes returned. The asynchronous
123-// function is then expected to call the corresponding "_finish()"129+// callback function is then expected to call the corresponding `_finish()`
124 // function, passing the object the function was called for, the130 // function, passing the object the function was called for, the
125-// #GAsyncResult instance, and (optionally) an @error to grab any131+// `GAsyncResult` instance, and (optionally) an @error to grab any
126 // error conditions that may have occurred.132 // error conditions that may have occurred.
127 //133 //
128-// The "_finish()" function for an operation takes the generic result134+// The `_finish()` function for an operation takes the generic result
129-// (of type #GAsyncResult) and returns the specific result that the135+// (of type `GAsyncResult`) and returns the specific result that the
130-// operation in question yields (e.g. a #GFileEnumerator for a136+// operation in question yields (e.g. a [class@Gio.FileEnumerator] for a
131 // "enumerate children" operation). If the result or error status of the137 // "enumerate children" operation). If the result or error status of the
132-// operation is not needed, there is no need to call the "_finish()"138+// operation is not needed, there is no need to call the `_finish()`
133 // function; GIO will take care of cleaning up the result and error139 // function; GIO will take care of cleaning up the result and error
134-// information after the #GAsyncReadyCallback returns. You can pass140+// information after the `GAsyncReadyCallback` returns. You can pass
135-// %NULL for the #GAsyncReadyCallback if you don't need to take any141+// `NULL` for the `GAsyncReadyCallback` if you don't need to take any
136 // action at all after the operation completes. Applications may also142 // action at all after the operation completes. Applications may also
137-// take a reference to the #GAsyncResult and call "_finish()" later;143+// take a reference to the `GAsyncResult` and call `_finish()` later;
138-// however, the "_finish()" function may be called at most once.144+// however, the `_finish()` function may be called at most once.
139 //145 //
140 // Example of a typical asynchronous operation flow:146 // Example of a typical asynchronous operation flow:
141-// |[<!-- language="C" -->147+//
148+// ```c
142 // void _theoretical_frobnitz_async (Theoretical *t,149 // void _theoretical_frobnitz_async (Theoretical *t,
143 //150 //
144 // GCancellable *c,151 // GCancellable *c,
@@ -183,20 +190,20 @@ func (x *AsyncResultIface) GetIsTagged() func(AsyncResult, uintptr) bool {
183 // ...190 // ...
184 // }191 // }
185 //192 //
186-// ]|193+// ```
187 //194 //
188 // The callback for an asynchronous operation is called only once, and is195 // The callback for an asynchronous operation is called only once, and is
189 // always called, even in the case of a cancelled operation. On cancellation196 // always called, even in the case of a cancelled operation. On cancellation
190-// the result is a %G_IO_ERROR_CANCELLED error.197+// the result is a `G_IO_ERROR_CANCELLED` error.
191 //198 //
192-// ## I/O Priority # {#io-priority}199+// ## I/O Priority
193 //200 //
194 // Many I/O-related asynchronous operations have a priority parameter,201 // Many I/O-related asynchronous operations have a priority parameter,
195 // which is used in certain cases to determine the order in which202 // which is used in certain cases to determine the order in which
196 // operations are executed. They are not used to determine system-wide203 // operations are executed. They are not used to determine system-wide
197 // I/O scheduling. Priorities are integers, with lower numbers indicating204 // I/O scheduling. Priorities are integers, with lower numbers indicating
198 // higher priority. It is recommended to choose priorities between205 // higher priority. It is recommended to choose priorities between
199-// %G_PRIORITY_LOW and %G_PRIORITY_HIGH, with %G_PRIORITY_DEFAULT206+// `G_PRIORITY_LOW` and `G_PRIORITY_HIGH`, with `G_PRIORITY_DEFAULT`
200 // as a default.207 // as a default.
201 type AsyncResult interface {208 type AsyncResult interface {
202 GoPointer() uintptr209 GoPointer() uintptr
@@ -228,7 +235,7 @@ func (x *AsyncResultBase) SetGoPointer(ptr uintptr) {
228 x.Ptr = ptr235 x.Ptr = ptr
229 }236 }
230 237
231-// Gets the source object from a #GAsyncResult.238+// Gets the source object from a [iface@Gio.AsyncResult].
232 func (x *AsyncResultBase) GetSourceObject() *gobject.Object {239 func (x *AsyncResultBase) GetSourceObject() *gobject.Object {
233 var cls *gobject.Object240 var cls *gobject.Object
234 241
@@ -242,7 +249,7 @@ func (x *AsyncResultBase) GetSourceObject() *gobject.Object {
242 return cls249 return cls
243 }250 }
244 251
245-// Gets the user data from a #GAsyncResult.252+// Gets the user data from a [iface@Gio.AsyncResult].
246 func (x *AsyncResultBase) GetUserData() uintptr {253 func (x *AsyncResultBase) GetUserData() uintptr {
247 254
248 cret := XGAsyncResultGetUserData(x.GoPointer())255 cret := XGAsyncResultGetUserData(x.GoPointer())
@@ -257,14 +264,14 @@ func (x *AsyncResultBase) IsTagged(SourceTagVar uintptr) bool {
257 return cret264 return cret
258 }265 }
259 266
260-// If @res is a #GSimpleAsyncResult, this is equivalent to267+// If @res is a [class@Gio.SimpleAsyncResult], this is equivalent to
261-// g_simple_async_result_propagate_error(). Otherwise it returns268+// [method@Gio.SimpleAsyncResult.propagate_error]. Otherwise it returns
262-// %FALSE.269+// `FALSE`.
263 //270 //
264-// This can be used for legacy error handling in async *_finish()271+// This can be used for legacy error handling in async `*_finish()`
265-// wrapper functions that traditionally handled #GSimpleAsyncResult272+// wrapper functions that traditionally handled [class@Gio.SimpleAsyncResult]
266 // error returns themselves rather than calling into the virtual method.273 // error returns themselves rather than calling into the virtual method.
267-// This should not be used in new code; #GAsyncResult errors that are274+// This should not be used in new code; [iface@Gio.AsyncResult] errors that are
268 // set by virtual methods should also be extracted by virtual methods,275 // set by virtual methods should also be extracted by virtual methods,
269 // to enable subclasses to chain up correctly.276 // to enable subclasses to chain up correctly.
270 func (x *AsyncResultBase) LegacyPropagateError() (bool, error) {277 func (x *AsyncResultBase) LegacyPropagateError() (bool, error) {
M v4/gio/gbufferedinputstream.go +23 -23
@@ -229,20 +229,19 @@ func (x *BufferedInputStreamPrivate) GoPointer() uintptr {
229 return uintptr(unsafe.Pointer(x))229 return uintptr(unsafe.Pointer(x))
230 }230 }
231 231
232-// Buffered input stream implements #GFilterInputStream and provides232+// Buffered input stream implements [class@Gio.FilterInputStream] and provides
233 // for buffered reads.233 // for buffered reads.
234 //234 //
235-// By default, #GBufferedInputStream's buffer size is set at 4 kilobytes.235+// By default, `GBufferedInputStream`'s buffer size is set at 4 kilobytes.
236 //236 //
237-// To create a buffered input stream, use g_buffered_input_stream_new(),237+// To create a buffered input stream, use [ctor@Gio.BufferedInputStream.new],
238-// or g_buffered_input_stream_new_sized() to specify the buffer's size at238+// or [ctor@Gio.BufferedInputStream.new_sized] to specify the buffer's size at
239 // construction.239 // construction.
240 //240 //
241 // To get the size of a buffer within a buffered input stream, use241 // To get the size of a buffer within a buffered input stream, use
242-// g_buffered_input_stream_get_buffer_size(). To change the size of a242+// [method@Gio.BufferedInputStream.get_buffer_size]. To change the size of a
243-// buffered input stream's buffer, use243+// buffered input stream's buffer, use [method@Gio.BufferedInputStream.set_buffer_size].
244-// g_buffered_input_stream_set_buffer_size(). Note that the buffer's size244+// Note that the buffer's size cannot be reduced below the size of the data within the buffer.
245-// cannot be reduced below the size of the data within the buffer.
246 type BufferedInputStream struct {245 type BufferedInputStream struct {
247 FilterInputStream246 FilterInputStream
248 }247 }
@@ -261,7 +260,7 @@ func BufferedInputStreamNewFromInternalPtr(ptr uintptr) *BufferedInputStream {
261 260
262 var xNewBufferedInputStream func(uintptr) uintptr261 var xNewBufferedInputStream func(uintptr) uintptr
263 262
264-// Creates a new #GInputStream from the given @base_stream, with263+// Creates a new [class@Gio.InputStream] from the given @base_stream, with
265 // a buffer set to the default size (4 kilobytes).264 // a buffer set to the default size (4 kilobytes).
266 func NewBufferedInputStream(BaseStreamVar *InputStream) *BufferedInputStream {265 func NewBufferedInputStream(BaseStreamVar *InputStream) *BufferedInputStream {
267 var cls *BufferedInputStream266 var cls *BufferedInputStream
@@ -278,7 +277,7 @@ func NewBufferedInputStream(BaseStreamVar *InputStream) *BufferedInputStream {
278 277
279 var xNewBufferedInputStreamSized func(uintptr, uint) uintptr278 var xNewBufferedInputStreamSized func(uintptr, uint) uintptr
280 279
281-// Creates a new #GBufferedInputStream from the given @base_stream,280+// Creates a new [class@Gio.BufferedInputStream] from the given @base_stream,
282 // with a buffer set to @size.281 // with a buffer set to @size.
283 func NewBufferedInputStreamSized(BaseStreamVar *InputStream, SizeVar uint) *BufferedInputStream {282 func NewBufferedInputStreamSized(BaseStreamVar *InputStream, SizeVar uint) *BufferedInputStream {
284 var cls *BufferedInputStream283 var cls *BufferedInputStream
@@ -299,7 +298,8 @@ var xBufferedInputStreamFill func(uintptr, int, uintptr, **glib.Error) int
299 // Will block during this read.298 // Will block during this read.
300 //299 //
301 // If @count is zero, returns zero and does nothing. A value of @count300 // If @count is zero, returns zero and does nothing. A value of @count
302-// larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.301+// larger than `G_MAXSSIZE` will cause a
302+// [error@Gio.IOErrorEnum.INVALID_ARGUMENT] error.
303 //303 //
304 // On success, the number of bytes read into the buffer is returned.304 // On success, the number of bytes read into the buffer is returned.
305 // It is not an error if this is not the same as the requested size, as it305 // It is not an error if this is not the same as the requested size, as it
@@ -309,16 +309,16 @@ var xBufferedInputStreamFill func(uintptr, int, uintptr, **glib.Error) int
309 // If @count is -1 then the attempted read size is equal to the number of309 // If @count is -1 then the attempted read size is equal to the number of
310 // bytes that are required to fill the buffer.310 // bytes that are required to fill the buffer.
311 //311 //
312-// If @cancellable is not %NULL, then the operation can be cancelled by312+// If @cancellable is not `NULL`, then the operation can be cancelled by
313 // triggering the cancellable object from another thread. If the operation313 // triggering the cancellable object from another thread. If the operation
314-// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an314+// was cancelled, the error [error@Gio.IOErrorEnum.CANCELLED] will be returned.
315-// operation was partially finished when the operation was cancelled the315+// If an operation was partially finished when the operation was cancelled the
316 // partial result will be returned, without an error.316 // partial result will be returned, without an error.
317 //317 //
318-// On error -1 is returned and @error is set accordingly.318+// On error `-1` is returned and @error is set accordingly.
319 //319 //
320 // For the asynchronous, non-blocking, version of this function, see320 // For the asynchronous, non-blocking, version of this function, see
321-// g_buffered_input_stream_fill_async().321+// [method@Gio.BufferedInputStream.fill_async].
322 func (x *BufferedInputStream) Fill(CountVar int, CancellableVar *Cancellable) (int, error) {322 func (x *BufferedInputStream) Fill(CountVar int, CancellableVar *Cancellable) (int, error) {
323 var cerr *glib.Error323 var cerr *glib.Error
324 324
@@ -334,9 +334,9 @@ var xBufferedInputStreamFillAsync func(uintptr, int, int, uintptr, uintptr, uint
334 334
335 // Reads data into @stream's buffer asynchronously, up to @count size.335 // Reads data into @stream's buffer asynchronously, up to @count size.
336 // @io_priority can be used to prioritize reads. For the synchronous336 // @io_priority can be used to prioritize reads. For the synchronous
337-// version of this function, see g_buffered_input_stream_fill().337+// version of this function, see [method@Gio.BufferedInputStream.fill].
338 //338 //
339-// If @count is -1 then the attempted read size is equal to the number339+// If @count is `-1` then the attempted read size is equal to the number
340 // of bytes that are required to fill the buffer.340 // of bytes that are required to fill the buffer.
341 func (x *BufferedInputStream) FillAsync(CountVar int, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {341 func (x *BufferedInputStream) FillAsync(CountVar int, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
342 342
@@ -403,15 +403,15 @@ var xBufferedInputStreamReadByte func(uintptr, uintptr, **glib.Error) int
403 // during this read.403 // during this read.
404 //404 //
405 // On success, the byte read from the stream is returned. On end of stream405 // On success, the byte read from the stream is returned. On end of stream
406-// -1 is returned but it's not an exceptional error and @error is not set.406+// `-1` is returned but it's not an exceptional error and @error is not set.
407 //407 //
408-// If @cancellable is not %NULL, then the operation can be cancelled by408+// If @cancellable is not `NULL`, then the operation can be cancelled by
409 // triggering the cancellable object from another thread. If the operation409 // triggering the cancellable object from another thread. If the operation
410-// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an410+// was cancelled, the error [error@Gio.IOErrorEnum.CANCELLED] will be returned.
411-// operation was partially finished when the operation was cancelled the411+// If an operation was partially finished when the operation was cancelled the
412 // partial result will be returned, without an error.412 // partial result will be returned, without an error.
413 //413 //
414-// On error -1 is returned and @error is set accordingly.414+// On error `-1` is returned and @error is set accordingly.
415 func (x *BufferedInputStream) ReadByte(CancellableVar *Cancellable) (int, error) {415 func (x *BufferedInputStream) ReadByte(CancellableVar *Cancellable) (int, error) {
416 var cerr *glib.Error416 var cerr *glib.Error
417 417
M v4/gio/gbufferedoutputstream.go +7 -8
@@ -79,20 +79,19 @@ func (x *BufferedOutputStreamPrivate) GoPointer() uintptr {
79 return uintptr(unsafe.Pointer(x))79 return uintptr(unsafe.Pointer(x))
80 }80 }
81 81
82-// Buffered output stream implements #GFilterOutputStream and provides82+// Buffered output stream implements [class@Gio.FilterOutputStream] and provides
83 // for buffered writes.83 // for buffered writes.
84 //84 //
85-// By default, #GBufferedOutputStream's buffer size is set at 4 kilobytes.85+// By default, `GBufferedOutputStream`'s buffer size is set at 4 kilobytes.
86 //86 //
87-// To create a buffered output stream, use g_buffered_output_stream_new(),87+// To create a buffered output stream, use [ctor@Gio.BufferedOutputStream.new],
88-// or g_buffered_output_stream_new_sized() to specify the buffer's size88+// or [ctor@Gio.BufferedOutputStream.new_sized] to specify the buffer's size
89 // at construction.89 // at construction.
90 //90 //
91 // To get the size of a buffer within a buffered input stream, use91 // To get the size of a buffer within a buffered input stream, use
92-// g_buffered_output_stream_get_buffer_size(). To change the size of a92+// [method@Gio.BufferedOutputStream.get_buffer_size]. To change the size of a
93-// buffered output stream's buffer, use93+// buffered output stream's buffer, use [method@Gio.BufferedOutputStream.set_buffer_size].
94-// g_buffered_output_stream_set_buffer_size(). Note that the buffer's94+// Note that the buffer's size cannot be reduced below the size of the data within the buffer.
95-// size cannot be reduced below the size of the data within the buffer.
96 type BufferedOutputStream struct {95 type BufferedOutputStream struct {
97 FilterOutputStream96 FilterOutputStream
98 }97 }
A v4/gio/gbytesicon.go +178 -0
@@ -0,0 +1,178 @@
1+// Package gio was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT
2+package gio
3+
4+import (
5+ "github.com/jwijenbergh/purego"
6+ "github.com/jwijenbergh/puregotk/pkg/core"
7+ "github.com/jwijenbergh/puregotk/v4/glib"
8+ "github.com/jwijenbergh/puregotk/v4/gobject"
9+ "github.com/jwijenbergh/puregotk/v4/gobject/types"
10+)
11+
12+// `GBytesIcon` specifies an image held in memory in a common format (usually
13+// PNG) to be used as icon.
14+type BytesIcon struct {
15+ gobject.Object
16+}
17+
18+var xBytesIconGLibType func() types.GType
19+
20+func BytesIconGLibType() types.GType {
21+ return xBytesIconGLibType()
22+}
23+
24+func BytesIconNewFromInternalPtr(ptr uintptr) *BytesIcon {
25+ cls := &BytesIcon{}
26+ cls.Ptr = ptr
27+ return cls
28+}
29+
30+var xNewBytesIcon func(*glib.Bytes) uintptr
31+
32+// Creates a new icon for a bytes.
33+//
34+// This cannot fail, but loading and interpreting the bytes may fail later on
35+// (for example, if g_loadable_icon_load() is called) if the image is invalid.
36+func NewBytesIcon(BytesVar *glib.Bytes) *BytesIcon {
37+ var cls *BytesIcon
38+
39+ cret := xNewBytesIcon(BytesVar)
40+
41+ if cret == 0 {
42+ return nil
43+ }
44+ cls = &BytesIcon{}
45+ cls.Ptr = cret
46+ return cls
47+}
48+
49+var xBytesIconGetBytes func(uintptr) *glib.Bytes
50+
51+// Gets the #GBytes associated with the given @icon.
52+func (x *BytesIcon) GetBytes() *glib.Bytes {
53+
54+ cret := xBytesIconGetBytes(x.GoPointer())
55+ return cret
56+}
57+
58+func (c *BytesIcon) GoPointer() uintptr {
59+ if c == nil {
60+ return 0
61+ }
62+ return c.Ptr
63+}
64+
65+func (c *BytesIcon) SetGoPointer(ptr uintptr) {
66+ c.Ptr = ptr
67+}
68+
69+// Checks if two icons are equal.
70+func (x *BytesIcon) Equal(Icon2Var Icon) bool {
71+
72+ cret := XGIconEqual(x.GoPointer(), Icon2Var.GoPointer())
73+ return cret
74+}
75+
76+// Gets a hash for an icon.
77+func (x *BytesIcon) Hash() uint {
78+
79+ cret := XGIconHash(x.GoPointer())
80+ return cret
81+}
82+
83+// Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved
84+// back by calling g_icon_deserialize() on the returned value.
85+// As serialization will avoid using raw icon data when possible, it only
86+// makes sense to transfer the #GVariant between processes on the same machine,
87+// (as opposed to over the network), and within the same file system namespace.
88+func (x *BytesIcon) Serialize() *glib.Variant {
89+
90+ cret := XGIconSerialize(x.GoPointer())
91+ return cret
92+}
93+
94+// Generates a textual representation of @icon that can be used for
95+// serialization such as when passing @icon to a different process or
96+// saving it to persistent storage. Use g_icon_new_for_string() to
97+// get @icon back from the returned string.
98+//
99+// The encoding of the returned string is proprietary to #GIcon except
100+// in the following two cases
101+//
102+// - If @icon is a #GFileIcon, the returned string is a native path
103+// (such as `/path/to/my icon.png`) without escaping
104+// if the #GFile for @icon is a native file. If the file is not
105+// native, the returned string is the result of g_file_get_uri()
106+// (such as `sftp://path/to/my%20icon.png`).
107+//
108+// - If @icon is a #GThemedIcon with exactly one name and no fallbacks,
109+// the encoding is simply the name (such as `network-server`).
110+func (x *BytesIcon) ToString() string {
111+
112+ cret := XGIconToString(x.GoPointer())
113+ return cret
114+}
115+
116+// Loads a loadable icon. For the asynchronous version of this function,
117+// see g_loadable_icon_load_async().
118+func (x *BytesIcon) Load(SizeVar int, TypeVar string, CancellableVar *Cancellable) (*InputStream, error) {
119+ var cls *InputStream
120+ var cerr *glib.Error
121+
122+ cret := XGLoadableIconLoad(x.GoPointer(), SizeVar, TypeVar, CancellableVar.GoPointer(), &cerr)
123+
124+ if cret == 0 {
125+ return nil, cerr
126+ }
127+ cls = &InputStream{}
128+ cls.Ptr = cret
129+ if cerr == nil {
130+ return cls, nil
131+ }
132+ return cls, cerr
133+
134+}
135+
136+// Loads an icon asynchronously. To finish this function, see
137+// g_loadable_icon_load_finish(). For the synchronous, blocking
138+// version of this function, see g_loadable_icon_load().
139+func (x *BytesIcon) LoadAsync(SizeVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
140+
141+ XGLoadableIconLoadAsync(x.GoPointer(), SizeVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
142+
143+}
144+
145+// Finishes an asynchronous icon load started in g_loadable_icon_load_async().
146+func (x *BytesIcon) LoadFinish(ResVar AsyncResult, TypeVar string) (*InputStream, error) {
147+ var cls *InputStream
148+ var cerr *glib.Error
149+
150+ cret := XGLoadableIconLoadFinish(x.GoPointer(), ResVar.GoPointer(), TypeVar, &cerr)
151+
152+ if cret == 0 {
153+ return nil, cerr
154+ }
155+ cls = &InputStream{}
156+ cls.Ptr = cret
157+ if cerr == nil {
158+ return cls, nil
159+ }
160+ return cls, cerr
161+
162+}
163+
164+func init() {
165+ core.SetPackageName("GIO", "gio-2.0")
166+ core.SetSharedLibrary("GIO", "libgio-2.0.so.0")
167+ lib, err := purego.Dlopen(core.GetPath("GIO"), purego.RTLD_NOW|purego.RTLD_GLOBAL)
168+ if err != nil {
169+ panic(err)
170+ }
171+
172+ core.PuregoSafeRegister(&xBytesIconGLibType, lib, "g_bytes_icon_get_type")
173+
174+ core.PuregoSafeRegister(&xNewBytesIcon, lib, "g_bytes_icon_new")
175+
176+ core.PuregoSafeRegister(&xBytesIconGetBytes, lib, "g_bytes_icon_get_bytes")
177+
178+}
M v4/gio/gcancellable.go +43 -6
@@ -180,7 +180,9 @@ func (x *CancellablePrivate) GoPointer() uintptr {
180 return uintptr(unsafe.Pointer(x))180 return uintptr(unsafe.Pointer(x))
181 }181 }
182 182
183-// GCancellable is a thread-safe operation cancellation stack used183+// `GCancellable` allows operations to be cancelled.
184+//
185+// `GCancellable` is a thread-safe operation cancellation stack used
184 // throughout GIO to allow for cancellation of synchronous and186 // throughout GIO to allow for cancellation of synchronous and
185 // asynchronous operations.187 // asynchronous operations.
186 type Cancellable struct {188 type Cancellable struct {
@@ -240,6 +242,9 @@ var xCancellableCancel func(uintptr)
240 // cancel the operation from the same thread in which it is running,242 // cancel the operation from the same thread in which it is running,
241 // then the operation's #GAsyncReadyCallback will not be invoked until243 // then the operation's #GAsyncReadyCallback will not be invoked until
242 // the application returns to the main loop.244 // the application returns to the main loop.
245+//
246+// It is safe (although useless, since it will be a no-op) to call
247+// this function from a [signal@Gio.Cancellable::cancelled] signal handler.
243 func (x *Cancellable) Cancel() {248 func (x *Cancellable) Cancel() {
244 249
245 xCancellableCancel(x.GoPointer())250 xCancellableCancel(x.GoPointer())
@@ -252,9 +257,14 @@ var xCancellableConnect func(uintptr, uintptr, uintptr, uintptr) uint32
252 // signal. Also handles the race condition that may happen257 // signal. Also handles the race condition that may happen
253 // if the cancellable is cancelled right before connecting.258 // if the cancellable is cancelled right before connecting.
254 //259 //
255-// @callback is called at most once, either directly at the260+// @callback is called exactly once each time @cancellable is cancelled,
256-// time of the connect if @cancellable is already cancelled,261+// either directly at the time of the connect if @cancellable is already
257-// or when @cancellable is cancelled in some thread.262+// cancelled, or when @cancellable is cancelled in some thread.
263+// In case the cancellable is reset via [method@Gio.Cancellable.reset]
264+// then the callback can be called again if the @cancellable is cancelled and
265+// if it had not been previously cancelled at the time
266+// [method@Gio.Cancellable.connect] was called (e.g. if the connection actually
267+// took place, returning a non-zero value).
258 //268 //
259 // @data_destroy_func will be called when the handler is269 // @data_destroy_func will be called when the handler is
260 // disconnected, or immediately if the cancellable is already270 // disconnected, or immediately if the cancellable is already
@@ -263,9 +273,21 @@ var xCancellableConnect func(uintptr, uintptr, uintptr, uintptr) uint32
263 // See #GCancellable::cancelled for details on how to use this.273 // See #GCancellable::cancelled for details on how to use this.
264 //274 //
265 // Since GLib 2.40, the lock protecting @cancellable is not held when275 // Since GLib 2.40, the lock protecting @cancellable is not held when
266-// @callback is invoked. This lifts a restriction in place for276+// @callback is invoked. This lifts a restriction in place for
267 // earlier GLib versions which now makes it easier to write cleanup277 // earlier GLib versions which now makes it easier to write cleanup
268-// code that unconditionally invokes e.g. g_cancellable_cancel().278+// code that unconditionally invokes e.g. [method@Gio.Cancellable.cancel].
279+// Note that since 2.82 GLib still holds a lock during the callback but it’s
280+// designed in a way that most of the [class@Gio.Cancellable] methods can be
281+// called, including [method@Gio.Cancellable.cancel] or
282+// [method@GObject.Object.unref].
283+//
284+// There are still some methods that will deadlock (by design) when
285+// called from the [signal@Gio.Cancellable::cancelled] callbacks:
286+// - [method@Gio.Cancellable.connect]
287+// - [method@Gio.Cancellable.disconnect]
288+// - [method@Gio.Cancellable.reset]
289+// - [method@Gio.Cancellable.make_pollfd]
290+// - [method@Gio.Cancellable.release_fd]
269 func (x *Cancellable) Connect(CallbackVar *gobject.Callback, DataVar uintptr, DataDestroyFuncVar *glib.DestroyNotify) uint32 {291 func (x *Cancellable) Connect(CallbackVar *gobject.Callback, DataVar uintptr, DataDestroyFuncVar *glib.DestroyNotify) uint32 {
270 292
271 cret := xCancellableConnect(x.GoPointer(), glib.NewCallback(CallbackVar), DataVar, glib.NewCallbackNullable(DataDestroyFuncVar))293 cret := xCancellableConnect(x.GoPointer(), glib.NewCallback(CallbackVar), DataVar, glib.NewCallbackNullable(DataDestroyFuncVar))
@@ -344,6 +366,11 @@ var xCancellableMakePollfd func(uintptr, *glib.PollFD) bool
344 // You are not supposed to read from the fd yourself, just check for366 // You are not supposed to read from the fd yourself, just check for
345 // readable status. Reading to unset the readable status is done367 // readable status. Reading to unset the readable status is done
346 // with g_cancellable_reset().368 // with g_cancellable_reset().
369+//
370+// Note that in the event that a [signal@Gio.Cancellable::cancelled] signal handler is
371+// currently running, this call will block until the handler has finished.
372+// Calling this function from a signal handler will therefore result in a
373+// deadlock.
347 func (x *Cancellable) MakePollfd(PollfdVar *glib.PollFD) bool {374 func (x *Cancellable) MakePollfd(PollfdVar *glib.PollFD) bool {
348 375
349 cret := xCancellableMakePollfd(x.GoPointer(), PollfdVar)376 cret := xCancellableMakePollfd(x.GoPointer(), PollfdVar)
@@ -387,6 +414,11 @@ var xCancellableReleaseFd func(uintptr)
387 // block scarce file descriptors until it is finalized if this function414 // block scarce file descriptors until it is finalized if this function
388 // is not called. This can cause the application to run out of file415 // is not called. This can cause the application to run out of file
389 // descriptors when many #GCancellables are used at the same time.416 // descriptors when many #GCancellables are used at the same time.
417+//
418+// Note that in the event that a [signal@Gio.Cancellable::cancelled] signal handler is
419+// currently running, this call will block until the handler has finished.
420+// Calling this function from a signal handler will therefore result in a
421+// deadlock.
390 func (x *Cancellable) ReleaseFd() {422 func (x *Cancellable) ReleaseFd() {
391 423
392 xCancellableReleaseFd(x.GoPointer())424 xCancellableReleaseFd(x.GoPointer())
@@ -406,6 +438,11 @@ var xCancellableReset func(uintptr)
406 // is to drop the reference to a cancellable after cancelling it,438 // is to drop the reference to a cancellable after cancelling it,
407 // and let it die with the outstanding async operations. You should439 // and let it die with the outstanding async operations. You should
408 // create a fresh cancellable for further async operations.440 // create a fresh cancellable for further async operations.
441+//
442+// In the event that a [signal@Gio.Cancellable::cancelled] signal handler is currently
443+// running, this call will block until the handler has finished.
444+// Calling this function from a signal handler will therefore result in a
445+// deadlock.
409 func (x *Cancellable) Reset() {446 func (x *Cancellable) Reset() {
410 447
411 xCancellableReset(x.GoPointer())448 xCancellableReset(x.GoPointer())
M v4/gio/gcharsetconverter.go +15 -3
@@ -22,8 +22,8 @@ func (x *CharsetConverterClass) GoPointer() uintptr {
22 return uintptr(unsafe.Pointer(x))22 return uintptr(unsafe.Pointer(x))
23 }23 }
24 24
25-// #GCharsetConverter is an implementation of #GConverter based on25+// `GCharsetConverter` is an implementation of [iface@Gio.Converter] based on
26-// GIConv.26+// [struct@GLib.IConv].
27 type CharsetConverter struct {27 type CharsetConverter struct {
28 gobject.Object28 gobject.Object
29 }29 }
@@ -192,6 +192,18 @@ func (x *CharsetConverter) Convert(InbufVar []byte, InbufSizeVar uint, OutbufVar
192 192
193 }193 }
194 194
195+// Applies @converter to the data in @bytes.
196+func (x *CharsetConverter) ConvertBytes(BytesVar *glib.Bytes) (*glib.Bytes, error) {
197+ var cerr *glib.Error
198+
199+ cret := XGConverterConvertBytes(x.GoPointer(), BytesVar, &cerr)
200+ if cerr == nil {
201+ return cret, nil
202+ }
203+ return cret, cerr
204+
205+}
206+
195 // Resets all internal state in the converter, making it behave207 // Resets all internal state in the converter, making it behave
196 // as if it was just created. If the converter has any internal208 // as if it was just created. If the converter has any internal
197 // state that would produce output then that output is lost.209 // state that would produce output then that output is lost.
@@ -219,7 +231,7 @@ func (x *CharsetConverter) Reset() {
219 // If the object is not initialized, or initialization returns with an231 // If the object is not initialized, or initialization returns with an
220 // error, then all operations on the object except g_object_ref() and232 // error, then all operations on the object except g_object_ref() and
221 // g_object_unref() are considered to be invalid, and have undefined233 // g_object_unref() are considered to be invalid, and have undefined
222-// behaviour. See the [introduction][ginitable] for more details.234+// behaviour. See the [description][iface@Gio.Initable#description] for more details.
223 //235 //
224 // Callers should not assume that a class which implements #GInitable can be236 // Callers should not assume that a class which implements #GInitable can be
225 // initialized multiple times, unless the class explicitly documents itself as237 // initialized multiple times, unless the class explicitly documents itself as
M v4/gio/gconverter.go +22 -1
@@ -29,6 +29,7 @@ func (x *ConverterIface) GoPointer() uintptr {
29 }29 }
30 30
31 // OverrideConvert sets the callback function.31 // OverrideConvert sets the callback function.
32+// Converts data.
32 func (x *ConverterIface) OverrideConvert(cb func(Converter, []byte, uint, []byte, uint, ConverterFlags, uint, uint) ConverterResult) {33 func (x *ConverterIface) OverrideConvert(cb func(Converter, []byte, uint, []byte, uint, ConverterFlags, uint, uint) ConverterResult) {
33 if cb == nil {34 if cb == nil {
34 x.xConvert = 035 x.xConvert = 0
@@ -40,6 +41,7 @@ func (x *ConverterIface) OverrideConvert(cb func(Converter, []byte, uint, []byte
40 }41 }
41 42
42 // GetConvert gets the callback function.43 // GetConvert gets the callback function.
44+// Converts data.
43 func (x *ConverterIface) GetConvert() func(Converter, []byte, uint, []byte, uint, ConverterFlags, uint, uint) ConverterResult {45 func (x *ConverterIface) GetConvert() func(Converter, []byte, uint, []byte, uint, ConverterFlags, uint, uint) ConverterResult {
44 if x.xConvert == 0 {46 if x.xConvert == 0 {
45 return nil47 return nil
@@ -52,6 +54,7 @@ func (x *ConverterIface) GetConvert() func(Converter, []byte, uint, []byte, uint
52 }54 }
53 55
54 // OverrideReset sets the callback function.56 // OverrideReset sets the callback function.
57+// Reverts the internal state of the converter to its initial state.
55 func (x *ConverterIface) OverrideReset(cb func(Converter)) {58 func (x *ConverterIface) OverrideReset(cb func(Converter)) {
56 if cb == nil {59 if cb == nil {
57 x.xReset = 060 x.xReset = 0
@@ -63,6 +66,7 @@ func (x *ConverterIface) OverrideReset(cb func(Converter)) {
63 }66 }
64 67
65 // GetReset gets the callback function.68 // GetReset gets the callback function.
69+// Reverts the internal state of the converter to its initial state.
66 func (x *ConverterIface) GetReset() func(Converter) {70 func (x *ConverterIface) GetReset() func(Converter) {
67 if x.xReset == 0 {71 if x.xReset == 0 {
68 return nil72 return nil
@@ -74,7 +78,9 @@ func (x *ConverterIface) GetReset() func(Converter) {
74 }78 }
75 }79 }
76 80
77-// #GConverter is implemented by objects that convert81+// `GConverter` is an interface for streaming conversions.
82+//
83+// `GConverter` is implemented by objects that convert
78 // binary data in various ways. The conversion can be84 // binary data in various ways. The conversion can be
79 // stateful and may fail at any place.85 // stateful and may fail at any place.
80 //86 //
@@ -85,6 +91,7 @@ type Converter interface {
85 GoPointer() uintptr91 GoPointer() uintptr
86 SetGoPointer(uintptr)92 SetGoPointer(uintptr)
87 Convert(InbufVar []byte, InbufSizeVar uint, OutbufVar []byte, OutbufSizeVar uint, FlagsVar ConverterFlags, BytesReadVar uint, BytesWrittenVar uint) (ConverterResult, error)93 Convert(InbufVar []byte, InbufSizeVar uint, OutbufVar []byte, OutbufSizeVar uint, FlagsVar ConverterFlags, BytesReadVar uint, BytesWrittenVar uint) (ConverterResult, error)
94+ ConvertBytes(BytesVar *glib.Bytes) (*glib.Bytes, error)
88 Reset()95 Reset()
89 }96 }
90 97
@@ -202,6 +209,18 @@ func (x *ConverterBase) Convert(InbufVar []byte, InbufSizeVar uint, OutbufVar []
202 209
203 }210 }
204 211
212+// Applies @converter to the data in @bytes.
213+func (x *ConverterBase) ConvertBytes(BytesVar *glib.Bytes) (*glib.Bytes, error) {
214+ var cerr *glib.Error
215+
216+ cret := XGConverterConvertBytes(x.GoPointer(), BytesVar, &cerr)
217+ if cerr == nil {
218+ return cret, nil
219+ }
220+ return cret, cerr
221+
222+}
223+
205 // Resets all internal state in the converter, making it behave224 // Resets all internal state in the converter, making it behave
206 // as if it was just created. If the converter has any internal225 // as if it was just created. If the converter has any internal
207 // state that would produce output then that output is lost.226 // state that would produce output then that output is lost.
@@ -212,6 +231,7 @@ func (x *ConverterBase) Reset() {
212 }231 }
213 232
214 var XGConverterConvert func(uintptr, []byte, uint, []byte, uint, ConverterFlags, uint, uint, **glib.Error) ConverterResult233 var XGConverterConvert func(uintptr, []byte, uint, []byte, uint, ConverterFlags, uint, uint, **glib.Error) ConverterResult
234+var XGConverterConvertBytes func(uintptr, *glib.Bytes, **glib.Error) *glib.Bytes
215 var XGConverterReset func(uintptr)235 var XGConverterReset func(uintptr)
216 236
217 func init() {237 func init() {
@@ -225,6 +245,7 @@ func init() {
225 core.PuregoSafeRegister(&xConverterGLibType, lib, "g_converter_get_type")245 core.PuregoSafeRegister(&xConverterGLibType, lib, "g_converter_get_type")
226 246
227 core.PuregoSafeRegister(&XGConverterConvert, lib, "g_converter_convert")247 core.PuregoSafeRegister(&XGConverterConvert, lib, "g_converter_convert")
248+ core.PuregoSafeRegister(&XGConverterConvertBytes, lib, "g_converter_convert_bytes")
228 core.PuregoSafeRegister(&XGConverterReset, lib, "g_converter_reset")249 core.PuregoSafeRegister(&XGConverterReset, lib, "g_converter_reset")
229 250
230 }251 }
M v4/gio/gconverterinputstream.go +12 -3
@@ -155,11 +155,11 @@ func (x *ConverterInputStreamPrivate) GoPointer() uintptr {
155 return uintptr(unsafe.Pointer(x))155 return uintptr(unsafe.Pointer(x))
156 }156 }
157 157
158-// Converter input stream implements #GInputStream and allows158+// Converter input stream implements [class@Gio.InputStream] and allows
159 // conversion of data of various types during reading.159 // conversion of data of various types during reading.
160 //160 //
161-// As of GLib 2.34, #GConverterInputStream implements161+// As of GLib 2.34, `GConverterInputStream` implements
162-// #GPollableInputStream.162+// [iface@Gio.PollableInputStream].
163 type ConverterInputStream struct {163 type ConverterInputStream struct {
164 FilterInputStream164 FilterInputStream
165 }165 }
@@ -241,6 +241,9 @@ func (x *ConverterInputStream) CanPoll() bool {
241 // the stream may not actually be readable even after the source241 // the stream may not actually be readable even after the source
242 // triggers, so you should use g_pollable_input_stream_read_nonblocking()242 // triggers, so you should use g_pollable_input_stream_read_nonblocking()
243 // rather than g_input_stream_read() from the callback.243 // rather than g_input_stream_read() from the callback.
244+//
245+// The behaviour of this method is undefined if
246+// g_pollable_input_stream_can_poll() returns %FALSE for @stream.
244 func (x *ConverterInputStream) CreateSource(CancellableVar *Cancellable) *glib.Source {247 func (x *ConverterInputStream) CreateSource(CancellableVar *Cancellable) *glib.Source {
245 248
246 cret := XGPollableInputStreamCreateSource(x.GoPointer(), CancellableVar.GoPointer())249 cret := XGPollableInputStreamCreateSource(x.GoPointer(), CancellableVar.GoPointer())
@@ -255,6 +258,9 @@ func (x *ConverterInputStream) CreateSource(CancellableVar *Cancellable) *glib.S
255 // non-blocking behavior, you should always use258 // non-blocking behavior, you should always use
256 // g_pollable_input_stream_read_nonblocking(), which will return a259 // g_pollable_input_stream_read_nonblocking(), which will return a
257 // %G_IO_ERROR_WOULD_BLOCK error rather than blocking.260 // %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
261+//
262+// The behaviour of this method is undefined if
263+// g_pollable_input_stream_can_poll() returns %FALSE for @stream.
258 func (x *ConverterInputStream) IsReadable() bool {264 func (x *ConverterInputStream) IsReadable() bool {
259 265
260 cret := XGPollableInputStreamIsReadable(x.GoPointer())266 cret := XGPollableInputStreamIsReadable(x.GoPointer())
@@ -272,6 +278,9 @@ func (x *ConverterInputStream) IsReadable() bool {
272 // if @cancellable has already been cancelled when you call, which278 // if @cancellable has already been cancelled when you call, which
273 // may happen if you call this method after a source triggers due279 // may happen if you call this method after a source triggers due
274 // to having been cancelled.280 // to having been cancelled.
281+//
282+// The behaviour of this method is undefined if
283+// g_pollable_input_stream_can_poll() returns %FALSE for @stream.
275 func (x *ConverterInputStream) ReadNonblocking(BufferVar []byte, CountVar uint, CancellableVar *Cancellable) (int, error) {284 func (x *ConverterInputStream) ReadNonblocking(BufferVar []byte, CountVar uint, CancellableVar *Cancellable) (int, error) {
276 var cerr *glib.Error285 var cerr *glib.Error
277 286
M v4/gio/gconverteroutputstream.go +15 -3
@@ -155,11 +155,11 @@ func (x *ConverterOutputStreamPrivate) GoPointer() uintptr {
155 return uintptr(unsafe.Pointer(x))155 return uintptr(unsafe.Pointer(x))
156 }156 }
157 157
158-// Converter output stream implements #GOutputStream and allows158+// Converter output stream implements [class@Gio.OutputStream] and allows
159 // conversion of data of various types during reading.159 // conversion of data of various types during reading.
160 //160 //
161-// As of GLib 2.34, #GConverterOutputStream implements161+// As of GLib 2.34, `GConverterOutputStream` implements
162-// #GPollableOutputStream.162+// [iface@Gio.PollableOutputStream].
163 type ConverterOutputStream struct {163 type ConverterOutputStream struct {
164 FilterOutputStream164 FilterOutputStream
165 }165 }
@@ -241,6 +241,9 @@ func (x *ConverterOutputStream) CanPoll() bool {
241 // the stream may not actually be writable even after the source241 // the stream may not actually be writable even after the source
242 // triggers, so you should use g_pollable_output_stream_write_nonblocking()242 // triggers, so you should use g_pollable_output_stream_write_nonblocking()
243 // rather than g_output_stream_write() from the callback.243 // rather than g_output_stream_write() from the callback.
244+//
245+// The behaviour of this method is undefined if
246+// g_pollable_output_stream_can_poll() returns %FALSE for @stream.
244 func (x *ConverterOutputStream) CreateSource(CancellableVar *Cancellable) *glib.Source {247 func (x *ConverterOutputStream) CreateSource(CancellableVar *Cancellable) *glib.Source {
245 248
246 cret := XGPollableOutputStreamCreateSource(x.GoPointer(), CancellableVar.GoPointer())249 cret := XGPollableOutputStreamCreateSource(x.GoPointer(), CancellableVar.GoPointer())
@@ -255,6 +258,9 @@ func (x *ConverterOutputStream) CreateSource(CancellableVar *Cancellable) *glib.
255 // non-blocking behavior, you should always use258 // non-blocking behavior, you should always use
256 // g_pollable_output_stream_write_nonblocking(), which will return a259 // g_pollable_output_stream_write_nonblocking(), which will return a
257 // %G_IO_ERROR_WOULD_BLOCK error rather than blocking.260 // %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
261+//
262+// The behaviour of this method is undefined if
263+// g_pollable_output_stream_can_poll() returns %FALSE for @stream.
258 func (x *ConverterOutputStream) IsWritable() bool {264 func (x *ConverterOutputStream) IsWritable() bool {
259 265
260 cret := XGPollableOutputStreamIsWritable(x.GoPointer())266 cret := XGPollableOutputStreamIsWritable(x.GoPointer())
@@ -276,6 +282,9 @@ func (x *ConverterOutputStream) IsWritable() bool {
276 // Also note that if %G_IO_ERROR_WOULD_BLOCK is returned some underlying282 // Also note that if %G_IO_ERROR_WOULD_BLOCK is returned some underlying
277 // transports like D/TLS require that you re-send the same @buffer and283 // transports like D/TLS require that you re-send the same @buffer and
278 // @count in the next write call.284 // @count in the next write call.
285+//
286+// The behaviour of this method is undefined if
287+// g_pollable_output_stream_can_poll() returns %FALSE for @stream.
279 func (x *ConverterOutputStream) WriteNonblocking(BufferVar []byte, CountVar uint, CancellableVar *Cancellable) (int, error) {288 func (x *ConverterOutputStream) WriteNonblocking(BufferVar []byte, CountVar uint, CancellableVar *Cancellable) (int, error) {
280 var cerr *glib.Error289 var cerr *glib.Error
281 290
@@ -303,6 +312,9 @@ func (x *ConverterOutputStream) WriteNonblocking(BufferVar []byte, CountVar uint
303 // Also note that if %G_POLLABLE_RETURN_WOULD_BLOCK is returned some underlying312 // Also note that if %G_POLLABLE_RETURN_WOULD_BLOCK is returned some underlying
304 // transports like D/TLS require that you re-send the same @vectors and313 // transports like D/TLS require that you re-send the same @vectors and
305 // @n_vectors in the next write call.314 // @n_vectors in the next write call.
315+//
316+// The behaviour of this method is undefined if
317+// g_pollable_output_stream_can_poll() returns %FALSE for @stream.
306 func (x *ConverterOutputStream) WritevNonblocking(VectorsVar []OutputVector, NVectorsVar uint, BytesWrittenVar uint, CancellableVar *Cancellable) (PollableReturn, error) {318 func (x *ConverterOutputStream) WritevNonblocking(VectorsVar []OutputVector, NVectorsVar uint, BytesWrittenVar uint, CancellableVar *Cancellable) (PollableReturn, error) {
307 var cerr *glib.Error319 var cerr *glib.Error
308 320
M v4/gio/gcredentials.go +26 -28
@@ -21,43 +21,41 @@ func (x *CredentialsClass) GoPointer() uintptr {
21 return uintptr(unsafe.Pointer(x))21 return uintptr(unsafe.Pointer(x))
22 }22 }
23 23
24-// The #GCredentials type is a reference-counted wrapper for native24+// The `GCredentials` type is a reference-counted wrapper for native
25-// credentials. This information is typically used for identifying,25+// credentials.
26+//
27+// The information in `GCredentials` is typically used for identifying,
26 // authenticating and authorizing other processes.28 // authenticating and authorizing other processes.
27 //29 //
28-// Some operating systems supports looking up the credentials of the30+// Some operating systems supports looking up the credentials of the remote
29-// remote peer of a communication endpoint - see e.g.31+// peer of a communication endpoint - see e.g. [method@Gio.Socket.get_credentials].
30-// g_socket_get_credentials().
31 //32 //
32 // Some operating systems supports securely sending and receiving33 // Some operating systems supports securely sending and receiving
33-// credentials over a Unix Domain Socket, see34+// credentials over a Unix Domain Socket, see [class@Gio.UnixCredentialsMessage],
34-// #GUnixCredentialsMessage, g_unix_connection_send_credentials() and35+// [method@Gio.UnixConnection.send_credentials] and
35-// g_unix_connection_receive_credentials() for details.36+// [method@Gio.UnixConnection.receive_credentials] for details.
36 //37 //
37 // On Linux, the native credential type is a `struct ucred` - see the38 // On Linux, the native credential type is a `struct ucred` - see the
38-// unix(7) man page for details. This corresponds to39+// [`unix(7)` man page](man:unix(7)) for details. This corresponds to
39-// %G_CREDENTIALS_TYPE_LINUX_UCRED.40+// `G_CREDENTIALS_TYPE_LINUX_UCRED`.
40 //41 //
41-// On Apple operating systems (including iOS, tvOS, and macOS),42+// On Apple operating systems (including iOS, tvOS, and macOS), the native credential
42-// the native credential type is a `struct xucred`.43+// type is a `struct xucred`. This corresponds to `G_CREDENTIALS_TYPE_APPLE_XUCRED`.
43-// This corresponds to %G_CREDENTIALS_TYPE_APPLE_XUCRED.
44 //44 //
45-// On FreeBSD, Debian GNU/kFreeBSD, and GNU/Hurd, the native45+// On FreeBSD, Debian GNU/kFreeBSD, and GNU/Hurd, the native credential type is a
46-// credential type is a `struct cmsgcred`. This corresponds46+// `struct cmsgcred`. This corresponds to `G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED`.
47-// to %G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED.
48 //47 //
49 // On NetBSD, the native credential type is a `struct unpcbid`.48 // On NetBSD, the native credential type is a `struct unpcbid`.
50-// This corresponds to %G_CREDENTIALS_TYPE_NETBSD_UNPCBID.49+// This corresponds to `G_CREDENTIALS_TYPE_NETBSD_UNPCBID`.
51 //50 //
52 // On OpenBSD, the native credential type is a `struct sockpeercred`.51 // On OpenBSD, the native credential type is a `struct sockpeercred`.
53-// This corresponds to %G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED.52+// This corresponds to `G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED`.
54 //53 //
55-// On Solaris (including OpenSolaris and its derivatives), the native54+// On Solaris (including OpenSolaris and its derivatives), the native credential type
56-// credential type is a `ucred_t`. This corresponds to55+// is a `ucred_t`. This corresponds to `G_CREDENTIALS_TYPE_SOLARIS_UCRED`.
57-// %G_CREDENTIALS_TYPE_SOLARIS_UCRED.
58 //56 //
59 // Since GLib 2.72, on Windows, the native credentials may contain the PID of a57 // Since GLib 2.72, on Windows, the native credentials may contain the PID of a
60-// process. This corresponds to %G_CREDENTIALS_TYPE_WIN32_PID.58+// process. This corresponds to `G_CREDENTIALS_TYPE_WIN32_PID`.
61 type Credentials struct {59 type Credentials struct {
62 gobject.Object60 gobject.Object
63 }61 }
@@ -105,7 +103,7 @@ func (x *Credentials) GetNative(NativeTypeVar CredentialsType) uintptr {
105 return cret103 return cret
106 }104 }
107 105
108-var xCredentialsGetUnixPid func(uintptr) int106+var xCredentialsGetUnixPid func(uintptr) pid_t
109 107
110 // Tries to get the UNIX process identifier from @credentials. This108 // Tries to get the UNIX process identifier from @credentials. This
111 // method is only available on UNIX platforms.109 // method is only available on UNIX platforms.
@@ -113,7 +111,7 @@ var xCredentialsGetUnixPid func(uintptr) int
113 // This operation can fail if #GCredentials is not supported on the111 // This operation can fail if #GCredentials is not supported on the
114 // OS or if the native credentials type does not contain information112 // OS or if the native credentials type does not contain information
115 // about the UNIX process ID.113 // about the UNIX process ID.
116-func (x *Credentials) GetUnixPid() (int, error) {114+func (x *Credentials) GetUnixPid() (pid_t, error) {
117 var cerr *glib.Error115 var cerr *glib.Error
118 116
119 cret := xCredentialsGetUnixPid(x.GoPointer())117 cret := xCredentialsGetUnixPid(x.GoPointer())
@@ -124,7 +122,7 @@ func (x *Credentials) GetUnixPid() (int, error) {
124 122
125 }123 }
126 124
127-var xCredentialsGetUnixUser func(uintptr) uint125+var xCredentialsGetUnixUser func(uintptr) uid_t
128 126
129 // Tries to get the UNIX user identifier from @credentials. This127 // Tries to get the UNIX user identifier from @credentials. This
130 // method is only available on UNIX platforms.128 // method is only available on UNIX platforms.
@@ -132,7 +130,7 @@ var xCredentialsGetUnixUser func(uintptr) uint
132 // This operation can fail if #GCredentials is not supported on the130 // This operation can fail if #GCredentials is not supported on the
133 // OS or if the native credentials type does not contain information131 // OS or if the native credentials type does not contain information
134 // about the UNIX user.132 // about the UNIX user.
135-func (x *Credentials) GetUnixUser() (uint, error) {133+func (x *Credentials) GetUnixUser() (uid_t, error) {
136 var cerr *glib.Error134 var cerr *glib.Error
137 135
138 cret := xCredentialsGetUnixUser(x.GoPointer())136 cret := xCredentialsGetUnixUser(x.GoPointer())
@@ -174,7 +172,7 @@ func (x *Credentials) SetNative(NativeTypeVar CredentialsType, NativeVar uintptr
174 172
175 }173 }
176 174
177-var xCredentialsSetUnixUser func(uintptr, uint, **glib.Error) bool175+var xCredentialsSetUnixUser func(uintptr, uid_t, **glib.Error) bool
178 176
179 // Tries to set the UNIX user identifier on @credentials. This method177 // Tries to set the UNIX user identifier on @credentials. This method
180 // is only available on UNIX platforms.178 // is only available on UNIX platforms.
@@ -183,7 +181,7 @@ var xCredentialsSetUnixUser func(uintptr, uint, **glib.Error) bool
183 // OS or if the native credentials type does not contain information181 // OS or if the native credentials type does not contain information
184 // about the UNIX user. It can also fail if the OS does not allow the182 // about the UNIX user. It can also fail if the OS does not allow the
185 // use of "spoofed" credentials.183 // use of "spoofed" credentials.
186-func (x *Credentials) SetUnixUser(UidVar uint) (bool, error) {184+func (x *Credentials) SetUnixUser(UidVar uid_t) (bool, error) {
187 var cerr *glib.Error185 var cerr *glib.Error
188 186
189 cret := xCredentialsSetUnixUser(x.GoPointer(), UidVar, &cerr)187 cret := xCredentialsSetUnixUser(x.GoPointer(), UidVar, &cerr)
M v4/gio/gdatagrambased.go +36 -20
@@ -37,6 +37,7 @@ func (x *DatagramBasedInterface) GoPointer() uintptr {
37 }37 }
38 38
39 // OverrideReceiveMessages sets the callback function.39 // OverrideReceiveMessages sets the callback function.
40+// Virtual method for g_datagram_based_receive_messages().
40 func (x *DatagramBasedInterface) OverrideReceiveMessages(cb func(DatagramBased, []InputMessage, uint, int, int64, *Cancellable) int) {41 func (x *DatagramBasedInterface) OverrideReceiveMessages(cb func(DatagramBased, []InputMessage, uint, int, int64, *Cancellable) int) {
41 if cb == nil {42 if cb == nil {
42 x.xReceiveMessages = 043 x.xReceiveMessages = 0
@@ -48,6 +49,7 @@ func (x *DatagramBasedInterface) OverrideReceiveMessages(cb func(DatagramBased,
48 }49 }
49 50
50 // GetReceiveMessages gets the callback function.51 // GetReceiveMessages gets the callback function.
52+// Virtual method for g_datagram_based_receive_messages().
51 func (x *DatagramBasedInterface) GetReceiveMessages() func(DatagramBased, []InputMessage, uint, int, int64, *Cancellable) int {53 func (x *DatagramBasedInterface) GetReceiveMessages() func(DatagramBased, []InputMessage, uint, int, int64, *Cancellable) int {
52 if x.xReceiveMessages == 0 {54 if x.xReceiveMessages == 0 {
53 return nil55 return nil
@@ -60,6 +62,7 @@ func (x *DatagramBasedInterface) GetReceiveMessages() func(DatagramBased, []Inpu
60 }62 }
61 63
62 // OverrideSendMessages sets the callback function.64 // OverrideSendMessages sets the callback function.
65+// Virtual method for g_datagram_based_send_messages().
63 func (x *DatagramBasedInterface) OverrideSendMessages(cb func(DatagramBased, []OutputMessage, uint, int, int64, *Cancellable) int) {66 func (x *DatagramBasedInterface) OverrideSendMessages(cb func(DatagramBased, []OutputMessage, uint, int, int64, *Cancellable) int) {
64 if cb == nil {67 if cb == nil {
65 x.xSendMessages = 068 x.xSendMessages = 0
@@ -71,6 +74,7 @@ func (x *DatagramBasedInterface) OverrideSendMessages(cb func(DatagramBased, []O
71 }74 }
72 75
73 // GetSendMessages gets the callback function.76 // GetSendMessages gets the callback function.
77+// Virtual method for g_datagram_based_send_messages().
74 func (x *DatagramBasedInterface) GetSendMessages() func(DatagramBased, []OutputMessage, uint, int, int64, *Cancellable) int {78 func (x *DatagramBasedInterface) GetSendMessages() func(DatagramBased, []OutputMessage, uint, int, int64, *Cancellable) int {
75 if x.xSendMessages == 0 {79 if x.xSendMessages == 0 {
76 return nil80 return nil
@@ -83,6 +87,7 @@ func (x *DatagramBasedInterface) GetSendMessages() func(DatagramBased, []OutputM
83 }87 }
84 88
85 // OverrideCreateSource sets the callback function.89 // OverrideCreateSource sets the callback function.
90+// Virtual method for g_datagram_based_create_source().
86 func (x *DatagramBasedInterface) OverrideCreateSource(cb func(DatagramBased, glib.IOCondition, *Cancellable) *glib.Source) {91 func (x *DatagramBasedInterface) OverrideCreateSource(cb func(DatagramBased, glib.IOCondition, *Cancellable) *glib.Source) {
87 if cb == nil {92 if cb == nil {
88 x.xCreateSource = 093 x.xCreateSource = 0
@@ -94,6 +99,7 @@ func (x *DatagramBasedInterface) OverrideCreateSource(cb func(DatagramBased, gli
94 }99 }
95 100
96 // GetCreateSource gets the callback function.101 // GetCreateSource gets the callback function.
102+// Virtual method for g_datagram_based_create_source().
97 func (x *DatagramBasedInterface) GetCreateSource() func(DatagramBased, glib.IOCondition, *Cancellable) *glib.Source {103 func (x *DatagramBasedInterface) GetCreateSource() func(DatagramBased, glib.IOCondition, *Cancellable) *glib.Source {
98 if x.xCreateSource == 0 {104 if x.xCreateSource == 0 {
99 return nil105 return nil
@@ -106,6 +112,7 @@ func (x *DatagramBasedInterface) GetCreateSource() func(DatagramBased, glib.IOCo
106 }112 }
107 113
108 // OverrideConditionCheck sets the callback function.114 // OverrideConditionCheck sets the callback function.
115+// Virtual method for g_datagram_based_condition_check().
109 func (x *DatagramBasedInterface) OverrideConditionCheck(cb func(DatagramBased, glib.IOCondition) glib.IOCondition) {116 func (x *DatagramBasedInterface) OverrideConditionCheck(cb func(DatagramBased, glib.IOCondition) glib.IOCondition) {
110 if cb == nil {117 if cb == nil {
111 x.xConditionCheck = 0118 x.xConditionCheck = 0
@@ -117,6 +124,7 @@ func (x *DatagramBasedInterface) OverrideConditionCheck(cb func(DatagramBased, g
117 }124 }
118 125
119 // GetConditionCheck gets the callback function.126 // GetConditionCheck gets the callback function.
127+// Virtual method for g_datagram_based_condition_check().
120 func (x *DatagramBasedInterface) GetConditionCheck() func(DatagramBased, glib.IOCondition) glib.IOCondition {128 func (x *DatagramBasedInterface) GetConditionCheck() func(DatagramBased, glib.IOCondition) glib.IOCondition {
121 if x.xConditionCheck == 0 {129 if x.xConditionCheck == 0 {
122 return nil130 return nil
@@ -129,6 +137,9 @@ func (x *DatagramBasedInterface) GetConditionCheck() func(DatagramBased, glib.IO
129 }137 }
130 138
131 // OverrideConditionWait sets the callback function.139 // OverrideConditionWait sets the callback function.
140+// Virtual method for
141+//
142+// g_datagram_based_condition_wait().
132 func (x *DatagramBasedInterface) OverrideConditionWait(cb func(DatagramBased, glib.IOCondition, int64, *Cancellable) bool) {143 func (x *DatagramBasedInterface) OverrideConditionWait(cb func(DatagramBased, glib.IOCondition, int64, *Cancellable) bool) {
133 if cb == nil {144 if cb == nil {
134 x.xConditionWait = 0145 x.xConditionWait = 0
@@ -140,6 +151,9 @@ func (x *DatagramBasedInterface) OverrideConditionWait(cb func(DatagramBased, gl
140 }151 }
141 152
142 // GetConditionWait gets the callback function.153 // GetConditionWait gets the callback function.
154+// Virtual method for
155+//
156+// g_datagram_based_condition_wait().
143 func (x *DatagramBasedInterface) GetConditionWait() func(DatagramBased, glib.IOCondition, int64, *Cancellable) bool {157 func (x *DatagramBasedInterface) GetConditionWait() func(DatagramBased, glib.IOCondition, int64, *Cancellable) bool {
144 if x.xConditionWait == 0 {158 if x.xConditionWait == 0 {
145 return nil159 return nil
@@ -151,52 +165,54 @@ func (x *DatagramBasedInterface) GetConditionWait() func(DatagramBased, glib.IOC
151 }165 }
152 }166 }
153 167
154-// A #GDatagramBased is a networking interface for representing datagram-based168+// Interface for socket-like objects with datagram semantics.
169+//
170+// A `GDatagramBased` is a networking interface for representing datagram-based
155 // communications. It is a more or less direct mapping of the core parts of the171 // communications. It is a more or less direct mapping of the core parts of the
156 // BSD socket API in a portable GObject interface. It is implemented by172 // BSD socket API in a portable GObject interface. It is implemented by
157-// #GSocket, which wraps the UNIX socket API on UNIX and winsock2 on Windows.173+// [class@Gio.Socket], which wraps the UNIX socket API on UNIX and winsock2 on Windows.
158 //174 //
159-// #GDatagramBased is entirely platform independent, and is intended to be used175+// `GDatagramBased` is entirely platform independent, and is intended to be used
160-// alongside higher-level networking APIs such as #GIOStream.176+// alongside higher-level networking APIs such as [class@Gio.IOStream].
161 //177 //
162 // It uses vectored scatter/gather I/O by default, allowing for many messages178 // It uses vectored scatter/gather I/O by default, allowing for many messages
163 // to be sent or received in a single call. Where possible, implementations of179 // to be sent or received in a single call. Where possible, implementations of
164 // the interface should take advantage of vectored I/O to minimise processing180 // the interface should take advantage of vectored I/O to minimise processing
165-// or system calls. For example, #GSocket uses recvmmsg() and sendmmsg() where181+// or system calls. For example, `GSocket` uses `recvmmsg()` and `sendmmsg()`
166-// possible. Callers should take advantage of scatter/gather I/O (the use of182+// where possible. Callers should take advantage of scatter/gather I/O (the use of
167 // multiple buffers per message) to avoid unnecessary copying of data to183 // multiple buffers per message) to avoid unnecessary copying of data to
168 // assemble or disassemble a message.184 // assemble or disassemble a message.
169 //185 //
170-// Each #GDatagramBased operation has a timeout parameter which may be negative186+// Each `GDatagramBased` operation has a timeout parameter which may be negative
171 // for blocking behaviour, zero for non-blocking behaviour, or positive for187 // for blocking behaviour, zero for non-blocking behaviour, or positive for
172 // timeout behaviour. A blocking operation blocks until finished or there is an188 // timeout behaviour. A blocking operation blocks until finished or there is an
173 // error. A non-blocking operation will return immediately with a189 // error. A non-blocking operation will return immediately with a
174-// %G_IO_ERROR_WOULD_BLOCK error if it cannot make progress. A timeout operation190+// `G_IO_ERROR_WOULD_BLOCK` error if it cannot make progress. A timeout operation
175 // will block until the operation is complete or the timeout expires; if the191 // will block until the operation is complete or the timeout expires; if the
176 // timeout expires it will return what progress it made, or192 // timeout expires it will return what progress it made, or
177-// %G_IO_ERROR_TIMED_OUT if no progress was made. To know when a call would193+// `G_IO_ERROR_TIMED_OUT` if no progress was made. To know when a call would
178-// successfully run you can call g_datagram_based_condition_check() or194+// successfully run you can call [method@Gio.DatagramBased.condition_check] or
179-// g_datagram_based_condition_wait(). You can also use195+// [method@Gio.DatagramBased.condition_wait]. You can also use
180-// g_datagram_based_create_source() and attach it to a #GMainContext to get196+// [method@Gio.DatagramBased.create_source] and attach it to a [struct@GLib.MainContext]
181-// callbacks when I/O is possible.197+// to get callbacks when I/O is possible.
182 //198 //
183 // When running a non-blocking operation applications should always be able to199 // When running a non-blocking operation applications should always be able to
184-// handle getting a %G_IO_ERROR_WOULD_BLOCK error even when some other function200+// handle getting a `G_IO_ERROR_WOULD_BLOCK` error even when some other function
185 // said that I/O was possible. This can easily happen in case of a race201 // said that I/O was possible. This can easily happen in case of a race
186 // condition in the application, but it can also happen for other reasons. For202 // condition in the application, but it can also happen for other reasons. For
187 // instance, on Windows a socket is always seen as writable until a write203 // instance, on Windows a socket is always seen as writable until a write
188-// returns %G_IO_ERROR_WOULD_BLOCK.204+// returns `G_IO_ERROR_WOULD_BLOCK`.
189 //205 //
190-// As with #GSocket, #GDatagramBaseds can be either connection oriented (for206+// As with `GSocket`, `GDatagramBased`s can be either connection oriented (for
191-// example, SCTP) or connectionless (for example, UDP). #GDatagramBaseds must be207+// example, SCTP) or connectionless (for example, UDP). `GDatagramBased`s must be
192 // datagram-based, not stream-based. The interface does not cover connection208 // datagram-based, not stream-based. The interface does not cover connection
193 // establishment — use methods on the underlying type to establish a connection209 // establishment — use methods on the underlying type to establish a connection
194-// before sending and receiving data through the #GDatagramBased API. For210+// before sending and receiving data through the `GDatagramBased` API. For
195 // connectionless socket types the target/source address is specified or211 // connectionless socket types the target/source address is specified or
196 // received in each I/O operation.212 // received in each I/O operation.
197 //213 //
198-// Like most other APIs in GLib, #GDatagramBased is not inherently thread safe.214+// Like most other APIs in GLib, `GDatagramBased` is not inherently thread safe.
199-// To use a #GDatagramBased concurrently from multiple threads, you must215+// To use a `GDatagramBased` concurrently from multiple threads, you must
200 // implement your own locking.216 // implement your own locking.
201 type DatagramBased interface {217 type DatagramBased interface {
202 GoPointer() uintptr218 GoPointer() uintptr
M v4/gio/gdatainputstream.go +2 -2
@@ -154,8 +154,8 @@ func (x *DataInputStreamPrivate) GoPointer() uintptr {
154 return uintptr(unsafe.Pointer(x))154 return uintptr(unsafe.Pointer(x))
155 }155 }
156 156
157-// Data input stream implements #GInputStream and includes functions for157+// Data input stream implements [class@Gio.InputStream] and includes functions
158-// reading structured data directly from a binary input stream.158+// for reading structured data directly from a binary input stream.
159 type DataInputStream struct {159 type DataInputStream struct {
160 BufferedInputStream160 BufferedInputStream
161 }161 }
M v4/gio/gdataoutputstream.go +2 -2
@@ -154,8 +154,8 @@ func (x *DataOutputStreamPrivate) GoPointer() uintptr {
154 return uintptr(unsafe.Pointer(x))154 return uintptr(unsafe.Pointer(x))
155 }155 }
156 156
157-// Data output stream implements #GOutputStream and includes functions for157+// Data output stream implements [class@Gio.OutputStream] and includes functions
158-// writing data directly to an output stream.158+// for writing data directly to an output stream.
159 type DataOutputStream struct {159 type DataOutputStream struct {
160 FilterOutputStream160 FilterOutputStream
161 }161 }
A v4/gio/gdbusactiongroup.go +345 -0
@@ -0,0 +1,345 @@
1+// Package gio was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT
2+package gio
3+
4+import (
5+ "github.com/jwijenbergh/purego"
6+ "github.com/jwijenbergh/puregotk/pkg/core"
7+ "github.com/jwijenbergh/puregotk/v4/glib"
8+ "github.com/jwijenbergh/puregotk/v4/gobject"
9+ "github.com/jwijenbergh/puregotk/v4/gobject/types"
10+)
11+
12+// `GDBusActionGroup` is an implementation of the [iface@Gio.ActionGroup]
13+// interface.
14+//
15+// `GDBusActionGroup` can be used as a proxy for an action group
16+// that is exported over D-Bus with [method@Gio.DBusConnection.export_action_group].
17+type DBusActionGroup struct {
18+ gobject.Object
19+}
20+
21+var xDBusActionGroupGLibType func() types.GType
22+
23+func DBusActionGroupGLibType() types.GType {
24+ return xDBusActionGroupGLibType()
25+}
26+
27+func DBusActionGroupNewFromInternalPtr(ptr uintptr) *DBusActionGroup {
28+ cls := &DBusActionGroup{}
29+ cls.Ptr = ptr
30+ return cls
31+}
32+
33+func (c *DBusActionGroup) GoPointer() uintptr {
34+ if c == nil {
35+ return 0
36+ }
37+ return c.Ptr
38+}
39+
40+func (c *DBusActionGroup) SetGoPointer(ptr uintptr) {
41+ c.Ptr = ptr
42+}
43+
44+// Emits the [signal@Gio.ActionGroup::action-added] signal on @action_group.
45+//
46+// This function should only be called by [type@Gio.ActionGroup] implementations.
47+func (x *DBusActionGroup) ActionAdded(ActionNameVar string) {
48+
49+ XGActionGroupActionAdded(x.GoPointer(), ActionNameVar)
50+
51+}
52+
53+// Emits the [signal@Gio.ActionGroup::action-enabled-changed] signal on @action_group.
54+//
55+// This function should only be called by [type@Gio.ActionGroup] implementations.
56+func (x *DBusActionGroup) ActionEnabledChanged(ActionNameVar string, EnabledVar bool) {
57+
58+ XGActionGroupActionEnabledChanged(x.GoPointer(), ActionNameVar, EnabledVar)
59+
60+}
61+
62+// Emits the [signal@Gio.ActionGroup::action-removed] signal on @action_group.
63+//
64+// This function should only be called by [type@Gio.ActionGroup] implementations.
65+func (x *DBusActionGroup) ActionRemoved(ActionNameVar string) {
66+
67+ XGActionGroupActionRemoved(x.GoPointer(), ActionNameVar)
68+
69+}
70+
71+// Emits the [signal@Gio.ActionGroup::action-state-changed] signal on @action_group.
72+//
73+// This function should only be called by [type@Gio.ActionGroup] implementations.
74+func (x *DBusActionGroup) ActionStateChanged(ActionNameVar string, StateVar *glib.Variant) {
75+
76+ XGActionGroupActionStateChanged(x.GoPointer(), ActionNameVar, StateVar)
77+
78+}
79+
80+// Activate the named action within @action_group.
81+//
82+// If the action is expecting a parameter, then the correct type of
83+// parameter must be given as @parameter. If the action is expecting no
84+// parameters then @parameter must be `NULL`. See
85+// [method@Gio.ActionGroup.get_action_parameter_type].
86+//
87+// If the [type@Gio.ActionGroup] implementation supports asynchronous remote
88+// activation over D-Bus, this call may return before the relevant
89+// D-Bus traffic has been sent, or any replies have been received. In
90+// order to block on such asynchronous activation calls,
91+// [method@Gio.DBusConnection.flush] should be called prior to the code, which
92+// depends on the result of the action activation. Without flushing
93+// the D-Bus connection, there is no guarantee that the action would
94+// have been activated.
95+//
96+// The following code which runs in a remote app instance, shows an
97+// example of a ‘quit’ action being activated on the primary app
98+// instance over D-Bus. Here [method@Gio.DBusConnection.flush] is called
99+// before `exit()`. Without `g_dbus_connection_flush()`, the ‘quit’ action
100+// may fail to be activated on the primary instance.
101+//
102+// ```c
103+// // call ‘quit’ action on primary instance
104+// g_action_group_activate_action (G_ACTION_GROUP (app), "quit", NULL);
105+//
106+// // make sure the action is activated now
107+// g_dbus_connection_flush (…);
108+//
109+// g_debug ("Application has been terminated. Exiting.");
110+//
111+// exit (0);
112+// ```
113+func (x *DBusActionGroup) ActivateAction(ActionNameVar string, ParameterVar *glib.Variant) {
114+
115+ XGActionGroupActivateAction(x.GoPointer(), ActionNameVar, ParameterVar)
116+
117+}
118+
119+// Request for the state of the named action within @action_group to be
120+// changed to @value.
121+//
122+// The action must be stateful and @value must be of the correct type.
123+// See [method@Gio.ActionGroup.get_action_state_type].
124+//
125+// This call merely requests a change. The action may refuse to change
126+// its state or may change its state to something other than @value.
127+// See [method@Gio.ActionGroup.get_action_state_hint].
128+//
129+// If the @value GVariant is floating, it is consumed.
130+func (x *DBusActionGroup) ChangeActionState(ActionNameVar string, ValueVar *glib.Variant) {
131+
132+ XGActionGroupChangeActionState(x.GoPointer(), ActionNameVar, ValueVar)
133+
134+}
135+
136+// Checks if the named action within @action_group is currently enabled.
137+//
138+// An action must be enabled in order to be activated or in order to
139+// have its state changed from outside callers.
140+func (x *DBusActionGroup) GetActionEnabled(ActionNameVar string) bool {
141+
142+ cret := XGActionGroupGetActionEnabled(x.GoPointer(), ActionNameVar)
143+ return cret
144+}
145+
146+// Queries the type of the parameter that must be given when activating
147+// the named action within @action_group.
148+//
149+// When activating the action using [method@Gio.ActionGroup.activate_action],
150+// the [type@GLib.Variant] given to that function must be of the type returned
151+// by this function.
152+//
153+// In the case that this function returns `NULL`, you must not give any
154+// [type@GLib.Variant], but `NULL` instead.
155+//
156+// The parameter type of a particular action will never change but it is
157+// possible for an action to be removed and for a new action to be added
158+// with the same name but a different parameter type.
159+func (x *DBusActionGroup) GetActionParameterType(ActionNameVar string) *glib.VariantType {
160+
161+ cret := XGActionGroupGetActionParameterType(x.GoPointer(), ActionNameVar)
162+ return cret
163+}
164+
165+// Queries the current state of the named action within @action_group.
166+//
167+// If the action is not stateful then `NULL` will be returned. If the
168+// action is stateful then the type of the return value is the type
169+// given by [method@Gio.ActionGroup.get_action_state_type].
170+//
171+// The return value (if non-`NULL`) should be freed with
172+// [method@GLib.Variant.unref] when it is no longer required.
173+func (x *DBusActionGroup) GetActionState(ActionNameVar string) *glib.Variant {
174+
175+ cret := XGActionGroupGetActionState(x.GoPointer(), ActionNameVar)
176+ return cret
177+}
178+
179+// Requests a hint about the valid range of values for the state of the
180+// named action within @action_group.
181+//
182+// If `NULL` is returned it either means that the action is not stateful
183+// or that there is no hint about the valid range of values for the
184+// state of the action.
185+//
186+// If a [type@GLib.Variant] array is returned then each item in the array is a
187+// possible value for the state. If a [type@GLib.Variant] pair (ie: two-tuple) is
188+// returned then the tuple specifies the inclusive lower and upper bound
189+// of valid values for the state.
190+//
191+// In any case, the information is merely a hint. It may be possible to
192+// have a state value outside of the hinted range and setting a value
193+// within the range may fail.
194+//
195+// The return value (if non-`NULL`) should be freed with
196+// [method@GLib.Variant.unref] when it is no longer required.
197+func (x *DBusActionGroup) GetActionStateHint(ActionNameVar string) *glib.Variant {
198+
199+ cret := XGActionGroupGetActionStateHint(x.GoPointer(), ActionNameVar)
200+ return cret
201+}
202+
203+// Queries the type of the state of the named action within
204+// @action_group.
205+//
206+// If the action is stateful then this function returns the
207+// [type@GLib.VariantType] of the state. All calls to
208+// [method@Gio.ActionGroup.change_action_state] must give a [type@GLib.Variant] of this
209+// type and [method@Gio.ActionGroup.get_action_state] will return a [type@GLib.Variant]
210+// of the same type.
211+//
212+// If the action is not stateful then this function will return `NULL`.
213+// In that case, [method@Gio.ActionGroup.get_action_state] will return `NULL`
214+// and you must not call [method@Gio.ActionGroup.change_action_state].
215+//
216+// The state type of a particular action will never change but it is
217+// possible for an action to be removed and for a new action to be added
218+// with the same name but a different state type.
219+func (x *DBusActionGroup) GetActionStateType(ActionNameVar string) *glib.VariantType {
220+
221+ cret := XGActionGroupGetActionStateType(x.GoPointer(), ActionNameVar)
222+ return cret
223+}
224+
225+// Checks if the named action exists within @action_group.
226+func (x *DBusActionGroup) HasAction(ActionNameVar string) bool {
227+
228+ cret := XGActionGroupHasAction(x.GoPointer(), ActionNameVar)
229+ return cret
230+}
231+
232+// Lists the actions contained within @action_group.
233+//
234+// The caller is responsible for freeing the list with [func@GLib.strfreev] when
235+// it is no longer required.
236+func (x *DBusActionGroup) ListActions() []string {
237+
238+ cret := XGActionGroupListActions(x.GoPointer())
239+ return cret
240+}
241+
242+// Queries all aspects of the named action within an @action_group.
243+//
244+// This function acquires the information available from
245+// [method@Gio.ActionGroup.has_action], [method@Gio.ActionGroup.get_action_enabled],
246+// [method@Gio.ActionGroup.get_action_parameter_type],
247+// [method@Gio.ActionGroup.get_action_state_type],
248+// [method@Gio.ActionGroup.get_action_state_hint] and
249+// [method@Gio.ActionGroup.get_action_state] with a single function call.
250+//
251+// This provides two main benefits.
252+//
253+// The first is the improvement in efficiency that comes with not having
254+// to perform repeated lookups of the action in order to discover
255+// different things about it. The second is that implementing
256+// [type@Gio.ActionGroup] can now be done by only overriding this one virtual
257+// function.
258+//
259+// The interface provides a default implementation of this function that
260+// calls the individual functions, as required, to fetch the
261+// information. The interface also provides default implementations of
262+// those functions that call this function. All implementations,
263+// therefore, must override either this function or all of the others.
264+//
265+// If the action exists, `TRUE` is returned and any of the requested
266+// fields (as indicated by having a non-`NULL` reference passed in) are
267+// filled. If the action doesn’t exist, `FALSE` is returned and the
268+// fields may or may not have been modified.
269+func (x *DBusActionGroup) QueryAction(ActionNameVar string, EnabledVar bool, ParameterTypeVar **glib.VariantType, StateTypeVar **glib.VariantType, StateHintVar **glib.Variant, StateVar **glib.Variant) bool {
270+
271+ cret := XGActionGroupQueryAction(x.GoPointer(), ActionNameVar, EnabledVar, ParameterTypeVar, StateTypeVar, StateHintVar, StateVar)
272+ return cret
273+}
274+
275+// Activates the remote action.
276+//
277+// This is the same as g_action_group_activate_action() except that it
278+// allows for provision of "platform data" to be sent along with the
279+// activation request. This typically contains details such as the user
280+// interaction timestamp or startup notification information.
281+//
282+// @platform_data must be non-%NULL and must have the type
283+// %G_VARIANT_TYPE_VARDICT. If it is floating, it will be consumed.
284+func (x *DBusActionGroup) ActivateActionFull(ActionNameVar string, ParameterVar *glib.Variant, PlatformDataVar *glib.Variant) {
285+
286+ XGRemoteActionGroupActivateActionFull(x.GoPointer(), ActionNameVar, ParameterVar, PlatformDataVar)
287+
288+}
289+
290+// Changes the state of a remote action.
291+//
292+// This is the same as g_action_group_change_action_state() except that
293+// it allows for provision of "platform data" to be sent along with the
294+// state change request. This typically contains details such as the
295+// user interaction timestamp or startup notification information.
296+//
297+// @platform_data must be non-%NULL and must have the type
298+// %G_VARIANT_TYPE_VARDICT. If it is floating, it will be consumed.
299+func (x *DBusActionGroup) ChangeActionStateFull(ActionNameVar string, ValueVar *glib.Variant, PlatformDataVar *glib.Variant) {
300+
301+ XGRemoteActionGroupChangeActionStateFull(x.GoPointer(), ActionNameVar, ValueVar, PlatformDataVar)
302+
303+}
304+
305+var xDBusActionGroupGet func(uintptr, string, string) uintptr
306+
307+// Obtains a #GDBusActionGroup for the action group which is exported at
308+// the given @bus_name and @object_path.
309+//
310+// The thread default main context is taken at the time of this call.
311+// All signals on the menu model (and any linked models) are reported
312+// with respect to this context. All calls on the returned menu model
313+// (and linked models) must also originate from this same context, with
314+// the thread default main context unchanged.
315+//
316+// This call is non-blocking. The returned action group may or may not
317+// already be filled in. The correct thing to do is connect the signals
318+// for the action group to monitor for changes and then to call
319+// g_action_group_list_actions() to get the initial list.
320+func DBusActionGroupGet(ConnectionVar *DBusConnection, BusNameVar string, ObjectPathVar string) *DBusActionGroup {
321+ var cls *DBusActionGroup
322+
323+ cret := xDBusActionGroupGet(ConnectionVar.GoPointer(), BusNameVar, ObjectPathVar)
324+
325+ if cret == 0 {
326+ return nil
327+ }
328+ cls = &DBusActionGroup{}
329+ cls.Ptr = cret
330+ return cls
331+}
332+
333+func init() {
334+ core.SetPackageName("GIO", "gio-2.0")
335+ core.SetSharedLibrary("GIO", "libgio-2.0.so.0")
336+ lib, err := purego.Dlopen(core.GetPath("GIO"), purego.RTLD_NOW|purego.RTLD_GLOBAL)
337+ if err != nil {
338+ panic(err)
339+ }
340+
341+ core.PuregoSafeRegister(&xDBusActionGroupGLibType, lib, "g_dbus_action_group_get_type")
342+
343+ core.PuregoSafeRegister(&xDBusActionGroupGet, lib, "g_dbus_action_group_get")
344+
345+}
A v4/gio/gdbusauthobserver.go +200 -0
@@ -0,0 +1,200 @@
1+// Package gio was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT
2+package gio
3+
4+import (
5+ "unsafe"
6+
7+ "github.com/jwijenbergh/purego"
8+ "github.com/jwijenbergh/puregotk/pkg/core"
9+ "github.com/jwijenbergh/puregotk/v4/glib"
10+ "github.com/jwijenbergh/puregotk/v4/gobject"
11+ "github.com/jwijenbergh/puregotk/v4/gobject/types"
12+)
13+
14+// `GDBusAuthObserver` provides a mechanism for participating
15+// in how a [class@Gio.DBusServer] (or a [class@Gio.DBusConnection])
16+// authenticates remote peers.
17+//
18+// Simply instantiate a `GDBusAuthObserver` and connect to the
19+// signals you are interested in. Note that new signals may be added
20+// in the future.
21+//
22+// ## Controlling Authentication Mechanisms
23+//
24+// By default, a `GDBusServer` or server-side `GDBusConnection` will allow
25+// any authentication mechanism to be used. If you only want to allow D-Bus
26+// connections with the `EXTERNAL` mechanism, which makes use of credentials
27+// passing and is the recommended mechanism for modern Unix platforms such
28+// as Linux and the BSD family, you would use a signal handler like this:
29+//
30+// ```c
31+// static gboolean
32+// on_allow_mechanism (GDBusAuthObserver *observer,
33+//
34+// const gchar *mechanism,
35+// gpointer user_data)
36+//
37+// {
38+// if (g_strcmp0 (mechanism, "EXTERNAL") == 0)
39+// {
40+// return TRUE;
41+// }
42+//
43+// return FALSE;
44+// }
45+//
46+// ```
47+//
48+// ## Controlling Authorization
49+//
50+// By default, a `GDBusServer` or server-side `GDBusConnection` will accept
51+// connections from any successfully authenticated user (but not from
52+// anonymous connections using the `ANONYMOUS` mechanism). If you only
53+// want to allow D-Bus connections from processes owned by the same uid
54+// as the server, since GLib 2.68, you should use the
55+// `G_DBUS_SERVER_FLAGS_AUTHENTICATION_REQUIRE_SAME_USER` flag. It’s equivalent
56+// to the following signal handler:
57+//
58+// ```c
59+// static gboolean
60+// on_authorize_authenticated_peer (GDBusAuthObserver *observer,
61+//
62+// GIOStream *stream,
63+// GCredentials *credentials,
64+// gpointer user_data)
65+//
66+// {
67+// gboolean authorized;
68+//
69+// authorized = FALSE;
70+// if (credentials != NULL)
71+// {
72+// GCredentials *own_credentials;
73+// own_credentials = g_credentials_new ();
74+// if (g_credentials_is_same_user (credentials, own_credentials, NULL))
75+// authorized = TRUE;
76+// g_object_unref (own_credentials);
77+// }
78+//
79+// return authorized;
80+// }
81+//
82+// ```
83+type DBusAuthObserver struct {
84+ gobject.Object
85+}
86+
87+var xDBusAuthObserverGLibType func() types.GType
88+
89+func DBusAuthObserverGLibType() types.GType {
90+ return xDBusAuthObserverGLibType()
91+}
92+
93+func DBusAuthObserverNewFromInternalPtr(ptr uintptr) *DBusAuthObserver {
94+ cls := &DBusAuthObserver{}
95+ cls.Ptr = ptr
96+ return cls
97+}
98+
99+var xNewDBusAuthObserver func() uintptr
100+
101+// Creates a new #GDBusAuthObserver object.
102+func NewDBusAuthObserver() *DBusAuthObserver {
103+ var cls *DBusAuthObserver
104+
105+ cret := xNewDBusAuthObserver()
106+
107+ if cret == 0 {
108+ return nil
109+ }
110+ cls = &DBusAuthObserver{}
111+ cls.Ptr = cret
112+ return cls
113+}
114+
115+var xDBusAuthObserverAllowMechanism func(uintptr, string) bool
116+
117+// Emits the #GDBusAuthObserver::allow-mechanism signal on @observer.
118+func (x *DBusAuthObserver) AllowMechanism(MechanismVar string) bool {
119+
120+ cret := xDBusAuthObserverAllowMechanism(x.GoPointer(), MechanismVar)
121+ return cret
122+}
123+
124+var xDBusAuthObserverAuthorizeAuthenticatedPeer func(uintptr, uintptr, uintptr) bool
125+
126+// Emits the #GDBusAuthObserver::authorize-authenticated-peer signal on @observer.
127+func (x *DBusAuthObserver) AuthorizeAuthenticatedPeer(StreamVar *IOStream, CredentialsVar *Credentials) bool {
128+
129+ cret := xDBusAuthObserverAuthorizeAuthenticatedPeer(x.GoPointer(), StreamVar.GoPointer(), CredentialsVar.GoPointer())
130+ return cret
131+}
132+
133+func (c *DBusAuthObserver) GoPointer() uintptr {
134+ if c == nil {
135+ return 0
136+ }
137+ return c.Ptr
138+}
139+
140+func (c *DBusAuthObserver) SetGoPointer(ptr uintptr) {
141+ c.Ptr = ptr
142+}
143+
144+// Emitted to check if @mechanism is allowed to be used.
145+func (x *DBusAuthObserver) ConnectAllowMechanism(cb *func(DBusAuthObserver, string) bool) uint32 {
146+ cbPtr := uintptr(unsafe.Pointer(cb))
147+ if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
148+ return gobject.SignalConnect(x.GoPointer(), "allow-mechanism", cbRefPtr)
149+ }
150+
151+ fcb := func(clsPtr uintptr, MechanismVarp string) bool {
152+ fa := DBusAuthObserver{}
153+ fa.Ptr = clsPtr
154+ cbFn := *cb
155+
156+ return cbFn(fa, MechanismVarp)
157+
158+ }
159+ cbRefPtr := purego.NewCallback(fcb)
160+ glib.SaveCallback(cbPtr, cbRefPtr)
161+ return gobject.SignalConnect(x.GoPointer(), "allow-mechanism", cbRefPtr)
162+}
163+
164+// Emitted to check if a peer that is successfully authenticated
165+// is authorized.
166+func (x *DBusAuthObserver) ConnectAuthorizeAuthenticatedPeer(cb *func(DBusAuthObserver, uintptr, uintptr) bool) uint32 {
167+ cbPtr := uintptr(unsafe.Pointer(cb))
168+ if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
169+ return gobject.SignalConnect(x.GoPointer(), "authorize-authenticated-peer", cbRefPtr)
170+ }
171+
172+ fcb := func(clsPtr uintptr, StreamVarp uintptr, CredentialsVarp uintptr) bool {
173+ fa := DBusAuthObserver{}
174+ fa.Ptr = clsPtr
175+ cbFn := *cb
176+
177+ return cbFn(fa, StreamVarp, CredentialsVarp)
178+
179+ }
180+ cbRefPtr := purego.NewCallback(fcb)
181+ glib.SaveCallback(cbPtr, cbRefPtr)
182+ return gobject.SignalConnect(x.GoPointer(), "authorize-authenticated-peer", cbRefPtr)
183+}
184+
185+func init() {
186+ core.SetPackageName("GIO", "gio-2.0")
187+ core.SetSharedLibrary("GIO", "libgio-2.0.so.0")
188+ lib, err := purego.Dlopen(core.GetPath("GIO"), purego.RTLD_NOW|purego.RTLD_GLOBAL)
189+ if err != nil {
190+ panic(err)
191+ }
192+
193+ core.PuregoSafeRegister(&xDBusAuthObserverGLibType, lib, "g_dbus_auth_observer_get_type")
194+
195+ core.PuregoSafeRegister(&xNewDBusAuthObserver, lib, "g_dbus_auth_observer_new")
196+
197+ core.PuregoSafeRegister(&xDBusAuthObserverAllowMechanism, lib, "g_dbus_auth_observer_allow_mechanism")
198+ core.PuregoSafeRegister(&xDBusAuthObserverAuthorizeAuthenticatedPeer, lib, "g_dbus_auth_observer_authorize_authenticated_peer")
199+
200+}
M v4/gio/gdbusconnection.go +1487 -9 collapsed to keep the page light
M v4/gio/gdbusinterface.go +13 -3
@@ -31,6 +31,7 @@ func (x *DBusInterfaceIface) GoPointer() uintptr {
31 }31 }
32 32
33 // OverrideGetInfo sets the callback function.33 // OverrideGetInfo sets the callback function.
34+// Returns a #GDBusInterfaceInfo. See g_dbus_interface_get_info().
34 func (x *DBusInterfaceIface) OverrideGetInfo(cb func(DBusInterface) *DBusInterfaceInfo) {35 func (x *DBusInterfaceIface) OverrideGetInfo(cb func(DBusInterface) *DBusInterfaceInfo) {
35 if cb == nil {36 if cb == nil {
36 x.xGetInfo = 037 x.xGetInfo = 0
@@ -42,6 +43,7 @@ func (x *DBusInterfaceIface) OverrideGetInfo(cb func(DBusInterface) *DBusInterfa
42 }43 }
43 44
44 // GetGetInfo gets the callback function.45 // GetGetInfo gets the callback function.
46+// Returns a #GDBusInterfaceInfo. See g_dbus_interface_get_info().
45 func (x *DBusInterfaceIface) GetGetInfo() func(DBusInterface) *DBusInterfaceInfo {47 func (x *DBusInterfaceIface) GetGetInfo() func(DBusInterface) *DBusInterfaceInfo {
46 if x.xGetInfo == 0 {48 if x.xGetInfo == 0 {
47 return nil49 return nil
@@ -54,6 +56,7 @@ func (x *DBusInterfaceIface) GetGetInfo() func(DBusInterface) *DBusInterfaceInfo
54 }56 }
55 57
56 // OverrideGetObject sets the callback function.58 // OverrideGetObject sets the callback function.
59+// Gets the enclosing #GDBusObject. See g_dbus_interface_get_object().
57 func (x *DBusInterfaceIface) OverrideGetObject(cb func(DBusInterface) *DBusObjectBase) {60 func (x *DBusInterfaceIface) OverrideGetObject(cb func(DBusInterface) *DBusObjectBase) {
58 if cb == nil {61 if cb == nil {
59 x.xGetObject = 062 x.xGetObject = 0
@@ -69,6 +72,7 @@ func (x *DBusInterfaceIface) OverrideGetObject(cb func(DBusInterface) *DBusObjec
69 }72 }
70 73
71 // GetGetObject gets the callback function.74 // GetGetObject gets the callback function.
75+// Gets the enclosing #GDBusObject. See g_dbus_interface_get_object().
72 func (x *DBusInterfaceIface) GetGetObject() func(DBusInterface) *DBusObjectBase {76 func (x *DBusInterfaceIface) GetGetObject() func(DBusInterface) *DBusObjectBase {
73 if x.xGetObject == 0 {77 if x.xGetObject == 0 {
74 return nil78 return nil
@@ -87,6 +91,7 @@ func (x *DBusInterfaceIface) GetGetObject() func(DBusInterface) *DBusObjectBase
87 }91 }
88 92
89 // OverrideSetObject sets the callback function.93 // OverrideSetObject sets the callback function.
94+// Sets the enclosing #GDBusObject. See g_dbus_interface_set_object().
90 func (x *DBusInterfaceIface) OverrideSetObject(cb func(DBusInterface, DBusObject)) {95 func (x *DBusInterfaceIface) OverrideSetObject(cb func(DBusInterface, DBusObject)) {
91 if cb == nil {96 if cb == nil {
92 x.xSetObject = 097 x.xSetObject = 0
@@ -98,6 +103,7 @@ func (x *DBusInterfaceIface) OverrideSetObject(cb func(DBusInterface, DBusObject
98 }103 }
99 104
100 // GetSetObject gets the callback function.105 // GetSetObject gets the callback function.
106+// Sets the enclosing #GDBusObject. See g_dbus_interface_set_object().
101 func (x *DBusInterfaceIface) GetSetObject() func(DBusInterface, DBusObject) {107 func (x *DBusInterfaceIface) GetSetObject() func(DBusInterface, DBusObject) {
102 if x.xSetObject == 0 {108 if x.xSetObject == 0 {
103 return nil109 return nil
@@ -110,6 +116,7 @@ func (x *DBusInterfaceIface) GetSetObject() func(DBusInterface, DBusObject) {
110 }116 }
111 117
112 // OverrideDupObject sets the callback function.118 // OverrideDupObject sets the callback function.
119+// Gets a reference to the enclosing #GDBusObject. See g_dbus_interface_dup_object(). Added in 2.32.
113 func (x *DBusInterfaceIface) OverrideDupObject(cb func(DBusInterface) *DBusObjectBase) {120 func (x *DBusInterfaceIface) OverrideDupObject(cb func(DBusInterface) *DBusObjectBase) {
114 if cb == nil {121 if cb == nil {
115 x.xDupObject = 0122 x.xDupObject = 0
@@ -125,6 +132,7 @@ func (x *DBusInterfaceIface) OverrideDupObject(cb func(DBusInterface) *DBusObjec
125 }132 }
126 133
127 // GetDupObject gets the callback function.134 // GetDupObject gets the callback function.
135+// Gets a reference to the enclosing #GDBusObject. See g_dbus_interface_dup_object(). Added in 2.32.
128 func (x *DBusInterfaceIface) GetDupObject() func(DBusInterface) *DBusObjectBase {136 func (x *DBusInterfaceIface) GetDupObject() func(DBusInterface) *DBusObjectBase {
129 if x.xDupObject == 0 {137 if x.xDupObject == 0 {
130 return nil138 return nil
@@ -142,9 +150,11 @@ func (x *DBusInterfaceIface) GetDupObject() func(DBusInterface) *DBusObjectBase
142 }150 }
143 }151 }
144 152
145-// The #GDBusInterface type is the base type for D-Bus interfaces both153+// Base type for D-Bus interfaces.
146-// on the service side (see #GDBusInterfaceSkeleton) and client side154+//
147-// (see #GDBusProxy).155+// The `GDBusInterface` type is the base type for D-Bus interfaces both
156+// on the service side (see [class@Gio.DBusInterfaceSkeleton]) and client side
157+// (see [class@Gio.DBusProxy]).
148 type DBusInterface interface {158 type DBusInterface interface {
149 GoPointer() uintptr159 GoPointer() uintptr
150 SetGoPointer(uintptr)160 SetGoPointer(uintptr)
M v4/gio/gdbusinterfaceskeleton.go +10 -0
@@ -38,6 +38,7 @@ func (x *DBusInterfaceSkeletonClass) GoPointer() uintptr {
38 }38 }
39 39
40 // OverrideGetInfo sets the callback function.40 // OverrideGetInfo sets the callback function.
41+// Returns a #GDBusInterfaceInfo. See g_dbus_interface_skeleton_get_info() for details.
41 func (x *DBusInterfaceSkeletonClass) OverrideGetInfo(cb func(*DBusInterfaceSkeleton) *DBusInterfaceInfo) {42 func (x *DBusInterfaceSkeletonClass) OverrideGetInfo(cb func(*DBusInterfaceSkeleton) *DBusInterfaceInfo) {
42 if cb == nil {43 if cb == nil {
43 x.xGetInfo = 044 x.xGetInfo = 0
@@ -49,6 +50,7 @@ func (x *DBusInterfaceSkeletonClass) OverrideGetInfo(cb func(*DBusInterfaceSkele
49 }50 }
50 51
51 // GetGetInfo gets the callback function.52 // GetGetInfo gets the callback function.
53+// Returns a #GDBusInterfaceInfo. See g_dbus_interface_skeleton_get_info() for details.
52 func (x *DBusInterfaceSkeletonClass) GetGetInfo() func(*DBusInterfaceSkeleton) *DBusInterfaceInfo {54 func (x *DBusInterfaceSkeletonClass) GetGetInfo() func(*DBusInterfaceSkeleton) *DBusInterfaceInfo {
53 if x.xGetInfo == 0 {55 if x.xGetInfo == 0 {
54 return nil56 return nil
@@ -61,6 +63,7 @@ func (x *DBusInterfaceSkeletonClass) GetGetInfo() func(*DBusInterfaceSkeleton) *
61 }63 }
62 64
63 // OverrideGetVtable sets the callback function.65 // OverrideGetVtable sets the callback function.
66+// Returns a #GDBusInterfaceVTable. See g_dbus_interface_skeleton_get_vtable() for details.
64 func (x *DBusInterfaceSkeletonClass) OverrideGetVtable(cb func(*DBusInterfaceSkeleton) *DBusInterfaceVTable) {67 func (x *DBusInterfaceSkeletonClass) OverrideGetVtable(cb func(*DBusInterfaceSkeleton) *DBusInterfaceVTable) {
65 if cb == nil {68 if cb == nil {
66 x.xGetVtable = 069 x.xGetVtable = 0
@@ -72,6 +75,7 @@ func (x *DBusInterfaceSkeletonClass) OverrideGetVtable(cb func(*DBusInterfaceSke
72 }75 }
73 76
74 // GetGetVtable gets the callback function.77 // GetGetVtable gets the callback function.
78+// Returns a #GDBusInterfaceVTable. See g_dbus_interface_skeleton_get_vtable() for details.
75 func (x *DBusInterfaceSkeletonClass) GetGetVtable() func(*DBusInterfaceSkeleton) *DBusInterfaceVTable {79 func (x *DBusInterfaceSkeletonClass) GetGetVtable() func(*DBusInterfaceSkeleton) *DBusInterfaceVTable {
76 if x.xGetVtable == 0 {80 if x.xGetVtable == 0 {
77 return nil81 return nil
@@ -84,6 +88,7 @@ func (x *DBusInterfaceSkeletonClass) GetGetVtable() func(*DBusInterfaceSkeleton)
84 }88 }
85 89
86 // OverrideGetProperties sets the callback function.90 // OverrideGetProperties sets the callback function.
91+// Returns a #GVariant with all properties. See g_dbus_interface_skeleton_get_properties().
87 func (x *DBusInterfaceSkeletonClass) OverrideGetProperties(cb func(*DBusInterfaceSkeleton) *glib.Variant) {92 func (x *DBusInterfaceSkeletonClass) OverrideGetProperties(cb func(*DBusInterfaceSkeleton) *glib.Variant) {
88 if cb == nil {93 if cb == nil {
89 x.xGetProperties = 094 x.xGetProperties = 0
@@ -95,6 +100,7 @@ func (x *DBusInterfaceSkeletonClass) OverrideGetProperties(cb func(*DBusInterfac
95 }100 }
96 101
97 // GetGetProperties gets the callback function.102 // GetGetProperties gets the callback function.
103+// Returns a #GVariant with all properties. See g_dbus_interface_skeleton_get_properties().
98 func (x *DBusInterfaceSkeletonClass) GetGetProperties() func(*DBusInterfaceSkeleton) *glib.Variant {104 func (x *DBusInterfaceSkeletonClass) GetGetProperties() func(*DBusInterfaceSkeleton) *glib.Variant {
99 if x.xGetProperties == 0 {105 if x.xGetProperties == 0 {
100 return nil106 return nil
@@ -107,6 +113,7 @@ func (x *DBusInterfaceSkeletonClass) GetGetProperties() func(*DBusInterfaceSkele
107 }113 }
108 114
109 // OverrideFlush sets the callback function.115 // OverrideFlush sets the callback function.
116+// Emits outstanding changes, if any. See g_dbus_interface_skeleton_flush().
110 func (x *DBusInterfaceSkeletonClass) OverrideFlush(cb func(*DBusInterfaceSkeleton)) {117 func (x *DBusInterfaceSkeletonClass) OverrideFlush(cb func(*DBusInterfaceSkeleton)) {
111 if cb == nil {118 if cb == nil {
112 x.xFlush = 0119 x.xFlush = 0
@@ -118,6 +125,7 @@ func (x *DBusInterfaceSkeletonClass) OverrideFlush(cb func(*DBusInterfaceSkeleto
118 }125 }
119 126
120 // GetFlush gets the callback function.127 // GetFlush gets the callback function.
128+// Emits outstanding changes, if any. See g_dbus_interface_skeleton_flush().
121 func (x *DBusInterfaceSkeletonClass) GetFlush() func(*DBusInterfaceSkeleton) {129 func (x *DBusInterfaceSkeletonClass) GetFlush() func(*DBusInterfaceSkeleton) {
122 if x.xFlush == 0 {130 if x.xFlush == 0 {
123 return nil131 return nil
@@ -130,6 +138,7 @@ func (x *DBusInterfaceSkeletonClass) GetFlush() func(*DBusInterfaceSkeleton) {
130 }138 }
131 139
132 // OverrideGAuthorizeMethod sets the callback function.140 // OverrideGAuthorizeMethod sets the callback function.
141+// Signal class handler for the #GDBusInterfaceSkeleton::g-authorize-method signal.
133 func (x *DBusInterfaceSkeletonClass) OverrideGAuthorizeMethod(cb func(*DBusInterfaceSkeleton, *DBusMethodInvocation) bool) {142 func (x *DBusInterfaceSkeletonClass) OverrideGAuthorizeMethod(cb func(*DBusInterfaceSkeleton, *DBusMethodInvocation) bool) {
134 if cb == nil {143 if cb == nil {
135 x.xGAuthorizeMethod = 0144 x.xGAuthorizeMethod = 0
@@ -141,6 +150,7 @@ func (x *DBusInterfaceSkeletonClass) OverrideGAuthorizeMethod(cb func(*DBusInter
141 }150 }
142 151
143 // GetGAuthorizeMethod gets the callback function.152 // GetGAuthorizeMethod gets the callback function.
153+// Signal class handler for the #GDBusInterfaceSkeleton::g-authorize-method signal.
144 func (x *DBusInterfaceSkeletonClass) GetGAuthorizeMethod() func(*DBusInterfaceSkeleton, *DBusMethodInvocation) bool {154 func (x *DBusInterfaceSkeletonClass) GetGAuthorizeMethod() func(*DBusInterfaceSkeleton, *DBusMethodInvocation) bool {
145 if x.xGAuthorizeMethod == 0 {155 if x.xGAuthorizeMethod == 0 {
146 return nil156 return nil
M v4/gio/gdbusintrospection.go +3 -3
@@ -226,7 +226,7 @@ func (x *DBusInterfaceInfo) Unref() {
226 226
227 }227 }
228 228
229-// Information about a method on an D-Bus interface.229+// Information about a method on a D-Bus interface.
230 type DBusMethodInfo struct {230 type DBusMethodInfo struct {
231 _ structs.HostLayout231 _ structs.HostLayout
232 232
@@ -302,10 +302,10 @@ var xNewDBusNodeInfoForXml func(string, **glib.Error) *DBusNodeInfo
302 // Parses @xml_data and returns a #GDBusNodeInfo representing the data.302 // Parses @xml_data and returns a #GDBusNodeInfo representing the data.
303 //303 //
304 // The introspection XML must contain exactly one top-level304 // The introspection XML must contain exactly one top-level
305-// <node> element.305+// `<node>` element.
306 //306 //
307 // Note that this routine is using a307 // Note that this routine is using a
308-// [GMarkup][glib-Simple-XML-Subset-Parser.description]-based308+// [GMarkup](../glib/markup.html)-based
309 // parser that only accepts a subset of valid XML documents.309 // parser that only accepts a subset of valid XML documents.
310 func NewDBusNodeInfoForXml(XmlDataVar string) (*DBusNodeInfo, error) {310 func NewDBusNodeInfoForXml(XmlDataVar string) (*DBusNodeInfo, error) {
311 var cerr *glib.Error311 var cerr *glib.Error
A v4/gio/gdbusmenumodel.go +75 -0
@@ -0,0 +1,75 @@
1+// Package gio was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT
2+package gio
3+
4+import (
5+ "github.com/jwijenbergh/purego"
6+ "github.com/jwijenbergh/puregotk/pkg/core"
7+ "github.com/jwijenbergh/puregotk/v4/gobject/types"
8+)
9+
10+// `GDBusMenuModel` is an implementation of [class@Gio.MenuModel] that can be
11+// used as a proxy for a menu model that is exported over D-Bus with
12+// [method@Gio.DBusConnection.export_menu_model].
13+type DBusMenuModel struct {
14+ MenuModel
15+}
16+
17+var xDBusMenuModelGLibType func() types.GType
18+
19+func DBusMenuModelGLibType() types.GType {
20+ return xDBusMenuModelGLibType()
21+}
22+
23+func DBusMenuModelNewFromInternalPtr(ptr uintptr) *DBusMenuModel {
24+ cls := &DBusMenuModel{}
25+ cls.Ptr = ptr
26+ return cls
27+}
28+
29+func (c *DBusMenuModel) GoPointer() uintptr {
30+ if c == nil {
31+ return 0
32+ }
33+ return c.Ptr
34+}
35+
36+func (c *DBusMenuModel) SetGoPointer(ptr uintptr) {
37+ c.Ptr = ptr
38+}
39+
40+var xDBusMenuModelGet func(uintptr, string, string) uintptr
41+
42+// Obtains a #GDBusMenuModel for the menu model which is exported
43+// at the given @bus_name and @object_path.
44+//
45+// The thread default main context is taken at the time of this call.
46+// All signals on the menu model (and any linked models) are reported
47+// with respect to this context. All calls on the returned menu model
48+// (and linked models) must also originate from this same context, with
49+// the thread default main context unchanged.
50+func DBusMenuModelGet(ConnectionVar *DBusConnection, BusNameVar string, ObjectPathVar string) *DBusMenuModel {
51+ var cls *DBusMenuModel
52+
53+ cret := xDBusMenuModelGet(ConnectionVar.GoPointer(), BusNameVar, ObjectPathVar)
54+
55+ if cret == 0 {
56+ return nil
57+ }
58+ cls = &DBusMenuModel{}
59+ cls.Ptr = cret
60+ return cls
61+}
62+
63+func init() {
64+ core.SetPackageName("GIO", "gio-2.0")
65+ core.SetSharedLibrary("GIO", "libgio-2.0.so.0")
66+ lib, err := purego.Dlopen(core.GetPath("GIO"), purego.RTLD_NOW|purego.RTLD_GLOBAL)
67+ if err != nil {
68+ panic(err)
69+ }
70+
71+ core.PuregoSafeRegister(&xDBusMenuModelGLibType, lib, "g_dbus_menu_model_get_type")
72+
73+ core.PuregoSafeRegister(&xDBusMenuModelGet, lib, "g_dbus_menu_model_get")
74+
75+}
A v4/gio/gdbusmessage.go +746 -0
@@ -0,0 +1,746 @@
1+// Package gio was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT
2+package gio
3+
4+import (
5+ "github.com/jwijenbergh/purego"
6+ "github.com/jwijenbergh/puregotk/pkg/core"
7+ "github.com/jwijenbergh/puregotk/v4/glib"
8+ "github.com/jwijenbergh/puregotk/v4/gobject"
9+ "github.com/jwijenbergh/puregotk/v4/gobject/types"
10+)
11+
12+// A type for representing D-Bus messages that can be sent or received
13+// on a [class@Gio.DBusConnection].
14+type DBusMessage struct {
15+ gobject.Object
16+}
17+
18+var xDBusMessageGLibType func() types.GType
19+
20+func DBusMessageGLibType() types.GType {
21+ return xDBusMessageGLibType()
22+}
23+
24+func DBusMessageNewFromInternalPtr(ptr uintptr) *DBusMessage {
25+ cls := &DBusMessage{}
26+ cls.Ptr = ptr
27+ return cls
28+}
29+
30+var xNewDBusMessage func() uintptr
31+
32+// Creates a new empty #GDBusMessage.
33+func NewDBusMessage() *DBusMessage {
34+ var cls *DBusMessage
35+
36+ cret := xNewDBusMessage()
37+
38+ if cret == 0 {
39+ return nil
40+ }
41+ cls = &DBusMessage{}
42+ cls.Ptr = cret
43+ return cls
44+}
45+
46+var xNewDBusMessageFromBlob func([]byte, uint, DBusCapabilityFlags, **glib.Error) uintptr
47+
48+// Creates a new #GDBusMessage from the data stored at @blob. The byte
49+// order that the message was in can be retrieved using
50+// g_dbus_message_get_byte_order().
51+//
52+// If the @blob cannot be parsed, contains invalid fields, or contains invalid
53+// headers, %G_IO_ERROR_INVALID_ARGUMENT will be returned.
54+func NewDBusMessageFromBlob(BlobVar []byte, BlobLenVar uint, CapabilitiesVar DBusCapabilityFlags) (*DBusMessage, error) {
55+ var cls *DBusMessage
56+ var cerr *glib.Error
57+
58+ cret := xNewDBusMessageFromBlob(BlobVar, BlobLenVar, CapabilitiesVar, &cerr)
59+
60+ if cret == 0 {
61+ return nil, cerr
62+ }
63+ cls = &DBusMessage{}
64+ cls.Ptr = cret
65+ if cerr == nil {
66+ return cls, nil
67+ }
68+ return cls, cerr
69+
70+}
71+
72+var xNewDBusMessageMethodCall func(string, string, string, string) uintptr
73+
74+// Creates a new #GDBusMessage for a method call.
75+func NewDBusMessageMethodCall(NameVar string, PathVar string, InterfaceVar string, MethodVar string) *DBusMessage {
76+ var cls *DBusMessage
77+
78+ cret := xNewDBusMessageMethodCall(NameVar, PathVar, InterfaceVar, MethodVar)
79+
80+ if cret == 0 {
81+ return nil
82+ }
83+ cls = &DBusMessage{}
84+ cls.Ptr = cret
85+ return cls
86+}
87+
88+var xNewDBusMessageSignal func(string, string, string) uintptr
89+
90+// Creates a new #GDBusMessage for a signal emission.
91+func NewDBusMessageSignal(PathVar string, InterfaceVar string, SignalVar string) *DBusMessage {
92+ var cls *DBusMessage
93+
94+ cret := xNewDBusMessageSignal(PathVar, InterfaceVar, SignalVar)
95+
96+ if cret == 0 {
97+ return nil
98+ }
99+ cls = &DBusMessage{}
100+ cls.Ptr = cret
101+ return cls
102+}
103+
104+var xDBusMessageCopy func(uintptr) uintptr
105+
106+// Copies @message. The copy is a deep copy and the returned
107+// #GDBusMessage is completely identical except that it is guaranteed
108+// to not be locked.
109+//
110+// This operation can fail if e.g. @message contains file descriptors
111+// and the per-process or system-wide open files limit is reached.
112+func (x *DBusMessage) Copy() (*DBusMessage, error) {
113+ var cls *DBusMessage
114+ var cerr *glib.Error
115+
116+ cret := xDBusMessageCopy(x.GoPointer())
117+
118+ if cret == 0 {
119+ return nil, cerr
120+ }
121+ cls = &DBusMessage{}
122+ cls.Ptr = cret
123+ if cerr == nil {
124+ return cls, nil
125+ }
126+ return cls, cerr
127+
128+}
129+
130+var xDBusMessageGetArg0 func(uintptr) string
131+
132+// Convenience to get the first item in the body of @message.
133+//
134+// See [method@Gio.DBusMessage.get_arg0_path] for returning object-path-typed
135+// arg0 values.
136+func (x *DBusMessage) GetArg0() string {
137+
138+ cret := xDBusMessageGetArg0(x.GoPointer())
139+ return cret
140+}
141+
142+var xDBusMessageGetArg0Path func(uintptr) string
143+
144+// Convenience to get the first item in the body of @message.
145+//
146+// See [method@Gio.DBusMessage.get_arg0] for returning string-typed arg0 values.
147+func (x *DBusMessage) GetArg0Path() string {
148+
149+ cret := xDBusMessageGetArg0Path(x.GoPointer())
150+ return cret
151+}
152+
153+var xDBusMessageGetBody func(uintptr) *glib.Variant
154+
155+// Gets the body of a message.
156+func (x *DBusMessage) GetBody() *glib.Variant {
157+
158+ cret := xDBusMessageGetBody(x.GoPointer())
159+ return cret
160+}
161+
162+var xDBusMessageGetByteOrder func(uintptr) DBusMessageByteOrder
163+
164+// Gets the byte order of @message.
165+func (x *DBusMessage) GetByteOrder() DBusMessageByteOrder {
166+
167+ cret := xDBusMessageGetByteOrder(x.GoPointer())
168+ return cret
169+}
170+
171+var xDBusMessageGetDestination func(uintptr) string
172+
173+// Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field.
174+func (x *DBusMessage) GetDestination() string {
175+
176+ cret := xDBusMessageGetDestination(x.GoPointer())
177+ return cret
178+}
179+
180+var xDBusMessageGetErrorName func(uintptr) string
181+
182+// Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field.
183+func (x *DBusMessage) GetErrorName() string {
184+
185+ cret := xDBusMessageGetErrorName(x.GoPointer())
186+ return cret
187+}
188+
189+var xDBusMessageGetFlags func(uintptr) DBusMessageFlags
190+
191+// Gets the flags for @message.
192+func (x *DBusMessage) GetFlags() DBusMessageFlags {
193+
194+ cret := xDBusMessageGetFlags(x.GoPointer())
195+ return cret
196+}
197+
198+var xDBusMessageGetHeader func(uintptr, DBusMessageHeaderField) *glib.Variant
199+
200+// Gets a header field on @message.
201+//
202+// The caller is responsible for checking the type of the returned #GVariant
203+// matches what is expected.
204+func (x *DBusMessage) GetHeader(HeaderFieldVar DBusMessageHeaderField) *glib.Variant {
205+
206+ cret := xDBusMessageGetHeader(x.GoPointer(), HeaderFieldVar)
207+ return cret
208+}
209+
210+var xDBusMessageGetHeaderFields func(uintptr) uintptr
211+
212+// Gets an array of all header fields on @message that are set.
213+func (x *DBusMessage) GetHeaderFields() uintptr {
214+
215+ cret := xDBusMessageGetHeaderFields(x.GoPointer())
216+ return cret
217+}
218+
219+var xDBusMessageGetInterface func(uintptr) string
220+
221+// Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field.
222+func (x *DBusMessage) GetInterface() string {
223+
224+ cret := xDBusMessageGetInterface(x.GoPointer())
225+ return cret
226+}
227+
228+var xDBusMessageGetLocked func(uintptr) bool
229+
230+// Checks whether @message is locked. To monitor changes to this
231+// value, conncet to the #GObject::notify signal to listen for changes
232+// on the #GDBusMessage:locked property.
233+func (x *DBusMessage) GetLocked() bool {
234+
235+ cret := xDBusMessageGetLocked(x.GoPointer())
236+ return cret
237+}
238+
239+var xDBusMessageGetMember func(uintptr) string
240+
241+// Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field.
242+func (x *DBusMessage) GetMember() string {
243+
244+ cret := xDBusMessageGetMember(x.GoPointer())
245+ return cret
246+}
247+
248+var xDBusMessageGetMessageType func(uintptr) DBusMessageType
249+
250+// Gets the type of @message.
251+func (x *DBusMessage) GetMessageType() DBusMessageType {
252+
253+ cret := xDBusMessageGetMessageType(x.GoPointer())
254+ return cret
255+}
256+
257+var xDBusMessageGetNumUnixFds func(uintptr) uint32
258+
259+// Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field.
260+func (x *DBusMessage) GetNumUnixFds() uint32 {
261+
262+ cret := xDBusMessageGetNumUnixFds(x.GoPointer())
263+ return cret
264+}
265+
266+var xDBusMessageGetPath func(uintptr) string
267+
268+// Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field.
269+func (x *DBusMessage) GetPath() string {
270+
271+ cret := xDBusMessageGetPath(x.GoPointer())
272+ return cret
273+}
274+
275+var xDBusMessageGetReplySerial func(uintptr) uint32
276+
277+// Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field.
278+func (x *DBusMessage) GetReplySerial() uint32 {
279+
280+ cret := xDBusMessageGetReplySerial(x.GoPointer())
281+ return cret
282+}
283+
284+var xDBusMessageGetSender func(uintptr) string
285+
286+// Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field.
287+func (x *DBusMessage) GetSender() string {
288+
289+ cret := xDBusMessageGetSender(x.GoPointer())
290+ return cret
291+}
292+
293+var xDBusMessageGetSerial func(uintptr) uint32
294+
295+// Gets the serial for @message.
296+func (x *DBusMessage) GetSerial() uint32 {
297+
298+ cret := xDBusMessageGetSerial(x.GoPointer())
299+ return cret
300+}
301+
302+var xDBusMessageGetSignature func(uintptr) string
303+
304+// Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field.
305+//
306+// This will always be non-%NULL, but may be an empty string.
307+func (x *DBusMessage) GetSignature() string {
308+
309+ cret := xDBusMessageGetSignature(x.GoPointer())
310+ return cret
311+}
312+
313+var xDBusMessageGetUnixFdList func(uintptr) uintptr
314+
315+// Gets the UNIX file descriptors associated with @message, if any.
316+//
317+// This method is only available on UNIX.
318+//
319+// The file descriptors normally correspond to %G_VARIANT_TYPE_HANDLE
320+// values in the body of the message. For example,
321+// if g_variant_get_handle() returns 5, that is intended to be a reference
322+// to the file descriptor that can be accessed by
323+// `g_unix_fd_list_get (list, 5, ...)`.
324+func (x *DBusMessage) GetUnixFdList() *UnixFDList {
325+ var cls *UnixFDList
326+
327+ cret := xDBusMessageGetUnixFdList(x.GoPointer())
328+
329+ if cret == 0 {
330+ return nil
331+ }
332+ gobject.IncreaseRef(cret)
333+ cls = &UnixFDList{}
334+ cls.Ptr = cret
335+ return cls
336+}
337+
338+var xDBusMessageLock func(uintptr)
339+
340+// If @message is locked, does nothing. Otherwise locks the message.
341+func (x *DBusMessage) Lock() {
342+
343+ xDBusMessageLock(x.GoPointer())
344+
345+}
346+
347+var xDBusMessageNewMethodError func(uintptr, string, string, ...interface{}) uintptr
348+
349+// Creates a new #GDBusMessage that is an error reply to @method_call_message.
350+func (x *DBusMessage) NewMethodError(ErrorNameVar string, ErrorMessageFormatVar string, varArgs ...interface{}) *DBusMessage {
351+ var cls *DBusMessage
352+
353+ cret := xDBusMessageNewMethodError(x.GoPointer(), ErrorNameVar, ErrorMessageFormatVar, varArgs...)
354+
355+ if cret == 0 {
356+ return nil
357+ }
358+ cls = &DBusMessage{}
359+ cls.Ptr = cret
360+ return cls
361+}
362+
363+var xDBusMessageNewMethodErrorLiteral func(uintptr, string, string) uintptr
364+
365+// Creates a new #GDBusMessage that is an error reply to @method_call_message.
366+func (x *DBusMessage) NewMethodErrorLiteral(ErrorNameVar string, ErrorMessageVar string) *DBusMessage {
367+ var cls *DBusMessage
368+
369+ cret := xDBusMessageNewMethodErrorLiteral(x.GoPointer(), ErrorNameVar, ErrorMessageVar)
370+
371+ if cret == 0 {
372+ return nil
373+ }
374+ cls = &DBusMessage{}
375+ cls.Ptr = cret
376+ return cls
377+}
378+
379+var xDBusMessageNewMethodErrorValist func(uintptr, string, string, []interface{}) uintptr
380+
381+// Like g_dbus_message_new_method_error() but intended for language bindings.
382+func (x *DBusMessage) NewMethodErrorValist(ErrorNameVar string, ErrorMessageFormatVar string, VarArgsVar []interface{}) *DBusMessage {
383+ var cls *DBusMessage
384+
385+ cret := xDBusMessageNewMethodErrorValist(x.GoPointer(), ErrorNameVar, ErrorMessageFormatVar, VarArgsVar)
386+
387+ if cret == 0 {
388+ return nil
389+ }
390+ cls = &DBusMessage{}
391+ cls.Ptr = cret
392+ return cls
393+}
394+
395+var xDBusMessageNewMethodReply func(uintptr) uintptr
396+
397+// Creates a new #GDBusMessage that is a reply to @method_call_message.
398+func (x *DBusMessage) NewMethodReply() *DBusMessage {
399+ var cls *DBusMessage
400+
401+ cret := xDBusMessageNewMethodReply(x.GoPointer())
402+
403+ if cret == 0 {
404+ return nil
405+ }
406+ cls = &DBusMessage{}
407+ cls.Ptr = cret
408+ return cls
409+}
410+
411+var xDBusMessagePrint func(uintptr, uint) string
412+
413+// Produces a human-readable multi-line description of @message.
414+//
415+// The contents of the description has no ABI guarantees, the contents
416+// and formatting is subject to change at any time. Typical output
417+// looks something like this:
418+// ```
419+// Flags: none
420+// Version: 0
421+// Serial: 4
422+// Headers:
423+//
424+// path -> objectpath '/org/gtk/GDBus/TestObject'
425+// interface -> 'org.gtk.GDBus.TestInterface'
426+// member -> 'GimmeStdout'
427+// destination -> ':1.146'
428+//
429+// Body: ()
430+// UNIX File Descriptors:
431+//
432+// (none)
433+//
434+// ```
435+// or
436+// ```
437+// Flags: no-reply-expected
438+// Version: 0
439+// Serial: 477
440+// Headers:
441+//
442+// reply-serial -> uint32 4
443+// destination -> ':1.159'
444+// sender -> ':1.146'
445+// num-unix-fds -> uint32 1
446+//
447+// Body: ()
448+// UNIX File Descriptors:
449+//
450+// fd 12: dev=0:10,mode=020620,ino=5,uid=500,gid=5,rdev=136:2,size=0,atime=1273085037,mtime=1273085851,ctime=1272982635
451+//
452+// ```
453+func (x *DBusMessage) Print(IndentVar uint) string {
454+
455+ cret := xDBusMessagePrint(x.GoPointer(), IndentVar)
456+ return cret
457+}
458+
459+var xDBusMessageSetBody func(uintptr, *glib.Variant)
460+
461+// Sets the body @message. As a side-effect the
462+// %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field is set to the
463+// type string of @body (or cleared if @body is %NULL).
464+//
465+// If @body is floating, @message assumes ownership of @body.
466+func (x *DBusMessage) SetBody(BodyVar *glib.Variant) {
467+
468+ xDBusMessageSetBody(x.GoPointer(), BodyVar)
469+
470+}
471+
472+var xDBusMessageSetByteOrder func(uintptr, DBusMessageByteOrder)
473+
474+// Sets the byte order of @message.
475+func (x *DBusMessage) SetByteOrder(ByteOrderVar DBusMessageByteOrder) {
476+
477+ xDBusMessageSetByteOrder(x.GoPointer(), ByteOrderVar)
478+
479+}
480+
481+var xDBusMessageSetDestination func(uintptr, string)
482+
483+// Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field.
484+func (x *DBusMessage) SetDestination(ValueVar string) {
485+
486+ xDBusMessageSetDestination(x.GoPointer(), ValueVar)
487+
488+}
489+
490+var xDBusMessageSetErrorName func(uintptr, string)
491+
492+// Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field.
493+func (x *DBusMessage) SetErrorName(ValueVar string) {
494+
495+ xDBusMessageSetErrorName(x.GoPointer(), ValueVar)
496+
497+}
498+
499+var xDBusMessageSetFlags func(uintptr, DBusMessageFlags)
500+
501+// Sets the flags to set on @message.
502+func (x *DBusMessage) SetFlags(FlagsVar DBusMessageFlags) {
503+
504+ xDBusMessageSetFlags(x.GoPointer(), FlagsVar)
505+
506+}
507+
508+var xDBusMessageSetHeader func(uintptr, DBusMessageHeaderField, *glib.Variant)
509+
510+// Sets a header field on @message.
511+//
512+// If @value is floating, @message assumes ownership of @value.
513+func (x *DBusMessage) SetHeader(HeaderFieldVar DBusMessageHeaderField, ValueVar *glib.Variant) {
514+
515+ xDBusMessageSetHeader(x.GoPointer(), HeaderFieldVar, ValueVar)
516+
517+}
518+
519+var xDBusMessageSetInterface func(uintptr, string)
520+
521+// Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field.
522+func (x *DBusMessage) SetInterface(ValueVar string) {
523+
524+ xDBusMessageSetInterface(x.GoPointer(), ValueVar)
525+
526+}
527+
528+var xDBusMessageSetMember func(uintptr, string)
529+
530+// Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field.
531+func (x *DBusMessage) SetMember(ValueVar string) {
532+
533+ xDBusMessageSetMember(x.GoPointer(), ValueVar)
534+
535+}
536+
537+var xDBusMessageSetMessageType func(uintptr, DBusMessageType)
538+
539+// Sets @message to be of @type.
540+func (x *DBusMessage) SetMessageType(TypeVar DBusMessageType) {
541+
542+ xDBusMessageSetMessageType(x.GoPointer(), TypeVar)
543+
544+}
545+
546+var xDBusMessageSetNumUnixFds func(uintptr, uint32)
547+
548+// Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field.
549+func (x *DBusMessage) SetNumUnixFds(ValueVar uint32) {
550+
551+ xDBusMessageSetNumUnixFds(x.GoPointer(), ValueVar)
552+
553+}
554+
555+var xDBusMessageSetPath func(uintptr, string)
556+
557+// Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field.
558+func (x *DBusMessage) SetPath(ValueVar string) {
559+
560+ xDBusMessageSetPath(x.GoPointer(), ValueVar)
561+
562+}
563+
564+var xDBusMessageSetReplySerial func(uintptr, uint32)
565+
566+// Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field.
567+func (x *DBusMessage) SetReplySerial(ValueVar uint32) {
568+
569+ xDBusMessageSetReplySerial(x.GoPointer(), ValueVar)
570+
571+}
572+
573+var xDBusMessageSetSender func(uintptr, string)
574+
575+// Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field.
576+func (x *DBusMessage) SetSender(ValueVar string) {
577+
578+ xDBusMessageSetSender(x.GoPointer(), ValueVar)
579+
580+}
581+
582+var xDBusMessageSetSerial func(uintptr, uint32)
583+
584+// Sets the serial for @message.
585+//
586+// The [D-Bus specification](https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-messages)
587+// does not allow the @serial to be zero.
588+func (x *DBusMessage) SetSerial(SerialVar uint32) {
589+
590+ xDBusMessageSetSerial(x.GoPointer(), SerialVar)
591+
592+}
593+
594+var xDBusMessageSetSignature func(uintptr, string)
595+
596+// Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field.
597+func (x *DBusMessage) SetSignature(ValueVar string) {
598+
599+ xDBusMessageSetSignature(x.GoPointer(), ValueVar)
600+
601+}
602+
603+var xDBusMessageSetUnixFdList func(uintptr, uintptr)
604+
605+// Sets the UNIX file descriptors associated with @message. As a
606+// side-effect the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header
607+// field is set to the number of fds in @fd_list (or cleared if
608+// @fd_list is %NULL).
609+//
610+// This method is only available on UNIX.
611+//
612+// When designing D-Bus APIs that are intended to be interoperable,
613+// please note that non-GDBus implementations of D-Bus can usually only
614+// access file descriptors if they are referenced by a value of type
615+// %G_VARIANT_TYPE_HANDLE in the body of the message.
616+func (x *DBusMessage) SetUnixFdList(FdListVar *UnixFDList) {
617+
618+ xDBusMessageSetUnixFdList(x.GoPointer(), FdListVar.GoPointer())
619+
620+}
621+
622+var xDBusMessageToBlob func(uintptr, uint, DBusCapabilityFlags, **glib.Error) uintptr
623+
624+// Serializes @message to a blob. The byte order returned by
625+// g_dbus_message_get_byte_order() will be used.
626+func (x *DBusMessage) ToBlob(OutSizeVar uint, CapabilitiesVar DBusCapabilityFlags) (uintptr, error) {
627+ var cerr *glib.Error
628+
629+ cret := xDBusMessageToBlob(x.GoPointer(), OutSizeVar, CapabilitiesVar, &cerr)
630+ if cerr == nil {
631+ return cret, nil
632+ }
633+ return cret, cerr
634+
635+}
636+
637+var xDBusMessageToGerror func(uintptr) bool
638+
639+// If @message is not of type %G_DBUS_MESSAGE_TYPE_ERROR does
640+// nothing and returns %FALSE.
641+//
642+// Otherwise this method encodes the error in @message as a #GError
643+// using g_dbus_error_set_dbus_error() using the information in the
644+// %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field of @message as
645+// well as the first string item in @message's body.
646+func (x *DBusMessage) ToGerror() (bool, error) {
647+ var cerr *glib.Error
648+
649+ cret := xDBusMessageToGerror(x.GoPointer())
650+ if cerr == nil {
651+ return cret, nil
652+ }
653+ return cret, cerr
654+
655+}
656+
657+func (c *DBusMessage) GoPointer() uintptr {
658+ if c == nil {
659+ return 0
660+ }
661+ return c.Ptr
662+}
663+
664+func (c *DBusMessage) SetGoPointer(ptr uintptr) {
665+ c.Ptr = ptr
666+}
667+
668+var xDBusMessageBytesNeeded func([]byte, uint, **glib.Error) int
669+
670+// Utility function to calculate how many bytes are needed to
671+// completely deserialize the D-Bus message stored at @blob.
672+func DBusMessageBytesNeeded(BlobVar []byte, BlobLenVar uint) (int, error) {
673+ var cerr *glib.Error
674+
675+ cret := xDBusMessageBytesNeeded(BlobVar, BlobLenVar, &cerr)
676+ if cerr == nil {
677+ return cret, nil
678+ }
679+ return cret, cerr
680+
681+}
682+
683+func init() {
684+ core.SetPackageName("GIO", "gio-2.0")
685+ core.SetSharedLibrary("GIO", "libgio-2.0.so.0")
686+ lib, err := purego.Dlopen(core.GetPath("GIO"), purego.RTLD_NOW|purego.RTLD_GLOBAL)
687+ if err != nil {
688+ panic(err)
689+ }
690+
691+ core.PuregoSafeRegister(&xDBusMessageGLibType, lib, "g_dbus_message_get_type")
692+
693+ core.PuregoSafeRegister(&xNewDBusMessage, lib, "g_dbus_message_new")
694+ core.PuregoSafeRegister(&xNewDBusMessageFromBlob, lib, "g_dbus_message_new_from_blob")
695+ core.PuregoSafeRegister(&xNewDBusMessageMethodCall, lib, "g_dbus_message_new_method_call")
696+ core.PuregoSafeRegister(&xNewDBusMessageSignal, lib, "g_dbus_message_new_signal")
697+
698+ core.PuregoSafeRegister(&xDBusMessageCopy, lib, "g_dbus_message_copy")
699+ core.PuregoSafeRegister(&xDBusMessageGetArg0, lib, "g_dbus_message_get_arg0")
700+ core.PuregoSafeRegister(&xDBusMessageGetArg0Path, lib, "g_dbus_message_get_arg0_path")
701+ core.PuregoSafeRegister(&xDBusMessageGetBody, lib, "g_dbus_message_get_body")
702+ core.PuregoSafeRegister(&xDBusMessageGetByteOrder, lib, "g_dbus_message_get_byte_order")
703+ core.PuregoSafeRegister(&xDBusMessageGetDestination, lib, "g_dbus_message_get_destination")
704+ core.PuregoSafeRegister(&xDBusMessageGetErrorName, lib, "g_dbus_message_get_error_name")
705+ core.PuregoSafeRegister(&xDBusMessageGetFlags, lib, "g_dbus_message_get_flags")
706+ core.PuregoSafeRegister(&xDBusMessageGetHeader, lib, "g_dbus_message_get_header")
707+ core.PuregoSafeRegister(&xDBusMessageGetHeaderFields, lib, "g_dbus_message_get_header_fields")
708+ core.PuregoSafeRegister(&xDBusMessageGetInterface, lib, "g_dbus_message_get_interface")
709+ core.PuregoSafeRegister(&xDBusMessageGetLocked, lib, "g_dbus_message_get_locked")
710+ core.PuregoSafeRegister(&xDBusMessageGetMember, lib, "g_dbus_message_get_member")
711+ core.PuregoSafeRegister(&xDBusMessageGetMessageType, lib, "g_dbus_message_get_message_type")
712+ core.PuregoSafeRegister(&xDBusMessageGetNumUnixFds, lib, "g_dbus_message_get_num_unix_fds")
713+ core.PuregoSafeRegister(&xDBusMessageGetPath, lib, "g_dbus_message_get_path")
714+ core.PuregoSafeRegister(&xDBusMessageGetReplySerial, lib, "g_dbus_message_get_reply_serial")
715+ core.PuregoSafeRegister(&xDBusMessageGetSender, lib, "g_dbus_message_get_sender")
716+ core.PuregoSafeRegister(&xDBusMessageGetSerial, lib, "g_dbus_message_get_serial")
717+ core.PuregoSafeRegister(&xDBusMessageGetSignature, lib, "g_dbus_message_get_signature")
718+ core.PuregoSafeRegister(&xDBusMessageGetUnixFdList, lib, "g_dbus_message_get_unix_fd_list")
719+ core.PuregoSafeRegister(&xDBusMessageLock, lib, "g_dbus_message_lock")
720+ core.PuregoSafeRegister(&xDBusMessageNewMethodError, lib, "g_dbus_message_new_method_error")
721+ core.PuregoSafeRegister(&xDBusMessageNewMethodErrorLiteral, lib, "g_dbus_message_new_method_error_literal")
722+ core.PuregoSafeRegister(&xDBusMessageNewMethodErrorValist, lib, "g_dbus_message_new_method_error_valist")
723+ core.PuregoSafeRegister(&xDBusMessageNewMethodReply, lib, "g_dbus_message_new_method_reply")
724+ core.PuregoSafeRegister(&xDBusMessagePrint, lib, "g_dbus_message_print")
725+ core.PuregoSafeRegister(&xDBusMessageSetBody, lib, "g_dbus_message_set_body")
726+ core.PuregoSafeRegister(&xDBusMessageSetByteOrder, lib, "g_dbus_message_set_byte_order")
727+ core.PuregoSafeRegister(&xDBusMessageSetDestination, lib, "g_dbus_message_set_destination")
728+ core.PuregoSafeRegister(&xDBusMessageSetErrorName, lib, "g_dbus_message_set_error_name")
729+ core.PuregoSafeRegister(&xDBusMessageSetFlags, lib, "g_dbus_message_set_flags")
730+ core.PuregoSafeRegister(&xDBusMessageSetHeader, lib, "g_dbus_message_set_header")
731+ core.PuregoSafeRegister(&xDBusMessageSetInterface, lib, "g_dbus_message_set_interface")
732+ core.PuregoSafeRegister(&xDBusMessageSetMember, lib, "g_dbus_message_set_member")
733+ core.PuregoSafeRegister(&xDBusMessageSetMessageType, lib, "g_dbus_message_set_message_type")
734+ core.PuregoSafeRegister(&xDBusMessageSetNumUnixFds, lib, "g_dbus_message_set_num_unix_fds")
735+ core.PuregoSafeRegister(&xDBusMessageSetPath, lib, "g_dbus_message_set_path")
736+ core.PuregoSafeRegister(&xDBusMessageSetReplySerial, lib, "g_dbus_message_set_reply_serial")
737+ core.PuregoSafeRegister(&xDBusMessageSetSender, lib, "g_dbus_message_set_sender")
738+ core.PuregoSafeRegister(&xDBusMessageSetSerial, lib, "g_dbus_message_set_serial")
739+ core.PuregoSafeRegister(&xDBusMessageSetSignature, lib, "g_dbus_message_set_signature")
740+ core.PuregoSafeRegister(&xDBusMessageSetUnixFdList, lib, "g_dbus_message_set_unix_fd_list")
741+ core.PuregoSafeRegister(&xDBusMessageToBlob, lib, "g_dbus_message_to_blob")
742+ core.PuregoSafeRegister(&xDBusMessageToGerror, lib, "g_dbus_message_to_gerror")
743+
744+ core.PuregoSafeRegister(&xDBusMessageBytesNeeded, lib, "g_dbus_message_bytes_needed")
745+
746+}
M v4/gio/gdbusmethodinvocation.go +371 -0 collapsed to keep the page light
M v4/gio/gdbusnameowning.go +31 -29
@@ -19,37 +19,38 @@ type BusNameLostCallback func(uintptr, string, uintptr)
19 19
20 var xBusOwnName func(BusType, string, BusNameOwnerFlags, uintptr, uintptr, uintptr, uintptr, uintptr) uint20 var xBusOwnName func(BusType, string, BusNameOwnerFlags, uintptr, uintptr, uintptr, uintptr, uintptr) uint
21 21
22-// Starts acquiring @name on the bus specified by @bus_type and calls22+// Requests ownership of @name on the bus specified by @bus_type.
23-// @name_acquired_handler and @name_lost_handler when the name is23+//
24-// acquired respectively lost. Callbacks will be invoked in the24+// It asynchronously calls @name_acquired_handler and @name_lost_handler when
25-// [thread-default main context][g-main-context-push-thread-default]25+// the name is acquired and lost, respectively.
26+//
27+// Callbacks will be invoked in the thread-default
28+// main context (see [method@GLib.MainContext.push_thread_default])
26 // of the thread you are calling this function from.29 // of the thread you are calling this function from.
27 //30 //
28 // You are guaranteed that one of the @name_acquired_handler and @name_lost_handler31 // You are guaranteed that one of the @name_acquired_handler and @name_lost_handler
29-// callbacks will be invoked after calling this function - there are three32+// callbacks will be invoked after calling this function — there are three
30 // possible cases:33 // possible cases:
31 //34 //
32-// - @name_lost_handler with a %NULL connection (if a connection to the bus35+// - @name_lost_handler with a `NULL` connection (if a connection to the bus
33-// can't be made).36+// can’t be made).
34-//37+// - @bus_acquired_handler then @name_lost_handler (if the name can’t be
35-// - @bus_acquired_handler then @name_lost_handler (if the name can't be38+// obtained).
36-// obtained)
37-//
38 // - @bus_acquired_handler then @name_acquired_handler (if the name was39 // - @bus_acquired_handler then @name_acquired_handler (if the name was
39 // obtained).40 // obtained).
40 //41 //
41-// When you are done owning the name, just call g_bus_unown_name()42+// When you are done owning the name, call [func@Gio.bus_unown_name] with the
42-// with the owner id this function returns.43+// owner ID this function returns.
43 //44 //
44 // If the name is acquired or lost (for example another application45 // If the name is acquired or lost (for example another application
45 // could acquire the name if you allow replacement or the application46 // could acquire the name if you allow replacement or the application
46 // currently owning the name exits), the handlers are also invoked.47 // currently owning the name exits), the handlers are also invoked.
47-// If the #GDBusConnection that is used for attempting to own the name48+// If the [class@Gio.DBusConnection] that is used for attempting to own the name
48 // closes, then @name_lost_handler is invoked since it is no longer49 // closes, then @name_lost_handler is invoked since it is no longer
49 // possible for other processes to access the process.50 // possible for other processes to access the process.
50 //51 //
51-// You cannot use g_bus_own_name() several times for the same name (unless52+// You cannot use [func@Gio.bus_own_name] several times for the same name (unless
52-// interleaved with calls to g_bus_unown_name()) - only the first call53+// interleaved with calls to [func@Gio.bus_unown_name]) — only the first call
53 // will work.54 // will work.
54 //55 //
55 // Another guarantee is that invocations of @name_acquired_handler56 // Another guarantee is that invocations of @name_acquired_handler
@@ -58,14 +59,14 @@ var xBusOwnName func(BusType, string, BusNameOwnerFlags, uintptr, uintptr, uintp
58 // guaranteed that the next time one of the handlers is invoked, it59 // guaranteed that the next time one of the handlers is invoked, it
59 // will be @name_lost_handler. The reverse is also true.60 // will be @name_lost_handler. The reverse is also true.
60 //61 //
61-// If you plan on exporting objects (using e.g.62+// If you plan on exporting objects (using, for example,
62-// g_dbus_connection_register_object()), note that it is generally too late63+// [method@Gio.DBusConnection.register_object]), note that it is generally too late
63 // to export the objects in @name_acquired_handler. Instead, you can do this64 // to export the objects in @name_acquired_handler. Instead, you can do this
64 // in @bus_acquired_handler since you are guaranteed that this will run65 // in @bus_acquired_handler since you are guaranteed that this will run
65 // before @name is requested from the bus.66 // before @name is requested from the bus.
66 //67 //
67-// This behavior makes it very simple to write applications that wants68+// This behavior makes it very simple to write applications that want
68-// to [own names][gdbus-owning-names] and export objects.69+// to [own names](dbus-name-owning.html#d-bus-name-owning) and export objects.
69 // Simply register objects to be exported in @bus_acquired_handler and70 // Simply register objects to be exported in @bus_acquired_handler and
70 // unregister the objects (if any) in @name_lost_handler.71 // unregister the objects (if any) in @name_lost_handler.
71 func BusOwnName(BusTypeVar BusType, NameVar string, FlagsVar BusNameOwnerFlags, BusAcquiredHandlerVar *BusAcquiredCallback, NameAcquiredHandlerVar *BusNameAcquiredCallback, NameLostHandlerVar *BusNameLostCallback, UserDataVar uintptr, UserDataFreeFuncVar *glib.DestroyNotify) uint {72 func BusOwnName(BusTypeVar BusType, NameVar string, FlagsVar BusNameOwnerFlags, BusAcquiredHandlerVar *BusAcquiredCallback, NameAcquiredHandlerVar *BusNameAcquiredCallback, NameLostHandlerVar *BusNameLostCallback, UserDataVar uintptr, UserDataFreeFuncVar *glib.DestroyNotify) uint {
@@ -76,8 +77,8 @@ func BusOwnName(BusTypeVar BusType, NameVar string, FlagsVar BusNameOwnerFlags,
76 77
77 var xBusOwnNameOnConnection func(uintptr, string, BusNameOwnerFlags, uintptr, uintptr, uintptr, uintptr) uint78 var xBusOwnNameOnConnection func(uintptr, string, BusNameOwnerFlags, uintptr, uintptr, uintptr, uintptr) uint
78 79
79-// Like g_bus_own_name() but takes a #GDBusConnection instead of a80+// Like [func@Gio.bus_own_name] but takes a [class@Gio.DBusConnection] instead
80-// #GBusType.81+// of a [enum@Gio.BusType].
81 func BusOwnNameOnConnection(ConnectionVar *DBusConnection, NameVar string, FlagsVar BusNameOwnerFlags, NameAcquiredHandlerVar *BusNameAcquiredCallback, NameLostHandlerVar *BusNameLostCallback, UserDataVar uintptr, UserDataFreeFuncVar *glib.DestroyNotify) uint {82 func BusOwnNameOnConnection(ConnectionVar *DBusConnection, NameVar string, FlagsVar BusNameOwnerFlags, NameAcquiredHandlerVar *BusNameAcquiredCallback, NameLostHandlerVar *BusNameLostCallback, UserDataVar uintptr, UserDataFreeFuncVar *glib.DestroyNotify) uint {
82 83
83 cret := xBusOwnNameOnConnection(ConnectionVar.GoPointer(), NameVar, FlagsVar, glib.NewCallbackNullable(NameAcquiredHandlerVar), glib.NewCallbackNullable(NameLostHandlerVar), UserDataVar, glib.NewCallbackNullable(UserDataFreeFuncVar))84 cret := xBusOwnNameOnConnection(ConnectionVar.GoPointer(), NameVar, FlagsVar, glib.NewCallbackNullable(NameAcquiredHandlerVar), glib.NewCallbackNullable(NameLostHandlerVar), UserDataVar, glib.NewCallbackNullable(UserDataFreeFuncVar))
@@ -86,7 +87,7 @@ func BusOwnNameOnConnection(ConnectionVar *DBusConnection, NameVar string, Flags
86 87
87 var xBusOwnNameOnConnectionWithClosures func(uintptr, string, BusNameOwnerFlags, *gobject.Closure, *gobject.Closure) uint88 var xBusOwnNameOnConnectionWithClosures func(uintptr, string, BusNameOwnerFlags, *gobject.Closure, *gobject.Closure) uint
88 89
89-// Version of g_bus_own_name_on_connection() using closures instead of90+// Version of [func@Gio.bus_own_name_on_connection] using closures instead of
90 // callbacks for easier binding in other languages.91 // callbacks for easier binding in other languages.
91 func BusOwnNameOnConnectionWithClosures(ConnectionVar *DBusConnection, NameVar string, FlagsVar BusNameOwnerFlags, NameAcquiredClosureVar *gobject.Closure, NameLostClosureVar *gobject.Closure) uint {92 func BusOwnNameOnConnectionWithClosures(ConnectionVar *DBusConnection, NameVar string, FlagsVar BusNameOwnerFlags, NameAcquiredClosureVar *gobject.Closure, NameLostClosureVar *gobject.Closure) uint {
92 93
@@ -96,7 +97,7 @@ func BusOwnNameOnConnectionWithClosures(ConnectionVar *DBusConnection, NameVar s
96 97
97 var xBusOwnNameWithClosures func(BusType, string, BusNameOwnerFlags, *gobject.Closure, *gobject.Closure, *gobject.Closure) uint98 var xBusOwnNameWithClosures func(BusType, string, BusNameOwnerFlags, *gobject.Closure, *gobject.Closure, *gobject.Closure) uint
98 99
99-// Version of g_bus_own_name() using closures instead of callbacks for100+// Version of [func@Gio.bus_own_name using closures instead of callbacks for
100 // easier binding in other languages.101 // easier binding in other languages.
101 func BusOwnNameWithClosures(BusTypeVar BusType, NameVar string, FlagsVar BusNameOwnerFlags, BusAcquiredClosureVar *gobject.Closure, NameAcquiredClosureVar *gobject.Closure, NameLostClosureVar *gobject.Closure) uint {102 func BusOwnNameWithClosures(BusTypeVar BusType, NameVar string, FlagsVar BusNameOwnerFlags, BusAcquiredClosureVar *gobject.Closure, NameAcquiredClosureVar *gobject.Closure, NameLostClosureVar *gobject.Closure) uint {
102 103
@@ -109,11 +110,12 @@ var xBusUnownName func(uint)
109 // Stops owning a name.110 // Stops owning a name.
110 //111 //
111 // Note that there may still be D-Bus traffic to process (relating to owning112 // Note that there may still be D-Bus traffic to process (relating to owning
112-// and unowning the name) in the current thread-default #GMainContext after113+// and unowning the name) in the current thread-default
113-// this function has returned. You should continue to iterate the #GMainContext114+// [struct@GLib.MainContext] after this function has returned. You should
114-// until the #GDestroyNotify function passed to g_bus_own_name() is called, in115+// continue to iterate the [struct@GLib.MainContext] until the
115-// order to avoid memory leaks through callbacks queued on the #GMainContext116+// [callback@GLib.DestroyNotify] function passed to [func@Gio.bus_own_name] is
116-// after it’s stopped being iterated.117+// called, in order to avoid memory leaks through callbacks queued on the
118+// [struct@GLib.MainContext] after it’s stopped being iterated.
117 func BusUnownName(OwnerIdVar uint) {119 func BusUnownName(OwnerIdVar uint) {
118 120
119 xBusUnownName(OwnerIdVar)121 xBusUnownName(OwnerIdVar)
M v4/gio/gdbusnamewatching.go +3 -3
@@ -39,8 +39,8 @@ var xBusWatchName func(BusType, string, BusNameWatcherFlags, uintptr, uintptr, u
39 // Starts watching @name on the bus specified by @bus_type and calls39 // Starts watching @name on the bus specified by @bus_type and calls
40 // @name_appeared_handler and @name_vanished_handler when the name is40 // @name_appeared_handler and @name_vanished_handler when the name is
41 // known to have an owner respectively known to lose its41 // known to have an owner respectively known to lose its
42-// owner. Callbacks will be invoked in the42+// owner. Callbacks will be invoked in the thread-default main context
43-// [thread-default main context][g-main-context-push-thread-default]43+// (see [method@GLib.MainContext.push_thread_default])
44 // of the thread you are calling this function from.44 // of the thread you are calling this function from.
45 //45 //
46 // You are guaranteed that one of the handlers will be invoked after46 // You are guaranteed that one of the handlers will be invoked after
@@ -61,7 +61,7 @@ var xBusWatchName func(BusType, string, BusNameWatcherFlags, uintptr, uintptr, u
61 // will be @name_vanished_handler. The reverse is also true.61 // will be @name_vanished_handler. The reverse is also true.
62 //62 //
63 // This behavior makes it very simple to write applications that want63 // This behavior makes it very simple to write applications that want
64-// to take action when a certain [name exists][gdbus-watching-names].64+// to take action when a certain [name exists](dbus-name-watching.html#d-bus-name-watching).
65 // Basically, the application should create object proxies in65 // Basically, the application should create object proxies in
66 // @name_appeared_handler and destroy them again (if any) in66 // @name_appeared_handler and destroy them again (if any) in
67 // @name_vanished_handler.67 // @name_vanished_handler.
M v4/gio/gdbusobject.go +13 -3
@@ -33,6 +33,7 @@ func (x *DBusObjectIface) GoPointer() uintptr {
33 }33 }
34 34
35 // OverrideGetObjectPath sets the callback function.35 // OverrideGetObjectPath sets the callback function.
36+// Returns the object path. See g_dbus_object_get_object_path().
36 func (x *DBusObjectIface) OverrideGetObjectPath(cb func(DBusObject) string) {37 func (x *DBusObjectIface) OverrideGetObjectPath(cb func(DBusObject) string) {
37 if cb == nil {38 if cb == nil {
38 x.xGetObjectPath = 039 x.xGetObjectPath = 0
@@ -44,6 +45,7 @@ func (x *DBusObjectIface) OverrideGetObjectPath(cb func(DBusObject) string) {
44 }45 }
45 46
46 // GetGetObjectPath gets the callback function.47 // GetGetObjectPath gets the callback function.
48+// Returns the object path. See g_dbus_object_get_object_path().
47 func (x *DBusObjectIface) GetGetObjectPath() func(DBusObject) string {49 func (x *DBusObjectIface) GetGetObjectPath() func(DBusObject) string {
48 if x.xGetObjectPath == 0 {50 if x.xGetObjectPath == 0 {
49 return nil51 return nil
@@ -56,6 +58,7 @@ func (x *DBusObjectIface) GetGetObjectPath() func(DBusObject) string {
56 }58 }
57 59
58 // OverrideGetInterfaces sets the callback function.60 // OverrideGetInterfaces sets the callback function.
61+// Returns all interfaces. See g_dbus_object_get_interfaces().
59 func (x *DBusObjectIface) OverrideGetInterfaces(cb func(DBusObject) *glib.List) {62 func (x *DBusObjectIface) OverrideGetInterfaces(cb func(DBusObject) *glib.List) {
60 if cb == nil {63 if cb == nil {
61 x.xGetInterfaces = 064 x.xGetInterfaces = 0
@@ -67,6 +70,7 @@ func (x *DBusObjectIface) OverrideGetInterfaces(cb func(DBusObject) *glib.List)
67 }70 }
68 71
69 // GetGetInterfaces gets the callback function.72 // GetGetInterfaces gets the callback function.
73+// Returns all interfaces. See g_dbus_object_get_interfaces().
70 func (x *DBusObjectIface) GetGetInterfaces() func(DBusObject) *glib.List {74 func (x *DBusObjectIface) GetGetInterfaces() func(DBusObject) *glib.List {
71 if x.xGetInterfaces == 0 {75 if x.xGetInterfaces == 0 {
72 return nil76 return nil
@@ -79,6 +83,7 @@ func (x *DBusObjectIface) GetGetInterfaces() func(DBusObject) *glib.List {
79 }83 }
80 84
81 // OverrideGetInterface sets the callback function.85 // OverrideGetInterface sets the callback function.
86+// Returns an interface by name. See g_dbus_object_get_interface().
82 func (x *DBusObjectIface) OverrideGetInterface(cb func(DBusObject, string) *DBusInterfaceBase) {87 func (x *DBusObjectIface) OverrideGetInterface(cb func(DBusObject, string) *DBusInterfaceBase) {
83 if cb == nil {88 if cb == nil {
84 x.xGetInterface = 089 x.xGetInterface = 0
@@ -94,6 +99,7 @@ func (x *DBusObjectIface) OverrideGetInterface(cb func(DBusObject, string) *DBus
94 }99 }
95 100
96 // GetGetInterface gets the callback function.101 // GetGetInterface gets the callback function.
102+// Returns an interface by name. See g_dbus_object_get_interface().
97 func (x *DBusObjectIface) GetGetInterface() func(DBusObject, string) *DBusInterfaceBase {103 func (x *DBusObjectIface) GetGetInterface() func(DBusObject, string) *DBusInterfaceBase {
98 if x.xGetInterface == 0 {104 if x.xGetInterface == 0 {
99 return nil105 return nil
@@ -112,6 +118,7 @@ func (x *DBusObjectIface) GetGetInterface() func(DBusObject, string) *DBusInterf
112 }118 }
113 119
114 // OverrideInterfaceAdded sets the callback function.120 // OverrideInterfaceAdded sets the callback function.
121+// Signal handler for the #GDBusObject::interface-added signal.
115 func (x *DBusObjectIface) OverrideInterfaceAdded(cb func(DBusObject, DBusInterface)) {122 func (x *DBusObjectIface) OverrideInterfaceAdded(cb func(DBusObject, DBusInterface)) {
116 if cb == nil {123 if cb == nil {
117 x.xInterfaceAdded = 0124 x.xInterfaceAdded = 0
@@ -123,6 +130,7 @@ func (x *DBusObjectIface) OverrideInterfaceAdded(cb func(DBusObject, DBusInterfa
123 }130 }
124 131
125 // GetInterfaceAdded gets the callback function.132 // GetInterfaceAdded gets the callback function.
133+// Signal handler for the #GDBusObject::interface-added signal.
126 func (x *DBusObjectIface) GetInterfaceAdded() func(DBusObject, DBusInterface) {134 func (x *DBusObjectIface) GetInterfaceAdded() func(DBusObject, DBusInterface) {
127 if x.xInterfaceAdded == 0 {135 if x.xInterfaceAdded == 0 {
128 return nil136 return nil
@@ -135,6 +143,7 @@ func (x *DBusObjectIface) GetInterfaceAdded() func(DBusObject, DBusInterface) {
135 }143 }
136 144
137 // OverrideInterfaceRemoved sets the callback function.145 // OverrideInterfaceRemoved sets the callback function.
146+// Signal handler for the #GDBusObject::interface-removed signal.
138 func (x *DBusObjectIface) OverrideInterfaceRemoved(cb func(DBusObject, DBusInterface)) {147 func (x *DBusObjectIface) OverrideInterfaceRemoved(cb func(DBusObject, DBusInterface)) {
139 if cb == nil {148 if cb == nil {
140 x.xInterfaceRemoved = 0149 x.xInterfaceRemoved = 0
@@ -146,6 +155,7 @@ func (x *DBusObjectIface) OverrideInterfaceRemoved(cb func(DBusObject, DBusInter
146 }155 }
147 156
148 // GetInterfaceRemoved gets the callback function.157 // GetInterfaceRemoved gets the callback function.
158+// Signal handler for the #GDBusObject::interface-removed signal.
149 func (x *DBusObjectIface) GetInterfaceRemoved() func(DBusObject, DBusInterface) {159 func (x *DBusObjectIface) GetInterfaceRemoved() func(DBusObject, DBusInterface) {
150 if x.xInterfaceRemoved == 0 {160 if x.xInterfaceRemoved == 0 {
151 return nil161 return nil
@@ -157,9 +167,9 @@ func (x *DBusObjectIface) GetInterfaceRemoved() func(DBusObject, DBusInterface)
157 }167 }
158 }168 }
159 169
160-// The #GDBusObject type is the base type for D-Bus objects on both170+// The `GDBusObject` type is the base type for D-Bus objects on both
161-// the service side (see #GDBusObjectSkeleton) and the client side171+// the service side (see [class@Gio.DBusObjectSkeleton]) and the client side
162-// (see #GDBusObjectProxy). It is essentially just a container of172+// (see [class@Gio.DBusObjectProxy]). It is essentially just a container of
163 // interfaces.173 // interfaces.
164 type DBusObject interface {174 type DBusObject interface {
165 GoPointer() uintptr175 GoPointer() uintptr
M v4/gio/gdbusobjectmanager.go +20 -4
@@ -39,6 +39,7 @@ func (x *DBusObjectManagerIface) GoPointer() uintptr {
39 }39 }
40 40
41 // OverrideGetObjectPath sets the callback function.41 // OverrideGetObjectPath sets the callback function.
42+// Virtual function for g_dbus_object_manager_get_object_path().
42 func (x *DBusObjectManagerIface) OverrideGetObjectPath(cb func(DBusObjectManager) string) {43 func (x *DBusObjectManagerIface) OverrideGetObjectPath(cb func(DBusObjectManager) string) {
43 if cb == nil {44 if cb == nil {
44 x.xGetObjectPath = 045 x.xGetObjectPath = 0
@@ -50,6 +51,7 @@ func (x *DBusObjectManagerIface) OverrideGetObjectPath(cb func(DBusObjectManager
50 }51 }
51 52
52 // GetGetObjectPath gets the callback function.53 // GetGetObjectPath gets the callback function.
54+// Virtual function for g_dbus_object_manager_get_object_path().
53 func (x *DBusObjectManagerIface) GetGetObjectPath() func(DBusObjectManager) string {55 func (x *DBusObjectManagerIface) GetGetObjectPath() func(DBusObjectManager) string {
54 if x.xGetObjectPath == 0 {56 if x.xGetObjectPath == 0 {
55 return nil57 return nil
@@ -62,6 +64,7 @@ func (x *DBusObjectManagerIface) GetGetObjectPath() func(DBusObjectManager) stri
62 }64 }
63 65
64 // OverrideGetObjects sets the callback function.66 // OverrideGetObjects sets the callback function.
67+// Virtual function for g_dbus_object_manager_get_objects().
65 func (x *DBusObjectManagerIface) OverrideGetObjects(cb func(DBusObjectManager) *glib.List) {68 func (x *DBusObjectManagerIface) OverrideGetObjects(cb func(DBusObjectManager) *glib.List) {
66 if cb == nil {69 if cb == nil {
67 x.xGetObjects = 070 x.xGetObjects = 0
@@ -73,6 +76,7 @@ func (x *DBusObjectManagerIface) OverrideGetObjects(cb func(DBusObjectManager) *
73 }76 }
74 77
75 // GetGetObjects gets the callback function.78 // GetGetObjects gets the callback function.
79+// Virtual function for g_dbus_object_manager_get_objects().
76 func (x *DBusObjectManagerIface) GetGetObjects() func(DBusObjectManager) *glib.List {80 func (x *DBusObjectManagerIface) GetGetObjects() func(DBusObjectManager) *glib.List {
77 if x.xGetObjects == 0 {81 if x.xGetObjects == 0 {
78 return nil82 return nil
@@ -85,6 +89,7 @@ func (x *DBusObjectManagerIface) GetGetObjects() func(DBusObjectManager) *glib.L
85 }89 }
86 90
87 // OverrideGetObject sets the callback function.91 // OverrideGetObject sets the callback function.
92+// Virtual function for g_dbus_object_manager_get_object().
88 func (x *DBusObjectManagerIface) OverrideGetObject(cb func(DBusObjectManager, string) *DBusObjectBase) {93 func (x *DBusObjectManagerIface) OverrideGetObject(cb func(DBusObjectManager, string) *DBusObjectBase) {
89 if cb == nil {94 if cb == nil {
90 x.xGetObject = 095 x.xGetObject = 0
@@ -100,6 +105,7 @@ func (x *DBusObjectManagerIface) OverrideGetObject(cb func(DBusObjectManager, st
100 }105 }
101 106
102 // GetGetObject gets the callback function.107 // GetGetObject gets the callback function.
108+// Virtual function for g_dbus_object_manager_get_object().
103 func (x *DBusObjectManagerIface) GetGetObject() func(DBusObjectManager, string) *DBusObjectBase {109 func (x *DBusObjectManagerIface) GetGetObject() func(DBusObjectManager, string) *DBusObjectBase {
104 if x.xGetObject == 0 {110 if x.xGetObject == 0 {
105 return nil111 return nil
@@ -118,6 +124,7 @@ func (x *DBusObjectManagerIface) GetGetObject() func(DBusObjectManager, string)
118 }124 }
119 125
120 // OverrideGetInterface sets the callback function.126 // OverrideGetInterface sets the callback function.
127+// Virtual function for g_dbus_object_manager_get_interface().
121 func (x *DBusObjectManagerIface) OverrideGetInterface(cb func(DBusObjectManager, string, string) *DBusInterfaceBase) {128 func (x *DBusObjectManagerIface) OverrideGetInterface(cb func(DBusObjectManager, string, string) *DBusInterfaceBase) {
122 if cb == nil {129 if cb == nil {
123 x.xGetInterface = 0130 x.xGetInterface = 0
@@ -133,6 +140,7 @@ func (x *DBusObjectManagerIface) OverrideGetInterface(cb func(DBusObjectManager,
133 }140 }
134 141
135 // GetGetInterface gets the callback function.142 // GetGetInterface gets the callback function.
143+// Virtual function for g_dbus_object_manager_get_interface().
136 func (x *DBusObjectManagerIface) GetGetInterface() func(DBusObjectManager, string, string) *DBusInterfaceBase {144 func (x *DBusObjectManagerIface) GetGetInterface() func(DBusObjectManager, string, string) *DBusInterfaceBase {
137 if x.xGetInterface == 0 {145 if x.xGetInterface == 0 {
138 return nil146 return nil
@@ -151,6 +159,7 @@ func (x *DBusObjectManagerIface) GetGetInterface() func(DBusObjectManager, strin
151 }159 }
152 160
153 // OverrideObjectAdded sets the callback function.161 // OverrideObjectAdded sets the callback function.
162+// Signal handler for the #GDBusObjectManager::object-added signal.
154 func (x *DBusObjectManagerIface) OverrideObjectAdded(cb func(DBusObjectManager, DBusObject)) {163 func (x *DBusObjectManagerIface) OverrideObjectAdded(cb func(DBusObjectManager, DBusObject)) {
155 if cb == nil {164 if cb == nil {
156 x.xObjectAdded = 0165 x.xObjectAdded = 0
@@ -162,6 +171,7 @@ func (x *DBusObjectManagerIface) OverrideObjectAdded(cb func(DBusObjectManager,
162 }171 }
163 172
164 // GetObjectAdded gets the callback function.173 // GetObjectAdded gets the callback function.
174+// Signal handler for the #GDBusObjectManager::object-added signal.
165 func (x *DBusObjectManagerIface) GetObjectAdded() func(DBusObjectManager, DBusObject) {175 func (x *DBusObjectManagerIface) GetObjectAdded() func(DBusObjectManager, DBusObject) {
166 if x.xObjectAdded == 0 {176 if x.xObjectAdded == 0 {
167 return nil177 return nil
@@ -174,6 +184,7 @@ func (x *DBusObjectManagerIface) GetObjectAdded() func(DBusObjectManager, DBusOb
174 }184 }
175 185
176 // OverrideObjectRemoved sets the callback function.186 // OverrideObjectRemoved sets the callback function.
187+// Signal handler for the #GDBusObjectManager::object-removed signal.
177 func (x *DBusObjectManagerIface) OverrideObjectRemoved(cb func(DBusObjectManager, DBusObject)) {188 func (x *DBusObjectManagerIface) OverrideObjectRemoved(cb func(DBusObjectManager, DBusObject)) {
178 if cb == nil {189 if cb == nil {
179 x.xObjectRemoved = 0190 x.xObjectRemoved = 0
@@ -185,6 +196,7 @@ func (x *DBusObjectManagerIface) OverrideObjectRemoved(cb func(DBusObjectManager
185 }196 }
186 197
187 // GetObjectRemoved gets the callback function.198 // GetObjectRemoved gets the callback function.
199+// Signal handler for the #GDBusObjectManager::object-removed signal.
188 func (x *DBusObjectManagerIface) GetObjectRemoved() func(DBusObjectManager, DBusObject) {200 func (x *DBusObjectManagerIface) GetObjectRemoved() func(DBusObjectManager, DBusObject) {
189 if x.xObjectRemoved == 0 {201 if x.xObjectRemoved == 0 {
190 return nil202 return nil
@@ -197,6 +209,7 @@ func (x *DBusObjectManagerIface) GetObjectRemoved() func(DBusObjectManager, DBus
197 }209 }
198 210
199 // OverrideInterfaceAdded sets the callback function.211 // OverrideInterfaceAdded sets the callback function.
212+// Signal handler for the #GDBusObjectManager::interface-added signal.
200 func (x *DBusObjectManagerIface) OverrideInterfaceAdded(cb func(DBusObjectManager, DBusObject, DBusInterface)) {213 func (x *DBusObjectManagerIface) OverrideInterfaceAdded(cb func(DBusObjectManager, DBusObject, DBusInterface)) {
201 if cb == nil {214 if cb == nil {
202 x.xInterfaceAdded = 0215 x.xInterfaceAdded = 0
@@ -208,6 +221,7 @@ func (x *DBusObjectManagerIface) OverrideInterfaceAdded(cb func(DBusObjectManage
208 }221 }
209 222
210 // GetInterfaceAdded gets the callback function.223 // GetInterfaceAdded gets the callback function.
224+// Signal handler for the #GDBusObjectManager::interface-added signal.
211 func (x *DBusObjectManagerIface) GetInterfaceAdded() func(DBusObjectManager, DBusObject, DBusInterface) {225 func (x *DBusObjectManagerIface) GetInterfaceAdded() func(DBusObjectManager, DBusObject, DBusInterface) {
212 if x.xInterfaceAdded == 0 {226 if x.xInterfaceAdded == 0 {
213 return nil227 return nil
@@ -220,6 +234,7 @@ func (x *DBusObjectManagerIface) GetInterfaceAdded() func(DBusObjectManager, DBu
220 }234 }
221 235
222 // OverrideInterfaceRemoved sets the callback function.236 // OverrideInterfaceRemoved sets the callback function.
237+// Signal handler for the #GDBusObjectManager::interface-removed signal.
223 func (x *DBusObjectManagerIface) OverrideInterfaceRemoved(cb func(DBusObjectManager, DBusObject, DBusInterface)) {238 func (x *DBusObjectManagerIface) OverrideInterfaceRemoved(cb func(DBusObjectManager, DBusObject, DBusInterface)) {
224 if cb == nil {239 if cb == nil {
225 x.xInterfaceRemoved = 0240 x.xInterfaceRemoved = 0
@@ -231,6 +246,7 @@ func (x *DBusObjectManagerIface) OverrideInterfaceRemoved(cb func(DBusObjectMana
231 }246 }
232 247
233 // GetInterfaceRemoved gets the callback function.248 // GetInterfaceRemoved gets the callback function.
249+// Signal handler for the #GDBusObjectManager::interface-removed signal.
234 func (x *DBusObjectManagerIface) GetInterfaceRemoved() func(DBusObjectManager, DBusObject, DBusInterface) {250 func (x *DBusObjectManagerIface) GetInterfaceRemoved() func(DBusObjectManager, DBusObject, DBusInterface) {
235 if x.xInterfaceRemoved == 0 {251 if x.xInterfaceRemoved == 0 {
236 return nil252 return nil
@@ -242,13 +258,13 @@ func (x *DBusObjectManagerIface) GetInterfaceRemoved() func(DBusObjectManager, D
242 }258 }
243 }259 }
244 260
245-// The #GDBusObjectManager type is the base type for service- and261+// The `GDBusObjectManager` type is the base type for service- and
246 // client-side implementations of the standardized262 // client-side implementations of the standardized
247-// [org.freedesktop.DBus.ObjectManager](http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager)263+// [`org.freedesktop.DBus.ObjectManager`](http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager)
248 // interface.264 // interface.
249 //265 //
250-// See #GDBusObjectManagerClient for the client-side implementation266+// See [class@Gio.DBusObjectManagerClient] for the client-side implementation
251-// and #GDBusObjectManagerServer for the service-side implementation.267+// and [class@Gio.DBusObjectManagerServer] for the service-side implementation.
252 type DBusObjectManager interface {268 type DBusObjectManager interface {
253 GoPointer() uintptr269 GoPointer() uintptr
254 SetGoPointer(uintptr)270 SetGoPointer(uintptr)
M v4/gio/gdbusobjectmanagerclient.go +69 -62
@@ -30,6 +30,7 @@ func (x *DBusObjectManagerClientClass) GoPointer() uintptr {
30 }30 }
31 31
32 // OverrideInterfaceProxySignal sets the callback function.32 // OverrideInterfaceProxySignal sets the callback function.
33+// Signal class handler for the #GDBusObjectManagerClient::interface-proxy-signal signal.
33 func (x *DBusObjectManagerClientClass) OverrideInterfaceProxySignal(cb func(*DBusObjectManagerClient, *DBusObjectProxy, *DBusProxy, string, string, *glib.Variant)) {34 func (x *DBusObjectManagerClientClass) OverrideInterfaceProxySignal(cb func(*DBusObjectManagerClient, *DBusObjectProxy, *DBusProxy, string, string, *glib.Variant)) {
34 if cb == nil {35 if cb == nil {
35 x.xInterfaceProxySignal = 036 x.xInterfaceProxySignal = 0
@@ -41,6 +42,7 @@ func (x *DBusObjectManagerClientClass) OverrideInterfaceProxySignal(cb func(*DBu
41 }42 }
42 43
43 // GetInterfaceProxySignal gets the callback function.44 // GetInterfaceProxySignal gets the callback function.
45+// Signal class handler for the #GDBusObjectManagerClient::interface-proxy-signal signal.
44 func (x *DBusObjectManagerClientClass) GetInterfaceProxySignal() func(*DBusObjectManagerClient, *DBusObjectProxy, *DBusProxy, string, string, *glib.Variant) {46 func (x *DBusObjectManagerClientClass) GetInterfaceProxySignal() func(*DBusObjectManagerClient, *DBusObjectProxy, *DBusProxy, string, string, *glib.Variant) {
45 if x.xInterfaceProxySignal == 0 {47 if x.xInterfaceProxySignal == 0 {
46 return nil48 return nil
@@ -53,6 +55,7 @@ func (x *DBusObjectManagerClientClass) GetInterfaceProxySignal() func(*DBusObjec
53 }55 }
54 56
55 // OverrideInterfaceProxyPropertiesChanged sets the callback function.57 // OverrideInterfaceProxyPropertiesChanged sets the callback function.
58+// Signal class handler for the #GDBusObjectManagerClient::interface-proxy-properties-changed signal.
56 func (x *DBusObjectManagerClientClass) OverrideInterfaceProxyPropertiesChanged(cb func(*DBusObjectManagerClient, *DBusObjectProxy, *DBusProxy, *glib.Variant, string)) {59 func (x *DBusObjectManagerClientClass) OverrideInterfaceProxyPropertiesChanged(cb func(*DBusObjectManagerClient, *DBusObjectProxy, *DBusProxy, *glib.Variant, string)) {
57 if cb == nil {60 if cb == nil {
58 x.xInterfaceProxyPropertiesChanged = 061 x.xInterfaceProxyPropertiesChanged = 0
@@ -64,6 +67,7 @@ func (x *DBusObjectManagerClientClass) OverrideInterfaceProxyPropertiesChanged(c
64 }67 }
65 68
66 // GetInterfaceProxyPropertiesChanged gets the callback function.69 // GetInterfaceProxyPropertiesChanged gets the callback function.
70+// Signal class handler for the #GDBusObjectManagerClient::interface-proxy-properties-changed signal.
67 func (x *DBusObjectManagerClientClass) GetInterfaceProxyPropertiesChanged() func(*DBusObjectManagerClient, *DBusObjectProxy, *DBusProxy, *glib.Variant, string) {71 func (x *DBusObjectManagerClientClass) GetInterfaceProxyPropertiesChanged() func(*DBusObjectManagerClient, *DBusObjectProxy, *DBusProxy, *glib.Variant, string) {
68 if x.xInterfaceProxyPropertiesChanged == 0 {72 if x.xInterfaceProxyPropertiesChanged == 0 {
69 return nil73 return nil
@@ -83,79 +87,82 @@ func (x *DBusObjectManagerClientPrivate) GoPointer() uintptr {
83 return uintptr(unsafe.Pointer(x))87 return uintptr(unsafe.Pointer(x))
84 }88 }
85 89
86-// #GDBusObjectManagerClient is used to create, monitor and delete object90+// `GDBusObjectManagerClient` is used to create, monitor and delete object
87-// proxies for remote objects exported by a #GDBusObjectManagerServer (or any91+// proxies for remote objects exported by a [class@Gio.DBusObjectManagerServer]
88-// code implementing the92+// (or any code implementing the
89 // [org.freedesktop.DBus.ObjectManager](http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager)93 // [org.freedesktop.DBus.ObjectManager](http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager)
90 // interface).94 // interface).
91 //95 //
92 // Once an instance of this type has been created, you can connect to96 // Once an instance of this type has been created, you can connect to
93-// the #GDBusObjectManager::object-added and97+// the [signal@Gio.DBusObjectManager::object-added] and
94-// #GDBusObjectManager::object-removed signals and inspect the98+// [signal@Gio.DBusObjectManager::object-removed signals] and inspect the
95-// #GDBusObjectProxy objects returned by99+// [class@Gio.DBusObjectProxy] objects returned by
96-// g_dbus_object_manager_get_objects().100+// [method@Gio.DBusObjectManager.get_objects].
97 //101 //
98-// If the name for a #GDBusObjectManagerClient is not owned by anyone at102+// If the name for a `GDBusObjectManagerClient` is not owned by anyone at
99 // object construction time, the default behavior is to request the103 // object construction time, the default behavior is to request the
100 // message bus to launch an owner for the name. This behavior can be104 // message bus to launch an owner for the name. This behavior can be
101-// disabled using the %G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_DO_NOT_AUTO_START105+// disabled using the `G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_DO_NOT_AUTO_START`
102-// flag. It's also worth noting that this only works if the name of106+// flag. It’s also worth noting that this only works if the name of
103 // interest is activatable in the first place. E.g. in some cases it107 // interest is activatable in the first place. E.g. in some cases it
104 // is not possible to launch an owner for the requested name. In this108 // is not possible to launch an owner for the requested name. In this
105-// case, #GDBusObjectManagerClient object construction still succeeds but109+// case, `GDBusObjectManagerClient` object construction still succeeds but
106 // there will be no object proxies110 // there will be no object proxies
107-// (e.g. g_dbus_object_manager_get_objects() returns the empty list) and111+// (e.g. [method@Gio.DBusObjectManager.get_objects] returns the empty list) and
108-// the #GDBusObjectManagerClient:name-owner property is %NULL.112+// the [property@Gio.DBusObjectManagerClient:name-owner] property is `NULL`.
109 //113 //
110 // The owner of the requested name can come and go (for example114 // The owner of the requested name can come and go (for example
111-// consider a system service being restarted) – #GDBusObjectManagerClient115+// consider a system service being restarted) – `GDBusObjectManagerClient`
112-// handles this case too; simply connect to the #GObject::notify116+// handles this case too; simply connect to the [signal@GObject.Object::notify]
113-// signal to watch for changes on the #GDBusObjectManagerClient:name-owner117+// signal to watch for changes on the
114-// property. When the name owner vanishes, the behavior is that118+// [property@Gio.DBusObjectManagerClient:name-owner] property. When the name
115-// #GDBusObjectManagerClient:name-owner is set to %NULL (this includes119+// owner vanishes, the behavior is that
116-// emission of the #GObject::notify signal) and then120+// [property@Gio.DBusObjectManagerClient:name-owner] is set to `NULL` (this
117-// #GDBusObjectManager::object-removed signals are synthesized121+// includes emission of the [signal@GObject.Object::notify] signal) and then
122+// [signal@Gio.DBusObjectManager::object-removed] signals are synthesized
118 // for all currently existing object proxies. Since123 // for all currently existing object proxies. Since
119-// #GDBusObjectManagerClient:name-owner is %NULL when this happens, you can124+// [property@Gio.DBusObjectManagerClient:name-owner] is `NULL` when this
120-// use this information to disambiguate a synthesized signal from a125+// happens, you can use this information to disambiguate a synthesized signal
121-// genuine signal caused by object removal on the remote126+// from a genuine signal caused by object removal on the remote
122-// #GDBusObjectManager. Similarly, when a new name owner appears,127+// [iface@Gio.DBusObjectManager]. Similarly, when a new name owner appears,
123-// #GDBusObjectManager::object-added signals are synthesized128+// [signal@Gio.DBusObjectManager::object-added] signals are synthesized
124-// while #GDBusObjectManagerClient:name-owner is still %NULL. Only when all129+// while [property@Gio.DBusObjectManagerClient:name-owner] is still `NULL`. Only
125-// object proxies have been added, the #GDBusObjectManagerClient:name-owner130+// when all object proxies have been added, the
126-// is set to the new name owner (this includes emission of the131+// [property@Gio.DBusObjectManagerClient:name-owner] is set to the new name
127-// #GObject::notify signal). Furthermore, you are guaranteed that132+// owner (this includes emission of the [signal@GObject.Object::notify] signal).
128-// #GDBusObjectManagerClient:name-owner will alternate between a name owner133+// Furthermore, you are guaranteed that
129-// (e.g. `:1.42`) and %NULL even in the case where134+// [property@Gio.DBusObjectManagerClient:name-owner] will alternate between a
135+// name owner (e.g. `:1.42`) and `NULL` even in the case where
130 // the name of interest is atomically replaced136 // the name of interest is atomically replaced
131 //137 //
132-// Ultimately, #GDBusObjectManagerClient is used to obtain #GDBusProxy138+// Ultimately, `GDBusObjectManagerClient` is used to obtain
133-// instances. All signals (including the139+// [class@Gio.DBusProxy] instances. All signals (including the
134-// org.freedesktop.DBus.Properties::PropertiesChanged signal)140+// `org.freedesktop.DBus.Properties::PropertiesChanged` signal)
135-// delivered to #GDBusProxy instances are guaranteed to originate141+// delivered to [class@Gio.DBusProxy] instances are guaranteed to originate
136 // from the name owner. This guarantee along with the behavior142 // from the name owner. This guarantee along with the behavior
137 // described above, means that certain race conditions including the143 // described above, means that certain race conditions including the
138-// "half the proxy is from the old owner and the other half is from144+// “half the proxy is from the old owner and the other half is from
139-// the new owner" problem cannot happen.145+// the new owner” problem cannot happen.
140 //146 //
141 // To avoid having the application connect to signals on the returned147 // To avoid having the application connect to signals on the returned
142-// #GDBusObjectProxy and #GDBusProxy objects, the148+// [class@Gio.DBusObjectProxy] and [class@Gio.DBusProxy] objects, the
143-// #GDBusObject::interface-added,149+// [signal@Gio.DBusObject::interface-added],
144-// #GDBusObject::interface-removed,150+// [signal@Gio.DBusObject::interface-removed],
145-// #GDBusProxy::g-properties-changed and151+// [signal@Gio.DBusProxy::g-properties-changed] and
146-// #GDBusProxy::g-signal signals152+// [signal@Gio.DBusProxy::g-signal] signals
147-// are also emitted on the #GDBusObjectManagerClient instance managing these153+// are also emitted on the `GDBusObjectManagerClient` instance managing these
148 // objects. The signals emitted are154 // objects. The signals emitted are
149-// #GDBusObjectManager::interface-added,155+// [signal@Gio.DBusObjectManager::interface-added],
150-// #GDBusObjectManager::interface-removed,156+// [signal@Gio.DBusObjectManager::interface-removed],
151-// #GDBusObjectManagerClient::interface-proxy-properties-changed and157+// [signal@Gio.DBusObjectManagerClient::interface-proxy-properties-changed] and
152-// #GDBusObjectManagerClient::interface-proxy-signal.158+// [signal@Gio.DBusObjectManagerClient::interface-proxy-signal].
153 //159 //
154 // Note that all callbacks and signals are emitted in the160 // Note that all callbacks and signals are emitted in the
155-// [thread-default main context][g-main-context-push-thread-default]161+// thread-default main context (see
156-// that the #GDBusObjectManagerClient object was constructed162+// [method@GLib.MainContext.push_thread_default]) that the
157-// in. Additionally, the #GDBusObjectProxy and #GDBusProxy objects163+// `GDBusObjectManagerClient` object was constructed in. Additionally, the
158-// originating from the #GDBusObjectManagerClient object will be created in164+// [class@Gio.DBusObjectProxy] and [class@Gio.DBusProxy] objects
165+// originating from the `GDBusObjectManagerClient` object will be created in
159 // the same context and, consequently, will deliver signals in the166 // the same context and, consequently, will deliver signals in the
160 // same main loop.167 // same main loop.
161 type DBusObjectManagerClient struct {168 type DBusObjectManagerClient struct {
@@ -334,8 +341,8 @@ func (c *DBusObjectManagerClient) SetGoPointer(ptr uintptr) {
334 // This signal exists purely as a convenience to avoid having to341 // This signal exists purely as a convenience to avoid having to
335 // connect signals to all interface proxies managed by @manager.342 // connect signals to all interface proxies managed by @manager.
336 //343 //
337-// This signal is emitted in the344+// This signal is emitted in the thread-default main context
338-// [thread-default main context][g-main-context-push-thread-default]345+// (see [method@GLib.MainContext.push_thread_default])
339 // that @manager was constructed in.346 // that @manager was constructed in.
340 func (x *DBusObjectManagerClient) ConnectInterfaceProxyPropertiesChanged(cb *func(DBusObjectManagerClient, uintptr, uintptr, uintptr, []string)) uint32 {347 func (x *DBusObjectManagerClient) ConnectInterfaceProxyPropertiesChanged(cb *func(DBusObjectManagerClient, uintptr, uintptr, uintptr, []string)) uint32 {
341 cbPtr := uintptr(unsafe.Pointer(cb))348 cbPtr := uintptr(unsafe.Pointer(cb))
@@ -361,8 +368,8 @@ func (x *DBusObjectManagerClient) ConnectInterfaceProxyPropertiesChanged(cb *fun
361 // This signal exists purely as a convenience to avoid having to368 // This signal exists purely as a convenience to avoid having to
362 // connect signals to all interface proxies managed by @manager.369 // connect signals to all interface proxies managed by @manager.
363 //370 //
364-// This signal is emitted in the371+// This signal is emitted in the thread-default main context
365-// [thread-default main context][g-main-context-push-thread-default]372+// (see [method@GLib.MainContext.push_thread_default])
366 // that @manager was constructed in.373 // that @manager was constructed in.
367 func (x *DBusObjectManagerClient) ConnectInterfaceProxySignal(cb *func(DBusObjectManagerClient, uintptr, uintptr, string, string, uintptr)) uint32 {374 func (x *DBusObjectManagerClient) ConnectInterfaceProxySignal(cb *func(DBusObjectManagerClient, uintptr, uintptr, string, string, uintptr)) uint32 {
368 cbPtr := uintptr(unsafe.Pointer(cb))375 cbPtr := uintptr(unsafe.Pointer(cb))
@@ -519,7 +526,7 @@ func (x *DBusObjectManagerClient) GetObjects() *glib.List {
519 // If the object is not initialized, or initialization returns with an526 // If the object is not initialized, or initialization returns with an
520 // error, then all operations on the object except g_object_ref() and527 // error, then all operations on the object except g_object_ref() and
521 // g_object_unref() are considered to be invalid, and have undefined528 // g_object_unref() are considered to be invalid, and have undefined
522-// behaviour. See the [introduction][ginitable] for more details.529+// behaviour. See the [description][iface@Gio.Initable#description] for more details.
523 //530 //
524 // Callers should not assume that a class which implements #GInitable can be531 // Callers should not assume that a class which implements #GInitable can be
525 // initialized multiple times, unless the class explicitly documents itself as532 // initialized multiple times, unless the class explicitly documents itself as
@@ -555,10 +562,10 @@ var xDBusObjectManagerClientNew func(uintptr, DBusObjectManagerClientFlags, stri
555 // Asynchronously creates a new #GDBusObjectManagerClient object.562 // Asynchronously creates a new #GDBusObjectManagerClient object.
556 //563 //
557 // This is an asynchronous failable constructor. When the result is564 // This is an asynchronous failable constructor. When the result is
558-// ready, @callback will be invoked in the565+// ready, @callback will be invoked in the thread-default main context
559-// [thread-default main context][g-main-context-push-thread-default]566+// (see [method@GLib.MainContext.push_thread_default])
560-// of the thread you are calling this method from. You can567+// of the thread you are calling this method from. You can then call
561-// then call g_dbus_object_manager_client_new_finish() to get the result. See568+// g_dbus_object_manager_client_new_finish() to get the result. See
562 // g_dbus_object_manager_client_new_sync() for the synchronous version.569 // g_dbus_object_manager_client_new_sync() for the synchronous version.
563 func DBusObjectManagerClientNew(ConnectionVar *DBusConnection, FlagsVar DBusObjectManagerClientFlags, NameVar string, ObjectPathVar string, GetProxyTypeFuncVar *DBusProxyTypeFunc, GetProxyTypeUserDataVar uintptr, GetProxyTypeDestroyNotifyVar *glib.DestroyNotify, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {570 func DBusObjectManagerClientNew(ConnectionVar *DBusConnection, FlagsVar DBusObjectManagerClientFlags, NameVar string, ObjectPathVar string, GetProxyTypeFuncVar *DBusProxyTypeFunc, GetProxyTypeUserDataVar uintptr, GetProxyTypeDestroyNotifyVar *glib.DestroyNotify, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
564 571
@@ -572,8 +579,8 @@ var xDBusObjectManagerClientNewForBus func(BusType, DBusObjectManagerClientFlags
572 // #GDBusConnection.579 // #GDBusConnection.
573 //580 //
574 // This is an asynchronous failable constructor. When the result is581 // This is an asynchronous failable constructor. When the result is
575-// ready, @callback will be invoked in the582+// ready, @callback will be invoked in the thread-default main context
576-// [thread-default main loop][g-main-context-push-thread-default]583+// (see [method@GLib.MainContext.push_thread_default])
577 // of the thread you are calling this method from. You can584 // of the thread you are calling this method from. You can
578 // then call g_dbus_object_manager_client_new_for_bus_finish() to get the result. See585 // then call g_dbus_object_manager_client_new_for_bus_finish() to get the result. See
579 // g_dbus_object_manager_client_new_for_bus_sync() for the synchronous version.586 // g_dbus_object_manager_client_new_for_bus_sync() for the synchronous version.
M v4/gio/gdbusobjectmanagerserver.go +6 -7
@@ -33,9 +33,9 @@ func (x *DBusObjectManagerServerPrivate) GoPointer() uintptr {
33 return uintptr(unsafe.Pointer(x))33 return uintptr(unsafe.Pointer(x))
34 }34 }
35 35
36-// #GDBusObjectManagerServer is used to export #GDBusObject instances using36+// `GDBusObjectManagerServer` is used to export [iface@Gio.DBusObject] instances
37-// the standardized37+// using the standardized
38-// [org.freedesktop.DBus.ObjectManager](http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager)38+// [`org.freedesktop.DBus.ObjectManager`](http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager)
39 // interface. For example, remote D-Bus clients can get all objects39 // interface. For example, remote D-Bus clients can get all objects
40 // and properties in a single call. Additionally, any change in the40 // and properties in a single call. Additionally, any change in the
41 // object hierarchy is broadcast using signals. This means that D-Bus41 // object hierarchy is broadcast using signals. This means that D-Bus
@@ -51,10 +51,9 @@ func (x *DBusObjectManagerServerPrivate) GoPointer() uintptr {
51 // It is supported, but not recommended, to export an object manager at the root51 // It is supported, but not recommended, to export an object manager at the root
52 // path, `/`.52 // path, `/`.
53 //53 //
54-// See #GDBusObjectManagerClient for the client-side code that is54+// See [class@Gio.DBusObjectManagerClient] for the client-side code that is
55-// intended to be used with #GDBusObjectManagerServer or any D-Bus55+// intended to be used with `GDBusObjectManagerServer` or any D-Bus
56-// object implementing the org.freedesktop.DBus.ObjectManager56+// object implementing the `org.freedesktop.DBus.ObjectManager` interface.
57-// interface.
58 type DBusObjectManagerServer struct {57 type DBusObjectManagerServer struct {
59 gobject.Object58 gobject.Object
60 }59 }
M v4/gio/gdbusobjectproxy.go +3 -3
@@ -33,9 +33,9 @@ func (x *DBusObjectProxyPrivate) GoPointer() uintptr {
33 return uintptr(unsafe.Pointer(x))33 return uintptr(unsafe.Pointer(x))
34 }34 }
35 35
36-// A #GDBusObjectProxy is an object used to represent a remote object36+// A `GDBusObjectProxy` is an object used to represent a remote object
37-// with one or more D-Bus interfaces. Normally, you don't instantiate37+// with one or more D-Bus interfaces. Normally, you don’t instantiate
38-// a #GDBusObjectProxy yourself - typically #GDBusObjectManagerClient38+// a `GDBusObjectProxy` yourself — typically [class@Gio.DBusObjectManagerClient]
39 // is used to obtain it.39 // is used to obtain it.
40 type DBusObjectProxy struct {40 type DBusObjectProxy struct {
41 gobject.Object41 gobject.Object
M v4/gio/gdbusobjectskeleton.go +4 -2
@@ -28,6 +28,7 @@ func (x *DBusObjectSkeletonClass) GoPointer() uintptr {
28 }28 }
29 29
30 // OverrideAuthorizeMethod sets the callback function.30 // OverrideAuthorizeMethod sets the callback function.
31+// Signal class handler for the #GDBusObjectSkeleton::authorize-method signal.
31 func (x *DBusObjectSkeletonClass) OverrideAuthorizeMethod(cb func(*DBusObjectSkeleton, *DBusInterfaceSkeleton, *DBusMethodInvocation) bool) {32 func (x *DBusObjectSkeletonClass) OverrideAuthorizeMethod(cb func(*DBusObjectSkeleton, *DBusInterfaceSkeleton, *DBusMethodInvocation) bool) {
32 if cb == nil {33 if cb == nil {
33 x.xAuthorizeMethod = 034 x.xAuthorizeMethod = 0
@@ -39,6 +40,7 @@ func (x *DBusObjectSkeletonClass) OverrideAuthorizeMethod(cb func(*DBusObjectSke
39 }40 }
40 41
41 // GetAuthorizeMethod gets the callback function.42 // GetAuthorizeMethod gets the callback function.
43+// Signal class handler for the #GDBusObjectSkeleton::authorize-method signal.
42 func (x *DBusObjectSkeletonClass) GetAuthorizeMethod() func(*DBusObjectSkeleton, *DBusInterfaceSkeleton, *DBusMethodInvocation) bool {44 func (x *DBusObjectSkeletonClass) GetAuthorizeMethod() func(*DBusObjectSkeleton, *DBusInterfaceSkeleton, *DBusMethodInvocation) bool {
43 if x.xAuthorizeMethod == 0 {45 if x.xAuthorizeMethod == 0 {
44 return nil46 return nil
@@ -58,11 +60,11 @@ func (x *DBusObjectSkeletonPrivate) GoPointer() uintptr {
58 return uintptr(unsafe.Pointer(x))60 return uintptr(unsafe.Pointer(x))
59 }61 }
60 62
61-// A #GDBusObjectSkeleton instance is essentially a group of D-Bus63+// A `GDBusObjectSkeleton` instance is essentially a group of D-Bus
62 // interfaces. The set of exported interfaces on the object may be64 // interfaces. The set of exported interfaces on the object may be
63 // dynamic and change at runtime.65 // dynamic and change at runtime.
64 //66 //
65-// This type is intended to be used with #GDBusObjectManager.67+// This type is intended to be used with [iface@Gio.DBusObjectManager].
66 type DBusObjectSkeleton struct {68 type DBusObjectSkeleton struct {
67 gobject.Object69 gobject.Object
68 }70 }
M v4/gio/gdbusproxy.go +46 -39 collapsed to keep the page light
A v4/gio/gdbusserver.go +267 -0 collapsed to keep the page light
M v4/gio/gdebugcontroller.go +9 -8
@@ -21,20 +21,21 @@ func (x *DebugControllerInterface) GoPointer() uintptr {
21 return uintptr(unsafe.Pointer(x))21 return uintptr(unsafe.Pointer(x))
22 }22 }
23 23
24-// #GDebugController is an interface to expose control of debugging features and24+// `GDebugController` is an interface to expose control of debugging features and
25 // debug output.25 // debug output.
26 //26 //
27-// It is implemented on Linux using #GDebugControllerDBus, which exposes a D-Bus27+// It is implemented on Linux using [class@Gio.DebugControllerDBus], which
28-// interface to allow authenticated peers to control debug features in this28+// exposes a D-Bus interface to allow authenticated peers to control debug
29-// process.29+// features in this process.
30 //30 //
31 // Whether debug output is enabled is exposed as31 // Whether debug output is enabled is exposed as
32-// #GDebugController:debug-enabled. This controls g_log_set_debug_enabled() by32+// [property@Gio.DebugController:debug-enabled]. This controls
33-// default. Application code may connect to the #GObject::notify signal for it33+// [func@GLib.log_set_debug_enabled] by default. Application code may
34+// connect to the [signal@GObject.Object::notify] signal for it
34 // to control other parts of its debug infrastructure as necessary.35 // to control other parts of its debug infrastructure as necessary.
35 //36 //
36 // If your application or service is using the default GLib log writer function,37 // If your application or service is using the default GLib log writer function,
37-// creating one of the built-in implementations of #GDebugController should be38+// creating one of the built-in implementations of `GDebugController` should be
38 // all that’s needed to dynamically enable or disable debug output.39 // all that’s needed to dynamically enable or disable debug output.
39 type DebugController interface {40 type DebugController interface {
40 GoPointer() uintptr41 GoPointer() uintptr
@@ -83,7 +84,7 @@ var XGDebugControllerSetDebugEnabled func(uintptr, bool)
83 84
84 const (85 const (
85 // Extension point for debug control functionality.86 // Extension point for debug control functionality.
86- // See [Extending GIO][extending-gio].87+ // See [Extending GIO](overview.html#extending-gio).
87 DEBUG_CONTROLLER_EXTENSION_POINT_NAME string = "gio-debug-controller"88 DEBUG_CONTROLLER_EXTENSION_POINT_NAME string = "gio-debug-controller"
88 )89 )
89 90
M v4/gio/gdebugcontrollerdbus.go +25 -19
@@ -28,6 +28,7 @@ func (x *DebugControllerDBusClass) GoPointer() uintptr {
28 }28 }
29 29
30 // OverrideAuthorize sets the callback function.30 // OverrideAuthorize sets the callback function.
31+// Default handler for the #GDebugControllerDBus::authorize signal.
31 func (x *DebugControllerDBusClass) OverrideAuthorize(cb func(*DebugControllerDBus, *DBusMethodInvocation) bool) {32 func (x *DebugControllerDBusClass) OverrideAuthorize(cb func(*DebugControllerDBus, *DBusMethodInvocation) bool) {
32 if cb == nil {33 if cb == nil {
33 x.xAuthorize = 034 x.xAuthorize = 0
@@ -39,6 +40,7 @@ func (x *DebugControllerDBusClass) OverrideAuthorize(cb func(*DebugControllerDBu
39 }40 }
40 41
41 // GetAuthorize gets the callback function.42 // GetAuthorize gets the callback function.
43+// Default handler for the #GDebugControllerDBus::authorize signal.
42 func (x *DebugControllerDBusClass) GetAuthorize() func(*DebugControllerDBus, *DBusMethodInvocation) bool {44 func (x *DebugControllerDBusClass) GetAuthorize() func(*DebugControllerDBus, *DBusMethodInvocation) bool {
43 if x.xAuthorize == 0 {45 if x.xAuthorize == 0 {
44 return nil46 return nil
@@ -50,29 +52,32 @@ func (x *DebugControllerDBusClass) GetAuthorize() func(*DebugControllerDBus, *DB
50 }52 }
51 }53 }
52 54
53-// #GDebugControllerDBus is an implementation of #GDebugController which exposes55+// `GDebugControllerDBus` is an implementation of [iface@Gio.DebugController]
54-// debug settings as a D-Bus object.56+// which exposes debug settings as a D-Bus object.
55 //57 //
56-// It is a #GInitable object, and will register an object at58+// It is a [iface@Gio.Initable] object, and will register an object at
57 // `/org/gtk/Debugging` on the bus given as59 // `/org/gtk/Debugging` on the bus given as
58-// #GDebugControllerDBus:connection once it’s initialized. The object will be60+// [property@Gio.DebugControllerDBus:connection] once it’s initialized. The
59-// unregistered when the last reference to the #GDebugControllerDBus is dropped.61+// object will be unregistered when the last reference to the
62+// `GDebugControllerDBus` is dropped.
60 //63 //
61 // This D-Bus object can be used by remote processes to enable or disable debug64 // This D-Bus object can be used by remote processes to enable or disable debug
62 // output in this process. Remote processes calling65 // output in this process. Remote processes calling
63 // `org.gtk.Debugging.SetDebugEnabled()` will affect the value of66 // `org.gtk.Debugging.SetDebugEnabled()` will affect the value of
64-// #GDebugController:debug-enabled and, by default, g_log_get_debug_enabled().67+// [property@Gio.DebugController:debug-enabled] and, by default,
65-// default.68+// [func@GLib.log_get_debug_enabled].
66 //69 //
67-// By default, all processes will be able to call `SetDebugEnabled()`. If this70+// By default, no processes are allowed to call `SetDebugEnabled()` unless a
68-// process is privileged, or might expose sensitive information in its debug71+// [signal@Gio.DebugControllerDBus::authorize] signal handler is installed. This
69-// output, you may want to restrict the ability to enable debug output to72+// is because the process may be privileged, or might expose sensitive
70-// privileged users or processes.73+// information in its debug output. You may want to restrict the ability to
74+// enable debug output to privileged users or processes.
71 //75 //
72 // One option is to install a D-Bus security policy which restricts access to76 // One option is to install a D-Bus security policy which restricts access to
73 // `SetDebugEnabled()`, installing something like the following in77 // `SetDebugEnabled()`, installing something like the following in
74 // `$datadir/dbus-1/system.d/`:78 // `$datadir/dbus-1/system.d/`:
75-// |[<!-- language="XML" -->79+//
80+// ```xml
76 // <?xml version="1.0"?> <!--*-nxml-*-->81 // <?xml version="1.0"?> <!--*-nxml-*-->
77 // <!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"82 // <!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
78 //83 //
@@ -88,7 +93,7 @@ func (x *DebugControllerDBusClass) GetAuthorize() func(*DebugControllerDBus, *DB
88 // </policy>93 // </policy>
89 //94 //
90 // </busconfig>95 // </busconfig>
91-// ]|96+// ```
92 //97 //
93 // This will prevent the `SetDebugEnabled()` method from being called by all98 // This will prevent the `SetDebugEnabled()` method from being called by all
94 // except root. It will not prevent the `DebugEnabled` property from being read,99 // except root. It will not prevent the `DebugEnabled` property from being read,
@@ -96,9 +101,10 @@ func (x *DebugControllerDBusClass) GetAuthorize() func(*DebugControllerDBus, *DB
96 //101 //
97 // Another option is to use polkit to allow or deny requests on a case-by-case102 // Another option is to use polkit to allow or deny requests on a case-by-case
98 // basis, allowing for the possibility of dynamic authorisation. To do this,103 // basis, allowing for the possibility of dynamic authorisation. To do this,
99-// connect to the #GDebugControllerDBus::authorize signal and query polkit in104+// connect to the [signal@Gio.DebugControllerDBus::authorize] signal and query
100-// it:105+// polkit in it:
101-// |[<!-- language="C" -->106+//
107+// ```c
102 //108 //
103 // g_autoptr(GError) child_error = NULL;109 // g_autoptr(GError) child_error = NULL;
104 // g_autoptr(GDBusConnection) connection = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL);110 // g_autoptr(GDBusConnection) connection = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL);
@@ -108,7 +114,7 @@ func (x *DebugControllerDBusClass) GetAuthorize() func(*DebugControllerDBus, *DB
108 // debug_controller = G_DEBUG_CONTROLLER (g_debug_controller_dbus_new (priv->connection, NULL, &child_error));114 // debug_controller = G_DEBUG_CONTROLLER (g_debug_controller_dbus_new (priv->connection, NULL, &child_error));
109 // if (debug_controller == NULL)115 // if (debug_controller == NULL)
110 // {116 // {
111-// g_error ("Could not register debug controller on bus: %s"),117+// g_error ("Could not register debug controller on bus: %s",
112 // child_error->message);118 // child_error->message);
113 // }119 // }
114 //120 //
@@ -161,7 +167,7 @@ func (x *DebugControllerDBusClass) GetAuthorize() func(*DebugControllerDBus, *DB
161 // return polkit_authorization_result_get_is_authorized (auth_result);167 // return polkit_authorization_result_get_is_authorized (auth_result);
162 // }168 // }
163 //169 //
164-// ]|170+// ```
165 type DebugControllerDBus struct {171 type DebugControllerDBus struct {
166 gobject.Object172 gobject.Object
167 }173 }
@@ -308,7 +314,7 @@ func (x *DebugControllerDBus) SetDebugEnabled(DebugEnabledVar bool) {
308 // If the object is not initialized, or initialization returns with an314 // If the object is not initialized, or initialization returns with an
309 // error, then all operations on the object except g_object_ref() and315 // error, then all operations on the object except g_object_ref() and
310 // g_object_unref() are considered to be invalid, and have undefined316 // g_object_unref() are considered to be invalid, and have undefined
311-// behaviour. See the [introduction][ginitable] for more details.317+// behaviour. See the [description][iface@Gio.Initable#description] for more details.
312 //318 //
313 // Callers should not assume that a class which implements #GInitable can be319 // Callers should not assume that a class which implements #GInitable can be
314 // initialized multiple times, unless the class explicitly documents itself as320 // initialized multiple times, unless the class explicitly documents itself as
M v4/gio/gdesktopappinfo.go +117 -92 collapsed to keep the page light
M v4/gio/gdrive.go +83 -11 collapsed to keep the page light
M v4/gio/gdtlsclientconnection.go +10 -2
@@ -23,8 +23,8 @@ func (x *DtlsClientConnectionInterface) GoPointer() uintptr {
23 return uintptr(unsafe.Pointer(x))23 return uintptr(unsafe.Pointer(x))
24 }24 }
25 25
26-// #GDtlsClientConnection is the client-side subclass of26+// `GDtlsClientConnection` is the client-side subclass of
27-// #GDtlsConnection, representing a client-side DTLS connection.27+// [iface@Gio.DtlsConnection], representing a client-side DTLS connection.
28 type DtlsClientConnection interface {28 type DtlsClientConnection interface {
29 GoPointer() uintptr29 GoPointer() uintptr
30 SetGoPointer(uintptr)30 SetGoPointer(uintptr)
@@ -85,6 +85,10 @@ func (x *DtlsClientConnectionBase) GetServerIdentity() *SocketConnectableBase {
85 }85 }
86 86
87 // Gets @conn's validation flags87 // Gets @conn's validation flags
88+//
89+// This function does not work as originally designed and is impossible
90+// to use correctly. See #GDtlsClientConnection:validation-flags for more
91+// information.
88 func (x *DtlsClientConnectionBase) GetValidationFlags() TlsCertificateFlags {92 func (x *DtlsClientConnectionBase) GetValidationFlags() TlsCertificateFlags {
89 93
90 cret := XGDtlsClientConnectionGetValidationFlags(x.GoPointer())94 cret := XGDtlsClientConnectionGetValidationFlags(x.GoPointer())
@@ -104,6 +108,10 @@ func (x *DtlsClientConnectionBase) SetServerIdentity(IdentityVar SocketConnectab
104 // Sets @conn's validation flags, to override the default set of108 // Sets @conn's validation flags, to override the default set of
105 // checks performed when validating a server certificate. By default,109 // checks performed when validating a server certificate. By default,
106 // %G_TLS_CERTIFICATE_VALIDATE_ALL is used.110 // %G_TLS_CERTIFICATE_VALIDATE_ALL is used.
111+//
112+// This function does not work as originally designed and is impossible
113+// to use correctly. See #GDtlsClientConnection:validation-flags for more
114+// information.
107 func (x *DtlsClientConnectionBase) SetValidationFlags(FlagsVar TlsCertificateFlags) {115 func (x *DtlsClientConnectionBase) SetValidationFlags(FlagsVar TlsCertificateFlags) {
108 116
109 XGDtlsClientConnectionSetValidationFlags(x.GoPointer(), FlagsVar)117 XGDtlsClientConnectionSetValidationFlags(x.GoPointer(), FlagsVar)
M v4/gio/gdtlsconnection.go +37 -15 collapsed to keep the page light
M v4/gio/gdtlsserverconnection.go +2 -2
@@ -22,8 +22,8 @@ func (x *DtlsServerConnectionInterface) GoPointer() uintptr {
22 return uintptr(unsafe.Pointer(x))22 return uintptr(unsafe.Pointer(x))
23 }23 }
24 24
25-// #GDtlsServerConnection is the server-side subclass of #GDtlsConnection,25+// `GDtlsServerConnection` is the server-side subclass of
26-// representing a server-side DTLS connection.26+// [iface@Gio.DtlsConnection], representing a server-side DTLS connection.
27 type DtlsServerConnection interface {27 type DtlsServerConnection interface {
28 GoPointer() uintptr28 GoPointer() uintptr
29 SetGoPointer(uintptr)29 SetGoPointer(uintptr)
M v4/gio/gemblem.go +9 -2 collapsed to keep the page light
M v4/gio/gemblemedicon.go +11 -4 collapsed to keep the page light
M v4/gio/gfile.go +478 -71 collapsed to keep the page light
M v4/gio/gfiledescriptorbased.go +7 -3 collapsed to keep the page light
M v4/gio/gfileenumerator.go +71 -19 collapsed to keep the page light
M v4/gio/gfileicon.go +10 -1 collapsed to keep the page light
M v4/gio/gfileinfo.go +273 -34 collapsed to keep the page light
M v4/gio/gfileinputstream.go +5 -5 collapsed to keep the page light
M v4/gio/gfileiostream.go +11 -12 collapsed to keep the page light
M v4/gio/gfilemonitor.go +10 -11 collapsed to keep the page light
M v4/gio/gfileoutputstream.go +7 -7 collapsed to keep the page light
M v4/gio/gicon.go +53 -33 collapsed to keep the page light
M v4/gio/ginetaddress.go +7 -7 collapsed to keep the page light
M v4/gio/ginetaddressmask.go +3 -3 collapsed to keep the page light
M v4/gio/ginetsocketaddress.go +5 -2 collapsed to keep the page light
M v4/gio/ginitable.go +14 -12 collapsed to keep the page light
M v4/gio/ginputstream.go +11 -9 collapsed to keep the page light
D v4/gio/gio-2.0.go +0 -6489 large diff (6489 lines changed): collapsed
M v4/gio/gioenums.go +28 -4 collapsed to keep the page light
M v4/gio/gioerror.go +39 -5 collapsed to keep the page light
M v4/gio/giostream.go +30 -28 collapsed to keep the page light
M v4/gio/giotypes.go +229 -126 collapsed to keep the page light
M v4/gio/glistmodel.go +44 -17 collapsed to keep the page light
M v4/gio/gliststore.go +22 -3 collapsed to keep the page light
M v4/gio/gloadableicon.go +8 -2 collapsed to keep the page light
M v4/gio/gmemoryinputstream.go +12 -3 collapsed to keep the page light
M v4/gio/gmemorymonitor.go +18 -10 collapsed to keep the page light
M v4/gio/gmemoryoutputstream.go +15 -3 collapsed to keep the page light
A v4/gio/gmenu.go +741 -0 collapsed to keep the page light
A v4/gio/gmenuexporter.go +10 -0 collapsed to keep the page light
M v4/gio/gmenumodel.go +45 -37 collapsed to keep the page light
M v4/gio/gmount.go +83 -17 collapsed to keep the page light
M v4/gio/gmountoperation.go +9 -8 collapsed to keep the page light
M v4/gio/gnativesocketaddress.go +3 -0
@@ -29,6 +29,9 @@ func (x *NativeSocketAddressPrivate) GoPointer() uintptr {
29 }29 }
30 30
31 // A socket address of some unknown native type.31 // A socket address of some unknown native type.
32+//
33+// This corresponds to a general `struct sockaddr` of a type not otherwise
34+// handled by GLib.
32 type NativeSocketAddress struct {35 type NativeSocketAddress struct {
33 SocketAddress36 SocketAddress
34 }37 }
M v4/gio/gnetworkaddress.go +2 -2 collapsed to keep the page light
M v4/gio/gnetworkmonitor.go +22 -2 collapsed to keep the page light
M v4/gio/gnetworkservice.go +3 -3 collapsed to keep the page light
A v4/gio/gnotification.go +289 -0 collapsed to keep the page light
M v4/gio/goutputstream.go +12 -6 collapsed to keep the page light
M v4/gio/gpermission.go +5 -5 collapsed to keep the page light
M v4/gio/gpollableinputstream.go +27 -1 collapsed to keep the page light
M v4/gio/gpollableoutputstream.go +36 -1 collapsed to keep the page light
M v4/gio/gpowerprofilemonitor.go +12 -10 collapsed to keep the page light
A v4/gio/gpropertyaction.go +243 -0 collapsed to keep the page light
M v4/gio/gproxy.go +17 -5 collapsed to keep the page light
M v4/gio/gproxyaddress.go +1 -1 collapsed to keep the page light
M v4/gio/gproxyaddressenumerator.go +8 -7 collapsed to keep the page light
M v4/gio/gproxyresolver.go +26 -9 collapsed to keep the page light
M v4/gio/gremoteactiongroup.go +13 -9 collapsed to keep the page light
M v4/gio/gresolver.go +49 -7 collapsed to keep the page light
M v4/gio/gresource.go +46 -20 collapsed to keep the page light
M v4/gio/gseekable.go +18 -8 collapsed to keep the page light
M v4/gio/gsettings.go +427 -299 collapsed to keep the page light
M v4/gio/gsettingsbackend.go +52 -37 collapsed to keep the page light
M v4/gio/gsettingsschema.go +15 -15 collapsed to keep the page light
A v4/gio/gsimpleaction.go +350 -0 collapsed to keep the page light
M v4/gio/gsimpleactiongroup.go +91 -59 collapsed to keep the page light
M v4/gio/gsimpleasyncresult.go +53 -52 collapsed to keep the page light
A v4/gio/gsimpleiostream.go +76 -0 collapsed to keep the page light
A v4/gio/gsimplepermission.go +72 -0 collapsed to keep the page light
M v4/gio/gsimpleproxyresolver.go +5 -5 collapsed to keep the page light
M v4/gio/gsocket.go +98 -26 collapsed to keep the page light
M v4/gio/gsocketaddress.go +4 -3 collapsed to keep the page light
M v4/gio/gsocketaddressenumerator.go +18 -11 collapsed to keep the page light
M v4/gio/gsocketclient.go +8 -8 collapsed to keep the page light
M v4/gio/gsocketconnectable.go +16 -6 collapsed to keep the page light
M v4/gio/gsocketconnection.go +14 -10 collapsed to keep the page light
M v4/gio/gsocketcontrolmessage.go +19 -9 collapsed to keep the page light
M v4/gio/gsocketlistener.go +12 -9 collapsed to keep the page light
M v4/gio/gsocketservice.go +15 -13 collapsed to keep the page light
A v4/gio/gsubprocess.go +641 -0 collapsed to keep the page light
A v4/gio/gsubprocesslauncher.go +427 -0 collapsed to keep the page light
M v4/gio/gtask.go +511 -398 collapsed to keep the page light
M v4/gio/gtcpconnection.go +1 -1 collapsed to keep the page light
M v4/gio/gtcpwrapperconnection.go +6 -5 collapsed to keep the page light
A v4/gio/gtestdbus.go +243 -0 collapsed to keep the page light
M v4/gio/gthemedicon.go +13 -4 collapsed to keep the page light
A v4/gio/gthreadedresolver.go +48 -0 collapsed to keep the page light
M v4/gio/gthreadedsocketservice.go +7 -6 collapsed to keep the page light
M v4/gio/gtlsbackend.go +22 -2 collapsed to keep the page light
M v4/gio/gtlscertificate.go +3 -1 collapsed to keep the page light
M v4/gio/gtlsclientconnection.go +4 -2 collapsed to keep the page light
M v4/gio/gtlsconnection.go +40 -6 collapsed to keep the page light
M v4/gio/gtlsdatabase.go +82 -4 collapsed to keep the page light
M v4/gio/gtlsfiledatabase.go +2 -2 collapsed to keep the page light
M v4/gio/gtlsinteraction.go +51 -7 collapsed to keep the page light
M v4/gio/gtlspassword.go +12 -1 collapsed to keep the page light
M v4/gio/gtlsserverconnection.go +2 -2 collapsed to keep the page light
M v4/gio/gunixconnection.go +2 -2 collapsed to keep the page light
M v4/gio/gunixcredentialsmessage.go +8 -8 collapsed to keep the page light
M v4/gio/gunixfdlist.go +11 -7 collapsed to keep the page light
M v4/gio/gunixfdmessage.go +7 -7 collapsed to keep the page light
M v4/gio/gunixinputstream.go +12 -3 collapsed to keep the page light
M v4/gio/gunixmounts.go +420 -67 collapsed to keep the page light
M v4/gio/gunixoutputstream.go +15 -3 collapsed to keep the page light
M v4/gio/gunixsocketaddress.go +5 -4 collapsed to keep the page light
M v4/gio/gvfs.go +2 -2 collapsed to keep the page light
M v4/gio/gvolume.go +96 -27 collapsed to keep the page light
M v4/gio/gvolumemonitor.go +6 -6 collapsed to keep the page light
M v4/gio/gzlibcompressor.go +13 -1 collapsed to keep the page light
M v4/gio/gzlibdecompressor.go +13 -1 collapsed to keep the page light
A v4/glib/gallocator.go +195 -0 collapsed to keep the page light
M v4/glib/garray.go +361 -71 collapsed to keep the page light
M v4/glib/gasyncqueue.go +30 -3 collapsed to keep the page light
M v4/glib/gatomic.go +101 -9 collapsed to keep the page light
M v4/glib/gbacktrace.go +1 -1 collapsed to keep the page light
M v4/glib/gbase64.go +1 -1 collapsed to keep the page light
M v4/glib/gbitlock.go +42 -1 collapsed to keep the page light
M v4/glib/gbookmarkfile.go +88 -18 collapsed to keep the page light
A v4/glib/gcache.go +121 -0 collapsed to keep the page light
M v4/glib/gcharset.go +5 -4 collapsed to keep the page light
M v4/glib/gchecksum.go +16 -4 collapsed to keep the page light
A v4/glib/gcompletion.go +154 -0 collapsed to keep the page light
M v4/glib/gconvert.go +19 -8 collapsed to keep the page light
M v4/glib/gdataset.go +18 -2 collapsed to keep the page light
M v4/glib/gdate.go +45 -17 collapsed to keep the page light
M v4/glib/gdatetime.go +180 -79 collapsed to keep the page light
M v4/glib/gdir.go +66 -2 collapsed to keep the page light
M v4/glib/genviron.go +1 -1 collapsed to keep the page light
M v4/glib/gerror.go +50 -12 collapsed to keep the page light
M v4/glib/gfileutils.go +85 -22 collapsed to keep the page light
M v4/glib/ggettext.go +4 -4 collapsed to keep the page light
M v4/glib/ghash.go +166 -7 collapsed to keep the page light
M v4/glib/ghmac.go +51 -4 collapsed to keep the page light
M v4/glib/ghook.go +11 -1 collapsed to keep the page light
M v4/glib/ghostutils.go +1 -1 collapsed to keep the page light
M v4/glib/giochannel.go +142 -5 collapsed to keep the page light
M v4/glib/gkeyfile.go +361 -171 collapsed to keep the page light
D v4/glib/glib-2.0.go +0 -58 collapsed to keep the page light
M v4/glib/glib-types.go +1 -3 collapsed to keep the page light
M v4/glib/glib-unix.go +103 -15 collapsed to keep the page light
M v4/glib/glibconfig.go +22 -82 collapsed to keep the page light
M v4/glib/glist.go +1 -1 collapsed to keep the page light
M v4/glib/gmacros.go +16 -0 collapsed to keep the page light
M v4/glib/gmain.go +473 -372 collapsed to keep the page light
M v4/glib/gmappedfile.go +1 -1 collapsed to keep the page light
M v4/glib/gmarkup.go +47 -3 collapsed to keep the page light
M v4/glib/gmem.go +108 -5 collapsed to keep the page light
M v4/glib/gmessages.go +280 -175 collapsed to keep the page light
M v4/glib/gnode.go +34 -12 collapsed to keep the page light
M v4/glib/goption.go +62 -30 collapsed to keep the page light
A v4/glib/gpathbuf.go +300 -0 collapsed to keep the page light
M v4/glib/gpattern.go +52 -28 collapsed to keep the page light
M v4/glib/gpoll.go +1 -1 collapsed to keep the page light
M v4/glib/gprimes.go +1 -1 collapsed to keep the page light
M v4/glib/gprintf.go +13 -13 collapsed to keep the page light
M v4/glib/gqsort.go +19 -4 collapsed to keep the page light
M v4/glib/gquark.go +27 -3 collapsed to keep the page light
M v4/glib/gqueue.go +2 -2 collapsed to keep the page light
M v4/glib/grand.go +45 -1 collapsed to keep the page light
M v4/glib/grcbox.go +6 -1 collapsed to keep the page light
M v4/glib/grefcount.go +42 -1 collapsed to keep the page light
M v4/glib/grefstring.go +16 -1 collapsed to keep the page light
M v4/glib/gregex.go +47 -50 collapsed to keep the page light
A v4/glib/grel.go +198 -0 collapsed to keep the page light
M v4/glib/gscanner.go +2 -2 collapsed to keep the page light
M v4/glib/gsequence.go +51 -2 collapsed to keep the page light
M v4/glib/gshell.go +1 -1 collapsed to keep the page light
M v4/glib/gslice.go +21 -16 collapsed to keep the page light
M v4/glib/gslist.go +1 -1 collapsed to keep the page light
M v4/glib/gspawn.go +21 -9 collapsed to keep the page light
M v4/glib/gstdio.go +254 -2 collapsed to keep the page light
M v4/glib/gstrfuncs.go +252 -221 collapsed to keep the page light
M v4/glib/gstring.go +41 -2 collapsed to keep the page light
M v4/glib/gstringchunk.go +24 -3 collapsed to keep the page light
M v4/glib/gstrvbuilder.go +67 -5 collapsed to keep the page light
M v4/glib/gtestutils.go +393 -250 collapsed to keep the page light
M v4/glib/gthread.go +1388 -5 collapsed to keep the page light
M v4/glib/gthreadpool.go +28 -5 collapsed to keep the page light
M v4/glib/gtimer.go +6 -2 collapsed to keep the page light
M v4/glib/gtimezone.go +32 -3 collapsed to keep the page light
M v4/glib/gtrashstack.go +14 -3 collapsed to keep the page light
M v4/glib/gtree.go +2 -2 collapsed to keep the page light
M v4/glib/gtypes.go +18 -10 collapsed to keep the page light
M v4/glib/gunicode.go +173 -72 collapsed to keep the page light
M v4/glib/guri.go +101 -50 collapsed to keep the page light
M v4/glib/gutils.go +24 -13 collapsed to keep the page light
M v4/glib/guuid.go +1 -1 collapsed to keep the page light
A v4/glib/gvariant-parser.go +28 -0 collapsed to keep the page light
M v4/glib/gvariant.go +143 -113 collapsed to keep the page light
M v4/glib/gvarianttype.go +195 -166 collapsed to keep the page light
M v4/glib/gversion.go +1 -1 collapsed to keep the page light
M v4/glib/main.go +1 -1 collapsed to keep the page light
M v4/gmodule/gmodule.go +1 -1 collapsed to keep the page light
A v4/gmodule/gmoduleconf.go +12 -0 collapsed to keep the page light
M v4/gobject/gbinding.go +276 -1 collapsed to keep the page light
A v4/gobject/gbindinggroup.go +155 -0 collapsed to keep the page light
M v4/gobject/gclosure.go +7 -7 collapsed to keep the page light
M v4/gobject/genums.go +4 -4 collapsed to keep the page light
A v4/gobject/glib-types.go +32 -0 collapsed to keep the page light
M v4/gobject/gmarshal.go +48 -43 collapsed to keep the page light
D v4/gobject/gobject-2.0.go +0 -790 collapsed to keep the page light
M v4/gobject/gobject.go +230 -59 collapsed to keep the page light
M v4/gobject/gparam.go +134 -18 collapsed to keep the page light
M v4/gobject/gsignal.go +79 -25 collapsed to keep the page light
A v4/gobject/gsignalgroup.go +279 -0 collapsed to keep the page light
M v4/gobject/gtype.go +293 -177 collapsed to keep the page light
M v4/gobject/gtypemodule.go +21 -12 collapsed to keep the page light
M v4/gobject/gtypeplugin.go +138 -0 collapsed to keep the page light
M v4/gobject/gvalue.go +18 -0 collapsed to keep the page light
M v4/gobject/gvaluearray.go +28 -2 collapsed to keep the page light
A v4/gobject/gvaluecollector.go +11 -0 collapsed to keep the page light
M v4/gobject/main.go +24 -0 collapsed to keep the page light
M v4/gsk/gskbroadwayrenderer.go +3 -0 collapsed to keep the page light
M v4/gsk/gskcairorenderer.go +1 -1 collapsed to keep the page light
M v4/gsk/gskenums.go +212 -2 collapsed to keep the page light
M v4/gsk/gskglrenderer.go +54 -1 collapsed to keep the page light
M v4/gsk/gskglshader.go +3 -4 collapsed to keep the page light
A v4/gsk/gskpath.go +93 -0 collapsed to keep the page light
A v4/gsk/gskpathpoint.go +189 -0 collapsed to keep the page light
M v4/gsk/gskrenderer.go +35 -17 collapsed to keep the page light
M v4/gsk/gskrendernode.go +40 -12 collapsed to keep the page light
M v4/gsk/gskrendernodeimpl.go +479 -8 collapsed to keep the page light
M v4/gsk/gskroundedrect.go +19 -18 collapsed to keep the page light
A v4/gsk/gskstroke.go +28 -0 collapsed to keep the page light
M v4/gsk/gsktransform.go +3 -4 collapsed to keep the page light
M v4/gsk/gsktypes.go +1183 -27 collapsed to keep the page light
A v4/gsk/gskvulkanrenderer.go +85 -0 collapsed to keep the page light
D v4/gsk/main.go +0 -76 collapsed to keep the page light
M v4/gtk/gtkaboutdialog.go +166 -19 collapsed to keep the page light
M v4/gtk/gtkaccelgroup.go +6 -6 collapsed to keep the page light
M v4/gtk/gtkaccessible.go +477 -12 collapsed to keep the page light
A v4/gtk/gtkaccessiblerange.go +96 -0 collapsed to keep the page light
A v4/gtk/gtkaccessibletext.go +498 -0 collapsed to keep the page light
M v4/gtk/gtkactionable.go +9 -2 collapsed to keep the page light
M v4/gtk/gtkactionbar.go +162 -22 collapsed to keep the page light
M v4/gtk/gtkadjustment.go +4 -4 collapsed to keep the page light
A v4/gtk/gtkalertdialog.go +266 -0 collapsed to keep the page light
M v4/gtk/gtkappchooserbutton.go +152 -12 collapsed to keep the page light
M v4/gtk/gtkappchooserdialog.go +156 -11 collapsed to keep the page light
M v4/gtk/gtkappchooserwidget.go +146 -11 collapsed to keep the page light
M v4/gtk/gtkapplication.go +169 -114 collapsed to keep the page light
M v4/gtk/gtkapplicationwindow.go +245 -81 collapsed to keep the page light
M v4/gtk/gtkaspectframe.go +153 -12 collapsed to keep the page light
M v4/gtk/gtkassistant.go +153 -13 collapsed to keep the page light
M v4/gtk/gtkatcontext.go +1 -2 collapsed to keep the page light
M v4/gtk/gtkbinlayout.go +1 -2 collapsed to keep the page light
M v4/gtk/gtkbitset.go +3 -2 collapsed to keep the page light
M v4/gtk/gtkbookmarklist.go +1 -1 collapsed to keep the page light
M v4/gtk/gtkboolfilter.go +4 -5 collapsed to keep the page light
M v4/gtk/gtkborder.go +2 -2 collapsed to keep the page light
M v4/gtk/gtkbox.go +199 -31 collapsed to keep the page light
M v4/gtk/gtkboxlayout.go +22 -2 collapsed to keep the page light
M v4/gtk/gtkbuildable.go +120 -12 collapsed to keep the page light
M v4/gtk/gtkbuilder.go +256 -49 collapsed to keep the page light
M v4/gtk/gtkbuilderlistitemfactory.go +12 -4 collapsed to keep the page light
M v4/gtk/gtkbuilderscope.go +41 -2 collapsed to keep the page light
M v4/gtk/gtkbutton.go +201 -16 collapsed to keep the page light
M v4/gtk/gtkcalendar.go +229 -14 collapsed to keep the page light
M v4/gtk/gtkcellarea.go +176 -8 collapsed to keep the page light
M v4/gtk/gtkcellareabox.go +1 -1 collapsed to keep the page light
M v4/gtk/gtkcellareacontext.go +28 -0 collapsed to keep the page light
M v4/gtk/gtkcelleditable.go +14 -0 collapsed to keep the page light
M v4/gtk/gtkcelllayout.go +46 -2 collapsed to keep the page light
M v4/gtk/gtkcellrenderer.go +29 -2 collapsed to keep the page light
M v4/gtk/gtkcellrendererspin.go +0 -2 collapsed to keep the page light
M v4/gtk/gtkcellview.go +146 -11 collapsed to keep the page light
M v4/gtk/gtkcenterbox.go +195 -23 collapsed to keep the page light
M v4/gtk/gtkcenterlayout.go +29 -2 collapsed to keep the page light
M v4/gtk/gtkcheckbutton.go +175 -16 collapsed to keep the page light
M v4/gtk/gtkcolorbutton.go +151 -11 collapsed to keep the page light
M v4/gtk/gtkcolorchooserdialog.go +158 -11 collapsed to keep the page light
M v4/gtk/gtkcolorchooserwidget.go +153 -10 collapsed to keep the page light
A v4/gtk/gtkcolordialog.go +185 -0 collapsed to keep the page light
A v4/gtk/gtkcolordialogbutton.go +466 -0 collapsed to keep the page light
M v4/gtk/gtkcolumnview.go +263 -26 collapsed to keep the page light
A v4/gtk/gtkcolumnviewcell.go +182 -0 collapsed to keep the page light
M v4/gtk/gtkcolumnviewcolumn.go +37 -11 collapsed to keep the page light
A v4/gtk/gtkcolumnviewrow.go +241 -0 collapsed to keep the page light
A v4/gtk/gtkcolumnviewsorter.go +171 -0 collapsed to keep the page light
M v4/gtk/gtkcombobox.go +161 -13 collapsed to keep the page light
M v4/gtk/gtkcomboboxtext.go +155 -15 collapsed to keep the page light
M v4/gtk/gtkconstraint.go +3 -3 collapsed to keep the page light
M v4/gtk/gtkconstraintguide.go +1 -2 collapsed to keep the page light
M v4/gtk/gtkconstraintlayout.go +13 -2 collapsed to keep the page light
M v4/gtk/gtkcsserror.go +11 -0 collapsed to keep the page light
M v4/gtk/gtkcsslocation.go +1 -12 collapsed to keep the page light
M v4/gtk/gtkcssprovider.go +32 -3 collapsed to keep the page light
M v4/gtk/gtkcsssection.go +23 -1 collapsed to keep the page light
M v4/gtk/gtkcustomfilter.go +10 -11 collapsed to keep the page light
M v4/gtk/gtkcustomlayout.go +3 -3 collapsed to keep the page light
M v4/gtk/gtkcustomsorter.go +1 -2 collapsed to keep the page light
M v4/gtk/gtkdebug.go +8 -6 collapsed to keep the page light
M v4/gtk/gtkdialog.go +155 -11 collapsed to keep the page light
A v4/gtk/gtkdialogerror.go +56 -0 collapsed to keep the page light
M v4/gtk/gtkdirectorylist.go +4 -4 collapsed to keep the page light
M v4/gtk/gtkdragicon.go +169 -33 collapsed to keep the page light
M v4/gtk/gtkdragsource.go +1 -1 collapsed to keep the page light
M v4/gtk/gtkdrawingarea.go +154 -17 collapsed to keep the page light
M v4/gtk/gtkdropcontrollermotion.go +1 -2 collapsed to keep the page light
M v4/gtk/gtkdropdown.go +219 -18 collapsed to keep the page light
M v4/gtk/gtkdroptarget.go +3 -3 collapsed to keep the page light
M v4/gtk/gtkdroptargetasync.go +1 -2 collapsed to keep the page light
M v4/gtk/gtkeditable.go +46 -1 collapsed to keep the page light
M v4/gtk/gtkeditablelabel.go +208 -13 collapsed to keep the page light
M v4/gtk/gtkemojichooser.go +165 -13 collapsed to keep the page light
M v4/gtk/gtkentry.go +207 -20 collapsed to keep the page light
M v4/gtk/gtkentrybuffer.go +1 -1 collapsed to keep the page light
M v4/gtk/gtkentrycompletion.go +1 -1 collapsed to keep the page light
M v4/gtk/gtkenums.go +251 -31 collapsed to keep the page light
M v4/gtk/gtkeventcontroller.go +2 -2 collapsed to keep the page light
M v4/gtk/gtkeventcontrollerfocus.go +1 -2 collapsed to keep the page light
M v4/gtk/gtkeventcontrollerkey.go +3 -4 collapsed to keep the page light
M v4/gtk/gtkeventcontrollerlegacy.go +1 -2 collapsed to keep the page light
M v4/gtk/gtkeventcontrollermotion.go +1 -2 collapsed to keep the page light
M v4/gtk/gtkeventcontrollerscroll.go +1 -2 collapsed to keep the page light
M v4/gtk/gtkexpander.go +164 -24 collapsed to keep the page light
M v4/gtk/gtkexpression.go +34 -9 collapsed to keep the page light
M v4/gtk/gtkfilechooserdialog.go +152 -12 collapsed to keep the page light
M v4/gtk/gtkfilechooserwidget.go +166 -10 collapsed to keep the page light
A v4/gtk/gtkfiledialog.go +637 -0 collapsed to keep the page light
M v4/gtk/gtkfilefilter.go +18 -14 collapsed to keep the page light
A v4/gtk/gtkfilelauncher.go +221 -0 collapsed to keep the page light
M v4/gtk/gtkfilter.go +16 -17 collapsed to keep the page light
M v4/gtk/gtkfilterlistmodel.go +37 -4 collapsed to keep the page light
M v4/gtk/gtkfixed.go +146 -11 collapsed to keep the page light
M v4/gtk/gtkfixedlayout.go +1 -2 collapsed to keep the page light
M v4/gtk/gtkflattenlistmodel.go +35 -4 collapsed to keep the page light
M v4/gtk/gtkflowbox.go +327 -26 collapsed to keep the page light
M v4/gtk/gtkfontbutton.go +151 -11 collapsed to keep the page light
M v4/gtk/gtkfontchooserdialog.go +156 -11 collapsed to keep the page light
M v4/gtk/gtkfontchooserwidget.go +145 -10 collapsed to keep the page light
A v4/gtk/gtkfontdialog.go +358 -0 collapsed to keep the page light
A v4/gtk/gtkfontdialogbutton.go +604 -0 collapsed to keep the page light
M v4/gtk/gtkframe.go +158 -15 collapsed to keep the page light
M v4/gtk/gtkgesture.go +48 -5 collapsed to keep the page light
M v4/gtk/gtkgestureclick.go +1 -1 collapsed to keep the page light
M v4/gtk/gtkgesturedrag.go +1 -1 collapsed to keep the page light
M v4/gtk/gtkgesturelongpress.go +1 -1 collapsed to keep the page light
M v4/gtk/gtkgesturepan.go +1 -1 collapsed to keep the page light
M v4/gtk/gtkgesturerotate.go +1 -1 collapsed to keep the page light
M v4/gtk/gtkgesturesingle.go +1 -2 collapsed to keep the page light
M v4/gtk/gtkgesturestylus.go +27 -1 collapsed to keep the page light
M v4/gtk/gtkgestureswipe.go +1 -1 collapsed to keep the page light
M v4/gtk/gtkgesturezoom.go +1 -1 collapsed to keep the page light
M v4/gtk/gtkglarea.go +209 -13 collapsed to keep the page light
A v4/gtk/gtkgraphicsoffload.go +497 -0 collapsed to keep the page light
M v4/gtk/gtkgrid.go +155 -14 collapsed to keep the page light
M v4/gtk/gtkgridlayout.go +1 -2 collapsed to keep the page light
M v4/gtk/gtkgridview.go +190 -14 collapsed to keep the page light
M v4/gtk/gtkheaderbar.go +189 -25 collapsed to keep the page light
M v4/gtk/gtkicontheme.go +15 -7 collapsed to keep the page light
M v4/gtk/gtkiconview.go +156 -13 collapsed to keep the page light
M v4/gtk/gtkimage.go +153 -13 collapsed to keep the page light
M v4/gtk/gtkimcontext.go +220 -40 collapsed to keep the page light
M v4/gtk/gtkimcontextsimple.go +7 -3 collapsed to keep the page light
M v4/gtk/gtkimmodule.go +1 -0 collapsed to keep the page light
M v4/gtk/gtkimmulticontext.go +1 -2 collapsed to keep the page light
M v4/gtk/gtkinfobar.go +153 -13 collapsed to keep the page light
M v4/gtk/gtkinscription.go +188 -12 collapsed to keep the page light
M v4/gtk/gtklabel.go +352 -143 collapsed to keep the page light
M v4/gtk/gtklayoutchild.go +1 -2 collapsed to keep the page light
M v4/gtk/gtklayoutmanager.go +39 -2 collapsed to keep the page light
M v4/gtk/gtklevelbar.go +157 -17 collapsed to keep the page light
M v4/gtk/gtklinkbutton.go +168 -15 collapsed to keep the page light
M v4/gtk/gtklistbase.go +189 -11 collapsed to keep the page light
M v4/gtk/gtklistbox.go +369 -30 collapsed to keep the page light
A v4/gtk/gtklistheader.go +158 -0 collapsed to keep the page light
M v4/gtk/gtklistitem.go +90 -17 collapsed to keep the page light
M v4/gtk/gtklistitemfactory.go +4 -5 collapsed to keep the page light
M v4/gtk/gtkliststore.go +35 -16 collapsed to keep the page light
M v4/gtk/gtklistview.go +231 -17 collapsed to keep the page light
M v4/gtk/gtklockbutton.go +169 -14 collapsed to keep the page light
M v4/gtk/gtkmain.go +59 -42 collapsed to keep the page light
M v4/gtk/gtkmaplistmodel.go +35 -1 collapsed to keep the page light
M v4/gtk/gtkmediacontrols.go +152 -12 collapsed to keep the page light
M v4/gtk/gtkmediafile.go +5 -4 collapsed to keep the page light
M v4/gtk/gtkmediastream.go +1 -1 collapsed to keep the page light
M v4/gtk/gtkmenubutton.go +201 -14 collapsed to keep the page light
M v4/gtk/gtkmessagedialog.go +152 -12 collapsed to keep the page light
M v4/gtk/gtkmountoperation.go +6 -6 collapsed to keep the page light
M v4/gtk/gtkmultifilter.go +10 -11 collapsed to keep the page light
M v4/gtk/gtkmultiselection.go +34 -3 collapsed to keep the page light
M v4/gtk/gtkmultisorter.go +2 -3 collapsed to keep the page light
M v4/gtk/gtknative.go +1 -2 collapsed to keep the page light
M v4/gtk/gtknativedialog.go +5 -3 collapsed to keep the page light
M v4/gtk/gtknoselection.go +36 -3 collapsed to keep the page light
M v4/gtk/gtknotebook.go +224 -35 collapsed to keep the page light
M v4/gtk/gtknumericsorter.go +1 -1 collapsed to keep the page light
M v4/gtk/gtkorientable.go +7 -2 collapsed to keep the page light
M v4/gtk/gtkoverlay.go +152 -13 collapsed to keep the page light
M v4/gtk/gtkoverlaylayout.go +2 -2 collapsed to keep the page light
M v4/gtk/gtkpadcontroller.go +1 -2 collapsed to keep the page light
M v4/gtk/gtkpagesetup.go +1 -1 collapsed to keep the page light
M v4/gtk/gtkpagesetupunixdialog.go +158 -13 collapsed to keep the page light
M v4/gtk/gtkpaned.go +174 -16 collapsed to keep the page light
M v4/gtk/gtkpasswordentry.go +195 -13 collapsed to keep the page light
M v4/gtk/gtkpicture.go +155 -15 collapsed to keep the page light
M v4/gtk/gtkpopover.go +196 -31 collapsed to keep the page light
M v4/gtk/gtkpopovermenu.go +196 -45 collapsed to keep the page light
M v4/gtk/gtkpopovermenubar.go +155 -16 collapsed to keep the page light
M v4/gtk/gtkprintcontext.go +1 -1 collapsed to keep the page light
A v4/gtk/gtkprintdialog.go +425 -0 collapsed to keep the page light
M v4/gtk/gtkprinter.go +4 -3 collapsed to keep the page light
M v4/gtk/gtkprintjob.go +1 -1 collapsed to keep the page light
M v4/gtk/gtkprintoperation.go +63 -11 collapsed to keep the page light
M v4/gtk/gtkprintoperationpreview.go +1 -2 collapsed to keep the page light
M v4/gtk/gtkprintsettings.go +45 -29 collapsed to keep the page light
M v4/gtk/gtkprintunixdialog.go +153 -13 collapsed to keep the page light
M v4/gtk/gtkprogressbar.go +155 -16 collapsed to keep the page light
M v4/gtk/gtkrange.go +152 -12 collapsed to keep the page light
M v4/gtk/gtkrecentmanager.go +13 -2 collapsed to keep the page light
M v4/gtk/gtkrevealer.go +147 -12 collapsed to keep the page light
M v4/gtk/gtkroot.go +4 -4 collapsed to keep the page light
M v4/gtk/gtkscale.go +174 -22 collapsed to keep the page light
M v4/gtk/gtkscalebutton.go +195 -13 collapsed to keep the page light
M v4/gtk/gtkscrollable.go +1 -1 collapsed to keep the page light
M v4/gtk/gtkscrollbar.go +153 -13 collapsed to keep the page light
M v4/gtk/gtkscrolledwindow.go +174 -34 collapsed to keep the page light
M v4/gtk/gtksearchbar.go +160 -14 collapsed to keep the page light
M v4/gtk/gtksearchentry.go +269 -18 collapsed to keep the page light
A v4/gtk/gtksectionmodel.go +150 -0 collapsed to keep the page light
M v4/gtk/gtkselectionfiltermodel.go +1 -2 collapsed to keep the page light
M v4/gtk/gtkselectionmodel.go +58 -2 collapsed to keep the page light
M v4/gtk/gtkseparator.go +153 -13 collapsed to keep the page light
M v4/gtk/gtksettings.go +4 -3 collapsed to keep the page light
M v4/gtk/gtkshortcut.go +1 -1 collapsed to keep the page light
M v4/gtk/gtkshortcutaction.go +19 -12 collapsed to keep the page light
M v4/gtk/gtkshortcutcontroller.go +8 -8 collapsed to keep the page light
M v4/gtk/gtkshortcutlabel.go +145 -10 collapsed to keep the page light
M v4/gtk/gtkshortcutmanager.go +10 -3 collapsed to keep the page light
M v4/gtk/gtkshortcutsgroup.go +182 -10 collapsed to keep the page light
M v4/gtk/gtkshortcutssection.go +199 -12 collapsed to keep the page light
M v4/gtk/gtkshortcutsshortcut.go +145 -10 collapsed to keep the page light
M v4/gtk/gtkshortcutswindow.go +218 -21 collapsed to keep the page light
M v4/gtk/gtkshortcuttrigger.go +5 -5 collapsed to keep the page light
M v4/gtk/gtkshow.go +0 -1 collapsed to keep the page light
M v4/gtk/gtksignallistitemfactory.go +22 -17 collapsed to keep the page light
M v4/gtk/gtksingleselection.go +37 -5 collapsed to keep the page light
M v4/gtk/gtksizegroup.go +77 -36 collapsed to keep the page light
M v4/gtk/gtksizerequest.go +4 -3 collapsed to keep the page light
M v4/gtk/gtkslicelistmodel.go +35 -1 collapsed to keep the page light
M v4/gtk/gtksnapshot.go +128 -6 collapsed to keep the page light
M v4/gtk/gtksorter.go +10 -2 collapsed to keep the page light
M v4/gtk/gtksortlistmodel.go +72 -2 collapsed to keep the page light
M v4/gtk/gtkspinbutton.go +254 -20 collapsed to keep the page light
M v4/gtk/gtkspinner.go +152 -12 collapsed to keep the page light
M v4/gtk/gtkstack.go +299 -23 collapsed to keep the page light
M v4/gtk/gtkstacksidebar.go +153 -11 collapsed to keep the page light
M v4/gtk/gtkstackswitcher.go +154 -15 collapsed to keep the page light
M v4/gtk/gtkstatusbar.go +151 -11 collapsed to keep the page light
M v4/gtk/gtkstringfilter.go +6 -7 collapsed to keep the page light
M v4/gtk/gtkstringlist.go +22 -8 collapsed to keep the page light
M v4/gtk/gtkstringsorter.go +49 -4 collapsed to keep the page light
M v4/gtk/gtkstylecontext.go +1 -1 collapsed to keep the page light
M v4/gtk/gtkstyleprovider.go +1 -2 collapsed to keep the page light
M v4/gtk/gtkswitch.go +179 -28 collapsed to keep the page light
M v4/gtk/gtksymbolicpaintable.go +11 -2 collapsed to keep the page light
M v4/gtk/gtktestatcontext.go +1 -0 collapsed to keep the page light
M v4/gtk/gtktestutils.go +1 -1 collapsed to keep the page light
M v4/gtk/gtktext.go +367 -112 collapsed to keep the page light
M v4/gtk/gtktextbuffer.go +100 -2 collapsed to keep the page light
M v4/gtk/gtktextchild.go +1 -2 collapsed to keep the page light
M v4/gtk/gtktextiter.go +21 -21 collapsed to keep the page light
M v4/gtk/gtktextmark.go +9 -1 collapsed to keep the page light
M v4/gtk/gtktexttag.go +1 -1 collapsed to keep the page light
M v4/gtk/gtktexttagtable.go +3 -3 collapsed to keep the page light
M v4/gtk/gtktextview.go +345 -33 collapsed to keep the page light
M v4/gtk/gtktogglebutton.go +159 -19 collapsed to keep the page light
M v4/gtk/gtktooltip.go +1 -1 collapsed to keep the page light
M v4/gtk/gtktreednd.go +32 -0 collapsed to keep the page light
M v4/gtk/gtktreeexpander.go +228 -16 collapsed to keep the page light
M v4/gtk/gtktreelistmodel.go +8 -8 collapsed to keep the page light
M v4/gtk/gtktreelistrowsorter.go +1 -2 collapsed to keep the page light
M v4/gtk/gtktreemodel.go +64 -0 collapsed to keep the page light
M v4/gtk/gtktreemodelfilter.go +2 -2 collapsed to keep the page light
M v4/gtk/gtktreemodelsort.go +4 -4 collapsed to keep the page light
M v4/gtk/gtktreeselection.go +3 -2 collapsed to keep the page light
M v4/gtk/gtktreesortable.go +34 -0 collapsed to keep the page light
M v4/gtk/gtktreestore.go +150 -90 collapsed to keep the page light
M v4/gtk/gtktreeview.go +153 -11 collapsed to keep the page light
M v4/gtk/gtktreeviewcolumn.go +4 -3 collapsed to keep the page light
M v4/gtk/gtktypes.go +97 -2 collapsed to keep the page light
A v4/gtk/gtkurilauncher.go +141 -0 collapsed to keep the page light
M v4/gtk/gtkversion.go +4 -4 collapsed to keep the page light
M v4/gtk/gtkvideo.go +176 -12 collapsed to keep the page light
M v4/gtk/gtkviewport.go +163 -13 collapsed to keep the page light
M v4/gtk/gtkvolumebutton.go +151 -11 collapsed to keep the page light
M v4/gtk/gtkwidget.go +803 -387 collapsed to keep the page light
M v4/gtk/gtkwidgetpaintable.go +1 -2 collapsed to keep the page light
M v4/gtk/gtkwindow.go +332 -111 collapsed to keep the page light
M v4/gtk/gtkwindowcontrols.go +185 -19 collapsed to keep the page light
M v4/gtk/gtkwindowgroup.go +1 -1 collapsed to keep the page light
M v4/gtk/gtkwindowhandle.go +153 -14 collapsed to keep the page light
D v4/gtk/main.go +0 -64 collapsed to keep the page light
M v4/pango/pango-attributes.go +56 -6 collapsed to keep the page light
M v4/pango/pango-break.go +2 -2 collapsed to keep the page light
M v4/pango/pango-features.go +2 -2 collapsed to keep the page light
M v4/pango/pango-font.go +182 -20 collapsed to keep the page light
M v4/pango/pango-fontmap.go +158 -0 collapsed to keep the page light
A v4/pango/pango-fontset-simple.go +104 -0 collapsed to keep the page light
M v4/pango/pango-fontset.go +26 -92 collapsed to keep the page light
M v4/pango/pango-glyph.go +15 -2 collapsed to keep the page light
M v4/pango/pango-item.go +15 -0 collapsed to keep the page light
M v4/pango/pango-language.go +2 -2 collapsed to keep the page light
M v4/pango/pango-layout.go +4 -3 collapsed to keep the page light
M v4/pango/pango-matrix.go +17 -0 collapsed to keep the page light
M v4/pango/pango-renderer.go +36 -0 collapsed to keep the page light
M v4/pango/pango-tabs.go +18 -11 collapsed to keep the page light
M v4/pango/pango-utils.go +5 -5 collapsed to keep the page light

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 102

↑↓ moveenter openesc close