Merge pull request #349 from bnema/fix/rollback-lazy-puregotk
fix(deps): emergency rollback puregotk lazy registration regression
905 files · +25263 -27842
M go.mod +1 -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.1-0.20260714170452-0b6b9b901234 | |
| 14 | + | github.com/bnema/puregotk v0.7.0 | |
| 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 | |
| @@ -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.1-0.20260714170452-0b6b9b901234 | 14 | + | github.com/bnema/puregotk v0.7.0 |
| 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 | ||
M go.sum +0 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/internal/core/core.go +4 -197 generated file: collapsed
M vendor/github.com/bnema/puregotk/pkg/core/core.go +0 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-dialog.go +64 -99 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-window.go +62 -95 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-accent-color.go +15 -7 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-action-row.go +29 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-alert-dialog.go +47 -66 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-target.go +27 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-util.go +12 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation.go +26 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application-window.go +22 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application.go +15 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-avatar.go +25 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-banner.go +26 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bin.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bottom-sheet.go +38 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint-bin.go +19 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint.go +37 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-content.go +22 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-row.go +18 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-dots.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-lines.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel.go +37 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-layout.go +20 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-scrollable.go +22 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp.go +22 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-combo-row.go +33 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-dialog.go +38 -45 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-easing.go +13 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-entry-row.go +33 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-enum-list-model.go +22 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-expander-row.go +33 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-flap.go +48 -61 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-fold-threshold-policy.go +1 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-header-bar.go +33 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-inline-view-switcher.go +24 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout-slot.go +15 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout.go +17 -7 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-leaflet.go +56 -69 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-length-unit.go +14 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-main.go +15 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-message-dialog.go +44 -63 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-multi-layout-view.go +23 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-direction.go +1 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-split-view.go +32 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-view.go +49 -60 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-overlay-split-view.go +38 -48 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-password-entry-row.go +13 -2 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-dialog.go +25 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-group.go +26 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-page.go +33 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-row.go +22 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-window.go +29 -31 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcut-label.go +18 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-dialog.go +15 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-item.go +25 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-section.go +17 -8
| @@ -5,6 +5,7 @@ import ( | |||
| 5 | 5 | "structs" | |
| 6 | 6 | "unsafe" | |
| 7 | 7 | ||
| 8 | + | "github.com/bnema/purego" | |
| 8 | 9 | "github.com/bnema/puregotk/pkg/core" | |
| 9 | 10 | "github.com/bnema/puregotk/v4/gio" | |
| 10 | 11 | "github.com/bnema/puregotk/v4/gobject" | |
| @@ -48,7 +49,6 @@ type ShortcutsSection struct { | |||
| 48 | 49 | var xShortcutsSectionGLibType func() types.GType | |
| 49 | 50 | ||
| 50 | 51 | func ShortcutsSectionGLibType() types.GType { | |
| 51 | - | core.LazyRegister(&xShortcutsSectionGLibType, "ADW", "adw_shortcuts_section_get_type", false) | |
| 52 | 52 | return xShortcutsSectionGLibType() | |
| 53 | 53 | } | |
| 54 | 54 | ||
| @@ -62,7 +62,6 @@ var xNewShortcutsSection func(uintptr) uintptr | |||
| 62 | 62 | ||
| 63 | 63 | // Creates a new `AdwShortcutsSection` with @title as its title if provided. | |
| 64 | 64 | func NewShortcutsSection(TitleVar *string) *ShortcutsSection { | |
| 65 | - | core.LazyRegister(&xNewShortcutsSection, "ADW", "adw_shortcuts_section_new", false) | |
| 66 | 65 | var cls *ShortcutsSection | |
| 67 | 66 | ||
| 68 | 67 | TitleVarPtr := core.GStrdupNullable(TitleVar) | |
| @@ -82,8 +81,6 @@ var xShortcutsSectionAdd func(uintptr, uintptr) | |||
| 82 | 81 | ||
| 83 | 82 | // Adds @item to @self. | |
| 84 | 83 | func (x *ShortcutsSection) Add(ItemVar *ShortcutsItem) { | |
| 85 | - | core.LazyRegister(&xShortcutsSectionAdd, "ADW", "adw_shortcuts_section_add", false) | |
| 86 | - | ||
| 87 | 84 | xShortcutsSectionAdd(x.GoPointer(), ItemVar.GoPointer()) | |
| 88 | 85 | } | |
| 89 | 86 | ||
| @@ -91,8 +88,6 @@ var xShortcutsSectionGetTitle func(uintptr) string | |||
| 91 | 88 | ||
| 92 | 89 | // Gets the title of @self. | |
| 93 | 90 | func (x *ShortcutsSection) GetTitle() string { | |
| 94 | - | core.LazyRegister(&xShortcutsSectionGetTitle, "ADW", "adw_shortcuts_section_get_title", false) | |
| 95 | - | ||
| 96 | 91 | cret := xShortcutsSectionGetTitle(x.GoPointer()) | |
| 97 | 92 | return cret | |
| 98 | 93 | } | |
| @@ -101,8 +96,6 @@ var xShortcutsSectionSetTitle func(uintptr, uintptr) | |||
| 101 | 96 | ||
| 102 | 97 | // Sets the title of @self. | |
| 103 | 98 | func (x *ShortcutsSection) SetTitle(TitleVar *string) { | |
| 104 | - | core.LazyRegister(&xShortcutsSectionSetTitle, "ADW", "adw_shortcuts_section_set_title", false) | |
| 105 | - | ||
| 106 | 99 | TitleVarPtr := core.GStrdupNullable(TitleVar) | |
| 107 | 100 | defer core.GFreeNullable(TitleVarPtr) | |
| 108 | 101 | ||
| @@ -243,4 +236,20 @@ func (x *ShortcutsSection) GetBuildableId() string { | |||
| 243 | 236 | func init() { | |
| 244 | 237 | core.SetPackageName("ADW", "libadwaita-1") | |
| 245 | 238 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | |
| 239 | + | var libs []uintptr | |
| 240 | + | for _, libPath := range core.GetPaths("ADW") { | |
| 241 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 242 | + | if err != nil { | |
| 243 | + | panic(err) | |
| 244 | + | } | |
| 245 | + | libs = append(libs, lib) | |
| 246 | + | } | |
| 247 | + | ||
| 248 | + | core.PuregoSafeRegister(&xShortcutsSectionGLibType, libs, "adw_shortcuts_section_get_type") | |
| 249 | + | ||
| 250 | + | core.PuregoSafeRegister(&xNewShortcutsSection, libs, "adw_shortcuts_section_new") | |
| 251 | + | ||
| 252 | + | core.PuregoSafeRegister(&xShortcutsSectionAdd, libs, "adw_shortcuts_section_add") | |
| 253 | + | core.PuregoSafeRegister(&xShortcutsSectionGetTitle, libs, "adw_shortcuts_section_get_title") | |
| 254 | + | core.PuregoSafeRegister(&xShortcutsSectionSetTitle, libs, "adw_shortcuts_section_set_title") | |
| 246 | 255 | } | |
| @@ -5,6 +5,7 @@ import ( | |||||
| 5 | "structs" | 5 | "structs" | ||
| 6 | "unsafe" | 6 | "unsafe" | ||
| 7 | 7 | ||||
| 8 | + | "github.com/bnema/purego" | |||
| 8 | "github.com/bnema/puregotk/pkg/core" | 9 | "github.com/bnema/puregotk/pkg/core" | ||
| 9 | "github.com/bnema/puregotk/v4/gio" | 10 | "github.com/bnema/puregotk/v4/gio" | ||
| 10 | "github.com/bnema/puregotk/v4/gobject" | 11 | "github.com/bnema/puregotk/v4/gobject" | ||
| @@ -48,7 +49,6 @@ type ShortcutsSection struct { | |||||
| 48 | var xShortcutsSectionGLibType func() types.GType | 49 | var xShortcutsSectionGLibType func() types.GType | ||
| 49 | 50 | ||||
| 50 | func ShortcutsSectionGLibType() types.GType { | 51 | func ShortcutsSectionGLibType() types.GType { | ||
| 51 | - | core.LazyRegister(&xShortcutsSectionGLibType, "ADW", "adw_shortcuts_section_get_type", false) | |||
| 52 | return xShortcutsSectionGLibType() | 52 | return xShortcutsSectionGLibType() | ||
| 53 | } | 53 | } | ||
| 54 | 54 | ||||
| @@ -62,7 +62,6 @@ var xNewShortcutsSection func(uintptr) uintptr | |||||
| 62 | 62 | ||||
| 63 | // Creates a new `AdwShortcutsSection` with @title as its title if provided. | 63 | // Creates a new `AdwShortcutsSection` with @title as its title if provided. | ||
| 64 | func NewShortcutsSection(TitleVar *string) *ShortcutsSection { | 64 | func NewShortcutsSection(TitleVar *string) *ShortcutsSection { | ||
| 65 | - | core.LazyRegister(&xNewShortcutsSection, "ADW", "adw_shortcuts_section_new", false) | |||
| 66 | var cls *ShortcutsSection | 65 | var cls *ShortcutsSection | ||
| 67 | 66 | ||||
| 68 | TitleVarPtr := core.GStrdupNullable(TitleVar) | 67 | TitleVarPtr := core.GStrdupNullable(TitleVar) | ||
| @@ -82,8 +81,6 @@ var xShortcutsSectionAdd func(uintptr, uintptr) | |||||
| 82 | 81 | ||||
| 83 | // Adds @item to @self. | 82 | // Adds @item to @self. | ||
| 84 | func (x *ShortcutsSection) Add(ItemVar *ShortcutsItem) { | 83 | func (x *ShortcutsSection) Add(ItemVar *ShortcutsItem) { | ||
| 85 | - | core.LazyRegister(&xShortcutsSectionAdd, "ADW", "adw_shortcuts_section_add", false) | |||
| 86 | - | ||||
| 87 | xShortcutsSectionAdd(x.GoPointer(), ItemVar.GoPointer()) | 84 | xShortcutsSectionAdd(x.GoPointer(), ItemVar.GoPointer()) | ||
| 88 | } | 85 | } | ||
| 89 | 86 | ||||
| @@ -91,8 +88,6 @@ var xShortcutsSectionGetTitle func(uintptr) string | |||||
| 91 | 88 | ||||
| 92 | // Gets the title of @self. | 89 | // Gets the title of @self. | ||
| 93 | func (x *ShortcutsSection) GetTitle() string { | 90 | func (x *ShortcutsSection) GetTitle() string { | ||
| 94 | - | core.LazyRegister(&xShortcutsSectionGetTitle, "ADW", "adw_shortcuts_section_get_title", false) | |||
| 95 | - | ||||
| 96 | cret := xShortcutsSectionGetTitle(x.GoPointer()) | 91 | cret := xShortcutsSectionGetTitle(x.GoPointer()) | ||
| 97 | return cret | 92 | return cret | ||
| 98 | } | 93 | } | ||
| @@ -101,8 +96,6 @@ var xShortcutsSectionSetTitle func(uintptr, uintptr) | |||||
| 101 | 96 | ||||
| 102 | // Sets the title of @self. | 97 | // Sets the title of @self. | ||
| 103 | func (x *ShortcutsSection) SetTitle(TitleVar *string) { | 98 | func (x *ShortcutsSection) SetTitle(TitleVar *string) { | ||
| 104 | - | core.LazyRegister(&xShortcutsSectionSetTitle, "ADW", "adw_shortcuts_section_set_title", false) | |||
| 105 | - | ||||
| 106 | TitleVarPtr := core.GStrdupNullable(TitleVar) | 99 | TitleVarPtr := core.GStrdupNullable(TitleVar) | ||
| 107 | defer core.GFreeNullable(TitleVarPtr) | 100 | defer core.GFreeNullable(TitleVarPtr) | ||
| 108 | 101 | ||||
| @@ -243,4 +236,20 @@ func (x *ShortcutsSection) GetBuildableId() string { | |||||
| 243 | func init() { | 236 | func init() { | ||
| 244 | core.SetPackageName("ADW", "libadwaita-1") | 237 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 245 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 238 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | ||
| 239 | + | var libs []uintptr | |||
| 240 | + | for _, libPath := range core.GetPaths("ADW") { | |||
| 241 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 242 | + | if err != nil { | |||
| 243 | + | panic(err) | |||
| 244 | + | } | |||
| 245 | + | libs = append(libs, lib) | |||
| 246 | + | } | |||
| 247 | + | ||||
| 248 | + | core.PuregoSafeRegister(&xShortcutsSectionGLibType, libs, "adw_shortcuts_section_get_type") | |||
| 249 | + | ||||
| 250 | + | core.PuregoSafeRegister(&xNewShortcutsSection, libs, "adw_shortcuts_section_new") | |||
| 251 | + | ||||
| 252 | + | core.PuregoSafeRegister(&xShortcutsSectionAdd, libs, "adw_shortcuts_section_add") | |||
| 253 | + | core.PuregoSafeRegister(&xShortcutsSectionGetTitle, libs, "adw_shortcuts_section_get_title") | |||
| 254 | + | core.PuregoSafeRegister(&xShortcutsSectionSetTitle, libs, "adw_shortcuts_section_set_title") | |||
| 246 | } | 255 | } | ||