Revert "chore(deps): pin puregotk nil-signal fix"
This reverts commit a161e348e2093172038390b0906448f0ae979a0d.
- commit
- 40378d5e4fd2372d054e49168ab2a6f67aedd0fd
- author
- brice · · 2026-07-14 17:59 UTC
- parent
- 8d647bb
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
905 files · +25263 -27842
M go.mod +1 -1
| @@ -11,7 +11,7 @@ require ( | |||
| 11 | 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | |
| 12 | 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | |
| 13 | 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | |
| 14 | - | github.com/bnema/puregotk v0.7.1-0.20260714170452-0b6b9b901234 | |
| 14 | + | github.com/bnema/puregotk v0.7.0 | |
| 15 | 15 | github.com/charmbracelet/bubbles v1.0.0 | |
| 16 | 16 | github.com/charmbracelet/bubbletea v1.3.10 | |
| 17 | 17 | github.com/charmbracelet/lipgloss v1.1.0 | |
| @@ -11,7 +11,7 @@ require ( | |||||
| 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | ||
| 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | ||
| 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | ||
| 14 | - | github.com/bnema/puregotk v0.7.1-0.20260714170452-0b6b9b901234 | 14 | + | github.com/bnema/puregotk v0.7.0 |
| 15 | github.com/charmbracelet/bubbles v1.0.0 | 15 | github.com/charmbracelet/bubbles v1.0.0 | ||
| 16 | github.com/charmbracelet/bubbletea v1.3.10 | 16 | github.com/charmbracelet/bubbletea v1.3.10 | ||
| 17 | github.com/charmbracelet/lipgloss v1.1.0 | 17 | github.com/charmbracelet/lipgloss v1.1.0 | ||
M go.sum +0 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/internal/core/core.go +4 -197 generated file: collapsed
M vendor/github.com/bnema/puregotk/pkg/core/core.go +0 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-dialog.go +64 -99 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-window.go +62 -95 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-accent-color.go +15 -7 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-action-row.go +29 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-alert-dialog.go +47 -66 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-target.go +27 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-util.go +12 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation.go +26 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application-window.go +22 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application.go +15 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-avatar.go +25 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-banner.go +26 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bin.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bottom-sheet.go +38 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint-bin.go +19 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint.go +37 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-content.go +22 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-row.go +18 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-dots.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-lines.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel.go +37 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-layout.go +20 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-scrollable.go +22 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp.go +22 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-combo-row.go +33 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-dialog.go +38 -45 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-easing.go +13 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-entry-row.go +33 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-enum-list-model.go +22 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-expander-row.go +33 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-flap.go +48 -61 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-fold-threshold-policy.go +1 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-header-bar.go +33 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-inline-view-switcher.go +24 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout-slot.go +15 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout.go +17 -7 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-leaflet.go +56 -69 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-length-unit.go +14 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-main.go +15 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-message-dialog.go +44 -63 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-multi-layout-view.go +23 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-direction.go +1 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-split-view.go +32 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-view.go +49 -60 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-overlay-split-view.go +38 -48 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-password-entry-row.go +13 -2 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-dialog.go +25 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-group.go +26 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-page.go +33 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-row.go +22 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-window.go +29 -31 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcut-label.go +18 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-dialog.go +15 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-item.go +25 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-section.go +17 -8 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar-item.go +37 -45 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar-section.go +27 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar.go +39 -41 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spin-row.go +34 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spinner-paintable.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spinner.go +13 -2 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-split-button.go +34 -39 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spring-animation.go +30 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spring-params.go +21 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-squeezer.go +44 -49
| @@ -5,6 +5,7 @@ import ( | |||
| 5 | 5 | "structs" | |
| 6 | 6 | "unsafe" | |
| 7 | 7 | ||
| 8 | + | "github.com/bnema/purego" | |
| 8 | 9 | "github.com/bnema/puregotk/pkg/core" | |
| 9 | 10 | "github.com/bnema/puregotk/v4/gobject" | |
| 10 | 11 | "github.com/bnema/puregotk/v4/gobject/types" | |
| @@ -53,7 +54,6 @@ type SqueezerTransitionType int | |||
| 53 | 54 | var xSqueezerTransitionTypeGLibType func() types.GType | |
| 54 | 55 | ||
| 55 | 56 | 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,7 +98,6 @@ 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) | |
| 102 | 101 | return xSqueezerGLibType() | |
| 103 | 102 | } | |
| 104 | 103 | ||
| @@ -112,7 +111,6 @@ var xNewSqueezer func() uintptr | |||
| 112 | 111 | ||
| 113 | 112 | // Creates a new `AdwSqueezer`. | |
| 114 | 113 | func NewSqueezer() *Squeezer { | |
| 115 | - | core.LazyRegister(&xNewSqueezer, "ADW", "adw_squeezer_new", false) | |
| 116 | 114 | var cls *Squeezer | |
| 117 | 115 | ||
| 118 | 116 | cret := xNewSqueezer() | |
| @@ -130,7 +128,6 @@ var xSqueezerAdd func(uintptr, uintptr) uintptr | |||
| 130 | 128 | ||
| 131 | 129 | // Adds a child to @self. | |
| 132 | 130 | func (x *Squeezer) Add(ChildVar *gtk.Widget) *SqueezerPage { | |
| 133 | - | core.LazyRegister(&xSqueezerAdd, "ADW", "adw_squeezer_add", false) | |
| 134 | 131 | var cls *SqueezerPage | |
| 135 | 132 | ||
| 136 | 133 | cret := xSqueezerAdd(x.GoPointer(), ChildVar.GoPointer()) | |
| @@ -148,8 +145,6 @@ var xSqueezerGetAllowNone func(uintptr) bool | |||
| 148 | 145 | ||
| 149 | 146 | // Gets whether to allow squeezing beyond the last child's minimum size. | |
| 150 | 147 | func (x *Squeezer) GetAllowNone() bool { | |
| 151 | - | core.LazyRegister(&xSqueezerGetAllowNone, "ADW", "adw_squeezer_get_allow_none", false) | |
| 152 | - | ||
| 153 | 148 | cret := xSqueezerGetAllowNone(x.GoPointer()) | |
| 154 | 149 | return cret | |
| 155 | 150 | } | |
| @@ -158,8 +153,6 @@ var xSqueezerGetHomogeneous func(uintptr) bool | |||
| 158 | 153 | ||
| 159 | 154 | // Gets whether all children have the same size for the opposite orientation. | |
| 160 | 155 | func (x *Squeezer) GetHomogeneous() bool { | |
| 161 | - | core.LazyRegister(&xSqueezerGetHomogeneous, "ADW", "adw_squeezer_get_homogeneous", false) | |
| 162 | - | ||
| 163 | 156 | cret := xSqueezerGetHomogeneous(x.GoPointer()) | |
| 164 | 157 | return cret | |
| 165 | 158 | } | |
| @@ -168,8 +161,6 @@ var xSqueezerGetInterpolateSize func(uintptr) bool | |||
| 168 | 161 | ||
| 169 | 162 | // Gets whether @self interpolates its size when changing the visible child. | |
| 170 | 163 | func (x *Squeezer) GetInterpolateSize() bool { | |
| 171 | - | core.LazyRegister(&xSqueezerGetInterpolateSize, "ADW", "adw_squeezer_get_interpolate_size", false) | |
| 172 | - | ||
| 173 | 164 | cret := xSqueezerGetInterpolateSize(x.GoPointer()) | |
| 174 | 165 | return cret | |
| 175 | 166 | } | |
| @@ -178,7 +169,6 @@ var xSqueezerGetPage func(uintptr, uintptr) uintptr | |||
| 178 | 169 | ||
| 179 | 170 | // Returns the [class@SqueezerPage] object for @child. | |
| 180 | 171 | func (x *Squeezer) GetPage(ChildVar *gtk.Widget) *SqueezerPage { | |
| 181 | - | core.LazyRegister(&xSqueezerGetPage, "ADW", "adw_squeezer_get_page", false) | |
| 182 | 172 | var cls *SqueezerPage | |
| 183 | 173 | ||
| 184 | 174 | cret := xSqueezerGetPage(x.GoPointer(), ChildVar.GoPointer()) | |
| @@ -199,7 +189,6 @@ var xSqueezerGetPages func(uintptr) uintptr | |||
| 199 | 189 | // This can be used to keep an up-to-date view. The model also implements | |
| 200 | 190 | // [iface@Gtk.SelectionModel] and can be used to track the visible page. | |
| 201 | 191 | func (x *Squeezer) GetPages() *gtk.SelectionModelBase { | |
| 202 | - | core.LazyRegister(&xSqueezerGetPages, "ADW", "adw_squeezer_get_pages", false) | |
| 203 | 192 | var cls *gtk.SelectionModelBase | |
| 204 | 193 | ||
| 205 | 194 | cret := xSqueezerGetPages(x.GoPointer()) | |
| @@ -216,8 +205,6 @@ var xSqueezerGetSwitchThresholdPolicy func(uintptr) FoldThresholdPolicy | |||
| 216 | 205 | ||
| 217 | 206 | // Gets the switch threshold policy for @self. | |
| 218 | 207 | func (x *Squeezer) GetSwitchThresholdPolicy() FoldThresholdPolicy { | |
| 219 | - | core.LazyRegister(&xSqueezerGetSwitchThresholdPolicy, "ADW", "adw_squeezer_get_switch_threshold_policy", false) | |
| 220 | - | ||
| 221 | 208 | cret := xSqueezerGetSwitchThresholdPolicy(x.GoPointer()) | |
| 222 | 209 | return cret | |
| 223 | 210 | } | |
| @@ -226,8 +213,6 @@ var xSqueezerGetTransitionDuration func(uintptr) uint | |||
| 226 | 213 | ||
| 227 | 214 | // Gets the transition animation duration for @self. | |
| 228 | 215 | func (x *Squeezer) GetTransitionDuration() uint { | |
| 229 | - | core.LazyRegister(&xSqueezerGetTransitionDuration, "ADW", "adw_squeezer_get_transition_duration", false) | |
| 230 | - | ||
| 231 | 216 | cret := xSqueezerGetTransitionDuration(x.GoPointer()) | |
| 232 | 217 | return cret | |
| 233 | 218 | } | |
| @@ -240,8 +225,6 @@ var xSqueezerGetTransitionRunning func(uintptr) bool | |||
| 240 | 225 | // then immediately to `FALSE`, so it's possible to rely on its notifications | |
| 241 | 226 | // to know that a transition has happened. | |
| 242 | 227 | func (x *Squeezer) GetTransitionRunning() bool { | |
| 243 | - | core.LazyRegister(&xSqueezerGetTransitionRunning, "ADW", "adw_squeezer_get_transition_running", false) | |
| 244 | - | ||
| 245 | 228 | cret := xSqueezerGetTransitionRunning(x.GoPointer()) | |
| 246 | 229 | return cret | |
| 247 | 230 | } | |
| @@ -250,8 +233,6 @@ var xSqueezerGetTransitionType func(uintptr) SqueezerTransitionType | |||
| 250 | 233 | ||
| 251 | 234 | // Gets the type of animation used for transitions between children in @self. | |
| 252 | 235 | func (x *Squeezer) GetTransitionType() SqueezerTransitionType { | |
| 253 | - | core.LazyRegister(&xSqueezerGetTransitionType, "ADW", "adw_squeezer_get_transition_type", false) | |
| 254 | - | ||
| 255 | 236 | cret := xSqueezerGetTransitionType(x.GoPointer()) | |
| 256 | 237 | return cret | |
| 257 | 238 | } | |
| @@ -260,7 +241,6 @@ var xSqueezerGetVisibleChild func(uintptr) uintptr | |||
| 260 | 241 | ||
| 261 | 242 | // Gets the currently visible child of @self. | |
| 262 | 243 | func (x *Squeezer) GetVisibleChild() *gtk.Widget { | |
| 263 | - | core.LazyRegister(&xSqueezerGetVisibleChild, "ADW", "adw_squeezer_get_visible_child", false) | |
| 264 | 244 | var cls *gtk.Widget | |
| 265 | 245 | ||
| 266 | 246 | cret := xSqueezerGetVisibleChild(x.GoPointer()) | |
| @@ -278,8 +258,6 @@ var xSqueezerGetXalign func(uintptr) float32 | |||
| 278 | 258 | ||
| 279 | 259 | // Gets the horizontal alignment, from 0 (start) to 1 (end). | |
| 280 | 260 | func (x *Squeezer) GetXalign() float32 { | |
| 281 | - | core.LazyRegister(&xSqueezerGetXalign, "ADW", "adw_squeezer_get_xalign", false) | |
| 282 | - | ||
| 283 | 261 | cret := xSqueezerGetXalign(x.GoPointer()) | |
| 284 | 262 | return cret | |
| 285 | 263 | } | |
| @@ -288,8 +266,6 @@ var xSqueezerGetYalign func(uintptr) float32 | |||
| 288 | 266 | ||
| 289 | 267 | // Gets the vertical alignment, from 0 (top) to 1 (bottom). | |
| 290 | 268 | func (x *Squeezer) GetYalign() float32 { | |
| 291 | - | core.LazyRegister(&xSqueezerGetYalign, "ADW", "adw_squeezer_get_yalign", false) | |
| 292 | - | ||
| 293 | 269 | cret := xSqueezerGetYalign(x.GoPointer()) | |
| 294 | 270 | return cret | |
| 295 | 271 | } | |
| @@ -298,8 +274,6 @@ var xSqueezerRemove func(uintptr, uintptr) | |||
| 298 | 274 | ||
| 299 | 275 | // Removes a child widget from @self. | |
| 300 | 276 | func (x *Squeezer) Remove(ChildVar *gtk.Widget) { | |
| 301 | - | core.LazyRegister(&xSqueezerRemove, "ADW", "adw_squeezer_remove", false) | |
| 302 | - | ||
| 303 | 277 | xSqueezerRemove(x.GoPointer(), ChildVar.GoPointer()) | |
| 304 | 278 | } | |
| 305 | 279 | ||
| @@ -311,8 +285,6 @@ var xSqueezerSetAllowNone func(uintptr, bool) | |||
| 311 | 285 | // shown. This is functionally equivalent to appending a widget with 0×0 minimum | |
| 312 | 286 | // size. | |
| 313 | 287 | func (x *Squeezer) SetAllowNone(AllowNoneVar bool) { | |
| 314 | - | core.LazyRegister(&xSqueezerSetAllowNone, "ADW", "adw_squeezer_set_allow_none", false) | |
| 315 | - | ||
| 316 | 288 | xSqueezerSetAllowNone(x.GoPointer(), AllowNoneVar) | |
| 317 | 289 | } | |
| 318 | 290 | ||
| @@ -324,8 +296,6 @@ var xSqueezerSetHomogeneous func(uintptr, bool) | |||
| 324 | 296 | // the same height for all its children. If it isn't, the squeezer may change | |
| 325 | 297 | // size when a different child becomes visible. | |
| 326 | 298 | func (x *Squeezer) SetHomogeneous(HomogeneousVar bool) { | |
| 327 | - | core.LazyRegister(&xSqueezerSetHomogeneous, "ADW", "adw_squeezer_set_homogeneous", false) | |
| 328 | - | ||
| 329 | 299 | xSqueezerSetHomogeneous(x.GoPointer(), HomogeneousVar) | |
| 330 | 300 | } | |
| 331 | 301 | ||
| @@ -338,8 +308,6 @@ var xSqueezerSetInterpolateSize func(uintptr, bool) | |||
| 338 | 308 | // set transition duration and the orientation, e.g. if the squeezer is | |
| 339 | 309 | // horizontal, it will interpolate the its height. | |
| 340 | 310 | func (x *Squeezer) SetInterpolateSize(InterpolateSizeVar bool) { | |
| 341 | - | core.LazyRegister(&xSqueezerSetInterpolateSize, "ADW", "adw_squeezer_set_interpolate_size", false) | |
| 342 | - | ||
| 343 | 311 | xSqueezerSetInterpolateSize(x.GoPointer(), InterpolateSizeVar) | |
| 344 | 312 | } | |
| 345 | 313 | ||
| @@ -356,8 +324,6 @@ var xSqueezerSetSwitchThresholdPolicy func(uintptr, FoldThresholdPolicy) | |||
| 356 | 324 | // This can be useful if you have a long ellipsizing label and want to let it | |
| 357 | 325 | // ellipsize instead of immediately switching. | |
| 358 | 326 | func (x *Squeezer) SetSwitchThresholdPolicy(PolicyVar FoldThresholdPolicy) { | |
| 359 | - | core.LazyRegister(&xSqueezerSetSwitchThresholdPolicy, "ADW", "adw_squeezer_set_switch_threshold_policy", false) | |
| 360 | - | ||
| 361 | 327 | xSqueezerSetSwitchThresholdPolicy(x.GoPointer(), PolicyVar) | |
| 362 | 328 | } | |
| 363 | 329 | ||
| @@ -365,8 +331,6 @@ var xSqueezerSetTransitionDuration func(uintptr, uint) | |||
| 365 | 331 | ||
| 366 | 332 | // Sets the transition animation duration for @self. | |
| 367 | 333 | func (x *Squeezer) SetTransitionDuration(DurationVar uint) { | |
| 368 | - | core.LazyRegister(&xSqueezerSetTransitionDuration, "ADW", "adw_squeezer_set_transition_duration", false) | |
| 369 | - | ||
| 370 | 334 | xSqueezerSetTransitionDuration(x.GoPointer(), DurationVar) | |
| 371 | 335 | } | |
| 372 | 336 | ||
| @@ -374,8 +338,6 @@ var xSqueezerSetTransitionType func(uintptr, SqueezerTransitionType) | |||
| 374 | 338 | ||
| 375 | 339 | // Sets the type of animation used for transitions between children in @self. | |
| 376 | 340 | func (x *Squeezer) SetTransitionType(TransitionVar SqueezerTransitionType) { | |
| 377 | - | core.LazyRegister(&xSqueezerSetTransitionType, "ADW", "adw_squeezer_set_transition_type", false) | |
| 378 | - | ||
| 379 | 341 | xSqueezerSetTransitionType(x.GoPointer(), TransitionVar) | |
| 380 | 342 | } | |
| 381 | 343 | ||
| @@ -389,8 +351,6 @@ var xSqueezerSetXalign func(uintptr, float32) | |||
| 389 | 351 | // For example, 0.5 means the child will be centered, 0 means it will keep the | |
| 390 | 352 | // start side aligned and overflow the end side, and 1 means the opposite. | |
| 391 | 353 | func (x *Squeezer) SetXalign(XalignVar float32) { | |
| 392 | - | core.LazyRegister(&xSqueezerSetXalign, "ADW", "adw_squeezer_set_xalign", false) | |
| 393 | - | ||
| 394 | 354 | xSqueezerSetXalign(x.GoPointer(), XalignVar) | |
| 395 | 355 | } | |
| 396 | 356 | ||
| @@ -404,8 +364,6 @@ var xSqueezerSetYalign func(uintptr, float32) | |||
| 404 | 364 | // For example, 0.5 means the child will be centered, 0 means it will keep the | |
| 405 | 365 | // top side aligned and overflow the bottom side, and 1 means the opposite. | |
| 406 | 366 | func (x *Squeezer) SetYalign(YalignVar float32) { | |
| 407 | - | core.LazyRegister(&xSqueezerSetYalign, "ADW", "adw_squeezer_set_yalign", false) | |
| 408 | - | ||
| 409 | 367 | xSqueezerSetYalign(x.GoPointer(), YalignVar) | |
| 410 | 368 | } | |
| 411 | 369 | ||
| @@ -863,7 +821,6 @@ type SqueezerPage struct { | |||
| 863 | 821 | var xSqueezerPageGLibType func() types.GType | |
| 864 | 822 | ||
| 865 | 823 | func SqueezerPageGLibType() types.GType { | |
| 866 | - | core.LazyRegister(&xSqueezerPageGLibType, "ADW", "adw_squeezer_page_get_type", false) | |
| 867 | 824 | return xSqueezerPageGLibType() | |
| 868 | 825 | } | |
| 869 | 826 | ||
| @@ -877,7 +834,6 @@ var xSqueezerPageGetChild func(uintptr) uintptr | |||
| 877 | 834 | ||
| 878 | 835 | // Returns the squeezer child to which @self belongs. | |
| 879 | 836 | func (x *SqueezerPage) GetChild() *gtk.Widget { | |
| 880 | - | core.LazyRegister(&xSqueezerPageGetChild, "ADW", "adw_squeezer_page_get_child", false) | |
| 881 | 837 | var cls *gtk.Widget | |
| 882 | 838 | ||
| 883 | 839 | cret := xSqueezerPageGetChild(x.GoPointer()) | |
| @@ -895,8 +851,6 @@ var xSqueezerPageGetEnabled func(uintptr) bool | |||
| 895 | 851 | ||
| 896 | 852 | // Gets whether @self is enabled. | |
| 897 | 853 | func (x *SqueezerPage) GetEnabled() bool { | |
| 898 | - | core.LazyRegister(&xSqueezerPageGetEnabled, "ADW", "adw_squeezer_page_get_enabled", false) | |
| 899 | - | ||
| 900 | 854 | cret := xSqueezerPageGetEnabled(x.GoPointer()) | |
| 901 | 855 | return cret | |
| 902 | 856 | } | |
| @@ -914,8 +868,6 @@ var xSqueezerPageSetEnabled func(uintptr, bool) | |||
| 914 | 868 | // This can be used e.g. to ensure a certain child is hidden below a certain | |
| 915 | 869 | // window width, or any other constraint you find suitable. | |
| 916 | 870 | func (x *SqueezerPage) SetEnabled(EnabledVar bool) { | |
| 917 | - | core.LazyRegister(&xSqueezerPageSetEnabled, "ADW", "adw_squeezer_page_set_enabled", false) | |
| 918 | - | ||
| 919 | 871 | xSqueezerPageSetEnabled(x.GoPointer(), EnabledVar) | |
| 920 | 872 | } | |
| 921 | 873 | ||
| @@ -968,4 +920,47 @@ func (x *SqueezerPage) GetPropertyEnabled() bool { | |||
| 968 | 920 | func init() { | |
| 969 | 921 | core.SetPackageName("ADW", "libadwaita-1") | |
| 970 | 922 | 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") | |
| 971 | 966 | } | |
| @@ -5,6 +5,7 @@ import ( | |||||
| 5 | "structs" | 5 | "structs" | ||
| 6 | "unsafe" | 6 | "unsafe" | ||
| 7 | 7 | ||||
| 8 | + | "github.com/bnema/purego" | |||
| 8 | "github.com/bnema/puregotk/pkg/core" | 9 | "github.com/bnema/puregotk/pkg/core" | ||
| 9 | "github.com/bnema/puregotk/v4/gobject" | 10 | "github.com/bnema/puregotk/v4/gobject" | ||
| 10 | "github.com/bnema/puregotk/v4/gobject/types" | 11 | "github.com/bnema/puregotk/v4/gobject/types" | ||
| @@ -53,7 +54,6 @@ type SqueezerTransitionType int | |||||
| 53 | var xSqueezerTransitionTypeGLibType func() types.GType | 54 | var xSqueezerTransitionTypeGLibType func() types.GType | ||
| 54 | 55 | ||||
| 55 | func SqueezerTransitionTypeGLibType() types.GType { | 56 | 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,7 +98,6 @@ 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) | |||
| 102 | return xSqueezerGLibType() | 101 | return xSqueezerGLibType() | ||
| 103 | } | 102 | } | ||
| 104 | 103 | ||||
| @@ -112,7 +111,6 @@ var xNewSqueezer func() uintptr | |||||
| 112 | 111 | ||||
| 113 | // Creates a new `AdwSqueezer`. | 112 | // Creates a new `AdwSqueezer`. | ||
| 114 | func NewSqueezer() *Squeezer { | 113 | func NewSqueezer() *Squeezer { | ||
| 115 | - | core.LazyRegister(&xNewSqueezer, "ADW", "adw_squeezer_new", false) | |||
| 116 | var cls *Squeezer | 114 | var cls *Squeezer | ||
| 117 | 115 | ||||
| 118 | cret := xNewSqueezer() | 116 | cret := xNewSqueezer() | ||
| @@ -130,7 +128,6 @@ var xSqueezerAdd func(uintptr, uintptr) uintptr | |||||
| 130 | 128 | ||||
| 131 | // Adds a child to @self. | 129 | // Adds a child to @self. | ||
| 132 | func (x *Squeezer) Add(ChildVar *gtk.Widget) *SqueezerPage { | 130 | func (x *Squeezer) Add(ChildVar *gtk.Widget) *SqueezerPage { | ||
| 133 | - | core.LazyRegister(&xSqueezerAdd, "ADW", "adw_squeezer_add", false) | |||
| 134 | var cls *SqueezerPage | 131 | var cls *SqueezerPage | ||
| 135 | 132 | ||||
| 136 | cret := xSqueezerAdd(x.GoPointer(), ChildVar.GoPointer()) | 133 | cret := xSqueezerAdd(x.GoPointer(), ChildVar.GoPointer()) | ||
| @@ -148,8 +145,6 @@ var xSqueezerGetAllowNone func(uintptr) bool | |||||
| 148 | 145 | ||||
| 149 | // Gets whether to allow squeezing beyond the last child's minimum size. | 146 | // Gets whether to allow squeezing beyond the last child's minimum size. | ||
| 150 | func (x *Squeezer) GetAllowNone() bool { | 147 | func (x *Squeezer) GetAllowNone() bool { | ||
| 151 | - | core.LazyRegister(&xSqueezerGetAllowNone, "ADW", "adw_squeezer_get_allow_none", false) | |||
| 152 | - | ||||
| 153 | cret := xSqueezerGetAllowNone(x.GoPointer()) | 148 | cret := xSqueezerGetAllowNone(x.GoPointer()) | ||
| 154 | return cret | 149 | return cret | ||
| 155 | } | 150 | } | ||
| @@ -158,8 +153,6 @@ var xSqueezerGetHomogeneous func(uintptr) bool | |||||
| 158 | 153 | ||||
| 159 | // Gets whether all children have the same size for the opposite orientation. | 154 | // Gets whether all children have the same size for the opposite orientation. | ||
| 160 | func (x *Squeezer) GetHomogeneous() bool { | 155 | func (x *Squeezer) GetHomogeneous() bool { | ||
| 161 | - | core.LazyRegister(&xSqueezerGetHomogeneous, "ADW", "adw_squeezer_get_homogeneous", false) | |||
| 162 | - | ||||
| 163 | cret := xSqueezerGetHomogeneous(x.GoPointer()) | 156 | cret := xSqueezerGetHomogeneous(x.GoPointer()) | ||
| 164 | return cret | 157 | return cret | ||
| 165 | } | 158 | } | ||
| @@ -168,8 +161,6 @@ var xSqueezerGetInterpolateSize func(uintptr) bool | |||||
| 168 | 161 | ||||
| 169 | // Gets whether @self interpolates its size when changing the visible child. | 162 | // Gets whether @self interpolates its size when changing the visible child. | ||
| 170 | func (x *Squeezer) GetInterpolateSize() bool { | 163 | func (x *Squeezer) GetInterpolateSize() bool { | ||
| 171 | - | core.LazyRegister(&xSqueezerGetInterpolateSize, "ADW", "adw_squeezer_get_interpolate_size", false) | |||
| 172 | - | ||||
| 173 | cret := xSqueezerGetInterpolateSize(x.GoPointer()) | 164 | cret := xSqueezerGetInterpolateSize(x.GoPointer()) | ||
| 174 | return cret | 165 | return cret | ||
| 175 | } | 166 | } | ||
| @@ -178,7 +169,6 @@ var xSqueezerGetPage func(uintptr, uintptr) uintptr | |||||
| 178 | 169 | ||||
| 179 | // Returns the [class@SqueezerPage] object for @child. | 170 | // Returns the [class@SqueezerPage] object for @child. | ||
| 180 | func (x *Squeezer) GetPage(ChildVar *gtk.Widget) *SqueezerPage { | 171 | func (x *Squeezer) GetPage(ChildVar *gtk.Widget) *SqueezerPage { | ||
| 181 | - | core.LazyRegister(&xSqueezerGetPage, "ADW", "adw_squeezer_get_page", false) | |||
| 182 | var cls *SqueezerPage | 172 | var cls *SqueezerPage | ||
| 183 | 173 | ||||
| 184 | cret := xSqueezerGetPage(x.GoPointer(), ChildVar.GoPointer()) | 174 | cret := xSqueezerGetPage(x.GoPointer(), ChildVar.GoPointer()) | ||
| @@ -199,7 +189,6 @@ var xSqueezerGetPages func(uintptr) uintptr | |||||
| 199 | // This can be used to keep an up-to-date view. The model also implements | 189 | // This can be used to keep an up-to-date view. The model also implements | ||
| 200 | // [iface@Gtk.SelectionModel] and can be used to track the visible page. | 190 | // [iface@Gtk.SelectionModel] and can be used to track the visible page. | ||
| 201 | func (x *Squeezer) GetPages() *gtk.SelectionModelBase { | 191 | func (x *Squeezer) GetPages() *gtk.SelectionModelBase { | ||
| 202 | - | core.LazyRegister(&xSqueezerGetPages, "ADW", "adw_squeezer_get_pages", false) | |||
| 203 | var cls *gtk.SelectionModelBase | 192 | var cls *gtk.SelectionModelBase | ||
| 204 | 193 | ||||
| 205 | cret := xSqueezerGetPages(x.GoPointer()) | 194 | cret := xSqueezerGetPages(x.GoPointer()) | ||
| @@ -216,8 +205,6 @@ var xSqueezerGetSwitchThresholdPolicy func(uintptr) FoldThresholdPolicy | |||||
| 216 | 205 | ||||
| 217 | // Gets the switch threshold policy for @self. | 206 | // Gets the switch threshold policy for @self. | ||
| 218 | func (x *Squeezer) GetSwitchThresholdPolicy() FoldThresholdPolicy { | 207 | func (x *Squeezer) GetSwitchThresholdPolicy() FoldThresholdPolicy { | ||
| 219 | - | core.LazyRegister(&xSqueezerGetSwitchThresholdPolicy, "ADW", "adw_squeezer_get_switch_threshold_policy", false) | |||
| 220 | - | ||||
| 221 | cret := xSqueezerGetSwitchThresholdPolicy(x.GoPointer()) | 208 | cret := xSqueezerGetSwitchThresholdPolicy(x.GoPointer()) | ||
| 222 | return cret | 209 | return cret | ||
| 223 | } | 210 | } | ||
| @@ -226,8 +213,6 @@ var xSqueezerGetTransitionDuration func(uintptr) uint | |||||
| 226 | 213 | ||||
| 227 | // Gets the transition animation duration for @self. | 214 | // Gets the transition animation duration for @self. | ||
| 228 | func (x *Squeezer) GetTransitionDuration() uint { | 215 | func (x *Squeezer) GetTransitionDuration() uint { | ||
| 229 | - | core.LazyRegister(&xSqueezerGetTransitionDuration, "ADW", "adw_squeezer_get_transition_duration", false) | |||
| 230 | - | ||||
| 231 | cret := xSqueezerGetTransitionDuration(x.GoPointer()) | 216 | cret := xSqueezerGetTransitionDuration(x.GoPointer()) | ||
| 232 | return cret | 217 | return cret | ||
| 233 | } | 218 | } | ||
| @@ -240,8 +225,6 @@ var xSqueezerGetTransitionRunning func(uintptr) bool | |||||
| 240 | // then immediately to `FALSE`, so it's possible to rely on its notifications | 225 | // then immediately to `FALSE`, so it's possible to rely on its notifications | ||
| 241 | // to know that a transition has happened. | 226 | // to know that a transition has happened. | ||
| 242 | func (x *Squeezer) GetTransitionRunning() bool { | 227 | func (x *Squeezer) GetTransitionRunning() bool { | ||
| 243 | - | core.LazyRegister(&xSqueezerGetTransitionRunning, "ADW", "adw_squeezer_get_transition_running", false) | |||
| 244 | - | ||||
| 245 | cret := xSqueezerGetTransitionRunning(x.GoPointer()) | 228 | cret := xSqueezerGetTransitionRunning(x.GoPointer()) | ||
| 246 | return cret | 229 | return cret | ||
| 247 | } | 230 | } | ||
| @@ -250,8 +233,6 @@ var xSqueezerGetTransitionType func(uintptr) SqueezerTransitionType | |||||
| 250 | 233 | ||||
| 251 | // Gets the type of animation used for transitions between children in @self. | 234 | // Gets the type of animation used for transitions between children in @self. | ||
| 252 | func (x *Squeezer) GetTransitionType() SqueezerTransitionType { | 235 | func (x *Squeezer) GetTransitionType() SqueezerTransitionType { | ||
| 253 | - | core.LazyRegister(&xSqueezerGetTransitionType, "ADW", "adw_squeezer_get_transition_type", false) | |||
| 254 | - | ||||
| 255 | cret := xSqueezerGetTransitionType(x.GoPointer()) | 236 | cret := xSqueezerGetTransitionType(x.GoPointer()) | ||
| 256 | return cret | 237 | return cret | ||
| 257 | } | 238 | } | ||
| @@ -260,7 +241,6 @@ var xSqueezerGetVisibleChild func(uintptr) uintptr | |||||
| 260 | 241 | ||||
| 261 | // Gets the currently visible child of @self. | 242 | // Gets the currently visible child of @self. | ||
| 262 | func (x *Squeezer) GetVisibleChild() *gtk.Widget { | 243 | func (x *Squeezer) GetVisibleChild() *gtk.Widget { | ||
| 263 | - | core.LazyRegister(&xSqueezerGetVisibleChild, "ADW", "adw_squeezer_get_visible_child", false) | |||
| 264 | var cls *gtk.Widget | 244 | var cls *gtk.Widget | ||
| 265 | 245 | ||||
| 266 | cret := xSqueezerGetVisibleChild(x.GoPointer()) | 246 | cret := xSqueezerGetVisibleChild(x.GoPointer()) | ||
| @@ -278,8 +258,6 @@ var xSqueezerGetXalign func(uintptr) float32 | |||||
| 278 | 258 | ||||
| 279 | // Gets the horizontal alignment, from 0 (start) to 1 (end). | 259 | // Gets the horizontal alignment, from 0 (start) to 1 (end). | ||
| 280 | func (x *Squeezer) GetXalign() float32 { | 260 | func (x *Squeezer) GetXalign() float32 { | ||
| 281 | - | core.LazyRegister(&xSqueezerGetXalign, "ADW", "adw_squeezer_get_xalign", false) | |||
| 282 | - | ||||
| 283 | cret := xSqueezerGetXalign(x.GoPointer()) | 261 | cret := xSqueezerGetXalign(x.GoPointer()) | ||
| 284 | return cret | 262 | return cret | ||
| 285 | } | 263 | } | ||
| @@ -288,8 +266,6 @@ var xSqueezerGetYalign func(uintptr) float32 | |||||
| 288 | 266 | ||||
| 289 | // Gets the vertical alignment, from 0 (top) to 1 (bottom). | 267 | // Gets the vertical alignment, from 0 (top) to 1 (bottom). | ||
| 290 | func (x *Squeezer) GetYalign() float32 { | 268 | func (x *Squeezer) GetYalign() float32 { | ||
| 291 | - | core.LazyRegister(&xSqueezerGetYalign, "ADW", "adw_squeezer_get_yalign", false) | |||
| 292 | - | ||||
| 293 | cret := xSqueezerGetYalign(x.GoPointer()) | 269 | cret := xSqueezerGetYalign(x.GoPointer()) | ||
| 294 | return cret | 270 | return cret | ||
| 295 | } | 271 | } | ||
| @@ -298,8 +274,6 @@ var xSqueezerRemove func(uintptr, uintptr) | |||||
| 298 | 274 | ||||
| 299 | // Removes a child widget from @self. | 275 | // Removes a child widget from @self. | ||
| 300 | func (x *Squeezer) Remove(ChildVar *gtk.Widget) { | 276 | func (x *Squeezer) Remove(ChildVar *gtk.Widget) { | ||
| 301 | - | core.LazyRegister(&xSqueezerRemove, "ADW", "adw_squeezer_remove", false) | |||
| 302 | - | ||||
| 303 | xSqueezerRemove(x.GoPointer(), ChildVar.GoPointer()) | 277 | xSqueezerRemove(x.GoPointer(), ChildVar.GoPointer()) | ||
| 304 | } | 278 | } | ||
| 305 | 279 | ||||
| @@ -311,8 +285,6 @@ var xSqueezerSetAllowNone func(uintptr, bool) | |||||
| 311 | // shown. This is functionally equivalent to appending a widget with 0×0 minimum | 285 | // shown. This is functionally equivalent to appending a widget with 0×0 minimum | ||
| 312 | // size. | 286 | // size. | ||
| 313 | func (x *Squeezer) SetAllowNone(AllowNoneVar bool) { | 287 | func (x *Squeezer) SetAllowNone(AllowNoneVar bool) { | ||
| 314 | - | core.LazyRegister(&xSqueezerSetAllowNone, "ADW", "adw_squeezer_set_allow_none", false) | |||
| 315 | - | ||||
| 316 | xSqueezerSetAllowNone(x.GoPointer(), AllowNoneVar) | 288 | xSqueezerSetAllowNone(x.GoPointer(), AllowNoneVar) | ||
| 317 | } | 289 | } | ||
| 318 | 290 | ||||
| @@ -324,8 +296,6 @@ var xSqueezerSetHomogeneous func(uintptr, bool) | |||||
| 324 | // the same height for all its children. If it isn't, the squeezer may change | 296 | // the same height for all its children. If it isn't, the squeezer may change | ||
| 325 | // size when a different child becomes visible. | 297 | // size when a different child becomes visible. | ||
| 326 | func (x *Squeezer) SetHomogeneous(HomogeneousVar bool) { | 298 | func (x *Squeezer) SetHomogeneous(HomogeneousVar bool) { | ||
| 327 | - | core.LazyRegister(&xSqueezerSetHomogeneous, "ADW", "adw_squeezer_set_homogeneous", false) | |||
| 328 | - | ||||
| 329 | xSqueezerSetHomogeneous(x.GoPointer(), HomogeneousVar) | 299 | xSqueezerSetHomogeneous(x.GoPointer(), HomogeneousVar) | ||
| 330 | } | 300 | } | ||
| 331 | 301 | ||||
| @@ -338,8 +308,6 @@ var xSqueezerSetInterpolateSize func(uintptr, bool) | |||||
| 338 | // set transition duration and the orientation, e.g. if the squeezer is | 308 | // set transition duration and the orientation, e.g. if the squeezer is | ||
| 339 | // horizontal, it will interpolate the its height. | 309 | // horizontal, it will interpolate the its height. | ||
| 340 | func (x *Squeezer) SetInterpolateSize(InterpolateSizeVar bool) { | 310 | func (x *Squeezer) SetInterpolateSize(InterpolateSizeVar bool) { | ||
| 341 | - | core.LazyRegister(&xSqueezerSetInterpolateSize, "ADW", "adw_squeezer_set_interpolate_size", false) | |||
| 342 | - | ||||
| 343 | xSqueezerSetInterpolateSize(x.GoPointer(), InterpolateSizeVar) | 311 | xSqueezerSetInterpolateSize(x.GoPointer(), InterpolateSizeVar) | ||
| 344 | } | 312 | } | ||
| 345 | 313 | ||||
| @@ -356,8 +324,6 @@ var xSqueezerSetSwitchThresholdPolicy func(uintptr, FoldThresholdPolicy) | |||||
| 356 | // This can be useful if you have a long ellipsizing label and want to let it | 324 | // This can be useful if you have a long ellipsizing label and want to let it | ||
| 357 | // ellipsize instead of immediately switching. | 325 | // ellipsize instead of immediately switching. | ||
| 358 | func (x *Squeezer) SetSwitchThresholdPolicy(PolicyVar FoldThresholdPolicy) { | 326 | func (x *Squeezer) SetSwitchThresholdPolicy(PolicyVar FoldThresholdPolicy) { | ||
| 359 | - | core.LazyRegister(&xSqueezerSetSwitchThresholdPolicy, "ADW", "adw_squeezer_set_switch_threshold_policy", false) | |||
| 360 | - | ||||
| 361 | xSqueezerSetSwitchThresholdPolicy(x.GoPointer(), PolicyVar) | 327 | xSqueezerSetSwitchThresholdPolicy(x.GoPointer(), PolicyVar) | ||
| 362 | } | 328 | } | ||
| 363 | 329 | ||||
| @@ -365,8 +331,6 @@ var xSqueezerSetTransitionDuration func(uintptr, uint) | |||||
| 365 | 331 | ||||
| 366 | // Sets the transition animation duration for @self. | 332 | // Sets the transition animation duration for @self. | ||
| 367 | func (x *Squeezer) SetTransitionDuration(DurationVar uint) { | 333 | func (x *Squeezer) SetTransitionDuration(DurationVar uint) { | ||
| 368 | - | core.LazyRegister(&xSqueezerSetTransitionDuration, "ADW", "adw_squeezer_set_transition_duration", false) | |||
| 369 | - | ||||
| 370 | xSqueezerSetTransitionDuration(x.GoPointer(), DurationVar) | 334 | xSqueezerSetTransitionDuration(x.GoPointer(), DurationVar) | ||
| 371 | } | 335 | } | ||
| 372 | 336 | ||||
| @@ -374,8 +338,6 @@ var xSqueezerSetTransitionType func(uintptr, SqueezerTransitionType) | |||||
| 374 | 338 | ||||
| 375 | // Sets the type of animation used for transitions between children in @self. | 339 | // Sets the type of animation used for transitions between children in @self. | ||
| 376 | func (x *Squeezer) SetTransitionType(TransitionVar SqueezerTransitionType) { | 340 | func (x *Squeezer) SetTransitionType(TransitionVar SqueezerTransitionType) { | ||
| 377 | - | core.LazyRegister(&xSqueezerSetTransitionType, "ADW", "adw_squeezer_set_transition_type", false) | |||
| 378 | - | ||||
| 379 | xSqueezerSetTransitionType(x.GoPointer(), TransitionVar) | 341 | xSqueezerSetTransitionType(x.GoPointer(), TransitionVar) | ||
| 380 | } | 342 | } | ||
| 381 | 343 | ||||
| @@ -389,8 +351,6 @@ var xSqueezerSetXalign func(uintptr, float32) | |||||
| 389 | // For example, 0.5 means the child will be centered, 0 means it will keep the | 351 | // For example, 0.5 means the child will be centered, 0 means it will keep the | ||
| 390 | // start side aligned and overflow the end side, and 1 means the opposite. | 352 | // start side aligned and overflow the end side, and 1 means the opposite. | ||
| 391 | func (x *Squeezer) SetXalign(XalignVar float32) { | 353 | func (x *Squeezer) SetXalign(XalignVar float32) { | ||
| 392 | - | core.LazyRegister(&xSqueezerSetXalign, "ADW", "adw_squeezer_set_xalign", false) | |||
| 393 | - | ||||
| 394 | xSqueezerSetXalign(x.GoPointer(), XalignVar) | 354 | xSqueezerSetXalign(x.GoPointer(), XalignVar) | ||
| 395 | } | 355 | } | ||
| 396 | 356 | ||||
| @@ -404,8 +364,6 @@ var xSqueezerSetYalign func(uintptr, float32) | |||||
| 404 | // For example, 0.5 means the child will be centered, 0 means it will keep the | 364 | // For example, 0.5 means the child will be centered, 0 means it will keep the | ||
| 405 | // top side aligned and overflow the bottom side, and 1 means the opposite. | 365 | // top side aligned and overflow the bottom side, and 1 means the opposite. | ||
| 406 | func (x *Squeezer) SetYalign(YalignVar float32) { | 366 | func (x *Squeezer) SetYalign(YalignVar float32) { | ||
| 407 | - | core.LazyRegister(&xSqueezerSetYalign, "ADW", "adw_squeezer_set_yalign", false) | |||
| 408 | - | ||||
| 409 | xSqueezerSetYalign(x.GoPointer(), YalignVar) | 367 | xSqueezerSetYalign(x.GoPointer(), YalignVar) | ||
| 410 | } | 368 | } | ||
| 411 | 369 | ||||
| @@ -863,7 +821,6 @@ type SqueezerPage struct { | |||||
| 863 | var xSqueezerPageGLibType func() types.GType | 821 | var xSqueezerPageGLibType func() types.GType | ||
| 864 | 822 | ||||
| 865 | func SqueezerPageGLibType() types.GType { | 823 | func SqueezerPageGLibType() types.GType { | ||
| 866 | - | core.LazyRegister(&xSqueezerPageGLibType, "ADW", "adw_squeezer_page_get_type", false) | |||
| 867 | return xSqueezerPageGLibType() | 824 | return xSqueezerPageGLibType() | ||
| 868 | } | 825 | } | ||
| 869 | 826 | ||||
| @@ -877,7 +834,6 @@ var xSqueezerPageGetChild func(uintptr) uintptr | |||||
| 877 | 834 | ||||
| 878 | // Returns the squeezer child to which @self belongs. | 835 | // Returns the squeezer child to which @self belongs. | ||
| 879 | func (x *SqueezerPage) GetChild() *gtk.Widget { | 836 | func (x *SqueezerPage) GetChild() *gtk.Widget { | ||
| 880 | - | core.LazyRegister(&xSqueezerPageGetChild, "ADW", "adw_squeezer_page_get_child", false) | |||
| 881 | var cls *gtk.Widget | 837 | var cls *gtk.Widget | ||
| 882 | 838 | ||||
| 883 | cret := xSqueezerPageGetChild(x.GoPointer()) | 839 | cret := xSqueezerPageGetChild(x.GoPointer()) | ||
| @@ -895,8 +851,6 @@ var xSqueezerPageGetEnabled func(uintptr) bool | |||||
| 895 | 851 | ||||
| 896 | // Gets whether @self is enabled. | 852 | // Gets whether @self is enabled. | ||
| 897 | func (x *SqueezerPage) GetEnabled() bool { | 853 | func (x *SqueezerPage) GetEnabled() bool { | ||
| 898 | - | core.LazyRegister(&xSqueezerPageGetEnabled, "ADW", "adw_squeezer_page_get_enabled", false) | |||
| 899 | - | ||||
| 900 | cret := xSqueezerPageGetEnabled(x.GoPointer()) | 854 | cret := xSqueezerPageGetEnabled(x.GoPointer()) | ||
| 901 | return cret | 855 | return cret | ||
| 902 | } | 856 | } | ||
| @@ -914,8 +868,6 @@ var xSqueezerPageSetEnabled func(uintptr, bool) | |||||
| 914 | // This can be used e.g. to ensure a certain child is hidden below a certain | 868 | // This can be used e.g. to ensure a certain child is hidden below a certain | ||
| 915 | // window width, or any other constraint you find suitable. | 869 | // window width, or any other constraint you find suitable. | ||
| 916 | func (x *SqueezerPage) SetEnabled(EnabledVar bool) { | 870 | func (x *SqueezerPage) SetEnabled(EnabledVar bool) { | ||
| 917 | - | core.LazyRegister(&xSqueezerPageSetEnabled, "ADW", "adw_squeezer_page_set_enabled", false) | |||
| 918 | - | ||||
| 919 | xSqueezerPageSetEnabled(x.GoPointer(), EnabledVar) | 871 | xSqueezerPageSetEnabled(x.GoPointer(), EnabledVar) | ||
| 920 | } | 872 | } | ||
| 921 | 873 | ||||
| @@ -968,4 +920,47 @@ func (x *SqueezerPage) GetPropertyEnabled() bool { | |||||
| 968 | func init() { | 920 | func init() { | ||
| 969 | core.SetPackageName("ADW", "libadwaita-1") | 921 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 970 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 922 | 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") | |||
| 971 | } | 966 | } | ||