Merge pull request #349 from bnema/fix/rollback-lazy-puregotk
fix(deps): emergency rollback puregotk lazy registration regression
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 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-status-page.go +24 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-style-manager.go +28 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-swipe-tracker.go +30 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-swipeable.go +21 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-switch-row.go +16 -6 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-bar.go +32 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-button.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-overview.go +37 -45 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-view.go +87 -123 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-timed-animation.go +28 -30 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toast-overlay.go +18 -9 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toast.go +36 -41 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toggle-group.go +51 -64 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toolbar-view.go +35 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-version.go +16 -7 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-stack.go +62 -78 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-bar.go +18 -9 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-sidebar.go +22 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-title.go +23 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher.go +20 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-window-title.go +18 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-window.go +22 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-wrap-box.go +46 -66 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-wrap-layout.go +46 -57
| @@ -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" | |
| @@ -37,7 +38,6 @@ type JustifyMode int | |||
| 37 | 38 | var xJustifyModeGLibType func() types.GType | |
| 38 | 39 | ||
| 39 | 40 | func JustifyModeGLibType() types.GType { | |
| 40 | - | core.LazyRegister(&xJustifyModeGLibType, "ADW", "adw_justify_mode_get_type", false) | |
| 41 | 41 | return xJustifyModeGLibType() | |
| 42 | 42 | } | |
| 43 | 43 | ||
| @@ -64,7 +64,6 @@ type PackDirection int | |||
| 64 | 64 | var xPackDirectionGLibType func() types.GType | |
| 65 | 65 | ||
| 66 | 66 | func PackDirectionGLibType() types.GType { | |
| 67 | - | core.LazyRegister(&xPackDirectionGLibType, "ADW", "adw_pack_direction_get_type", false) | |
| 68 | 67 | return xPackDirectionGLibType() | |
| 69 | 68 | } | |
| 70 | 69 | ||
| @@ -86,7 +85,6 @@ type WrapPolicy int | |||
| 86 | 85 | var xWrapPolicyGLibType func() types.GType | |
| 87 | 86 | ||
| 88 | 87 | func WrapPolicyGLibType() types.GType { | |
| 89 | - | core.LazyRegister(&xWrapPolicyGLibType, "ADW", "adw_wrap_policy_get_type", false) | |
| 90 | 88 | return xWrapPolicyGLibType() | |
| 91 | 89 | } | |
| 92 | 90 | ||
| @@ -160,7 +158,6 @@ type WrapLayout struct { | |||
| 160 | 158 | var xWrapLayoutGLibType func() types.GType | |
| 161 | 159 | ||
| 162 | 160 | func WrapLayoutGLibType() types.GType { | |
| 163 | - | core.LazyRegister(&xWrapLayoutGLibType, "ADW", "adw_wrap_layout_get_type", false) | |
| 164 | 161 | return xWrapLayoutGLibType() | |
| 165 | 162 | } | |
| 166 | 163 | ||
| @@ -174,7 +171,6 @@ var xNewWrapLayout func() uintptr | |||
| 174 | 171 | ||
| 175 | 172 | // Creates a new `AdwWrapLayout`. | |
| 176 | 173 | func NewWrapLayout() *WrapLayout { | |
| 177 | - | core.LazyRegister(&xNewWrapLayout, "ADW", "adw_wrap_layout_new", false) | |
| 178 | 174 | var cls *WrapLayout | |
| 179 | 175 | ||
| 180 | 176 | cret := xNewWrapLayout() | |
| @@ -191,8 +187,6 @@ var xWrapLayoutGetAlign func(uintptr) float32 | |||
| 191 | 187 | ||
| 192 | 188 | // Gets the alignment of the children within each line. | |
| 193 | 189 | func (x *WrapLayout) GetAlign() float32 { | |
| 194 | - | core.LazyRegister(&xWrapLayoutGetAlign, "ADW", "adw_wrap_layout_get_align", false) | |
| 195 | - | ||
| 196 | 190 | cret := xWrapLayoutGetAlign(x.GoPointer()) | |
| 197 | 191 | return cret | |
| 198 | 192 | } | |
| @@ -201,8 +195,6 @@ var xWrapLayoutGetChildSpacing func(uintptr) int | |||
| 201 | 195 | ||
| 202 | 196 | // Gets spacing between widgets on the same line. | |
| 203 | 197 | func (x *WrapLayout) GetChildSpacing() int { | |
| 204 | - | core.LazyRegister(&xWrapLayoutGetChildSpacing, "ADW", "adw_wrap_layout_get_child_spacing", false) | |
| 205 | - | ||
| 206 | 198 | cret := xWrapLayoutGetChildSpacing(x.GoPointer()) | |
| 207 | 199 | return cret | |
| 208 | 200 | } | |
| @@ -211,8 +203,6 @@ var xWrapLayoutGetChildSpacingUnit func(uintptr) LengthUnit | |||
| 211 | 203 | ||
| 212 | 204 | // Gets the length unit for child spacing. | |
| 213 | 205 | func (x *WrapLayout) GetChildSpacingUnit() LengthUnit { | |
| 214 | - | core.LazyRegister(&xWrapLayoutGetChildSpacingUnit, "ADW", "adw_wrap_layout_get_child_spacing_unit", false) | |
| 215 | - | ||
| 216 | 206 | cret := xWrapLayoutGetChildSpacingUnit(x.GoPointer()) | |
| 217 | 207 | return cret | |
| 218 | 208 | } | |
| @@ -221,8 +211,6 @@ var xWrapLayoutGetJustify func(uintptr) JustifyMode | |||
| 221 | 211 | ||
| 222 | 212 | // Gets whether and how each complete line is stretched to fill the entire widget. | |
| 223 | 213 | func (x *WrapLayout) GetJustify() JustifyMode { | |
| 224 | - | core.LazyRegister(&xWrapLayoutGetJustify, "ADW", "adw_wrap_layout_get_justify", false) | |
| 225 | - | ||
| 226 | 214 | cret := xWrapLayoutGetJustify(x.GoPointer()) | |
| 227 | 215 | return cret | |
| 228 | 216 | } | |
| @@ -231,8 +219,6 @@ var xWrapLayoutGetJustifyLastLine func(uintptr) bool | |||
| 231 | 219 | ||
| 232 | 220 | // Gets whether the last line should be stretched to fill the entire widget. | |
| 233 | 221 | func (x *WrapLayout) GetJustifyLastLine() bool { | |
| 234 | - | core.LazyRegister(&xWrapLayoutGetJustifyLastLine, "ADW", "adw_wrap_layout_get_justify_last_line", false) | |
| 235 | - | ||
| 236 | 222 | cret := xWrapLayoutGetJustifyLastLine(x.GoPointer()) | |
| 237 | 223 | return cret | |
| 238 | 224 | } | |
| @@ -241,8 +227,6 @@ var xWrapLayoutGetLineHomogeneous func(uintptr) bool | |||
| 241 | 227 | ||
| 242 | 228 | // Gets whether all lines should take the same amount of space. | |
| 243 | 229 | func (x *WrapLayout) GetLineHomogeneous() bool { | |
| 244 | - | core.LazyRegister(&xWrapLayoutGetLineHomogeneous, "ADW", "adw_wrap_layout_get_line_homogeneous", false) | |
| 245 | - | ||
| 246 | 230 | cret := xWrapLayoutGetLineHomogeneous(x.GoPointer()) | |
| 247 | 231 | return cret | |
| 248 | 232 | } | |
| @@ -251,8 +235,6 @@ var xWrapLayoutGetLineSpacing func(uintptr) int | |||
| 251 | 235 | ||
| 252 | 236 | // Gets the spacing between lines. | |
| 253 | 237 | func (x *WrapLayout) GetLineSpacing() int { | |
| 254 | - | core.LazyRegister(&xWrapLayoutGetLineSpacing, "ADW", "adw_wrap_layout_get_line_spacing", false) | |
| 255 | - | ||
| 256 | 238 | cret := xWrapLayoutGetLineSpacing(x.GoPointer()) | |
| 257 | 239 | return cret | |
| 258 | 240 | } | |
| @@ -261,8 +243,6 @@ var xWrapLayoutGetLineSpacingUnit func(uintptr) LengthUnit | |||
| 261 | 243 | ||
| 262 | 244 | // Gets the length unit for line spacing. | |
| 263 | 245 | func (x *WrapLayout) GetLineSpacingUnit() LengthUnit { | |
| 264 | - | core.LazyRegister(&xWrapLayoutGetLineSpacingUnit, "ADW", "adw_wrap_layout_get_line_spacing_unit", false) | |
| 265 | - | ||
| 266 | 246 | cret := xWrapLayoutGetLineSpacingUnit(x.GoPointer()) | |
| 267 | 247 | return cret | |
| 268 | 248 | } | |
| @@ -271,8 +251,6 @@ var xWrapLayoutGetNaturalLineLength func(uintptr) int | |||
| 271 | 251 | ||
| 272 | 252 | // Gets the natural size for each line. | |
| 273 | 253 | func (x *WrapLayout) GetNaturalLineLength() int { | |
| 274 | - | core.LazyRegister(&xWrapLayoutGetNaturalLineLength, "ADW", "adw_wrap_layout_get_natural_line_length", false) | |
| 275 | - | ||
| 276 | 254 | cret := xWrapLayoutGetNaturalLineLength(x.GoPointer()) | |
| 277 | 255 | return cret | |
| 278 | 256 | } | |
| @@ -281,8 +259,6 @@ var xWrapLayoutGetNaturalLineLengthUnit func(uintptr) LengthUnit | |||
| 281 | 259 | ||
| 282 | 260 | // Gets the length unit for line spacing. | |
| 283 | 261 | func (x *WrapLayout) GetNaturalLineLengthUnit() LengthUnit { | |
| 284 | - | core.LazyRegister(&xWrapLayoutGetNaturalLineLengthUnit, "ADW", "adw_wrap_layout_get_natural_line_length_unit", false) | |
| 285 | - | ||
| 286 | 262 | cret := xWrapLayoutGetNaturalLineLengthUnit(x.GoPointer()) | |
| 287 | 263 | return cret | |
| 288 | 264 | } | |
| @@ -291,8 +267,6 @@ var xWrapLayoutGetPackDirection func(uintptr) PackDirection | |||
| 291 | 267 | ||
| 292 | 268 | // Gets the direction children are packed in each line. | |
| 293 | 269 | func (x *WrapLayout) GetPackDirection() PackDirection { | |
| 294 | - | core.LazyRegister(&xWrapLayoutGetPackDirection, "ADW", "adw_wrap_layout_get_pack_direction", false) | |
| 295 | - | ||
| 296 | 270 | cret := xWrapLayoutGetPackDirection(x.GoPointer()) | |
| 297 | 271 | return cret | |
| 298 | 272 | } | |
| @@ -301,8 +275,6 @@ var xWrapLayoutGetWrapPolicy func(uintptr) WrapPolicy | |||
| 301 | 275 | ||
| 302 | 276 | // Gets the policy for line wrapping. | |
| 303 | 277 | func (x *WrapLayout) GetWrapPolicy() WrapPolicy { | |
| 304 | - | core.LazyRegister(&xWrapLayoutGetWrapPolicy, "ADW", "adw_wrap_layout_get_wrap_policy", false) | |
| 305 | - | ||
| 306 | 278 | cret := xWrapLayoutGetWrapPolicy(x.GoPointer()) | |
| 307 | 279 | return cret | |
| 308 | 280 | } | |
| @@ -311,8 +283,6 @@ var xWrapLayoutGetWrapReverse func(uintptr) bool | |||
| 311 | 283 | ||
| 312 | 284 | // Gets whether wrap direction is reversed. | |
| 313 | 285 | func (x *WrapLayout) GetWrapReverse() bool { | |
| 314 | - | core.LazyRegister(&xWrapLayoutGetWrapReverse, "ADW", "adw_wrap_layout_get_wrap_reverse", false) | |
| 315 | - | ||
| 316 | 286 | cret := xWrapLayoutGetWrapReverse(x.GoPointer()) | |
| 317 | 287 | return cret | |
| 318 | 288 | } | |
| @@ -329,8 +299,6 @@ var xWrapLayoutSetAlign func(uintptr, float32) | |||
| 329 | 299 | // [enum@Adw.JustifyMode.none], or on the last line when the | |
| 330 | 300 | // [property@WrapLayout:justify-last-line] is `FALSE`. | |
| 331 | 301 | func (x *WrapLayout) SetAlign(AlignVar float32) { | |
| 332 | - | core.LazyRegister(&xWrapLayoutSetAlign, "ADW", "adw_wrap_layout_set_align", false) | |
| 333 | - | ||
| 334 | 302 | xWrapLayoutSetAlign(x.GoPointer(), AlignVar) | |
| 335 | 303 | } | |
| 336 | 304 | ||
| @@ -340,8 +308,6 @@ var xWrapLayoutSetChildSpacing func(uintptr, int) | |||
| 340 | 308 | // | |
| 341 | 309 | // See [property@WrapLayout:child-spacing-unit]. | |
| 342 | 310 | func (x *WrapLayout) SetChildSpacing(ChildSpacingVar int) { | |
| 343 | - | core.LazyRegister(&xWrapLayoutSetChildSpacing, "ADW", "adw_wrap_layout_set_child_spacing", false) | |
| 344 | - | ||
| 345 | 311 | xWrapLayoutSetChildSpacing(x.GoPointer(), ChildSpacingVar) | |
| 346 | 312 | } | |
| 347 | 313 | ||
| @@ -353,8 +319,6 @@ var xWrapLayoutSetChildSpacingUnit func(uintptr, LengthUnit) | |||
| 353 | 319 | // | |
| 354 | 320 | // See [property@WrapLayout:child-spacing]. | |
| 355 | 321 | func (x *WrapLayout) SetChildSpacingUnit(UnitVar LengthUnit) { | |
| 356 | - | core.LazyRegister(&xWrapLayoutSetChildSpacingUnit, "ADW", "adw_wrap_layout_set_child_spacing_unit", false) | |
| 357 | - | ||
| 358 | 322 | xWrapLayoutSetChildSpacingUnit(x.GoPointer(), UnitVar) | |
| 359 | 323 | } | |
| 360 | 324 | ||
| @@ -379,8 +343,6 @@ var xWrapLayoutSetJustify func(uintptr, JustifyMode) | |||
| 379 | 343 | // By default this doesn't affect the last line, as it will be incomplete. Use | |
| 380 | 344 | // [property@WrapLayout:justify-last-line] to justify it as well. | |
| 381 | 345 | func (x *WrapLayout) SetJustify(JustifyVar JustifyMode) { | |
| 382 | - | core.LazyRegister(&xWrapLayoutSetJustify, "ADW", "adw_wrap_layout_set_justify", false) | |
| 383 | - | ||
| 384 | 346 | xWrapLayoutSetJustify(x.GoPointer(), JustifyVar) | |
| 385 | 347 | } | |
| 386 | 348 | ||
| @@ -390,8 +352,6 @@ var xWrapLayoutSetJustifyLastLine func(uintptr, bool) | |||
| 390 | 352 | // | |
| 391 | 353 | // See [property@WrapLayout:justify]. | |
| 392 | 354 | func (x *WrapLayout) SetJustifyLastLine(JustifyLastLineVar bool) { | |
| 393 | - | core.LazyRegister(&xWrapLayoutSetJustifyLastLine, "ADW", "adw_wrap_layout_set_justify_last_line", false) | |
| 394 | - | ||
| 395 | 355 | xWrapLayoutSetJustifyLastLine(x.GoPointer(), JustifyLastLineVar) | |
| 396 | 356 | } | |
| 397 | 357 | ||
| @@ -399,8 +359,6 @@ var xWrapLayoutSetLineHomogeneous func(uintptr, bool) | |||
| 399 | 359 | ||
| 400 | 360 | // Sets whether all lines should take the same amount of space. | |
| 401 | 361 | func (x *WrapLayout) SetLineHomogeneous(HomogeneousVar bool) { | |
| 402 | - | core.LazyRegister(&xWrapLayoutSetLineHomogeneous, "ADW", "adw_wrap_layout_set_line_homogeneous", false) | |
| 403 | - | ||
| 404 | 362 | xWrapLayoutSetLineHomogeneous(x.GoPointer(), HomogeneousVar) | |
| 405 | 363 | } | |
| 406 | 364 | ||
| @@ -410,8 +368,6 @@ var xWrapLayoutSetLineSpacing func(uintptr, int) | |||
| 410 | 368 | // | |
| 411 | 369 | // See [property@WrapLayout:line-spacing-unit]. | |
| 412 | 370 | func (x *WrapLayout) SetLineSpacing(LineSpacingVar int) { | |
| 413 | - | core.LazyRegister(&xWrapLayoutSetLineSpacing, "ADW", "adw_wrap_layout_set_line_spacing", false) | |
| 414 | - | ||
| 415 | 371 | xWrapLayoutSetLineSpacing(x.GoPointer(), LineSpacingVar) | |
| 416 | 372 | } | |
| 417 | 373 | ||
| @@ -423,8 +379,6 @@ var xWrapLayoutSetLineSpacingUnit func(uintptr, LengthUnit) | |||
| 423 | 379 | // | |
| 424 | 380 | // See [property@WrapLayout:line-spacing]. | |
| 425 | 381 | func (x *WrapLayout) SetLineSpacingUnit(UnitVar LengthUnit) { | |
| 426 | - | core.LazyRegister(&xWrapLayoutSetLineSpacingUnit, "ADW", "adw_wrap_layout_set_line_spacing_unit", false) | |
| 427 | - | ||
| 428 | 382 | xWrapLayoutSetLineSpacingUnit(x.GoPointer(), UnitVar) | |
| 429 | 383 | } | |
| 430 | 384 | ||
| @@ -437,8 +391,6 @@ var xWrapLayoutSetNaturalLineLength func(uintptr, int) | |||
| 437 | 391 | // | |
| 438 | 392 | // See [property@WrapLayout:natural-line-length-unit]. | |
| 439 | 393 | func (x *WrapLayout) SetNaturalLineLength(NaturalLineLengthVar int) { | |
| 440 | - | core.LazyRegister(&xWrapLayoutSetNaturalLineLength, "ADW", "adw_wrap_layout_set_natural_line_length", false) | |
| 441 | - | ||
| 442 | 394 | xWrapLayoutSetNaturalLineLength(x.GoPointer(), NaturalLineLengthVar) | |
| 443 | 395 | } | |
| 444 | 396 | ||
| @@ -450,8 +402,6 @@ var xWrapLayoutSetNaturalLineLengthUnit func(uintptr, LengthUnit) | |||
| 450 | 402 | // | |
| 451 | 403 | // See [property@WrapLayout:natural-line-length]. | |
| 452 | 404 | func (x *WrapLayout) SetNaturalLineLengthUnit(UnitVar LengthUnit) { | |
| 453 | - | core.LazyRegister(&xWrapLayoutSetNaturalLineLengthUnit, "ADW", "adw_wrap_layout_set_natural_line_length_unit", false) | |
| 454 | - | ||
| 455 | 405 | xWrapLayoutSetNaturalLineLengthUnit(x.GoPointer(), UnitVar) | |
| 456 | 406 | } | |
| 457 | 407 | ||
| @@ -459,8 +409,6 @@ var xWrapLayoutSetPackDirection func(uintptr, PackDirection) | |||
| 459 | 409 | ||
| 460 | 410 | // Sets the direction children are packed in each line. | |
| 461 | 411 | func (x *WrapLayout) SetPackDirection(PackDirectionVar PackDirection) { | |
| 462 | - | core.LazyRegister(&xWrapLayoutSetPackDirection, "ADW", "adw_wrap_layout_set_pack_direction", false) | |
| 463 | - | ||
| 464 | 412 | xWrapLayoutSetPackDirection(x.GoPointer(), PackDirectionVar) | |
| 465 | 413 | } | |
| 466 | 414 | ||
| @@ -476,8 +424,6 @@ var xWrapLayoutSetWrapPolicy func(uintptr, WrapPolicy) | |||
| 476 | 424 | // children into each line as possible, shrinking them down to their minimum | |
| 477 | 425 | // size before wrapping to the next line. | |
| 478 | 426 | func (x *WrapLayout) SetWrapPolicy(WrapPolicyVar WrapPolicy) { | |
| 479 | - | core.LazyRegister(&xWrapLayoutSetWrapPolicy, "ADW", "adw_wrap_layout_set_wrap_policy", false) | |
| 480 | - | ||
| 481 | 427 | xWrapLayoutSetWrapPolicy(x.GoPointer(), WrapPolicyVar) | |
| 482 | 428 | } | |
| 483 | 429 | ||
| @@ -489,8 +435,6 @@ var xWrapLayoutSetWrapReverse func(uintptr, bool) | |||
| 489 | 435 | // in a vertical box. If set to `TRUE`, they wrap upwards or towards the start | |
| 490 | 436 | // respectively. | |
| 491 | 437 | func (x *WrapLayout) SetWrapReverse(WrapReverseVar bool) { | |
| 492 | - | core.LazyRegister(&xWrapLayoutSetWrapReverse, "ADW", "adw_wrap_layout_set_wrap_reverse", false) | |
| 493 | - | ||
| 494 | 438 | xWrapLayoutSetWrapReverse(x.GoPointer(), WrapReverseVar) | |
| 495 | 439 | } | |
| 496 | 440 | ||
| @@ -684,4 +628,49 @@ func (x *WrapLayout) SetOrientation(OrientationVar gtk.Orientation) { | |||
| 684 | 628 | func init() { | |
| 685 | 629 | core.SetPackageName("ADW", "libadwaita-1") | |
| 686 | 630 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | |
| 631 | + | var libs []uintptr | |
| 632 | + | for _, libPath := range core.GetPaths("ADW") { | |
| 633 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 634 | + | if err != nil { | |
| 635 | + | panic(err) | |
| 636 | + | } | |
| 637 | + | libs = append(libs, lib) | |
| 638 | + | } | |
| 639 | + | ||
| 640 | + | core.PuregoSafeRegister(&xJustifyModeGLibType, libs, "adw_justify_mode_get_type") | |
| 641 | + | ||
| 642 | + | core.PuregoSafeRegister(&xPackDirectionGLibType, libs, "adw_pack_direction_get_type") | |
| 643 | + | ||
| 644 | + | core.PuregoSafeRegister(&xWrapPolicyGLibType, libs, "adw_wrap_policy_get_type") | |
| 645 | + | ||
| 646 | + | core.PuregoSafeRegister(&xWrapLayoutGLibType, libs, "adw_wrap_layout_get_type") | |
| 647 | + | ||
| 648 | + | core.PuregoSafeRegister(&xNewWrapLayout, libs, "adw_wrap_layout_new") | |
| 649 | + | ||
| 650 | + | core.PuregoSafeRegister(&xWrapLayoutGetAlign, libs, "adw_wrap_layout_get_align") | |
| 651 | + | core.PuregoSafeRegister(&xWrapLayoutGetChildSpacing, libs, "adw_wrap_layout_get_child_spacing") | |
| 652 | + | core.PuregoSafeRegister(&xWrapLayoutGetChildSpacingUnit, libs, "adw_wrap_layout_get_child_spacing_unit") | |
| 653 | + | core.PuregoSafeRegister(&xWrapLayoutGetJustify, libs, "adw_wrap_layout_get_justify") | |
| 654 | + | core.PuregoSafeRegister(&xWrapLayoutGetJustifyLastLine, libs, "adw_wrap_layout_get_justify_last_line") | |
| 655 | + | core.PuregoSafeRegister(&xWrapLayoutGetLineHomogeneous, libs, "adw_wrap_layout_get_line_homogeneous") | |
| 656 | + | core.PuregoSafeRegister(&xWrapLayoutGetLineSpacing, libs, "adw_wrap_layout_get_line_spacing") | |
| 657 | + | core.PuregoSafeRegister(&xWrapLayoutGetLineSpacingUnit, libs, "adw_wrap_layout_get_line_spacing_unit") | |
| 658 | + | core.PuregoSafeRegister(&xWrapLayoutGetNaturalLineLength, libs, "adw_wrap_layout_get_natural_line_length") | |
| 659 | + | core.PuregoSafeRegister(&xWrapLayoutGetNaturalLineLengthUnit, libs, "adw_wrap_layout_get_natural_line_length_unit") | |
| 660 | + | core.PuregoSafeRegister(&xWrapLayoutGetPackDirection, libs, "adw_wrap_layout_get_pack_direction") | |
| 661 | + | core.PuregoSafeRegister(&xWrapLayoutGetWrapPolicy, libs, "adw_wrap_layout_get_wrap_policy") | |
| 662 | + | core.PuregoSafeRegister(&xWrapLayoutGetWrapReverse, libs, "adw_wrap_layout_get_wrap_reverse") | |
| 663 | + | core.PuregoSafeRegister(&xWrapLayoutSetAlign, libs, "adw_wrap_layout_set_align") | |
| 664 | + | core.PuregoSafeRegister(&xWrapLayoutSetChildSpacing, libs, "adw_wrap_layout_set_child_spacing") | |
| 665 | + | core.PuregoSafeRegister(&xWrapLayoutSetChildSpacingUnit, libs, "adw_wrap_layout_set_child_spacing_unit") | |
| 666 | + | core.PuregoSafeRegister(&xWrapLayoutSetJustify, libs, "adw_wrap_layout_set_justify") | |
| 667 | + | core.PuregoSafeRegister(&xWrapLayoutSetJustifyLastLine, libs, "adw_wrap_layout_set_justify_last_line") | |
| 668 | + | core.PuregoSafeRegister(&xWrapLayoutSetLineHomogeneous, libs, "adw_wrap_layout_set_line_homogeneous") | |
| 669 | + | core.PuregoSafeRegister(&xWrapLayoutSetLineSpacing, libs, "adw_wrap_layout_set_line_spacing") | |
| 670 | + | core.PuregoSafeRegister(&xWrapLayoutSetLineSpacingUnit, libs, "adw_wrap_layout_set_line_spacing_unit") | |
| 671 | + | core.PuregoSafeRegister(&xWrapLayoutSetNaturalLineLength, libs, "adw_wrap_layout_set_natural_line_length") | |
| 672 | + | core.PuregoSafeRegister(&xWrapLayoutSetNaturalLineLengthUnit, libs, "adw_wrap_layout_set_natural_line_length_unit") | |
| 673 | + | core.PuregoSafeRegister(&xWrapLayoutSetPackDirection, libs, "adw_wrap_layout_set_pack_direction") | |
| 674 | + | core.PuregoSafeRegister(&xWrapLayoutSetWrapPolicy, libs, "adw_wrap_layout_set_wrap_policy") | |
| 675 | + | core.PuregoSafeRegister(&xWrapLayoutSetWrapReverse, libs, "adw_wrap_layout_set_wrap_reverse") | |
| 687 | 676 | } | |
| @@ -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" | ||
| @@ -37,7 +38,6 @@ type JustifyMode int | |||||
| 37 | var xJustifyModeGLibType func() types.GType | 38 | var xJustifyModeGLibType func() types.GType | ||
| 38 | 39 | ||||
| 39 | func JustifyModeGLibType() types.GType { | 40 | func JustifyModeGLibType() types.GType { | ||
| 40 | - | core.LazyRegister(&xJustifyModeGLibType, "ADW", "adw_justify_mode_get_type", false) | |||
| 41 | return xJustifyModeGLibType() | 41 | return xJustifyModeGLibType() | ||
| 42 | } | 42 | } | ||
| 43 | 43 | ||||
| @@ -64,7 +64,6 @@ type PackDirection int | |||||
| 64 | var xPackDirectionGLibType func() types.GType | 64 | var xPackDirectionGLibType func() types.GType | ||
| 65 | 65 | ||||
| 66 | func PackDirectionGLibType() types.GType { | 66 | func PackDirectionGLibType() types.GType { | ||
| 67 | - | core.LazyRegister(&xPackDirectionGLibType, "ADW", "adw_pack_direction_get_type", false) | |||
| 68 | return xPackDirectionGLibType() | 67 | return xPackDirectionGLibType() | ||
| 69 | } | 68 | } | ||
| 70 | 69 | ||||
| @@ -86,7 +85,6 @@ type WrapPolicy int | |||||
| 86 | var xWrapPolicyGLibType func() types.GType | 85 | var xWrapPolicyGLibType func() types.GType | ||
| 87 | 86 | ||||
| 88 | func WrapPolicyGLibType() types.GType { | 87 | func WrapPolicyGLibType() types.GType { | ||
| 89 | - | core.LazyRegister(&xWrapPolicyGLibType, "ADW", "adw_wrap_policy_get_type", false) | |||
| 90 | return xWrapPolicyGLibType() | 88 | return xWrapPolicyGLibType() | ||
| 91 | } | 89 | } | ||
| 92 | 90 | ||||
| @@ -160,7 +158,6 @@ type WrapLayout struct { | |||||
| 160 | var xWrapLayoutGLibType func() types.GType | 158 | var xWrapLayoutGLibType func() types.GType | ||
| 161 | 159 | ||||
| 162 | func WrapLayoutGLibType() types.GType { | 160 | func WrapLayoutGLibType() types.GType { | ||
| 163 | - | core.LazyRegister(&xWrapLayoutGLibType, "ADW", "adw_wrap_layout_get_type", false) | |||
| 164 | return xWrapLayoutGLibType() | 161 | return xWrapLayoutGLibType() | ||
| 165 | } | 162 | } | ||
| 166 | 163 | ||||
| @@ -174,7 +171,6 @@ var xNewWrapLayout func() uintptr | |||||
| 174 | 171 | ||||
| 175 | // Creates a new `AdwWrapLayout`. | 172 | // Creates a new `AdwWrapLayout`. | ||
| 176 | func NewWrapLayout() *WrapLayout { | 173 | func NewWrapLayout() *WrapLayout { | ||
| 177 | - | core.LazyRegister(&xNewWrapLayout, "ADW", "adw_wrap_layout_new", false) | |||
| 178 | var cls *WrapLayout | 174 | var cls *WrapLayout | ||
| 179 | 175 | ||||
| 180 | cret := xNewWrapLayout() | 176 | cret := xNewWrapLayout() | ||
| @@ -191,8 +187,6 @@ var xWrapLayoutGetAlign func(uintptr) float32 | |||||
| 191 | 187 | ||||
| 192 | // Gets the alignment of the children within each line. | 188 | // Gets the alignment of the children within each line. | ||
| 193 | func (x *WrapLayout) GetAlign() float32 { | 189 | func (x *WrapLayout) GetAlign() float32 { | ||
| 194 | - | core.LazyRegister(&xWrapLayoutGetAlign, "ADW", "adw_wrap_layout_get_align", false) | |||
| 195 | - | ||||
| 196 | cret := xWrapLayoutGetAlign(x.GoPointer()) | 190 | cret := xWrapLayoutGetAlign(x.GoPointer()) | ||
| 197 | return cret | 191 | return cret | ||
| 198 | } | 192 | } | ||
| @@ -201,8 +195,6 @@ var xWrapLayoutGetChildSpacing func(uintptr) int | |||||
| 201 | 195 | ||||
| 202 | // Gets spacing between widgets on the same line. | 196 | // Gets spacing between widgets on the same line. | ||
| 203 | func (x *WrapLayout) GetChildSpacing() int { | 197 | func (x *WrapLayout) GetChildSpacing() int { | ||
| 204 | - | core.LazyRegister(&xWrapLayoutGetChildSpacing, "ADW", "adw_wrap_layout_get_child_spacing", false) | |||
| 205 | - | ||||
| 206 | cret := xWrapLayoutGetChildSpacing(x.GoPointer()) | 198 | cret := xWrapLayoutGetChildSpacing(x.GoPointer()) | ||
| 207 | return cret | 199 | return cret | ||
| 208 | } | 200 | } | ||
| @@ -211,8 +203,6 @@ var xWrapLayoutGetChildSpacingUnit func(uintptr) LengthUnit | |||||
| 211 | 203 | ||||
| 212 | // Gets the length unit for child spacing. | 204 | // Gets the length unit for child spacing. | ||
| 213 | func (x *WrapLayout) GetChildSpacingUnit() LengthUnit { | 205 | func (x *WrapLayout) GetChildSpacingUnit() LengthUnit { | ||
| 214 | - | core.LazyRegister(&xWrapLayoutGetChildSpacingUnit, "ADW", "adw_wrap_layout_get_child_spacing_unit", false) | |||
| 215 | - | ||||
| 216 | cret := xWrapLayoutGetChildSpacingUnit(x.GoPointer()) | 206 | cret := xWrapLayoutGetChildSpacingUnit(x.GoPointer()) | ||
| 217 | return cret | 207 | return cret | ||
| 218 | } | 208 | } | ||
| @@ -221,8 +211,6 @@ var xWrapLayoutGetJustify func(uintptr) JustifyMode | |||||
| 221 | 211 | ||||
| 222 | // Gets whether and how each complete line is stretched to fill the entire widget. | 212 | // Gets whether and how each complete line is stretched to fill the entire widget. | ||
| 223 | func (x *WrapLayout) GetJustify() JustifyMode { | 213 | func (x *WrapLayout) GetJustify() JustifyMode { | ||
| 224 | - | core.LazyRegister(&xWrapLayoutGetJustify, "ADW", "adw_wrap_layout_get_justify", false) | |||
| 225 | - | ||||
| 226 | cret := xWrapLayoutGetJustify(x.GoPointer()) | 214 | cret := xWrapLayoutGetJustify(x.GoPointer()) | ||
| 227 | return cret | 215 | return cret | ||
| 228 | } | 216 | } | ||
| @@ -231,8 +219,6 @@ var xWrapLayoutGetJustifyLastLine func(uintptr) bool | |||||
| 231 | 219 | ||||
| 232 | // Gets whether the last line should be stretched to fill the entire widget. | 220 | // Gets whether the last line should be stretched to fill the entire widget. | ||
| 233 | func (x *WrapLayout) GetJustifyLastLine() bool { | 221 | func (x *WrapLayout) GetJustifyLastLine() bool { | ||
| 234 | - | core.LazyRegister(&xWrapLayoutGetJustifyLastLine, "ADW", "adw_wrap_layout_get_justify_last_line", false) | |||
| 235 | - | ||||
| 236 | cret := xWrapLayoutGetJustifyLastLine(x.GoPointer()) | 222 | cret := xWrapLayoutGetJustifyLastLine(x.GoPointer()) | ||
| 237 | return cret | 223 | return cret | ||
| 238 | } | 224 | } | ||
| @@ -241,8 +227,6 @@ var xWrapLayoutGetLineHomogeneous func(uintptr) bool | |||||
| 241 | 227 | ||||
| 242 | // Gets whether all lines should take the same amount of space. | 228 | // Gets whether all lines should take the same amount of space. | ||
| 243 | func (x *WrapLayout) GetLineHomogeneous() bool { | 229 | func (x *WrapLayout) GetLineHomogeneous() bool { | ||
| 244 | - | core.LazyRegister(&xWrapLayoutGetLineHomogeneous, "ADW", "adw_wrap_layout_get_line_homogeneous", false) | |||
| 245 | - | ||||
| 246 | cret := xWrapLayoutGetLineHomogeneous(x.GoPointer()) | 230 | cret := xWrapLayoutGetLineHomogeneous(x.GoPointer()) | ||
| 247 | return cret | 231 | return cret | ||
| 248 | } | 232 | } | ||
| @@ -251,8 +235,6 @@ var xWrapLayoutGetLineSpacing func(uintptr) int | |||||
| 251 | 235 | ||||
| 252 | // Gets the spacing between lines. | 236 | // Gets the spacing between lines. | ||
| 253 | func (x *WrapLayout) GetLineSpacing() int { | 237 | func (x *WrapLayout) GetLineSpacing() int { | ||
| 254 | - | core.LazyRegister(&xWrapLayoutGetLineSpacing, "ADW", "adw_wrap_layout_get_line_spacing", false) | |||
| 255 | - | ||||
| 256 | cret := xWrapLayoutGetLineSpacing(x.GoPointer()) | 238 | cret := xWrapLayoutGetLineSpacing(x.GoPointer()) | ||
| 257 | return cret | 239 | return cret | ||
| 258 | } | 240 | } | ||
| @@ -261,8 +243,6 @@ var xWrapLayoutGetLineSpacingUnit func(uintptr) LengthUnit | |||||
| 261 | 243 | ||||
| 262 | // Gets the length unit for line spacing. | 244 | // Gets the length unit for line spacing. | ||
| 263 | func (x *WrapLayout) GetLineSpacingUnit() LengthUnit { | 245 | func (x *WrapLayout) GetLineSpacingUnit() LengthUnit { | ||
| 264 | - | core.LazyRegister(&xWrapLayoutGetLineSpacingUnit, "ADW", "adw_wrap_layout_get_line_spacing_unit", false) | |||
| 265 | - | ||||
| 266 | cret := xWrapLayoutGetLineSpacingUnit(x.GoPointer()) | 246 | cret := xWrapLayoutGetLineSpacingUnit(x.GoPointer()) | ||
| 267 | return cret | 247 | return cret | ||
| 268 | } | 248 | } | ||
| @@ -271,8 +251,6 @@ var xWrapLayoutGetNaturalLineLength func(uintptr) int | |||||
| 271 | 251 | ||||
| 272 | // Gets the natural size for each line. | 252 | // Gets the natural size for each line. | ||
| 273 | func (x *WrapLayout) GetNaturalLineLength() int { | 253 | func (x *WrapLayout) GetNaturalLineLength() int { | ||
| 274 | - | core.LazyRegister(&xWrapLayoutGetNaturalLineLength, "ADW", "adw_wrap_layout_get_natural_line_length", false) | |||
| 275 | - | ||||
| 276 | cret := xWrapLayoutGetNaturalLineLength(x.GoPointer()) | 254 | cret := xWrapLayoutGetNaturalLineLength(x.GoPointer()) | ||
| 277 | return cret | 255 | return cret | ||
| 278 | } | 256 | } | ||
| @@ -281,8 +259,6 @@ var xWrapLayoutGetNaturalLineLengthUnit func(uintptr) LengthUnit | |||||
| 281 | 259 | ||||
| 282 | // Gets the length unit for line spacing. | 260 | // Gets the length unit for line spacing. | ||
| 283 | func (x *WrapLayout) GetNaturalLineLengthUnit() LengthUnit { | 261 | func (x *WrapLayout) GetNaturalLineLengthUnit() LengthUnit { | ||
| 284 | - | core.LazyRegister(&xWrapLayoutGetNaturalLineLengthUnit, "ADW", "adw_wrap_layout_get_natural_line_length_unit", false) | |||
| 285 | - | ||||
| 286 | cret := xWrapLayoutGetNaturalLineLengthUnit(x.GoPointer()) | 262 | cret := xWrapLayoutGetNaturalLineLengthUnit(x.GoPointer()) | ||
| 287 | return cret | 263 | return cret | ||
| 288 | } | 264 | } | ||
| @@ -291,8 +267,6 @@ var xWrapLayoutGetPackDirection func(uintptr) PackDirection | |||||
| 291 | 267 | ||||
| 292 | // Gets the direction children are packed in each line. | 268 | // Gets the direction children are packed in each line. | ||
| 293 | func (x *WrapLayout) GetPackDirection() PackDirection { | 269 | func (x *WrapLayout) GetPackDirection() PackDirection { | ||
| 294 | - | core.LazyRegister(&xWrapLayoutGetPackDirection, "ADW", "adw_wrap_layout_get_pack_direction", false) | |||
| 295 | - | ||||
| 296 | cret := xWrapLayoutGetPackDirection(x.GoPointer()) | 270 | cret := xWrapLayoutGetPackDirection(x.GoPointer()) | ||
| 297 | return cret | 271 | return cret | ||
| 298 | } | 272 | } | ||
| @@ -301,8 +275,6 @@ var xWrapLayoutGetWrapPolicy func(uintptr) WrapPolicy | |||||
| 301 | 275 | ||||
| 302 | // Gets the policy for line wrapping. | 276 | // Gets the policy for line wrapping. | ||
| 303 | func (x *WrapLayout) GetWrapPolicy() WrapPolicy { | 277 | func (x *WrapLayout) GetWrapPolicy() WrapPolicy { | ||
| 304 | - | core.LazyRegister(&xWrapLayoutGetWrapPolicy, "ADW", "adw_wrap_layout_get_wrap_policy", false) | |||
| 305 | - | ||||
| 306 | cret := xWrapLayoutGetWrapPolicy(x.GoPointer()) | 278 | cret := xWrapLayoutGetWrapPolicy(x.GoPointer()) | ||
| 307 | return cret | 279 | return cret | ||
| 308 | } | 280 | } | ||
| @@ -311,8 +283,6 @@ var xWrapLayoutGetWrapReverse func(uintptr) bool | |||||
| 311 | 283 | ||||
| 312 | // Gets whether wrap direction is reversed. | 284 | // Gets whether wrap direction is reversed. | ||
| 313 | func (x *WrapLayout) GetWrapReverse() bool { | 285 | func (x *WrapLayout) GetWrapReverse() bool { | ||
| 314 | - | core.LazyRegister(&xWrapLayoutGetWrapReverse, "ADW", "adw_wrap_layout_get_wrap_reverse", false) | |||
| 315 | - | ||||
| 316 | cret := xWrapLayoutGetWrapReverse(x.GoPointer()) | 286 | cret := xWrapLayoutGetWrapReverse(x.GoPointer()) | ||
| 317 | return cret | 287 | return cret | ||
| 318 | } | 288 | } | ||
| @@ -329,8 +299,6 @@ var xWrapLayoutSetAlign func(uintptr, float32) | |||||
| 329 | // [enum@Adw.JustifyMode.none], or on the last line when the | 299 | // [enum@Adw.JustifyMode.none], or on the last line when the | ||
| 330 | // [property@WrapLayout:justify-last-line] is `FALSE`. | 300 | // [property@WrapLayout:justify-last-line] is `FALSE`. | ||
| 331 | func (x *WrapLayout) SetAlign(AlignVar float32) { | 301 | func (x *WrapLayout) SetAlign(AlignVar float32) { | ||
| 332 | - | core.LazyRegister(&xWrapLayoutSetAlign, "ADW", "adw_wrap_layout_set_align", false) | |||
| 333 | - | ||||
| 334 | xWrapLayoutSetAlign(x.GoPointer(), AlignVar) | 302 | xWrapLayoutSetAlign(x.GoPointer(), AlignVar) | ||
| 335 | } | 303 | } | ||
| 336 | 304 | ||||
| @@ -340,8 +308,6 @@ var xWrapLayoutSetChildSpacing func(uintptr, int) | |||||
| 340 | // | 308 | // | ||
| 341 | // See [property@WrapLayout:child-spacing-unit]. | 309 | // See [property@WrapLayout:child-spacing-unit]. | ||
| 342 | func (x *WrapLayout) SetChildSpacing(ChildSpacingVar int) { | 310 | func (x *WrapLayout) SetChildSpacing(ChildSpacingVar int) { | ||
| 343 | - | core.LazyRegister(&xWrapLayoutSetChildSpacing, "ADW", "adw_wrap_layout_set_child_spacing", false) | |||
| 344 | - | ||||
| 345 | xWrapLayoutSetChildSpacing(x.GoPointer(), ChildSpacingVar) | 311 | xWrapLayoutSetChildSpacing(x.GoPointer(), ChildSpacingVar) | ||
| 346 | } | 312 | } | ||
| 347 | 313 | ||||
| @@ -353,8 +319,6 @@ var xWrapLayoutSetChildSpacingUnit func(uintptr, LengthUnit) | |||||
| 353 | // | 319 | // | ||
| 354 | // See [property@WrapLayout:child-spacing]. | 320 | // See [property@WrapLayout:child-spacing]. | ||
| 355 | func (x *WrapLayout) SetChildSpacingUnit(UnitVar LengthUnit) { | 321 | func (x *WrapLayout) SetChildSpacingUnit(UnitVar LengthUnit) { | ||
| 356 | - | core.LazyRegister(&xWrapLayoutSetChildSpacingUnit, "ADW", "adw_wrap_layout_set_child_spacing_unit", false) | |||
| 357 | - | ||||
| 358 | xWrapLayoutSetChildSpacingUnit(x.GoPointer(), UnitVar) | 322 | xWrapLayoutSetChildSpacingUnit(x.GoPointer(), UnitVar) | ||
| 359 | } | 323 | } | ||
| 360 | 324 | ||||
| @@ -379,8 +343,6 @@ var xWrapLayoutSetJustify func(uintptr, JustifyMode) | |||||
| 379 | // By default this doesn't affect the last line, as it will be incomplete. Use | 343 | // By default this doesn't affect the last line, as it will be incomplete. Use | ||
| 380 | // [property@WrapLayout:justify-last-line] to justify it as well. | 344 | // [property@WrapLayout:justify-last-line] to justify it as well. | ||
| 381 | func (x *WrapLayout) SetJustify(JustifyVar JustifyMode) { | 345 | func (x *WrapLayout) SetJustify(JustifyVar JustifyMode) { | ||
| 382 | - | core.LazyRegister(&xWrapLayoutSetJustify, "ADW", "adw_wrap_layout_set_justify", false) | |||
| 383 | - | ||||
| 384 | xWrapLayoutSetJustify(x.GoPointer(), JustifyVar) | 346 | xWrapLayoutSetJustify(x.GoPointer(), JustifyVar) | ||
| 385 | } | 347 | } | ||
| 386 | 348 | ||||
| @@ -390,8 +352,6 @@ var xWrapLayoutSetJustifyLastLine func(uintptr, bool) | |||||
| 390 | // | 352 | // | ||
| 391 | // See [property@WrapLayout:justify]. | 353 | // See [property@WrapLayout:justify]. | ||
| 392 | func (x *WrapLayout) SetJustifyLastLine(JustifyLastLineVar bool) { | 354 | func (x *WrapLayout) SetJustifyLastLine(JustifyLastLineVar bool) { | ||
| 393 | - | core.LazyRegister(&xWrapLayoutSetJustifyLastLine, "ADW", "adw_wrap_layout_set_justify_last_line", false) | |||
| 394 | - | ||||
| 395 | xWrapLayoutSetJustifyLastLine(x.GoPointer(), JustifyLastLineVar) | 355 | xWrapLayoutSetJustifyLastLine(x.GoPointer(), JustifyLastLineVar) | ||
| 396 | } | 356 | } | ||
| 397 | 357 | ||||
| @@ -399,8 +359,6 @@ var xWrapLayoutSetLineHomogeneous func(uintptr, bool) | |||||
| 399 | 359 | ||||
| 400 | // Sets whether all lines should take the same amount of space. | 360 | // Sets whether all lines should take the same amount of space. | ||
| 401 | func (x *WrapLayout) SetLineHomogeneous(HomogeneousVar bool) { | 361 | func (x *WrapLayout) SetLineHomogeneous(HomogeneousVar bool) { | ||
| 402 | - | core.LazyRegister(&xWrapLayoutSetLineHomogeneous, "ADW", "adw_wrap_layout_set_line_homogeneous", false) | |||
| 403 | - | ||||
| 404 | xWrapLayoutSetLineHomogeneous(x.GoPointer(), HomogeneousVar) | 362 | xWrapLayoutSetLineHomogeneous(x.GoPointer(), HomogeneousVar) | ||
| 405 | } | 363 | } | ||
| 406 | 364 | ||||
| @@ -410,8 +368,6 @@ var xWrapLayoutSetLineSpacing func(uintptr, int) | |||||
| 410 | // | 368 | // | ||
| 411 | // See [property@WrapLayout:line-spacing-unit]. | 369 | // See [property@WrapLayout:line-spacing-unit]. | ||
| 412 | func (x *WrapLayout) SetLineSpacing(LineSpacingVar int) { | 370 | func (x *WrapLayout) SetLineSpacing(LineSpacingVar int) { | ||
| 413 | - | core.LazyRegister(&xWrapLayoutSetLineSpacing, "ADW", "adw_wrap_layout_set_line_spacing", false) | |||
| 414 | - | ||||
| 415 | xWrapLayoutSetLineSpacing(x.GoPointer(), LineSpacingVar) | 371 | xWrapLayoutSetLineSpacing(x.GoPointer(), LineSpacingVar) | ||
| 416 | } | 372 | } | ||
| 417 | 373 | ||||
| @@ -423,8 +379,6 @@ var xWrapLayoutSetLineSpacingUnit func(uintptr, LengthUnit) | |||||
| 423 | // | 379 | // | ||
| 424 | // See [property@WrapLayout:line-spacing]. | 380 | // See [property@WrapLayout:line-spacing]. | ||
| 425 | func (x *WrapLayout) SetLineSpacingUnit(UnitVar LengthUnit) { | 381 | func (x *WrapLayout) SetLineSpacingUnit(UnitVar LengthUnit) { | ||
| 426 | - | core.LazyRegister(&xWrapLayoutSetLineSpacingUnit, "ADW", "adw_wrap_layout_set_line_spacing_unit", false) | |||
| 427 | - | ||||
| 428 | xWrapLayoutSetLineSpacingUnit(x.GoPointer(), UnitVar) | 382 | xWrapLayoutSetLineSpacingUnit(x.GoPointer(), UnitVar) | ||
| 429 | } | 383 | } | ||
| 430 | 384 | ||||
| @@ -437,8 +391,6 @@ var xWrapLayoutSetNaturalLineLength func(uintptr, int) | |||||
| 437 | // | 391 | // | ||
| 438 | // See [property@WrapLayout:natural-line-length-unit]. | 392 | // See [property@WrapLayout:natural-line-length-unit]. | ||
| 439 | func (x *WrapLayout) SetNaturalLineLength(NaturalLineLengthVar int) { | 393 | func (x *WrapLayout) SetNaturalLineLength(NaturalLineLengthVar int) { | ||
| 440 | - | core.LazyRegister(&xWrapLayoutSetNaturalLineLength, "ADW", "adw_wrap_layout_set_natural_line_length", false) | |||
| 441 | - | ||||
| 442 | xWrapLayoutSetNaturalLineLength(x.GoPointer(), NaturalLineLengthVar) | 394 | xWrapLayoutSetNaturalLineLength(x.GoPointer(), NaturalLineLengthVar) | ||
| 443 | } | 395 | } | ||
| 444 | 396 | ||||
| @@ -450,8 +402,6 @@ var xWrapLayoutSetNaturalLineLengthUnit func(uintptr, LengthUnit) | |||||
| 450 | // | 402 | // | ||
| 451 | // See [property@WrapLayout:natural-line-length]. | 403 | // See [property@WrapLayout:natural-line-length]. | ||
| 452 | func (x *WrapLayout) SetNaturalLineLengthUnit(UnitVar LengthUnit) { | 404 | func (x *WrapLayout) SetNaturalLineLengthUnit(UnitVar LengthUnit) { | ||
| 453 | - | core.LazyRegister(&xWrapLayoutSetNaturalLineLengthUnit, "ADW", "adw_wrap_layout_set_natural_line_length_unit", false) | |||
| 454 | - | ||||
| 455 | xWrapLayoutSetNaturalLineLengthUnit(x.GoPointer(), UnitVar) | 405 | xWrapLayoutSetNaturalLineLengthUnit(x.GoPointer(), UnitVar) | ||
| 456 | } | 406 | } | ||
| 457 | 407 | ||||
| @@ -459,8 +409,6 @@ var xWrapLayoutSetPackDirection func(uintptr, PackDirection) | |||||
| 459 | 409 | ||||
| 460 | // Sets the direction children are packed in each line. | 410 | // Sets the direction children are packed in each line. | ||
| 461 | func (x *WrapLayout) SetPackDirection(PackDirectionVar PackDirection) { | 411 | func (x *WrapLayout) SetPackDirection(PackDirectionVar PackDirection) { | ||
| 462 | - | core.LazyRegister(&xWrapLayoutSetPackDirection, "ADW", "adw_wrap_layout_set_pack_direction", false) | |||
| 463 | - | ||||
| 464 | xWrapLayoutSetPackDirection(x.GoPointer(), PackDirectionVar) | 412 | xWrapLayoutSetPackDirection(x.GoPointer(), PackDirectionVar) | ||
| 465 | } | 413 | } | ||
| 466 | 414 | ||||
| @@ -476,8 +424,6 @@ var xWrapLayoutSetWrapPolicy func(uintptr, WrapPolicy) | |||||
| 476 | // children into each line as possible, shrinking them down to their minimum | 424 | // children into each line as possible, shrinking them down to their minimum | ||
| 477 | // size before wrapping to the next line. | 425 | // size before wrapping to the next line. | ||
| 478 | func (x *WrapLayout) SetWrapPolicy(WrapPolicyVar WrapPolicy) { | 426 | func (x *WrapLayout) SetWrapPolicy(WrapPolicyVar WrapPolicy) { | ||
| 479 | - | core.LazyRegister(&xWrapLayoutSetWrapPolicy, "ADW", "adw_wrap_layout_set_wrap_policy", false) | |||
| 480 | - | ||||
| 481 | xWrapLayoutSetWrapPolicy(x.GoPointer(), WrapPolicyVar) | 427 | xWrapLayoutSetWrapPolicy(x.GoPointer(), WrapPolicyVar) | ||
| 482 | } | 428 | } | ||
| 483 | 429 | ||||
| @@ -489,8 +435,6 @@ var xWrapLayoutSetWrapReverse func(uintptr, bool) | |||||
| 489 | // in a vertical box. If set to `TRUE`, they wrap upwards or towards the start | 435 | // in a vertical box. If set to `TRUE`, they wrap upwards or towards the start | ||
| 490 | // respectively. | 436 | // respectively. | ||
| 491 | func (x *WrapLayout) SetWrapReverse(WrapReverseVar bool) { | 437 | func (x *WrapLayout) SetWrapReverse(WrapReverseVar bool) { | ||
| 492 | - | core.LazyRegister(&xWrapLayoutSetWrapReverse, "ADW", "adw_wrap_layout_set_wrap_reverse", false) | |||
| 493 | - | ||||
| 494 | xWrapLayoutSetWrapReverse(x.GoPointer(), WrapReverseVar) | 438 | xWrapLayoutSetWrapReverse(x.GoPointer(), WrapReverseVar) | ||
| 495 | } | 439 | } | ||
| 496 | 440 | ||||
| @@ -684,4 +628,49 @@ func (x *WrapLayout) SetOrientation(OrientationVar gtk.Orientation) { | |||||
| 684 | func init() { | 628 | func init() { | ||
| 685 | core.SetPackageName("ADW", "libadwaita-1") | 629 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 686 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 630 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | ||
| 631 | + | var libs []uintptr | |||
| 632 | + | for _, libPath := range core.GetPaths("ADW") { | |||
| 633 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 634 | + | if err != nil { | |||
| 635 | + | panic(err) | |||
| 636 | + | } | |||
| 637 | + | libs = append(libs, lib) | |||
| 638 | + | } | |||
| 639 | + | ||||
| 640 | + | core.PuregoSafeRegister(&xJustifyModeGLibType, libs, "adw_justify_mode_get_type") | |||
| 641 | + | ||||
| 642 | + | core.PuregoSafeRegister(&xPackDirectionGLibType, libs, "adw_pack_direction_get_type") | |||
| 643 | + | ||||
| 644 | + | core.PuregoSafeRegister(&xWrapPolicyGLibType, libs, "adw_wrap_policy_get_type") | |||
| 645 | + | ||||
| 646 | + | core.PuregoSafeRegister(&xWrapLayoutGLibType, libs, "adw_wrap_layout_get_type") | |||
| 647 | + | ||||
| 648 | + | core.PuregoSafeRegister(&xNewWrapLayout, libs, "adw_wrap_layout_new") | |||
| 649 | + | ||||
| 650 | + | core.PuregoSafeRegister(&xWrapLayoutGetAlign, libs, "adw_wrap_layout_get_align") | |||
| 651 | + | core.PuregoSafeRegister(&xWrapLayoutGetChildSpacing, libs, "adw_wrap_layout_get_child_spacing") | |||
| 652 | + | core.PuregoSafeRegister(&xWrapLayoutGetChildSpacingUnit, libs, "adw_wrap_layout_get_child_spacing_unit") | |||
| 653 | + | core.PuregoSafeRegister(&xWrapLayoutGetJustify, libs, "adw_wrap_layout_get_justify") | |||
| 654 | + | core.PuregoSafeRegister(&xWrapLayoutGetJustifyLastLine, libs, "adw_wrap_layout_get_justify_last_line") | |||
| 655 | + | core.PuregoSafeRegister(&xWrapLayoutGetLineHomogeneous, libs, "adw_wrap_layout_get_line_homogeneous") | |||
| 656 | + | core.PuregoSafeRegister(&xWrapLayoutGetLineSpacing, libs, "adw_wrap_layout_get_line_spacing") | |||
| 657 | + | core.PuregoSafeRegister(&xWrapLayoutGetLineSpacingUnit, libs, "adw_wrap_layout_get_line_spacing_unit") | |||
| 658 | + | core.PuregoSafeRegister(&xWrapLayoutGetNaturalLineLength, libs, "adw_wrap_layout_get_natural_line_length") | |||
| 659 | + | core.PuregoSafeRegister(&xWrapLayoutGetNaturalLineLengthUnit, libs, "adw_wrap_layout_get_natural_line_length_unit") | |||
| 660 | + | core.PuregoSafeRegister(&xWrapLayoutGetPackDirection, libs, "adw_wrap_layout_get_pack_direction") | |||
| 661 | + | core.PuregoSafeRegister(&xWrapLayoutGetWrapPolicy, libs, "adw_wrap_layout_get_wrap_policy") | |||
| 662 | + | core.PuregoSafeRegister(&xWrapLayoutGetWrapReverse, libs, "adw_wrap_layout_get_wrap_reverse") | |||
| 663 | + | core.PuregoSafeRegister(&xWrapLayoutSetAlign, libs, "adw_wrap_layout_set_align") | |||
| 664 | + | core.PuregoSafeRegister(&xWrapLayoutSetChildSpacing, libs, "adw_wrap_layout_set_child_spacing") | |||
| 665 | + | core.PuregoSafeRegister(&xWrapLayoutSetChildSpacingUnit, libs, "adw_wrap_layout_set_child_spacing_unit") | |||
| 666 | + | core.PuregoSafeRegister(&xWrapLayoutSetJustify, libs, "adw_wrap_layout_set_justify") | |||
| 667 | + | core.PuregoSafeRegister(&xWrapLayoutSetJustifyLastLine, libs, "adw_wrap_layout_set_justify_last_line") | |||
| 668 | + | core.PuregoSafeRegister(&xWrapLayoutSetLineHomogeneous, libs, "adw_wrap_layout_set_line_homogeneous") | |||
| 669 | + | core.PuregoSafeRegister(&xWrapLayoutSetLineSpacing, libs, "adw_wrap_layout_set_line_spacing") | |||
| 670 | + | core.PuregoSafeRegister(&xWrapLayoutSetLineSpacingUnit, libs, "adw_wrap_layout_set_line_spacing_unit") | |||
| 671 | + | core.PuregoSafeRegister(&xWrapLayoutSetNaturalLineLength, libs, "adw_wrap_layout_set_natural_line_length") | |||
| 672 | + | core.PuregoSafeRegister(&xWrapLayoutSetNaturalLineLengthUnit, libs, "adw_wrap_layout_set_natural_line_length_unit") | |||
| 673 | + | core.PuregoSafeRegister(&xWrapLayoutSetPackDirection, libs, "adw_wrap_layout_set_pack_direction") | |||
| 674 | + | core.PuregoSafeRegister(&xWrapLayoutSetWrapPolicy, libs, "adw_wrap_layout_set_wrap_policy") | |||
| 675 | + | core.PuregoSafeRegister(&xWrapLayoutSetWrapReverse, libs, "adw_wrap_layout_set_wrap_reverse") | |||
| 687 | } | 676 | } | ||