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
| @@ -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" | |
| @@ -156,6 +155,7 @@ type BreakpointBin struct { | |||
| 156 | 155 | var xBreakpointBinGLibType func() types.GType | |
| 157 | 156 | ||
| 158 | 157 | func BreakpointBinGLibType() types.GType { | |
| 158 | + | core.LazyRegister(&xBreakpointBinGLibType, "ADW", "adw_breakpoint_bin_get_type", false) | |
| 159 | 159 | return xBreakpointBinGLibType() | |
| 160 | 160 | } | |
| 161 | 161 | ||
| @@ -169,6 +169,7 @@ var xNewBreakpointBin func() uintptr | |||
| 169 | 169 | ||
| 170 | 170 | // Creates a new `AdwBreakpointBin`. | |
| 171 | 171 | func NewBreakpointBin() *BreakpointBin { | |
| 172 | + | core.LazyRegister(&xNewBreakpointBin, "ADW", "adw_breakpoint_bin_new", false) | |
| 172 | 173 | var cls *BreakpointBin | |
| 173 | 174 | ||
| 174 | 175 | cret := xNewBreakpointBin() | |
| @@ -186,6 +187,8 @@ var xBreakpointBinAddBreakpoint func(uintptr, uintptr) | |||
| 186 | 187 | ||
| 187 | 188 | // Adds @breakpoint to @self. | |
| 188 | 189 | func (x *BreakpointBin) AddBreakpoint(BreakpointVar *Breakpoint) { | |
| 190 | + | core.LazyRegister(&xBreakpointBinAddBreakpoint, "ADW", "adw_breakpoint_bin_add_breakpoint", false) | |
| 191 | + | ||
| 189 | 192 | xBreakpointBinAddBreakpoint(x.GoPointer(), BreakpointVar.GoPointer()) | |
| 190 | 193 | } | |
| 191 | 194 | ||
| @@ -193,6 +196,7 @@ var xBreakpointBinGetChild func(uintptr) uintptr | |||
| 193 | 196 | ||
| 194 | 197 | // Gets the child widget of @self. | |
| 195 | 198 | func (x *BreakpointBin) GetChild() *gtk.Widget { | |
| 199 | + | core.LazyRegister(&xBreakpointBinGetChild, "ADW", "adw_breakpoint_bin_get_child", false) | |
| 196 | 200 | var cls *gtk.Widget | |
| 197 | 201 | ||
| 198 | 202 | cret := xBreakpointBinGetChild(x.GoPointer()) | |
| @@ -210,6 +214,7 @@ var xBreakpointBinGetCurrentBreakpoint func(uintptr) uintptr | |||
| 210 | 214 | ||
| 211 | 215 | // Gets the current breakpoint. | |
| 212 | 216 | func (x *BreakpointBin) GetCurrentBreakpoint() *Breakpoint { | |
| 217 | + | core.LazyRegister(&xBreakpointBinGetCurrentBreakpoint, "ADW", "adw_breakpoint_bin_get_current_breakpoint", false) | |
| 213 | 218 | var cls *Breakpoint | |
| 214 | 219 | ||
| 215 | 220 | cret := xBreakpointBinGetCurrentBreakpoint(x.GoPointer()) | |
| @@ -227,6 +232,8 @@ var xBreakpointBinRemoveBreakpoint func(uintptr, uintptr) | |||
| 227 | 232 | ||
| 228 | 233 | // Removes @breakpoint from @self. | |
| 229 | 234 | func (x *BreakpointBin) RemoveBreakpoint(BreakpointVar *Breakpoint) { | |
| 235 | + | core.LazyRegister(&xBreakpointBinRemoveBreakpoint, "ADW", "adw_breakpoint_bin_remove_breakpoint", false) | |
| 236 | + | ||
| 230 | 237 | xBreakpointBinRemoveBreakpoint(x.GoPointer(), BreakpointVar.GoPointer()) | |
| 231 | 238 | } | |
| 232 | 239 | ||
| @@ -234,6 +241,8 @@ var xBreakpointBinSetChild func(uintptr, uintptr) | |||
| 234 | 241 | ||
| 235 | 242 | // Sets the child widget of @self. | |
| 236 | 243 | func (x *BreakpointBin) SetChild(ChildVar *gtk.Widget) { | |
| 244 | + | core.LazyRegister(&xBreakpointBinSetChild, "ADW", "adw_breakpoint_bin_set_child", false) | |
| 245 | + | ||
| 237 | 246 | xBreakpointBinSetChild(x.GoPointer(), ChildVar.GoPointer()) | |
| 238 | 247 | } | |
| 239 | 248 | ||
| @@ -511,22 +520,4 @@ func (x *BreakpointBin) GetBuildableId() string { | |||
| 511 | 520 | func init() { | |
| 512 | 521 | core.SetPackageName("ADW", "libadwaita-1") | |
| 513 | 522 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | |
| 514 | - | var libs []uintptr | |
| 515 | - | for _, libPath := range core.GetPaths("ADW") { | |
| 516 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 517 | - | if err != nil { | |
| 518 | - | panic(err) | |
| 519 | - | } | |
| 520 | - | libs = append(libs, lib) | |
| 521 | - | } | |
| 522 | - | ||
| 523 | - | core.PuregoSafeRegister(&xBreakpointBinGLibType, libs, "adw_breakpoint_bin_get_type") | |
| 524 | - | ||
| 525 | - | core.PuregoSafeRegister(&xNewBreakpointBin, libs, "adw_breakpoint_bin_new") | |
| 526 | - | ||
| 527 | - | core.PuregoSafeRegister(&xBreakpointBinAddBreakpoint, libs, "adw_breakpoint_bin_add_breakpoint") | |
| 528 | - | core.PuregoSafeRegister(&xBreakpointBinGetChild, libs, "adw_breakpoint_bin_get_child") | |
| 529 | - | core.PuregoSafeRegister(&xBreakpointBinGetCurrentBreakpoint, libs, "adw_breakpoint_bin_get_current_breakpoint") | |
| 530 | - | core.PuregoSafeRegister(&xBreakpointBinRemoveBreakpoint, libs, "adw_breakpoint_bin_remove_breakpoint") | |
| 531 | - | core.PuregoSafeRegister(&xBreakpointBinSetChild, libs, "adw_breakpoint_bin_set_child") | |
| 532 | 523 | } | |
| @@ -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" | ||
| @@ -156,6 +155,7 @@ type BreakpointBin struct { | |||||
| 156 | var xBreakpointBinGLibType func() types.GType | 155 | var xBreakpointBinGLibType func() types.GType | ||
| 157 | 156 | ||||
| 158 | func BreakpointBinGLibType() types.GType { | 157 | func BreakpointBinGLibType() types.GType { | ||
| 158 | + | core.LazyRegister(&xBreakpointBinGLibType, "ADW", "adw_breakpoint_bin_get_type", false) | |||
| 159 | return xBreakpointBinGLibType() | 159 | return xBreakpointBinGLibType() | ||
| 160 | } | 160 | } | ||
| 161 | 161 | ||||
| @@ -169,6 +169,7 @@ var xNewBreakpointBin func() uintptr | |||||
| 169 | 169 | ||||
| 170 | // Creates a new `AdwBreakpointBin`. | 170 | // Creates a new `AdwBreakpointBin`. | ||
| 171 | func NewBreakpointBin() *BreakpointBin { | 171 | func NewBreakpointBin() *BreakpointBin { | ||
| 172 | + | core.LazyRegister(&xNewBreakpointBin, "ADW", "adw_breakpoint_bin_new", false) | |||
| 172 | var cls *BreakpointBin | 173 | var cls *BreakpointBin | ||
| 173 | 174 | ||||
| 174 | cret := xNewBreakpointBin() | 175 | cret := xNewBreakpointBin() | ||
| @@ -186,6 +187,8 @@ var xBreakpointBinAddBreakpoint func(uintptr, uintptr) | |||||
| 186 | 187 | ||||
| 187 | // Adds @breakpoint to @self. | 188 | // Adds @breakpoint to @self. | ||
| 188 | func (x *BreakpointBin) AddBreakpoint(BreakpointVar *Breakpoint) { | 189 | func (x *BreakpointBin) AddBreakpoint(BreakpointVar *Breakpoint) { | ||
| 190 | + | core.LazyRegister(&xBreakpointBinAddBreakpoint, "ADW", "adw_breakpoint_bin_add_breakpoint", false) | |||
| 191 | + | ||||
| 189 | xBreakpointBinAddBreakpoint(x.GoPointer(), BreakpointVar.GoPointer()) | 192 | xBreakpointBinAddBreakpoint(x.GoPointer(), BreakpointVar.GoPointer()) | ||
| 190 | } | 193 | } | ||
| 191 | 194 | ||||
| @@ -193,6 +196,7 @@ var xBreakpointBinGetChild func(uintptr) uintptr | |||||
| 193 | 196 | ||||
| 194 | // Gets the child widget of @self. | 197 | // Gets the child widget of @self. | ||
| 195 | func (x *BreakpointBin) GetChild() *gtk.Widget { | 198 | func (x *BreakpointBin) GetChild() *gtk.Widget { | ||
| 199 | + | core.LazyRegister(&xBreakpointBinGetChild, "ADW", "adw_breakpoint_bin_get_child", false) | |||
| 196 | var cls *gtk.Widget | 200 | var cls *gtk.Widget | ||
| 197 | 201 | ||||
| 198 | cret := xBreakpointBinGetChild(x.GoPointer()) | 202 | cret := xBreakpointBinGetChild(x.GoPointer()) | ||
| @@ -210,6 +214,7 @@ var xBreakpointBinGetCurrentBreakpoint func(uintptr) uintptr | |||||
| 210 | 214 | ||||
| 211 | // Gets the current breakpoint. | 215 | // Gets the current breakpoint. | ||
| 212 | func (x *BreakpointBin) GetCurrentBreakpoint() *Breakpoint { | 216 | func (x *BreakpointBin) GetCurrentBreakpoint() *Breakpoint { | ||
| 217 | + | core.LazyRegister(&xBreakpointBinGetCurrentBreakpoint, "ADW", "adw_breakpoint_bin_get_current_breakpoint", false) | |||
| 213 | var cls *Breakpoint | 218 | var cls *Breakpoint | ||
| 214 | 219 | ||||
| 215 | cret := xBreakpointBinGetCurrentBreakpoint(x.GoPointer()) | 220 | cret := xBreakpointBinGetCurrentBreakpoint(x.GoPointer()) | ||
| @@ -227,6 +232,8 @@ var xBreakpointBinRemoveBreakpoint func(uintptr, uintptr) | |||||
| 227 | 232 | ||||
| 228 | // Removes @breakpoint from @self. | 233 | // Removes @breakpoint from @self. | ||
| 229 | func (x *BreakpointBin) RemoveBreakpoint(BreakpointVar *Breakpoint) { | 234 | func (x *BreakpointBin) RemoveBreakpoint(BreakpointVar *Breakpoint) { | ||
| 235 | + | core.LazyRegister(&xBreakpointBinRemoveBreakpoint, "ADW", "adw_breakpoint_bin_remove_breakpoint", false) | |||
| 236 | + | ||||
| 230 | xBreakpointBinRemoveBreakpoint(x.GoPointer(), BreakpointVar.GoPointer()) | 237 | xBreakpointBinRemoveBreakpoint(x.GoPointer(), BreakpointVar.GoPointer()) | ||
| 231 | } | 238 | } | ||
| 232 | 239 | ||||
| @@ -234,6 +241,8 @@ var xBreakpointBinSetChild func(uintptr, uintptr) | |||||
| 234 | 241 | ||||
| 235 | // Sets the child widget of @self. | 242 | // Sets the child widget of @self. | ||
| 236 | func (x *BreakpointBin) SetChild(ChildVar *gtk.Widget) { | 243 | func (x *BreakpointBin) SetChild(ChildVar *gtk.Widget) { | ||
| 244 | + | core.LazyRegister(&xBreakpointBinSetChild, "ADW", "adw_breakpoint_bin_set_child", false) | |||
| 245 | + | ||||
| 237 | xBreakpointBinSetChild(x.GoPointer(), ChildVar.GoPointer()) | 246 | xBreakpointBinSetChild(x.GoPointer(), ChildVar.GoPointer()) | ||
| 238 | } | 247 | } | ||
| 239 | 248 | ||||
| @@ -511,22 +520,4 @@ func (x *BreakpointBin) GetBuildableId() string { | |||||
| 511 | func init() { | 520 | func init() { | ||
| 512 | core.SetPackageName("ADW", "libadwaita-1") | 521 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 513 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 522 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | ||
| 514 | - | var libs []uintptr | |||
| 515 | - | for _, libPath := range core.GetPaths("ADW") { | |||
| 516 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 517 | - | if err != nil { | |||
| 518 | - | panic(err) | |||
| 519 | - | } | |||
| 520 | - | libs = append(libs, lib) | |||
| 521 | - | } | |||
| 522 | - | ||||
| 523 | - | core.PuregoSafeRegister(&xBreakpointBinGLibType, libs, "adw_breakpoint_bin_get_type") | |||
| 524 | - | ||||
| 525 | - | core.PuregoSafeRegister(&xNewBreakpointBin, libs, "adw_breakpoint_bin_new") | |||
| 526 | - | ||||
| 527 | - | core.PuregoSafeRegister(&xBreakpointBinAddBreakpoint, libs, "adw_breakpoint_bin_add_breakpoint") | |||
| 528 | - | core.PuregoSafeRegister(&xBreakpointBinGetChild, libs, "adw_breakpoint_bin_get_child") | |||
| 529 | - | core.PuregoSafeRegister(&xBreakpointBinGetCurrentBreakpoint, libs, "adw_breakpoint_bin_get_current_breakpoint") | |||
| 530 | - | core.PuregoSafeRegister(&xBreakpointBinRemoveBreakpoint, libs, "adw_breakpoint_bin_remove_breakpoint") | |||
| 531 | - | core.PuregoSafeRegister(&xBreakpointBinSetChild, libs, "adw_breakpoint_bin_set_child") | |||
| 532 | } | 523 | } | ||