Merge pull request #350 from bnema/fix/repin-fixed-puregotk
fix(deps): validate puregotk lazy registration fix
907 files · +27874 -25296
M go.mod +3 -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.0 | |
| 14 | + | github.com/bnema/puregotk v0.7.1-0.20260714200603-7370c78950ef | |
| 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 | |
| @@ -47,6 +47,7 @@ require ( | |||
| 47 | 47 | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect | |
| 48 | 48 | github.com/fatih/color v1.19.0 // indirect | |
| 49 | 49 | github.com/go-viper/mapstructure/v2 v2.5.0 // indirect | |
| 50 | + | github.com/google/go-cmp v0.7.0 // indirect | |
| 50 | 51 | github.com/inconshreveable/mousetrap v1.1.0 // indirect | |
| 51 | 52 | github.com/lucasb-eyer/go-colorful v1.4.0 // indirect | |
| 52 | 53 | github.com/mattn/go-colorable v0.1.14 // indirect | |
| @@ -80,6 +81,7 @@ require ( | |||
| 80 | 81 | golang.org/x/text v0.40.0 // indirect | |
| 81 | 82 | golang.org/x/tools v0.47.0 // indirect | |
| 82 | 83 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | |
| 84 | + | mvdan.cc/gofumpt v0.9.2 // indirect | |
| 83 | 85 | ) | |
| 84 | 86 | ||
| 85 | 87 | tool github.com/a-h/templ/cmd/templ | |
| @@ -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.0 | 14 | + | github.com/bnema/puregotk v0.7.1-0.20260714200603-7370c78950ef |
| 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 | ||
| @@ -47,6 +47,7 @@ require ( | |||||
| 47 | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect | 47 | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect | ||
| 48 | github.com/fatih/color v1.19.0 // indirect | 48 | github.com/fatih/color v1.19.0 // indirect | ||
| 49 | github.com/go-viper/mapstructure/v2 v2.5.0 // indirect | 49 | github.com/go-viper/mapstructure/v2 v2.5.0 // indirect | ||
| 50 | + | github.com/google/go-cmp v0.7.0 // indirect | |||
| 50 | github.com/inconshreveable/mousetrap v1.1.0 // indirect | 51 | github.com/inconshreveable/mousetrap v1.1.0 // indirect | ||
| 51 | github.com/lucasb-eyer/go-colorful v1.4.0 // indirect | 52 | github.com/lucasb-eyer/go-colorful v1.4.0 // indirect | ||
| 52 | github.com/mattn/go-colorable v0.1.14 // indirect | 53 | github.com/mattn/go-colorable v0.1.14 // indirect | ||
| @@ -80,6 +81,7 @@ require ( | |||||
| 80 | golang.org/x/text v0.40.0 // indirect | 81 | golang.org/x/text v0.40.0 // indirect | ||
| 81 | golang.org/x/tools v0.47.0 // indirect | 82 | golang.org/x/tools v0.47.0 // indirect | ||
| 82 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | 83 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | ||
| 84 | + | mvdan.cc/gofumpt v0.9.2 // indirect | |||
| 83 | ) | 85 | ) | ||
| 84 | 86 | ||||
| 85 | tool github.com/a-h/templ/cmd/templ | 87 | tool github.com/a-h/templ/cmd/templ | ||
M go.sum +4 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/internal/core/core.go +197 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/pkg/core/core.go +10 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-dialog.go +99 -64 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-window.go +95 -62 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-accent-color.go +7 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-action-row.go +33 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-alert-dialog.go +66 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-target.go +10 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-util.go +4 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation.go +24 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application-window.go +14 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application.go +3 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-avatar.go +22 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-banner.go +23 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bin.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bottom-sheet.go +47 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint-bin.go +10 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint.go +33 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-content.go +18 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-row.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-dots.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-lines.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel.go +47 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-layout.go +14 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-scrollable.go +17 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp.go +17 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-combo-row.go +34 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-dialog.go +45 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-easing.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-entry-row.go +40 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-enum-list-model.go +13 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-expander-row.go +40 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-flap.go +61 -48 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-fold-threshold-policy.go +10 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-header-bar.go +36 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-inline-view-switcher.go +18 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout-slot.go +4 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout.go +7 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-leaflet.go +69 -56 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-length-unit.go +5 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-main.go +5 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-message-dialog.go +63 -44 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-multi-layout-view.go +17 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-direction.go +10 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-split-view.go +36 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-view.go +60 -49 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-overlay-split-view.go +48 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-password-entry-row.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-dialog.go +23 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-group.go +24 -26
| @@ -5,7 +5,6 @@ import ( | |||
| 5 | 5 | "structs" | |
| 6 | 6 | "unsafe" | |
| 7 | 7 | ||
| 8 | - | "github.com/bnema/purego" | |
| 9 | 8 | "github.com/bnema/puregotk/pkg/core" | |
| 10 | 9 | "github.com/bnema/puregotk/v4/gio" | |
| 11 | 10 | "github.com/bnema/puregotk/v4/glib" | |
| @@ -79,6 +78,7 @@ type PreferencesGroup struct { | |||
| 79 | 78 | var xPreferencesGroupGLibType func() types.GType | |
| 80 | 79 | ||
| 81 | 80 | func PreferencesGroupGLibType() types.GType { | |
| 81 | + | core.LazyRegister(&xPreferencesGroupGLibType, "ADW", "adw_preferences_group_get_type", false) | |
| 82 | 82 | return xPreferencesGroupGLibType() | |
| 83 | 83 | } | |
| 84 | 84 | ||
| @@ -92,6 +92,7 @@ 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) | |
| 95 | 96 | var cls *PreferencesGroup | |
| 96 | 97 | ||
| 97 | 98 | cret := xNewPreferencesGroup() | |
| @@ -109,6 +110,8 @@ var xPreferencesGroupAdd func(uintptr, uintptr) | |||
| 109 | 110 | ||
| 110 | 111 | // Adds a child to @self. | |
| 111 | 112 | func (x *PreferencesGroup) Add(ChildVar *gtk.Widget) { | |
| 113 | + | core.LazyRegister(&xPreferencesGroupAdd, "ADW", "adw_preferences_group_add", false) | |
| 114 | + | ||
| 112 | 115 | xPreferencesGroupAdd(x.GoPointer(), ChildVar.GoPointer()) | |
| 113 | 116 | } | |
| 114 | 117 | ||
| @@ -118,6 +121,8 @@ var xPreferencesGroupBindModel func(uintptr, uintptr, uintptr, uintptr, uintptr) | |||
| 118 | 121 | // | |
| 119 | 122 | // See [method@Gtk.ListBox.bind_model]. | |
| 120 | 123 | 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 | + | ||
| 121 | 126 | xPreferencesGroupBindModel(x.GoPointer(), ModelVar.GoPointer(), glib.NewCallbackNullable(CreateRowFuncVar), UserDataVar, glib.NewCallback(UserDataFreeFuncVar)) | |
| 122 | 127 | } | |
| 123 | 128 | ||
| @@ -125,6 +130,8 @@ var xPreferencesGroupGetDescription func(uintptr) string | |||
| 125 | 130 | ||
| 126 | 131 | // Gets the description of @self. | |
| 127 | 132 | func (x *PreferencesGroup) GetDescription() string { | |
| 133 | + | core.LazyRegister(&xPreferencesGroupGetDescription, "ADW", "adw_preferences_group_get_description", false) | |
| 134 | + | ||
| 128 | 135 | cret := xPreferencesGroupGetDescription(x.GoPointer()) | |
| 129 | 136 | return cret | |
| 130 | 137 | } | |
| @@ -133,6 +140,7 @@ var xPreferencesGroupGetHeaderSuffix func(uintptr) uintptr | |||
| 133 | 140 | ||
| 134 | 141 | // Gets the suffix for @self's header. | |
| 135 | 142 | func (x *PreferencesGroup) GetHeaderSuffix() *gtk.Widget { | |
| 143 | + | core.LazyRegister(&xPreferencesGroupGetHeaderSuffix, "ADW", "adw_preferences_group_get_header_suffix", false) | |
| 136 | 144 | var cls *gtk.Widget | |
| 137 | 145 | ||
| 138 | 146 | cret := xPreferencesGroupGetHeaderSuffix(x.GoPointer()) | |
| @@ -152,6 +160,7 @@ var xPreferencesGroupGetRow func(uintptr, uint) uintptr | |||
| 152 | 160 | // | |
| 153 | 161 | // Can return `NULL` if @index is larger than the number of rows in the group. | |
| 154 | 162 | func (x *PreferencesGroup) GetRow(IndexVar uint) *gtk.Widget { | |
| 163 | + | core.LazyRegister(&xPreferencesGroupGetRow, "ADW", "adw_preferences_group_get_row", false) | |
| 155 | 164 | var cls *gtk.Widget | |
| 156 | 165 | ||
| 157 | 166 | cret := xPreferencesGroupGetRow(x.GoPointer(), IndexVar) | |
| @@ -169,6 +178,8 @@ var xPreferencesGroupGetSeparateRows func(uintptr) bool | |||
| 169 | 178 | ||
| 170 | 179 | // Gets whether @self's rows are separated. | |
| 171 | 180 | func (x *PreferencesGroup) GetSeparateRows() bool { | |
| 181 | + | core.LazyRegister(&xPreferencesGroupGetSeparateRows, "ADW", "adw_preferences_group_get_separate_rows", false) | |
| 182 | + | ||
| 172 | 183 | cret := xPreferencesGroupGetSeparateRows(x.GoPointer()) | |
| 173 | 184 | return cret | |
| 174 | 185 | } | |
| @@ -177,6 +188,8 @@ var xPreferencesGroupGetTitle func(uintptr) string | |||
| 177 | 188 | ||
| 178 | 189 | // Gets the title of @self. | |
| 179 | 190 | func (x *PreferencesGroup) GetTitle() string { | |
| 191 | + | core.LazyRegister(&xPreferencesGroupGetTitle, "ADW", "adw_preferences_group_get_title", false) | |
| 192 | + | ||
| 180 | 193 | cret := xPreferencesGroupGetTitle(x.GoPointer()) | |
| 181 | 194 | return cret | |
| 182 | 195 | } | |
| @@ -185,6 +198,8 @@ var xPreferencesGroupRemove func(uintptr, uintptr) | |||
| 185 | 198 | ||
| 186 | 199 | // Removes a child from @self. | |
| 187 | 200 | func (x *PreferencesGroup) Remove(ChildVar *gtk.Widget) { | |
| 201 | + | core.LazyRegister(&xPreferencesGroupRemove, "ADW", "adw_preferences_group_remove", false) | |
| 202 | + | ||
| 188 | 203 | xPreferencesGroupRemove(x.GoPointer(), ChildVar.GoPointer()) | |
| 189 | 204 | } | |
| 190 | 205 | ||
| @@ -192,6 +207,8 @@ var xPreferencesGroupSetDescription func(uintptr, uintptr) | |||
| 192 | 207 | ||
| 193 | 208 | // Sets the description for @self. | |
| 194 | 209 | func (x *PreferencesGroup) SetDescription(DescriptionVar *string) { | |
| 210 | + | core.LazyRegister(&xPreferencesGroupSetDescription, "ADW", "adw_preferences_group_set_description", false) | |
| 211 | + | ||
| 195 | 212 | DescriptionVarPtr := core.GStrdupNullable(DescriptionVar) | |
| 196 | 213 | defer core.GFreeNullable(DescriptionVarPtr) | |
| 197 | 214 | ||
| @@ -206,6 +223,8 @@ var xPreferencesGroupSetHeaderSuffix func(uintptr, uintptr) | |||
| 206 | 223 | // | |
| 207 | 224 | // Suffixes are commonly used to show a button or a spinner for the whole group. | |
| 208 | 225 | func (x *PreferencesGroup) SetHeaderSuffix(SuffixVar *gtk.Widget) { | |
| 226 | + | core.LazyRegister(&xPreferencesGroupSetHeaderSuffix, "ADW", "adw_preferences_group_set_header_suffix", false) | |
| 227 | + | ||
| 209 | 228 | xPreferencesGroupSetHeaderSuffix(x.GoPointer(), SuffixVar.GoPointer()) | |
| 210 | 229 | } | |
| 211 | 230 | ||
| @@ -217,6 +236,8 @@ var xPreferencesGroupSetSeparateRows func(uintptr, bool) | |||
| 217 | 236 | // [`.boxed-list-separate`](style-classes.html#boxed-lists-cards) style class | |
| 218 | 237 | // on a [class@Gtk.ListBox] instead of `.boxed-list`. | |
| 219 | 238 | func (x *PreferencesGroup) SetSeparateRows(SeparateRowsVar bool) { | |
| 239 | + | core.LazyRegister(&xPreferencesGroupSetSeparateRows, "ADW", "adw_preferences_group_set_separate_rows", false) | |
| 240 | + | ||
| 220 | 241 | xPreferencesGroupSetSeparateRows(x.GoPointer(), SeparateRowsVar) | |
| 221 | 242 | } | |
| 222 | 243 | ||
| @@ -224,6 +245,8 @@ var xPreferencesGroupSetTitle func(uintptr, string) | |||
| 224 | 245 | ||
| 225 | 246 | // Sets the title for @self. | |
| 226 | 247 | func (x *PreferencesGroup) SetTitle(TitleVar string) { | |
| 248 | + | core.LazyRegister(&xPreferencesGroupSetTitle, "ADW", "adw_preferences_group_set_title", false) | |
| 249 | + | ||
| 227 | 250 | xPreferencesGroupSetTitle(x.GoPointer(), TitleVar) | |
| 228 | 251 | } | |
| 229 | 252 | ||
| @@ -560,29 +583,4 @@ func (x *PreferencesGroup) GetBuildableId() string { | |||
| 560 | 583 | func init() { | |
| 561 | 584 | core.SetPackageName("ADW", "libadwaita-1") | |
| 562 | 585 | 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") | |
| 588 | 586 | } | |
| @@ -5,7 +5,6 @@ import ( | |||||
| 5 | "structs" | 5 | "structs" | ||
| 6 | "unsafe" | 6 | "unsafe" | ||
| 7 | 7 | ||||
| 8 | - | "github.com/bnema/purego" | |||
| 9 | "github.com/bnema/puregotk/pkg/core" | 8 | "github.com/bnema/puregotk/pkg/core" | ||
| 10 | "github.com/bnema/puregotk/v4/gio" | 9 | "github.com/bnema/puregotk/v4/gio" | ||
| 11 | "github.com/bnema/puregotk/v4/glib" | 10 | "github.com/bnema/puregotk/v4/glib" | ||
| @@ -79,6 +78,7 @@ type PreferencesGroup struct { | |||||
| 79 | var xPreferencesGroupGLibType func() types.GType | 78 | var xPreferencesGroupGLibType func() types.GType | ||
| 80 | 79 | ||||
| 81 | func PreferencesGroupGLibType() types.GType { | 80 | 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,6 +92,7 @@ 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) | |||
| 95 | var cls *PreferencesGroup | 96 | var cls *PreferencesGroup | ||
| 96 | 97 | ||||
| 97 | cret := xNewPreferencesGroup() | 98 | cret := xNewPreferencesGroup() | ||
| @@ -109,6 +110,8 @@ var xPreferencesGroupAdd func(uintptr, uintptr) | |||||
| 109 | 110 | ||||
| 110 | // Adds a child to @self. | 111 | // Adds a child to @self. | ||
| 111 | func (x *PreferencesGroup) Add(ChildVar *gtk.Widget) { | 112 | func (x *PreferencesGroup) Add(ChildVar *gtk.Widget) { | ||
| 113 | + | core.LazyRegister(&xPreferencesGroupAdd, "ADW", "adw_preferences_group_add", false) | |||
| 114 | + | ||||
| 112 | xPreferencesGroupAdd(x.GoPointer(), ChildVar.GoPointer()) | 115 | xPreferencesGroupAdd(x.GoPointer(), ChildVar.GoPointer()) | ||
| 113 | } | 116 | } | ||
| 114 | 117 | ||||
| @@ -118,6 +121,8 @@ var xPreferencesGroupBindModel func(uintptr, uintptr, uintptr, uintptr, uintptr) | |||||
| 118 | // | 121 | // | ||
| 119 | // See [method@Gtk.ListBox.bind_model]. | 122 | // See [method@Gtk.ListBox.bind_model]. | ||
| 120 | func (x *PreferencesGroup) BindModel(ModelVar gio.ListModel, CreateRowFuncVar *gtk.ListBoxCreateWidgetFunc, UserDataVar uintptr, UserDataFreeFuncVar *glib.DestroyNotify) { | 123 | 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 | + | ||||
| 121 | xPreferencesGroupBindModel(x.GoPointer(), ModelVar.GoPointer(), glib.NewCallbackNullable(CreateRowFuncVar), UserDataVar, glib.NewCallback(UserDataFreeFuncVar)) | 126 | xPreferencesGroupBindModel(x.GoPointer(), ModelVar.GoPointer(), glib.NewCallbackNullable(CreateRowFuncVar), UserDataVar, glib.NewCallback(UserDataFreeFuncVar)) | ||
| 122 | } | 127 | } | ||
| 123 | 128 | ||||
| @@ -125,6 +130,8 @@ var xPreferencesGroupGetDescription func(uintptr) string | |||||
| 125 | 130 | ||||
| 126 | // Gets the description of @self. | 131 | // Gets the description of @self. | ||
| 127 | func (x *PreferencesGroup) GetDescription() string { | 132 | func (x *PreferencesGroup) GetDescription() string { | ||
| 133 | + | core.LazyRegister(&xPreferencesGroupGetDescription, "ADW", "adw_preferences_group_get_description", false) | |||
| 134 | + | ||||
| 128 | cret := xPreferencesGroupGetDescription(x.GoPointer()) | 135 | cret := xPreferencesGroupGetDescription(x.GoPointer()) | ||
| 129 | return cret | 136 | return cret | ||
| 130 | } | 137 | } | ||
| @@ -133,6 +140,7 @@ var xPreferencesGroupGetHeaderSuffix func(uintptr) uintptr | |||||
| 133 | 140 | ||||
| 134 | // Gets the suffix for @self's header. | 141 | // Gets the suffix for @self's header. | ||
| 135 | func (x *PreferencesGroup) GetHeaderSuffix() *gtk.Widget { | 142 | func (x *PreferencesGroup) GetHeaderSuffix() *gtk.Widget { | ||
| 143 | + | core.LazyRegister(&xPreferencesGroupGetHeaderSuffix, "ADW", "adw_preferences_group_get_header_suffix", false) | |||
| 136 | var cls *gtk.Widget | 144 | var cls *gtk.Widget | ||
| 137 | 145 | ||||
| 138 | cret := xPreferencesGroupGetHeaderSuffix(x.GoPointer()) | 146 | cret := xPreferencesGroupGetHeaderSuffix(x.GoPointer()) | ||
| @@ -152,6 +160,7 @@ var xPreferencesGroupGetRow func(uintptr, uint) uintptr | |||||
| 152 | // | 160 | // | ||
| 153 | // Can return `NULL` if @index is larger than the number of rows in the group. | 161 | // Can return `NULL` if @index is larger than the number of rows in the group. | ||
| 154 | func (x *PreferencesGroup) GetRow(IndexVar uint) *gtk.Widget { | 162 | func (x *PreferencesGroup) GetRow(IndexVar uint) *gtk.Widget { | ||
| 163 | + | core.LazyRegister(&xPreferencesGroupGetRow, "ADW", "adw_preferences_group_get_row", false) | |||
| 155 | var cls *gtk.Widget | 164 | var cls *gtk.Widget | ||
| 156 | 165 | ||||
| 157 | cret := xPreferencesGroupGetRow(x.GoPointer(), IndexVar) | 166 | cret := xPreferencesGroupGetRow(x.GoPointer(), IndexVar) | ||
| @@ -169,6 +178,8 @@ var xPreferencesGroupGetSeparateRows func(uintptr) bool | |||||
| 169 | 178 | ||||
| 170 | // Gets whether @self's rows are separated. | 179 | // Gets whether @self's rows are separated. | ||
| 171 | func (x *PreferencesGroup) GetSeparateRows() bool { | 180 | func (x *PreferencesGroup) GetSeparateRows() bool { | ||
| 181 | + | core.LazyRegister(&xPreferencesGroupGetSeparateRows, "ADW", "adw_preferences_group_get_separate_rows", false) | |||
| 182 | + | ||||
| 172 | cret := xPreferencesGroupGetSeparateRows(x.GoPointer()) | 183 | cret := xPreferencesGroupGetSeparateRows(x.GoPointer()) | ||
| 173 | return cret | 184 | return cret | ||
| 174 | } | 185 | } | ||
| @@ -177,6 +188,8 @@ var xPreferencesGroupGetTitle func(uintptr) string | |||||
| 177 | 188 | ||||
| 178 | // Gets the title of @self. | 189 | // Gets the title of @self. | ||
| 179 | func (x *PreferencesGroup) GetTitle() string { | 190 | func (x *PreferencesGroup) GetTitle() string { | ||
| 191 | + | core.LazyRegister(&xPreferencesGroupGetTitle, "ADW", "adw_preferences_group_get_title", false) | |||
| 192 | + | ||||
| 180 | cret := xPreferencesGroupGetTitle(x.GoPointer()) | 193 | cret := xPreferencesGroupGetTitle(x.GoPointer()) | ||
| 181 | return cret | 194 | return cret | ||
| 182 | } | 195 | } | ||
| @@ -185,6 +198,8 @@ var xPreferencesGroupRemove func(uintptr, uintptr) | |||||
| 185 | 198 | ||||
| 186 | // Removes a child from @self. | 199 | // Removes a child from @self. | ||
| 187 | func (x *PreferencesGroup) Remove(ChildVar *gtk.Widget) { | 200 | func (x *PreferencesGroup) Remove(ChildVar *gtk.Widget) { | ||
| 201 | + | core.LazyRegister(&xPreferencesGroupRemove, "ADW", "adw_preferences_group_remove", false) | |||
| 202 | + | ||||
| 188 | xPreferencesGroupRemove(x.GoPointer(), ChildVar.GoPointer()) | 203 | xPreferencesGroupRemove(x.GoPointer(), ChildVar.GoPointer()) | ||
| 189 | } | 204 | } | ||
| 190 | 205 | ||||
| @@ -192,6 +207,8 @@ var xPreferencesGroupSetDescription func(uintptr, uintptr) | |||||
| 192 | 207 | ||||
| 193 | // Sets the description for @self. | 208 | // Sets the description for @self. | ||
| 194 | func (x *PreferencesGroup) SetDescription(DescriptionVar *string) { | 209 | func (x *PreferencesGroup) SetDescription(DescriptionVar *string) { | ||
| 210 | + | core.LazyRegister(&xPreferencesGroupSetDescription, "ADW", "adw_preferences_group_set_description", false) | |||
| 211 | + | ||||
| 195 | DescriptionVarPtr := core.GStrdupNullable(DescriptionVar) | 212 | DescriptionVarPtr := core.GStrdupNullable(DescriptionVar) | ||
| 196 | defer core.GFreeNullable(DescriptionVarPtr) | 213 | defer core.GFreeNullable(DescriptionVarPtr) | ||
| 197 | 214 | ||||
| @@ -206,6 +223,8 @@ var xPreferencesGroupSetHeaderSuffix func(uintptr, uintptr) | |||||
| 206 | // | 223 | // | ||
| 207 | // Suffixes are commonly used to show a button or a spinner for the whole group. | 224 | // Suffixes are commonly used to show a button or a spinner for the whole group. | ||
| 208 | func (x *PreferencesGroup) SetHeaderSuffix(SuffixVar *gtk.Widget) { | 225 | func (x *PreferencesGroup) SetHeaderSuffix(SuffixVar *gtk.Widget) { | ||
| 226 | + | core.LazyRegister(&xPreferencesGroupSetHeaderSuffix, "ADW", "adw_preferences_group_set_header_suffix", false) | |||
| 227 | + | ||||
| 209 | xPreferencesGroupSetHeaderSuffix(x.GoPointer(), SuffixVar.GoPointer()) | 228 | xPreferencesGroupSetHeaderSuffix(x.GoPointer(), SuffixVar.GoPointer()) | ||
| 210 | } | 229 | } | ||
| 211 | 230 | ||||
| @@ -217,6 +236,8 @@ var xPreferencesGroupSetSeparateRows func(uintptr, bool) | |||||
| 217 | // [`.boxed-list-separate`](style-classes.html#boxed-lists-cards) style class | 236 | // [`.boxed-list-separate`](style-classes.html#boxed-lists-cards) style class | ||
| 218 | // on a [class@Gtk.ListBox] instead of `.boxed-list`. | 237 | // on a [class@Gtk.ListBox] instead of `.boxed-list`. | ||
| 219 | func (x *PreferencesGroup) SetSeparateRows(SeparateRowsVar bool) { | 238 | func (x *PreferencesGroup) SetSeparateRows(SeparateRowsVar bool) { | ||
| 239 | + | core.LazyRegister(&xPreferencesGroupSetSeparateRows, "ADW", "adw_preferences_group_set_separate_rows", false) | |||
| 240 | + | ||||
| 220 | xPreferencesGroupSetSeparateRows(x.GoPointer(), SeparateRowsVar) | 241 | xPreferencesGroupSetSeparateRows(x.GoPointer(), SeparateRowsVar) | ||
| 221 | } | 242 | } | ||
| 222 | 243 | ||||
| @@ -224,6 +245,8 @@ var xPreferencesGroupSetTitle func(uintptr, string) | |||||
| 224 | 245 | ||||
| 225 | // Sets the title for @self. | 246 | // Sets the title for @self. | ||
| 226 | func (x *PreferencesGroup) SetTitle(TitleVar string) { | 247 | func (x *PreferencesGroup) SetTitle(TitleVar string) { | ||
| 248 | + | core.LazyRegister(&xPreferencesGroupSetTitle, "ADW", "adw_preferences_group_set_title", false) | |||
| 249 | + | ||||
| 227 | xPreferencesGroupSetTitle(x.GoPointer(), TitleVar) | 250 | xPreferencesGroupSetTitle(x.GoPointer(), TitleVar) | ||
| 228 | } | 251 | } | ||
| 229 | 252 | ||||
| @@ -560,29 +583,4 @@ func (x *PreferencesGroup) GetBuildableId() string { | |||||
| 560 | func init() { | 583 | func init() { | ||
| 561 | core.SetPackageName("ADW", "libadwaita-1") | 584 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 562 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 585 | 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") | |||
| 588 | } | 586 | } | ||