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
| @@ -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/gdk" | |
| 10 | 11 | "github.com/bnema/puregotk/v4/gobject" | |
| @@ -66,7 +67,6 @@ type Avatar struct { | |||
| 66 | 67 | var xAvatarGLibType func() types.GType | |
| 67 | 68 | ||
| 68 | 69 | func AvatarGLibType() types.GType { | |
| 69 | - | core.LazyRegister(&xAvatarGLibType, "ADW", "adw_avatar_get_type", false) | |
| 70 | 70 | return xAvatarGLibType() | |
| 71 | 71 | } | |
| 72 | 72 | ||
| @@ -80,7 +80,6 @@ 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) | |
| 84 | 83 | var cls *Avatar | |
| 85 | 84 | ||
| 86 | 85 | TextVarPtr := core.GStrdupNullable(TextVar) | |
| @@ -103,7 +102,6 @@ var xAvatarDrawToTexture func(uintptr, int) uintptr | |||
| 103 | 102 | // | |
| 104 | 103 | // This can be used to export the fallback avatar. | |
| 105 | 104 | func (x *Avatar) DrawToTexture(ScaleFactorVar int) *gdk.Texture { | |
| 106 | - | core.LazyRegister(&xAvatarDrawToTexture, "ADW", "adw_avatar_draw_to_texture", false) | |
| 107 | 105 | var cls *gdk.Texture | |
| 108 | 106 | ||
| 109 | 107 | cret := xAvatarDrawToTexture(x.GoPointer(), ScaleFactorVar) | |
| @@ -120,7 +118,6 @@ var xAvatarGetCustomImage func(uintptr) uintptr | |||
| 120 | 118 | ||
| 121 | 119 | // Gets the custom image paintable. | |
| 122 | 120 | func (x *Avatar) GetCustomImage() *gdk.PaintableBase { | |
| 123 | - | core.LazyRegister(&xAvatarGetCustomImage, "ADW", "adw_avatar_get_custom_image", false) | |
| 124 | 121 | var cls *gdk.PaintableBase | |
| 125 | 122 | ||
| 126 | 123 | cret := xAvatarGetCustomImage(x.GoPointer()) | |
| @@ -138,8 +135,6 @@ var xAvatarGetIconName func(uintptr) string | |||
| 138 | 135 | ||
| 139 | 136 | // Gets the name of an icon to use as a fallback. | |
| 140 | 137 | func (x *Avatar) GetIconName() string { | |
| 141 | - | core.LazyRegister(&xAvatarGetIconName, "ADW", "adw_avatar_get_icon_name", false) | |
| 142 | - | ||
| 143 | 138 | cret := xAvatarGetIconName(x.GoPointer()) | |
| 144 | 139 | return cret | |
| 145 | 140 | } | |
| @@ -148,8 +143,6 @@ var xAvatarGetShowInitials func(uintptr) bool | |||
| 148 | 143 | ||
| 149 | 144 | // Gets whether initials are used instead of an icon on the fallback avatar. | |
| 150 | 145 | func (x *Avatar) GetShowInitials() bool { | |
| 151 | - | core.LazyRegister(&xAvatarGetShowInitials, "ADW", "adw_avatar_get_show_initials", false) | |
| 152 | - | ||
| 153 | 146 | cret := xAvatarGetShowInitials(x.GoPointer()) | |
| 154 | 147 | return cret | |
| 155 | 148 | } | |
| @@ -158,8 +151,6 @@ var xAvatarGetSize func(uintptr) int | |||
| 158 | 151 | ||
| 159 | 152 | // Gets the size of the avatar. | |
| 160 | 153 | func (x *Avatar) GetSize() int { | |
| 161 | - | core.LazyRegister(&xAvatarGetSize, "ADW", "adw_avatar_get_size", false) | |
| 162 | - | ||
| 163 | 154 | cret := xAvatarGetSize(x.GoPointer()) | |
| 164 | 155 | return cret | |
| 165 | 156 | } | |
| @@ -168,8 +159,6 @@ var xAvatarGetText func(uintptr) string | |||
| 168 | 159 | ||
| 169 | 160 | // Gets the text used to generate the fallback initials and color. | |
| 170 | 161 | func (x *Avatar) GetText() string { | |
| 171 | - | core.LazyRegister(&xAvatarGetText, "ADW", "adw_avatar_get_text", false) | |
| 172 | - | ||
| 173 | 162 | cret := xAvatarGetText(x.GoPointer()) | |
| 174 | 163 | return cret | |
| 175 | 164 | } | |
| @@ -180,8 +169,6 @@ var xAvatarSetCustomImage func(uintptr, uintptr) | |||
| 180 | 169 | // | |
| 181 | 170 | // Custom image is displayed instead of initials or icon. | |
| 182 | 171 | func (x *Avatar) SetCustomImage(CustomImageVar gdk.Paintable) { | |
| 183 | - | core.LazyRegister(&xAvatarSetCustomImage, "ADW", "adw_avatar_set_custom_image", false) | |
| 184 | - | ||
| 185 | 172 | xAvatarSetCustomImage(x.GoPointer(), CustomImageVar.GoPointer()) | |
| 186 | 173 | } | |
| 187 | 174 | ||
| @@ -191,8 +178,6 @@ var xAvatarSetIconName func(uintptr, uintptr) | |||
| 191 | 178 | // | |
| 192 | 179 | // If no name is set, `adw-avatar-default-symbolic` will be used. | |
| 193 | 180 | func (x *Avatar) SetIconName(IconNameVar *string) { | |
| 194 | - | core.LazyRegister(&xAvatarSetIconName, "ADW", "adw_avatar_set_icon_name", false) | |
| 195 | - | ||
| 196 | 181 | IconNameVarPtr := core.GStrdupNullable(IconNameVar) | |
| 197 | 182 | defer core.GFreeNullable(IconNameVarPtr) | |
| 198 | 183 | ||
| @@ -205,8 +190,6 @@ var xAvatarSetShowInitials func(uintptr, bool) | |||
| 205 | 190 | // | |
| 206 | 191 | // See [property@Avatar:icon-name] for how to change the fallback icon. | |
| 207 | 192 | func (x *Avatar) SetShowInitials(ShowInitialsVar bool) { | |
| 208 | - | core.LazyRegister(&xAvatarSetShowInitials, "ADW", "adw_avatar_set_show_initials", false) | |
| 209 | - | ||
| 210 | 193 | xAvatarSetShowInitials(x.GoPointer(), ShowInitialsVar) | |
| 211 | 194 | } | |
| 212 | 195 | ||
| @@ -214,8 +197,6 @@ var xAvatarSetSize func(uintptr, int) | |||
| 214 | 197 | ||
| 215 | 198 | // Sets the size of the avatar. | |
| 216 | 199 | func (x *Avatar) SetSize(SizeVar int) { | |
| 217 | - | core.LazyRegister(&xAvatarSetSize, "ADW", "adw_avatar_set_size", false) | |
| 218 | - | ||
| 219 | 200 | xAvatarSetSize(x.GoPointer(), SizeVar) | |
| 220 | 201 | } | |
| 221 | 202 | ||
| @@ -226,8 +207,6 @@ var xAvatarSetText func(uintptr, uintptr) | |||
| 226 | 207 | // It's only used to generate the color if [property@Avatar:show-initials] is | |
| 227 | 208 | // `FALSE`. | |
| 228 | 209 | func (x *Avatar) SetText(TextVar *string) { | |
| 229 | - | core.LazyRegister(&xAvatarSetText, "ADW", "adw_avatar_set_text", false) | |
| 230 | - | ||
| 231 | 210 | TextVarPtr := core.GStrdupNullable(TextVar) | |
| 232 | 211 | defer core.GFreeNullable(TextVarPtr) | |
| 233 | 212 | ||
| @@ -590,4 +569,28 @@ func (x *Avatar) GetBuildableId() string { | |||
| 590 | 569 | func init() { | |
| 591 | 570 | core.SetPackageName("ADW", "libadwaita-1") | |
| 592 | 571 | 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") | |
| 593 | 596 | } | |
| @@ -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/gdk" | 10 | "github.com/bnema/puregotk/v4/gdk" | ||
| 10 | "github.com/bnema/puregotk/v4/gobject" | 11 | "github.com/bnema/puregotk/v4/gobject" | ||
| @@ -66,7 +67,6 @@ type Avatar struct { | |||||
| 66 | var xAvatarGLibType func() types.GType | 67 | var xAvatarGLibType func() types.GType | ||
| 67 | 68 | ||||
| 68 | func AvatarGLibType() types.GType { | 69 | 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,7 +80,6 @@ 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) | |||
| 84 | var cls *Avatar | 83 | var cls *Avatar | ||
| 85 | 84 | ||||
| 86 | TextVarPtr := core.GStrdupNullable(TextVar) | 85 | TextVarPtr := core.GStrdupNullable(TextVar) | ||
| @@ -103,7 +102,6 @@ var xAvatarDrawToTexture func(uintptr, int) uintptr | |||||
| 103 | // | 102 | // | ||
| 104 | // This can be used to export the fallback avatar. | 103 | // This can be used to export the fallback avatar. | ||
| 105 | func (x *Avatar) DrawToTexture(ScaleFactorVar int) *gdk.Texture { | 104 | func (x *Avatar) DrawToTexture(ScaleFactorVar int) *gdk.Texture { | ||
| 106 | - | core.LazyRegister(&xAvatarDrawToTexture, "ADW", "adw_avatar_draw_to_texture", false) | |||
| 107 | var cls *gdk.Texture | 105 | var cls *gdk.Texture | ||
| 108 | 106 | ||||
| 109 | cret := xAvatarDrawToTexture(x.GoPointer(), ScaleFactorVar) | 107 | cret := xAvatarDrawToTexture(x.GoPointer(), ScaleFactorVar) | ||
| @@ -120,7 +118,6 @@ var xAvatarGetCustomImage func(uintptr) uintptr | |||||
| 120 | 118 | ||||
| 121 | // Gets the custom image paintable. | 119 | // Gets the custom image paintable. | ||
| 122 | func (x *Avatar) GetCustomImage() *gdk.PaintableBase { | 120 | func (x *Avatar) GetCustomImage() *gdk.PaintableBase { | ||
| 123 | - | core.LazyRegister(&xAvatarGetCustomImage, "ADW", "adw_avatar_get_custom_image", false) | |||
| 124 | var cls *gdk.PaintableBase | 121 | var cls *gdk.PaintableBase | ||
| 125 | 122 | ||||
| 126 | cret := xAvatarGetCustomImage(x.GoPointer()) | 123 | cret := xAvatarGetCustomImage(x.GoPointer()) | ||
| @@ -138,8 +135,6 @@ var xAvatarGetIconName func(uintptr) string | |||||
| 138 | 135 | ||||
| 139 | // Gets the name of an icon to use as a fallback. | 136 | // Gets the name of an icon to use as a fallback. | ||
| 140 | func (x *Avatar) GetIconName() string { | 137 | func (x *Avatar) GetIconName() string { | ||
| 141 | - | core.LazyRegister(&xAvatarGetIconName, "ADW", "adw_avatar_get_icon_name", false) | |||
| 142 | - | ||||
| 143 | cret := xAvatarGetIconName(x.GoPointer()) | 138 | cret := xAvatarGetIconName(x.GoPointer()) | ||
| 144 | return cret | 139 | return cret | ||
| 145 | } | 140 | } | ||
| @@ -148,8 +143,6 @@ var xAvatarGetShowInitials func(uintptr) bool | |||||
| 148 | 143 | ||||
| 149 | // Gets whether initials are used instead of an icon on the fallback avatar. | 144 | // Gets whether initials are used instead of an icon on the fallback avatar. | ||
| 150 | func (x *Avatar) GetShowInitials() bool { | 145 | func (x *Avatar) GetShowInitials() bool { | ||
| 151 | - | core.LazyRegister(&xAvatarGetShowInitials, "ADW", "adw_avatar_get_show_initials", false) | |||
| 152 | - | ||||
| 153 | cret := xAvatarGetShowInitials(x.GoPointer()) | 146 | cret := xAvatarGetShowInitials(x.GoPointer()) | ||
| 154 | return cret | 147 | return cret | ||
| 155 | } | 148 | } | ||
| @@ -158,8 +151,6 @@ var xAvatarGetSize func(uintptr) int | |||||
| 158 | 151 | ||||
| 159 | // Gets the size of the avatar. | 152 | // Gets the size of the avatar. | ||
| 160 | func (x *Avatar) GetSize() int { | 153 | func (x *Avatar) GetSize() int { | ||
| 161 | - | core.LazyRegister(&xAvatarGetSize, "ADW", "adw_avatar_get_size", false) | |||
| 162 | - | ||||
| 163 | cret := xAvatarGetSize(x.GoPointer()) | 154 | cret := xAvatarGetSize(x.GoPointer()) | ||
| 164 | return cret | 155 | return cret | ||
| 165 | } | 156 | } | ||
| @@ -168,8 +159,6 @@ var xAvatarGetText func(uintptr) string | |||||
| 168 | 159 | ||||
| 169 | // Gets the text used to generate the fallback initials and color. | 160 | // Gets the text used to generate the fallback initials and color. | ||
| 170 | func (x *Avatar) GetText() string { | 161 | func (x *Avatar) GetText() string { | ||
| 171 | - | core.LazyRegister(&xAvatarGetText, "ADW", "adw_avatar_get_text", false) | |||
| 172 | - | ||||
| 173 | cret := xAvatarGetText(x.GoPointer()) | 162 | cret := xAvatarGetText(x.GoPointer()) | ||
| 174 | return cret | 163 | return cret | ||
| 175 | } | 164 | } | ||
| @@ -180,8 +169,6 @@ var xAvatarSetCustomImage func(uintptr, uintptr) | |||||
| 180 | // | 169 | // | ||
| 181 | // Custom image is displayed instead of initials or icon. | 170 | // Custom image is displayed instead of initials or icon. | ||
| 182 | func (x *Avatar) SetCustomImage(CustomImageVar gdk.Paintable) { | 171 | func (x *Avatar) SetCustomImage(CustomImageVar gdk.Paintable) { | ||
| 183 | - | core.LazyRegister(&xAvatarSetCustomImage, "ADW", "adw_avatar_set_custom_image", false) | |||
| 184 | - | ||||
| 185 | xAvatarSetCustomImage(x.GoPointer(), CustomImageVar.GoPointer()) | 172 | xAvatarSetCustomImage(x.GoPointer(), CustomImageVar.GoPointer()) | ||
| 186 | } | 173 | } | ||
| 187 | 174 | ||||
| @@ -191,8 +178,6 @@ var xAvatarSetIconName func(uintptr, uintptr) | |||||
| 191 | // | 178 | // | ||
| 192 | // If no name is set, `adw-avatar-default-symbolic` will be used. | 179 | // If no name is set, `adw-avatar-default-symbolic` will be used. | ||
| 193 | func (x *Avatar) SetIconName(IconNameVar *string) { | 180 | func (x *Avatar) SetIconName(IconNameVar *string) { | ||
| 194 | - | core.LazyRegister(&xAvatarSetIconName, "ADW", "adw_avatar_set_icon_name", false) | |||
| 195 | - | ||||
| 196 | IconNameVarPtr := core.GStrdupNullable(IconNameVar) | 181 | IconNameVarPtr := core.GStrdupNullable(IconNameVar) | ||
| 197 | defer core.GFreeNullable(IconNameVarPtr) | 182 | defer core.GFreeNullable(IconNameVarPtr) | ||
| 198 | 183 | ||||
| @@ -205,8 +190,6 @@ var xAvatarSetShowInitials func(uintptr, bool) | |||||
| 205 | // | 190 | // | ||
| 206 | // See [property@Avatar:icon-name] for how to change the fallback icon. | 191 | // See [property@Avatar:icon-name] for how to change the fallback icon. | ||
| 207 | func (x *Avatar) SetShowInitials(ShowInitialsVar bool) { | 192 | func (x *Avatar) SetShowInitials(ShowInitialsVar bool) { | ||
| 208 | - | core.LazyRegister(&xAvatarSetShowInitials, "ADW", "adw_avatar_set_show_initials", false) | |||
| 209 | - | ||||
| 210 | xAvatarSetShowInitials(x.GoPointer(), ShowInitialsVar) | 193 | xAvatarSetShowInitials(x.GoPointer(), ShowInitialsVar) | ||
| 211 | } | 194 | } | ||
| 212 | 195 | ||||
| @@ -214,8 +197,6 @@ var xAvatarSetSize func(uintptr, int) | |||||
| 214 | 197 | ||||
| 215 | // Sets the size of the avatar. | 198 | // Sets the size of the avatar. | ||
| 216 | func (x *Avatar) SetSize(SizeVar int) { | 199 | func (x *Avatar) SetSize(SizeVar int) { | ||
| 217 | - | core.LazyRegister(&xAvatarSetSize, "ADW", "adw_avatar_set_size", false) | |||
| 218 | - | ||||
| 219 | xAvatarSetSize(x.GoPointer(), SizeVar) | 200 | xAvatarSetSize(x.GoPointer(), SizeVar) | ||
| 220 | } | 201 | } | ||
| 221 | 202 | ||||
| @@ -226,8 +207,6 @@ var xAvatarSetText func(uintptr, uintptr) | |||||
| 226 | // It's only used to generate the color if [property@Avatar:show-initials] is | 207 | // It's only used to generate the color if [property@Avatar:show-initials] is | ||
| 227 | // `FALSE`. | 208 | // `FALSE`. | ||
| 228 | func (x *Avatar) SetText(TextVar *string) { | 209 | func (x *Avatar) SetText(TextVar *string) { | ||
| 229 | - | core.LazyRegister(&xAvatarSetText, "ADW", "adw_avatar_set_text", false) | |||
| 230 | - | ||||
| 231 | TextVarPtr := core.GStrdupNullable(TextVar) | 210 | TextVarPtr := core.GStrdupNullable(TextVar) | ||
| 232 | defer core.GFreeNullable(TextVarPtr) | 211 | defer core.GFreeNullable(TextVarPtr) | ||
| 233 | 212 | ||||
| @@ -590,4 +569,28 @@ func (x *Avatar) GetBuildableId() string { | |||||
| 590 | func init() { | 569 | func init() { | ||
| 591 | core.SetPackageName("ADW", "libadwaita-1") | 570 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 592 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 571 | 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") | |||
| 593 | } | 596 | } | ||