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 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 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar-item.go +37 -45 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar-section.go +27 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar.go +39 -41 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spin-row.go +34 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spinner-paintable.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spinner.go +13 -2 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-split-button.go +34 -39 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spring-animation.go +30 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spring-params.go +21 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-squeezer.go +44 -49 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-status-page.go +24 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-style-manager.go +28 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-swipe-tracker.go +30 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-swipeable.go +21 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-switch-row.go +16 -6 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-bar.go +32 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-button.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-overview.go +37 -45 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-view.go +87 -123 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-timed-animation.go +28 -30
| @@ -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" | |
| @@ -50,7 +51,6 @@ type TimedAnimation struct { | |||
| 50 | 51 | var xTimedAnimationGLibType func() types.GType | |
| 51 | 52 | ||
| 52 | 53 | func TimedAnimationGLibType() types.GType { | |
| 53 | - | core.LazyRegister(&xTimedAnimationGLibType, "ADW", "adw_timed_animation_get_type", false) | |
| 54 | 54 | return xTimedAnimationGLibType() | |
| 55 | 55 | } | |
| 56 | 56 | ||
| @@ -65,7 +65,6 @@ var xNewTimedAnimation func(uintptr, float64, float64, uint, uintptr) uintptr | |||
| 65 | 65 | // Creates a new `AdwTimedAnimation` on @widget to animate @target from @from | |
| 66 | 66 | // to @to. | |
| 67 | 67 | func NewTimedAnimation(WidgetVar *gtk.Widget, FromVar float64, ToVar float64, DurationVar uint, TargetVar *AnimationTarget) *TimedAnimation { | |
| 68 | - | core.LazyRegister(&xNewTimedAnimation, "ADW", "adw_timed_animation_new", false) | |
| 69 | 68 | var cls *TimedAnimation | |
| 70 | 69 | ||
| 71 | 70 | cret := xNewTimedAnimation(WidgetVar.GoPointer(), FromVar, ToVar, DurationVar, TargetVar.GoPointer()) | |
| @@ -83,8 +82,6 @@ var xTimedAnimationGetAlternate func(uintptr) bool | |||
| 83 | 82 | ||
| 84 | 83 | // Gets whether @self changes direction on every iteration. | |
| 85 | 84 | func (x *TimedAnimation) GetAlternate() bool { | |
| 86 | - | core.LazyRegister(&xTimedAnimationGetAlternate, "ADW", "adw_timed_animation_get_alternate", false) | |
| 87 | - | ||
| 88 | 85 | cret := xTimedAnimationGetAlternate(x.GoPointer()) | |
| 89 | 86 | return cret | |
| 90 | 87 | } | |
| @@ -93,8 +90,6 @@ var xTimedAnimationGetDuration func(uintptr) uint | |||
| 93 | 90 | ||
| 94 | 91 | // Gets the duration of @self. | |
| 95 | 92 | func (x *TimedAnimation) GetDuration() uint { | |
| 96 | - | core.LazyRegister(&xTimedAnimationGetDuration, "ADW", "adw_timed_animation_get_duration", false) | |
| 97 | - | ||
| 98 | 93 | cret := xTimedAnimationGetDuration(x.GoPointer()) | |
| 99 | 94 | return cret | |
| 100 | 95 | } | |
| @@ -103,8 +98,6 @@ var xTimedAnimationGetEasing func(uintptr) Easing | |||
| 103 | 98 | ||
| 104 | 99 | // Gets the easing function @self uses. | |
| 105 | 100 | func (x *TimedAnimation) GetEasing() Easing { | |
| 106 | - | core.LazyRegister(&xTimedAnimationGetEasing, "ADW", "adw_timed_animation_get_easing", false) | |
| 107 | - | ||
| 108 | 101 | cret := xTimedAnimationGetEasing(x.GoPointer()) | |
| 109 | 102 | return cret | |
| 110 | 103 | } | |
| @@ -113,8 +106,6 @@ var xTimedAnimationGetRepeatCount func(uintptr) uint | |||
| 113 | 106 | ||
| 114 | 107 | // Gets the number of times @self will play. | |
| 115 | 108 | func (x *TimedAnimation) GetRepeatCount() uint { | |
| 116 | - | core.LazyRegister(&xTimedAnimationGetRepeatCount, "ADW", "adw_timed_animation_get_repeat_count", false) | |
| 117 | - | ||
| 118 | 109 | cret := xTimedAnimationGetRepeatCount(x.GoPointer()) | |
| 119 | 110 | return cret | |
| 120 | 111 | } | |
| @@ -123,8 +114,6 @@ var xTimedAnimationGetReverse func(uintptr) bool | |||
| 123 | 114 | ||
| 124 | 115 | // Gets whether @self plays backwards. | |
| 125 | 116 | func (x *TimedAnimation) GetReverse() bool { | |
| 126 | - | core.LazyRegister(&xTimedAnimationGetReverse, "ADW", "adw_timed_animation_get_reverse", false) | |
| 127 | - | ||
| 128 | 117 | cret := xTimedAnimationGetReverse(x.GoPointer()) | |
| 129 | 118 | return cret | |
| 130 | 119 | } | |
| @@ -133,8 +122,6 @@ var xTimedAnimationGetValueFrom func(uintptr) float64 | |||
| 133 | 122 | ||
| 134 | 123 | // Gets the value @self will animate from. | |
| 135 | 124 | func (x *TimedAnimation) GetValueFrom() float64 { | |
| 136 | - | core.LazyRegister(&xTimedAnimationGetValueFrom, "ADW", "adw_timed_animation_get_value_from", false) | |
| 137 | - | ||
| 138 | 125 | cret := xTimedAnimationGetValueFrom(x.GoPointer()) | |
| 139 | 126 | return cret | |
| 140 | 127 | } | |
| @@ -143,8 +130,6 @@ var xTimedAnimationGetValueTo func(uintptr) float64 | |||
| 143 | 130 | ||
| 144 | 131 | // Gets the value @self will animate to. | |
| 145 | 132 | func (x *TimedAnimation) GetValueTo() float64 { | |
| 146 | - | core.LazyRegister(&xTimedAnimationGetValueTo, "ADW", "adw_timed_animation_get_value_to", false) | |
| 147 | - | ||
| 148 | 133 | cret := xTimedAnimationGetValueTo(x.GoPointer()) | |
| 149 | 134 | return cret | |
| 150 | 135 | } | |
| @@ -153,8 +138,6 @@ var xTimedAnimationSetAlternate func(uintptr, bool) | |||
| 153 | 138 | ||
| 154 | 139 | // Sets whether @self changes direction on every iteration. | |
| 155 | 140 | func (x *TimedAnimation) SetAlternate(AlternateVar bool) { | |
| 156 | - | core.LazyRegister(&xTimedAnimationSetAlternate, "ADW", "adw_timed_animation_set_alternate", false) | |
| 157 | - | ||
| 158 | 141 | xTimedAnimationSetAlternate(x.GoPointer(), AlternateVar) | |
| 159 | 142 | } | |
| 160 | 143 | ||
| @@ -164,8 +147,6 @@ var xTimedAnimationSetDuration func(uintptr, uint) | |||
| 164 | 147 | // | |
| 165 | 148 | // If the animation repeats more than once, sets the duration of one iteration. | |
| 166 | 149 | func (x *TimedAnimation) SetDuration(DurationVar uint) { | |
| 167 | - | core.LazyRegister(&xTimedAnimationSetDuration, "ADW", "adw_timed_animation_set_duration", false) | |
| 168 | - | ||
| 169 | 150 | xTimedAnimationSetDuration(x.GoPointer(), DurationVar) | |
| 170 | 151 | } | |
| 171 | 152 | ||
| @@ -175,8 +156,6 @@ var xTimedAnimationSetEasing func(uintptr, Easing) | |||
| 175 | 156 | // | |
| 176 | 157 | // See [enum@Easing] for the description of specific easing functions. | |
| 177 | 158 | func (x *TimedAnimation) SetEasing(EasingVar Easing) { | |
| 178 | - | core.LazyRegister(&xTimedAnimationSetEasing, "ADW", "adw_timed_animation_set_easing", false) | |
| 179 | - | ||
| 180 | 159 | xTimedAnimationSetEasing(x.GoPointer(), EasingVar) | |
| 181 | 160 | } | |
| 182 | 161 | ||
| @@ -186,8 +165,6 @@ var xTimedAnimationSetRepeatCount func(uintptr, uint) | |||
| 186 | 165 | // | |
| 187 | 166 | // If set to 0, @self will repeat endlessly. | |
| 188 | 167 | func (x *TimedAnimation) SetRepeatCount(RepeatCountVar uint) { | |
| 189 | - | core.LazyRegister(&xTimedAnimationSetRepeatCount, "ADW", "adw_timed_animation_set_repeat_count", false) | |
| 190 | - | ||
| 191 | 168 | xTimedAnimationSetRepeatCount(x.GoPointer(), RepeatCountVar) | |
| 192 | 169 | } | |
| 193 | 170 | ||
| @@ -195,8 +172,6 @@ var xTimedAnimationSetReverse func(uintptr, bool) | |||
| 195 | 172 | ||
| 196 | 173 | // Sets whether @self plays backwards. | |
| 197 | 174 | func (x *TimedAnimation) SetReverse(ReverseVar bool) { | |
| 198 | - | core.LazyRegister(&xTimedAnimationSetReverse, "ADW", "adw_timed_animation_set_reverse", false) | |
| 199 | - | ||
| 200 | 175 | xTimedAnimationSetReverse(x.GoPointer(), ReverseVar) | |
| 201 | 176 | } | |
| 202 | 177 | ||
| @@ -210,8 +185,6 @@ var xTimedAnimationSetValueFrom func(uintptr, float64) | |||
| 210 | 185 | // If [property@TimedAnimation:reverse] is `TRUE`, the animation will end at | |
| 211 | 186 | // this value instead. | |
| 212 | 187 | func (x *TimedAnimation) SetValueFrom(ValueVar float64) { | |
| 213 | - | core.LazyRegister(&xTimedAnimationSetValueFrom, "ADW", "adw_timed_animation_set_value_from", false) | |
| 214 | - | ||
| 215 | 188 | xTimedAnimationSetValueFrom(x.GoPointer(), ValueVar) | |
| 216 | 189 | } | |
| 217 | 190 | ||
| @@ -225,8 +198,6 @@ var xTimedAnimationSetValueTo func(uintptr, float64) | |||
| 225 | 198 | // If [property@TimedAnimation:reverse] is `TRUE`, the animation will start | |
| 226 | 199 | // at this value instead. | |
| 227 | 200 | func (x *TimedAnimation) SetValueTo(ValueVar float64) { | |
| 228 | - | core.LazyRegister(&xTimedAnimationSetValueTo, "ADW", "adw_timed_animation_set_value_to", false) | |
| 229 | - | ||
| 230 | 201 | xTimedAnimationSetValueTo(x.GoPointer(), ValueVar) | |
| 231 | 202 | } | |
| 232 | 203 | ||
| @@ -384,4 +355,31 @@ func (x *TimedAnimation) GetPropertyValueTo() float64 { | |||
| 384 | 355 | func init() { | |
| 385 | 356 | core.SetPackageName("ADW", "libadwaita-1") | |
| 386 | 357 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | |
| 358 | + | var libs []uintptr | |
| 359 | + | for _, libPath := range core.GetPaths("ADW") { | |
| 360 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 361 | + | if err != nil { | |
| 362 | + | panic(err) | |
| 363 | + | } | |
| 364 | + | libs = append(libs, lib) | |
| 365 | + | } | |
| 366 | + | ||
| 367 | + | core.PuregoSafeRegister(&xTimedAnimationGLibType, libs, "adw_timed_animation_get_type") | |
| 368 | + | ||
| 369 | + | core.PuregoSafeRegister(&xNewTimedAnimation, libs, "adw_timed_animation_new") | |
| 370 | + | ||
| 371 | + | core.PuregoSafeRegister(&xTimedAnimationGetAlternate, libs, "adw_timed_animation_get_alternate") | |
| 372 | + | core.PuregoSafeRegister(&xTimedAnimationGetDuration, libs, "adw_timed_animation_get_duration") | |
| 373 | + | core.PuregoSafeRegister(&xTimedAnimationGetEasing, libs, "adw_timed_animation_get_easing") | |
| 374 | + | core.PuregoSafeRegister(&xTimedAnimationGetRepeatCount, libs, "adw_timed_animation_get_repeat_count") | |
| 375 | + | core.PuregoSafeRegister(&xTimedAnimationGetReverse, libs, "adw_timed_animation_get_reverse") | |
| 376 | + | core.PuregoSafeRegister(&xTimedAnimationGetValueFrom, libs, "adw_timed_animation_get_value_from") | |
| 377 | + | core.PuregoSafeRegister(&xTimedAnimationGetValueTo, libs, "adw_timed_animation_get_value_to") | |
| 378 | + | core.PuregoSafeRegister(&xTimedAnimationSetAlternate, libs, "adw_timed_animation_set_alternate") | |
| 379 | + | core.PuregoSafeRegister(&xTimedAnimationSetDuration, libs, "adw_timed_animation_set_duration") | |
| 380 | + | core.PuregoSafeRegister(&xTimedAnimationSetEasing, libs, "adw_timed_animation_set_easing") | |
| 381 | + | core.PuregoSafeRegister(&xTimedAnimationSetRepeatCount, libs, "adw_timed_animation_set_repeat_count") | |
| 382 | + | core.PuregoSafeRegister(&xTimedAnimationSetReverse, libs, "adw_timed_animation_set_reverse") | |
| 383 | + | core.PuregoSafeRegister(&xTimedAnimationSetValueFrom, libs, "adw_timed_animation_set_value_from") | |
| 384 | + | core.PuregoSafeRegister(&xTimedAnimationSetValueTo, libs, "adw_timed_animation_set_value_to") | |
| 387 | 385 | } | |
| @@ -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" | ||
| @@ -50,7 +51,6 @@ type TimedAnimation struct { | |||||
| 50 | var xTimedAnimationGLibType func() types.GType | 51 | var xTimedAnimationGLibType func() types.GType | ||
| 51 | 52 | ||||
| 52 | func TimedAnimationGLibType() types.GType { | 53 | func TimedAnimationGLibType() types.GType { | ||
| 53 | - | core.LazyRegister(&xTimedAnimationGLibType, "ADW", "adw_timed_animation_get_type", false) | |||
| 54 | return xTimedAnimationGLibType() | 54 | return xTimedAnimationGLibType() | ||
| 55 | } | 55 | } | ||
| 56 | 56 | ||||
| @@ -65,7 +65,6 @@ var xNewTimedAnimation func(uintptr, float64, float64, uint, uintptr) uintptr | |||||
| 65 | // Creates a new `AdwTimedAnimation` on @widget to animate @target from @from | 65 | // Creates a new `AdwTimedAnimation` on @widget to animate @target from @from | ||
| 66 | // to @to. | 66 | // to @to. | ||
| 67 | func NewTimedAnimation(WidgetVar *gtk.Widget, FromVar float64, ToVar float64, DurationVar uint, TargetVar *AnimationTarget) *TimedAnimation { | 67 | func NewTimedAnimation(WidgetVar *gtk.Widget, FromVar float64, ToVar float64, DurationVar uint, TargetVar *AnimationTarget) *TimedAnimation { | ||
| 68 | - | core.LazyRegister(&xNewTimedAnimation, "ADW", "adw_timed_animation_new", false) | |||
| 69 | var cls *TimedAnimation | 68 | var cls *TimedAnimation | ||
| 70 | 69 | ||||
| 71 | cret := xNewTimedAnimation(WidgetVar.GoPointer(), FromVar, ToVar, DurationVar, TargetVar.GoPointer()) | 70 | cret := xNewTimedAnimation(WidgetVar.GoPointer(), FromVar, ToVar, DurationVar, TargetVar.GoPointer()) | ||
| @@ -83,8 +82,6 @@ var xTimedAnimationGetAlternate func(uintptr) bool | |||||
| 83 | 82 | ||||
| 84 | // Gets whether @self changes direction on every iteration. | 83 | // Gets whether @self changes direction on every iteration. | ||
| 85 | func (x *TimedAnimation) GetAlternate() bool { | 84 | func (x *TimedAnimation) GetAlternate() bool { | ||
| 86 | - | core.LazyRegister(&xTimedAnimationGetAlternate, "ADW", "adw_timed_animation_get_alternate", false) | |||
| 87 | - | ||||
| 88 | cret := xTimedAnimationGetAlternate(x.GoPointer()) | 85 | cret := xTimedAnimationGetAlternate(x.GoPointer()) | ||
| 89 | return cret | 86 | return cret | ||
| 90 | } | 87 | } | ||
| @@ -93,8 +90,6 @@ var xTimedAnimationGetDuration func(uintptr) uint | |||||
| 93 | 90 | ||||
| 94 | // Gets the duration of @self. | 91 | // Gets the duration of @self. | ||
| 95 | func (x *TimedAnimation) GetDuration() uint { | 92 | func (x *TimedAnimation) GetDuration() uint { | ||
| 96 | - | core.LazyRegister(&xTimedAnimationGetDuration, "ADW", "adw_timed_animation_get_duration", false) | |||
| 97 | - | ||||
| 98 | cret := xTimedAnimationGetDuration(x.GoPointer()) | 93 | cret := xTimedAnimationGetDuration(x.GoPointer()) | ||
| 99 | return cret | 94 | return cret | ||
| 100 | } | 95 | } | ||
| @@ -103,8 +98,6 @@ var xTimedAnimationGetEasing func(uintptr) Easing | |||||
| 103 | 98 | ||||
| 104 | // Gets the easing function @self uses. | 99 | // Gets the easing function @self uses. | ||
| 105 | func (x *TimedAnimation) GetEasing() Easing { | 100 | func (x *TimedAnimation) GetEasing() Easing { | ||
| 106 | - | core.LazyRegister(&xTimedAnimationGetEasing, "ADW", "adw_timed_animation_get_easing", false) | |||
| 107 | - | ||||
| 108 | cret := xTimedAnimationGetEasing(x.GoPointer()) | 101 | cret := xTimedAnimationGetEasing(x.GoPointer()) | ||
| 109 | return cret | 102 | return cret | ||
| 110 | } | 103 | } | ||
| @@ -113,8 +106,6 @@ var xTimedAnimationGetRepeatCount func(uintptr) uint | |||||
| 113 | 106 | ||||
| 114 | // Gets the number of times @self will play. | 107 | // Gets the number of times @self will play. | ||
| 115 | func (x *TimedAnimation) GetRepeatCount() uint { | 108 | func (x *TimedAnimation) GetRepeatCount() uint { | ||
| 116 | - | core.LazyRegister(&xTimedAnimationGetRepeatCount, "ADW", "adw_timed_animation_get_repeat_count", false) | |||
| 117 | - | ||||
| 118 | cret := xTimedAnimationGetRepeatCount(x.GoPointer()) | 109 | cret := xTimedAnimationGetRepeatCount(x.GoPointer()) | ||
| 119 | return cret | 110 | return cret | ||
| 120 | } | 111 | } | ||
| @@ -123,8 +114,6 @@ var xTimedAnimationGetReverse func(uintptr) bool | |||||
| 123 | 114 | ||||
| 124 | // Gets whether @self plays backwards. | 115 | // Gets whether @self plays backwards. | ||
| 125 | func (x *TimedAnimation) GetReverse() bool { | 116 | func (x *TimedAnimation) GetReverse() bool { | ||
| 126 | - | core.LazyRegister(&xTimedAnimationGetReverse, "ADW", "adw_timed_animation_get_reverse", false) | |||
| 127 | - | ||||
| 128 | cret := xTimedAnimationGetReverse(x.GoPointer()) | 117 | cret := xTimedAnimationGetReverse(x.GoPointer()) | ||
| 129 | return cret | 118 | return cret | ||
| 130 | } | 119 | } | ||
| @@ -133,8 +122,6 @@ var xTimedAnimationGetValueFrom func(uintptr) float64 | |||||
| 133 | 122 | ||||
| 134 | // Gets the value @self will animate from. | 123 | // Gets the value @self will animate from. | ||
| 135 | func (x *TimedAnimation) GetValueFrom() float64 { | 124 | func (x *TimedAnimation) GetValueFrom() float64 { | ||
| 136 | - | core.LazyRegister(&xTimedAnimationGetValueFrom, "ADW", "adw_timed_animation_get_value_from", false) | |||
| 137 | - | ||||
| 138 | cret := xTimedAnimationGetValueFrom(x.GoPointer()) | 125 | cret := xTimedAnimationGetValueFrom(x.GoPointer()) | ||
| 139 | return cret | 126 | return cret | ||
| 140 | } | 127 | } | ||
| @@ -143,8 +130,6 @@ var xTimedAnimationGetValueTo func(uintptr) float64 | |||||
| 143 | 130 | ||||
| 144 | // Gets the value @self will animate to. | 131 | // Gets the value @self will animate to. | ||
| 145 | func (x *TimedAnimation) GetValueTo() float64 { | 132 | func (x *TimedAnimation) GetValueTo() float64 { | ||
| 146 | - | core.LazyRegister(&xTimedAnimationGetValueTo, "ADW", "adw_timed_animation_get_value_to", false) | |||
| 147 | - | ||||
| 148 | cret := xTimedAnimationGetValueTo(x.GoPointer()) | 133 | cret := xTimedAnimationGetValueTo(x.GoPointer()) | ||
| 149 | return cret | 134 | return cret | ||
| 150 | } | 135 | } | ||
| @@ -153,8 +138,6 @@ var xTimedAnimationSetAlternate func(uintptr, bool) | |||||
| 153 | 138 | ||||
| 154 | // Sets whether @self changes direction on every iteration. | 139 | // Sets whether @self changes direction on every iteration. | ||
| 155 | func (x *TimedAnimation) SetAlternate(AlternateVar bool) { | 140 | func (x *TimedAnimation) SetAlternate(AlternateVar bool) { | ||
| 156 | - | core.LazyRegister(&xTimedAnimationSetAlternate, "ADW", "adw_timed_animation_set_alternate", false) | |||
| 157 | - | ||||
| 158 | xTimedAnimationSetAlternate(x.GoPointer(), AlternateVar) | 141 | xTimedAnimationSetAlternate(x.GoPointer(), AlternateVar) | ||
| 159 | } | 142 | } | ||
| 160 | 143 | ||||
| @@ -164,8 +147,6 @@ var xTimedAnimationSetDuration func(uintptr, uint) | |||||
| 164 | // | 147 | // | ||
| 165 | // If the animation repeats more than once, sets the duration of one iteration. | 148 | // If the animation repeats more than once, sets the duration of one iteration. | ||
| 166 | func (x *TimedAnimation) SetDuration(DurationVar uint) { | 149 | func (x *TimedAnimation) SetDuration(DurationVar uint) { | ||
| 167 | - | core.LazyRegister(&xTimedAnimationSetDuration, "ADW", "adw_timed_animation_set_duration", false) | |||
| 168 | - | ||||
| 169 | xTimedAnimationSetDuration(x.GoPointer(), DurationVar) | 150 | xTimedAnimationSetDuration(x.GoPointer(), DurationVar) | ||
| 170 | } | 151 | } | ||
| 171 | 152 | ||||
| @@ -175,8 +156,6 @@ var xTimedAnimationSetEasing func(uintptr, Easing) | |||||
| 175 | // | 156 | // | ||
| 176 | // See [enum@Easing] for the description of specific easing functions. | 157 | // See [enum@Easing] for the description of specific easing functions. | ||
| 177 | func (x *TimedAnimation) SetEasing(EasingVar Easing) { | 158 | func (x *TimedAnimation) SetEasing(EasingVar Easing) { | ||
| 178 | - | core.LazyRegister(&xTimedAnimationSetEasing, "ADW", "adw_timed_animation_set_easing", false) | |||
| 179 | - | ||||
| 180 | xTimedAnimationSetEasing(x.GoPointer(), EasingVar) | 159 | xTimedAnimationSetEasing(x.GoPointer(), EasingVar) | ||
| 181 | } | 160 | } | ||
| 182 | 161 | ||||
| @@ -186,8 +165,6 @@ var xTimedAnimationSetRepeatCount func(uintptr, uint) | |||||
| 186 | // | 165 | // | ||
| 187 | // If set to 0, @self will repeat endlessly. | 166 | // If set to 0, @self will repeat endlessly. | ||
| 188 | func (x *TimedAnimation) SetRepeatCount(RepeatCountVar uint) { | 167 | func (x *TimedAnimation) SetRepeatCount(RepeatCountVar uint) { | ||
| 189 | - | core.LazyRegister(&xTimedAnimationSetRepeatCount, "ADW", "adw_timed_animation_set_repeat_count", false) | |||
| 190 | - | ||||
| 191 | xTimedAnimationSetRepeatCount(x.GoPointer(), RepeatCountVar) | 168 | xTimedAnimationSetRepeatCount(x.GoPointer(), RepeatCountVar) | ||
| 192 | } | 169 | } | ||
| 193 | 170 | ||||
| @@ -195,8 +172,6 @@ var xTimedAnimationSetReverse func(uintptr, bool) | |||||
| 195 | 172 | ||||
| 196 | // Sets whether @self plays backwards. | 173 | // Sets whether @self plays backwards. | ||
| 197 | func (x *TimedAnimation) SetReverse(ReverseVar bool) { | 174 | func (x *TimedAnimation) SetReverse(ReverseVar bool) { | ||
| 198 | - | core.LazyRegister(&xTimedAnimationSetReverse, "ADW", "adw_timed_animation_set_reverse", false) | |||
| 199 | - | ||||
| 200 | xTimedAnimationSetReverse(x.GoPointer(), ReverseVar) | 175 | xTimedAnimationSetReverse(x.GoPointer(), ReverseVar) | ||
| 201 | } | 176 | } | ||
| 202 | 177 | ||||
| @@ -210,8 +185,6 @@ var xTimedAnimationSetValueFrom func(uintptr, float64) | |||||
| 210 | // If [property@TimedAnimation:reverse] is `TRUE`, the animation will end at | 185 | // If [property@TimedAnimation:reverse] is `TRUE`, the animation will end at | ||
| 211 | // this value instead. | 186 | // this value instead. | ||
| 212 | func (x *TimedAnimation) SetValueFrom(ValueVar float64) { | 187 | func (x *TimedAnimation) SetValueFrom(ValueVar float64) { | ||
| 213 | - | core.LazyRegister(&xTimedAnimationSetValueFrom, "ADW", "adw_timed_animation_set_value_from", false) | |||
| 214 | - | ||||
| 215 | xTimedAnimationSetValueFrom(x.GoPointer(), ValueVar) | 188 | xTimedAnimationSetValueFrom(x.GoPointer(), ValueVar) | ||
| 216 | } | 189 | } | ||
| 217 | 190 | ||||
| @@ -225,8 +198,6 @@ var xTimedAnimationSetValueTo func(uintptr, float64) | |||||
| 225 | // If [property@TimedAnimation:reverse] is `TRUE`, the animation will start | 198 | // If [property@TimedAnimation:reverse] is `TRUE`, the animation will start | ||
| 226 | // at this value instead. | 199 | // at this value instead. | ||
| 227 | func (x *TimedAnimation) SetValueTo(ValueVar float64) { | 200 | func (x *TimedAnimation) SetValueTo(ValueVar float64) { | ||
| 228 | - | core.LazyRegister(&xTimedAnimationSetValueTo, "ADW", "adw_timed_animation_set_value_to", false) | |||
| 229 | - | ||||
| 230 | xTimedAnimationSetValueTo(x.GoPointer(), ValueVar) | 201 | xTimedAnimationSetValueTo(x.GoPointer(), ValueVar) | ||
| 231 | } | 202 | } | ||
| 232 | 203 | ||||
| @@ -384,4 +355,31 @@ func (x *TimedAnimation) GetPropertyValueTo() float64 { | |||||
| 384 | func init() { | 355 | func init() { | ||
| 385 | core.SetPackageName("ADW", "libadwaita-1") | 356 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 386 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 357 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | ||
| 358 | + | var libs []uintptr | |||
| 359 | + | for _, libPath := range core.GetPaths("ADW") { | |||
| 360 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 361 | + | if err != nil { | |||
| 362 | + | panic(err) | |||
| 363 | + | } | |||
| 364 | + | libs = append(libs, lib) | |||
| 365 | + | } | |||
| 366 | + | ||||
| 367 | + | core.PuregoSafeRegister(&xTimedAnimationGLibType, libs, "adw_timed_animation_get_type") | |||
| 368 | + | ||||
| 369 | + | core.PuregoSafeRegister(&xNewTimedAnimation, libs, "adw_timed_animation_new") | |||
| 370 | + | ||||
| 371 | + | core.PuregoSafeRegister(&xTimedAnimationGetAlternate, libs, "adw_timed_animation_get_alternate") | |||
| 372 | + | core.PuregoSafeRegister(&xTimedAnimationGetDuration, libs, "adw_timed_animation_get_duration") | |||
| 373 | + | core.PuregoSafeRegister(&xTimedAnimationGetEasing, libs, "adw_timed_animation_get_easing") | |||
| 374 | + | core.PuregoSafeRegister(&xTimedAnimationGetRepeatCount, libs, "adw_timed_animation_get_repeat_count") | |||
| 375 | + | core.PuregoSafeRegister(&xTimedAnimationGetReverse, libs, "adw_timed_animation_get_reverse") | |||
| 376 | + | core.PuregoSafeRegister(&xTimedAnimationGetValueFrom, libs, "adw_timed_animation_get_value_from") | |||
| 377 | + | core.PuregoSafeRegister(&xTimedAnimationGetValueTo, libs, "adw_timed_animation_get_value_to") | |||
| 378 | + | core.PuregoSafeRegister(&xTimedAnimationSetAlternate, libs, "adw_timed_animation_set_alternate") | |||
| 379 | + | core.PuregoSafeRegister(&xTimedAnimationSetDuration, libs, "adw_timed_animation_set_duration") | |||
| 380 | + | core.PuregoSafeRegister(&xTimedAnimationSetEasing, libs, "adw_timed_animation_set_easing") | |||
| 381 | + | core.PuregoSafeRegister(&xTimedAnimationSetRepeatCount, libs, "adw_timed_animation_set_repeat_count") | |||
| 382 | + | core.PuregoSafeRegister(&xTimedAnimationSetReverse, libs, "adw_timed_animation_set_reverse") | |||
| 383 | + | core.PuregoSafeRegister(&xTimedAnimationSetValueFrom, libs, "adw_timed_animation_set_value_from") | |||
| 384 | + | core.PuregoSafeRegister(&xTimedAnimationSetValueTo, libs, "adw_timed_animation_set_value_to") | |||
| 387 | } | 385 | } | ||