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
| @@ -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" | |
| @@ -87,6 +86,7 @@ type Application struct { | |||
| 87 | 86 | var xApplicationGLibType func() types.GType | |
| 88 | 87 | ||
| 89 | 88 | func ApplicationGLibType() types.GType { | |
| 89 | + | core.LazyRegister(&xApplicationGLibType, "ADW", "adw_application_get_type", false) | |
| 90 | 90 | return xApplicationGLibType() | |
| 91 | 91 | } | |
| 92 | 92 | ||
| @@ -106,6 +106,7 @@ var xNewApplication func(uintptr, gio.ApplicationFlags) uintptr | |||
| 106 | 106 | // If no application ID is given then some features (most notably application | |
| 107 | 107 | // uniqueness) will be disabled. | |
| 108 | 108 | func NewApplication(ApplicationIdVar *string, FlagsVar gio.ApplicationFlags) *Application { | |
| 109 | + | core.LazyRegister(&xNewApplication, "ADW", "adw_application_new", false) | |
| 109 | 110 | var cls *Application | |
| 110 | 111 | ||
| 111 | 112 | ApplicationIdVarPtr := core.GStrdupNullable(ApplicationIdVar) | |
| @@ -128,6 +129,7 @@ var xApplicationGetStyleManager func(uintptr) uintptr | |||
| 128 | 129 | // This is a convenience property allowing to access `AdwStyleManager` through | |
| 129 | 130 | // property bindings or expressions. | |
| 130 | 131 | func (x *Application) GetStyleManager() *StyleManager { | |
| 132 | + | core.LazyRegister(&xApplicationGetStyleManager, "ADW", "adw_application_get_style_manager", false) | |
| 131 | 133 | var cls *StyleManager | |
| 132 | 134 | ||
| 133 | 135 | cret := xApplicationGetStyleManager(x.GoPointer()) | |
| @@ -488,18 +490,4 @@ func (x *Application) RemoveActionEntries(EntriesVar []gio.ActionEntry, NEntries | |||
| 488 | 490 | func init() { | |
| 489 | 491 | core.SetPackageName("ADW", "libadwaita-1") | |
| 490 | 492 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | |
| 491 | - | var libs []uintptr | |
| 492 | - | for _, libPath := range core.GetPaths("ADW") { | |
| 493 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 494 | - | if err != nil { | |
| 495 | - | panic(err) | |
| 496 | - | } | |
| 497 | - | libs = append(libs, lib) | |
| 498 | - | } | |
| 499 | - | ||
| 500 | - | core.PuregoSafeRegister(&xApplicationGLibType, libs, "adw_application_get_type") | |
| 501 | - | ||
| 502 | - | core.PuregoSafeRegister(&xNewApplication, libs, "adw_application_new") | |
| 503 | - | ||
| 504 | - | core.PuregoSafeRegister(&xApplicationGetStyleManager, libs, "adw_application_get_style_manager") | |
| 505 | 493 | } | |
| @@ -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" | ||
| @@ -87,6 +86,7 @@ type Application struct { | |||||
| 87 | var xApplicationGLibType func() types.GType | 86 | var xApplicationGLibType func() types.GType | ||
| 88 | 87 | ||||
| 89 | func ApplicationGLibType() types.GType { | 88 | func ApplicationGLibType() types.GType { | ||
| 89 | + | core.LazyRegister(&xApplicationGLibType, "ADW", "adw_application_get_type", false) | |||
| 90 | return xApplicationGLibType() | 90 | return xApplicationGLibType() | ||
| 91 | } | 91 | } | ||
| 92 | 92 | ||||
| @@ -106,6 +106,7 @@ var xNewApplication func(uintptr, gio.ApplicationFlags) uintptr | |||||
| 106 | // If no application ID is given then some features (most notably application | 106 | // If no application ID is given then some features (most notably application | ||
| 107 | // uniqueness) will be disabled. | 107 | // uniqueness) will be disabled. | ||
| 108 | func NewApplication(ApplicationIdVar *string, FlagsVar gio.ApplicationFlags) *Application { | 108 | func NewApplication(ApplicationIdVar *string, FlagsVar gio.ApplicationFlags) *Application { | ||
| 109 | + | core.LazyRegister(&xNewApplication, "ADW", "adw_application_new", false) | |||
| 109 | var cls *Application | 110 | var cls *Application | ||
| 110 | 111 | ||||
| 111 | ApplicationIdVarPtr := core.GStrdupNullable(ApplicationIdVar) | 112 | ApplicationIdVarPtr := core.GStrdupNullable(ApplicationIdVar) | ||
| @@ -128,6 +129,7 @@ var xApplicationGetStyleManager func(uintptr) uintptr | |||||
| 128 | // This is a convenience property allowing to access `AdwStyleManager` through | 129 | // This is a convenience property allowing to access `AdwStyleManager` through | ||
| 129 | // property bindings or expressions. | 130 | // property bindings or expressions. | ||
| 130 | func (x *Application) GetStyleManager() *StyleManager { | 131 | func (x *Application) GetStyleManager() *StyleManager { | ||
| 132 | + | core.LazyRegister(&xApplicationGetStyleManager, "ADW", "adw_application_get_style_manager", false) | |||
| 131 | var cls *StyleManager | 133 | var cls *StyleManager | ||
| 132 | 134 | ||||
| 133 | cret := xApplicationGetStyleManager(x.GoPointer()) | 135 | cret := xApplicationGetStyleManager(x.GoPointer()) | ||
| @@ -488,18 +490,4 @@ func (x *Application) RemoveActionEntries(EntriesVar []gio.ActionEntry, NEntries | |||||
| 488 | func init() { | 490 | func init() { | ||
| 489 | core.SetPackageName("ADW", "libadwaita-1") | 491 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 490 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 492 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | ||
| 491 | - | var libs []uintptr | |||
| 492 | - | for _, libPath := range core.GetPaths("ADW") { | |||
| 493 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 494 | - | if err != nil { | |||
| 495 | - | panic(err) | |||
| 496 | - | } | |||
| 497 | - | libs = append(libs, lib) | |||
| 498 | - | } | |||
| 499 | - | ||||
| 500 | - | core.PuregoSafeRegister(&xApplicationGLibType, libs, "adw_application_get_type") | |||
| 501 | - | ||||
| 502 | - | core.PuregoSafeRegister(&xNewApplication, libs, "adw_application_new") | |||
| 503 | - | ||||
| 504 | - | core.PuregoSafeRegister(&xApplicationGetStyleManager, libs, "adw_application_get_style_manager") | |||
| 505 | } | 493 | } | ||