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
| @@ -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" | |
| @@ -90,6 +89,7 @@ type ButtonContent struct { | |||
| 90 | 89 | var xButtonContentGLibType func() types.GType | |
| 91 | 90 | ||
| 92 | 91 | func ButtonContentGLibType() types.GType { | |
| 92 | + | core.LazyRegister(&xButtonContentGLibType, "ADW", "adw_button_content_get_type", false) | |
| 93 | 93 | return xButtonContentGLibType() | |
| 94 | 94 | } | |
| 95 | 95 | ||
| @@ -103,6 +103,7 @@ 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) | |
| 106 | 107 | var cls *ButtonContent | |
| 107 | 108 | ||
| 108 | 109 | cret := xNewButtonContent() | |
| @@ -120,6 +121,8 @@ var xButtonContentGetCanShrink func(uintptr) bool | |||
| 120 | 121 | ||
| 121 | 122 | // gets whether the button can be smaller than the natural size of its contents. | |
| 122 | 123 | func (x *ButtonContent) GetCanShrink() bool { | |
| 124 | + | core.LazyRegister(&xButtonContentGetCanShrink, "ADW", "adw_button_content_get_can_shrink", false) | |
| 125 | + | ||
| 123 | 126 | cret := xButtonContentGetCanShrink(x.GoPointer()) | |
| 124 | 127 | return cret | |
| 125 | 128 | } | |
| @@ -128,6 +131,8 @@ var xButtonContentGetIconName func(uintptr) string | |||
| 128 | 131 | ||
| 129 | 132 | // Gets the name of the displayed icon. | |
| 130 | 133 | func (x *ButtonContent) GetIconName() string { | |
| 134 | + | core.LazyRegister(&xButtonContentGetIconName, "ADW", "adw_button_content_get_icon_name", false) | |
| 135 | + | ||
| 131 | 136 | cret := xButtonContentGetIconName(x.GoPointer()) | |
| 132 | 137 | return cret | |
| 133 | 138 | } | |
| @@ -136,6 +141,8 @@ var xButtonContentGetLabel func(uintptr) string | |||
| 136 | 141 | ||
| 137 | 142 | // Gets the displayed label. | |
| 138 | 143 | func (x *ButtonContent) GetLabel() string { | |
| 144 | + | core.LazyRegister(&xButtonContentGetLabel, "ADW", "adw_button_content_get_label", false) | |
| 145 | + | ||
| 139 | 146 | cret := xButtonContentGetLabel(x.GoPointer()) | |
| 140 | 147 | return cret | |
| 141 | 148 | } | |
| @@ -144,6 +151,8 @@ var xButtonContentGetUseUnderline func(uintptr) bool | |||
| 144 | 151 | ||
| 145 | 152 | // Gets whether an underline in the text indicates a mnemonic. | |
| 146 | 153 | func (x *ButtonContent) GetUseUnderline() bool { | |
| 154 | + | core.LazyRegister(&xButtonContentGetUseUnderline, "ADW", "adw_button_content_get_use_underline", false) | |
| 155 | + | ||
| 147 | 156 | cret := xButtonContentGetUseUnderline(x.GoPointer()) | |
| 148 | 157 | return cret | |
| 149 | 158 | } | |
| @@ -156,6 +165,8 @@ var xButtonContentSetCanShrink func(uintptr, bool) | |||
| 156 | 165 | // | |
| 157 | 166 | // See [method@Gtk.Button.set_can_shrink]. | |
| 158 | 167 | func (x *ButtonContent) SetCanShrink(CanShrinkVar bool) { | |
| 168 | + | core.LazyRegister(&xButtonContentSetCanShrink, "ADW", "adw_button_content_set_can_shrink", false) | |
| 169 | + | ||
| 159 | 170 | xButtonContentSetCanShrink(x.GoPointer(), CanShrinkVar) | |
| 160 | 171 | } | |
| 161 | 172 | ||
| @@ -165,6 +176,8 @@ var xButtonContentSetIconName func(uintptr, string) | |||
| 165 | 176 | // | |
| 166 | 177 | // If empty, the icon is not shown. | |
| 167 | 178 | func (x *ButtonContent) SetIconName(IconNameVar string) { | |
| 179 | + | core.LazyRegister(&xButtonContentSetIconName, "ADW", "adw_button_content_set_icon_name", false) | |
| 180 | + | ||
| 168 | 181 | xButtonContentSetIconName(x.GoPointer(), IconNameVar) | |
| 169 | 182 | } | |
| 170 | 183 | ||
| @@ -172,6 +185,8 @@ var xButtonContentSetLabel func(uintptr, string) | |||
| 172 | 185 | ||
| 173 | 186 | // Sets the displayed label. | |
| 174 | 187 | func (x *ButtonContent) SetLabel(LabelVar string) { | |
| 188 | + | core.LazyRegister(&xButtonContentSetLabel, "ADW", "adw_button_content_set_label", false) | |
| 189 | + | ||
| 175 | 190 | xButtonContentSetLabel(x.GoPointer(), LabelVar) | |
| 176 | 191 | } | |
| 177 | 192 | ||
| @@ -183,6 +198,8 @@ var xButtonContentSetUseUnderline func(uintptr, bool) | |||
| 183 | 198 | // | |
| 184 | 199 | // See [property@ButtonContent:label]. | |
| 185 | 200 | func (x *ButtonContent) SetUseUnderline(UseUnderlineVar bool) { | |
| 201 | + | core.LazyRegister(&xButtonContentSetUseUnderline, "ADW", "adw_button_content_set_use_underline", false) | |
| 202 | + | ||
| 186 | 203 | xButtonContentSetUseUnderline(x.GoPointer(), UseUnderlineVar) | |
| 187 | 204 | } | |
| 188 | 205 | ||
| @@ -548,25 +565,4 @@ func (x *ButtonContent) GetBuildableId() string { | |||
| 548 | 565 | func init() { | |
| 549 | 566 | core.SetPackageName("ADW", "libadwaita-1") | |
| 550 | 567 | 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") | |
| 572 | 568 | } | |
| @@ -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" | ||
| @@ -90,6 +89,7 @@ type ButtonContent struct { | |||||
| 90 | var xButtonContentGLibType func() types.GType | 89 | var xButtonContentGLibType func() types.GType | ||
| 91 | 90 | ||||
| 92 | func ButtonContentGLibType() types.GType { | 91 | 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,6 +103,7 @@ 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) | |||
| 106 | var cls *ButtonContent | 107 | var cls *ButtonContent | ||
| 107 | 108 | ||||
| 108 | cret := xNewButtonContent() | 109 | cret := xNewButtonContent() | ||
| @@ -120,6 +121,8 @@ var xButtonContentGetCanShrink func(uintptr) bool | |||||
| 120 | 121 | ||||
| 121 | // gets whether the button can be smaller than the natural size of its contents. | 122 | // gets whether the button can be smaller than the natural size of its contents. | ||
| 122 | func (x *ButtonContent) GetCanShrink() bool { | 123 | func (x *ButtonContent) GetCanShrink() bool { | ||
| 124 | + | core.LazyRegister(&xButtonContentGetCanShrink, "ADW", "adw_button_content_get_can_shrink", false) | |||
| 125 | + | ||||
| 123 | cret := xButtonContentGetCanShrink(x.GoPointer()) | 126 | cret := xButtonContentGetCanShrink(x.GoPointer()) | ||
| 124 | return cret | 127 | return cret | ||
| 125 | } | 128 | } | ||
| @@ -128,6 +131,8 @@ var xButtonContentGetIconName func(uintptr) string | |||||
| 128 | 131 | ||||
| 129 | // Gets the name of the displayed icon. | 132 | // Gets the name of the displayed icon. | ||
| 130 | func (x *ButtonContent) GetIconName() string { | 133 | func (x *ButtonContent) GetIconName() string { | ||
| 134 | + | core.LazyRegister(&xButtonContentGetIconName, "ADW", "adw_button_content_get_icon_name", false) | |||
| 135 | + | ||||
| 131 | cret := xButtonContentGetIconName(x.GoPointer()) | 136 | cret := xButtonContentGetIconName(x.GoPointer()) | ||
| 132 | return cret | 137 | return cret | ||
| 133 | } | 138 | } | ||
| @@ -136,6 +141,8 @@ var xButtonContentGetLabel func(uintptr) string | |||||
| 136 | 141 | ||||
| 137 | // Gets the displayed label. | 142 | // Gets the displayed label. | ||
| 138 | func (x *ButtonContent) GetLabel() string { | 143 | func (x *ButtonContent) GetLabel() string { | ||
| 144 | + | core.LazyRegister(&xButtonContentGetLabel, "ADW", "adw_button_content_get_label", false) | |||
| 145 | + | ||||
| 139 | cret := xButtonContentGetLabel(x.GoPointer()) | 146 | cret := xButtonContentGetLabel(x.GoPointer()) | ||
| 140 | return cret | 147 | return cret | ||
| 141 | } | 148 | } | ||
| @@ -144,6 +151,8 @@ var xButtonContentGetUseUnderline func(uintptr) bool | |||||
| 144 | 151 | ||||
| 145 | // Gets whether an underline in the text indicates a mnemonic. | 152 | // Gets whether an underline in the text indicates a mnemonic. | ||
| 146 | func (x *ButtonContent) GetUseUnderline() bool { | 153 | func (x *ButtonContent) GetUseUnderline() bool { | ||
| 154 | + | core.LazyRegister(&xButtonContentGetUseUnderline, "ADW", "adw_button_content_get_use_underline", false) | |||
| 155 | + | ||||
| 147 | cret := xButtonContentGetUseUnderline(x.GoPointer()) | 156 | cret := xButtonContentGetUseUnderline(x.GoPointer()) | ||
| 148 | return cret | 157 | return cret | ||
| 149 | } | 158 | } | ||
| @@ -156,6 +165,8 @@ var xButtonContentSetCanShrink func(uintptr, bool) | |||||
| 156 | // | 165 | // | ||
| 157 | // See [method@Gtk.Button.set_can_shrink]. | 166 | // See [method@Gtk.Button.set_can_shrink]. | ||
| 158 | func (x *ButtonContent) SetCanShrink(CanShrinkVar bool) { | 167 | func (x *ButtonContent) SetCanShrink(CanShrinkVar bool) { | ||
| 168 | + | core.LazyRegister(&xButtonContentSetCanShrink, "ADW", "adw_button_content_set_can_shrink", false) | |||
| 169 | + | ||||
| 159 | xButtonContentSetCanShrink(x.GoPointer(), CanShrinkVar) | 170 | xButtonContentSetCanShrink(x.GoPointer(), CanShrinkVar) | ||
| 160 | } | 171 | } | ||
| 161 | 172 | ||||
| @@ -165,6 +176,8 @@ var xButtonContentSetIconName func(uintptr, string) | |||||
| 165 | // | 176 | // | ||
| 166 | // If empty, the icon is not shown. | 177 | // If empty, the icon is not shown. | ||
| 167 | func (x *ButtonContent) SetIconName(IconNameVar string) { | 178 | func (x *ButtonContent) SetIconName(IconNameVar string) { | ||
| 179 | + | core.LazyRegister(&xButtonContentSetIconName, "ADW", "adw_button_content_set_icon_name", false) | |||
| 180 | + | ||||
| 168 | xButtonContentSetIconName(x.GoPointer(), IconNameVar) | 181 | xButtonContentSetIconName(x.GoPointer(), IconNameVar) | ||
| 169 | } | 182 | } | ||
| 170 | 183 | ||||
| @@ -172,6 +185,8 @@ var xButtonContentSetLabel func(uintptr, string) | |||||
| 172 | 185 | ||||
| 173 | // Sets the displayed label. | 186 | // Sets the displayed label. | ||
| 174 | func (x *ButtonContent) SetLabel(LabelVar string) { | 187 | func (x *ButtonContent) SetLabel(LabelVar string) { | ||
| 188 | + | core.LazyRegister(&xButtonContentSetLabel, "ADW", "adw_button_content_set_label", false) | |||
| 189 | + | ||||
| 175 | xButtonContentSetLabel(x.GoPointer(), LabelVar) | 190 | xButtonContentSetLabel(x.GoPointer(), LabelVar) | ||
| 176 | } | 191 | } | ||
| 177 | 192 | ||||
| @@ -183,6 +198,8 @@ var xButtonContentSetUseUnderline func(uintptr, bool) | |||||
| 183 | // | 198 | // | ||
| 184 | // See [property@ButtonContent:label]. | 199 | // See [property@ButtonContent:label]. | ||
| 185 | func (x *ButtonContent) SetUseUnderline(UseUnderlineVar bool) { | 200 | func (x *ButtonContent) SetUseUnderline(UseUnderlineVar bool) { | ||
| 201 | + | core.LazyRegister(&xButtonContentSetUseUnderline, "ADW", "adw_button_content_set_use_underline", false) | |||
| 202 | + | ||||
| 186 | xButtonContentSetUseUnderline(x.GoPointer(), UseUnderlineVar) | 203 | xButtonContentSetUseUnderline(x.GoPointer(), UseUnderlineVar) | ||
| 187 | } | 204 | } | ||
| 188 | 205 | ||||
| @@ -548,25 +565,4 @@ func (x *ButtonContent) GetBuildableId() string { | |||||
| 548 | func init() { | 565 | func init() { | ||
| 549 | core.SetPackageName("ADW", "libadwaita-1") | 566 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 550 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 567 | 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") | |||
| 572 | } | 568 | } | ||