fix(deps): repin puregotk lazy registration fix
- commit
- d685b6e820d6baba0d0dea254169664012ed203d
- author
- brice · · 2026-07-14 18:24 UTC
- parent
- ec6db2e
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
907 files · +27874 -25294
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.20260714181430-679a9ed72959 | |
| 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.20260714181430-679a9ed72959 |
| 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 -16 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
| @@ -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/gdk" | |
| 11 | 10 | "github.com/bnema/puregotk/v4/gobject" | |
| @@ -67,6 +66,7 @@ type Avatar struct { | |||
| 67 | 66 | var xAvatarGLibType func() types.GType | |
| 68 | 67 | ||
| 69 | 68 | func AvatarGLibType() types.GType { | |
| 69 | + | core.LazyRegister(&xAvatarGLibType, "ADW", "adw_avatar_get_type", false) | |
| 70 | 70 | return xAvatarGLibType() | |
| 71 | 71 | } | |
| 72 | 72 | ||
| @@ -80,6 +80,7 @@ var xNewAvatar func(int, uintptr, bool) uintptr | |||
| 80 | 80 | ||
| 81 | 81 | // Creates a new `AdwAvatar`. | |
| 82 | 82 | func NewAvatar(SizeVar int, TextVar *string, ShowInitialsVar bool) *Avatar { | |
| 83 | + | core.LazyRegister(&xNewAvatar, "ADW", "adw_avatar_new", false) | |
| 83 | 84 | var cls *Avatar | |
| 84 | 85 | ||
| 85 | 86 | TextVarPtr := core.GStrdupNullable(TextVar) | |
| @@ -102,6 +103,7 @@ var xAvatarDrawToTexture func(uintptr, int) uintptr | |||
| 102 | 103 | // | |
| 103 | 104 | // This can be used to export the fallback avatar. | |
| 104 | 105 | func (x *Avatar) DrawToTexture(ScaleFactorVar int) *gdk.Texture { | |
| 106 | + | core.LazyRegister(&xAvatarDrawToTexture, "ADW", "adw_avatar_draw_to_texture", false) | |
| 105 | 107 | var cls *gdk.Texture | |
| 106 | 108 | ||
| 107 | 109 | cret := xAvatarDrawToTexture(x.GoPointer(), ScaleFactorVar) | |
| @@ -118,6 +120,7 @@ var xAvatarGetCustomImage func(uintptr) uintptr | |||
| 118 | 120 | ||
| 119 | 121 | // Gets the custom image paintable. | |
| 120 | 122 | func (x *Avatar) GetCustomImage() *gdk.PaintableBase { | |
| 123 | + | core.LazyRegister(&xAvatarGetCustomImage, "ADW", "adw_avatar_get_custom_image", false) | |
| 121 | 124 | var cls *gdk.PaintableBase | |
| 122 | 125 | ||
| 123 | 126 | cret := xAvatarGetCustomImage(x.GoPointer()) | |
| @@ -135,6 +138,8 @@ var xAvatarGetIconName func(uintptr) string | |||
| 135 | 138 | ||
| 136 | 139 | // Gets the name of an icon to use as a fallback. | |
| 137 | 140 | func (x *Avatar) GetIconName() string { | |
| 141 | + | core.LazyRegister(&xAvatarGetIconName, "ADW", "adw_avatar_get_icon_name", false) | |
| 142 | + | ||
| 138 | 143 | cret := xAvatarGetIconName(x.GoPointer()) | |
| 139 | 144 | return cret | |
| 140 | 145 | } | |
| @@ -143,6 +148,8 @@ var xAvatarGetShowInitials func(uintptr) bool | |||
| 143 | 148 | ||
| 144 | 149 | // Gets whether initials are used instead of an icon on the fallback avatar. | |
| 145 | 150 | func (x *Avatar) GetShowInitials() bool { | |
| 151 | + | core.LazyRegister(&xAvatarGetShowInitials, "ADW", "adw_avatar_get_show_initials", false) | |
| 152 | + | ||
| 146 | 153 | cret := xAvatarGetShowInitials(x.GoPointer()) | |
| 147 | 154 | return cret | |
| 148 | 155 | } | |
| @@ -151,6 +158,8 @@ var xAvatarGetSize func(uintptr) int | |||
| 151 | 158 | ||
| 152 | 159 | // Gets the size of the avatar. | |
| 153 | 160 | func (x *Avatar) GetSize() int { | |
| 161 | + | core.LazyRegister(&xAvatarGetSize, "ADW", "adw_avatar_get_size", false) | |
| 162 | + | ||
| 154 | 163 | cret := xAvatarGetSize(x.GoPointer()) | |
| 155 | 164 | return cret | |
| 156 | 165 | } | |
| @@ -159,6 +168,8 @@ var xAvatarGetText func(uintptr) string | |||
| 159 | 168 | ||
| 160 | 169 | // Gets the text used to generate the fallback initials and color. | |
| 161 | 170 | func (x *Avatar) GetText() string { | |
| 171 | + | core.LazyRegister(&xAvatarGetText, "ADW", "adw_avatar_get_text", false) | |
| 172 | + | ||
| 162 | 173 | cret := xAvatarGetText(x.GoPointer()) | |
| 163 | 174 | return cret | |
| 164 | 175 | } | |
| @@ -169,6 +180,8 @@ var xAvatarSetCustomImage func(uintptr, uintptr) | |||
| 169 | 180 | // | |
| 170 | 181 | // Custom image is displayed instead of initials or icon. | |
| 171 | 182 | func (x *Avatar) SetCustomImage(CustomImageVar gdk.Paintable) { | |
| 183 | + | core.LazyRegister(&xAvatarSetCustomImage, "ADW", "adw_avatar_set_custom_image", false) | |
| 184 | + | ||
| 172 | 185 | xAvatarSetCustomImage(x.GoPointer(), CustomImageVar.GoPointer()) | |
| 173 | 186 | } | |
| 174 | 187 | ||
| @@ -178,6 +191,8 @@ var xAvatarSetIconName func(uintptr, uintptr) | |||
| 178 | 191 | // | |
| 179 | 192 | // If no name is set, `adw-avatar-default-symbolic` will be used. | |
| 180 | 193 | func (x *Avatar) SetIconName(IconNameVar *string) { | |
| 194 | + | core.LazyRegister(&xAvatarSetIconName, "ADW", "adw_avatar_set_icon_name", false) | |
| 195 | + | ||
| 181 | 196 | IconNameVarPtr := core.GStrdupNullable(IconNameVar) | |
| 182 | 197 | defer core.GFreeNullable(IconNameVarPtr) | |
| 183 | 198 | ||
| @@ -190,6 +205,8 @@ var xAvatarSetShowInitials func(uintptr, bool) | |||
| 190 | 205 | // | |
| 191 | 206 | // See [property@Avatar:icon-name] for how to change the fallback icon. | |
| 192 | 207 | func (x *Avatar) SetShowInitials(ShowInitialsVar bool) { | |
| 208 | + | core.LazyRegister(&xAvatarSetShowInitials, "ADW", "adw_avatar_set_show_initials", false) | |
| 209 | + | ||
| 193 | 210 | xAvatarSetShowInitials(x.GoPointer(), ShowInitialsVar) | |
| 194 | 211 | } | |
| 195 | 212 | ||
| @@ -197,6 +214,8 @@ var xAvatarSetSize func(uintptr, int) | |||
| 197 | 214 | ||
| 198 | 215 | // Sets the size of the avatar. | |
| 199 | 216 | func (x *Avatar) SetSize(SizeVar int) { | |
| 217 | + | core.LazyRegister(&xAvatarSetSize, "ADW", "adw_avatar_set_size", false) | |
| 218 | + | ||
| 200 | 219 | xAvatarSetSize(x.GoPointer(), SizeVar) | |
| 201 | 220 | } | |
| 202 | 221 | ||
| @@ -207,6 +226,8 @@ var xAvatarSetText func(uintptr, uintptr) | |||
| 207 | 226 | // It's only used to generate the color if [property@Avatar:show-initials] is | |
| 208 | 227 | // `FALSE`. | |
| 209 | 228 | func (x *Avatar) SetText(TextVar *string) { | |
| 229 | + | core.LazyRegister(&xAvatarSetText, "ADW", "adw_avatar_set_text", false) | |
| 230 | + | ||
| 210 | 231 | TextVarPtr := core.GStrdupNullable(TextVar) | |
| 211 | 232 | defer core.GFreeNullable(TextVarPtr) | |
| 212 | 233 | ||
| @@ -569,28 +590,4 @@ func (x *Avatar) GetBuildableId() string { | |||
| 569 | 590 | func init() { | |
| 570 | 591 | core.SetPackageName("ADW", "libadwaita-1") | |
| 571 | 592 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | |
| 572 | - | var libs []uintptr | |
| 573 | - | for _, libPath := range core.GetPaths("ADW") { | |
| 574 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 575 | - | if err != nil { | |
| 576 | - | panic(err) | |
| 577 | - | } | |
| 578 | - | libs = append(libs, lib) | |
| 579 | - | } | |
| 580 | - | ||
| 581 | - | core.PuregoSafeRegister(&xAvatarGLibType, libs, "adw_avatar_get_type") | |
| 582 | - | ||
| 583 | - | core.PuregoSafeRegister(&xNewAvatar, libs, "adw_avatar_new") | |
| 584 | - | ||
| 585 | - | core.PuregoSafeRegister(&xAvatarDrawToTexture, libs, "adw_avatar_draw_to_texture") | |
| 586 | - | core.PuregoSafeRegister(&xAvatarGetCustomImage, libs, "adw_avatar_get_custom_image") | |
| 587 | - | core.PuregoSafeRegister(&xAvatarGetIconName, libs, "adw_avatar_get_icon_name") | |
| 588 | - | core.PuregoSafeRegister(&xAvatarGetShowInitials, libs, "adw_avatar_get_show_initials") | |
| 589 | - | core.PuregoSafeRegister(&xAvatarGetSize, libs, "adw_avatar_get_size") | |
| 590 | - | core.PuregoSafeRegister(&xAvatarGetText, libs, "adw_avatar_get_text") | |
| 591 | - | core.PuregoSafeRegister(&xAvatarSetCustomImage, libs, "adw_avatar_set_custom_image") | |
| 592 | - | core.PuregoSafeRegister(&xAvatarSetIconName, libs, "adw_avatar_set_icon_name") | |
| 593 | - | core.PuregoSafeRegister(&xAvatarSetShowInitials, libs, "adw_avatar_set_show_initials") | |
| 594 | - | core.PuregoSafeRegister(&xAvatarSetSize, libs, "adw_avatar_set_size") | |
| 595 | - | core.PuregoSafeRegister(&xAvatarSetText, libs, "adw_avatar_set_text") | |
| 596 | 593 | } | |
| @@ -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/gdk" | 9 | "github.com/bnema/puregotk/v4/gdk" | ||
| 11 | "github.com/bnema/puregotk/v4/gobject" | 10 | "github.com/bnema/puregotk/v4/gobject" | ||
| @@ -67,6 +66,7 @@ type Avatar struct { | |||||
| 67 | var xAvatarGLibType func() types.GType | 66 | var xAvatarGLibType func() types.GType | ||
| 68 | 67 | ||||
| 69 | func AvatarGLibType() types.GType { | 68 | func AvatarGLibType() types.GType { | ||
| 69 | + | core.LazyRegister(&xAvatarGLibType, "ADW", "adw_avatar_get_type", false) | |||
| 70 | return xAvatarGLibType() | 70 | return xAvatarGLibType() | ||
| 71 | } | 71 | } | ||
| 72 | 72 | ||||
| @@ -80,6 +80,7 @@ var xNewAvatar func(int, uintptr, bool) uintptr | |||||
| 80 | 80 | ||||
| 81 | // Creates a new `AdwAvatar`. | 81 | // Creates a new `AdwAvatar`. | ||
| 82 | func NewAvatar(SizeVar int, TextVar *string, ShowInitialsVar bool) *Avatar { | 82 | func NewAvatar(SizeVar int, TextVar *string, ShowInitialsVar bool) *Avatar { | ||
| 83 | + | core.LazyRegister(&xNewAvatar, "ADW", "adw_avatar_new", false) | |||
| 83 | var cls *Avatar | 84 | var cls *Avatar | ||
| 84 | 85 | ||||
| 85 | TextVarPtr := core.GStrdupNullable(TextVar) | 86 | TextVarPtr := core.GStrdupNullable(TextVar) | ||
| @@ -102,6 +103,7 @@ var xAvatarDrawToTexture func(uintptr, int) uintptr | |||||
| 102 | // | 103 | // | ||
| 103 | // This can be used to export the fallback avatar. | 104 | // This can be used to export the fallback avatar. | ||
| 104 | func (x *Avatar) DrawToTexture(ScaleFactorVar int) *gdk.Texture { | 105 | func (x *Avatar) DrawToTexture(ScaleFactorVar int) *gdk.Texture { | ||
| 106 | + | core.LazyRegister(&xAvatarDrawToTexture, "ADW", "adw_avatar_draw_to_texture", false) | |||
| 105 | var cls *gdk.Texture | 107 | var cls *gdk.Texture | ||
| 106 | 108 | ||||
| 107 | cret := xAvatarDrawToTexture(x.GoPointer(), ScaleFactorVar) | 109 | cret := xAvatarDrawToTexture(x.GoPointer(), ScaleFactorVar) | ||
| @@ -118,6 +120,7 @@ var xAvatarGetCustomImage func(uintptr) uintptr | |||||
| 118 | 120 | ||||
| 119 | // Gets the custom image paintable. | 121 | // Gets the custom image paintable. | ||
| 120 | func (x *Avatar) GetCustomImage() *gdk.PaintableBase { | 122 | func (x *Avatar) GetCustomImage() *gdk.PaintableBase { | ||
| 123 | + | core.LazyRegister(&xAvatarGetCustomImage, "ADW", "adw_avatar_get_custom_image", false) | |||
| 121 | var cls *gdk.PaintableBase | 124 | var cls *gdk.PaintableBase | ||
| 122 | 125 | ||||
| 123 | cret := xAvatarGetCustomImage(x.GoPointer()) | 126 | cret := xAvatarGetCustomImage(x.GoPointer()) | ||
| @@ -135,6 +138,8 @@ var xAvatarGetIconName func(uintptr) string | |||||
| 135 | 138 | ||||
| 136 | // Gets the name of an icon to use as a fallback. | 139 | // Gets the name of an icon to use as a fallback. | ||
| 137 | func (x *Avatar) GetIconName() string { | 140 | func (x *Avatar) GetIconName() string { | ||
| 141 | + | core.LazyRegister(&xAvatarGetIconName, "ADW", "adw_avatar_get_icon_name", false) | |||
| 142 | + | ||||
| 138 | cret := xAvatarGetIconName(x.GoPointer()) | 143 | cret := xAvatarGetIconName(x.GoPointer()) | ||
| 139 | return cret | 144 | return cret | ||
| 140 | } | 145 | } | ||
| @@ -143,6 +148,8 @@ var xAvatarGetShowInitials func(uintptr) bool | |||||
| 143 | 148 | ||||
| 144 | // Gets whether initials are used instead of an icon on the fallback avatar. | 149 | // Gets whether initials are used instead of an icon on the fallback avatar. | ||
| 145 | func (x *Avatar) GetShowInitials() bool { | 150 | func (x *Avatar) GetShowInitials() bool { | ||
| 151 | + | core.LazyRegister(&xAvatarGetShowInitials, "ADW", "adw_avatar_get_show_initials", false) | |||
| 152 | + | ||||
| 146 | cret := xAvatarGetShowInitials(x.GoPointer()) | 153 | cret := xAvatarGetShowInitials(x.GoPointer()) | ||
| 147 | return cret | 154 | return cret | ||
| 148 | } | 155 | } | ||
| @@ -151,6 +158,8 @@ var xAvatarGetSize func(uintptr) int | |||||
| 151 | 158 | ||||
| 152 | // Gets the size of the avatar. | 159 | // Gets the size of the avatar. | ||
| 153 | func (x *Avatar) GetSize() int { | 160 | func (x *Avatar) GetSize() int { | ||
| 161 | + | core.LazyRegister(&xAvatarGetSize, "ADW", "adw_avatar_get_size", false) | |||
| 162 | + | ||||
| 154 | cret := xAvatarGetSize(x.GoPointer()) | 163 | cret := xAvatarGetSize(x.GoPointer()) | ||
| 155 | return cret | 164 | return cret | ||
| 156 | } | 165 | } | ||
| @@ -159,6 +168,8 @@ var xAvatarGetText func(uintptr) string | |||||
| 159 | 168 | ||||
| 160 | // Gets the text used to generate the fallback initials and color. | 169 | // Gets the text used to generate the fallback initials and color. | ||
| 161 | func (x *Avatar) GetText() string { | 170 | func (x *Avatar) GetText() string { | ||
| 171 | + | core.LazyRegister(&xAvatarGetText, "ADW", "adw_avatar_get_text", false) | |||
| 172 | + | ||||
| 162 | cret := xAvatarGetText(x.GoPointer()) | 173 | cret := xAvatarGetText(x.GoPointer()) | ||
| 163 | return cret | 174 | return cret | ||
| 164 | } | 175 | } | ||
| @@ -169,6 +180,8 @@ var xAvatarSetCustomImage func(uintptr, uintptr) | |||||
| 169 | // | 180 | // | ||
| 170 | // Custom image is displayed instead of initials or icon. | 181 | // Custom image is displayed instead of initials or icon. | ||
| 171 | func (x *Avatar) SetCustomImage(CustomImageVar gdk.Paintable) { | 182 | func (x *Avatar) SetCustomImage(CustomImageVar gdk.Paintable) { | ||
| 183 | + | core.LazyRegister(&xAvatarSetCustomImage, "ADW", "adw_avatar_set_custom_image", false) | |||
| 184 | + | ||||
| 172 | xAvatarSetCustomImage(x.GoPointer(), CustomImageVar.GoPointer()) | 185 | xAvatarSetCustomImage(x.GoPointer(), CustomImageVar.GoPointer()) | ||
| 173 | } | 186 | } | ||
| 174 | 187 | ||||
| @@ -178,6 +191,8 @@ var xAvatarSetIconName func(uintptr, uintptr) | |||||
| 178 | // | 191 | // | ||
| 179 | // If no name is set, `adw-avatar-default-symbolic` will be used. | 192 | // If no name is set, `adw-avatar-default-symbolic` will be used. | ||
| 180 | func (x *Avatar) SetIconName(IconNameVar *string) { | 193 | func (x *Avatar) SetIconName(IconNameVar *string) { | ||
| 194 | + | core.LazyRegister(&xAvatarSetIconName, "ADW", "adw_avatar_set_icon_name", false) | |||
| 195 | + | ||||
| 181 | IconNameVarPtr := core.GStrdupNullable(IconNameVar) | 196 | IconNameVarPtr := core.GStrdupNullable(IconNameVar) | ||
| 182 | defer core.GFreeNullable(IconNameVarPtr) | 197 | defer core.GFreeNullable(IconNameVarPtr) | ||
| 183 | 198 | ||||
| @@ -190,6 +205,8 @@ var xAvatarSetShowInitials func(uintptr, bool) | |||||
| 190 | // | 205 | // | ||
| 191 | // See [property@Avatar:icon-name] for how to change the fallback icon. | 206 | // See [property@Avatar:icon-name] for how to change the fallback icon. | ||
| 192 | func (x *Avatar) SetShowInitials(ShowInitialsVar bool) { | 207 | func (x *Avatar) SetShowInitials(ShowInitialsVar bool) { | ||
| 208 | + | core.LazyRegister(&xAvatarSetShowInitials, "ADW", "adw_avatar_set_show_initials", false) | |||
| 209 | + | ||||
| 193 | xAvatarSetShowInitials(x.GoPointer(), ShowInitialsVar) | 210 | xAvatarSetShowInitials(x.GoPointer(), ShowInitialsVar) | ||
| 194 | } | 211 | } | ||
| 195 | 212 | ||||
| @@ -197,6 +214,8 @@ var xAvatarSetSize func(uintptr, int) | |||||
| 197 | 214 | ||||
| 198 | // Sets the size of the avatar. | 215 | // Sets the size of the avatar. | ||
| 199 | func (x *Avatar) SetSize(SizeVar int) { | 216 | func (x *Avatar) SetSize(SizeVar int) { | ||
| 217 | + | core.LazyRegister(&xAvatarSetSize, "ADW", "adw_avatar_set_size", false) | |||
| 218 | + | ||||
| 200 | xAvatarSetSize(x.GoPointer(), SizeVar) | 219 | xAvatarSetSize(x.GoPointer(), SizeVar) | ||
| 201 | } | 220 | } | ||
| 202 | 221 | ||||
| @@ -207,6 +226,8 @@ var xAvatarSetText func(uintptr, uintptr) | |||||
| 207 | // It's only used to generate the color if [property@Avatar:show-initials] is | 226 | // It's only used to generate the color if [property@Avatar:show-initials] is | ||
| 208 | // `FALSE`. | 227 | // `FALSE`. | ||
| 209 | func (x *Avatar) SetText(TextVar *string) { | 228 | func (x *Avatar) SetText(TextVar *string) { | ||
| 229 | + | core.LazyRegister(&xAvatarSetText, "ADW", "adw_avatar_set_text", false) | |||
| 230 | + | ||||
| 210 | TextVarPtr := core.GStrdupNullable(TextVar) | 231 | TextVarPtr := core.GStrdupNullable(TextVar) | ||
| 211 | defer core.GFreeNullable(TextVarPtr) | 232 | defer core.GFreeNullable(TextVarPtr) | ||
| 212 | 233 | ||||
| @@ -569,28 +590,4 @@ func (x *Avatar) GetBuildableId() string { | |||||
| 569 | func init() { | 590 | func init() { | ||
| 570 | core.SetPackageName("ADW", "libadwaita-1") | 591 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 571 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 592 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | ||
| 572 | - | var libs []uintptr | |||
| 573 | - | for _, libPath := range core.GetPaths("ADW") { | |||
| 574 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 575 | - | if err != nil { | |||
| 576 | - | panic(err) | |||
| 577 | - | } | |||
| 578 | - | libs = append(libs, lib) | |||
| 579 | - | } | |||
| 580 | - | ||||
| 581 | - | core.PuregoSafeRegister(&xAvatarGLibType, libs, "adw_avatar_get_type") | |||
| 582 | - | ||||
| 583 | - | core.PuregoSafeRegister(&xNewAvatar, libs, "adw_avatar_new") | |||
| 584 | - | ||||
| 585 | - | core.PuregoSafeRegister(&xAvatarDrawToTexture, libs, "adw_avatar_draw_to_texture") | |||
| 586 | - | core.PuregoSafeRegister(&xAvatarGetCustomImage, libs, "adw_avatar_get_custom_image") | |||
| 587 | - | core.PuregoSafeRegister(&xAvatarGetIconName, libs, "adw_avatar_get_icon_name") | |||
| 588 | - | core.PuregoSafeRegister(&xAvatarGetShowInitials, libs, "adw_avatar_get_show_initials") | |||
| 589 | - | core.PuregoSafeRegister(&xAvatarGetSize, libs, "adw_avatar_get_size") | |||
| 590 | - | core.PuregoSafeRegister(&xAvatarGetText, libs, "adw_avatar_get_text") | |||
| 591 | - | core.PuregoSafeRegister(&xAvatarSetCustomImage, libs, "adw_avatar_set_custom_image") | |||
| 592 | - | core.PuregoSafeRegister(&xAvatarSetIconName, libs, "adw_avatar_set_icon_name") | |||
| 593 | - | core.PuregoSafeRegister(&xAvatarSetShowInitials, libs, "adw_avatar_set_show_initials") | |||
| 594 | - | core.PuregoSafeRegister(&xAvatarSetSize, libs, "adw_avatar_set_size") | |||
| 595 | - | core.PuregoSafeRegister(&xAvatarSetText, libs, "adw_avatar_set_text") | |||
| 596 | } | 593 | } | ||