Revert "chore(deps): pin puregotk nil-signal fix"
This reverts commit a161e348e2093172038390b0906448f0ae979a0d.
- commit
- 40378d5e4fd2372d054e49168ab2a6f67aedd0fd
- author
- brice · · 2026-07-14 17:59 UTC
- parent
- 8d647bb
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
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
| @@ -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/gobject" | |
| 10 | 11 | "github.com/bnema/puregotk/v4/gobject/types" | |
| @@ -89,7 +90,6 @@ type ButtonContent struct { | |||
| 89 | 90 | var xButtonContentGLibType func() types.GType | |
| 90 | 91 | ||
| 91 | 92 | func ButtonContentGLibType() types.GType { | |
| 92 | - | core.LazyRegister(&xButtonContentGLibType, "ADW", "adw_button_content_get_type", false) | |
| 93 | 93 | return xButtonContentGLibType() | |
| 94 | 94 | } | |
| 95 | 95 | ||
| @@ -103,7 +103,6 @@ var xNewButtonContent func() uintptr | |||
| 103 | 103 | ||
| 104 | 104 | // Creates a new `AdwButtonContent`. | |
| 105 | 105 | func NewButtonContent() *ButtonContent { | |
| 106 | - | core.LazyRegister(&xNewButtonContent, "ADW", "adw_button_content_new", false) | |
| 107 | 106 | var cls *ButtonContent | |
| 108 | 107 | ||
| 109 | 108 | cret := xNewButtonContent() | |
| @@ -121,8 +120,6 @@ var xButtonContentGetCanShrink func(uintptr) bool | |||
| 121 | 120 | ||
| 122 | 121 | // gets whether the button can be smaller than the natural size of its contents. | |
| 123 | 122 | func (x *ButtonContent) GetCanShrink() bool { | |
| 124 | - | core.LazyRegister(&xButtonContentGetCanShrink, "ADW", "adw_button_content_get_can_shrink", false) | |
| 125 | - | ||
| 126 | 123 | cret := xButtonContentGetCanShrink(x.GoPointer()) | |
| 127 | 124 | return cret | |
| 128 | 125 | } | |
| @@ -131,8 +128,6 @@ var xButtonContentGetIconName func(uintptr) string | |||
| 131 | 128 | ||
| 132 | 129 | // Gets the name of the displayed icon. | |
| 133 | 130 | func (x *ButtonContent) GetIconName() string { | |
| 134 | - | core.LazyRegister(&xButtonContentGetIconName, "ADW", "adw_button_content_get_icon_name", false) | |
| 135 | - | ||
| 136 | 131 | cret := xButtonContentGetIconName(x.GoPointer()) | |
| 137 | 132 | return cret | |
| 138 | 133 | } | |
| @@ -141,8 +136,6 @@ var xButtonContentGetLabel func(uintptr) string | |||
| 141 | 136 | ||
| 142 | 137 | // Gets the displayed label. | |
| 143 | 138 | func (x *ButtonContent) GetLabel() string { | |
| 144 | - | core.LazyRegister(&xButtonContentGetLabel, "ADW", "adw_button_content_get_label", false) | |
| 145 | - | ||
| 146 | 139 | cret := xButtonContentGetLabel(x.GoPointer()) | |
| 147 | 140 | return cret | |
| 148 | 141 | } | |
| @@ -151,8 +144,6 @@ var xButtonContentGetUseUnderline func(uintptr) bool | |||
| 151 | 144 | ||
| 152 | 145 | // Gets whether an underline in the text indicates a mnemonic. | |
| 153 | 146 | func (x *ButtonContent) GetUseUnderline() bool { | |
| 154 | - | core.LazyRegister(&xButtonContentGetUseUnderline, "ADW", "adw_button_content_get_use_underline", false) | |
| 155 | - | ||
| 156 | 147 | cret := xButtonContentGetUseUnderline(x.GoPointer()) | |
| 157 | 148 | return cret | |
| 158 | 149 | } | |
| @@ -165,8 +156,6 @@ var xButtonContentSetCanShrink func(uintptr, bool) | |||
| 165 | 156 | // | |
| 166 | 157 | // See [method@Gtk.Button.set_can_shrink]. | |
| 167 | 158 | func (x *ButtonContent) SetCanShrink(CanShrinkVar bool) { | |
| 168 | - | core.LazyRegister(&xButtonContentSetCanShrink, "ADW", "adw_button_content_set_can_shrink", false) | |
| 169 | - | ||
| 170 | 159 | xButtonContentSetCanShrink(x.GoPointer(), CanShrinkVar) | |
| 171 | 160 | } | |
| 172 | 161 | ||
| @@ -176,8 +165,6 @@ var xButtonContentSetIconName func(uintptr, string) | |||
| 176 | 165 | // | |
| 177 | 166 | // If empty, the icon is not shown. | |
| 178 | 167 | func (x *ButtonContent) SetIconName(IconNameVar string) { | |
| 179 | - | core.LazyRegister(&xButtonContentSetIconName, "ADW", "adw_button_content_set_icon_name", false) | |
| 180 | - | ||
| 181 | 168 | xButtonContentSetIconName(x.GoPointer(), IconNameVar) | |
| 182 | 169 | } | |
| 183 | 170 | ||
| @@ -185,8 +172,6 @@ var xButtonContentSetLabel func(uintptr, string) | |||
| 185 | 172 | ||
| 186 | 173 | // Sets the displayed label. | |
| 187 | 174 | func (x *ButtonContent) SetLabel(LabelVar string) { | |
| 188 | - | core.LazyRegister(&xButtonContentSetLabel, "ADW", "adw_button_content_set_label", false) | |
| 189 | - | ||
| 190 | 175 | xButtonContentSetLabel(x.GoPointer(), LabelVar) | |
| 191 | 176 | } | |
| 192 | 177 | ||
| @@ -198,8 +183,6 @@ var xButtonContentSetUseUnderline func(uintptr, bool) | |||
| 198 | 183 | // | |
| 199 | 184 | // See [property@ButtonContent:label]. | |
| 200 | 185 | func (x *ButtonContent) SetUseUnderline(UseUnderlineVar bool) { | |
| 201 | - | core.LazyRegister(&xButtonContentSetUseUnderline, "ADW", "adw_button_content_set_use_underline", false) | |
| 202 | - | ||
| 203 | 186 | xButtonContentSetUseUnderline(x.GoPointer(), UseUnderlineVar) | |
| 204 | 187 | } | |
| 205 | 188 | ||
| @@ -565,4 +548,25 @@ func (x *ButtonContent) GetBuildableId() string { | |||
| 565 | 548 | func init() { | |
| 566 | 549 | core.SetPackageName("ADW", "libadwaita-1") | |
| 567 | 550 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | |
| 551 | + | var libs []uintptr | |
| 552 | + | for _, libPath := range core.GetPaths("ADW") { | |
| 553 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 554 | + | if err != nil { | |
| 555 | + | panic(err) | |
| 556 | + | } | |
| 557 | + | libs = append(libs, lib) | |
| 558 | + | } | |
| 559 | + | ||
| 560 | + | core.PuregoSafeRegister(&xButtonContentGLibType, libs, "adw_button_content_get_type") | |
| 561 | + | ||
| 562 | + | core.PuregoSafeRegister(&xNewButtonContent, libs, "adw_button_content_new") | |
| 563 | + | ||
| 564 | + | core.PuregoSafeRegister(&xButtonContentGetCanShrink, libs, "adw_button_content_get_can_shrink") | |
| 565 | + | core.PuregoSafeRegister(&xButtonContentGetIconName, libs, "adw_button_content_get_icon_name") | |
| 566 | + | core.PuregoSafeRegister(&xButtonContentGetLabel, libs, "adw_button_content_get_label") | |
| 567 | + | core.PuregoSafeRegister(&xButtonContentGetUseUnderline, libs, "adw_button_content_get_use_underline") | |
| 568 | + | core.PuregoSafeRegister(&xButtonContentSetCanShrink, libs, "adw_button_content_set_can_shrink") | |
| 569 | + | core.PuregoSafeRegister(&xButtonContentSetIconName, libs, "adw_button_content_set_icon_name") | |
| 570 | + | core.PuregoSafeRegister(&xButtonContentSetLabel, libs, "adw_button_content_set_label") | |
| 571 | + | core.PuregoSafeRegister(&xButtonContentSetUseUnderline, libs, "adw_button_content_set_use_underline") | |
| 568 | 572 | } | |
| @@ -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/gobject" | 10 | "github.com/bnema/puregotk/v4/gobject" | ||
| 10 | "github.com/bnema/puregotk/v4/gobject/types" | 11 | "github.com/bnema/puregotk/v4/gobject/types" | ||
| @@ -89,7 +90,6 @@ type ButtonContent struct { | |||||
| 89 | var xButtonContentGLibType func() types.GType | 90 | var xButtonContentGLibType func() types.GType | ||
| 90 | 91 | ||||
| 91 | func ButtonContentGLibType() types.GType { | 92 | func ButtonContentGLibType() types.GType { | ||
| 92 | - | core.LazyRegister(&xButtonContentGLibType, "ADW", "adw_button_content_get_type", false) | |||
| 93 | return xButtonContentGLibType() | 93 | return xButtonContentGLibType() | ||
| 94 | } | 94 | } | ||
| 95 | 95 | ||||
| @@ -103,7 +103,6 @@ var xNewButtonContent func() uintptr | |||||
| 103 | 103 | ||||
| 104 | // Creates a new `AdwButtonContent`. | 104 | // Creates a new `AdwButtonContent`. | ||
| 105 | func NewButtonContent() *ButtonContent { | 105 | func NewButtonContent() *ButtonContent { | ||
| 106 | - | core.LazyRegister(&xNewButtonContent, "ADW", "adw_button_content_new", false) | |||
| 107 | var cls *ButtonContent | 106 | var cls *ButtonContent | ||
| 108 | 107 | ||||
| 109 | cret := xNewButtonContent() | 108 | cret := xNewButtonContent() | ||
| @@ -121,8 +120,6 @@ var xButtonContentGetCanShrink func(uintptr) bool | |||||
| 121 | 120 | ||||
| 122 | // gets whether the button can be smaller than the natural size of its contents. | 121 | // gets whether the button can be smaller than the natural size of its contents. | ||
| 123 | func (x *ButtonContent) GetCanShrink() bool { | 122 | func (x *ButtonContent) GetCanShrink() bool { | ||
| 124 | - | core.LazyRegister(&xButtonContentGetCanShrink, "ADW", "adw_button_content_get_can_shrink", false) | |||
| 125 | - | ||||
| 126 | cret := xButtonContentGetCanShrink(x.GoPointer()) | 123 | cret := xButtonContentGetCanShrink(x.GoPointer()) | ||
| 127 | return cret | 124 | return cret | ||
| 128 | } | 125 | } | ||
| @@ -131,8 +128,6 @@ var xButtonContentGetIconName func(uintptr) string | |||||
| 131 | 128 | ||||
| 132 | // Gets the name of the displayed icon. | 129 | // Gets the name of the displayed icon. | ||
| 133 | func (x *ButtonContent) GetIconName() string { | 130 | func (x *ButtonContent) GetIconName() string { | ||
| 134 | - | core.LazyRegister(&xButtonContentGetIconName, "ADW", "adw_button_content_get_icon_name", false) | |||
| 135 | - | ||||
| 136 | cret := xButtonContentGetIconName(x.GoPointer()) | 131 | cret := xButtonContentGetIconName(x.GoPointer()) | ||
| 137 | return cret | 132 | return cret | ||
| 138 | } | 133 | } | ||
| @@ -141,8 +136,6 @@ var xButtonContentGetLabel func(uintptr) string | |||||
| 141 | 136 | ||||
| 142 | // Gets the displayed label. | 137 | // Gets the displayed label. | ||
| 143 | func (x *ButtonContent) GetLabel() string { | 138 | func (x *ButtonContent) GetLabel() string { | ||
| 144 | - | core.LazyRegister(&xButtonContentGetLabel, "ADW", "adw_button_content_get_label", false) | |||
| 145 | - | ||||
| 146 | cret := xButtonContentGetLabel(x.GoPointer()) | 139 | cret := xButtonContentGetLabel(x.GoPointer()) | ||
| 147 | return cret | 140 | return cret | ||
| 148 | } | 141 | } | ||
| @@ -151,8 +144,6 @@ var xButtonContentGetUseUnderline func(uintptr) bool | |||||
| 151 | 144 | ||||
| 152 | // Gets whether an underline in the text indicates a mnemonic. | 145 | // Gets whether an underline in the text indicates a mnemonic. | ||
| 153 | func (x *ButtonContent) GetUseUnderline() bool { | 146 | func (x *ButtonContent) GetUseUnderline() bool { | ||
| 154 | - | core.LazyRegister(&xButtonContentGetUseUnderline, "ADW", "adw_button_content_get_use_underline", false) | |||
| 155 | - | ||||
| 156 | cret := xButtonContentGetUseUnderline(x.GoPointer()) | 147 | cret := xButtonContentGetUseUnderline(x.GoPointer()) | ||
| 157 | return cret | 148 | return cret | ||
| 158 | } | 149 | } | ||
| @@ -165,8 +156,6 @@ var xButtonContentSetCanShrink func(uintptr, bool) | |||||
| 165 | // | 156 | // | ||
| 166 | // See [method@Gtk.Button.set_can_shrink]. | 157 | // See [method@Gtk.Button.set_can_shrink]. | ||
| 167 | func (x *ButtonContent) SetCanShrink(CanShrinkVar bool) { | 158 | func (x *ButtonContent) SetCanShrink(CanShrinkVar bool) { | ||
| 168 | - | core.LazyRegister(&xButtonContentSetCanShrink, "ADW", "adw_button_content_set_can_shrink", false) | |||
| 169 | - | ||||
| 170 | xButtonContentSetCanShrink(x.GoPointer(), CanShrinkVar) | 159 | xButtonContentSetCanShrink(x.GoPointer(), CanShrinkVar) | ||
| 171 | } | 160 | } | ||
| 172 | 161 | ||||
| @@ -176,8 +165,6 @@ var xButtonContentSetIconName func(uintptr, string) | |||||
| 176 | // | 165 | // | ||
| 177 | // If empty, the icon is not shown. | 166 | // If empty, the icon is not shown. | ||
| 178 | func (x *ButtonContent) SetIconName(IconNameVar string) { | 167 | func (x *ButtonContent) SetIconName(IconNameVar string) { | ||
| 179 | - | core.LazyRegister(&xButtonContentSetIconName, "ADW", "adw_button_content_set_icon_name", false) | |||
| 180 | - | ||||
| 181 | xButtonContentSetIconName(x.GoPointer(), IconNameVar) | 168 | xButtonContentSetIconName(x.GoPointer(), IconNameVar) | ||
| 182 | } | 169 | } | ||
| 183 | 170 | ||||
| @@ -185,8 +172,6 @@ var xButtonContentSetLabel func(uintptr, string) | |||||
| 185 | 172 | ||||
| 186 | // Sets the displayed label. | 173 | // Sets the displayed label. | ||
| 187 | func (x *ButtonContent) SetLabel(LabelVar string) { | 174 | func (x *ButtonContent) SetLabel(LabelVar string) { | ||
| 188 | - | core.LazyRegister(&xButtonContentSetLabel, "ADW", "adw_button_content_set_label", false) | |||
| 189 | - | ||||
| 190 | xButtonContentSetLabel(x.GoPointer(), LabelVar) | 175 | xButtonContentSetLabel(x.GoPointer(), LabelVar) | ||
| 191 | } | 176 | } | ||
| 192 | 177 | ||||
| @@ -198,8 +183,6 @@ var xButtonContentSetUseUnderline func(uintptr, bool) | |||||
| 198 | // | 183 | // | ||
| 199 | // See [property@ButtonContent:label]. | 184 | // See [property@ButtonContent:label]. | ||
| 200 | func (x *ButtonContent) SetUseUnderline(UseUnderlineVar bool) { | 185 | func (x *ButtonContent) SetUseUnderline(UseUnderlineVar bool) { | ||
| 201 | - | core.LazyRegister(&xButtonContentSetUseUnderline, "ADW", "adw_button_content_set_use_underline", false) | |||
| 202 | - | ||||
| 203 | xButtonContentSetUseUnderline(x.GoPointer(), UseUnderlineVar) | 186 | xButtonContentSetUseUnderline(x.GoPointer(), UseUnderlineVar) | ||
| 204 | } | 187 | } | ||
| 205 | 188 | ||||
| @@ -565,4 +548,25 @@ func (x *ButtonContent) GetBuildableId() string { | |||||
| 565 | func init() { | 548 | func init() { | ||
| 566 | core.SetPackageName("ADW", "libadwaita-1") | 549 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 567 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 550 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | ||
| 551 | + | var libs []uintptr | |||
| 552 | + | for _, libPath := range core.GetPaths("ADW") { | |||
| 553 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 554 | + | if err != nil { | |||
| 555 | + | panic(err) | |||
| 556 | + | } | |||
| 557 | + | libs = append(libs, lib) | |||
| 558 | + | } | |||
| 559 | + | ||||
| 560 | + | core.PuregoSafeRegister(&xButtonContentGLibType, libs, "adw_button_content_get_type") | |||
| 561 | + | ||||
| 562 | + | core.PuregoSafeRegister(&xNewButtonContent, libs, "adw_button_content_new") | |||
| 563 | + | ||||
| 564 | + | core.PuregoSafeRegister(&xButtonContentGetCanShrink, libs, "adw_button_content_get_can_shrink") | |||
| 565 | + | core.PuregoSafeRegister(&xButtonContentGetIconName, libs, "adw_button_content_get_icon_name") | |||
| 566 | + | core.PuregoSafeRegister(&xButtonContentGetLabel, libs, "adw_button_content_get_label") | |||
| 567 | + | core.PuregoSafeRegister(&xButtonContentGetUseUnderline, libs, "adw_button_content_get_use_underline") | |||
| 568 | + | core.PuregoSafeRegister(&xButtonContentSetCanShrink, libs, "adw_button_content_set_can_shrink") | |||
| 569 | + | core.PuregoSafeRegister(&xButtonContentSetIconName, libs, "adw_button_content_set_icon_name") | |||
| 570 | + | core.PuregoSafeRegister(&xButtonContentSetLabel, libs, "adw_button_content_set_label") | |||
| 571 | + | core.PuregoSafeRegister(&xButtonContentSetUseUnderline, libs, "adw_button_content_set_use_underline") | |||
| 568 | } | 572 | } | ||