Revert "chore(deps): pin puregotk nil-signal fix"
This reverts commit a161e348e2093172038390b0906448f0ae979a0d.
- commit
- 40378d5e4fd2372d054e49168ab2a6f67aedd0fd
- author
- brice · · 2026-07-14 17:59 UTC
- parent
- 8d647bb
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
905 files · +25263 -27842
M go.mod +1 -1
| @@ -11,7 +11,7 @@ require ( | |||
| 11 | 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | |
| 12 | 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | |
| 13 | 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | |
| 14 | - | github.com/bnema/puregotk v0.7.1-0.20260714170452-0b6b9b901234 | |
| 14 | + | github.com/bnema/puregotk v0.7.0 | |
| 15 | 15 | github.com/charmbracelet/bubbles v1.0.0 | |
| 16 | 16 | github.com/charmbracelet/bubbletea v1.3.10 | |
| 17 | 17 | github.com/charmbracelet/lipgloss v1.1.0 | |
| @@ -11,7 +11,7 @@ require ( | |||||
| 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | ||
| 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | ||
| 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | ||
| 14 | - | github.com/bnema/puregotk v0.7.1-0.20260714170452-0b6b9b901234 | 14 | + | github.com/bnema/puregotk v0.7.0 |
| 15 | github.com/charmbracelet/bubbles v1.0.0 | 15 | github.com/charmbracelet/bubbles v1.0.0 | ||
| 16 | github.com/charmbracelet/bubbletea v1.3.10 | 16 | github.com/charmbracelet/bubbletea v1.3.10 | ||
| 17 | github.com/charmbracelet/lipgloss v1.1.0 | 17 | github.com/charmbracelet/lipgloss v1.1.0 | ||
M go.sum +0 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/internal/core/core.go +4 -197 generated file: collapsed
M vendor/github.com/bnema/puregotk/pkg/core/core.go +0 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-dialog.go +64 -99 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-window.go +62 -95 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-accent-color.go +15 -7 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-action-row.go +29 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-alert-dialog.go +47 -66 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-target.go +27 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-util.go +12 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation.go +26 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application-window.go +22 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application.go +15 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-avatar.go +25 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-banner.go +26 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bin.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bottom-sheet.go +38 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint-bin.go +19 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint.go +37 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-content.go +22 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-row.go +18 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-dots.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-lines.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel.go +37 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-layout.go +20 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-scrollable.go +22 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp.go +22 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-combo-row.go +33 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-dialog.go +38 -45 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-easing.go +13 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-entry-row.go +33 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-enum-list-model.go +22 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-expander-row.go +33 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-flap.go +48 -61 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-fold-threshold-policy.go +1 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-header-bar.go +33 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-inline-view-switcher.go +24 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout-slot.go +15 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout.go +17 -7 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-leaflet.go +56 -69 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-length-unit.go +14 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-main.go +15 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-message-dialog.go +44 -63 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-multi-layout-view.go +23 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-direction.go +1 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-split-view.go +32 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-view.go +49 -60 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-overlay-split-view.go +38 -48 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-password-entry-row.go +13 -2 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-dialog.go +25 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-group.go +26 -24
| @@ -5,6 +5,7 @@ import ( | |||
| 5 | 5 | "structs" | |
| 6 | 6 | "unsafe" | |
| 7 | 7 | ||
| 8 | + | "github.com/bnema/purego" | |
| 8 | 9 | "github.com/bnema/puregotk/pkg/core" | |
| 9 | 10 | "github.com/bnema/puregotk/v4/gio" | |
| 10 | 11 | "github.com/bnema/puregotk/v4/glib" | |
| @@ -78,7 +79,6 @@ type PreferencesGroup struct { | |||
| 78 | 79 | var xPreferencesGroupGLibType func() types.GType | |
| 79 | 80 | ||
| 80 | 81 | func PreferencesGroupGLibType() types.GType { | |
| 81 | - | core.LazyRegister(&xPreferencesGroupGLibType, "ADW", "adw_preferences_group_get_type", false) | |
| 82 | 82 | return xPreferencesGroupGLibType() | |
| 83 | 83 | } | |
| 84 | 84 | ||
| @@ -92,7 +92,6 @@ var xNewPreferencesGroup func() uintptr | |||
| 92 | 92 | ||
| 93 | 93 | // Creates a new `AdwPreferencesGroup`. | |
| 94 | 94 | func NewPreferencesGroup() *PreferencesGroup { | |
| 95 | - | core.LazyRegister(&xNewPreferencesGroup, "ADW", "adw_preferences_group_new", false) | |
| 96 | 95 | var cls *PreferencesGroup | |
| 97 | 96 | ||
| 98 | 97 | cret := xNewPreferencesGroup() | |
| @@ -110,8 +109,6 @@ var xPreferencesGroupAdd func(uintptr, uintptr) | |||
| 110 | 109 | ||
| 111 | 110 | // Adds a child to @self. | |
| 112 | 111 | func (x *PreferencesGroup) Add(ChildVar *gtk.Widget) { | |
| 113 | - | core.LazyRegister(&xPreferencesGroupAdd, "ADW", "adw_preferences_group_add", false) | |
| 114 | - | ||
| 115 | 112 | xPreferencesGroupAdd(x.GoPointer(), ChildVar.GoPointer()) | |
| 116 | 113 | } | |
| 117 | 114 | ||
| @@ -121,8 +118,6 @@ var xPreferencesGroupBindModel func(uintptr, uintptr, uintptr, uintptr, uintptr) | |||
| 121 | 118 | // | |
| 122 | 119 | // See [method@Gtk.ListBox.bind_model]. | |
| 123 | 120 | func (x *PreferencesGroup) BindModel(ModelVar gio.ListModel, CreateRowFuncVar *gtk.ListBoxCreateWidgetFunc, UserDataVar uintptr, UserDataFreeFuncVar *glib.DestroyNotify) { | |
| 124 | - | core.LazyRegister(&xPreferencesGroupBindModel, "ADW", "adw_preferences_group_bind_model", false) | |
| 125 | - | ||
| 126 | 121 | xPreferencesGroupBindModel(x.GoPointer(), ModelVar.GoPointer(), glib.NewCallbackNullable(CreateRowFuncVar), UserDataVar, glib.NewCallback(UserDataFreeFuncVar)) | |
| 127 | 122 | } | |
| 128 | 123 | ||
| @@ -130,8 +125,6 @@ var xPreferencesGroupGetDescription func(uintptr) string | |||
| 130 | 125 | ||
| 131 | 126 | // Gets the description of @self. | |
| 132 | 127 | func (x *PreferencesGroup) GetDescription() string { | |
| 133 | - | core.LazyRegister(&xPreferencesGroupGetDescription, "ADW", "adw_preferences_group_get_description", false) | |
| 134 | - | ||
| 135 | 128 | cret := xPreferencesGroupGetDescription(x.GoPointer()) | |
| 136 | 129 | return cret | |
| 137 | 130 | } | |
| @@ -140,7 +133,6 @@ var xPreferencesGroupGetHeaderSuffix func(uintptr) uintptr | |||
| 140 | 133 | ||
| 141 | 134 | // Gets the suffix for @self's header. | |
| 142 | 135 | func (x *PreferencesGroup) GetHeaderSuffix() *gtk.Widget { | |
| 143 | - | core.LazyRegister(&xPreferencesGroupGetHeaderSuffix, "ADW", "adw_preferences_group_get_header_suffix", false) | |
| 144 | 136 | var cls *gtk.Widget | |
| 145 | 137 | ||
| 146 | 138 | cret := xPreferencesGroupGetHeaderSuffix(x.GoPointer()) | |
| @@ -160,7 +152,6 @@ var xPreferencesGroupGetRow func(uintptr, uint) uintptr | |||
| 160 | 152 | // | |
| 161 | 153 | // Can return `NULL` if @index is larger than the number of rows in the group. | |
| 162 | 154 | func (x *PreferencesGroup) GetRow(IndexVar uint) *gtk.Widget { | |
| 163 | - | core.LazyRegister(&xPreferencesGroupGetRow, "ADW", "adw_preferences_group_get_row", false) | |
| 164 | 155 | var cls *gtk.Widget | |
| 165 | 156 | ||
| 166 | 157 | cret := xPreferencesGroupGetRow(x.GoPointer(), IndexVar) | |
| @@ -178,8 +169,6 @@ var xPreferencesGroupGetSeparateRows func(uintptr) bool | |||
| 178 | 169 | ||
| 179 | 170 | // Gets whether @self's rows are separated. | |
| 180 | 171 | func (x *PreferencesGroup) GetSeparateRows() bool { | |
| 181 | - | core.LazyRegister(&xPreferencesGroupGetSeparateRows, "ADW", "adw_preferences_group_get_separate_rows", false) | |
| 182 | - | ||
| 183 | 172 | cret := xPreferencesGroupGetSeparateRows(x.GoPointer()) | |
| 184 | 173 | return cret | |
| 185 | 174 | } | |
| @@ -188,8 +177,6 @@ var xPreferencesGroupGetTitle func(uintptr) string | |||
| 188 | 177 | ||
| 189 | 178 | // Gets the title of @self. | |
| 190 | 179 | func (x *PreferencesGroup) GetTitle() string { | |
| 191 | - | core.LazyRegister(&xPreferencesGroupGetTitle, "ADW", "adw_preferences_group_get_title", false) | |
| 192 | - | ||
| 193 | 180 | cret := xPreferencesGroupGetTitle(x.GoPointer()) | |
| 194 | 181 | return cret | |
| 195 | 182 | } | |
| @@ -198,8 +185,6 @@ var xPreferencesGroupRemove func(uintptr, uintptr) | |||
| 198 | 185 | ||
| 199 | 186 | // Removes a child from @self. | |
| 200 | 187 | func (x *PreferencesGroup) Remove(ChildVar *gtk.Widget) { | |
| 201 | - | core.LazyRegister(&xPreferencesGroupRemove, "ADW", "adw_preferences_group_remove", false) | |
| 202 | - | ||
| 203 | 188 | xPreferencesGroupRemove(x.GoPointer(), ChildVar.GoPointer()) | |
| 204 | 189 | } | |
| 205 | 190 | ||
| @@ -207,8 +192,6 @@ var xPreferencesGroupSetDescription func(uintptr, uintptr) | |||
| 207 | 192 | ||
| 208 | 193 | // Sets the description for @self. | |
| 209 | 194 | func (x *PreferencesGroup) SetDescription(DescriptionVar *string) { | |
| 210 | - | core.LazyRegister(&xPreferencesGroupSetDescription, "ADW", "adw_preferences_group_set_description", false) | |
| 211 | - | ||
| 212 | 195 | DescriptionVarPtr := core.GStrdupNullable(DescriptionVar) | |
| 213 | 196 | defer core.GFreeNullable(DescriptionVarPtr) | |
| 214 | 197 | ||
| @@ -223,8 +206,6 @@ var xPreferencesGroupSetHeaderSuffix func(uintptr, uintptr) | |||
| 223 | 206 | // | |
| 224 | 207 | // Suffixes are commonly used to show a button or a spinner for the whole group. | |
| 225 | 208 | func (x *PreferencesGroup) SetHeaderSuffix(SuffixVar *gtk.Widget) { | |
| 226 | - | core.LazyRegister(&xPreferencesGroupSetHeaderSuffix, "ADW", "adw_preferences_group_set_header_suffix", false) | |
| 227 | - | ||
| 228 | 209 | xPreferencesGroupSetHeaderSuffix(x.GoPointer(), SuffixVar.GoPointer()) | |
| 229 | 210 | } | |
| 230 | 211 | ||
| @@ -236,8 +217,6 @@ var xPreferencesGroupSetSeparateRows func(uintptr, bool) | |||
| 236 | 217 | // [`.boxed-list-separate`](style-classes.html#boxed-lists-cards) style class | |
| 237 | 218 | // on a [class@Gtk.ListBox] instead of `.boxed-list`. | |
| 238 | 219 | func (x *PreferencesGroup) SetSeparateRows(SeparateRowsVar bool) { | |
| 239 | - | core.LazyRegister(&xPreferencesGroupSetSeparateRows, "ADW", "adw_preferences_group_set_separate_rows", false) | |
| 240 | - | ||
| 241 | 220 | xPreferencesGroupSetSeparateRows(x.GoPointer(), SeparateRowsVar) | |
| 242 | 221 | } | |
| 243 | 222 | ||
| @@ -245,8 +224,6 @@ var xPreferencesGroupSetTitle func(uintptr, string) | |||
| 245 | 224 | ||
| 246 | 225 | // Sets the title for @self. | |
| 247 | 226 | func (x *PreferencesGroup) SetTitle(TitleVar string) { | |
| 248 | - | core.LazyRegister(&xPreferencesGroupSetTitle, "ADW", "adw_preferences_group_set_title", false) | |
| 249 | - | ||
| 250 | 227 | xPreferencesGroupSetTitle(x.GoPointer(), TitleVar) | |
| 251 | 228 | } | |
| 252 | 229 | ||
| @@ -583,4 +560,29 @@ func (x *PreferencesGroup) GetBuildableId() string { | |||
| 583 | 560 | func init() { | |
| 584 | 561 | core.SetPackageName("ADW", "libadwaita-1") | |
| 585 | 562 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | |
| 563 | + | var libs []uintptr | |
| 564 | + | for _, libPath := range core.GetPaths("ADW") { | |
| 565 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 566 | + | if err != nil { | |
| 567 | + | panic(err) | |
| 568 | + | } | |
| 569 | + | libs = append(libs, lib) | |
| 570 | + | } | |
| 571 | + | ||
| 572 | + | core.PuregoSafeRegister(&xPreferencesGroupGLibType, libs, "adw_preferences_group_get_type") | |
| 573 | + | ||
| 574 | + | core.PuregoSafeRegister(&xNewPreferencesGroup, libs, "adw_preferences_group_new") | |
| 575 | + | ||
| 576 | + | core.PuregoSafeRegister(&xPreferencesGroupAdd, libs, "adw_preferences_group_add") | |
| 577 | + | core.PuregoSafeRegister(&xPreferencesGroupBindModel, libs, "adw_preferences_group_bind_model") | |
| 578 | + | core.PuregoSafeRegister(&xPreferencesGroupGetDescription, libs, "adw_preferences_group_get_description") | |
| 579 | + | core.PuregoSafeRegister(&xPreferencesGroupGetHeaderSuffix, libs, "adw_preferences_group_get_header_suffix") | |
| 580 | + | core.PuregoSafeRegister(&xPreferencesGroupGetRow, libs, "adw_preferences_group_get_row") | |
| 581 | + | core.PuregoSafeRegister(&xPreferencesGroupGetSeparateRows, libs, "adw_preferences_group_get_separate_rows") | |
| 582 | + | core.PuregoSafeRegister(&xPreferencesGroupGetTitle, libs, "adw_preferences_group_get_title") | |
| 583 | + | core.PuregoSafeRegister(&xPreferencesGroupRemove, libs, "adw_preferences_group_remove") | |
| 584 | + | core.PuregoSafeRegister(&xPreferencesGroupSetDescription, libs, "adw_preferences_group_set_description") | |
| 585 | + | core.PuregoSafeRegister(&xPreferencesGroupSetHeaderSuffix, libs, "adw_preferences_group_set_header_suffix") | |
| 586 | + | core.PuregoSafeRegister(&xPreferencesGroupSetSeparateRows, libs, "adw_preferences_group_set_separate_rows") | |
| 587 | + | core.PuregoSafeRegister(&xPreferencesGroupSetTitle, libs, "adw_preferences_group_set_title") | |
| 586 | 588 | } | |
| @@ -5,6 +5,7 @@ import ( | |||||
| 5 | "structs" | 5 | "structs" | ||
| 6 | "unsafe" | 6 | "unsafe" | ||
| 7 | 7 | ||||
| 8 | + | "github.com/bnema/purego" | |||
| 8 | "github.com/bnema/puregotk/pkg/core" | 9 | "github.com/bnema/puregotk/pkg/core" | ||
| 9 | "github.com/bnema/puregotk/v4/gio" | 10 | "github.com/bnema/puregotk/v4/gio" | ||
| 10 | "github.com/bnema/puregotk/v4/glib" | 11 | "github.com/bnema/puregotk/v4/glib" | ||
| @@ -78,7 +79,6 @@ type PreferencesGroup struct { | |||||
| 78 | var xPreferencesGroupGLibType func() types.GType | 79 | var xPreferencesGroupGLibType func() types.GType | ||
| 79 | 80 | ||||
| 80 | func PreferencesGroupGLibType() types.GType { | 81 | func PreferencesGroupGLibType() types.GType { | ||
| 81 | - | core.LazyRegister(&xPreferencesGroupGLibType, "ADW", "adw_preferences_group_get_type", false) | |||
| 82 | return xPreferencesGroupGLibType() | 82 | return xPreferencesGroupGLibType() | ||
| 83 | } | 83 | } | ||
| 84 | 84 | ||||
| @@ -92,7 +92,6 @@ var xNewPreferencesGroup func() uintptr | |||||
| 92 | 92 | ||||
| 93 | // Creates a new `AdwPreferencesGroup`. | 93 | // Creates a new `AdwPreferencesGroup`. | ||
| 94 | func NewPreferencesGroup() *PreferencesGroup { | 94 | func NewPreferencesGroup() *PreferencesGroup { | ||
| 95 | - | core.LazyRegister(&xNewPreferencesGroup, "ADW", "adw_preferences_group_new", false) | |||
| 96 | var cls *PreferencesGroup | 95 | var cls *PreferencesGroup | ||
| 97 | 96 | ||||
| 98 | cret := xNewPreferencesGroup() | 97 | cret := xNewPreferencesGroup() | ||
| @@ -110,8 +109,6 @@ var xPreferencesGroupAdd func(uintptr, uintptr) | |||||
| 110 | 109 | ||||
| 111 | // Adds a child to @self. | 110 | // Adds a child to @self. | ||
| 112 | func (x *PreferencesGroup) Add(ChildVar *gtk.Widget) { | 111 | func (x *PreferencesGroup) Add(ChildVar *gtk.Widget) { | ||
| 113 | - | core.LazyRegister(&xPreferencesGroupAdd, "ADW", "adw_preferences_group_add", false) | |||
| 114 | - | ||||
| 115 | xPreferencesGroupAdd(x.GoPointer(), ChildVar.GoPointer()) | 112 | xPreferencesGroupAdd(x.GoPointer(), ChildVar.GoPointer()) | ||
| 116 | } | 113 | } | ||
| 117 | 114 | ||||
| @@ -121,8 +118,6 @@ var xPreferencesGroupBindModel func(uintptr, uintptr, uintptr, uintptr, uintptr) | |||||
| 121 | // | 118 | // | ||
| 122 | // See [method@Gtk.ListBox.bind_model]. | 119 | // See [method@Gtk.ListBox.bind_model]. | ||
| 123 | func (x *PreferencesGroup) BindModel(ModelVar gio.ListModel, CreateRowFuncVar *gtk.ListBoxCreateWidgetFunc, UserDataVar uintptr, UserDataFreeFuncVar *glib.DestroyNotify) { | 120 | func (x *PreferencesGroup) BindModel(ModelVar gio.ListModel, CreateRowFuncVar *gtk.ListBoxCreateWidgetFunc, UserDataVar uintptr, UserDataFreeFuncVar *glib.DestroyNotify) { | ||
| 124 | - | core.LazyRegister(&xPreferencesGroupBindModel, "ADW", "adw_preferences_group_bind_model", false) | |||
| 125 | - | ||||
| 126 | xPreferencesGroupBindModel(x.GoPointer(), ModelVar.GoPointer(), glib.NewCallbackNullable(CreateRowFuncVar), UserDataVar, glib.NewCallback(UserDataFreeFuncVar)) | 121 | xPreferencesGroupBindModel(x.GoPointer(), ModelVar.GoPointer(), glib.NewCallbackNullable(CreateRowFuncVar), UserDataVar, glib.NewCallback(UserDataFreeFuncVar)) | ||
| 127 | } | 122 | } | ||
| 128 | 123 | ||||
| @@ -130,8 +125,6 @@ var xPreferencesGroupGetDescription func(uintptr) string | |||||
| 130 | 125 | ||||
| 131 | // Gets the description of @self. | 126 | // Gets the description of @self. | ||
| 132 | func (x *PreferencesGroup) GetDescription() string { | 127 | func (x *PreferencesGroup) GetDescription() string { | ||
| 133 | - | core.LazyRegister(&xPreferencesGroupGetDescription, "ADW", "adw_preferences_group_get_description", false) | |||
| 134 | - | ||||
| 135 | cret := xPreferencesGroupGetDescription(x.GoPointer()) | 128 | cret := xPreferencesGroupGetDescription(x.GoPointer()) | ||
| 136 | return cret | 129 | return cret | ||
| 137 | } | 130 | } | ||
| @@ -140,7 +133,6 @@ var xPreferencesGroupGetHeaderSuffix func(uintptr) uintptr | |||||
| 140 | 133 | ||||
| 141 | // Gets the suffix for @self's header. | 134 | // Gets the suffix for @self's header. | ||
| 142 | func (x *PreferencesGroup) GetHeaderSuffix() *gtk.Widget { | 135 | func (x *PreferencesGroup) GetHeaderSuffix() *gtk.Widget { | ||
| 143 | - | core.LazyRegister(&xPreferencesGroupGetHeaderSuffix, "ADW", "adw_preferences_group_get_header_suffix", false) | |||
| 144 | var cls *gtk.Widget | 136 | var cls *gtk.Widget | ||
| 145 | 137 | ||||
| 146 | cret := xPreferencesGroupGetHeaderSuffix(x.GoPointer()) | 138 | cret := xPreferencesGroupGetHeaderSuffix(x.GoPointer()) | ||
| @@ -160,7 +152,6 @@ var xPreferencesGroupGetRow func(uintptr, uint) uintptr | |||||
| 160 | // | 152 | // | ||
| 161 | // Can return `NULL` if @index is larger than the number of rows in the group. | 153 | // Can return `NULL` if @index is larger than the number of rows in the group. | ||
| 162 | func (x *PreferencesGroup) GetRow(IndexVar uint) *gtk.Widget { | 154 | func (x *PreferencesGroup) GetRow(IndexVar uint) *gtk.Widget { | ||
| 163 | - | core.LazyRegister(&xPreferencesGroupGetRow, "ADW", "adw_preferences_group_get_row", false) | |||
| 164 | var cls *gtk.Widget | 155 | var cls *gtk.Widget | ||
| 165 | 156 | ||||
| 166 | cret := xPreferencesGroupGetRow(x.GoPointer(), IndexVar) | 157 | cret := xPreferencesGroupGetRow(x.GoPointer(), IndexVar) | ||
| @@ -178,8 +169,6 @@ var xPreferencesGroupGetSeparateRows func(uintptr) bool | |||||
| 178 | 169 | ||||
| 179 | // Gets whether @self's rows are separated. | 170 | // Gets whether @self's rows are separated. | ||
| 180 | func (x *PreferencesGroup) GetSeparateRows() bool { | 171 | func (x *PreferencesGroup) GetSeparateRows() bool { | ||
| 181 | - | core.LazyRegister(&xPreferencesGroupGetSeparateRows, "ADW", "adw_preferences_group_get_separate_rows", false) | |||
| 182 | - | ||||
| 183 | cret := xPreferencesGroupGetSeparateRows(x.GoPointer()) | 172 | cret := xPreferencesGroupGetSeparateRows(x.GoPointer()) | ||
| 184 | return cret | 173 | return cret | ||
| 185 | } | 174 | } | ||
| @@ -188,8 +177,6 @@ var xPreferencesGroupGetTitle func(uintptr) string | |||||
| 188 | 177 | ||||
| 189 | // Gets the title of @self. | 178 | // Gets the title of @self. | ||
| 190 | func (x *PreferencesGroup) GetTitle() string { | 179 | func (x *PreferencesGroup) GetTitle() string { | ||
| 191 | - | core.LazyRegister(&xPreferencesGroupGetTitle, "ADW", "adw_preferences_group_get_title", false) | |||
| 192 | - | ||||
| 193 | cret := xPreferencesGroupGetTitle(x.GoPointer()) | 180 | cret := xPreferencesGroupGetTitle(x.GoPointer()) | ||
| 194 | return cret | 181 | return cret | ||
| 195 | } | 182 | } | ||
| @@ -198,8 +185,6 @@ var xPreferencesGroupRemove func(uintptr, uintptr) | |||||
| 198 | 185 | ||||
| 199 | // Removes a child from @self. | 186 | // Removes a child from @self. | ||
| 200 | func (x *PreferencesGroup) Remove(ChildVar *gtk.Widget) { | 187 | func (x *PreferencesGroup) Remove(ChildVar *gtk.Widget) { | ||
| 201 | - | core.LazyRegister(&xPreferencesGroupRemove, "ADW", "adw_preferences_group_remove", false) | |||
| 202 | - | ||||
| 203 | xPreferencesGroupRemove(x.GoPointer(), ChildVar.GoPointer()) | 188 | xPreferencesGroupRemove(x.GoPointer(), ChildVar.GoPointer()) | ||
| 204 | } | 189 | } | ||
| 205 | 190 | ||||
| @@ -207,8 +192,6 @@ var xPreferencesGroupSetDescription func(uintptr, uintptr) | |||||
| 207 | 192 | ||||
| 208 | // Sets the description for @self. | 193 | // Sets the description for @self. | ||
| 209 | func (x *PreferencesGroup) SetDescription(DescriptionVar *string) { | 194 | func (x *PreferencesGroup) SetDescription(DescriptionVar *string) { | ||
| 210 | - | core.LazyRegister(&xPreferencesGroupSetDescription, "ADW", "adw_preferences_group_set_description", false) | |||
| 211 | - | ||||
| 212 | DescriptionVarPtr := core.GStrdupNullable(DescriptionVar) | 195 | DescriptionVarPtr := core.GStrdupNullable(DescriptionVar) | ||
| 213 | defer core.GFreeNullable(DescriptionVarPtr) | 196 | defer core.GFreeNullable(DescriptionVarPtr) | ||
| 214 | 197 | ||||
| @@ -223,8 +206,6 @@ var xPreferencesGroupSetHeaderSuffix func(uintptr, uintptr) | |||||
| 223 | // | 206 | // | ||
| 224 | // Suffixes are commonly used to show a button or a spinner for the whole group. | 207 | // Suffixes are commonly used to show a button or a spinner for the whole group. | ||
| 225 | func (x *PreferencesGroup) SetHeaderSuffix(SuffixVar *gtk.Widget) { | 208 | func (x *PreferencesGroup) SetHeaderSuffix(SuffixVar *gtk.Widget) { | ||
| 226 | - | core.LazyRegister(&xPreferencesGroupSetHeaderSuffix, "ADW", "adw_preferences_group_set_header_suffix", false) | |||
| 227 | - | ||||
| 228 | xPreferencesGroupSetHeaderSuffix(x.GoPointer(), SuffixVar.GoPointer()) | 209 | xPreferencesGroupSetHeaderSuffix(x.GoPointer(), SuffixVar.GoPointer()) | ||
| 229 | } | 210 | } | ||
| 230 | 211 | ||||
| @@ -236,8 +217,6 @@ var xPreferencesGroupSetSeparateRows func(uintptr, bool) | |||||
| 236 | // [`.boxed-list-separate`](style-classes.html#boxed-lists-cards) style class | 217 | // [`.boxed-list-separate`](style-classes.html#boxed-lists-cards) style class | ||
| 237 | // on a [class@Gtk.ListBox] instead of `.boxed-list`. | 218 | // on a [class@Gtk.ListBox] instead of `.boxed-list`. | ||
| 238 | func (x *PreferencesGroup) SetSeparateRows(SeparateRowsVar bool) { | 219 | func (x *PreferencesGroup) SetSeparateRows(SeparateRowsVar bool) { | ||
| 239 | - | core.LazyRegister(&xPreferencesGroupSetSeparateRows, "ADW", "adw_preferences_group_set_separate_rows", false) | |||
| 240 | - | ||||
| 241 | xPreferencesGroupSetSeparateRows(x.GoPointer(), SeparateRowsVar) | 220 | xPreferencesGroupSetSeparateRows(x.GoPointer(), SeparateRowsVar) | ||
| 242 | } | 221 | } | ||
| 243 | 222 | ||||
| @@ -245,8 +224,6 @@ var xPreferencesGroupSetTitle func(uintptr, string) | |||||
| 245 | 224 | ||||
| 246 | // Sets the title for @self. | 225 | // Sets the title for @self. | ||
| 247 | func (x *PreferencesGroup) SetTitle(TitleVar string) { | 226 | func (x *PreferencesGroup) SetTitle(TitleVar string) { | ||
| 248 | - | core.LazyRegister(&xPreferencesGroupSetTitle, "ADW", "adw_preferences_group_set_title", false) | |||
| 249 | - | ||||
| 250 | xPreferencesGroupSetTitle(x.GoPointer(), TitleVar) | 227 | xPreferencesGroupSetTitle(x.GoPointer(), TitleVar) | ||
| 251 | } | 228 | } | ||
| 252 | 229 | ||||
| @@ -583,4 +560,29 @@ func (x *PreferencesGroup) GetBuildableId() string { | |||||
| 583 | func init() { | 560 | func init() { | ||
| 584 | core.SetPackageName("ADW", "libadwaita-1") | 561 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 585 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 562 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | ||
| 563 | + | var libs []uintptr | |||
| 564 | + | for _, libPath := range core.GetPaths("ADW") { | |||
| 565 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 566 | + | if err != nil { | |||
| 567 | + | panic(err) | |||
| 568 | + | } | |||
| 569 | + | libs = append(libs, lib) | |||
| 570 | + | } | |||
| 571 | + | ||||
| 572 | + | core.PuregoSafeRegister(&xPreferencesGroupGLibType, libs, "adw_preferences_group_get_type") | |||
| 573 | + | ||||
| 574 | + | core.PuregoSafeRegister(&xNewPreferencesGroup, libs, "adw_preferences_group_new") | |||
| 575 | + | ||||
| 576 | + | core.PuregoSafeRegister(&xPreferencesGroupAdd, libs, "adw_preferences_group_add") | |||
| 577 | + | core.PuregoSafeRegister(&xPreferencesGroupBindModel, libs, "adw_preferences_group_bind_model") | |||
| 578 | + | core.PuregoSafeRegister(&xPreferencesGroupGetDescription, libs, "adw_preferences_group_get_description") | |||
| 579 | + | core.PuregoSafeRegister(&xPreferencesGroupGetHeaderSuffix, libs, "adw_preferences_group_get_header_suffix") | |||
| 580 | + | core.PuregoSafeRegister(&xPreferencesGroupGetRow, libs, "adw_preferences_group_get_row") | |||
| 581 | + | core.PuregoSafeRegister(&xPreferencesGroupGetSeparateRows, libs, "adw_preferences_group_get_separate_rows") | |||
| 582 | + | core.PuregoSafeRegister(&xPreferencesGroupGetTitle, libs, "adw_preferences_group_get_title") | |||
| 583 | + | core.PuregoSafeRegister(&xPreferencesGroupRemove, libs, "adw_preferences_group_remove") | |||
| 584 | + | core.PuregoSafeRegister(&xPreferencesGroupSetDescription, libs, "adw_preferences_group_set_description") | |||
| 585 | + | core.PuregoSafeRegister(&xPreferencesGroupSetHeaderSuffix, libs, "adw_preferences_group_set_header_suffix") | |||
| 586 | + | core.PuregoSafeRegister(&xPreferencesGroupSetSeparateRows, libs, "adw_preferences_group_set_separate_rows") | |||
| 587 | + | core.PuregoSafeRegister(&xPreferencesGroupSetTitle, libs, "adw_preferences_group_set_title") | |||
| 586 | } | 588 | } | ||