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
| @@ -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/glib" | |
| 11 | 10 | "github.com/bnema/puregotk/v4/gobject" | |
| @@ -88,6 +87,7 @@ type ButtonRow struct { | |||
| 88 | 87 | var xButtonRowGLibType func() types.GType | |
| 89 | 88 | ||
| 90 | 89 | func ButtonRowGLibType() types.GType { | |
| 90 | + | core.LazyRegister(&xButtonRowGLibType, "ADW", "adw_button_row_get_type", false) | |
| 91 | 91 | return xButtonRowGLibType() | |
| 92 | 92 | } | |
| 93 | 93 | ||
| @@ -101,6 +101,7 @@ var xNewButtonRow func() uintptr | |||
| 101 | 101 | ||
| 102 | 102 | // Creates a new `AdwButtonRow`. | |
| 103 | 103 | func NewButtonRow() *ButtonRow { | |
| 104 | + | core.LazyRegister(&xNewButtonRow, "ADW", "adw_button_row_new", false) | |
| 104 | 105 | var cls *ButtonRow | |
| 105 | 106 | ||
| 106 | 107 | cret := xNewButtonRow() | |
| @@ -118,6 +119,8 @@ var xButtonRowGetEndIconName func(uintptr) string | |||
| 118 | 119 | ||
| 119 | 120 | // Gets the end icon name for @self. | |
| 120 | 121 | func (x *ButtonRow) GetEndIconName() string { | |
| 122 | + | core.LazyRegister(&xButtonRowGetEndIconName, "ADW", "adw_button_row_get_end_icon_name", false) | |
| 123 | + | ||
| 121 | 124 | cret := xButtonRowGetEndIconName(x.GoPointer()) | |
| 122 | 125 | return cret | |
| 123 | 126 | } | |
| @@ -126,6 +129,8 @@ var xButtonRowGetStartIconName func(uintptr) string | |||
| 126 | 129 | ||
| 127 | 130 | // Gets the start icon name for @self. | |
| 128 | 131 | func (x *ButtonRow) GetStartIconName() string { | |
| 132 | + | core.LazyRegister(&xButtonRowGetStartIconName, "ADW", "adw_button_row_get_start_icon_name", false) | |
| 133 | + | ||
| 129 | 134 | cret := xButtonRowGetStartIconName(x.GoPointer()) | |
| 130 | 135 | return cret | |
| 131 | 136 | } | |
| @@ -134,6 +139,8 @@ var xButtonRowSetEndIconName func(uintptr, uintptr) | |||
| 134 | 139 | ||
| 135 | 140 | // Sets the end icon name for @self. | |
| 136 | 141 | func (x *ButtonRow) SetEndIconName(IconNameVar *string) { | |
| 142 | + | core.LazyRegister(&xButtonRowSetEndIconName, "ADW", "adw_button_row_set_end_icon_name", false) | |
| 143 | + | ||
| 137 | 144 | IconNameVarPtr := core.GStrdupNullable(IconNameVar) | |
| 138 | 145 | defer core.GFreeNullable(IconNameVarPtr) | |
| 139 | 146 | ||
| @@ -144,6 +151,8 @@ var xButtonRowSetStartIconName func(uintptr, uintptr) | |||
| 144 | 151 | ||
| 145 | 152 | // Sets the start icon name for @self. | |
| 146 | 153 | func (x *ButtonRow) SetStartIconName(IconNameVar *string) { | |
| 154 | + | core.LazyRegister(&xButtonRowSetStartIconName, "ADW", "adw_button_row_set_start_icon_name", false) | |
| 155 | + | ||
| 147 | 156 | IconNameVarPtr := core.GStrdupNullable(IconNameVar) | |
| 148 | 157 | defer core.GFreeNullable(IconNameVarPtr) | |
| 149 | 158 | ||
| @@ -560,21 +569,4 @@ func (x *ButtonRow) GetBuildableId() string { | |||
| 560 | 569 | func init() { | |
| 561 | 570 | core.SetPackageName("ADW", "libadwaita-1") | |
| 562 | 571 | 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(&xButtonRowGLibType, libs, "adw_button_row_get_type") | |
| 573 | - | ||
| 574 | - | core.PuregoSafeRegister(&xNewButtonRow, libs, "adw_button_row_new") | |
| 575 | - | ||
| 576 | - | core.PuregoSafeRegister(&xButtonRowGetEndIconName, libs, "adw_button_row_get_end_icon_name") | |
| 577 | - | core.PuregoSafeRegister(&xButtonRowGetStartIconName, libs, "adw_button_row_get_start_icon_name") | |
| 578 | - | core.PuregoSafeRegister(&xButtonRowSetEndIconName, libs, "adw_button_row_set_end_icon_name") | |
| 579 | - | core.PuregoSafeRegister(&xButtonRowSetStartIconName, libs, "adw_button_row_set_start_icon_name") | |
| 580 | 572 | } | |
| @@ -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/glib" | 9 | "github.com/bnema/puregotk/v4/glib" | ||
| 11 | "github.com/bnema/puregotk/v4/gobject" | 10 | "github.com/bnema/puregotk/v4/gobject" | ||
| @@ -88,6 +87,7 @@ type ButtonRow struct { | |||||
| 88 | var xButtonRowGLibType func() types.GType | 87 | var xButtonRowGLibType func() types.GType | ||
| 89 | 88 | ||||
| 90 | func ButtonRowGLibType() types.GType { | 89 | func ButtonRowGLibType() types.GType { | ||
| 90 | + | core.LazyRegister(&xButtonRowGLibType, "ADW", "adw_button_row_get_type", false) | |||
| 91 | return xButtonRowGLibType() | 91 | return xButtonRowGLibType() | ||
| 92 | } | 92 | } | ||
| 93 | 93 | ||||
| @@ -101,6 +101,7 @@ var xNewButtonRow func() uintptr | |||||
| 101 | 101 | ||||
| 102 | // Creates a new `AdwButtonRow`. | 102 | // Creates a new `AdwButtonRow`. | ||
| 103 | func NewButtonRow() *ButtonRow { | 103 | func NewButtonRow() *ButtonRow { | ||
| 104 | + | core.LazyRegister(&xNewButtonRow, "ADW", "adw_button_row_new", false) | |||
| 104 | var cls *ButtonRow | 105 | var cls *ButtonRow | ||
| 105 | 106 | ||||
| 106 | cret := xNewButtonRow() | 107 | cret := xNewButtonRow() | ||
| @@ -118,6 +119,8 @@ var xButtonRowGetEndIconName func(uintptr) string | |||||
| 118 | 119 | ||||
| 119 | // Gets the end icon name for @self. | 120 | // Gets the end icon name for @self. | ||
| 120 | func (x *ButtonRow) GetEndIconName() string { | 121 | func (x *ButtonRow) GetEndIconName() string { | ||
| 122 | + | core.LazyRegister(&xButtonRowGetEndIconName, "ADW", "adw_button_row_get_end_icon_name", false) | |||
| 123 | + | ||||
| 121 | cret := xButtonRowGetEndIconName(x.GoPointer()) | 124 | cret := xButtonRowGetEndIconName(x.GoPointer()) | ||
| 122 | return cret | 125 | return cret | ||
| 123 | } | 126 | } | ||
| @@ -126,6 +129,8 @@ var xButtonRowGetStartIconName func(uintptr) string | |||||
| 126 | 129 | ||||
| 127 | // Gets the start icon name for @self. | 130 | // Gets the start icon name for @self. | ||
| 128 | func (x *ButtonRow) GetStartIconName() string { | 131 | func (x *ButtonRow) GetStartIconName() string { | ||
| 132 | + | core.LazyRegister(&xButtonRowGetStartIconName, "ADW", "adw_button_row_get_start_icon_name", false) | |||
| 133 | + | ||||
| 129 | cret := xButtonRowGetStartIconName(x.GoPointer()) | 134 | cret := xButtonRowGetStartIconName(x.GoPointer()) | ||
| 130 | return cret | 135 | return cret | ||
| 131 | } | 136 | } | ||
| @@ -134,6 +139,8 @@ var xButtonRowSetEndIconName func(uintptr, uintptr) | |||||
| 134 | 139 | ||||
| 135 | // Sets the end icon name for @self. | 140 | // Sets the end icon name for @self. | ||
| 136 | func (x *ButtonRow) SetEndIconName(IconNameVar *string) { | 141 | func (x *ButtonRow) SetEndIconName(IconNameVar *string) { | ||
| 142 | + | core.LazyRegister(&xButtonRowSetEndIconName, "ADW", "adw_button_row_set_end_icon_name", false) | |||
| 143 | + | ||||
| 137 | IconNameVarPtr := core.GStrdupNullable(IconNameVar) | 144 | IconNameVarPtr := core.GStrdupNullable(IconNameVar) | ||
| 138 | defer core.GFreeNullable(IconNameVarPtr) | 145 | defer core.GFreeNullable(IconNameVarPtr) | ||
| 139 | 146 | ||||
| @@ -144,6 +151,8 @@ var xButtonRowSetStartIconName func(uintptr, uintptr) | |||||
| 144 | 151 | ||||
| 145 | // Sets the start icon name for @self. | 152 | // Sets the start icon name for @self. | ||
| 146 | func (x *ButtonRow) SetStartIconName(IconNameVar *string) { | 153 | func (x *ButtonRow) SetStartIconName(IconNameVar *string) { | ||
| 154 | + | core.LazyRegister(&xButtonRowSetStartIconName, "ADW", "adw_button_row_set_start_icon_name", false) | |||
| 155 | + | ||||
| 147 | IconNameVarPtr := core.GStrdupNullable(IconNameVar) | 156 | IconNameVarPtr := core.GStrdupNullable(IconNameVar) | ||
| 148 | defer core.GFreeNullable(IconNameVarPtr) | 157 | defer core.GFreeNullable(IconNameVarPtr) | ||
| 149 | 158 | ||||
| @@ -560,21 +569,4 @@ func (x *ButtonRow) GetBuildableId() string { | |||||
| 560 | func init() { | 569 | func init() { | ||
| 561 | core.SetPackageName("ADW", "libadwaita-1") | 570 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 562 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 571 | 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(&xButtonRowGLibType, libs, "adw_button_row_get_type") | |||
| 573 | - | ||||
| 574 | - | core.PuregoSafeRegister(&xNewButtonRow, libs, "adw_button_row_new") | |||
| 575 | - | ||||
| 576 | - | core.PuregoSafeRegister(&xButtonRowGetEndIconName, libs, "adw_button_row_get_end_icon_name") | |||
| 577 | - | core.PuregoSafeRegister(&xButtonRowGetStartIconName, libs, "adw_button_row_get_start_icon_name") | |||
| 578 | - | core.PuregoSafeRegister(&xButtonRowSetEndIconName, libs, "adw_button_row_set_end_icon_name") | |||
| 579 | - | core.PuregoSafeRegister(&xButtonRowSetStartIconName, libs, "adw_button_row_set_start_icon_name") | |||
| 580 | } | 572 | } | ||