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
| @@ -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" | |
| 11 | 10 | "github.com/bnema/puregotk/v4/gobject/types" | |
| @@ -46,6 +45,7 @@ type ClampScrollable struct { | |||
| 46 | 45 | var xClampScrollableGLibType func() types.GType | |
| 47 | 46 | ||
| 48 | 47 | func ClampScrollableGLibType() types.GType { | |
| 48 | + | core.LazyRegister(&xClampScrollableGLibType, "ADW", "adw_clamp_scrollable_get_type", false) | |
| 49 | 49 | return xClampScrollableGLibType() | |
| 50 | 50 | } | |
| 51 | 51 | ||
| @@ -59,6 +59,7 @@ var xNewClampScrollable func() uintptr | |||
| 59 | 59 | ||
| 60 | 60 | // Creates a new `AdwClampScrollable`. | |
| 61 | 61 | func NewClampScrollable() *ClampScrollable { | |
| 62 | + | core.LazyRegister(&xNewClampScrollable, "ADW", "adw_clamp_scrollable_new", false) | |
| 62 | 63 | var cls *ClampScrollable | |
| 63 | 64 | ||
| 64 | 65 | cret := xNewClampScrollable() | |
| @@ -76,6 +77,7 @@ var xClampScrollableGetChild func(uintptr) uintptr | |||
| 76 | 77 | ||
| 77 | 78 | // Gets the child widget of @self. | |
| 78 | 79 | func (x *ClampScrollable) GetChild() *gtk.Widget { | |
| 80 | + | core.LazyRegister(&xClampScrollableGetChild, "ADW", "adw_clamp_scrollable_get_child", false) | |
| 79 | 81 | var cls *gtk.Widget | |
| 80 | 82 | ||
| 81 | 83 | cret := xClampScrollableGetChild(x.GoPointer()) | |
| @@ -93,6 +95,8 @@ var xClampScrollableGetMaximumSize func(uintptr) int | |||
| 93 | 95 | ||
| 94 | 96 | // Gets the maximum size allocated to the child. | |
| 95 | 97 | func (x *ClampScrollable) GetMaximumSize() int { | |
| 98 | + | core.LazyRegister(&xClampScrollableGetMaximumSize, "ADW", "adw_clamp_scrollable_get_maximum_size", false) | |
| 99 | + | ||
| 96 | 100 | cret := xClampScrollableGetMaximumSize(x.GoPointer()) | |
| 97 | 101 | return cret | |
| 98 | 102 | } | |
| @@ -101,6 +105,8 @@ var xClampScrollableGetTighteningThreshold func(uintptr) int | |||
| 101 | 105 | ||
| 102 | 106 | // Gets the size above which the child is clamped. | |
| 103 | 107 | func (x *ClampScrollable) GetTighteningThreshold() int { | |
| 108 | + | core.LazyRegister(&xClampScrollableGetTighteningThreshold, "ADW", "adw_clamp_scrollable_get_tightening_threshold", false) | |
| 109 | + | ||
| 104 | 110 | cret := xClampScrollableGetTighteningThreshold(x.GoPointer()) | |
| 105 | 111 | return cret | |
| 106 | 112 | } | |
| @@ -109,6 +115,8 @@ var xClampScrollableGetUnit func(uintptr) LengthUnit | |||
| 109 | 115 | ||
| 110 | 116 | // Gets the length unit for maximum size and tightening threshold. | |
| 111 | 117 | func (x *ClampScrollable) GetUnit() LengthUnit { | |
| 118 | + | core.LazyRegister(&xClampScrollableGetUnit, "ADW", "adw_clamp_scrollable_get_unit", false) | |
| 119 | + | ||
| 112 | 120 | cret := xClampScrollableGetUnit(x.GoPointer()) | |
| 113 | 121 | return cret | |
| 114 | 122 | } | |
| @@ -117,6 +125,8 @@ var xClampScrollableSetChild func(uintptr, uintptr) | |||
| 117 | 125 | ||
| 118 | 126 | // Sets the child widget of @self. | |
| 119 | 127 | func (x *ClampScrollable) SetChild(ChildVar *gtk.Widget) { | |
| 128 | + | core.LazyRegister(&xClampScrollableSetChild, "ADW", "adw_clamp_scrollable_set_child", false) | |
| 129 | + | ||
| 120 | 130 | xClampScrollableSetChild(x.GoPointer(), ChildVar.GoPointer()) | |
| 121 | 131 | } | |
| 122 | 132 | ||
| @@ -126,6 +136,8 @@ var xClampScrollableSetMaximumSize func(uintptr, int) | |||
| 126 | 136 | // | |
| 127 | 137 | // It is the width if the clamp is horizontal, or the height if it is vertical. | |
| 128 | 138 | func (x *ClampScrollable) SetMaximumSize(MaximumSizeVar int) { | |
| 139 | + | core.LazyRegister(&xClampScrollableSetMaximumSize, "ADW", "adw_clamp_scrollable_set_maximum_size", false) | |
| 140 | + | ||
| 129 | 141 | xClampScrollableSetMaximumSize(x.GoPointer(), MaximumSizeVar) | |
| 130 | 142 | } | |
| 131 | 143 | ||
| @@ -146,6 +158,8 @@ var xClampScrollableSetTighteningThreshold func(uintptr, int) | |||
| 146 | 158 | // Effectively, tightening the grip on the child before it reaches its maximum | |
| 147 | 159 | // size makes transitions to and from the maximum size smoother when resizing. | |
| 148 | 160 | func (x *ClampScrollable) SetTighteningThreshold(TighteningThresholdVar int) { | |
| 161 | + | core.LazyRegister(&xClampScrollableSetTighteningThreshold, "ADW", "adw_clamp_scrollable_set_tightening_threshold", false) | |
| 162 | + | ||
| 149 | 163 | xClampScrollableSetTighteningThreshold(x.GoPointer(), TighteningThresholdVar) | |
| 150 | 164 | } | |
| 151 | 165 | ||
| @@ -155,6 +169,8 @@ var xClampScrollableSetUnit func(uintptr, LengthUnit) | |||
| 155 | 169 | // | |
| 156 | 170 | // Allows the sizes to vary depending on the text scale factor. | |
| 157 | 171 | func (x *ClampScrollable) SetUnit(UnitVar LengthUnit) { | |
| 172 | + | core.LazyRegister(&xClampScrollableSetUnit, "ADW", "adw_clamp_scrollable_set_unit", false) | |
| 173 | + | ||
| 158 | 174 | xClampScrollableSetUnit(x.GoPointer(), UnitVar) | |
| 159 | 175 | } | |
| 160 | 176 | ||
| @@ -586,25 +602,4 @@ func (x *ClampScrollable) SetVscrollPolicy(PolicyVar gtk.ScrollablePolicy) { | |||
| 586 | 602 | func init() { | |
| 587 | 603 | core.SetPackageName("ADW", "libadwaita-1") | |
| 588 | 604 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | |
| 589 | - | var libs []uintptr | |
| 590 | - | for _, libPath := range core.GetPaths("ADW") { | |
| 591 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 592 | - | if err != nil { | |
| 593 | - | panic(err) | |
| 594 | - | } | |
| 595 | - | libs = append(libs, lib) | |
| 596 | - | } | |
| 597 | - | ||
| 598 | - | core.PuregoSafeRegister(&xClampScrollableGLibType, libs, "adw_clamp_scrollable_get_type") | |
| 599 | - | ||
| 600 | - | core.PuregoSafeRegister(&xNewClampScrollable, libs, "adw_clamp_scrollable_new") | |
| 601 | - | ||
| 602 | - | core.PuregoSafeRegister(&xClampScrollableGetChild, libs, "adw_clamp_scrollable_get_child") | |
| 603 | - | core.PuregoSafeRegister(&xClampScrollableGetMaximumSize, libs, "adw_clamp_scrollable_get_maximum_size") | |
| 604 | - | core.PuregoSafeRegister(&xClampScrollableGetTighteningThreshold, libs, "adw_clamp_scrollable_get_tightening_threshold") | |
| 605 | - | core.PuregoSafeRegister(&xClampScrollableGetUnit, libs, "adw_clamp_scrollable_get_unit") | |
| 606 | - | core.PuregoSafeRegister(&xClampScrollableSetChild, libs, "adw_clamp_scrollable_set_child") | |
| 607 | - | core.PuregoSafeRegister(&xClampScrollableSetMaximumSize, libs, "adw_clamp_scrollable_set_maximum_size") | |
| 608 | - | core.PuregoSafeRegister(&xClampScrollableSetTighteningThreshold, libs, "adw_clamp_scrollable_set_tightening_threshold") | |
| 609 | - | core.PuregoSafeRegister(&xClampScrollableSetUnit, libs, "adw_clamp_scrollable_set_unit") | |
| 610 | 605 | } | |
| @@ -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" | 9 | "github.com/bnema/puregotk/v4/gobject" | ||
| 11 | "github.com/bnema/puregotk/v4/gobject/types" | 10 | "github.com/bnema/puregotk/v4/gobject/types" | ||
| @@ -46,6 +45,7 @@ type ClampScrollable struct { | |||||
| 46 | var xClampScrollableGLibType func() types.GType | 45 | var xClampScrollableGLibType func() types.GType | ||
| 47 | 46 | ||||
| 48 | func ClampScrollableGLibType() types.GType { | 47 | func ClampScrollableGLibType() types.GType { | ||
| 48 | + | core.LazyRegister(&xClampScrollableGLibType, "ADW", "adw_clamp_scrollable_get_type", false) | |||
| 49 | return xClampScrollableGLibType() | 49 | return xClampScrollableGLibType() | ||
| 50 | } | 50 | } | ||
| 51 | 51 | ||||
| @@ -59,6 +59,7 @@ var xNewClampScrollable func() uintptr | |||||
| 59 | 59 | ||||
| 60 | // Creates a new `AdwClampScrollable`. | 60 | // Creates a new `AdwClampScrollable`. | ||
| 61 | func NewClampScrollable() *ClampScrollable { | 61 | func NewClampScrollable() *ClampScrollable { | ||
| 62 | + | core.LazyRegister(&xNewClampScrollable, "ADW", "adw_clamp_scrollable_new", false) | |||
| 62 | var cls *ClampScrollable | 63 | var cls *ClampScrollable | ||
| 63 | 64 | ||||
| 64 | cret := xNewClampScrollable() | 65 | cret := xNewClampScrollable() | ||
| @@ -76,6 +77,7 @@ var xClampScrollableGetChild func(uintptr) uintptr | |||||
| 76 | 77 | ||||
| 77 | // Gets the child widget of @self. | 78 | // Gets the child widget of @self. | ||
| 78 | func (x *ClampScrollable) GetChild() *gtk.Widget { | 79 | func (x *ClampScrollable) GetChild() *gtk.Widget { | ||
| 80 | + | core.LazyRegister(&xClampScrollableGetChild, "ADW", "adw_clamp_scrollable_get_child", false) | |||
| 79 | var cls *gtk.Widget | 81 | var cls *gtk.Widget | ||
| 80 | 82 | ||||
| 81 | cret := xClampScrollableGetChild(x.GoPointer()) | 83 | cret := xClampScrollableGetChild(x.GoPointer()) | ||
| @@ -93,6 +95,8 @@ var xClampScrollableGetMaximumSize func(uintptr) int | |||||
| 93 | 95 | ||||
| 94 | // Gets the maximum size allocated to the child. | 96 | // Gets the maximum size allocated to the child. | ||
| 95 | func (x *ClampScrollable) GetMaximumSize() int { | 97 | func (x *ClampScrollable) GetMaximumSize() int { | ||
| 98 | + | core.LazyRegister(&xClampScrollableGetMaximumSize, "ADW", "adw_clamp_scrollable_get_maximum_size", false) | |||
| 99 | + | ||||
| 96 | cret := xClampScrollableGetMaximumSize(x.GoPointer()) | 100 | cret := xClampScrollableGetMaximumSize(x.GoPointer()) | ||
| 97 | return cret | 101 | return cret | ||
| 98 | } | 102 | } | ||
| @@ -101,6 +105,8 @@ var xClampScrollableGetTighteningThreshold func(uintptr) int | |||||
| 101 | 105 | ||||
| 102 | // Gets the size above which the child is clamped. | 106 | // Gets the size above which the child is clamped. | ||
| 103 | func (x *ClampScrollable) GetTighteningThreshold() int { | 107 | func (x *ClampScrollable) GetTighteningThreshold() int { | ||
| 108 | + | core.LazyRegister(&xClampScrollableGetTighteningThreshold, "ADW", "adw_clamp_scrollable_get_tightening_threshold", false) | |||
| 109 | + | ||||
| 104 | cret := xClampScrollableGetTighteningThreshold(x.GoPointer()) | 110 | cret := xClampScrollableGetTighteningThreshold(x.GoPointer()) | ||
| 105 | return cret | 111 | return cret | ||
| 106 | } | 112 | } | ||
| @@ -109,6 +115,8 @@ var xClampScrollableGetUnit func(uintptr) LengthUnit | |||||
| 109 | 115 | ||||
| 110 | // Gets the length unit for maximum size and tightening threshold. | 116 | // Gets the length unit for maximum size and tightening threshold. | ||
| 111 | func (x *ClampScrollable) GetUnit() LengthUnit { | 117 | func (x *ClampScrollable) GetUnit() LengthUnit { | ||
| 118 | + | core.LazyRegister(&xClampScrollableGetUnit, "ADW", "adw_clamp_scrollable_get_unit", false) | |||
| 119 | + | ||||
| 112 | cret := xClampScrollableGetUnit(x.GoPointer()) | 120 | cret := xClampScrollableGetUnit(x.GoPointer()) | ||
| 113 | return cret | 121 | return cret | ||
| 114 | } | 122 | } | ||
| @@ -117,6 +125,8 @@ var xClampScrollableSetChild func(uintptr, uintptr) | |||||
| 117 | 125 | ||||
| 118 | // Sets the child widget of @self. | 126 | // Sets the child widget of @self. | ||
| 119 | func (x *ClampScrollable) SetChild(ChildVar *gtk.Widget) { | 127 | func (x *ClampScrollable) SetChild(ChildVar *gtk.Widget) { | ||
| 128 | + | core.LazyRegister(&xClampScrollableSetChild, "ADW", "adw_clamp_scrollable_set_child", false) | |||
| 129 | + | ||||
| 120 | xClampScrollableSetChild(x.GoPointer(), ChildVar.GoPointer()) | 130 | xClampScrollableSetChild(x.GoPointer(), ChildVar.GoPointer()) | ||
| 121 | } | 131 | } | ||
| 122 | 132 | ||||
| @@ -126,6 +136,8 @@ var xClampScrollableSetMaximumSize func(uintptr, int) | |||||
| 126 | // | 136 | // | ||
| 127 | // It is the width if the clamp is horizontal, or the height if it is vertical. | 137 | // It is the width if the clamp is horizontal, or the height if it is vertical. | ||
| 128 | func (x *ClampScrollable) SetMaximumSize(MaximumSizeVar int) { | 138 | func (x *ClampScrollable) SetMaximumSize(MaximumSizeVar int) { | ||
| 139 | + | core.LazyRegister(&xClampScrollableSetMaximumSize, "ADW", "adw_clamp_scrollable_set_maximum_size", false) | |||
| 140 | + | ||||
| 129 | xClampScrollableSetMaximumSize(x.GoPointer(), MaximumSizeVar) | 141 | xClampScrollableSetMaximumSize(x.GoPointer(), MaximumSizeVar) | ||
| 130 | } | 142 | } | ||
| 131 | 143 | ||||
| @@ -146,6 +158,8 @@ var xClampScrollableSetTighteningThreshold func(uintptr, int) | |||||
| 146 | // Effectively, tightening the grip on the child before it reaches its maximum | 158 | // Effectively, tightening the grip on the child before it reaches its maximum | ||
| 147 | // size makes transitions to and from the maximum size smoother when resizing. | 159 | // size makes transitions to and from the maximum size smoother when resizing. | ||
| 148 | func (x *ClampScrollable) SetTighteningThreshold(TighteningThresholdVar int) { | 160 | func (x *ClampScrollable) SetTighteningThreshold(TighteningThresholdVar int) { | ||
| 161 | + | core.LazyRegister(&xClampScrollableSetTighteningThreshold, "ADW", "adw_clamp_scrollable_set_tightening_threshold", false) | |||
| 162 | + | ||||
| 149 | xClampScrollableSetTighteningThreshold(x.GoPointer(), TighteningThresholdVar) | 163 | xClampScrollableSetTighteningThreshold(x.GoPointer(), TighteningThresholdVar) | ||
| 150 | } | 164 | } | ||
| 151 | 165 | ||||
| @@ -155,6 +169,8 @@ var xClampScrollableSetUnit func(uintptr, LengthUnit) | |||||
| 155 | // | 169 | // | ||
| 156 | // Allows the sizes to vary depending on the text scale factor. | 170 | // Allows the sizes to vary depending on the text scale factor. | ||
| 157 | func (x *ClampScrollable) SetUnit(UnitVar LengthUnit) { | 171 | func (x *ClampScrollable) SetUnit(UnitVar LengthUnit) { | ||
| 172 | + | core.LazyRegister(&xClampScrollableSetUnit, "ADW", "adw_clamp_scrollable_set_unit", false) | |||
| 173 | + | ||||
| 158 | xClampScrollableSetUnit(x.GoPointer(), UnitVar) | 174 | xClampScrollableSetUnit(x.GoPointer(), UnitVar) | ||
| 159 | } | 175 | } | ||
| 160 | 176 | ||||
| @@ -586,25 +602,4 @@ func (x *ClampScrollable) SetVscrollPolicy(PolicyVar gtk.ScrollablePolicy) { | |||||
| 586 | func init() { | 602 | func init() { | ||
| 587 | core.SetPackageName("ADW", "libadwaita-1") | 603 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 588 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 604 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | ||
| 589 | - | var libs []uintptr | |||
| 590 | - | for _, libPath := range core.GetPaths("ADW") { | |||
| 591 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 592 | - | if err != nil { | |||
| 593 | - | panic(err) | |||
| 594 | - | } | |||
| 595 | - | libs = append(libs, lib) | |||
| 596 | - | } | |||
| 597 | - | ||||
| 598 | - | core.PuregoSafeRegister(&xClampScrollableGLibType, libs, "adw_clamp_scrollable_get_type") | |||
| 599 | - | ||||
| 600 | - | core.PuregoSafeRegister(&xNewClampScrollable, libs, "adw_clamp_scrollable_new") | |||
| 601 | - | ||||
| 602 | - | core.PuregoSafeRegister(&xClampScrollableGetChild, libs, "adw_clamp_scrollable_get_child") | |||
| 603 | - | core.PuregoSafeRegister(&xClampScrollableGetMaximumSize, libs, "adw_clamp_scrollable_get_maximum_size") | |||
| 604 | - | core.PuregoSafeRegister(&xClampScrollableGetTighteningThreshold, libs, "adw_clamp_scrollable_get_tightening_threshold") | |||
| 605 | - | core.PuregoSafeRegister(&xClampScrollableGetUnit, libs, "adw_clamp_scrollable_get_unit") | |||
| 606 | - | core.PuregoSafeRegister(&xClampScrollableSetChild, libs, "adw_clamp_scrollable_set_child") | |||
| 607 | - | core.PuregoSafeRegister(&xClampScrollableSetMaximumSize, libs, "adw_clamp_scrollable_set_maximum_size") | |||
| 608 | - | core.PuregoSafeRegister(&xClampScrollableSetTighteningThreshold, libs, "adw_clamp_scrollable_set_tightening_threshold") | |||
| 609 | - | core.PuregoSafeRegister(&xClampScrollableSetUnit, libs, "adw_clamp_scrollable_set_unit") | |||
| 610 | } | 605 | } | ||