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
| @@ -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/types" | |
| 10 | 11 | ) | |
| @@ -46,7 +47,6 @@ type SpringParams struct { | |||
| 46 | 47 | var xSpringParamsGLibType func() types.GType | |
| 47 | 48 | ||
| 48 | 49 | func SpringParamsGLibType() types.GType { | |
| 49 | - | core.LazyRegister(&xSpringParamsGLibType, "ADW", "adw_spring_params_get_type", false) | |
| 50 | 50 | return xSpringParamsGLibType() | |
| 51 | 51 | } | |
| 52 | 52 | ||
| @@ -80,8 +80,6 @@ var xNewSpringParams func(float64, float64, float64) uintptr | |||
| 80 | 80 | // | |
| 81 | 81 | // [ctor@SpringParams.new_full] allows to pass a raw damping value instead. | |
| 82 | 82 | func NewSpringParams(DampingRatioVar float64, MassVar float64, StiffnessVar float64) *SpringParams { | |
| 83 | - | core.LazyRegister(&xNewSpringParams, "ADW", "adw_spring_params_new", false) | |
| 84 | - | ||
| 85 | 83 | cret := xNewSpringParams(DampingRatioVar, MassVar, StiffnessVar) | |
| 86 | 84 | if cret == 0 { | |
| 87 | 85 | return nil | |
| @@ -96,8 +94,6 @@ var xNewSpringParamsFull func(float64, float64, float64) uintptr | |||
| 96 | 94 | // See [ctor@SpringParams.new] for a simplified constructor using damping ratio | |
| 97 | 95 | // instead of @damping. | |
| 98 | 96 | func NewSpringParamsFull(DampingVar float64, MassVar float64, StiffnessVar float64) *SpringParams { | |
| 99 | - | core.LazyRegister(&xNewSpringParamsFull, "ADW", "adw_spring_params_new_full", false) | |
| 100 | - | ||
| 101 | 97 | cret := xNewSpringParamsFull(DampingVar, MassVar, StiffnessVar) | |
| 102 | 98 | if cret == 0 { | |
| 103 | 99 | return nil | |
| @@ -109,8 +105,6 @@ var xSpringParamsGetDamping func(uintptr) float64 | |||
| 109 | 105 | ||
| 110 | 106 | // Gets the damping of @self. | |
| 111 | 107 | func (x *SpringParams) GetDamping() float64 { | |
| 112 | - | core.LazyRegister(&xSpringParamsGetDamping, "ADW", "adw_spring_params_get_damping", false) | |
| 113 | - | ||
| 114 | 108 | cret := xSpringParamsGetDamping(x.GoPointer()) | |
| 115 | 109 | return cret | |
| 116 | 110 | } | |
| @@ -119,8 +113,6 @@ var xSpringParamsGetDampingRatio func(uintptr) float64 | |||
| 119 | 113 | ||
| 120 | 114 | // Gets the damping ratio of @self. | |
| 121 | 115 | func (x *SpringParams) GetDampingRatio() float64 { | |
| 122 | - | core.LazyRegister(&xSpringParamsGetDampingRatio, "ADW", "adw_spring_params_get_damping_ratio", false) | |
| 123 | - | ||
| 124 | 116 | cret := xSpringParamsGetDampingRatio(x.GoPointer()) | |
| 125 | 117 | return cret | |
| 126 | 118 | } | |
| @@ -129,8 +121,6 @@ var xSpringParamsGetMass func(uintptr) float64 | |||
| 129 | 121 | ||
| 130 | 122 | // Gets the mass of @self. | |
| 131 | 123 | func (x *SpringParams) GetMass() float64 { | |
| 132 | - | core.LazyRegister(&xSpringParamsGetMass, "ADW", "adw_spring_params_get_mass", false) | |
| 133 | - | ||
| 134 | 124 | cret := xSpringParamsGetMass(x.GoPointer()) | |
| 135 | 125 | return cret | |
| 136 | 126 | } | |
| @@ -139,8 +129,6 @@ var xSpringParamsGetStiffness func(uintptr) float64 | |||
| 139 | 129 | ||
| 140 | 130 | // Gets the stiffness of @self. | |
| 141 | 131 | func (x *SpringParams) GetStiffness() float64 { | |
| 142 | - | core.LazyRegister(&xSpringParamsGetStiffness, "ADW", "adw_spring_params_get_stiffness", false) | |
| 143 | - | ||
| 144 | 132 | cret := xSpringParamsGetStiffness(x.GoPointer()) | |
| 145 | 133 | return cret | |
| 146 | 134 | } | |
| @@ -149,8 +137,6 @@ var xSpringParamsRef func(uintptr) uintptr | |||
| 149 | 137 | ||
| 150 | 138 | // Increases the reference count of @self. | |
| 151 | 139 | func (x *SpringParams) Ref() *SpringParams { | |
| 152 | - | core.LazyRegister(&xSpringParamsRef, "ADW", "adw_spring_params_ref", false) | |
| 153 | - | ||
| 154 | 140 | cret := xSpringParamsRef(x.GoPointer()) | |
| 155 | 141 | if cret == 0 { | |
| 156 | 142 | return nil | |
| @@ -164,12 +150,30 @@ var xSpringParamsUnref func(uintptr) | |||
| 164 | 150 | // | |
| 165 | 151 | // If the last reference is dropped, the structure is freed. | |
| 166 | 152 | func (x *SpringParams) Unref() { | |
| 167 | - | core.LazyRegister(&xSpringParamsUnref, "ADW", "adw_spring_params_unref", false) | |
| 168 | - | ||
| 169 | 153 | xSpringParamsUnref(x.GoPointer()) | |
| 170 | 154 | } | |
| 171 | 155 | ||
| 172 | 156 | func init() { | |
| 173 | 157 | core.SetPackageName("ADW", "libadwaita-1") | |
| 174 | 158 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | |
| 159 | + | var libs []uintptr | |
| 160 | + | for _, libPath := range core.GetPaths("ADW") { | |
| 161 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 162 | + | if err != nil { | |
| 163 | + | panic(err) | |
| 164 | + | } | |
| 165 | + | libs = append(libs, lib) | |
| 166 | + | } | |
| 167 | + | ||
| 168 | + | core.PuregoSafeRegister(&xSpringParamsGLibType, libs, "adw_spring_params_get_type") | |
| 169 | + | ||
| 170 | + | core.PuregoSafeRegister(&xNewSpringParams, libs, "adw_spring_params_new") | |
| 171 | + | core.PuregoSafeRegister(&xNewSpringParamsFull, libs, "adw_spring_params_new_full") | |
| 172 | + | ||
| 173 | + | core.PuregoSafeRegister(&xSpringParamsGetDamping, libs, "adw_spring_params_get_damping") | |
| 174 | + | core.PuregoSafeRegister(&xSpringParamsGetDampingRatio, libs, "adw_spring_params_get_damping_ratio") | |
| 175 | + | core.PuregoSafeRegister(&xSpringParamsGetMass, libs, "adw_spring_params_get_mass") | |
| 176 | + | core.PuregoSafeRegister(&xSpringParamsGetStiffness, libs, "adw_spring_params_get_stiffness") | |
| 177 | + | core.PuregoSafeRegister(&xSpringParamsRef, libs, "adw_spring_params_ref") | |
| 178 | + | core.PuregoSafeRegister(&xSpringParamsUnref, libs, "adw_spring_params_unref") | |
| 175 | 179 | } | |
| @@ -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/types" | 10 | "github.com/bnema/puregotk/v4/gobject/types" | ||
| 10 | ) | 11 | ) | ||
| @@ -46,7 +47,6 @@ type SpringParams struct { | |||||
| 46 | var xSpringParamsGLibType func() types.GType | 47 | var xSpringParamsGLibType func() types.GType | ||
| 47 | 48 | ||||
| 48 | func SpringParamsGLibType() types.GType { | 49 | func SpringParamsGLibType() types.GType { | ||
| 49 | - | core.LazyRegister(&xSpringParamsGLibType, "ADW", "adw_spring_params_get_type", false) | |||
| 50 | return xSpringParamsGLibType() | 50 | return xSpringParamsGLibType() | ||
| 51 | } | 51 | } | ||
| 52 | 52 | ||||
| @@ -80,8 +80,6 @@ var xNewSpringParams func(float64, float64, float64) uintptr | |||||
| 80 | // | 80 | // | ||
| 81 | // [ctor@SpringParams.new_full] allows to pass a raw damping value instead. | 81 | // [ctor@SpringParams.new_full] allows to pass a raw damping value instead. | ||
| 82 | func NewSpringParams(DampingRatioVar float64, MassVar float64, StiffnessVar float64) *SpringParams { | 82 | func NewSpringParams(DampingRatioVar float64, MassVar float64, StiffnessVar float64) *SpringParams { | ||
| 83 | - | core.LazyRegister(&xNewSpringParams, "ADW", "adw_spring_params_new", false) | |||
| 84 | - | ||||
| 85 | cret := xNewSpringParams(DampingRatioVar, MassVar, StiffnessVar) | 83 | cret := xNewSpringParams(DampingRatioVar, MassVar, StiffnessVar) | ||
| 86 | if cret == 0 { | 84 | if cret == 0 { | ||
| 87 | return nil | 85 | return nil | ||
| @@ -96,8 +94,6 @@ var xNewSpringParamsFull func(float64, float64, float64) uintptr | |||||
| 96 | // See [ctor@SpringParams.new] for a simplified constructor using damping ratio | 94 | // See [ctor@SpringParams.new] for a simplified constructor using damping ratio | ||
| 97 | // instead of @damping. | 95 | // instead of @damping. | ||
| 98 | func NewSpringParamsFull(DampingVar float64, MassVar float64, StiffnessVar float64) *SpringParams { | 96 | func NewSpringParamsFull(DampingVar float64, MassVar float64, StiffnessVar float64) *SpringParams { | ||
| 99 | - | core.LazyRegister(&xNewSpringParamsFull, "ADW", "adw_spring_params_new_full", false) | |||
| 100 | - | ||||
| 101 | cret := xNewSpringParamsFull(DampingVar, MassVar, StiffnessVar) | 97 | cret := xNewSpringParamsFull(DampingVar, MassVar, StiffnessVar) | ||
| 102 | if cret == 0 { | 98 | if cret == 0 { | ||
| 103 | return nil | 99 | return nil | ||
| @@ -109,8 +105,6 @@ var xSpringParamsGetDamping func(uintptr) float64 | |||||
| 109 | 105 | ||||
| 110 | // Gets the damping of @self. | 106 | // Gets the damping of @self. | ||
| 111 | func (x *SpringParams) GetDamping() float64 { | 107 | func (x *SpringParams) GetDamping() float64 { | ||
| 112 | - | core.LazyRegister(&xSpringParamsGetDamping, "ADW", "adw_spring_params_get_damping", false) | |||
| 113 | - | ||||
| 114 | cret := xSpringParamsGetDamping(x.GoPointer()) | 108 | cret := xSpringParamsGetDamping(x.GoPointer()) | ||
| 115 | return cret | 109 | return cret | ||
| 116 | } | 110 | } | ||
| @@ -119,8 +113,6 @@ var xSpringParamsGetDampingRatio func(uintptr) float64 | |||||
| 119 | 113 | ||||
| 120 | // Gets the damping ratio of @self. | 114 | // Gets the damping ratio of @self. | ||
| 121 | func (x *SpringParams) GetDampingRatio() float64 { | 115 | func (x *SpringParams) GetDampingRatio() float64 { | ||
| 122 | - | core.LazyRegister(&xSpringParamsGetDampingRatio, "ADW", "adw_spring_params_get_damping_ratio", false) | |||
| 123 | - | ||||
| 124 | cret := xSpringParamsGetDampingRatio(x.GoPointer()) | 116 | cret := xSpringParamsGetDampingRatio(x.GoPointer()) | ||
| 125 | return cret | 117 | return cret | ||
| 126 | } | 118 | } | ||
| @@ -129,8 +121,6 @@ var xSpringParamsGetMass func(uintptr) float64 | |||||
| 129 | 121 | ||||
| 130 | // Gets the mass of @self. | 122 | // Gets the mass of @self. | ||
| 131 | func (x *SpringParams) GetMass() float64 { | 123 | func (x *SpringParams) GetMass() float64 { | ||
| 132 | - | core.LazyRegister(&xSpringParamsGetMass, "ADW", "adw_spring_params_get_mass", false) | |||
| 133 | - | ||||
| 134 | cret := xSpringParamsGetMass(x.GoPointer()) | 124 | cret := xSpringParamsGetMass(x.GoPointer()) | ||
| 135 | return cret | 125 | return cret | ||
| 136 | } | 126 | } | ||
| @@ -139,8 +129,6 @@ var xSpringParamsGetStiffness func(uintptr) float64 | |||||
| 139 | 129 | ||||
| 140 | // Gets the stiffness of @self. | 130 | // Gets the stiffness of @self. | ||
| 141 | func (x *SpringParams) GetStiffness() float64 { | 131 | func (x *SpringParams) GetStiffness() float64 { | ||
| 142 | - | core.LazyRegister(&xSpringParamsGetStiffness, "ADW", "adw_spring_params_get_stiffness", false) | |||
| 143 | - | ||||
| 144 | cret := xSpringParamsGetStiffness(x.GoPointer()) | 132 | cret := xSpringParamsGetStiffness(x.GoPointer()) | ||
| 145 | return cret | 133 | return cret | ||
| 146 | } | 134 | } | ||
| @@ -149,8 +137,6 @@ var xSpringParamsRef func(uintptr) uintptr | |||||
| 149 | 137 | ||||
| 150 | // Increases the reference count of @self. | 138 | // Increases the reference count of @self. | ||
| 151 | func (x *SpringParams) Ref() *SpringParams { | 139 | func (x *SpringParams) Ref() *SpringParams { | ||
| 152 | - | core.LazyRegister(&xSpringParamsRef, "ADW", "adw_spring_params_ref", false) | |||
| 153 | - | ||||
| 154 | cret := xSpringParamsRef(x.GoPointer()) | 140 | cret := xSpringParamsRef(x.GoPointer()) | ||
| 155 | if cret == 0 { | 141 | if cret == 0 { | ||
| 156 | return nil | 142 | return nil | ||
| @@ -164,12 +150,30 @@ var xSpringParamsUnref func(uintptr) | |||||
| 164 | // | 150 | // | ||
| 165 | // If the last reference is dropped, the structure is freed. | 151 | // If the last reference is dropped, the structure is freed. | ||
| 166 | func (x *SpringParams) Unref() { | 152 | func (x *SpringParams) Unref() { | ||
| 167 | - | core.LazyRegister(&xSpringParamsUnref, "ADW", "adw_spring_params_unref", false) | |||
| 168 | - | ||||
| 169 | xSpringParamsUnref(x.GoPointer()) | 153 | xSpringParamsUnref(x.GoPointer()) | ||
| 170 | } | 154 | } | ||
| 171 | 155 | ||||
| 172 | func init() { | 156 | func init() { | ||
| 173 | core.SetPackageName("ADW", "libadwaita-1") | 157 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 174 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 158 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | ||
| 159 | + | var libs []uintptr | |||
| 160 | + | for _, libPath := range core.GetPaths("ADW") { | |||
| 161 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 162 | + | if err != nil { | |||
| 163 | + | panic(err) | |||
| 164 | + | } | |||
| 165 | + | libs = append(libs, lib) | |||
| 166 | + | } | |||
| 167 | + | ||||
| 168 | + | core.PuregoSafeRegister(&xSpringParamsGLibType, libs, "adw_spring_params_get_type") | |||
| 169 | + | ||||
| 170 | + | core.PuregoSafeRegister(&xNewSpringParams, libs, "adw_spring_params_new") | |||
| 171 | + | core.PuregoSafeRegister(&xNewSpringParamsFull, libs, "adw_spring_params_new_full") | |||
| 172 | + | ||||
| 173 | + | core.PuregoSafeRegister(&xSpringParamsGetDamping, libs, "adw_spring_params_get_damping") | |||
| 174 | + | core.PuregoSafeRegister(&xSpringParamsGetDampingRatio, libs, "adw_spring_params_get_damping_ratio") | |||
| 175 | + | core.PuregoSafeRegister(&xSpringParamsGetMass, libs, "adw_spring_params_get_mass") | |||
| 176 | + | core.PuregoSafeRegister(&xSpringParamsGetStiffness, libs, "adw_spring_params_get_stiffness") | |||
| 177 | + | core.PuregoSafeRegister(&xSpringParamsRef, libs, "adw_spring_params_ref") | |||
| 178 | + | core.PuregoSafeRegister(&xSpringParamsUnref, libs, "adw_spring_params_unref") | |||
| 175 | } | 179 | } | ||