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 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-squeezer.go +49 -44
| @@ -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" | |
| @@ -54,6 +53,7 @@ type SqueezerTransitionType int | |||
| 54 | 53 | var xSqueezerTransitionTypeGLibType func() types.GType | |
| 55 | 54 | ||
| 56 | 55 | func SqueezerTransitionTypeGLibType() types.GType { | |
| 56 | + | core.LazyRegister(&xSqueezerTransitionTypeGLibType, "ADW", "adw_squeezer_transition_type_get_type", false) | |
| 57 | 57 | return xSqueezerTransitionTypeGLibType() | |
| 58 | 58 | } | |
| 59 | 59 | ||
| @@ -98,6 +98,7 @@ type Squeezer struct { | |||
| 98 | 98 | var xSqueezerGLibType func() types.GType | |
| 99 | 99 | ||
| 100 | 100 | func SqueezerGLibType() types.GType { | |
| 101 | + | core.LazyRegister(&xSqueezerGLibType, "ADW", "adw_squeezer_get_type", false) | |
| 101 | 102 | return xSqueezerGLibType() | |
| 102 | 103 | } | |
| 103 | 104 | ||
| @@ -111,6 +112,7 @@ var xNewSqueezer func() uintptr | |||
| 111 | 112 | ||
| 112 | 113 | // Creates a new `AdwSqueezer`. | |
| 113 | 114 | func NewSqueezer() *Squeezer { | |
| 115 | + | core.LazyRegister(&xNewSqueezer, "ADW", "adw_squeezer_new", false) | |
| 114 | 116 | var cls *Squeezer | |
| 115 | 117 | ||
| 116 | 118 | cret := xNewSqueezer() | |
| @@ -128,6 +130,7 @@ var xSqueezerAdd func(uintptr, uintptr) uintptr | |||
| 128 | 130 | ||
| 129 | 131 | // Adds a child to @self. | |
| 130 | 132 | func (x *Squeezer) Add(ChildVar *gtk.Widget) *SqueezerPage { | |
| 133 | + | core.LazyRegister(&xSqueezerAdd, "ADW", "adw_squeezer_add", false) | |
| 131 | 134 | var cls *SqueezerPage | |
| 132 | 135 | ||
| 133 | 136 | cret := xSqueezerAdd(x.GoPointer(), ChildVar.GoPointer()) | |
| @@ -145,6 +148,8 @@ var xSqueezerGetAllowNone func(uintptr) bool | |||
| 145 | 148 | ||
| 146 | 149 | // Gets whether to allow squeezing beyond the last child's minimum size. | |
| 147 | 150 | func (x *Squeezer) GetAllowNone() bool { | |
| 151 | + | core.LazyRegister(&xSqueezerGetAllowNone, "ADW", "adw_squeezer_get_allow_none", false) | |
| 152 | + | ||
| 148 | 153 | cret := xSqueezerGetAllowNone(x.GoPointer()) | |
| 149 | 154 | return cret | |
| 150 | 155 | } | |
| @@ -153,6 +158,8 @@ var xSqueezerGetHomogeneous func(uintptr) bool | |||
| 153 | 158 | ||
| 154 | 159 | // Gets whether all children have the same size for the opposite orientation. | |
| 155 | 160 | func (x *Squeezer) GetHomogeneous() bool { | |
| 161 | + | core.LazyRegister(&xSqueezerGetHomogeneous, "ADW", "adw_squeezer_get_homogeneous", false) | |
| 162 | + | ||
| 156 | 163 | cret := xSqueezerGetHomogeneous(x.GoPointer()) | |
| 157 | 164 | return cret | |
| 158 | 165 | } | |
| @@ -161,6 +168,8 @@ var xSqueezerGetInterpolateSize func(uintptr) bool | |||
| 161 | 168 | ||
| 162 | 169 | // Gets whether @self interpolates its size when changing the visible child. | |
| 163 | 170 | func (x *Squeezer) GetInterpolateSize() bool { | |
| 171 | + | core.LazyRegister(&xSqueezerGetInterpolateSize, "ADW", "adw_squeezer_get_interpolate_size", false) | |
| 172 | + | ||
| 164 | 173 | cret := xSqueezerGetInterpolateSize(x.GoPointer()) | |
| 165 | 174 | return cret | |
| 166 | 175 | } | |
| @@ -169,6 +178,7 @@ var xSqueezerGetPage func(uintptr, uintptr) uintptr | |||
| 169 | 178 | ||
| 170 | 179 | // Returns the [class@SqueezerPage] object for @child. | |
| 171 | 180 | func (x *Squeezer) GetPage(ChildVar *gtk.Widget) *SqueezerPage { | |
| 181 | + | core.LazyRegister(&xSqueezerGetPage, "ADW", "adw_squeezer_get_page", false) | |
| 172 | 182 | var cls *SqueezerPage | |
| 173 | 183 | ||
| 174 | 184 | cret := xSqueezerGetPage(x.GoPointer(), ChildVar.GoPointer()) | |
| @@ -189,6 +199,7 @@ var xSqueezerGetPages func(uintptr) uintptr | |||
| 189 | 199 | // This can be used to keep an up-to-date view. The model also implements | |
| 190 | 200 | // [iface@Gtk.SelectionModel] and can be used to track the visible page. | |
| 191 | 201 | func (x *Squeezer) GetPages() *gtk.SelectionModelBase { | |
| 202 | + | core.LazyRegister(&xSqueezerGetPages, "ADW", "adw_squeezer_get_pages", false) | |
| 192 | 203 | var cls *gtk.SelectionModelBase | |
| 193 | 204 | ||
| 194 | 205 | cret := xSqueezerGetPages(x.GoPointer()) | |
| @@ -205,6 +216,8 @@ var xSqueezerGetSwitchThresholdPolicy func(uintptr) FoldThresholdPolicy | |||
| 205 | 216 | ||
| 206 | 217 | // Gets the switch threshold policy for @self. | |
| 207 | 218 | func (x *Squeezer) GetSwitchThresholdPolicy() FoldThresholdPolicy { | |
| 219 | + | core.LazyRegister(&xSqueezerGetSwitchThresholdPolicy, "ADW", "adw_squeezer_get_switch_threshold_policy", false) | |
| 220 | + | ||
| 208 | 221 | cret := xSqueezerGetSwitchThresholdPolicy(x.GoPointer()) | |
| 209 | 222 | return cret | |
| 210 | 223 | } | |
| @@ -213,6 +226,8 @@ var xSqueezerGetTransitionDuration func(uintptr) uint | |||
| 213 | 226 | ||
| 214 | 227 | // Gets the transition animation duration for @self. | |
| 215 | 228 | func (x *Squeezer) GetTransitionDuration() uint { | |
| 229 | + | core.LazyRegister(&xSqueezerGetTransitionDuration, "ADW", "adw_squeezer_get_transition_duration", false) | |
| 230 | + | ||
| 216 | 231 | cret := xSqueezerGetTransitionDuration(x.GoPointer()) | |
| 217 | 232 | return cret | |
| 218 | 233 | } | |
| @@ -225,6 +240,8 @@ var xSqueezerGetTransitionRunning func(uintptr) bool | |||
| 225 | 240 | // then immediately to `FALSE`, so it's possible to rely on its notifications | |
| 226 | 241 | // to know that a transition has happened. | |
| 227 | 242 | func (x *Squeezer) GetTransitionRunning() bool { | |
| 243 | + | core.LazyRegister(&xSqueezerGetTransitionRunning, "ADW", "adw_squeezer_get_transition_running", false) | |
| 244 | + | ||
| 228 | 245 | cret := xSqueezerGetTransitionRunning(x.GoPointer()) | |
| 229 | 246 | return cret | |
| 230 | 247 | } | |
| @@ -233,6 +250,8 @@ var xSqueezerGetTransitionType func(uintptr) SqueezerTransitionType | |||
| 233 | 250 | ||
| 234 | 251 | // Gets the type of animation used for transitions between children in @self. | |
| 235 | 252 | func (x *Squeezer) GetTransitionType() SqueezerTransitionType { | |
| 253 | + | core.LazyRegister(&xSqueezerGetTransitionType, "ADW", "adw_squeezer_get_transition_type", false) | |
| 254 | + | ||
| 236 | 255 | cret := xSqueezerGetTransitionType(x.GoPointer()) | |
| 237 | 256 | return cret | |
| 238 | 257 | } | |
| @@ -241,6 +260,7 @@ var xSqueezerGetVisibleChild func(uintptr) uintptr | |||
| 241 | 260 | ||
| 242 | 261 | // Gets the currently visible child of @self. | |
| 243 | 262 | func (x *Squeezer) GetVisibleChild() *gtk.Widget { | |
| 263 | + | core.LazyRegister(&xSqueezerGetVisibleChild, "ADW", "adw_squeezer_get_visible_child", false) | |
| 244 | 264 | var cls *gtk.Widget | |
| 245 | 265 | ||
| 246 | 266 | cret := xSqueezerGetVisibleChild(x.GoPointer()) | |
| @@ -258,6 +278,8 @@ var xSqueezerGetXalign func(uintptr) float32 | |||
| 258 | 278 | ||
| 259 | 279 | // Gets the horizontal alignment, from 0 (start) to 1 (end). | |
| 260 | 280 | func (x *Squeezer) GetXalign() float32 { | |
| 281 | + | core.LazyRegister(&xSqueezerGetXalign, "ADW", "adw_squeezer_get_xalign", false) | |
| 282 | + | ||
| 261 | 283 | cret := xSqueezerGetXalign(x.GoPointer()) | |
| 262 | 284 | return cret | |
| 263 | 285 | } | |
| @@ -266,6 +288,8 @@ var xSqueezerGetYalign func(uintptr) float32 | |||
| 266 | 288 | ||
| 267 | 289 | // Gets the vertical alignment, from 0 (top) to 1 (bottom). | |
| 268 | 290 | func (x *Squeezer) GetYalign() float32 { | |
| 291 | + | core.LazyRegister(&xSqueezerGetYalign, "ADW", "adw_squeezer_get_yalign", false) | |
| 292 | + | ||
| 269 | 293 | cret := xSqueezerGetYalign(x.GoPointer()) | |
| 270 | 294 | return cret | |
| 271 | 295 | } | |
| @@ -274,6 +298,8 @@ var xSqueezerRemove func(uintptr, uintptr) | |||
| 274 | 298 | ||
| 275 | 299 | // Removes a child widget from @self. | |
| 276 | 300 | func (x *Squeezer) Remove(ChildVar *gtk.Widget) { | |
| 301 | + | core.LazyRegister(&xSqueezerRemove, "ADW", "adw_squeezer_remove", false) | |
| 302 | + | ||
| 277 | 303 | xSqueezerRemove(x.GoPointer(), ChildVar.GoPointer()) | |
| 278 | 304 | } | |
| 279 | 305 | ||
| @@ -285,6 +311,8 @@ var xSqueezerSetAllowNone func(uintptr, bool) | |||
| 285 | 311 | // shown. This is functionally equivalent to appending a widget with 0×0 minimum | |
| 286 | 312 | // size. | |
| 287 | 313 | func (x *Squeezer) SetAllowNone(AllowNoneVar bool) { | |
| 314 | + | core.LazyRegister(&xSqueezerSetAllowNone, "ADW", "adw_squeezer_set_allow_none", false) | |
| 315 | + | ||
| 288 | 316 | xSqueezerSetAllowNone(x.GoPointer(), AllowNoneVar) | |
| 289 | 317 | } | |
| 290 | 318 | ||
| @@ -296,6 +324,8 @@ var xSqueezerSetHomogeneous func(uintptr, bool) | |||
| 296 | 324 | // the same height for all its children. If it isn't, the squeezer may change | |
| 297 | 325 | // size when a different child becomes visible. | |
| 298 | 326 | func (x *Squeezer) SetHomogeneous(HomogeneousVar bool) { | |
| 327 | + | core.LazyRegister(&xSqueezerSetHomogeneous, "ADW", "adw_squeezer_set_homogeneous", false) | |
| 328 | + | ||
| 299 | 329 | xSqueezerSetHomogeneous(x.GoPointer(), HomogeneousVar) | |
| 300 | 330 | } | |
| 301 | 331 | ||
| @@ -308,6 +338,8 @@ var xSqueezerSetInterpolateSize func(uintptr, bool) | |||
| 308 | 338 | // set transition duration and the orientation, e.g. if the squeezer is | |
| 309 | 339 | // horizontal, it will interpolate the its height. | |
| 310 | 340 | func (x *Squeezer) SetInterpolateSize(InterpolateSizeVar bool) { | |
| 341 | + | core.LazyRegister(&xSqueezerSetInterpolateSize, "ADW", "adw_squeezer_set_interpolate_size", false) | |
| 342 | + | ||
| 311 | 343 | xSqueezerSetInterpolateSize(x.GoPointer(), InterpolateSizeVar) | |
| 312 | 344 | } | |
| 313 | 345 | ||
| @@ -324,6 +356,8 @@ var xSqueezerSetSwitchThresholdPolicy func(uintptr, FoldThresholdPolicy) | |||
| 324 | 356 | // This can be useful if you have a long ellipsizing label and want to let it | |
| 325 | 357 | // ellipsize instead of immediately switching. | |
| 326 | 358 | func (x *Squeezer) SetSwitchThresholdPolicy(PolicyVar FoldThresholdPolicy) { | |
| 359 | + | core.LazyRegister(&xSqueezerSetSwitchThresholdPolicy, "ADW", "adw_squeezer_set_switch_threshold_policy", false) | |
| 360 | + | ||
| 327 | 361 | xSqueezerSetSwitchThresholdPolicy(x.GoPointer(), PolicyVar) | |
| 328 | 362 | } | |
| 329 | 363 | ||
| @@ -331,6 +365,8 @@ var xSqueezerSetTransitionDuration func(uintptr, uint) | |||
| 331 | 365 | ||
| 332 | 366 | // Sets the transition animation duration for @self. | |
| 333 | 367 | func (x *Squeezer) SetTransitionDuration(DurationVar uint) { | |
| 368 | + | core.LazyRegister(&xSqueezerSetTransitionDuration, "ADW", "adw_squeezer_set_transition_duration", false) | |
| 369 | + | ||
| 334 | 370 | xSqueezerSetTransitionDuration(x.GoPointer(), DurationVar) | |
| 335 | 371 | } | |
| 336 | 372 | ||
| @@ -338,6 +374,8 @@ var xSqueezerSetTransitionType func(uintptr, SqueezerTransitionType) | |||
| 338 | 374 | ||
| 339 | 375 | // Sets the type of animation used for transitions between children in @self. | |
| 340 | 376 | func (x *Squeezer) SetTransitionType(TransitionVar SqueezerTransitionType) { | |
| 377 | + | core.LazyRegister(&xSqueezerSetTransitionType, "ADW", "adw_squeezer_set_transition_type", false) | |
| 378 | + | ||
| 341 | 379 | xSqueezerSetTransitionType(x.GoPointer(), TransitionVar) | |
| 342 | 380 | } | |
| 343 | 381 | ||
| @@ -351,6 +389,8 @@ var xSqueezerSetXalign func(uintptr, float32) | |||
| 351 | 389 | // For example, 0.5 means the child will be centered, 0 means it will keep the | |
| 352 | 390 | // start side aligned and overflow the end side, and 1 means the opposite. | |
| 353 | 391 | func (x *Squeezer) SetXalign(XalignVar float32) { | |
| 392 | + | core.LazyRegister(&xSqueezerSetXalign, "ADW", "adw_squeezer_set_xalign", false) | |
| 393 | + | ||
| 354 | 394 | xSqueezerSetXalign(x.GoPointer(), XalignVar) | |
| 355 | 395 | } | |
| 356 | 396 | ||
| @@ -364,6 +404,8 @@ var xSqueezerSetYalign func(uintptr, float32) | |||
| 364 | 404 | // For example, 0.5 means the child will be centered, 0 means it will keep the | |
| 365 | 405 | // top side aligned and overflow the bottom side, and 1 means the opposite. | |
| 366 | 406 | func (x *Squeezer) SetYalign(YalignVar float32) { | |
| 407 | + | core.LazyRegister(&xSqueezerSetYalign, "ADW", "adw_squeezer_set_yalign", false) | |
| 408 | + | ||
| 367 | 409 | xSqueezerSetYalign(x.GoPointer(), YalignVar) | |
| 368 | 410 | } | |
| 369 | 411 | ||
| @@ -821,6 +863,7 @@ type SqueezerPage struct { | |||
| 821 | 863 | var xSqueezerPageGLibType func() types.GType | |
| 822 | 864 | ||
| 823 | 865 | func SqueezerPageGLibType() types.GType { | |
| 866 | + | core.LazyRegister(&xSqueezerPageGLibType, "ADW", "adw_squeezer_page_get_type", false) | |
| 824 | 867 | return xSqueezerPageGLibType() | |
| 825 | 868 | } | |
| 826 | 869 | ||
| @@ -834,6 +877,7 @@ var xSqueezerPageGetChild func(uintptr) uintptr | |||
| 834 | 877 | ||
| 835 | 878 | // Returns the squeezer child to which @self belongs. | |
| 836 | 879 | func (x *SqueezerPage) GetChild() *gtk.Widget { | |
| 880 | + | core.LazyRegister(&xSqueezerPageGetChild, "ADW", "adw_squeezer_page_get_child", false) | |
| 837 | 881 | var cls *gtk.Widget | |
| 838 | 882 | ||
| 839 | 883 | cret := xSqueezerPageGetChild(x.GoPointer()) | |
| @@ -851,6 +895,8 @@ var xSqueezerPageGetEnabled func(uintptr) bool | |||
| 851 | 895 | ||
| 852 | 896 | // Gets whether @self is enabled. | |
| 853 | 897 | func (x *SqueezerPage) GetEnabled() bool { | |
| 898 | + | core.LazyRegister(&xSqueezerPageGetEnabled, "ADW", "adw_squeezer_page_get_enabled", false) | |
| 899 | + | ||
| 854 | 900 | cret := xSqueezerPageGetEnabled(x.GoPointer()) | |
| 855 | 901 | return cret | |
| 856 | 902 | } | |
| @@ -868,6 +914,8 @@ var xSqueezerPageSetEnabled func(uintptr, bool) | |||
| 868 | 914 | // This can be used e.g. to ensure a certain child is hidden below a certain | |
| 869 | 915 | // window width, or any other constraint you find suitable. | |
| 870 | 916 | func (x *SqueezerPage) SetEnabled(EnabledVar bool) { | |
| 917 | + | core.LazyRegister(&xSqueezerPageSetEnabled, "ADW", "adw_squeezer_page_set_enabled", false) | |
| 918 | + | ||
| 871 | 919 | xSqueezerPageSetEnabled(x.GoPointer(), EnabledVar) | |
| 872 | 920 | } | |
| 873 | 921 | ||
| @@ -920,47 +968,4 @@ func (x *SqueezerPage) GetPropertyEnabled() bool { | |||
| 920 | 968 | func init() { | |
| 921 | 969 | core.SetPackageName("ADW", "libadwaita-1") | |
| 922 | 970 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | |
| 923 | - | var libs []uintptr | |
| 924 | - | for _, libPath := range core.GetPaths("ADW") { | |
| 925 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 926 | - | if err != nil { | |
| 927 | - | panic(err) | |
| 928 | - | } | |
| 929 | - | libs = append(libs, lib) | |
| 930 | - | } | |
| 931 | - | ||
| 932 | - | core.PuregoSafeRegister(&xSqueezerTransitionTypeGLibType, libs, "adw_squeezer_transition_type_get_type") | |
| 933 | - | ||
| 934 | - | core.PuregoSafeRegister(&xSqueezerGLibType, libs, "adw_squeezer_get_type") | |
| 935 | - | ||
| 936 | - | core.PuregoSafeRegister(&xNewSqueezer, libs, "adw_squeezer_new") | |
| 937 | - | ||
| 938 | - | core.PuregoSafeRegister(&xSqueezerAdd, libs, "adw_squeezer_add") | |
| 939 | - | core.PuregoSafeRegister(&xSqueezerGetAllowNone, libs, "adw_squeezer_get_allow_none") | |
| 940 | - | core.PuregoSafeRegister(&xSqueezerGetHomogeneous, libs, "adw_squeezer_get_homogeneous") | |
| 941 | - | core.PuregoSafeRegister(&xSqueezerGetInterpolateSize, libs, "adw_squeezer_get_interpolate_size") | |
| 942 | - | core.PuregoSafeRegister(&xSqueezerGetPage, libs, "adw_squeezer_get_page") | |
| 943 | - | core.PuregoSafeRegister(&xSqueezerGetPages, libs, "adw_squeezer_get_pages") | |
| 944 | - | core.PuregoSafeRegister(&xSqueezerGetSwitchThresholdPolicy, libs, "adw_squeezer_get_switch_threshold_policy") | |
| 945 | - | core.PuregoSafeRegister(&xSqueezerGetTransitionDuration, libs, "adw_squeezer_get_transition_duration") | |
| 946 | - | core.PuregoSafeRegister(&xSqueezerGetTransitionRunning, libs, "adw_squeezer_get_transition_running") | |
| 947 | - | core.PuregoSafeRegister(&xSqueezerGetTransitionType, libs, "adw_squeezer_get_transition_type") | |
| 948 | - | core.PuregoSafeRegister(&xSqueezerGetVisibleChild, libs, "adw_squeezer_get_visible_child") | |
| 949 | - | core.PuregoSafeRegister(&xSqueezerGetXalign, libs, "adw_squeezer_get_xalign") | |
| 950 | - | core.PuregoSafeRegister(&xSqueezerGetYalign, libs, "adw_squeezer_get_yalign") | |
| 951 | - | core.PuregoSafeRegister(&xSqueezerRemove, libs, "adw_squeezer_remove") | |
| 952 | - | core.PuregoSafeRegister(&xSqueezerSetAllowNone, libs, "adw_squeezer_set_allow_none") | |
| 953 | - | core.PuregoSafeRegister(&xSqueezerSetHomogeneous, libs, "adw_squeezer_set_homogeneous") | |
| 954 | - | core.PuregoSafeRegister(&xSqueezerSetInterpolateSize, libs, "adw_squeezer_set_interpolate_size") | |
| 955 | - | core.PuregoSafeRegister(&xSqueezerSetSwitchThresholdPolicy, libs, "adw_squeezer_set_switch_threshold_policy") | |
| 956 | - | core.PuregoSafeRegister(&xSqueezerSetTransitionDuration, libs, "adw_squeezer_set_transition_duration") | |
| 957 | - | core.PuregoSafeRegister(&xSqueezerSetTransitionType, libs, "adw_squeezer_set_transition_type") | |
| 958 | - | core.PuregoSafeRegister(&xSqueezerSetXalign, libs, "adw_squeezer_set_xalign") | |
| 959 | - | core.PuregoSafeRegister(&xSqueezerSetYalign, libs, "adw_squeezer_set_yalign") | |
| 960 | - | ||
| 961 | - | core.PuregoSafeRegister(&xSqueezerPageGLibType, libs, "adw_squeezer_page_get_type") | |
| 962 | - | ||
| 963 | - | core.PuregoSafeRegister(&xSqueezerPageGetChild, libs, "adw_squeezer_page_get_child") | |
| 964 | - | core.PuregoSafeRegister(&xSqueezerPageGetEnabled, libs, "adw_squeezer_page_get_enabled") | |
| 965 | - | core.PuregoSafeRegister(&xSqueezerPageSetEnabled, libs, "adw_squeezer_page_set_enabled") | |
| 966 | 971 | } | |
| @@ -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" | ||
| @@ -54,6 +53,7 @@ type SqueezerTransitionType int | |||||
| 54 | var xSqueezerTransitionTypeGLibType func() types.GType | 53 | var xSqueezerTransitionTypeGLibType func() types.GType | ||
| 55 | 54 | ||||
| 56 | func SqueezerTransitionTypeGLibType() types.GType { | 55 | func SqueezerTransitionTypeGLibType() types.GType { | ||
| 56 | + | core.LazyRegister(&xSqueezerTransitionTypeGLibType, "ADW", "adw_squeezer_transition_type_get_type", false) | |||
| 57 | return xSqueezerTransitionTypeGLibType() | 57 | return xSqueezerTransitionTypeGLibType() | ||
| 58 | } | 58 | } | ||
| 59 | 59 | ||||
| @@ -98,6 +98,7 @@ type Squeezer struct { | |||||
| 98 | var xSqueezerGLibType func() types.GType | 98 | var xSqueezerGLibType func() types.GType | ||
| 99 | 99 | ||||
| 100 | func SqueezerGLibType() types.GType { | 100 | func SqueezerGLibType() types.GType { | ||
| 101 | + | core.LazyRegister(&xSqueezerGLibType, "ADW", "adw_squeezer_get_type", false) | |||
| 101 | return xSqueezerGLibType() | 102 | return xSqueezerGLibType() | ||
| 102 | } | 103 | } | ||
| 103 | 104 | ||||
| @@ -111,6 +112,7 @@ var xNewSqueezer func() uintptr | |||||
| 111 | 112 | ||||
| 112 | // Creates a new `AdwSqueezer`. | 113 | // Creates a new `AdwSqueezer`. | ||
| 113 | func NewSqueezer() *Squeezer { | 114 | func NewSqueezer() *Squeezer { | ||
| 115 | + | core.LazyRegister(&xNewSqueezer, "ADW", "adw_squeezer_new", false) | |||
| 114 | var cls *Squeezer | 116 | var cls *Squeezer | ||
| 115 | 117 | ||||
| 116 | cret := xNewSqueezer() | 118 | cret := xNewSqueezer() | ||
| @@ -128,6 +130,7 @@ var xSqueezerAdd func(uintptr, uintptr) uintptr | |||||
| 128 | 130 | ||||
| 129 | // Adds a child to @self. | 131 | // Adds a child to @self. | ||
| 130 | func (x *Squeezer) Add(ChildVar *gtk.Widget) *SqueezerPage { | 132 | func (x *Squeezer) Add(ChildVar *gtk.Widget) *SqueezerPage { | ||
| 133 | + | core.LazyRegister(&xSqueezerAdd, "ADW", "adw_squeezer_add", false) | |||
| 131 | var cls *SqueezerPage | 134 | var cls *SqueezerPage | ||
| 132 | 135 | ||||
| 133 | cret := xSqueezerAdd(x.GoPointer(), ChildVar.GoPointer()) | 136 | cret := xSqueezerAdd(x.GoPointer(), ChildVar.GoPointer()) | ||
| @@ -145,6 +148,8 @@ var xSqueezerGetAllowNone func(uintptr) bool | |||||
| 145 | 148 | ||||
| 146 | // Gets whether to allow squeezing beyond the last child's minimum size. | 149 | // Gets whether to allow squeezing beyond the last child's minimum size. | ||
| 147 | func (x *Squeezer) GetAllowNone() bool { | 150 | func (x *Squeezer) GetAllowNone() bool { | ||
| 151 | + | core.LazyRegister(&xSqueezerGetAllowNone, "ADW", "adw_squeezer_get_allow_none", false) | |||
| 152 | + | ||||
| 148 | cret := xSqueezerGetAllowNone(x.GoPointer()) | 153 | cret := xSqueezerGetAllowNone(x.GoPointer()) | ||
| 149 | return cret | 154 | return cret | ||
| 150 | } | 155 | } | ||
| @@ -153,6 +158,8 @@ var xSqueezerGetHomogeneous func(uintptr) bool | |||||
| 153 | 158 | ||||
| 154 | // Gets whether all children have the same size for the opposite orientation. | 159 | // Gets whether all children have the same size for the opposite orientation. | ||
| 155 | func (x *Squeezer) GetHomogeneous() bool { | 160 | func (x *Squeezer) GetHomogeneous() bool { | ||
| 161 | + | core.LazyRegister(&xSqueezerGetHomogeneous, "ADW", "adw_squeezer_get_homogeneous", false) | |||
| 162 | + | ||||
| 156 | cret := xSqueezerGetHomogeneous(x.GoPointer()) | 163 | cret := xSqueezerGetHomogeneous(x.GoPointer()) | ||
| 157 | return cret | 164 | return cret | ||
| 158 | } | 165 | } | ||
| @@ -161,6 +168,8 @@ var xSqueezerGetInterpolateSize func(uintptr) bool | |||||
| 161 | 168 | ||||
| 162 | // Gets whether @self interpolates its size when changing the visible child. | 169 | // Gets whether @self interpolates its size when changing the visible child. | ||
| 163 | func (x *Squeezer) GetInterpolateSize() bool { | 170 | func (x *Squeezer) GetInterpolateSize() bool { | ||
| 171 | + | core.LazyRegister(&xSqueezerGetInterpolateSize, "ADW", "adw_squeezer_get_interpolate_size", false) | |||
| 172 | + | ||||
| 164 | cret := xSqueezerGetInterpolateSize(x.GoPointer()) | 173 | cret := xSqueezerGetInterpolateSize(x.GoPointer()) | ||
| 165 | return cret | 174 | return cret | ||
| 166 | } | 175 | } | ||
| @@ -169,6 +178,7 @@ var xSqueezerGetPage func(uintptr, uintptr) uintptr | |||||
| 169 | 178 | ||||
| 170 | // Returns the [class@SqueezerPage] object for @child. | 179 | // Returns the [class@SqueezerPage] object for @child. | ||
| 171 | func (x *Squeezer) GetPage(ChildVar *gtk.Widget) *SqueezerPage { | 180 | func (x *Squeezer) GetPage(ChildVar *gtk.Widget) *SqueezerPage { | ||
| 181 | + | core.LazyRegister(&xSqueezerGetPage, "ADW", "adw_squeezer_get_page", false) | |||
| 172 | var cls *SqueezerPage | 182 | var cls *SqueezerPage | ||
| 173 | 183 | ||||
| 174 | cret := xSqueezerGetPage(x.GoPointer(), ChildVar.GoPointer()) | 184 | cret := xSqueezerGetPage(x.GoPointer(), ChildVar.GoPointer()) | ||
| @@ -189,6 +199,7 @@ var xSqueezerGetPages func(uintptr) uintptr | |||||
| 189 | // This can be used to keep an up-to-date view. The model also implements | 199 | // This can be used to keep an up-to-date view. The model also implements | ||
| 190 | // [iface@Gtk.SelectionModel] and can be used to track the visible page. | 200 | // [iface@Gtk.SelectionModel] and can be used to track the visible page. | ||
| 191 | func (x *Squeezer) GetPages() *gtk.SelectionModelBase { | 201 | func (x *Squeezer) GetPages() *gtk.SelectionModelBase { | ||
| 202 | + | core.LazyRegister(&xSqueezerGetPages, "ADW", "adw_squeezer_get_pages", false) | |||
| 192 | var cls *gtk.SelectionModelBase | 203 | var cls *gtk.SelectionModelBase | ||
| 193 | 204 | ||||
| 194 | cret := xSqueezerGetPages(x.GoPointer()) | 205 | cret := xSqueezerGetPages(x.GoPointer()) | ||
| @@ -205,6 +216,8 @@ var xSqueezerGetSwitchThresholdPolicy func(uintptr) FoldThresholdPolicy | |||||
| 205 | 216 | ||||
| 206 | // Gets the switch threshold policy for @self. | 217 | // Gets the switch threshold policy for @self. | ||
| 207 | func (x *Squeezer) GetSwitchThresholdPolicy() FoldThresholdPolicy { | 218 | func (x *Squeezer) GetSwitchThresholdPolicy() FoldThresholdPolicy { | ||
| 219 | + | core.LazyRegister(&xSqueezerGetSwitchThresholdPolicy, "ADW", "adw_squeezer_get_switch_threshold_policy", false) | |||
| 220 | + | ||||
| 208 | cret := xSqueezerGetSwitchThresholdPolicy(x.GoPointer()) | 221 | cret := xSqueezerGetSwitchThresholdPolicy(x.GoPointer()) | ||
| 209 | return cret | 222 | return cret | ||
| 210 | } | 223 | } | ||
| @@ -213,6 +226,8 @@ var xSqueezerGetTransitionDuration func(uintptr) uint | |||||
| 213 | 226 | ||||
| 214 | // Gets the transition animation duration for @self. | 227 | // Gets the transition animation duration for @self. | ||
| 215 | func (x *Squeezer) GetTransitionDuration() uint { | 228 | func (x *Squeezer) GetTransitionDuration() uint { | ||
| 229 | + | core.LazyRegister(&xSqueezerGetTransitionDuration, "ADW", "adw_squeezer_get_transition_duration", false) | |||
| 230 | + | ||||
| 216 | cret := xSqueezerGetTransitionDuration(x.GoPointer()) | 231 | cret := xSqueezerGetTransitionDuration(x.GoPointer()) | ||
| 217 | return cret | 232 | return cret | ||
| 218 | } | 233 | } | ||
| @@ -225,6 +240,8 @@ var xSqueezerGetTransitionRunning func(uintptr) bool | |||||
| 225 | // then immediately to `FALSE`, so it's possible to rely on its notifications | 240 | // then immediately to `FALSE`, so it's possible to rely on its notifications | ||
| 226 | // to know that a transition has happened. | 241 | // to know that a transition has happened. | ||
| 227 | func (x *Squeezer) GetTransitionRunning() bool { | 242 | func (x *Squeezer) GetTransitionRunning() bool { | ||
| 243 | + | core.LazyRegister(&xSqueezerGetTransitionRunning, "ADW", "adw_squeezer_get_transition_running", false) | |||
| 244 | + | ||||
| 228 | cret := xSqueezerGetTransitionRunning(x.GoPointer()) | 245 | cret := xSqueezerGetTransitionRunning(x.GoPointer()) | ||
| 229 | return cret | 246 | return cret | ||
| 230 | } | 247 | } | ||
| @@ -233,6 +250,8 @@ var xSqueezerGetTransitionType func(uintptr) SqueezerTransitionType | |||||
| 233 | 250 | ||||
| 234 | // Gets the type of animation used for transitions between children in @self. | 251 | // Gets the type of animation used for transitions between children in @self. | ||
| 235 | func (x *Squeezer) GetTransitionType() SqueezerTransitionType { | 252 | func (x *Squeezer) GetTransitionType() SqueezerTransitionType { | ||
| 253 | + | core.LazyRegister(&xSqueezerGetTransitionType, "ADW", "adw_squeezer_get_transition_type", false) | |||
| 254 | + | ||||
| 236 | cret := xSqueezerGetTransitionType(x.GoPointer()) | 255 | cret := xSqueezerGetTransitionType(x.GoPointer()) | ||
| 237 | return cret | 256 | return cret | ||
| 238 | } | 257 | } | ||
| @@ -241,6 +260,7 @@ var xSqueezerGetVisibleChild func(uintptr) uintptr | |||||
| 241 | 260 | ||||
| 242 | // Gets the currently visible child of @self. | 261 | // Gets the currently visible child of @self. | ||
| 243 | func (x *Squeezer) GetVisibleChild() *gtk.Widget { | 262 | func (x *Squeezer) GetVisibleChild() *gtk.Widget { | ||
| 263 | + | core.LazyRegister(&xSqueezerGetVisibleChild, "ADW", "adw_squeezer_get_visible_child", false) | |||
| 244 | var cls *gtk.Widget | 264 | var cls *gtk.Widget | ||
| 245 | 265 | ||||
| 246 | cret := xSqueezerGetVisibleChild(x.GoPointer()) | 266 | cret := xSqueezerGetVisibleChild(x.GoPointer()) | ||
| @@ -258,6 +278,8 @@ var xSqueezerGetXalign func(uintptr) float32 | |||||
| 258 | 278 | ||||
| 259 | // Gets the horizontal alignment, from 0 (start) to 1 (end). | 279 | // Gets the horizontal alignment, from 0 (start) to 1 (end). | ||
| 260 | func (x *Squeezer) GetXalign() float32 { | 280 | func (x *Squeezer) GetXalign() float32 { | ||
| 281 | + | core.LazyRegister(&xSqueezerGetXalign, "ADW", "adw_squeezer_get_xalign", false) | |||
| 282 | + | ||||
| 261 | cret := xSqueezerGetXalign(x.GoPointer()) | 283 | cret := xSqueezerGetXalign(x.GoPointer()) | ||
| 262 | return cret | 284 | return cret | ||
| 263 | } | 285 | } | ||
| @@ -266,6 +288,8 @@ var xSqueezerGetYalign func(uintptr) float32 | |||||
| 266 | 288 | ||||
| 267 | // Gets the vertical alignment, from 0 (top) to 1 (bottom). | 289 | // Gets the vertical alignment, from 0 (top) to 1 (bottom). | ||
| 268 | func (x *Squeezer) GetYalign() float32 { | 290 | func (x *Squeezer) GetYalign() float32 { | ||
| 291 | + | core.LazyRegister(&xSqueezerGetYalign, "ADW", "adw_squeezer_get_yalign", false) | |||
| 292 | + | ||||
| 269 | cret := xSqueezerGetYalign(x.GoPointer()) | 293 | cret := xSqueezerGetYalign(x.GoPointer()) | ||
| 270 | return cret | 294 | return cret | ||
| 271 | } | 295 | } | ||
| @@ -274,6 +298,8 @@ var xSqueezerRemove func(uintptr, uintptr) | |||||
| 274 | 298 | ||||
| 275 | // Removes a child widget from @self. | 299 | // Removes a child widget from @self. | ||
| 276 | func (x *Squeezer) Remove(ChildVar *gtk.Widget) { | 300 | func (x *Squeezer) Remove(ChildVar *gtk.Widget) { | ||
| 301 | + | core.LazyRegister(&xSqueezerRemove, "ADW", "adw_squeezer_remove", false) | |||
| 302 | + | ||||
| 277 | xSqueezerRemove(x.GoPointer(), ChildVar.GoPointer()) | 303 | xSqueezerRemove(x.GoPointer(), ChildVar.GoPointer()) | ||
| 278 | } | 304 | } | ||
| 279 | 305 | ||||
| @@ -285,6 +311,8 @@ var xSqueezerSetAllowNone func(uintptr, bool) | |||||
| 285 | // shown. This is functionally equivalent to appending a widget with 0×0 minimum | 311 | // shown. This is functionally equivalent to appending a widget with 0×0 minimum | ||
| 286 | // size. | 312 | // size. | ||
| 287 | func (x *Squeezer) SetAllowNone(AllowNoneVar bool) { | 313 | func (x *Squeezer) SetAllowNone(AllowNoneVar bool) { | ||
| 314 | + | core.LazyRegister(&xSqueezerSetAllowNone, "ADW", "adw_squeezer_set_allow_none", false) | |||
| 315 | + | ||||
| 288 | xSqueezerSetAllowNone(x.GoPointer(), AllowNoneVar) | 316 | xSqueezerSetAllowNone(x.GoPointer(), AllowNoneVar) | ||
| 289 | } | 317 | } | ||
| 290 | 318 | ||||
| @@ -296,6 +324,8 @@ var xSqueezerSetHomogeneous func(uintptr, bool) | |||||
| 296 | // the same height for all its children. If it isn't, the squeezer may change | 324 | // the same height for all its children. If it isn't, the squeezer may change | ||
| 297 | // size when a different child becomes visible. | 325 | // size when a different child becomes visible. | ||
| 298 | func (x *Squeezer) SetHomogeneous(HomogeneousVar bool) { | 326 | func (x *Squeezer) SetHomogeneous(HomogeneousVar bool) { | ||
| 327 | + | core.LazyRegister(&xSqueezerSetHomogeneous, "ADW", "adw_squeezer_set_homogeneous", false) | |||
| 328 | + | ||||
| 299 | xSqueezerSetHomogeneous(x.GoPointer(), HomogeneousVar) | 329 | xSqueezerSetHomogeneous(x.GoPointer(), HomogeneousVar) | ||
| 300 | } | 330 | } | ||
| 301 | 331 | ||||
| @@ -308,6 +338,8 @@ var xSqueezerSetInterpolateSize func(uintptr, bool) | |||||
| 308 | // set transition duration and the orientation, e.g. if the squeezer is | 338 | // set transition duration and the orientation, e.g. if the squeezer is | ||
| 309 | // horizontal, it will interpolate the its height. | 339 | // horizontal, it will interpolate the its height. | ||
| 310 | func (x *Squeezer) SetInterpolateSize(InterpolateSizeVar bool) { | 340 | func (x *Squeezer) SetInterpolateSize(InterpolateSizeVar bool) { | ||
| 341 | + | core.LazyRegister(&xSqueezerSetInterpolateSize, "ADW", "adw_squeezer_set_interpolate_size", false) | |||
| 342 | + | ||||
| 311 | xSqueezerSetInterpolateSize(x.GoPointer(), InterpolateSizeVar) | 343 | xSqueezerSetInterpolateSize(x.GoPointer(), InterpolateSizeVar) | ||
| 312 | } | 344 | } | ||
| 313 | 345 | ||||
| @@ -324,6 +356,8 @@ var xSqueezerSetSwitchThresholdPolicy func(uintptr, FoldThresholdPolicy) | |||||
| 324 | // This can be useful if you have a long ellipsizing label and want to let it | 356 | // This can be useful if you have a long ellipsizing label and want to let it | ||
| 325 | // ellipsize instead of immediately switching. | 357 | // ellipsize instead of immediately switching. | ||
| 326 | func (x *Squeezer) SetSwitchThresholdPolicy(PolicyVar FoldThresholdPolicy) { | 358 | func (x *Squeezer) SetSwitchThresholdPolicy(PolicyVar FoldThresholdPolicy) { | ||
| 359 | + | core.LazyRegister(&xSqueezerSetSwitchThresholdPolicy, "ADW", "adw_squeezer_set_switch_threshold_policy", false) | |||
| 360 | + | ||||
| 327 | xSqueezerSetSwitchThresholdPolicy(x.GoPointer(), PolicyVar) | 361 | xSqueezerSetSwitchThresholdPolicy(x.GoPointer(), PolicyVar) | ||
| 328 | } | 362 | } | ||
| 329 | 363 | ||||
| @@ -331,6 +365,8 @@ var xSqueezerSetTransitionDuration func(uintptr, uint) | |||||
| 331 | 365 | ||||
| 332 | // Sets the transition animation duration for @self. | 366 | // Sets the transition animation duration for @self. | ||
| 333 | func (x *Squeezer) SetTransitionDuration(DurationVar uint) { | 367 | func (x *Squeezer) SetTransitionDuration(DurationVar uint) { | ||
| 368 | + | core.LazyRegister(&xSqueezerSetTransitionDuration, "ADW", "adw_squeezer_set_transition_duration", false) | |||
| 369 | + | ||||
| 334 | xSqueezerSetTransitionDuration(x.GoPointer(), DurationVar) | 370 | xSqueezerSetTransitionDuration(x.GoPointer(), DurationVar) | ||
| 335 | } | 371 | } | ||
| 336 | 372 | ||||
| @@ -338,6 +374,8 @@ var xSqueezerSetTransitionType func(uintptr, SqueezerTransitionType) | |||||
| 338 | 374 | ||||
| 339 | // Sets the type of animation used for transitions between children in @self. | 375 | // Sets the type of animation used for transitions between children in @self. | ||
| 340 | func (x *Squeezer) SetTransitionType(TransitionVar SqueezerTransitionType) { | 376 | func (x *Squeezer) SetTransitionType(TransitionVar SqueezerTransitionType) { | ||
| 377 | + | core.LazyRegister(&xSqueezerSetTransitionType, "ADW", "adw_squeezer_set_transition_type", false) | |||
| 378 | + | ||||
| 341 | xSqueezerSetTransitionType(x.GoPointer(), TransitionVar) | 379 | xSqueezerSetTransitionType(x.GoPointer(), TransitionVar) | ||
| 342 | } | 380 | } | ||
| 343 | 381 | ||||
| @@ -351,6 +389,8 @@ var xSqueezerSetXalign func(uintptr, float32) | |||||
| 351 | // For example, 0.5 means the child will be centered, 0 means it will keep the | 389 | // For example, 0.5 means the child will be centered, 0 means it will keep the | ||
| 352 | // start side aligned and overflow the end side, and 1 means the opposite. | 390 | // start side aligned and overflow the end side, and 1 means the opposite. | ||
| 353 | func (x *Squeezer) SetXalign(XalignVar float32) { | 391 | func (x *Squeezer) SetXalign(XalignVar float32) { | ||
| 392 | + | core.LazyRegister(&xSqueezerSetXalign, "ADW", "adw_squeezer_set_xalign", false) | |||
| 393 | + | ||||
| 354 | xSqueezerSetXalign(x.GoPointer(), XalignVar) | 394 | xSqueezerSetXalign(x.GoPointer(), XalignVar) | ||
| 355 | } | 395 | } | ||
| 356 | 396 | ||||
| @@ -364,6 +404,8 @@ var xSqueezerSetYalign func(uintptr, float32) | |||||
| 364 | // For example, 0.5 means the child will be centered, 0 means it will keep the | 404 | // For example, 0.5 means the child will be centered, 0 means it will keep the | ||
| 365 | // top side aligned and overflow the bottom side, and 1 means the opposite. | 405 | // top side aligned and overflow the bottom side, and 1 means the opposite. | ||
| 366 | func (x *Squeezer) SetYalign(YalignVar float32) { | 406 | func (x *Squeezer) SetYalign(YalignVar float32) { | ||
| 407 | + | core.LazyRegister(&xSqueezerSetYalign, "ADW", "adw_squeezer_set_yalign", false) | |||
| 408 | + | ||||
| 367 | xSqueezerSetYalign(x.GoPointer(), YalignVar) | 409 | xSqueezerSetYalign(x.GoPointer(), YalignVar) | ||
| 368 | } | 410 | } | ||
| 369 | 411 | ||||
| @@ -821,6 +863,7 @@ type SqueezerPage struct { | |||||
| 821 | var xSqueezerPageGLibType func() types.GType | 863 | var xSqueezerPageGLibType func() types.GType | ||
| 822 | 864 | ||||
| 823 | func SqueezerPageGLibType() types.GType { | 865 | func SqueezerPageGLibType() types.GType { | ||
| 866 | + | core.LazyRegister(&xSqueezerPageGLibType, "ADW", "adw_squeezer_page_get_type", false) | |||
| 824 | return xSqueezerPageGLibType() | 867 | return xSqueezerPageGLibType() | ||
| 825 | } | 868 | } | ||
| 826 | 869 | ||||
| @@ -834,6 +877,7 @@ var xSqueezerPageGetChild func(uintptr) uintptr | |||||
| 834 | 877 | ||||
| 835 | // Returns the squeezer child to which @self belongs. | 878 | // Returns the squeezer child to which @self belongs. | ||
| 836 | func (x *SqueezerPage) GetChild() *gtk.Widget { | 879 | func (x *SqueezerPage) GetChild() *gtk.Widget { | ||
| 880 | + | core.LazyRegister(&xSqueezerPageGetChild, "ADW", "adw_squeezer_page_get_child", false) | |||
| 837 | var cls *gtk.Widget | 881 | var cls *gtk.Widget | ||
| 838 | 882 | ||||
| 839 | cret := xSqueezerPageGetChild(x.GoPointer()) | 883 | cret := xSqueezerPageGetChild(x.GoPointer()) | ||
| @@ -851,6 +895,8 @@ var xSqueezerPageGetEnabled func(uintptr) bool | |||||
| 851 | 895 | ||||
| 852 | // Gets whether @self is enabled. | 896 | // Gets whether @self is enabled. | ||
| 853 | func (x *SqueezerPage) GetEnabled() bool { | 897 | func (x *SqueezerPage) GetEnabled() bool { | ||
| 898 | + | core.LazyRegister(&xSqueezerPageGetEnabled, "ADW", "adw_squeezer_page_get_enabled", false) | |||
| 899 | + | ||||
| 854 | cret := xSqueezerPageGetEnabled(x.GoPointer()) | 900 | cret := xSqueezerPageGetEnabled(x.GoPointer()) | ||
| 855 | return cret | 901 | return cret | ||
| 856 | } | 902 | } | ||
| @@ -868,6 +914,8 @@ var xSqueezerPageSetEnabled func(uintptr, bool) | |||||
| 868 | // This can be used e.g. to ensure a certain child is hidden below a certain | 914 | // This can be used e.g. to ensure a certain child is hidden below a certain | ||
| 869 | // window width, or any other constraint you find suitable. | 915 | // window width, or any other constraint you find suitable. | ||
| 870 | func (x *SqueezerPage) SetEnabled(EnabledVar bool) { | 916 | func (x *SqueezerPage) SetEnabled(EnabledVar bool) { | ||
| 917 | + | core.LazyRegister(&xSqueezerPageSetEnabled, "ADW", "adw_squeezer_page_set_enabled", false) | |||
| 918 | + | ||||
| 871 | xSqueezerPageSetEnabled(x.GoPointer(), EnabledVar) | 919 | xSqueezerPageSetEnabled(x.GoPointer(), EnabledVar) | ||
| 872 | } | 920 | } | ||
| 873 | 921 | ||||
| @@ -920,47 +968,4 @@ func (x *SqueezerPage) GetPropertyEnabled() bool { | |||||
| 920 | func init() { | 968 | func init() { | ||
| 921 | core.SetPackageName("ADW", "libadwaita-1") | 969 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 922 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 970 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | ||
| 923 | - | var libs []uintptr | |||
| 924 | - | for _, libPath := range core.GetPaths("ADW") { | |||
| 925 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 926 | - | if err != nil { | |||
| 927 | - | panic(err) | |||
| 928 | - | } | |||
| 929 | - | libs = append(libs, lib) | |||
| 930 | - | } | |||
| 931 | - | ||||
| 932 | - | core.PuregoSafeRegister(&xSqueezerTransitionTypeGLibType, libs, "adw_squeezer_transition_type_get_type") | |||
| 933 | - | ||||
| 934 | - | core.PuregoSafeRegister(&xSqueezerGLibType, libs, "adw_squeezer_get_type") | |||
| 935 | - | ||||
| 936 | - | core.PuregoSafeRegister(&xNewSqueezer, libs, "adw_squeezer_new") | |||
| 937 | - | ||||
| 938 | - | core.PuregoSafeRegister(&xSqueezerAdd, libs, "adw_squeezer_add") | |||
| 939 | - | core.PuregoSafeRegister(&xSqueezerGetAllowNone, libs, "adw_squeezer_get_allow_none") | |||
| 940 | - | core.PuregoSafeRegister(&xSqueezerGetHomogeneous, libs, "adw_squeezer_get_homogeneous") | |||
| 941 | - | core.PuregoSafeRegister(&xSqueezerGetInterpolateSize, libs, "adw_squeezer_get_interpolate_size") | |||
| 942 | - | core.PuregoSafeRegister(&xSqueezerGetPage, libs, "adw_squeezer_get_page") | |||
| 943 | - | core.PuregoSafeRegister(&xSqueezerGetPages, libs, "adw_squeezer_get_pages") | |||
| 944 | - | core.PuregoSafeRegister(&xSqueezerGetSwitchThresholdPolicy, libs, "adw_squeezer_get_switch_threshold_policy") | |||
| 945 | - | core.PuregoSafeRegister(&xSqueezerGetTransitionDuration, libs, "adw_squeezer_get_transition_duration") | |||
| 946 | - | core.PuregoSafeRegister(&xSqueezerGetTransitionRunning, libs, "adw_squeezer_get_transition_running") | |||
| 947 | - | core.PuregoSafeRegister(&xSqueezerGetTransitionType, libs, "adw_squeezer_get_transition_type") | |||
| 948 | - | core.PuregoSafeRegister(&xSqueezerGetVisibleChild, libs, "adw_squeezer_get_visible_child") | |||
| 949 | - | core.PuregoSafeRegister(&xSqueezerGetXalign, libs, "adw_squeezer_get_xalign") | |||
| 950 | - | core.PuregoSafeRegister(&xSqueezerGetYalign, libs, "adw_squeezer_get_yalign") | |||
| 951 | - | core.PuregoSafeRegister(&xSqueezerRemove, libs, "adw_squeezer_remove") | |||
| 952 | - | core.PuregoSafeRegister(&xSqueezerSetAllowNone, libs, "adw_squeezer_set_allow_none") | |||
| 953 | - | core.PuregoSafeRegister(&xSqueezerSetHomogeneous, libs, "adw_squeezer_set_homogeneous") | |||
| 954 | - | core.PuregoSafeRegister(&xSqueezerSetInterpolateSize, libs, "adw_squeezer_set_interpolate_size") | |||
| 955 | - | core.PuregoSafeRegister(&xSqueezerSetSwitchThresholdPolicy, libs, "adw_squeezer_set_switch_threshold_policy") | |||
| 956 | - | core.PuregoSafeRegister(&xSqueezerSetTransitionDuration, libs, "adw_squeezer_set_transition_duration") | |||
| 957 | - | core.PuregoSafeRegister(&xSqueezerSetTransitionType, libs, "adw_squeezer_set_transition_type") | |||
| 958 | - | core.PuregoSafeRegister(&xSqueezerSetXalign, libs, "adw_squeezer_set_xalign") | |||
| 959 | - | core.PuregoSafeRegister(&xSqueezerSetYalign, libs, "adw_squeezer_set_yalign") | |||
| 960 | - | ||||
| 961 | - | core.PuregoSafeRegister(&xSqueezerPageGLibType, libs, "adw_squeezer_page_get_type") | |||
| 962 | - | ||||
| 963 | - | core.PuregoSafeRegister(&xSqueezerPageGetChild, libs, "adw_squeezer_page_get_child") | |||
| 964 | - | core.PuregoSafeRegister(&xSqueezerPageGetEnabled, libs, "adw_squeezer_page_get_enabled") | |||
| 965 | - | core.PuregoSafeRegister(&xSqueezerPageSetEnabled, libs, "adw_squeezer_page_set_enabled") | |||
| 966 | } | 971 | } | ||