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
| @@ -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" | |
| @@ -38,6 +37,7 @@ type Layout struct { | |||
| 38 | 37 | var xLayoutGLibType func() types.GType | |
| 39 | 38 | ||
| 40 | 39 | func LayoutGLibType() types.GType { | |
| 40 | + | core.LazyRegister(&xLayoutGLibType, "ADW", "adw_layout_get_type", false) | |
| 41 | 41 | return xLayoutGLibType() | |
| 42 | 42 | } | |
| 43 | 43 | ||
| @@ -51,6 +51,7 @@ var xNewLayout func(uintptr) uintptr | |||
| 51 | 51 | ||
| 52 | 52 | // Creates a new `AdwLayout` that contains @content. | |
| 53 | 53 | func NewLayout(ContentVar *gtk.Widget) *Layout { | |
| 54 | + | core.LazyRegister(&xNewLayout, "ADW", "adw_layout_new", false) | |
| 54 | 55 | var cls *Layout | |
| 55 | 56 | ||
| 56 | 57 | cret := xNewLayout(ContentVar.GoPointer()) | |
| @@ -67,6 +68,7 @@ var xLayoutGetContent func(uintptr) uintptr | |||
| 67 | 68 | ||
| 68 | 69 | // Gets the content widget. | |
| 69 | 70 | func (x *Layout) GetContent() *gtk.Widget { | |
| 71 | + | core.LazyRegister(&xLayoutGetContent, "ADW", "adw_layout_get_content", false) | |
| 70 | 72 | var cls *gtk.Widget | |
| 71 | 73 | ||
| 72 | 74 | cret := xLayoutGetContent(x.GoPointer()) | |
| @@ -84,6 +86,8 @@ var xLayoutGetName func(uintptr) string | |||
| 84 | 86 | ||
| 85 | 87 | // Gets the name of the layout. | |
| 86 | 88 | func (x *Layout) GetName() string { | |
| 89 | + | core.LazyRegister(&xLayoutGetName, "ADW", "adw_layout_get_name", false) | |
| 90 | + | ||
| 87 | 91 | cret := xLayoutGetName(x.GoPointer()) | |
| 88 | 92 | return cret | |
| 89 | 93 | } | |
| @@ -92,6 +96,8 @@ var xLayoutSetName func(uintptr, uintptr) | |||
| 92 | 96 | ||
| 93 | 97 | // Sets the name of the layout. | |
| 94 | 98 | func (x *Layout) SetName(NameVar *string) { | |
| 99 | + | core.LazyRegister(&xLayoutSetName, "ADW", "adw_layout_set_name", false) | |
| 100 | + | ||
| 95 | 101 | NameVarPtr := core.GStrdupNullable(NameVar) | |
| 96 | 102 | defer core.GFreeNullable(NameVarPtr) | |
| 97 | 103 | ||
| @@ -138,20 +144,4 @@ func (x *Layout) GetBuildableId() string { | |||
| 138 | 144 | func init() { | |
| 139 | 145 | core.SetPackageName("ADW", "libadwaita-1") | |
| 140 | 146 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | |
| 141 | - | var libs []uintptr | |
| 142 | - | for _, libPath := range core.GetPaths("ADW") { | |
| 143 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 144 | - | if err != nil { | |
| 145 | - | panic(err) | |
| 146 | - | } | |
| 147 | - | libs = append(libs, lib) | |
| 148 | - | } | |
| 149 | - | ||
| 150 | - | core.PuregoSafeRegister(&xLayoutGLibType, libs, "adw_layout_get_type") | |
| 151 | - | ||
| 152 | - | core.PuregoSafeRegister(&xNewLayout, libs, "adw_layout_new") | |
| 153 | - | ||
| 154 | - | core.PuregoSafeRegister(&xLayoutGetContent, libs, "adw_layout_get_content") | |
| 155 | - | core.PuregoSafeRegister(&xLayoutGetName, libs, "adw_layout_get_name") | |
| 156 | - | core.PuregoSafeRegister(&xLayoutSetName, libs, "adw_layout_set_name") | |
| 157 | 147 | } | |
| @@ -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" | ||
| @@ -38,6 +37,7 @@ type Layout struct { | |||||
| 38 | var xLayoutGLibType func() types.GType | 37 | var xLayoutGLibType func() types.GType | ||
| 39 | 38 | ||||
| 40 | func LayoutGLibType() types.GType { | 39 | func LayoutGLibType() types.GType { | ||
| 40 | + | core.LazyRegister(&xLayoutGLibType, "ADW", "adw_layout_get_type", false) | |||
| 41 | return xLayoutGLibType() | 41 | return xLayoutGLibType() | ||
| 42 | } | 42 | } | ||
| 43 | 43 | ||||
| @@ -51,6 +51,7 @@ var xNewLayout func(uintptr) uintptr | |||||
| 51 | 51 | ||||
| 52 | // Creates a new `AdwLayout` that contains @content. | 52 | // Creates a new `AdwLayout` that contains @content. | ||
| 53 | func NewLayout(ContentVar *gtk.Widget) *Layout { | 53 | func NewLayout(ContentVar *gtk.Widget) *Layout { | ||
| 54 | + | core.LazyRegister(&xNewLayout, "ADW", "adw_layout_new", false) | |||
| 54 | var cls *Layout | 55 | var cls *Layout | ||
| 55 | 56 | ||||
| 56 | cret := xNewLayout(ContentVar.GoPointer()) | 57 | cret := xNewLayout(ContentVar.GoPointer()) | ||
| @@ -67,6 +68,7 @@ var xLayoutGetContent func(uintptr) uintptr | |||||
| 67 | 68 | ||||
| 68 | // Gets the content widget. | 69 | // Gets the content widget. | ||
| 69 | func (x *Layout) GetContent() *gtk.Widget { | 70 | func (x *Layout) GetContent() *gtk.Widget { | ||
| 71 | + | core.LazyRegister(&xLayoutGetContent, "ADW", "adw_layout_get_content", false) | |||
| 70 | var cls *gtk.Widget | 72 | var cls *gtk.Widget | ||
| 71 | 73 | ||||
| 72 | cret := xLayoutGetContent(x.GoPointer()) | 74 | cret := xLayoutGetContent(x.GoPointer()) | ||
| @@ -84,6 +86,8 @@ var xLayoutGetName func(uintptr) string | |||||
| 84 | 86 | ||||
| 85 | // Gets the name of the layout. | 87 | // Gets the name of the layout. | ||
| 86 | func (x *Layout) GetName() string { | 88 | func (x *Layout) GetName() string { | ||
| 89 | + | core.LazyRegister(&xLayoutGetName, "ADW", "adw_layout_get_name", false) | |||
| 90 | + | ||||
| 87 | cret := xLayoutGetName(x.GoPointer()) | 91 | cret := xLayoutGetName(x.GoPointer()) | ||
| 88 | return cret | 92 | return cret | ||
| 89 | } | 93 | } | ||
| @@ -92,6 +96,8 @@ var xLayoutSetName func(uintptr, uintptr) | |||||
| 92 | 96 | ||||
| 93 | // Sets the name of the layout. | 97 | // Sets the name of the layout. | ||
| 94 | func (x *Layout) SetName(NameVar *string) { | 98 | func (x *Layout) SetName(NameVar *string) { | ||
| 99 | + | core.LazyRegister(&xLayoutSetName, "ADW", "adw_layout_set_name", false) | |||
| 100 | + | ||||
| 95 | NameVarPtr := core.GStrdupNullable(NameVar) | 101 | NameVarPtr := core.GStrdupNullable(NameVar) | ||
| 96 | defer core.GFreeNullable(NameVarPtr) | 102 | defer core.GFreeNullable(NameVarPtr) | ||
| 97 | 103 | ||||
| @@ -138,20 +144,4 @@ func (x *Layout) GetBuildableId() string { | |||||
| 138 | func init() { | 144 | func init() { | ||
| 139 | core.SetPackageName("ADW", "libadwaita-1") | 145 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 140 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 146 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | ||
| 141 | - | var libs []uintptr | |||
| 142 | - | for _, libPath := range core.GetPaths("ADW") { | |||
| 143 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 144 | - | if err != nil { | |||
| 145 | - | panic(err) | |||
| 146 | - | } | |||
| 147 | - | libs = append(libs, lib) | |||
| 148 | - | } | |||
| 149 | - | ||||
| 150 | - | core.PuregoSafeRegister(&xLayoutGLibType, libs, "adw_layout_get_type") | |||
| 151 | - | ||||
| 152 | - | core.PuregoSafeRegister(&xNewLayout, libs, "adw_layout_new") | |||
| 153 | - | ||||
| 154 | - | core.PuregoSafeRegister(&xLayoutGetContent, libs, "adw_layout_get_content") | |||
| 155 | - | core.PuregoSafeRegister(&xLayoutGetName, libs, "adw_layout_get_name") | |||
| 156 | - | core.PuregoSafeRegister(&xLayoutSetName, libs, "adw_layout_set_name") | |||
| 157 | } | 147 | } | ||