Merge pull request #350 from bnema/fix/repin-fixed-puregotk
fix(deps): validate puregotk lazy registration fix
907 files · +27874 -25296
M go.mod +3 -1
| @@ -11,7 +11,7 @@ require ( | |||
| 11 | 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | |
| 12 | 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | |
| 13 | 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | |
| 14 | - | github.com/bnema/puregotk v0.7.0 | |
| 14 | + | github.com/bnema/puregotk v0.7.1-0.20260714200603-7370c78950ef | |
| 15 | 15 | github.com/charmbracelet/bubbles v1.0.0 | |
| 16 | 16 | github.com/charmbracelet/bubbletea v1.3.10 | |
| 17 | 17 | github.com/charmbracelet/lipgloss v1.1.0 | |
| @@ -47,6 +47,7 @@ require ( | |||
| 47 | 47 | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect | |
| 48 | 48 | github.com/fatih/color v1.19.0 // indirect | |
| 49 | 49 | github.com/go-viper/mapstructure/v2 v2.5.0 // indirect | |
| 50 | + | github.com/google/go-cmp v0.7.0 // indirect | |
| 50 | 51 | github.com/inconshreveable/mousetrap v1.1.0 // indirect | |
| 51 | 52 | github.com/lucasb-eyer/go-colorful v1.4.0 // indirect | |
| 52 | 53 | github.com/mattn/go-colorable v0.1.14 // indirect | |
| @@ -80,6 +81,7 @@ require ( | |||
| 80 | 81 | golang.org/x/text v0.40.0 // indirect | |
| 81 | 82 | golang.org/x/tools v0.47.0 // indirect | |
| 82 | 83 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | |
| 84 | + | mvdan.cc/gofumpt v0.9.2 // indirect | |
| 83 | 85 | ) | |
| 84 | 86 | ||
| 85 | 87 | tool github.com/a-h/templ/cmd/templ | |
| @@ -11,7 +11,7 @@ require ( | |||||
| 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | ||
| 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | ||
| 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | ||
| 14 | - | github.com/bnema/puregotk v0.7.0 | 14 | + | github.com/bnema/puregotk v0.7.1-0.20260714200603-7370c78950ef |
| 15 | github.com/charmbracelet/bubbles v1.0.0 | 15 | github.com/charmbracelet/bubbles v1.0.0 | ||
| 16 | github.com/charmbracelet/bubbletea v1.3.10 | 16 | github.com/charmbracelet/bubbletea v1.3.10 | ||
| 17 | github.com/charmbracelet/lipgloss v1.1.0 | 17 | github.com/charmbracelet/lipgloss v1.1.0 | ||
| @@ -47,6 +47,7 @@ require ( | |||||
| 47 | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect | 47 | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect | ||
| 48 | github.com/fatih/color v1.19.0 // indirect | 48 | github.com/fatih/color v1.19.0 // indirect | ||
| 49 | github.com/go-viper/mapstructure/v2 v2.5.0 // indirect | 49 | github.com/go-viper/mapstructure/v2 v2.5.0 // indirect | ||
| 50 | + | github.com/google/go-cmp v0.7.0 // indirect | |||
| 50 | github.com/inconshreveable/mousetrap v1.1.0 // indirect | 51 | github.com/inconshreveable/mousetrap v1.1.0 // indirect | ||
| 51 | github.com/lucasb-eyer/go-colorful v1.4.0 // indirect | 52 | github.com/lucasb-eyer/go-colorful v1.4.0 // indirect | ||
| 52 | github.com/mattn/go-colorable v0.1.14 // indirect | 53 | github.com/mattn/go-colorable v0.1.14 // indirect | ||
| @@ -80,6 +81,7 @@ require ( | |||||
| 80 | golang.org/x/text v0.40.0 // indirect | 81 | golang.org/x/text v0.40.0 // indirect | ||
| 81 | golang.org/x/tools v0.47.0 // indirect | 82 | golang.org/x/tools v0.47.0 // indirect | ||
| 82 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | 83 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | ||
| 84 | + | mvdan.cc/gofumpt v0.9.2 // indirect | |||
| 83 | ) | 85 | ) | ||
| 84 | 86 | ||||
| 85 | tool github.com/a-h/templ/cmd/templ | 87 | tool github.com/a-h/templ/cmd/templ | ||
M go.sum +4 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/internal/core/core.go +197 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/pkg/core/core.go +10 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-dialog.go +99 -64 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-window.go +95 -62 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-accent-color.go +7 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-action-row.go +33 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-alert-dialog.go +66 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-target.go +10 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-util.go +4 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation.go +24 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application-window.go +14 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application.go +3 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-avatar.go +22 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-banner.go +23 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bin.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bottom-sheet.go +47 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint-bin.go +10 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint.go +33 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-content.go +18 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-row.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-dots.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-lines.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel.go +47 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-layout.go +14 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-scrollable.go +17 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp.go +17 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-combo-row.go +34 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-dialog.go +45 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-easing.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-entry-row.go +40 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-enum-list-model.go +13 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-expander-row.go +40 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-flap.go +61 -48 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-fold-threshold-policy.go +10 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-header-bar.go +36 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-inline-view-switcher.go +18 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout-slot.go +4 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout.go +7 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-leaflet.go +69 -56 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-length-unit.go +5 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-main.go +5 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-message-dialog.go +63 -44 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-multi-layout-view.go +17 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-direction.go +10 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-split-view.go +36 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-view.go +60 -49 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-overlay-split-view.go +48 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-password-entry-row.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-dialog.go +23 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-group.go +24 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-page.go +38 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-row.go +18 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-window.go +31 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcut-label.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-dialog.go +4 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-item.go +23 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-section.go +8 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar-item.go +45 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar-section.go +24 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar.go +41 -39 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spin-row.go +40 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spinner-paintable.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spinner.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-split-button.go +39 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spring-animation.go +34 -30 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spring-params.go +17 -21
| @@ -5,7 +5,6 @@ import ( | |||
| 5 | 5 | "structs" | |
| 6 | 6 | "unsafe" | |
| 7 | 7 | ||
| 8 | - | "github.com/bnema/purego" | |
| 9 | 8 | "github.com/bnema/puregotk/pkg/core" | |
| 10 | 9 | "github.com/bnema/puregotk/v4/gobject/types" | |
| 11 | 10 | ) | |
| @@ -47,6 +46,7 @@ type SpringParams struct { | |||
| 47 | 46 | var xSpringParamsGLibType func() types.GType | |
| 48 | 47 | ||
| 49 | 48 | func SpringParamsGLibType() types.GType { | |
| 49 | + | core.LazyRegister(&xSpringParamsGLibType, "ADW", "adw_spring_params_get_type", false) | |
| 50 | 50 | return xSpringParamsGLibType() | |
| 51 | 51 | } | |
| 52 | 52 | ||
| @@ -80,6 +80,8 @@ 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 | + | ||
| 83 | 85 | cret := xNewSpringParams(DampingRatioVar, MassVar, StiffnessVar) | |
| 84 | 86 | if cret == 0 { | |
| 85 | 87 | return nil | |
| @@ -94,6 +96,8 @@ var xNewSpringParamsFull func(float64, float64, float64) uintptr | |||
| 94 | 96 | // See [ctor@SpringParams.new] for a simplified constructor using damping ratio | |
| 95 | 97 | // instead of @damping. | |
| 96 | 98 | func NewSpringParamsFull(DampingVar float64, MassVar float64, StiffnessVar float64) *SpringParams { | |
| 99 | + | core.LazyRegister(&xNewSpringParamsFull, "ADW", "adw_spring_params_new_full", false) | |
| 100 | + | ||
| 97 | 101 | cret := xNewSpringParamsFull(DampingVar, MassVar, StiffnessVar) | |
| 98 | 102 | if cret == 0 { | |
| 99 | 103 | return nil | |
| @@ -105,6 +109,8 @@ var xSpringParamsGetDamping func(uintptr) float64 | |||
| 105 | 109 | ||
| 106 | 110 | // Gets the damping of @self. | |
| 107 | 111 | func (x *SpringParams) GetDamping() float64 { | |
| 112 | + | core.LazyRegister(&xSpringParamsGetDamping, "ADW", "adw_spring_params_get_damping", false) | |
| 113 | + | ||
| 108 | 114 | cret := xSpringParamsGetDamping(x.GoPointer()) | |
| 109 | 115 | return cret | |
| 110 | 116 | } | |
| @@ -113,6 +119,8 @@ var xSpringParamsGetDampingRatio func(uintptr) float64 | |||
| 113 | 119 | ||
| 114 | 120 | // Gets the damping ratio of @self. | |
| 115 | 121 | func (x *SpringParams) GetDampingRatio() float64 { | |
| 122 | + | core.LazyRegister(&xSpringParamsGetDampingRatio, "ADW", "adw_spring_params_get_damping_ratio", false) | |
| 123 | + | ||
| 116 | 124 | cret := xSpringParamsGetDampingRatio(x.GoPointer()) | |
| 117 | 125 | return cret | |
| 118 | 126 | } | |
| @@ -121,6 +129,8 @@ var xSpringParamsGetMass func(uintptr) float64 | |||
| 121 | 129 | ||
| 122 | 130 | // Gets the mass of @self. | |
| 123 | 131 | func (x *SpringParams) GetMass() float64 { | |
| 132 | + | core.LazyRegister(&xSpringParamsGetMass, "ADW", "adw_spring_params_get_mass", false) | |
| 133 | + | ||
| 124 | 134 | cret := xSpringParamsGetMass(x.GoPointer()) | |
| 125 | 135 | return cret | |
| 126 | 136 | } | |
| @@ -129,6 +139,8 @@ var xSpringParamsGetStiffness func(uintptr) float64 | |||
| 129 | 139 | ||
| 130 | 140 | // Gets the stiffness of @self. | |
| 131 | 141 | func (x *SpringParams) GetStiffness() float64 { | |
| 142 | + | core.LazyRegister(&xSpringParamsGetStiffness, "ADW", "adw_spring_params_get_stiffness", false) | |
| 143 | + | ||
| 132 | 144 | cret := xSpringParamsGetStiffness(x.GoPointer()) | |
| 133 | 145 | return cret | |
| 134 | 146 | } | |
| @@ -137,6 +149,8 @@ var xSpringParamsRef func(uintptr) uintptr | |||
| 137 | 149 | ||
| 138 | 150 | // Increases the reference count of @self. | |
| 139 | 151 | func (x *SpringParams) Ref() *SpringParams { | |
| 152 | + | core.LazyRegister(&xSpringParamsRef, "ADW", "adw_spring_params_ref", false) | |
| 153 | + | ||
| 140 | 154 | cret := xSpringParamsRef(x.GoPointer()) | |
| 141 | 155 | if cret == 0 { | |
| 142 | 156 | return nil | |
| @@ -150,30 +164,12 @@ var xSpringParamsUnref func(uintptr) | |||
| 150 | 164 | // | |
| 151 | 165 | // If the last reference is dropped, the structure is freed. | |
| 152 | 166 | func (x *SpringParams) Unref() { | |
| 167 | + | core.LazyRegister(&xSpringParamsUnref, "ADW", "adw_spring_params_unref", false) | |
| 168 | + | ||
| 153 | 169 | xSpringParamsUnref(x.GoPointer()) | |
| 154 | 170 | } | |
| 155 | 171 | ||
| 156 | 172 | func init() { | |
| 157 | 173 | core.SetPackageName("ADW", "libadwaita-1") | |
| 158 | 174 | 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") | |
| 179 | 175 | } | |
| @@ -5,7 +5,6 @@ import ( | |||||
| 5 | "structs" | 5 | "structs" | ||
| 6 | "unsafe" | 6 | "unsafe" | ||
| 7 | 7 | ||||
| 8 | - | "github.com/bnema/purego" | |||
| 9 | "github.com/bnema/puregotk/pkg/core" | 8 | "github.com/bnema/puregotk/pkg/core" | ||
| 10 | "github.com/bnema/puregotk/v4/gobject/types" | 9 | "github.com/bnema/puregotk/v4/gobject/types" | ||
| 11 | ) | 10 | ) | ||
| @@ -47,6 +46,7 @@ type SpringParams struct { | |||||
| 47 | var xSpringParamsGLibType func() types.GType | 46 | var xSpringParamsGLibType func() types.GType | ||
| 48 | 47 | ||||
| 49 | func SpringParamsGLibType() types.GType { | 48 | 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,6 +80,8 @@ 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 | + | ||||
| 83 | cret := xNewSpringParams(DampingRatioVar, MassVar, StiffnessVar) | 85 | cret := xNewSpringParams(DampingRatioVar, MassVar, StiffnessVar) | ||
| 84 | if cret == 0 { | 86 | if cret == 0 { | ||
| 85 | return nil | 87 | return nil | ||
| @@ -94,6 +96,8 @@ var xNewSpringParamsFull func(float64, float64, float64) uintptr | |||||
| 94 | // See [ctor@SpringParams.new] for a simplified constructor using damping ratio | 96 | // See [ctor@SpringParams.new] for a simplified constructor using damping ratio | ||
| 95 | // instead of @damping. | 97 | // instead of @damping. | ||
| 96 | func NewSpringParamsFull(DampingVar float64, MassVar float64, StiffnessVar float64) *SpringParams { | 98 | func NewSpringParamsFull(DampingVar float64, MassVar float64, StiffnessVar float64) *SpringParams { | ||
| 99 | + | core.LazyRegister(&xNewSpringParamsFull, "ADW", "adw_spring_params_new_full", false) | |||
| 100 | + | ||||
| 97 | cret := xNewSpringParamsFull(DampingVar, MassVar, StiffnessVar) | 101 | cret := xNewSpringParamsFull(DampingVar, MassVar, StiffnessVar) | ||
| 98 | if cret == 0 { | 102 | if cret == 0 { | ||
| 99 | return nil | 103 | return nil | ||
| @@ -105,6 +109,8 @@ var xSpringParamsGetDamping func(uintptr) float64 | |||||
| 105 | 109 | ||||
| 106 | // Gets the damping of @self. | 110 | // Gets the damping of @self. | ||
| 107 | func (x *SpringParams) GetDamping() float64 { | 111 | func (x *SpringParams) GetDamping() float64 { | ||
| 112 | + | core.LazyRegister(&xSpringParamsGetDamping, "ADW", "adw_spring_params_get_damping", false) | |||
| 113 | + | ||||
| 108 | cret := xSpringParamsGetDamping(x.GoPointer()) | 114 | cret := xSpringParamsGetDamping(x.GoPointer()) | ||
| 109 | return cret | 115 | return cret | ||
| 110 | } | 116 | } | ||
| @@ -113,6 +119,8 @@ var xSpringParamsGetDampingRatio func(uintptr) float64 | |||||
| 113 | 119 | ||||
| 114 | // Gets the damping ratio of @self. | 120 | // Gets the damping ratio of @self. | ||
| 115 | func (x *SpringParams) GetDampingRatio() float64 { | 121 | func (x *SpringParams) GetDampingRatio() float64 { | ||
| 122 | + | core.LazyRegister(&xSpringParamsGetDampingRatio, "ADW", "adw_spring_params_get_damping_ratio", false) | |||
| 123 | + | ||||
| 116 | cret := xSpringParamsGetDampingRatio(x.GoPointer()) | 124 | cret := xSpringParamsGetDampingRatio(x.GoPointer()) | ||
| 117 | return cret | 125 | return cret | ||
| 118 | } | 126 | } | ||
| @@ -121,6 +129,8 @@ var xSpringParamsGetMass func(uintptr) float64 | |||||
| 121 | 129 | ||||
| 122 | // Gets the mass of @self. | 130 | // Gets the mass of @self. | ||
| 123 | func (x *SpringParams) GetMass() float64 { | 131 | func (x *SpringParams) GetMass() float64 { | ||
| 132 | + | core.LazyRegister(&xSpringParamsGetMass, "ADW", "adw_spring_params_get_mass", false) | |||
| 133 | + | ||||
| 124 | cret := xSpringParamsGetMass(x.GoPointer()) | 134 | cret := xSpringParamsGetMass(x.GoPointer()) | ||
| 125 | return cret | 135 | return cret | ||
| 126 | } | 136 | } | ||
| @@ -129,6 +139,8 @@ var xSpringParamsGetStiffness func(uintptr) float64 | |||||
| 129 | 139 | ||||
| 130 | // Gets the stiffness of @self. | 140 | // Gets the stiffness of @self. | ||
| 131 | func (x *SpringParams) GetStiffness() float64 { | 141 | func (x *SpringParams) GetStiffness() float64 { | ||
| 142 | + | core.LazyRegister(&xSpringParamsGetStiffness, "ADW", "adw_spring_params_get_stiffness", false) | |||
| 143 | + | ||||
| 132 | cret := xSpringParamsGetStiffness(x.GoPointer()) | 144 | cret := xSpringParamsGetStiffness(x.GoPointer()) | ||
| 133 | return cret | 145 | return cret | ||
| 134 | } | 146 | } | ||
| @@ -137,6 +149,8 @@ var xSpringParamsRef func(uintptr) uintptr | |||||
| 137 | 149 | ||||
| 138 | // Increases the reference count of @self. | 150 | // Increases the reference count of @self. | ||
| 139 | func (x *SpringParams) Ref() *SpringParams { | 151 | func (x *SpringParams) Ref() *SpringParams { | ||
| 152 | + | core.LazyRegister(&xSpringParamsRef, "ADW", "adw_spring_params_ref", false) | |||
| 153 | + | ||||
| 140 | cret := xSpringParamsRef(x.GoPointer()) | 154 | cret := xSpringParamsRef(x.GoPointer()) | ||
| 141 | if cret == 0 { | 155 | if cret == 0 { | ||
| 142 | return nil | 156 | return nil | ||
| @@ -150,30 +164,12 @@ var xSpringParamsUnref func(uintptr) | |||||
| 150 | // | 164 | // | ||
| 151 | // If the last reference is dropped, the structure is freed. | 165 | // If the last reference is dropped, the structure is freed. | ||
| 152 | func (x *SpringParams) Unref() { | 166 | func (x *SpringParams) Unref() { | ||
| 167 | + | core.LazyRegister(&xSpringParamsUnref, "ADW", "adw_spring_params_unref", false) | |||
| 168 | + | ||||
| 153 | xSpringParamsUnref(x.GoPointer()) | 169 | xSpringParamsUnref(x.GoPointer()) | ||
| 154 | } | 170 | } | ||
| 155 | 171 | ||||
| 156 | func init() { | 172 | func init() { | ||
| 157 | core.SetPackageName("ADW", "libadwaita-1") | 173 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 158 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 174 | 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") | |||
| 179 | } | 175 | } | ||