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
| @@ -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" | |
| @@ -42,7 +43,6 @@ type InlineViewSwitcherDisplayMode int | |||
| 42 | 43 | var xInlineViewSwitcherDisplayModeGLibType func() types.GType | |
| 43 | 44 | ||
| 44 | 45 | func InlineViewSwitcherDisplayModeGLibType() types.GType { | |
| 45 | - | core.LazyRegister(&xInlineViewSwitcherDisplayModeGLibType, "ADW", "adw_inline_view_switcher_display_mode_get_type", false) | |
| 46 | 46 | return xInlineViewSwitcherDisplayModeGLibType() | |
| 47 | 47 | } | |
| 48 | 48 | ||
| @@ -109,7 +109,6 @@ type InlineViewSwitcher struct { | |||
| 109 | 109 | var xInlineViewSwitcherGLibType func() types.GType | |
| 110 | 110 | ||
| 111 | 111 | func InlineViewSwitcherGLibType() types.GType { | |
| 112 | - | core.LazyRegister(&xInlineViewSwitcherGLibType, "ADW", "adw_inline_view_switcher_get_type", false) | |
| 113 | 112 | return xInlineViewSwitcherGLibType() | |
| 114 | 113 | } | |
| 115 | 114 | ||
| @@ -123,7 +122,6 @@ var xNewInlineViewSwitcher func() uintptr | |||
| 123 | 122 | ||
| 124 | 123 | // Creates a new `AdwInlineViewSwitcher`. | |
| 125 | 124 | func NewInlineViewSwitcher() *InlineViewSwitcher { | |
| 126 | - | core.LazyRegister(&xNewInlineViewSwitcher, "ADW", "adw_inline_view_switcher_new", false) | |
| 127 | 125 | var cls *InlineViewSwitcher | |
| 128 | 126 | ||
| 129 | 127 | cret := xNewInlineViewSwitcher() | |
| @@ -142,8 +140,6 @@ var xInlineViewSwitcherGetCanShrink func(uintptr) bool | |||
| 142 | 140 | // Gets whether the toggles can be smaller than the natural size of their | |
| 143 | 141 | // contents. | |
| 144 | 142 | func (x *InlineViewSwitcher) GetCanShrink() bool { | |
| 145 | - | core.LazyRegister(&xInlineViewSwitcherGetCanShrink, "ADW", "adw_inline_view_switcher_get_can_shrink", false) | |
| 146 | - | ||
| 147 | 143 | cret := xInlineViewSwitcherGetCanShrink(x.GoPointer()) | |
| 148 | 144 | return cret | |
| 149 | 145 | } | |
| @@ -152,8 +148,6 @@ var xInlineViewSwitcherGetDisplayMode func(uintptr) InlineViewSwitcherDisplayMod | |||
| 152 | 148 | ||
| 153 | 149 | // Gets the display mode of @self. | |
| 154 | 150 | func (x *InlineViewSwitcher) GetDisplayMode() InlineViewSwitcherDisplayMode { | |
| 155 | - | core.LazyRegister(&xInlineViewSwitcherGetDisplayMode, "ADW", "adw_inline_view_switcher_get_display_mode", false) | |
| 156 | - | ||
| 157 | 151 | cret := xInlineViewSwitcherGetDisplayMode(x.GoPointer()) | |
| 158 | 152 | return cret | |
| 159 | 153 | } | |
| @@ -162,8 +156,6 @@ var xInlineViewSwitcherGetHomogeneous func(uintptr) bool | |||
| 162 | 156 | ||
| 163 | 157 | // Gets whether all toggles within @self take the same size. | |
| 164 | 158 | func (x *InlineViewSwitcher) GetHomogeneous() bool { | |
| 165 | - | core.LazyRegister(&xInlineViewSwitcherGetHomogeneous, "ADW", "adw_inline_view_switcher_get_homogeneous", false) | |
| 166 | - | ||
| 167 | 159 | cret := xInlineViewSwitcherGetHomogeneous(x.GoPointer()) | |
| 168 | 160 | return cret | |
| 169 | 161 | } | |
| @@ -172,7 +164,6 @@ var xInlineViewSwitcherGetStack func(uintptr) uintptr | |||
| 172 | 164 | ||
| 173 | 165 | // Gets the stack @self controls. | |
| 174 | 166 | func (x *InlineViewSwitcher) GetStack() *ViewStack { | |
| 175 | - | core.LazyRegister(&xInlineViewSwitcherGetStack, "ADW", "adw_inline_view_switcher_get_stack", false) | |
| 176 | 167 | var cls *ViewStack | |
| 177 | 168 | ||
| 178 | 169 | cret := xInlineViewSwitcherGetStack(x.GoPointer()) | |
| @@ -195,8 +186,6 @@ var xInlineViewSwitcherSetCanShrink func(uintptr, bool) | |||
| 195 | 186 | // | |
| 196 | 187 | // See [property@ToggleGroup:can-shrink]. | |
| 197 | 188 | func (x *InlineViewSwitcher) SetCanShrink(CanShrinkVar bool) { | |
| 198 | - | core.LazyRegister(&xInlineViewSwitcherSetCanShrink, "ADW", "adw_inline_view_switcher_set_can_shrink", false) | |
| 199 | - | ||
| 200 | 189 | xInlineViewSwitcherSetCanShrink(x.GoPointer(), CanShrinkVar) | |
| 201 | 190 | } | |
| 202 | 191 | ||
| @@ -213,8 +202,6 @@ var xInlineViewSwitcherSetDisplayMode func(uintptr, InlineViewSwitcherDisplayMod | |||
| 213 | 202 | // | |
| 214 | 203 | // </picture> | |
| 215 | 204 | func (x *InlineViewSwitcher) SetDisplayMode(ModeVar InlineViewSwitcherDisplayMode) { | |
| 216 | - | core.LazyRegister(&xInlineViewSwitcherSetDisplayMode, "ADW", "adw_inline_view_switcher_set_display_mode", false) | |
| 217 | - | ||
| 218 | 205 | xInlineViewSwitcherSetDisplayMode(x.GoPointer(), ModeVar) | |
| 219 | 206 | } | |
| 220 | 207 | ||
| @@ -222,8 +209,6 @@ var xInlineViewSwitcherSetHomogeneous func(uintptr, bool) | |||
| 222 | 209 | ||
| 223 | 210 | // Sets whether all toggles within @self take the same size. | |
| 224 | 211 | func (x *InlineViewSwitcher) SetHomogeneous(HomogeneousVar bool) { | |
| 225 | - | core.LazyRegister(&xInlineViewSwitcherSetHomogeneous, "ADW", "adw_inline_view_switcher_set_homogeneous", false) | |
| 226 | - | ||
| 227 | 212 | xInlineViewSwitcherSetHomogeneous(x.GoPointer(), HomogeneousVar) | |
| 228 | 213 | } | |
| 229 | 214 | ||
| @@ -231,8 +216,6 @@ var xInlineViewSwitcherSetStack func(uintptr, uintptr) | |||
| 231 | 216 | ||
| 232 | 217 | // Sets the stack to control. | |
| 233 | 218 | func (x *InlineViewSwitcher) SetStack(StackVar *ViewStack) { | |
| 234 | - | core.LazyRegister(&xInlineViewSwitcherSetStack, "ADW", "adw_inline_view_switcher_set_stack", false) | |
| 235 | - | ||
| 236 | 219 | xInlineViewSwitcherSetStack(x.GoPointer(), StackVar.GoPointer()) | |
| 237 | 220 | } | |
| 238 | 221 | ||
| @@ -563,4 +546,27 @@ func (x *InlineViewSwitcher) SetOrientation(OrientationVar gtk.Orientation) { | |||
| 563 | 546 | func init() { | |
| 564 | 547 | core.SetPackageName("ADW", "libadwaita-1") | |
| 565 | 548 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | |
| 549 | + | var libs []uintptr | |
| 550 | + | for _, libPath := range core.GetPaths("ADW") { | |
| 551 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 552 | + | if err != nil { | |
| 553 | + | panic(err) | |
| 554 | + | } | |
| 555 | + | libs = append(libs, lib) | |
| 556 | + | } | |
| 557 | + | ||
| 558 | + | core.PuregoSafeRegister(&xInlineViewSwitcherDisplayModeGLibType, libs, "adw_inline_view_switcher_display_mode_get_type") | |
| 559 | + | ||
| 560 | + | core.PuregoSafeRegister(&xInlineViewSwitcherGLibType, libs, "adw_inline_view_switcher_get_type") | |
| 561 | + | ||
| 562 | + | core.PuregoSafeRegister(&xNewInlineViewSwitcher, libs, "adw_inline_view_switcher_new") | |
| 563 | + | ||
| 564 | + | core.PuregoSafeRegister(&xInlineViewSwitcherGetCanShrink, libs, "adw_inline_view_switcher_get_can_shrink") | |
| 565 | + | core.PuregoSafeRegister(&xInlineViewSwitcherGetDisplayMode, libs, "adw_inline_view_switcher_get_display_mode") | |
| 566 | + | core.PuregoSafeRegister(&xInlineViewSwitcherGetHomogeneous, libs, "adw_inline_view_switcher_get_homogeneous") | |
| 567 | + | core.PuregoSafeRegister(&xInlineViewSwitcherGetStack, libs, "adw_inline_view_switcher_get_stack") | |
| 568 | + | core.PuregoSafeRegister(&xInlineViewSwitcherSetCanShrink, libs, "adw_inline_view_switcher_set_can_shrink") | |
| 569 | + | core.PuregoSafeRegister(&xInlineViewSwitcherSetDisplayMode, libs, "adw_inline_view_switcher_set_display_mode") | |
| 570 | + | core.PuregoSafeRegister(&xInlineViewSwitcherSetHomogeneous, libs, "adw_inline_view_switcher_set_homogeneous") | |
| 571 | + | core.PuregoSafeRegister(&xInlineViewSwitcherSetStack, libs, "adw_inline_view_switcher_set_stack") | |
| 566 | 572 | } | |
| @@ -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" | ||
| @@ -42,7 +43,6 @@ type InlineViewSwitcherDisplayMode int | |||||
| 42 | var xInlineViewSwitcherDisplayModeGLibType func() types.GType | 43 | var xInlineViewSwitcherDisplayModeGLibType func() types.GType | ||
| 43 | 44 | ||||
| 44 | func InlineViewSwitcherDisplayModeGLibType() types.GType { | 45 | func InlineViewSwitcherDisplayModeGLibType() types.GType { | ||
| 45 | - | core.LazyRegister(&xInlineViewSwitcherDisplayModeGLibType, "ADW", "adw_inline_view_switcher_display_mode_get_type", false) | |||
| 46 | return xInlineViewSwitcherDisplayModeGLibType() | 46 | return xInlineViewSwitcherDisplayModeGLibType() | ||
| 47 | } | 47 | } | ||
| 48 | 48 | ||||
| @@ -109,7 +109,6 @@ type InlineViewSwitcher struct { | |||||
| 109 | var xInlineViewSwitcherGLibType func() types.GType | 109 | var xInlineViewSwitcherGLibType func() types.GType | ||
| 110 | 110 | ||||
| 111 | func InlineViewSwitcherGLibType() types.GType { | 111 | func InlineViewSwitcherGLibType() types.GType { | ||
| 112 | - | core.LazyRegister(&xInlineViewSwitcherGLibType, "ADW", "adw_inline_view_switcher_get_type", false) | |||
| 113 | return xInlineViewSwitcherGLibType() | 112 | return xInlineViewSwitcherGLibType() | ||
| 114 | } | 113 | } | ||
| 115 | 114 | ||||
| @@ -123,7 +122,6 @@ var xNewInlineViewSwitcher func() uintptr | |||||
| 123 | 122 | ||||
| 124 | // Creates a new `AdwInlineViewSwitcher`. | 123 | // Creates a new `AdwInlineViewSwitcher`. | ||
| 125 | func NewInlineViewSwitcher() *InlineViewSwitcher { | 124 | func NewInlineViewSwitcher() *InlineViewSwitcher { | ||
| 126 | - | core.LazyRegister(&xNewInlineViewSwitcher, "ADW", "adw_inline_view_switcher_new", false) | |||
| 127 | var cls *InlineViewSwitcher | 125 | var cls *InlineViewSwitcher | ||
| 128 | 126 | ||||
| 129 | cret := xNewInlineViewSwitcher() | 127 | cret := xNewInlineViewSwitcher() | ||
| @@ -142,8 +140,6 @@ var xInlineViewSwitcherGetCanShrink func(uintptr) bool | |||||
| 142 | // Gets whether the toggles can be smaller than the natural size of their | 140 | // Gets whether the toggles can be smaller than the natural size of their | ||
| 143 | // contents. | 141 | // contents. | ||
| 144 | func (x *InlineViewSwitcher) GetCanShrink() bool { | 142 | func (x *InlineViewSwitcher) GetCanShrink() bool { | ||
| 145 | - | core.LazyRegister(&xInlineViewSwitcherGetCanShrink, "ADW", "adw_inline_view_switcher_get_can_shrink", false) | |||
| 146 | - | ||||
| 147 | cret := xInlineViewSwitcherGetCanShrink(x.GoPointer()) | 143 | cret := xInlineViewSwitcherGetCanShrink(x.GoPointer()) | ||
| 148 | return cret | 144 | return cret | ||
| 149 | } | 145 | } | ||
| @@ -152,8 +148,6 @@ var xInlineViewSwitcherGetDisplayMode func(uintptr) InlineViewSwitcherDisplayMod | |||||
| 152 | 148 | ||||
| 153 | // Gets the display mode of @self. | 149 | // Gets the display mode of @self. | ||
| 154 | func (x *InlineViewSwitcher) GetDisplayMode() InlineViewSwitcherDisplayMode { | 150 | func (x *InlineViewSwitcher) GetDisplayMode() InlineViewSwitcherDisplayMode { | ||
| 155 | - | core.LazyRegister(&xInlineViewSwitcherGetDisplayMode, "ADW", "adw_inline_view_switcher_get_display_mode", false) | |||
| 156 | - | ||||
| 157 | cret := xInlineViewSwitcherGetDisplayMode(x.GoPointer()) | 151 | cret := xInlineViewSwitcherGetDisplayMode(x.GoPointer()) | ||
| 158 | return cret | 152 | return cret | ||
| 159 | } | 153 | } | ||
| @@ -162,8 +156,6 @@ var xInlineViewSwitcherGetHomogeneous func(uintptr) bool | |||||
| 162 | 156 | ||||
| 163 | // Gets whether all toggles within @self take the same size. | 157 | // Gets whether all toggles within @self take the same size. | ||
| 164 | func (x *InlineViewSwitcher) GetHomogeneous() bool { | 158 | func (x *InlineViewSwitcher) GetHomogeneous() bool { | ||
| 165 | - | core.LazyRegister(&xInlineViewSwitcherGetHomogeneous, "ADW", "adw_inline_view_switcher_get_homogeneous", false) | |||
| 166 | - | ||||
| 167 | cret := xInlineViewSwitcherGetHomogeneous(x.GoPointer()) | 159 | cret := xInlineViewSwitcherGetHomogeneous(x.GoPointer()) | ||
| 168 | return cret | 160 | return cret | ||
| 169 | } | 161 | } | ||
| @@ -172,7 +164,6 @@ var xInlineViewSwitcherGetStack func(uintptr) uintptr | |||||
| 172 | 164 | ||||
| 173 | // Gets the stack @self controls. | 165 | // Gets the stack @self controls. | ||
| 174 | func (x *InlineViewSwitcher) GetStack() *ViewStack { | 166 | func (x *InlineViewSwitcher) GetStack() *ViewStack { | ||
| 175 | - | core.LazyRegister(&xInlineViewSwitcherGetStack, "ADW", "adw_inline_view_switcher_get_stack", false) | |||
| 176 | var cls *ViewStack | 167 | var cls *ViewStack | ||
| 177 | 168 | ||||
| 178 | cret := xInlineViewSwitcherGetStack(x.GoPointer()) | 169 | cret := xInlineViewSwitcherGetStack(x.GoPointer()) | ||
| @@ -195,8 +186,6 @@ var xInlineViewSwitcherSetCanShrink func(uintptr, bool) | |||||
| 195 | // | 186 | // | ||
| 196 | // See [property@ToggleGroup:can-shrink]. | 187 | // See [property@ToggleGroup:can-shrink]. | ||
| 197 | func (x *InlineViewSwitcher) SetCanShrink(CanShrinkVar bool) { | 188 | func (x *InlineViewSwitcher) SetCanShrink(CanShrinkVar bool) { | ||
| 198 | - | core.LazyRegister(&xInlineViewSwitcherSetCanShrink, "ADW", "adw_inline_view_switcher_set_can_shrink", false) | |||
| 199 | - | ||||
| 200 | xInlineViewSwitcherSetCanShrink(x.GoPointer(), CanShrinkVar) | 189 | xInlineViewSwitcherSetCanShrink(x.GoPointer(), CanShrinkVar) | ||
| 201 | } | 190 | } | ||
| 202 | 191 | ||||
| @@ -213,8 +202,6 @@ var xInlineViewSwitcherSetDisplayMode func(uintptr, InlineViewSwitcherDisplayMod | |||||
| 213 | // | 202 | // | ||
| 214 | // </picture> | 203 | // </picture> | ||
| 215 | func (x *InlineViewSwitcher) SetDisplayMode(ModeVar InlineViewSwitcherDisplayMode) { | 204 | func (x *InlineViewSwitcher) SetDisplayMode(ModeVar InlineViewSwitcherDisplayMode) { | ||
| 216 | - | core.LazyRegister(&xInlineViewSwitcherSetDisplayMode, "ADW", "adw_inline_view_switcher_set_display_mode", false) | |||
| 217 | - | ||||
| 218 | xInlineViewSwitcherSetDisplayMode(x.GoPointer(), ModeVar) | 205 | xInlineViewSwitcherSetDisplayMode(x.GoPointer(), ModeVar) | ||
| 219 | } | 206 | } | ||
| 220 | 207 | ||||
| @@ -222,8 +209,6 @@ var xInlineViewSwitcherSetHomogeneous func(uintptr, bool) | |||||
| 222 | 209 | ||||
| 223 | // Sets whether all toggles within @self take the same size. | 210 | // Sets whether all toggles within @self take the same size. | ||
| 224 | func (x *InlineViewSwitcher) SetHomogeneous(HomogeneousVar bool) { | 211 | func (x *InlineViewSwitcher) SetHomogeneous(HomogeneousVar bool) { | ||
| 225 | - | core.LazyRegister(&xInlineViewSwitcherSetHomogeneous, "ADW", "adw_inline_view_switcher_set_homogeneous", false) | |||
| 226 | - | ||||
| 227 | xInlineViewSwitcherSetHomogeneous(x.GoPointer(), HomogeneousVar) | 212 | xInlineViewSwitcherSetHomogeneous(x.GoPointer(), HomogeneousVar) | ||
| 228 | } | 213 | } | ||
| 229 | 214 | ||||
| @@ -231,8 +216,6 @@ var xInlineViewSwitcherSetStack func(uintptr, uintptr) | |||||
| 231 | 216 | ||||
| 232 | // Sets the stack to control. | 217 | // Sets the stack to control. | ||
| 233 | func (x *InlineViewSwitcher) SetStack(StackVar *ViewStack) { | 218 | func (x *InlineViewSwitcher) SetStack(StackVar *ViewStack) { | ||
| 234 | - | core.LazyRegister(&xInlineViewSwitcherSetStack, "ADW", "adw_inline_view_switcher_set_stack", false) | |||
| 235 | - | ||||
| 236 | xInlineViewSwitcherSetStack(x.GoPointer(), StackVar.GoPointer()) | 219 | xInlineViewSwitcherSetStack(x.GoPointer(), StackVar.GoPointer()) | ||
| 237 | } | 220 | } | ||
| 238 | 221 | ||||
| @@ -563,4 +546,27 @@ func (x *InlineViewSwitcher) SetOrientation(OrientationVar gtk.Orientation) { | |||||
| 563 | func init() { | 546 | func init() { | ||
| 564 | core.SetPackageName("ADW", "libadwaita-1") | 547 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 565 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 548 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | ||
| 549 | + | var libs []uintptr | |||
| 550 | + | for _, libPath := range core.GetPaths("ADW") { | |||
| 551 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 552 | + | if err != nil { | |||
| 553 | + | panic(err) | |||
| 554 | + | } | |||
| 555 | + | libs = append(libs, lib) | |||
| 556 | + | } | |||
| 557 | + | ||||
| 558 | + | core.PuregoSafeRegister(&xInlineViewSwitcherDisplayModeGLibType, libs, "adw_inline_view_switcher_display_mode_get_type") | |||
| 559 | + | ||||
| 560 | + | core.PuregoSafeRegister(&xInlineViewSwitcherGLibType, libs, "adw_inline_view_switcher_get_type") | |||
| 561 | + | ||||
| 562 | + | core.PuregoSafeRegister(&xNewInlineViewSwitcher, libs, "adw_inline_view_switcher_new") | |||
| 563 | + | ||||
| 564 | + | core.PuregoSafeRegister(&xInlineViewSwitcherGetCanShrink, libs, "adw_inline_view_switcher_get_can_shrink") | |||
| 565 | + | core.PuregoSafeRegister(&xInlineViewSwitcherGetDisplayMode, libs, "adw_inline_view_switcher_get_display_mode") | |||
| 566 | + | core.PuregoSafeRegister(&xInlineViewSwitcherGetHomogeneous, libs, "adw_inline_view_switcher_get_homogeneous") | |||
| 567 | + | core.PuregoSafeRegister(&xInlineViewSwitcherGetStack, libs, "adw_inline_view_switcher_get_stack") | |||
| 568 | + | core.PuregoSafeRegister(&xInlineViewSwitcherSetCanShrink, libs, "adw_inline_view_switcher_set_can_shrink") | |||
| 569 | + | core.PuregoSafeRegister(&xInlineViewSwitcherSetDisplayMode, libs, "adw_inline_view_switcher_set_display_mode") | |||
| 570 | + | core.PuregoSafeRegister(&xInlineViewSwitcherSetHomogeneous, libs, "adw_inline_view_switcher_set_homogeneous") | |||
| 571 | + | core.PuregoSafeRegister(&xInlineViewSwitcherSetStack, libs, "adw_inline_view_switcher_set_stack") | |||
| 566 | } | 572 | } | ||