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
| @@ -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/gobject" | |
| 11 | 10 | "github.com/bnema/puregotk/v4/gobject/types" | |
| @@ -61,6 +60,7 @@ type PreferencesDialog struct { | |||
| 61 | 60 | var xPreferencesDialogGLibType func() types.GType | |
| 62 | 61 | ||
| 63 | 62 | func PreferencesDialogGLibType() types.GType { | |
| 63 | + | core.LazyRegister(&xPreferencesDialogGLibType, "ADW", "adw_preferences_dialog_get_type", false) | |
| 64 | 64 | return xPreferencesDialogGLibType() | |
| 65 | 65 | } | |
| 66 | 66 | ||
| @@ -74,6 +74,7 @@ var xNewPreferencesDialog func() uintptr | |||
| 74 | 74 | ||
| 75 | 75 | // Creates a new `AdwPreferencesDialog`. | |
| 76 | 76 | func NewPreferencesDialog() *PreferencesDialog { | |
| 77 | + | core.LazyRegister(&xNewPreferencesDialog, "ADW", "adw_preferences_dialog_new", false) | |
| 77 | 78 | var cls *PreferencesDialog | |
| 78 | 79 | ||
| 79 | 80 | cret := xNewPreferencesDialog() | |
| @@ -91,6 +92,8 @@ var xPreferencesDialogAdd func(uintptr, uintptr) | |||
| 91 | 92 | ||
| 92 | 93 | // Adds a preferences page to @self. | |
| 93 | 94 | func (x *PreferencesDialog) Add(PageVar *PreferencesPage) { | |
| 95 | + | core.LazyRegister(&xPreferencesDialogAdd, "ADW", "adw_preferences_dialog_add", false) | |
| 96 | + | ||
| 94 | 97 | xPreferencesDialogAdd(x.GoPointer(), PageVar.GoPointer()) | |
| 95 | 98 | } | |
| 96 | 99 | ||
| @@ -100,6 +103,8 @@ var xPreferencesDialogAddToast func(uintptr, uintptr) | |||
| 100 | 103 | // | |
| 101 | 104 | // See [method@ToastOverlay.add_toast]. | |
| 102 | 105 | func (x *PreferencesDialog) AddToast(ToastVar *Toast) { | |
| 106 | + | core.LazyRegister(&xPreferencesDialogAddToast, "ADW", "adw_preferences_dialog_add_toast", false) | |
| 107 | + | ||
| 103 | 108 | xPreferencesDialogAddToast(x.GoPointer(), ToastVar.GoPointer()) | |
| 104 | 109 | } | |
| 105 | 110 | ||
| @@ -107,6 +112,8 @@ var xPreferencesDialogGetSearchEnabled func(uintptr) bool | |||
| 107 | 112 | ||
| 108 | 113 | // Gets whether search is enabled for @self. | |
| 109 | 114 | func (x *PreferencesDialog) GetSearchEnabled() bool { | |
| 115 | + | core.LazyRegister(&xPreferencesDialogGetSearchEnabled, "ADW", "adw_preferences_dialog_get_search_enabled", false) | |
| 116 | + | ||
| 110 | 117 | cret := xPreferencesDialogGetSearchEnabled(x.GoPointer()) | |
| 111 | 118 | return cret | |
| 112 | 119 | } | |
| @@ -115,6 +122,7 @@ var xPreferencesDialogGetVisiblePage func(uintptr) uintptr | |||
| 115 | 122 | ||
| 116 | 123 | // Gets the currently visible page of @self. | |
| 117 | 124 | func (x *PreferencesDialog) GetVisiblePage() *PreferencesPage { | |
| 125 | + | core.LazyRegister(&xPreferencesDialogGetVisiblePage, "ADW", "adw_preferences_dialog_get_visible_page", false) | |
| 118 | 126 | var cls *PreferencesPage | |
| 119 | 127 | ||
| 120 | 128 | cret := xPreferencesDialogGetVisiblePage(x.GoPointer()) | |
| @@ -132,6 +140,8 @@ var xPreferencesDialogGetVisiblePageName func(uintptr) string | |||
| 132 | 140 | ||
| 133 | 141 | // Gets the name of currently visible page of @self. | |
| 134 | 142 | func (x *PreferencesDialog) GetVisiblePageName() string { | |
| 143 | + | core.LazyRegister(&xPreferencesDialogGetVisiblePageName, "ADW", "adw_preferences_dialog_get_visible_page_name", false) | |
| 144 | + | ||
| 135 | 145 | cret := xPreferencesDialogGetVisiblePageName(x.GoPointer()) | |
| 136 | 146 | return cret | |
| 137 | 147 | } | |
| @@ -140,6 +150,8 @@ var xPreferencesDialogPopSubpage func(uintptr) bool | |||
| 140 | 150 | ||
| 141 | 151 | // Pop the visible page from the subpage stack of @self. | |
| 142 | 152 | func (x *PreferencesDialog) PopSubpage() bool { | |
| 153 | + | core.LazyRegister(&xPreferencesDialogPopSubpage, "ADW", "adw_preferences_dialog_pop_subpage", false) | |
| 154 | + | ||
| 143 | 155 | cret := xPreferencesDialogPopSubpage(x.GoPointer()) | |
| 144 | 156 | return cret | |
| 145 | 157 | } | |
| @@ -150,6 +162,8 @@ var xPreferencesDialogPushSubpage func(uintptr, uintptr) | |||
| 150 | 162 | // | |
| 151 | 163 | // The page will be automatically removed when popped. | |
| 152 | 164 | func (x *PreferencesDialog) PushSubpage(PageVar *NavigationPage) { | |
| 165 | + | core.LazyRegister(&xPreferencesDialogPushSubpage, "ADW", "adw_preferences_dialog_push_subpage", false) | |
| 166 | + | ||
| 153 | 167 | xPreferencesDialogPushSubpage(x.GoPointer(), PageVar.GoPointer()) | |
| 154 | 168 | } | |
| 155 | 169 | ||
| @@ -157,6 +171,8 @@ var xPreferencesDialogRemove func(uintptr, uintptr) | |||
| 157 | 171 | ||
| 158 | 172 | // Removes a page from @self. | |
| 159 | 173 | func (x *PreferencesDialog) Remove(PageVar *PreferencesPage) { | |
| 174 | + | core.LazyRegister(&xPreferencesDialogRemove, "ADW", "adw_preferences_dialog_remove", false) | |
| 175 | + | ||
| 160 | 176 | xPreferencesDialogRemove(x.GoPointer(), PageVar.GoPointer()) | |
| 161 | 177 | } | |
| 162 | 178 | ||
| @@ -164,6 +180,8 @@ var xPreferencesDialogSetSearchEnabled func(uintptr, bool) | |||
| 164 | 180 | ||
| 165 | 181 | // Sets whether search is enabled for @self. | |
| 166 | 182 | func (x *PreferencesDialog) SetSearchEnabled(SearchEnabledVar bool) { | |
| 183 | + | core.LazyRegister(&xPreferencesDialogSetSearchEnabled, "ADW", "adw_preferences_dialog_set_search_enabled", false) | |
| 184 | + | ||
| 167 | 185 | xPreferencesDialogSetSearchEnabled(x.GoPointer(), SearchEnabledVar) | |
| 168 | 186 | } | |
| 169 | 187 | ||
| @@ -171,6 +189,8 @@ var xPreferencesDialogSetVisiblePage func(uintptr, uintptr) | |||
| 171 | 189 | ||
| 172 | 190 | // Makes @page the visible page of @self. | |
| 173 | 191 | func (x *PreferencesDialog) SetVisiblePage(PageVar *PreferencesPage) { | |
| 192 | + | core.LazyRegister(&xPreferencesDialogSetVisiblePage, "ADW", "adw_preferences_dialog_set_visible_page", false) | |
| 193 | + | ||
| 174 | 194 | xPreferencesDialogSetVisiblePage(x.GoPointer(), PageVar.GoPointer()) | |
| 175 | 195 | } | |
| 176 | 196 | ||
| @@ -180,6 +200,8 @@ var xPreferencesDialogSetVisiblePageName func(uintptr, string) | |||
| 180 | 200 | // | |
| 181 | 201 | // See [property@PreferencesDialog:visible-page]. | |
| 182 | 202 | func (x *PreferencesDialog) SetVisiblePageName(NameVar string) { | |
| 203 | + | core.LazyRegister(&xPreferencesDialogSetVisiblePageName, "ADW", "adw_preferences_dialog_set_visible_page_name", false) | |
| 204 | + | ||
| 183 | 205 | xPreferencesDialogSetVisiblePageName(x.GoPointer(), NameVar) | |
| 184 | 206 | } | |
| 185 | 207 | ||
| @@ -495,28 +517,4 @@ func (x *PreferencesDialog) GetBuildableId() string { | |||
| 495 | 517 | func init() { | |
| 496 | 518 | core.SetPackageName("ADW", "libadwaita-1") | |
| 497 | 519 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | |
| 498 | - | var libs []uintptr | |
| 499 | - | for _, libPath := range core.GetPaths("ADW") { | |
| 500 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 501 | - | if err != nil { | |
| 502 | - | panic(err) | |
| 503 | - | } | |
| 504 | - | libs = append(libs, lib) | |
| 505 | - | } | |
| 506 | - | ||
| 507 | - | core.PuregoSafeRegister(&xPreferencesDialogGLibType, libs, "adw_preferences_dialog_get_type") | |
| 508 | - | ||
| 509 | - | core.PuregoSafeRegister(&xNewPreferencesDialog, libs, "adw_preferences_dialog_new") | |
| 510 | - | ||
| 511 | - | core.PuregoSafeRegister(&xPreferencesDialogAdd, libs, "adw_preferences_dialog_add") | |
| 512 | - | core.PuregoSafeRegister(&xPreferencesDialogAddToast, libs, "adw_preferences_dialog_add_toast") | |
| 513 | - | core.PuregoSafeRegister(&xPreferencesDialogGetSearchEnabled, libs, "adw_preferences_dialog_get_search_enabled") | |
| 514 | - | core.PuregoSafeRegister(&xPreferencesDialogGetVisiblePage, libs, "adw_preferences_dialog_get_visible_page") | |
| 515 | - | core.PuregoSafeRegister(&xPreferencesDialogGetVisiblePageName, libs, "adw_preferences_dialog_get_visible_page_name") | |
| 516 | - | core.PuregoSafeRegister(&xPreferencesDialogPopSubpage, libs, "adw_preferences_dialog_pop_subpage") | |
| 517 | - | core.PuregoSafeRegister(&xPreferencesDialogPushSubpage, libs, "adw_preferences_dialog_push_subpage") | |
| 518 | - | core.PuregoSafeRegister(&xPreferencesDialogRemove, libs, "adw_preferences_dialog_remove") | |
| 519 | - | core.PuregoSafeRegister(&xPreferencesDialogSetSearchEnabled, libs, "adw_preferences_dialog_set_search_enabled") | |
| 520 | - | core.PuregoSafeRegister(&xPreferencesDialogSetVisiblePage, libs, "adw_preferences_dialog_set_visible_page") | |
| 521 | - | core.PuregoSafeRegister(&xPreferencesDialogSetVisiblePageName, libs, "adw_preferences_dialog_set_visible_page_name") | |
| 522 | 520 | } | |
| @@ -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/gobject" | 9 | "github.com/bnema/puregotk/v4/gobject" | ||
| 11 | "github.com/bnema/puregotk/v4/gobject/types" | 10 | "github.com/bnema/puregotk/v4/gobject/types" | ||
| @@ -61,6 +60,7 @@ type PreferencesDialog struct { | |||||
| 61 | var xPreferencesDialogGLibType func() types.GType | 60 | var xPreferencesDialogGLibType func() types.GType | ||
| 62 | 61 | ||||
| 63 | func PreferencesDialogGLibType() types.GType { | 62 | func PreferencesDialogGLibType() types.GType { | ||
| 63 | + | core.LazyRegister(&xPreferencesDialogGLibType, "ADW", "adw_preferences_dialog_get_type", false) | |||
| 64 | return xPreferencesDialogGLibType() | 64 | return xPreferencesDialogGLibType() | ||
| 65 | } | 65 | } | ||
| 66 | 66 | ||||
| @@ -74,6 +74,7 @@ var xNewPreferencesDialog func() uintptr | |||||
| 74 | 74 | ||||
| 75 | // Creates a new `AdwPreferencesDialog`. | 75 | // Creates a new `AdwPreferencesDialog`. | ||
| 76 | func NewPreferencesDialog() *PreferencesDialog { | 76 | func NewPreferencesDialog() *PreferencesDialog { | ||
| 77 | + | core.LazyRegister(&xNewPreferencesDialog, "ADW", "adw_preferences_dialog_new", false) | |||
| 77 | var cls *PreferencesDialog | 78 | var cls *PreferencesDialog | ||
| 78 | 79 | ||||
| 79 | cret := xNewPreferencesDialog() | 80 | cret := xNewPreferencesDialog() | ||
| @@ -91,6 +92,8 @@ var xPreferencesDialogAdd func(uintptr, uintptr) | |||||
| 91 | 92 | ||||
| 92 | // Adds a preferences page to @self. | 93 | // Adds a preferences page to @self. | ||
| 93 | func (x *PreferencesDialog) Add(PageVar *PreferencesPage) { | 94 | func (x *PreferencesDialog) Add(PageVar *PreferencesPage) { | ||
| 95 | + | core.LazyRegister(&xPreferencesDialogAdd, "ADW", "adw_preferences_dialog_add", false) | |||
| 96 | + | ||||
| 94 | xPreferencesDialogAdd(x.GoPointer(), PageVar.GoPointer()) | 97 | xPreferencesDialogAdd(x.GoPointer(), PageVar.GoPointer()) | ||
| 95 | } | 98 | } | ||
| 96 | 99 | ||||
| @@ -100,6 +103,8 @@ var xPreferencesDialogAddToast func(uintptr, uintptr) | |||||
| 100 | // | 103 | // | ||
| 101 | // See [method@ToastOverlay.add_toast]. | 104 | // See [method@ToastOverlay.add_toast]. | ||
| 102 | func (x *PreferencesDialog) AddToast(ToastVar *Toast) { | 105 | func (x *PreferencesDialog) AddToast(ToastVar *Toast) { | ||
| 106 | + | core.LazyRegister(&xPreferencesDialogAddToast, "ADW", "adw_preferences_dialog_add_toast", false) | |||
| 107 | + | ||||
| 103 | xPreferencesDialogAddToast(x.GoPointer(), ToastVar.GoPointer()) | 108 | xPreferencesDialogAddToast(x.GoPointer(), ToastVar.GoPointer()) | ||
| 104 | } | 109 | } | ||
| 105 | 110 | ||||
| @@ -107,6 +112,8 @@ var xPreferencesDialogGetSearchEnabled func(uintptr) bool | |||||
| 107 | 112 | ||||
| 108 | // Gets whether search is enabled for @self. | 113 | // Gets whether search is enabled for @self. | ||
| 109 | func (x *PreferencesDialog) GetSearchEnabled() bool { | 114 | func (x *PreferencesDialog) GetSearchEnabled() bool { | ||
| 115 | + | core.LazyRegister(&xPreferencesDialogGetSearchEnabled, "ADW", "adw_preferences_dialog_get_search_enabled", false) | |||
| 116 | + | ||||
| 110 | cret := xPreferencesDialogGetSearchEnabled(x.GoPointer()) | 117 | cret := xPreferencesDialogGetSearchEnabled(x.GoPointer()) | ||
| 111 | return cret | 118 | return cret | ||
| 112 | } | 119 | } | ||
| @@ -115,6 +122,7 @@ var xPreferencesDialogGetVisiblePage func(uintptr) uintptr | |||||
| 115 | 122 | ||||
| 116 | // Gets the currently visible page of @self. | 123 | // Gets the currently visible page of @self. | ||
| 117 | func (x *PreferencesDialog) GetVisiblePage() *PreferencesPage { | 124 | func (x *PreferencesDialog) GetVisiblePage() *PreferencesPage { | ||
| 125 | + | core.LazyRegister(&xPreferencesDialogGetVisiblePage, "ADW", "adw_preferences_dialog_get_visible_page", false) | |||
| 118 | var cls *PreferencesPage | 126 | var cls *PreferencesPage | ||
| 119 | 127 | ||||
| 120 | cret := xPreferencesDialogGetVisiblePage(x.GoPointer()) | 128 | cret := xPreferencesDialogGetVisiblePage(x.GoPointer()) | ||
| @@ -132,6 +140,8 @@ var xPreferencesDialogGetVisiblePageName func(uintptr) string | |||||
| 132 | 140 | ||||
| 133 | // Gets the name of currently visible page of @self. | 141 | // Gets the name of currently visible page of @self. | ||
| 134 | func (x *PreferencesDialog) GetVisiblePageName() string { | 142 | func (x *PreferencesDialog) GetVisiblePageName() string { | ||
| 143 | + | core.LazyRegister(&xPreferencesDialogGetVisiblePageName, "ADW", "adw_preferences_dialog_get_visible_page_name", false) | |||
| 144 | + | ||||
| 135 | cret := xPreferencesDialogGetVisiblePageName(x.GoPointer()) | 145 | cret := xPreferencesDialogGetVisiblePageName(x.GoPointer()) | ||
| 136 | return cret | 146 | return cret | ||
| 137 | } | 147 | } | ||
| @@ -140,6 +150,8 @@ var xPreferencesDialogPopSubpage func(uintptr) bool | |||||
| 140 | 150 | ||||
| 141 | // Pop the visible page from the subpage stack of @self. | 151 | // Pop the visible page from the subpage stack of @self. | ||
| 142 | func (x *PreferencesDialog) PopSubpage() bool { | 152 | func (x *PreferencesDialog) PopSubpage() bool { | ||
| 153 | + | core.LazyRegister(&xPreferencesDialogPopSubpage, "ADW", "adw_preferences_dialog_pop_subpage", false) | |||
| 154 | + | ||||
| 143 | cret := xPreferencesDialogPopSubpage(x.GoPointer()) | 155 | cret := xPreferencesDialogPopSubpage(x.GoPointer()) | ||
| 144 | return cret | 156 | return cret | ||
| 145 | } | 157 | } | ||
| @@ -150,6 +162,8 @@ var xPreferencesDialogPushSubpage func(uintptr, uintptr) | |||||
| 150 | // | 162 | // | ||
| 151 | // The page will be automatically removed when popped. | 163 | // The page will be automatically removed when popped. | ||
| 152 | func (x *PreferencesDialog) PushSubpage(PageVar *NavigationPage) { | 164 | func (x *PreferencesDialog) PushSubpage(PageVar *NavigationPage) { | ||
| 165 | + | core.LazyRegister(&xPreferencesDialogPushSubpage, "ADW", "adw_preferences_dialog_push_subpage", false) | |||
| 166 | + | ||||
| 153 | xPreferencesDialogPushSubpage(x.GoPointer(), PageVar.GoPointer()) | 167 | xPreferencesDialogPushSubpage(x.GoPointer(), PageVar.GoPointer()) | ||
| 154 | } | 168 | } | ||
| 155 | 169 | ||||
| @@ -157,6 +171,8 @@ var xPreferencesDialogRemove func(uintptr, uintptr) | |||||
| 157 | 171 | ||||
| 158 | // Removes a page from @self. | 172 | // Removes a page from @self. | ||
| 159 | func (x *PreferencesDialog) Remove(PageVar *PreferencesPage) { | 173 | func (x *PreferencesDialog) Remove(PageVar *PreferencesPage) { | ||
| 174 | + | core.LazyRegister(&xPreferencesDialogRemove, "ADW", "adw_preferences_dialog_remove", false) | |||
| 175 | + | ||||
| 160 | xPreferencesDialogRemove(x.GoPointer(), PageVar.GoPointer()) | 176 | xPreferencesDialogRemove(x.GoPointer(), PageVar.GoPointer()) | ||
| 161 | } | 177 | } | ||
| 162 | 178 | ||||
| @@ -164,6 +180,8 @@ var xPreferencesDialogSetSearchEnabled func(uintptr, bool) | |||||
| 164 | 180 | ||||
| 165 | // Sets whether search is enabled for @self. | 181 | // Sets whether search is enabled for @self. | ||
| 166 | func (x *PreferencesDialog) SetSearchEnabled(SearchEnabledVar bool) { | 182 | func (x *PreferencesDialog) SetSearchEnabled(SearchEnabledVar bool) { | ||
| 183 | + | core.LazyRegister(&xPreferencesDialogSetSearchEnabled, "ADW", "adw_preferences_dialog_set_search_enabled", false) | |||
| 184 | + | ||||
| 167 | xPreferencesDialogSetSearchEnabled(x.GoPointer(), SearchEnabledVar) | 185 | xPreferencesDialogSetSearchEnabled(x.GoPointer(), SearchEnabledVar) | ||
| 168 | } | 186 | } | ||
| 169 | 187 | ||||
| @@ -171,6 +189,8 @@ var xPreferencesDialogSetVisiblePage func(uintptr, uintptr) | |||||
| 171 | 189 | ||||
| 172 | // Makes @page the visible page of @self. | 190 | // Makes @page the visible page of @self. | ||
| 173 | func (x *PreferencesDialog) SetVisiblePage(PageVar *PreferencesPage) { | 191 | func (x *PreferencesDialog) SetVisiblePage(PageVar *PreferencesPage) { | ||
| 192 | + | core.LazyRegister(&xPreferencesDialogSetVisiblePage, "ADW", "adw_preferences_dialog_set_visible_page", false) | |||
| 193 | + | ||||
| 174 | xPreferencesDialogSetVisiblePage(x.GoPointer(), PageVar.GoPointer()) | 194 | xPreferencesDialogSetVisiblePage(x.GoPointer(), PageVar.GoPointer()) | ||
| 175 | } | 195 | } | ||
| 176 | 196 | ||||
| @@ -180,6 +200,8 @@ var xPreferencesDialogSetVisiblePageName func(uintptr, string) | |||||
| 180 | // | 200 | // | ||
| 181 | // See [property@PreferencesDialog:visible-page]. | 201 | // See [property@PreferencesDialog:visible-page]. | ||
| 182 | func (x *PreferencesDialog) SetVisiblePageName(NameVar string) { | 202 | func (x *PreferencesDialog) SetVisiblePageName(NameVar string) { | ||
| 203 | + | core.LazyRegister(&xPreferencesDialogSetVisiblePageName, "ADW", "adw_preferences_dialog_set_visible_page_name", false) | |||
| 204 | + | ||||
| 183 | xPreferencesDialogSetVisiblePageName(x.GoPointer(), NameVar) | 205 | xPreferencesDialogSetVisiblePageName(x.GoPointer(), NameVar) | ||
| 184 | } | 206 | } | ||
| 185 | 207 | ||||
| @@ -495,28 +517,4 @@ func (x *PreferencesDialog) GetBuildableId() string { | |||||
| 495 | func init() { | 517 | func init() { | ||
| 496 | core.SetPackageName("ADW", "libadwaita-1") | 518 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 497 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 519 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | ||
| 498 | - | var libs []uintptr | |||
| 499 | - | for _, libPath := range core.GetPaths("ADW") { | |||
| 500 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 501 | - | if err != nil { | |||
| 502 | - | panic(err) | |||
| 503 | - | } | |||
| 504 | - | libs = append(libs, lib) | |||
| 505 | - | } | |||
| 506 | - | ||||
| 507 | - | core.PuregoSafeRegister(&xPreferencesDialogGLibType, libs, "adw_preferences_dialog_get_type") | |||
| 508 | - | ||||
| 509 | - | core.PuregoSafeRegister(&xNewPreferencesDialog, libs, "adw_preferences_dialog_new") | |||
| 510 | - | ||||
| 511 | - | core.PuregoSafeRegister(&xPreferencesDialogAdd, libs, "adw_preferences_dialog_add") | |||
| 512 | - | core.PuregoSafeRegister(&xPreferencesDialogAddToast, libs, "adw_preferences_dialog_add_toast") | |||
| 513 | - | core.PuregoSafeRegister(&xPreferencesDialogGetSearchEnabled, libs, "adw_preferences_dialog_get_search_enabled") | |||
| 514 | - | core.PuregoSafeRegister(&xPreferencesDialogGetVisiblePage, libs, "adw_preferences_dialog_get_visible_page") | |||
| 515 | - | core.PuregoSafeRegister(&xPreferencesDialogGetVisiblePageName, libs, "adw_preferences_dialog_get_visible_page_name") | |||
| 516 | - | core.PuregoSafeRegister(&xPreferencesDialogPopSubpage, libs, "adw_preferences_dialog_pop_subpage") | |||
| 517 | - | core.PuregoSafeRegister(&xPreferencesDialogPushSubpage, libs, "adw_preferences_dialog_push_subpage") | |||
| 518 | - | core.PuregoSafeRegister(&xPreferencesDialogRemove, libs, "adw_preferences_dialog_remove") | |||
| 519 | - | core.PuregoSafeRegister(&xPreferencesDialogSetSearchEnabled, libs, "adw_preferences_dialog_set_search_enabled") | |||
| 520 | - | core.PuregoSafeRegister(&xPreferencesDialogSetVisiblePage, libs, "adw_preferences_dialog_set_visible_page") | |||
| 521 | - | core.PuregoSafeRegister(&xPreferencesDialogSetVisiblePageName, libs, "adw_preferences_dialog_set_visible_page_name") | |||
| 522 | } | 520 | } | ||