fix(deps): repin puregotk lazy registration fix
- commit
- d685b6e820d6baba0d0dea254169664012ed203d
- author
- brice · · 2026-07-14 18:24 UTC
- parent
- ec6db2e
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
907 files · +27874 -25294
M go.mod +3 -1
| @@ -11,7 +11,7 @@ require ( | |||
| 11 | 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | |
| 12 | 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | |
| 13 | 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | |
| 14 | - | github.com/bnema/puregotk v0.7.0 | |
| 14 | + | github.com/bnema/puregotk v0.7.1-0.20260714181430-679a9ed72959 | |
| 15 | 15 | github.com/charmbracelet/bubbles v1.0.0 | |
| 16 | 16 | github.com/charmbracelet/bubbletea v1.3.10 | |
| 17 | 17 | github.com/charmbracelet/lipgloss v1.1.0 | |
| @@ -47,6 +47,7 @@ require ( | |||
| 47 | 47 | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect | |
| 48 | 48 | github.com/fatih/color v1.19.0 // indirect | |
| 49 | 49 | github.com/go-viper/mapstructure/v2 v2.5.0 // indirect | |
| 50 | + | github.com/google/go-cmp v0.7.0 // indirect | |
| 50 | 51 | github.com/inconshreveable/mousetrap v1.1.0 // indirect | |
| 51 | 52 | github.com/lucasb-eyer/go-colorful v1.4.0 // indirect | |
| 52 | 53 | github.com/mattn/go-colorable v0.1.14 // indirect | |
| @@ -80,6 +81,7 @@ require ( | |||
| 80 | 81 | golang.org/x/text v0.40.0 // indirect | |
| 81 | 82 | golang.org/x/tools v0.47.0 // indirect | |
| 82 | 83 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | |
| 84 | + | mvdan.cc/gofumpt v0.9.2 // indirect | |
| 83 | 85 | ) | |
| 84 | 86 | ||
| 85 | 87 | tool github.com/a-h/templ/cmd/templ | |
| @@ -11,7 +11,7 @@ require ( | |||||
| 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | ||
| 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | ||
| 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | ||
| 14 | - | github.com/bnema/puregotk v0.7.0 | 14 | + | github.com/bnema/puregotk v0.7.1-0.20260714181430-679a9ed72959 |
| 15 | github.com/charmbracelet/bubbles v1.0.0 | 15 | github.com/charmbracelet/bubbles v1.0.0 | ||
| 16 | github.com/charmbracelet/bubbletea v1.3.10 | 16 | github.com/charmbracelet/bubbletea v1.3.10 | ||
| 17 | github.com/charmbracelet/lipgloss v1.1.0 | 17 | github.com/charmbracelet/lipgloss v1.1.0 | ||
| @@ -47,6 +47,7 @@ require ( | |||||
| 47 | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect | 47 | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect | ||
| 48 | github.com/fatih/color v1.19.0 // indirect | 48 | github.com/fatih/color v1.19.0 // indirect | ||
| 49 | github.com/go-viper/mapstructure/v2 v2.5.0 // indirect | 49 | github.com/go-viper/mapstructure/v2 v2.5.0 // indirect | ||
| 50 | + | github.com/google/go-cmp v0.7.0 // indirect | |||
| 50 | github.com/inconshreveable/mousetrap v1.1.0 // indirect | 51 | github.com/inconshreveable/mousetrap v1.1.0 // indirect | ||
| 51 | github.com/lucasb-eyer/go-colorful v1.4.0 // indirect | 52 | github.com/lucasb-eyer/go-colorful v1.4.0 // indirect | ||
| 52 | github.com/mattn/go-colorable v0.1.14 // indirect | 53 | github.com/mattn/go-colorable v0.1.14 // indirect | ||
| @@ -80,6 +81,7 @@ require ( | |||||
| 80 | golang.org/x/text v0.40.0 // indirect | 81 | golang.org/x/text v0.40.0 // indirect | ||
| 81 | golang.org/x/tools v0.47.0 // indirect | 82 | golang.org/x/tools v0.47.0 // indirect | ||
| 82 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | 83 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | ||
| 84 | + | mvdan.cc/gofumpt v0.9.2 // indirect | |||
| 83 | ) | 85 | ) | ||
| 84 | 86 | ||||
| 85 | tool github.com/a-h/templ/cmd/templ | 87 | tool github.com/a-h/templ/cmd/templ | ||
M go.sum +4 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/internal/core/core.go +197 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/pkg/core/core.go +10 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-dialog.go +99 -64 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-window.go +95 -62 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-accent-color.go +7 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-action-row.go +33 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-alert-dialog.go +66 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-target.go +10 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-util.go +4 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation.go +24 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application-window.go +14 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application.go +3 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-avatar.go +22 -25 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
| @@ -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/glib" | |
| 11 | 10 | "github.com/bnema/puregotk/v4/gobject" | |
| @@ -77,6 +76,7 @@ type SpinRow struct { | |||
| 77 | 76 | var xSpinRowGLibType func() types.GType | |
| 78 | 77 | ||
| 79 | 78 | func SpinRowGLibType() types.GType { | |
| 79 | + | core.LazyRegister(&xSpinRowGLibType, "ADW", "adw_spin_row_get_type", false) | |
| 80 | 80 | return xSpinRowGLibType() | |
| 81 | 81 | } | |
| 82 | 82 | ||
| @@ -90,6 +90,7 @@ var xNewSpinRow func(uintptr, float64, uint) uintptr | |||
| 90 | 90 | ||
| 91 | 91 | // Creates a new `AdwSpinRow`. | |
| 92 | 92 | func NewSpinRow(AdjustmentVar *gtk.Adjustment, ClimbRateVar float64, DigitsVar uint) *SpinRow { | |
| 93 | + | core.LazyRegister(&xNewSpinRow, "ADW", "adw_spin_row_new", false) | |
| 93 | 94 | var cls *SpinRow | |
| 94 | 95 | ||
| 95 | 96 | cret := xNewSpinRow(AdjustmentVar.GoPointer(), ClimbRateVar, DigitsVar) | |
| @@ -118,6 +119,7 @@ var xNewSpinRowWithRange func(float64, float64, float64) uintptr | |||
| 118 | 119 | // of ten. If the resulting precision is not suitable for your needs, use | |
| 119 | 120 | // [method@SpinRow.set_digits] to correct it. | |
| 120 | 121 | func NewSpinRowWithRange(MinVar float64, MaxVar float64, StepVar float64) *SpinRow { | |
| 122 | + | core.LazyRegister(&xNewSpinRowWithRange, "ADW", "adw_spin_row_new_with_range", false) | |
| 121 | 123 | var cls *SpinRow | |
| 122 | 124 | ||
| 123 | 125 | cret := xNewSpinRowWithRange(MinVar, MaxVar, StepVar) | |
| @@ -138,6 +140,8 @@ var xSpinRowConfigure func(uintptr, uintptr, float64, uint) | |||
| 138 | 140 | // The adjustment, climb rate, and number of decimal places are updated | |
| 139 | 141 | // accordingly. | |
| 140 | 142 | func (x *SpinRow) Configure(AdjustmentVar *gtk.Adjustment, ClimbRateVar float64, DigitsVar uint) { | |
| 143 | + | core.LazyRegister(&xSpinRowConfigure, "ADW", "adw_spin_row_configure", false) | |
| 144 | + | ||
| 141 | 145 | xSpinRowConfigure(x.GoPointer(), AdjustmentVar.GoPointer(), ClimbRateVar, DigitsVar) | |
| 142 | 146 | } | |
| 143 | 147 | ||
| @@ -145,6 +149,7 @@ var xSpinRowGetAdjustment func(uintptr) uintptr | |||
| 145 | 149 | ||
| 146 | 150 | // Gets the adjustment that holds the value for the spin row. | |
| 147 | 151 | func (x *SpinRow) GetAdjustment() *gtk.Adjustment { | |
| 152 | + | core.LazyRegister(&xSpinRowGetAdjustment, "ADW", "adw_spin_row_get_adjustment", false) | |
| 148 | 153 | var cls *gtk.Adjustment | |
| 149 | 154 | ||
| 150 | 155 | cret := xSpinRowGetAdjustment(x.GoPointer()) | |
| @@ -162,6 +167,8 @@ var xSpinRowGetClimbRate func(uintptr) float64 | |||
| 162 | 167 | ||
| 163 | 168 | // Gets the acceleration rate when you hold down a button or key. | |
| 164 | 169 | func (x *SpinRow) GetClimbRate() float64 { | |
| 170 | + | core.LazyRegister(&xSpinRowGetClimbRate, "ADW", "adw_spin_row_get_climb_rate", false) | |
| 171 | + | ||
| 165 | 172 | cret := xSpinRowGetClimbRate(x.GoPointer()) | |
| 166 | 173 | return cret | |
| 167 | 174 | } | |
| @@ -170,6 +177,8 @@ var xSpinRowGetDigits func(uintptr) uint | |||
| 170 | 177 | ||
| 171 | 178 | // Gets the number of decimal places to display. | |
| 172 | 179 | func (x *SpinRow) GetDigits() uint { | |
| 180 | + | core.LazyRegister(&xSpinRowGetDigits, "ADW", "adw_spin_row_get_digits", false) | |
| 181 | + | ||
| 173 | 182 | cret := xSpinRowGetDigits(x.GoPointer()) | |
| 174 | 183 | return cret | |
| 175 | 184 | } | |
| @@ -178,6 +187,8 @@ var xSpinRowGetNumeric func(uintptr) bool | |||
| 178 | 187 | ||
| 179 | 188 | // Gets whether non-numeric characters should be ignored. | |
| 180 | 189 | func (x *SpinRow) GetNumeric() bool { | |
| 190 | + | core.LazyRegister(&xSpinRowGetNumeric, "ADW", "adw_spin_row_get_numeric", false) | |
| 191 | + | ||
| 181 | 192 | cret := xSpinRowGetNumeric(x.GoPointer()) | |
| 182 | 193 | return cret | |
| 183 | 194 | } | |
| @@ -186,6 +197,8 @@ var xSpinRowGetSnapToTicks func(uintptr) bool | |||
| 186 | 197 | ||
| 187 | 198 | // Gets whether invalid values are snapped to nearest step increment. | |
| 188 | 199 | func (x *SpinRow) GetSnapToTicks() bool { | |
| 200 | + | core.LazyRegister(&xSpinRowGetSnapToTicks, "ADW", "adw_spin_row_get_snap_to_ticks", false) | |
| 201 | + | ||
| 189 | 202 | cret := xSpinRowGetSnapToTicks(x.GoPointer()) | |
| 190 | 203 | return cret | |
| 191 | 204 | } | |
| @@ -194,6 +207,8 @@ var xSpinRowGetUpdatePolicy func(uintptr) gtk.SpinButtonUpdatePolicy | |||
| 194 | 207 | ||
| 195 | 208 | // Gets the policy for updating the spin row. | |
| 196 | 209 | func (x *SpinRow) GetUpdatePolicy() gtk.SpinButtonUpdatePolicy { | |
| 210 | + | core.LazyRegister(&xSpinRowGetUpdatePolicy, "ADW", "adw_spin_row_get_update_policy", false) | |
| 211 | + | ||
| 197 | 212 | cret := xSpinRowGetUpdatePolicy(x.GoPointer()) | |
| 198 | 213 | return cret | |
| 199 | 214 | } | |
| @@ -202,6 +217,8 @@ var xSpinRowGetValue func(uintptr) float64 | |||
| 202 | 217 | ||
| 203 | 218 | // Gets the current value. | |
| 204 | 219 | func (x *SpinRow) GetValue() float64 { | |
| 220 | + | core.LazyRegister(&xSpinRowGetValue, "ADW", "adw_spin_row_get_value", false) | |
| 221 | + | ||
| 205 | 222 | cret := xSpinRowGetValue(x.GoPointer()) | |
| 206 | 223 | return cret | |
| 207 | 224 | } | |
| @@ -210,6 +227,8 @@ var xSpinRowGetWrap func(uintptr) bool | |||
| 210 | 227 | ||
| 211 | 228 | // Gets whether the spin row should wrap upon reaching its limits. | |
| 212 | 229 | func (x *SpinRow) GetWrap() bool { | |
| 230 | + | core.LazyRegister(&xSpinRowGetWrap, "ADW", "adw_spin_row_get_wrap", false) | |
| 231 | + | ||
| 213 | 232 | cret := xSpinRowGetWrap(x.GoPointer()) | |
| 214 | 233 | return cret | |
| 215 | 234 | } | |
| @@ -218,6 +237,8 @@ var xSpinRowSetAdjustment func(uintptr, uintptr) | |||
| 218 | 237 | ||
| 219 | 238 | // Sets the adjustment that holds the value for the spin row. | |
| 220 | 239 | func (x *SpinRow) SetAdjustment(AdjustmentVar *gtk.Adjustment) { | |
| 240 | + | core.LazyRegister(&xSpinRowSetAdjustment, "ADW", "adw_spin_row_set_adjustment", false) | |
| 241 | + | ||
| 221 | 242 | xSpinRowSetAdjustment(x.GoPointer(), AdjustmentVar.GoPointer()) | |
| 222 | 243 | } | |
| 223 | 244 | ||
| @@ -225,6 +246,8 @@ var xSpinRowSetClimbRate func(uintptr, float64) | |||
| 225 | 246 | ||
| 226 | 247 | // Sets the acceleration rate when you hold down a button or key. | |
| 227 | 248 | func (x *SpinRow) SetClimbRate(ClimbRateVar float64) { | |
| 249 | + | core.LazyRegister(&xSpinRowSetClimbRate, "ADW", "adw_spin_row_set_climb_rate", false) | |
| 250 | + | ||
| 228 | 251 | xSpinRowSetClimbRate(x.GoPointer(), ClimbRateVar) | |
| 229 | 252 | } | |
| 230 | 253 | ||
| @@ -232,6 +255,8 @@ var xSpinRowSetDigits func(uintptr, uint) | |||
| 232 | 255 | ||
| 233 | 256 | // Sets the number of decimal places to display. | |
| 234 | 257 | func (x *SpinRow) SetDigits(DigitsVar uint) { | |
| 258 | + | core.LazyRegister(&xSpinRowSetDigits, "ADW", "adw_spin_row_set_digits", false) | |
| 259 | + | ||
| 235 | 260 | xSpinRowSetDigits(x.GoPointer(), DigitsVar) | |
| 236 | 261 | } | |
| 237 | 262 | ||
| @@ -239,6 +264,8 @@ var xSpinRowSetNumeric func(uintptr, bool) | |||
| 239 | 264 | ||
| 240 | 265 | // Sets whether non-numeric characters should be ignored. | |
| 241 | 266 | func (x *SpinRow) SetNumeric(NumericVar bool) { | |
| 267 | + | core.LazyRegister(&xSpinRowSetNumeric, "ADW", "adw_spin_row_set_numeric", false) | |
| 268 | + | ||
| 242 | 269 | xSpinRowSetNumeric(x.GoPointer(), NumericVar) | |
| 243 | 270 | } | |
| 244 | 271 | ||
| @@ -249,6 +276,8 @@ var xSpinRowSetRange func(uintptr, float64, float64) | |||
| 249 | 276 | // If the current value is outside this range, it will be adjusted | |
| 250 | 277 | // to fit within the range, otherwise it will remain unchanged. | |
| 251 | 278 | func (x *SpinRow) SetRange(MinVar float64, MaxVar float64) { | |
| 279 | + | core.LazyRegister(&xSpinRowSetRange, "ADW", "adw_spin_row_set_range", false) | |
| 280 | + | ||
| 252 | 281 | xSpinRowSetRange(x.GoPointer(), MinVar, MaxVar) | |
| 253 | 282 | } | |
| 254 | 283 | ||
| @@ -256,6 +285,8 @@ var xSpinRowSetSnapToTicks func(uintptr, bool) | |||
| 256 | 285 | ||
| 257 | 286 | // Sets whether invalid values are snapped to the nearest step increment. | |
| 258 | 287 | func (x *SpinRow) SetSnapToTicks(SnapToTicksVar bool) { | |
| 288 | + | core.LazyRegister(&xSpinRowSetSnapToTicks, "ADW", "adw_spin_row_set_snap_to_ticks", false) | |
| 289 | + | ||
| 259 | 290 | xSpinRowSetSnapToTicks(x.GoPointer(), SnapToTicksVar) | |
| 260 | 291 | } | |
| 261 | 292 | ||
| @@ -265,6 +296,8 @@ var xSpinRowSetUpdatePolicy func(uintptr, gtk.SpinButtonUpdatePolicy) | |||
| 265 | 296 | // | |
| 266 | 297 | // The options are always, or only when the value is invalid. | |
| 267 | 298 | func (x *SpinRow) SetUpdatePolicy(PolicyVar gtk.SpinButtonUpdatePolicy) { | |
| 299 | + | core.LazyRegister(&xSpinRowSetUpdatePolicy, "ADW", "adw_spin_row_set_update_policy", false) | |
| 300 | + | ||
| 268 | 301 | xSpinRowSetUpdatePolicy(x.GoPointer(), PolicyVar) | |
| 269 | 302 | } | |
| 270 | 303 | ||
| @@ -272,6 +305,8 @@ var xSpinRowSetValue func(uintptr, float64) | |||
| 272 | 305 | ||
| 273 | 306 | // Sets the current value. | |
| 274 | 307 | func (x *SpinRow) SetValue(ValueVar float64) { | |
| 308 | + | core.LazyRegister(&xSpinRowSetValue, "ADW", "adw_spin_row_set_value", false) | |
| 309 | + | ||
| 275 | 310 | xSpinRowSetValue(x.GoPointer(), ValueVar) | |
| 276 | 311 | } | |
| 277 | 312 | ||
| @@ -279,6 +314,8 @@ var xSpinRowSetWrap func(uintptr, bool) | |||
| 279 | 314 | ||
| 280 | 315 | // Sets whether the spin row should wrap upon reaching its limits. | |
| 281 | 316 | func (x *SpinRow) SetWrap(WrapVar bool) { | |
| 317 | + | core.LazyRegister(&xSpinRowSetWrap, "ADW", "adw_spin_row_set_wrap", false) | |
| 318 | + | ||
| 282 | 319 | xSpinRowSetWrap(x.GoPointer(), WrapVar) | |
| 283 | 320 | } | |
| 284 | 321 | ||
| @@ -286,6 +323,8 @@ var xSpinRowUpdate func(uintptr) | |||
| 286 | 323 | ||
| 287 | 324 | // Manually force an update of the spin row. | |
| 288 | 325 | func (x *SpinRow) Update() { | |
| 326 | + | core.LazyRegister(&xSpinRowUpdate, "ADW", "adw_spin_row_update", false) | |
| 327 | + | ||
| 289 | 328 | xSpinRowUpdate(x.GoPointer()) | |
| 290 | 329 | } | |
| 291 | 330 | ||
| @@ -1076,37 +1115,4 @@ func (x *SpinRow) SetWidthChars(NCharsVar int) { | |||
| 1076 | 1115 | func init() { | |
| 1077 | 1116 | core.SetPackageName("ADW", "libadwaita-1") | |
| 1078 | 1117 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | |
| 1079 | - | var libs []uintptr | |
| 1080 | - | for _, libPath := range core.GetPaths("ADW") { | |
| 1081 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 1082 | - | if err != nil { | |
| 1083 | - | panic(err) | |
| 1084 | - | } | |
| 1085 | - | libs = append(libs, lib) | |
| 1086 | - | } | |
| 1087 | - | ||
| 1088 | - | core.PuregoSafeRegister(&xSpinRowGLibType, libs, "adw_spin_row_get_type") | |
| 1089 | - | ||
| 1090 | - | core.PuregoSafeRegister(&xNewSpinRow, libs, "adw_spin_row_new") | |
| 1091 | - | core.PuregoSafeRegister(&xNewSpinRowWithRange, libs, "adw_spin_row_new_with_range") | |
| 1092 | - | ||
| 1093 | - | core.PuregoSafeRegister(&xSpinRowConfigure, libs, "adw_spin_row_configure") | |
| 1094 | - | core.PuregoSafeRegister(&xSpinRowGetAdjustment, libs, "adw_spin_row_get_adjustment") | |
| 1095 | - | core.PuregoSafeRegister(&xSpinRowGetClimbRate, libs, "adw_spin_row_get_climb_rate") | |
| 1096 | - | core.PuregoSafeRegister(&xSpinRowGetDigits, libs, "adw_spin_row_get_digits") | |
| 1097 | - | core.PuregoSafeRegister(&xSpinRowGetNumeric, libs, "adw_spin_row_get_numeric") | |
| 1098 | - | core.PuregoSafeRegister(&xSpinRowGetSnapToTicks, libs, "adw_spin_row_get_snap_to_ticks") | |
| 1099 | - | core.PuregoSafeRegister(&xSpinRowGetUpdatePolicy, libs, "adw_spin_row_get_update_policy") | |
| 1100 | - | core.PuregoSafeRegister(&xSpinRowGetValue, libs, "adw_spin_row_get_value") | |
| 1101 | - | core.PuregoSafeRegister(&xSpinRowGetWrap, libs, "adw_spin_row_get_wrap") | |
| 1102 | - | core.PuregoSafeRegister(&xSpinRowSetAdjustment, libs, "adw_spin_row_set_adjustment") | |
| 1103 | - | core.PuregoSafeRegister(&xSpinRowSetClimbRate, libs, "adw_spin_row_set_climb_rate") | |
| 1104 | - | core.PuregoSafeRegister(&xSpinRowSetDigits, libs, "adw_spin_row_set_digits") | |
| 1105 | - | core.PuregoSafeRegister(&xSpinRowSetNumeric, libs, "adw_spin_row_set_numeric") | |
| 1106 | - | core.PuregoSafeRegister(&xSpinRowSetRange, libs, "adw_spin_row_set_range") | |
| 1107 | - | core.PuregoSafeRegister(&xSpinRowSetSnapToTicks, libs, "adw_spin_row_set_snap_to_ticks") | |
| 1108 | - | core.PuregoSafeRegister(&xSpinRowSetUpdatePolicy, libs, "adw_spin_row_set_update_policy") | |
| 1109 | - | core.PuregoSafeRegister(&xSpinRowSetValue, libs, "adw_spin_row_set_value") | |
| 1110 | - | core.PuregoSafeRegister(&xSpinRowSetWrap, libs, "adw_spin_row_set_wrap") | |
| 1111 | - | core.PuregoSafeRegister(&xSpinRowUpdate, libs, "adw_spin_row_update") | |
| 1112 | 1118 | } | |
| @@ -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/glib" | 9 | "github.com/bnema/puregotk/v4/glib" | ||
| 11 | "github.com/bnema/puregotk/v4/gobject" | 10 | "github.com/bnema/puregotk/v4/gobject" | ||
| @@ -77,6 +76,7 @@ type SpinRow struct { | |||||
| 77 | var xSpinRowGLibType func() types.GType | 76 | var xSpinRowGLibType func() types.GType | ||
| 78 | 77 | ||||
| 79 | func SpinRowGLibType() types.GType { | 78 | func SpinRowGLibType() types.GType { | ||
| 79 | + | core.LazyRegister(&xSpinRowGLibType, "ADW", "adw_spin_row_get_type", false) | |||
| 80 | return xSpinRowGLibType() | 80 | return xSpinRowGLibType() | ||
| 81 | } | 81 | } | ||
| 82 | 82 | ||||
| @@ -90,6 +90,7 @@ var xNewSpinRow func(uintptr, float64, uint) uintptr | |||||
| 90 | 90 | ||||
| 91 | // Creates a new `AdwSpinRow`. | 91 | // Creates a new `AdwSpinRow`. | ||
| 92 | func NewSpinRow(AdjustmentVar *gtk.Adjustment, ClimbRateVar float64, DigitsVar uint) *SpinRow { | 92 | func NewSpinRow(AdjustmentVar *gtk.Adjustment, ClimbRateVar float64, DigitsVar uint) *SpinRow { | ||
| 93 | + | core.LazyRegister(&xNewSpinRow, "ADW", "adw_spin_row_new", false) | |||
| 93 | var cls *SpinRow | 94 | var cls *SpinRow | ||
| 94 | 95 | ||||
| 95 | cret := xNewSpinRow(AdjustmentVar.GoPointer(), ClimbRateVar, DigitsVar) | 96 | cret := xNewSpinRow(AdjustmentVar.GoPointer(), ClimbRateVar, DigitsVar) | ||
| @@ -118,6 +119,7 @@ var xNewSpinRowWithRange func(float64, float64, float64) uintptr | |||||
| 118 | // of ten. If the resulting precision is not suitable for your needs, use | 119 | // of ten. If the resulting precision is not suitable for your needs, use | ||
| 119 | // [method@SpinRow.set_digits] to correct it. | 120 | // [method@SpinRow.set_digits] to correct it. | ||
| 120 | func NewSpinRowWithRange(MinVar float64, MaxVar float64, StepVar float64) *SpinRow { | 121 | func NewSpinRowWithRange(MinVar float64, MaxVar float64, StepVar float64) *SpinRow { | ||
| 122 | + | core.LazyRegister(&xNewSpinRowWithRange, "ADW", "adw_spin_row_new_with_range", false) | |||
| 121 | var cls *SpinRow | 123 | var cls *SpinRow | ||
| 122 | 124 | ||||
| 123 | cret := xNewSpinRowWithRange(MinVar, MaxVar, StepVar) | 125 | cret := xNewSpinRowWithRange(MinVar, MaxVar, StepVar) | ||
| @@ -138,6 +140,8 @@ var xSpinRowConfigure func(uintptr, uintptr, float64, uint) | |||||
| 138 | // The adjustment, climb rate, and number of decimal places are updated | 140 | // The adjustment, climb rate, and number of decimal places are updated | ||
| 139 | // accordingly. | 141 | // accordingly. | ||
| 140 | func (x *SpinRow) Configure(AdjustmentVar *gtk.Adjustment, ClimbRateVar float64, DigitsVar uint) { | 142 | func (x *SpinRow) Configure(AdjustmentVar *gtk.Adjustment, ClimbRateVar float64, DigitsVar uint) { | ||
| 143 | + | core.LazyRegister(&xSpinRowConfigure, "ADW", "adw_spin_row_configure", false) | |||
| 144 | + | ||||
| 141 | xSpinRowConfigure(x.GoPointer(), AdjustmentVar.GoPointer(), ClimbRateVar, DigitsVar) | 145 | xSpinRowConfigure(x.GoPointer(), AdjustmentVar.GoPointer(), ClimbRateVar, DigitsVar) | ||
| 142 | } | 146 | } | ||
| 143 | 147 | ||||
| @@ -145,6 +149,7 @@ var xSpinRowGetAdjustment func(uintptr) uintptr | |||||
| 145 | 149 | ||||
| 146 | // Gets the adjustment that holds the value for the spin row. | 150 | // Gets the adjustment that holds the value for the spin row. | ||
| 147 | func (x *SpinRow) GetAdjustment() *gtk.Adjustment { | 151 | func (x *SpinRow) GetAdjustment() *gtk.Adjustment { | ||
| 152 | + | core.LazyRegister(&xSpinRowGetAdjustment, "ADW", "adw_spin_row_get_adjustment", false) | |||
| 148 | var cls *gtk.Adjustment | 153 | var cls *gtk.Adjustment | ||
| 149 | 154 | ||||
| 150 | cret := xSpinRowGetAdjustment(x.GoPointer()) | 155 | cret := xSpinRowGetAdjustment(x.GoPointer()) | ||
| @@ -162,6 +167,8 @@ var xSpinRowGetClimbRate func(uintptr) float64 | |||||
| 162 | 167 | ||||
| 163 | // Gets the acceleration rate when you hold down a button or key. | 168 | // Gets the acceleration rate when you hold down a button or key. | ||
| 164 | func (x *SpinRow) GetClimbRate() float64 { | 169 | func (x *SpinRow) GetClimbRate() float64 { | ||
| 170 | + | core.LazyRegister(&xSpinRowGetClimbRate, "ADW", "adw_spin_row_get_climb_rate", false) | |||
| 171 | + | ||||
| 165 | cret := xSpinRowGetClimbRate(x.GoPointer()) | 172 | cret := xSpinRowGetClimbRate(x.GoPointer()) | ||
| 166 | return cret | 173 | return cret | ||
| 167 | } | 174 | } | ||
| @@ -170,6 +177,8 @@ var xSpinRowGetDigits func(uintptr) uint | |||||
| 170 | 177 | ||||
| 171 | // Gets the number of decimal places to display. | 178 | // Gets the number of decimal places to display. | ||
| 172 | func (x *SpinRow) GetDigits() uint { | 179 | func (x *SpinRow) GetDigits() uint { | ||
| 180 | + | core.LazyRegister(&xSpinRowGetDigits, "ADW", "adw_spin_row_get_digits", false) | |||
| 181 | + | ||||
| 173 | cret := xSpinRowGetDigits(x.GoPointer()) | 182 | cret := xSpinRowGetDigits(x.GoPointer()) | ||
| 174 | return cret | 183 | return cret | ||
| 175 | } | 184 | } | ||
| @@ -178,6 +187,8 @@ var xSpinRowGetNumeric func(uintptr) bool | |||||
| 178 | 187 | ||||
| 179 | // Gets whether non-numeric characters should be ignored. | 188 | // Gets whether non-numeric characters should be ignored. | ||
| 180 | func (x *SpinRow) GetNumeric() bool { | 189 | func (x *SpinRow) GetNumeric() bool { | ||
| 190 | + | core.LazyRegister(&xSpinRowGetNumeric, "ADW", "adw_spin_row_get_numeric", false) | |||
| 191 | + | ||||
| 181 | cret := xSpinRowGetNumeric(x.GoPointer()) | 192 | cret := xSpinRowGetNumeric(x.GoPointer()) | ||
| 182 | return cret | 193 | return cret | ||
| 183 | } | 194 | } | ||
| @@ -186,6 +197,8 @@ var xSpinRowGetSnapToTicks func(uintptr) bool | |||||
| 186 | 197 | ||||
| 187 | // Gets whether invalid values are snapped to nearest step increment. | 198 | // Gets whether invalid values are snapped to nearest step increment. | ||
| 188 | func (x *SpinRow) GetSnapToTicks() bool { | 199 | func (x *SpinRow) GetSnapToTicks() bool { | ||
| 200 | + | core.LazyRegister(&xSpinRowGetSnapToTicks, "ADW", "adw_spin_row_get_snap_to_ticks", false) | |||
| 201 | + | ||||
| 189 | cret := xSpinRowGetSnapToTicks(x.GoPointer()) | 202 | cret := xSpinRowGetSnapToTicks(x.GoPointer()) | ||
| 190 | return cret | 203 | return cret | ||
| 191 | } | 204 | } | ||
| @@ -194,6 +207,8 @@ var xSpinRowGetUpdatePolicy func(uintptr) gtk.SpinButtonUpdatePolicy | |||||
| 194 | 207 | ||||
| 195 | // Gets the policy for updating the spin row. | 208 | // Gets the policy for updating the spin row. | ||
| 196 | func (x *SpinRow) GetUpdatePolicy() gtk.SpinButtonUpdatePolicy { | 209 | func (x *SpinRow) GetUpdatePolicy() gtk.SpinButtonUpdatePolicy { | ||
| 210 | + | core.LazyRegister(&xSpinRowGetUpdatePolicy, "ADW", "adw_spin_row_get_update_policy", false) | |||
| 211 | + | ||||
| 197 | cret := xSpinRowGetUpdatePolicy(x.GoPointer()) | 212 | cret := xSpinRowGetUpdatePolicy(x.GoPointer()) | ||
| 198 | return cret | 213 | return cret | ||
| 199 | } | 214 | } | ||
| @@ -202,6 +217,8 @@ var xSpinRowGetValue func(uintptr) float64 | |||||
| 202 | 217 | ||||
| 203 | // Gets the current value. | 218 | // Gets the current value. | ||
| 204 | func (x *SpinRow) GetValue() float64 { | 219 | func (x *SpinRow) GetValue() float64 { | ||
| 220 | + | core.LazyRegister(&xSpinRowGetValue, "ADW", "adw_spin_row_get_value", false) | |||
| 221 | + | ||||
| 205 | cret := xSpinRowGetValue(x.GoPointer()) | 222 | cret := xSpinRowGetValue(x.GoPointer()) | ||
| 206 | return cret | 223 | return cret | ||
| 207 | } | 224 | } | ||
| @@ -210,6 +227,8 @@ var xSpinRowGetWrap func(uintptr) bool | |||||
| 210 | 227 | ||||
| 211 | // Gets whether the spin row should wrap upon reaching its limits. | 228 | // Gets whether the spin row should wrap upon reaching its limits. | ||
| 212 | func (x *SpinRow) GetWrap() bool { | 229 | func (x *SpinRow) GetWrap() bool { | ||
| 230 | + | core.LazyRegister(&xSpinRowGetWrap, "ADW", "adw_spin_row_get_wrap", false) | |||
| 231 | + | ||||
| 213 | cret := xSpinRowGetWrap(x.GoPointer()) | 232 | cret := xSpinRowGetWrap(x.GoPointer()) | ||
| 214 | return cret | 233 | return cret | ||
| 215 | } | 234 | } | ||
| @@ -218,6 +237,8 @@ var xSpinRowSetAdjustment func(uintptr, uintptr) | |||||
| 218 | 237 | ||||
| 219 | // Sets the adjustment that holds the value for the spin row. | 238 | // Sets the adjustment that holds the value for the spin row. | ||
| 220 | func (x *SpinRow) SetAdjustment(AdjustmentVar *gtk.Adjustment) { | 239 | func (x *SpinRow) SetAdjustment(AdjustmentVar *gtk.Adjustment) { | ||
| 240 | + | core.LazyRegister(&xSpinRowSetAdjustment, "ADW", "adw_spin_row_set_adjustment", false) | |||
| 241 | + | ||||
| 221 | xSpinRowSetAdjustment(x.GoPointer(), AdjustmentVar.GoPointer()) | 242 | xSpinRowSetAdjustment(x.GoPointer(), AdjustmentVar.GoPointer()) | ||
| 222 | } | 243 | } | ||
| 223 | 244 | ||||
| @@ -225,6 +246,8 @@ var xSpinRowSetClimbRate func(uintptr, float64) | |||||
| 225 | 246 | ||||
| 226 | // Sets the acceleration rate when you hold down a button or key. | 247 | // Sets the acceleration rate when you hold down a button or key. | ||
| 227 | func (x *SpinRow) SetClimbRate(ClimbRateVar float64) { | 248 | func (x *SpinRow) SetClimbRate(ClimbRateVar float64) { | ||
| 249 | + | core.LazyRegister(&xSpinRowSetClimbRate, "ADW", "adw_spin_row_set_climb_rate", false) | |||
| 250 | + | ||||
| 228 | xSpinRowSetClimbRate(x.GoPointer(), ClimbRateVar) | 251 | xSpinRowSetClimbRate(x.GoPointer(), ClimbRateVar) | ||
| 229 | } | 252 | } | ||
| 230 | 253 | ||||
| @@ -232,6 +255,8 @@ var xSpinRowSetDigits func(uintptr, uint) | |||||
| 232 | 255 | ||||
| 233 | // Sets the number of decimal places to display. | 256 | // Sets the number of decimal places to display. | ||
| 234 | func (x *SpinRow) SetDigits(DigitsVar uint) { | 257 | func (x *SpinRow) SetDigits(DigitsVar uint) { | ||
| 258 | + | core.LazyRegister(&xSpinRowSetDigits, "ADW", "adw_spin_row_set_digits", false) | |||
| 259 | + | ||||
| 235 | xSpinRowSetDigits(x.GoPointer(), DigitsVar) | 260 | xSpinRowSetDigits(x.GoPointer(), DigitsVar) | ||
| 236 | } | 261 | } | ||
| 237 | 262 | ||||
| @@ -239,6 +264,8 @@ var xSpinRowSetNumeric func(uintptr, bool) | |||||
| 239 | 264 | ||||
| 240 | // Sets whether non-numeric characters should be ignored. | 265 | // Sets whether non-numeric characters should be ignored. | ||
| 241 | func (x *SpinRow) SetNumeric(NumericVar bool) { | 266 | func (x *SpinRow) SetNumeric(NumericVar bool) { | ||
| 267 | + | core.LazyRegister(&xSpinRowSetNumeric, "ADW", "adw_spin_row_set_numeric", false) | |||
| 268 | + | ||||
| 242 | xSpinRowSetNumeric(x.GoPointer(), NumericVar) | 269 | xSpinRowSetNumeric(x.GoPointer(), NumericVar) | ||
| 243 | } | 270 | } | ||
| 244 | 271 | ||||
| @@ -249,6 +276,8 @@ var xSpinRowSetRange func(uintptr, float64, float64) | |||||
| 249 | // If the current value is outside this range, it will be adjusted | 276 | // If the current value is outside this range, it will be adjusted | ||
| 250 | // to fit within the range, otherwise it will remain unchanged. | 277 | // to fit within the range, otherwise it will remain unchanged. | ||
| 251 | func (x *SpinRow) SetRange(MinVar float64, MaxVar float64) { | 278 | func (x *SpinRow) SetRange(MinVar float64, MaxVar float64) { | ||
| 279 | + | core.LazyRegister(&xSpinRowSetRange, "ADW", "adw_spin_row_set_range", false) | |||
| 280 | + | ||||
| 252 | xSpinRowSetRange(x.GoPointer(), MinVar, MaxVar) | 281 | xSpinRowSetRange(x.GoPointer(), MinVar, MaxVar) | ||
| 253 | } | 282 | } | ||
| 254 | 283 | ||||
| @@ -256,6 +285,8 @@ var xSpinRowSetSnapToTicks func(uintptr, bool) | |||||
| 256 | 285 | ||||
| 257 | // Sets whether invalid values are snapped to the nearest step increment. | 286 | // Sets whether invalid values are snapped to the nearest step increment. | ||
| 258 | func (x *SpinRow) SetSnapToTicks(SnapToTicksVar bool) { | 287 | func (x *SpinRow) SetSnapToTicks(SnapToTicksVar bool) { | ||
| 288 | + | core.LazyRegister(&xSpinRowSetSnapToTicks, "ADW", "adw_spin_row_set_snap_to_ticks", false) | |||
| 289 | + | ||||
| 259 | xSpinRowSetSnapToTicks(x.GoPointer(), SnapToTicksVar) | 290 | xSpinRowSetSnapToTicks(x.GoPointer(), SnapToTicksVar) | ||
| 260 | } | 291 | } | ||
| 261 | 292 | ||||
| @@ -265,6 +296,8 @@ var xSpinRowSetUpdatePolicy func(uintptr, gtk.SpinButtonUpdatePolicy) | |||||
| 265 | // | 296 | // | ||
| 266 | // The options are always, or only when the value is invalid. | 297 | // The options are always, or only when the value is invalid. | ||
| 267 | func (x *SpinRow) SetUpdatePolicy(PolicyVar gtk.SpinButtonUpdatePolicy) { | 298 | func (x *SpinRow) SetUpdatePolicy(PolicyVar gtk.SpinButtonUpdatePolicy) { | ||
| 299 | + | core.LazyRegister(&xSpinRowSetUpdatePolicy, "ADW", "adw_spin_row_set_update_policy", false) | |||
| 300 | + | ||||
| 268 | xSpinRowSetUpdatePolicy(x.GoPointer(), PolicyVar) | 301 | xSpinRowSetUpdatePolicy(x.GoPointer(), PolicyVar) | ||
| 269 | } | 302 | } | ||
| 270 | 303 | ||||
| @@ -272,6 +305,8 @@ var xSpinRowSetValue func(uintptr, float64) | |||||
| 272 | 305 | ||||
| 273 | // Sets the current value. | 306 | // Sets the current value. | ||
| 274 | func (x *SpinRow) SetValue(ValueVar float64) { | 307 | func (x *SpinRow) SetValue(ValueVar float64) { | ||
| 308 | + | core.LazyRegister(&xSpinRowSetValue, "ADW", "adw_spin_row_set_value", false) | |||
| 309 | + | ||||
| 275 | xSpinRowSetValue(x.GoPointer(), ValueVar) | 310 | xSpinRowSetValue(x.GoPointer(), ValueVar) | ||
| 276 | } | 311 | } | ||
| 277 | 312 | ||||
| @@ -279,6 +314,8 @@ var xSpinRowSetWrap func(uintptr, bool) | |||||
| 279 | 314 | ||||
| 280 | // Sets whether the spin row should wrap upon reaching its limits. | 315 | // Sets whether the spin row should wrap upon reaching its limits. | ||
| 281 | func (x *SpinRow) SetWrap(WrapVar bool) { | 316 | func (x *SpinRow) SetWrap(WrapVar bool) { | ||
| 317 | + | core.LazyRegister(&xSpinRowSetWrap, "ADW", "adw_spin_row_set_wrap", false) | |||
| 318 | + | ||||
| 282 | xSpinRowSetWrap(x.GoPointer(), WrapVar) | 319 | xSpinRowSetWrap(x.GoPointer(), WrapVar) | ||
| 283 | } | 320 | } | ||
| 284 | 321 | ||||
| @@ -286,6 +323,8 @@ var xSpinRowUpdate func(uintptr) | |||||
| 286 | 323 | ||||
| 287 | // Manually force an update of the spin row. | 324 | // Manually force an update of the spin row. | ||
| 288 | func (x *SpinRow) Update() { | 325 | func (x *SpinRow) Update() { | ||
| 326 | + | core.LazyRegister(&xSpinRowUpdate, "ADW", "adw_spin_row_update", false) | |||
| 327 | + | ||||
| 289 | xSpinRowUpdate(x.GoPointer()) | 328 | xSpinRowUpdate(x.GoPointer()) | ||
| 290 | } | 329 | } | ||
| 291 | 330 | ||||
| @@ -1076,37 +1115,4 @@ func (x *SpinRow) SetWidthChars(NCharsVar int) { | |||||
| 1076 | func init() { | 1115 | func init() { | ||
| 1077 | core.SetPackageName("ADW", "libadwaita-1") | 1116 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 1078 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 1117 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | ||
| 1079 | - | var libs []uintptr | |||
| 1080 | - | for _, libPath := range core.GetPaths("ADW") { | |||
| 1081 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 1082 | - | if err != nil { | |||
| 1083 | - | panic(err) | |||
| 1084 | - | } | |||
| 1085 | - | libs = append(libs, lib) | |||
| 1086 | - | } | |||
| 1087 | - | ||||
| 1088 | - | core.PuregoSafeRegister(&xSpinRowGLibType, libs, "adw_spin_row_get_type") | |||
| 1089 | - | ||||
| 1090 | - | core.PuregoSafeRegister(&xNewSpinRow, libs, "adw_spin_row_new") | |||
| 1091 | - | core.PuregoSafeRegister(&xNewSpinRowWithRange, libs, "adw_spin_row_new_with_range") | |||
| 1092 | - | ||||
| 1093 | - | core.PuregoSafeRegister(&xSpinRowConfigure, libs, "adw_spin_row_configure") | |||
| 1094 | - | core.PuregoSafeRegister(&xSpinRowGetAdjustment, libs, "adw_spin_row_get_adjustment") | |||
| 1095 | - | core.PuregoSafeRegister(&xSpinRowGetClimbRate, libs, "adw_spin_row_get_climb_rate") | |||
| 1096 | - | core.PuregoSafeRegister(&xSpinRowGetDigits, libs, "adw_spin_row_get_digits") | |||
| 1097 | - | core.PuregoSafeRegister(&xSpinRowGetNumeric, libs, "adw_spin_row_get_numeric") | |||
| 1098 | - | core.PuregoSafeRegister(&xSpinRowGetSnapToTicks, libs, "adw_spin_row_get_snap_to_ticks") | |||
| 1099 | - | core.PuregoSafeRegister(&xSpinRowGetUpdatePolicy, libs, "adw_spin_row_get_update_policy") | |||
| 1100 | - | core.PuregoSafeRegister(&xSpinRowGetValue, libs, "adw_spin_row_get_value") | |||
| 1101 | - | core.PuregoSafeRegister(&xSpinRowGetWrap, libs, "adw_spin_row_get_wrap") | |||
| 1102 | - | core.PuregoSafeRegister(&xSpinRowSetAdjustment, libs, "adw_spin_row_set_adjustment") | |||
| 1103 | - | core.PuregoSafeRegister(&xSpinRowSetClimbRate, libs, "adw_spin_row_set_climb_rate") | |||
| 1104 | - | core.PuregoSafeRegister(&xSpinRowSetDigits, libs, "adw_spin_row_set_digits") | |||
| 1105 | - | core.PuregoSafeRegister(&xSpinRowSetNumeric, libs, "adw_spin_row_set_numeric") | |||
| 1106 | - | core.PuregoSafeRegister(&xSpinRowSetRange, libs, "adw_spin_row_set_range") | |||
| 1107 | - | core.PuregoSafeRegister(&xSpinRowSetSnapToTicks, libs, "adw_spin_row_set_snap_to_ticks") | |||
| 1108 | - | core.PuregoSafeRegister(&xSpinRowSetUpdatePolicy, libs, "adw_spin_row_set_update_policy") | |||
| 1109 | - | core.PuregoSafeRegister(&xSpinRowSetValue, libs, "adw_spin_row_set_value") | |||
| 1110 | - | core.PuregoSafeRegister(&xSpinRowSetWrap, libs, "adw_spin_row_set_wrap") | |||
| 1111 | - | core.PuregoSafeRegister(&xSpinRowUpdate, libs, "adw_spin_row_update") | |||
| 1112 | } | 1118 | } | ||