fix(deps): repin puregotk lazy registration fix
- commit
- d685b6e820d6baba0d0dea254169664012ed203d
- author
- brice · · 2026-07-14 18:24 UTC
- parent
- ec6db2e
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
907 files · +27874 -25294
M go.mod +3 -1
| @@ -11,7 +11,7 @@ require ( | |||
| 11 | 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | |
| 12 | 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | |
| 13 | 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | |
| 14 | - | github.com/bnema/puregotk v0.7.0 | |
| 14 | + | github.com/bnema/puregotk v0.7.1-0.20260714181430-679a9ed72959 | |
| 15 | 15 | github.com/charmbracelet/bubbles v1.0.0 | |
| 16 | 16 | github.com/charmbracelet/bubbletea v1.3.10 | |
| 17 | 17 | github.com/charmbracelet/lipgloss v1.1.0 | |
| @@ -47,6 +47,7 @@ require ( | |||
| 47 | 47 | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect | |
| 48 | 48 | github.com/fatih/color v1.19.0 // indirect | |
| 49 | 49 | github.com/go-viper/mapstructure/v2 v2.5.0 // indirect | |
| 50 | + | github.com/google/go-cmp v0.7.0 // indirect | |
| 50 | 51 | github.com/inconshreveable/mousetrap v1.1.0 // indirect | |
| 51 | 52 | github.com/lucasb-eyer/go-colorful v1.4.0 // indirect | |
| 52 | 53 | github.com/mattn/go-colorable v0.1.14 // indirect | |
| @@ -80,6 +81,7 @@ require ( | |||
| 80 | 81 | golang.org/x/text v0.40.0 // indirect | |
| 81 | 82 | golang.org/x/tools v0.47.0 // indirect | |
| 82 | 83 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | |
| 84 | + | mvdan.cc/gofumpt v0.9.2 // indirect | |
| 83 | 85 | ) | |
| 84 | 86 | ||
| 85 | 87 | tool github.com/a-h/templ/cmd/templ | |
| @@ -11,7 +11,7 @@ require ( | |||||
| 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | ||
| 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | ||
| 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | ||
| 14 | - | github.com/bnema/puregotk v0.7.0 | 14 | + | github.com/bnema/puregotk v0.7.1-0.20260714181430-679a9ed72959 |
| 15 | github.com/charmbracelet/bubbles v1.0.0 | 15 | github.com/charmbracelet/bubbles v1.0.0 | ||
| 16 | github.com/charmbracelet/bubbletea v1.3.10 | 16 | github.com/charmbracelet/bubbletea v1.3.10 | ||
| 17 | github.com/charmbracelet/lipgloss v1.1.0 | 17 | github.com/charmbracelet/lipgloss v1.1.0 | ||
| @@ -47,6 +47,7 @@ require ( | |||||
| 47 | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect | 47 | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect | ||
| 48 | github.com/fatih/color v1.19.0 // indirect | 48 | github.com/fatih/color v1.19.0 // indirect | ||
| 49 | github.com/go-viper/mapstructure/v2 v2.5.0 // indirect | 49 | github.com/go-viper/mapstructure/v2 v2.5.0 // indirect | ||
| 50 | + | github.com/google/go-cmp v0.7.0 // indirect | |||
| 50 | github.com/inconshreveable/mousetrap v1.1.0 // indirect | 51 | github.com/inconshreveable/mousetrap v1.1.0 // indirect | ||
| 51 | github.com/lucasb-eyer/go-colorful v1.4.0 // indirect | 52 | github.com/lucasb-eyer/go-colorful v1.4.0 // indirect | ||
| 52 | github.com/mattn/go-colorable v0.1.14 // indirect | 53 | github.com/mattn/go-colorable v0.1.14 // indirect | ||
| @@ -80,6 +81,7 @@ require ( | |||||
| 80 | golang.org/x/text v0.40.0 // indirect | 81 | golang.org/x/text v0.40.0 // indirect | ||
| 81 | golang.org/x/tools v0.47.0 // indirect | 82 | golang.org/x/tools v0.47.0 // indirect | ||
| 82 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | 83 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | ||
| 84 | + | mvdan.cc/gofumpt v0.9.2 // indirect | |||
| 83 | ) | 85 | ) | ||
| 84 | 86 | ||||
| 85 | tool github.com/a-h/templ/cmd/templ | 87 | tool github.com/a-h/templ/cmd/templ | ||
M go.sum +4 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/internal/core/core.go +197 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/pkg/core/core.go +10 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-dialog.go +99 -64 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-window.go +95 -62 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-accent-color.go +7 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-action-row.go +33 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-alert-dialog.go +66 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-target.go +10 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-util.go +4 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation.go +24 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application-window.go +14 -22
| @@ -5,7 +5,6 @@ import ( | |||
| 5 | 5 | "structs" | |
| 6 | 6 | "unsafe" | |
| 7 | 7 | ||
| 8 | - | "github.com/bnema/purego" | |
| 9 | 8 | "github.com/bnema/puregotk/pkg/core" | |
| 10 | 9 | "github.com/bnema/puregotk/v4/gdk" | |
| 11 | 10 | "github.com/bnema/puregotk/v4/gio" | |
| @@ -78,6 +77,7 @@ type ApplicationWindow struct { | |||
| 78 | 77 | var xApplicationWindowGLibType func() types.GType | |
| 79 | 78 | ||
| 80 | 79 | func ApplicationWindowGLibType() types.GType { | |
| 80 | + | core.LazyRegister(&xApplicationWindowGLibType, "ADW", "adw_application_window_get_type", false) | |
| 81 | 81 | return xApplicationWindowGLibType() | |
| 82 | 82 | } | |
| 83 | 83 | ||
| @@ -91,6 +91,7 @@ var xNewApplicationWindow func(uintptr) uintptr | |||
| 91 | 91 | ||
| 92 | 92 | // Creates a new `AdwApplicationWindow` for @app. | |
| 93 | 93 | func NewApplicationWindow(AppVar *gtk.Application) *ApplicationWindow { | |
| 94 | + | core.LazyRegister(&xNewApplicationWindow, "ADW", "adw_application_window_new", false) | |
| 94 | 95 | var cls *ApplicationWindow | |
| 95 | 96 | ||
| 96 | 97 | cret := xNewApplicationWindow(AppVar.GoPointer()) | |
| @@ -108,6 +109,8 @@ var xApplicationWindowAddBreakpoint func(uintptr, uintptr) | |||
| 108 | 109 | ||
| 109 | 110 | // Adds @breakpoint to @self. | |
| 110 | 111 | func (x *ApplicationWindow) AddBreakpoint(BreakpointVar *Breakpoint) { | |
| 112 | + | core.LazyRegister(&xApplicationWindowAddBreakpoint, "ADW", "adw_application_window_add_breakpoint", false) | |
| 113 | + | ||
| 111 | 114 | xApplicationWindowAddBreakpoint(x.GoPointer(), BreakpointVar.GoPointer()) | |
| 112 | 115 | } | |
| 113 | 116 | ||
| @@ -115,6 +118,8 @@ var xApplicationWindowGetAdaptivePreview func(uintptr) bool | |||
| 115 | 118 | ||
| 116 | 119 | // Gets whether adaptive preview for @self is currently open. | |
| 117 | 120 | func (x *ApplicationWindow) GetAdaptivePreview() bool { | |
| 121 | + | core.LazyRegister(&xApplicationWindowGetAdaptivePreview, "ADW", "adw_application_window_get_adaptive_preview", false) | |
| 122 | + | ||
| 118 | 123 | cret := xApplicationWindowGetAdaptivePreview(x.GoPointer()) | |
| 119 | 124 | return cret | |
| 120 | 125 | } | |
| @@ -125,6 +130,7 @@ var xApplicationWindowGetContent func(uintptr) uintptr | |||
| 125 | 130 | // | |
| 126 | 131 | // This method should always be used instead of [method@Gtk.Window.get_child]. | |
| 127 | 132 | func (x *ApplicationWindow) GetContent() *gtk.Widget { | |
| 133 | + | core.LazyRegister(&xApplicationWindowGetContent, "ADW", "adw_application_window_get_content", false) | |
| 128 | 134 | var cls *gtk.Widget | |
| 129 | 135 | ||
| 130 | 136 | cret := xApplicationWindowGetContent(x.GoPointer()) | |
| @@ -142,6 +148,7 @@ var xApplicationWindowGetCurrentBreakpoint func(uintptr) uintptr | |||
| 142 | 148 | ||
| 143 | 149 | // Gets the current breakpoint. | |
| 144 | 150 | func (x *ApplicationWindow) GetCurrentBreakpoint() *Breakpoint { | |
| 151 | + | core.LazyRegister(&xApplicationWindowGetCurrentBreakpoint, "ADW", "adw_application_window_get_current_breakpoint", false) | |
| 145 | 152 | var cls *Breakpoint | |
| 146 | 153 | ||
| 147 | 154 | cret := xApplicationWindowGetCurrentBreakpoint(x.GoPointer()) | |
| @@ -161,6 +168,7 @@ var xApplicationWindowGetDialogs func(uintptr) uintptr | |||
| 161 | 168 | // | |
| 162 | 169 | // This can be used to keep an up-to-date view. | |
| 163 | 170 | func (x *ApplicationWindow) GetDialogs() *gio.ListModelBase { | |
| 171 | + | core.LazyRegister(&xApplicationWindowGetDialogs, "ADW", "adw_application_window_get_dialogs", false) | |
| 164 | 172 | var cls *gio.ListModelBase | |
| 165 | 173 | ||
| 166 | 174 | cret := xApplicationWindowGetDialogs(x.GoPointer()) | |
| @@ -177,6 +185,7 @@ var xApplicationWindowGetVisibleDialog func(uintptr) uintptr | |||
| 177 | 185 | ||
| 178 | 186 | // Returns the currently visible dialog in @self, if there's one. | |
| 179 | 187 | func (x *ApplicationWindow) GetVisibleDialog() *Dialog { | |
| 188 | + | core.LazyRegister(&xApplicationWindowGetVisibleDialog, "ADW", "adw_application_window_get_visible_dialog", false) | |
| 180 | 189 | var cls *Dialog | |
| 181 | 190 | ||
| 182 | 191 | cret := xApplicationWindowGetVisibleDialog(x.GoPointer()) | |
| @@ -202,6 +211,8 @@ var xApplicationWindowSetAdaptivePreview func(uintptr, bool) | |||
| 202 | 211 | // | |
| 203 | 212 | // Most applications should not use this function. | |
| 204 | 213 | func (x *ApplicationWindow) SetAdaptivePreview(AdaptivePreviewVar bool) { | |
| 214 | + | core.LazyRegister(&xApplicationWindowSetAdaptivePreview, "ADW", "adw_application_window_set_adaptive_preview", false) | |
| 215 | + | ||
| 205 | 216 | xApplicationWindowSetAdaptivePreview(x.GoPointer(), AdaptivePreviewVar) | |
| 206 | 217 | } | |
| 207 | 218 | ||
| @@ -211,6 +222,8 @@ var xApplicationWindowSetContent func(uintptr, uintptr) | |||
| 211 | 222 | // | |
| 212 | 223 | // This method should always be used instead of [method@Gtk.Window.set_child]. | |
| 213 | 224 | func (x *ApplicationWindow) SetContent(ContentVar *gtk.Widget) { | |
| 225 | + | core.LazyRegister(&xApplicationWindowSetContent, "ADW", "adw_application_window_set_content", false) | |
| 226 | + | ||
| 214 | 227 | xApplicationWindowSetContent(x.GoPointer(), ContentVar.GoPointer()) | |
| 215 | 228 | } | |
| 216 | 229 | ||
| @@ -953,25 +966,4 @@ func (x *ApplicationWindow) SetFocus(FocusVar *gtk.Widget) { | |||
| 953 | 966 | func init() { | |
| 954 | 967 | core.SetPackageName("ADW", "libadwaita-1") | |
| 955 | 968 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | |
| 956 | - | var libs []uintptr | |
| 957 | - | for _, libPath := range core.GetPaths("ADW") { | |
| 958 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 959 | - | if err != nil { | |
| 960 | - | panic(err) | |
| 961 | - | } | |
| 962 | - | libs = append(libs, lib) | |
| 963 | - | } | |
| 964 | - | ||
| 965 | - | core.PuregoSafeRegister(&xApplicationWindowGLibType, libs, "adw_application_window_get_type") | |
| 966 | - | ||
| 967 | - | core.PuregoSafeRegister(&xNewApplicationWindow, libs, "adw_application_window_new") | |
| 968 | - | ||
| 969 | - | core.PuregoSafeRegister(&xApplicationWindowAddBreakpoint, libs, "adw_application_window_add_breakpoint") | |
| 970 | - | core.PuregoSafeRegister(&xApplicationWindowGetAdaptivePreview, libs, "adw_application_window_get_adaptive_preview") | |
| 971 | - | core.PuregoSafeRegister(&xApplicationWindowGetContent, libs, "adw_application_window_get_content") | |
| 972 | - | core.PuregoSafeRegister(&xApplicationWindowGetCurrentBreakpoint, libs, "adw_application_window_get_current_breakpoint") | |
| 973 | - | core.PuregoSafeRegister(&xApplicationWindowGetDialogs, libs, "adw_application_window_get_dialogs") | |
| 974 | - | core.PuregoSafeRegister(&xApplicationWindowGetVisibleDialog, libs, "adw_application_window_get_visible_dialog") | |
| 975 | - | core.PuregoSafeRegister(&xApplicationWindowSetAdaptivePreview, libs, "adw_application_window_set_adaptive_preview") | |
| 976 | - | core.PuregoSafeRegister(&xApplicationWindowSetContent, libs, "adw_application_window_set_content") | |
| 977 | 969 | } | |
| @@ -5,7 +5,6 @@ import ( | |||||
| 5 | "structs" | 5 | "structs" | ||
| 6 | "unsafe" | 6 | "unsafe" | ||
| 7 | 7 | ||||
| 8 | - | "github.com/bnema/purego" | |||
| 9 | "github.com/bnema/puregotk/pkg/core" | 8 | "github.com/bnema/puregotk/pkg/core" | ||
| 10 | "github.com/bnema/puregotk/v4/gdk" | 9 | "github.com/bnema/puregotk/v4/gdk" | ||
| 11 | "github.com/bnema/puregotk/v4/gio" | 10 | "github.com/bnema/puregotk/v4/gio" | ||
| @@ -78,6 +77,7 @@ type ApplicationWindow struct { | |||||
| 78 | var xApplicationWindowGLibType func() types.GType | 77 | var xApplicationWindowGLibType func() types.GType | ||
| 79 | 78 | ||||
| 80 | func ApplicationWindowGLibType() types.GType { | 79 | func ApplicationWindowGLibType() types.GType { | ||
| 80 | + | core.LazyRegister(&xApplicationWindowGLibType, "ADW", "adw_application_window_get_type", false) | |||
| 81 | return xApplicationWindowGLibType() | 81 | return xApplicationWindowGLibType() | ||
| 82 | } | 82 | } | ||
| 83 | 83 | ||||
| @@ -91,6 +91,7 @@ var xNewApplicationWindow func(uintptr) uintptr | |||||
| 91 | 91 | ||||
| 92 | // Creates a new `AdwApplicationWindow` for @app. | 92 | // Creates a new `AdwApplicationWindow` for @app. | ||
| 93 | func NewApplicationWindow(AppVar *gtk.Application) *ApplicationWindow { | 93 | func NewApplicationWindow(AppVar *gtk.Application) *ApplicationWindow { | ||
| 94 | + | core.LazyRegister(&xNewApplicationWindow, "ADW", "adw_application_window_new", false) | |||
| 94 | var cls *ApplicationWindow | 95 | var cls *ApplicationWindow | ||
| 95 | 96 | ||||
| 96 | cret := xNewApplicationWindow(AppVar.GoPointer()) | 97 | cret := xNewApplicationWindow(AppVar.GoPointer()) | ||
| @@ -108,6 +109,8 @@ var xApplicationWindowAddBreakpoint func(uintptr, uintptr) | |||||
| 108 | 109 | ||||
| 109 | // Adds @breakpoint to @self. | 110 | // Adds @breakpoint to @self. | ||
| 110 | func (x *ApplicationWindow) AddBreakpoint(BreakpointVar *Breakpoint) { | 111 | func (x *ApplicationWindow) AddBreakpoint(BreakpointVar *Breakpoint) { | ||
| 112 | + | core.LazyRegister(&xApplicationWindowAddBreakpoint, "ADW", "adw_application_window_add_breakpoint", false) | |||
| 113 | + | ||||
| 111 | xApplicationWindowAddBreakpoint(x.GoPointer(), BreakpointVar.GoPointer()) | 114 | xApplicationWindowAddBreakpoint(x.GoPointer(), BreakpointVar.GoPointer()) | ||
| 112 | } | 115 | } | ||
| 113 | 116 | ||||
| @@ -115,6 +118,8 @@ var xApplicationWindowGetAdaptivePreview func(uintptr) bool | |||||
| 115 | 118 | ||||
| 116 | // Gets whether adaptive preview for @self is currently open. | 119 | // Gets whether adaptive preview for @self is currently open. | ||
| 117 | func (x *ApplicationWindow) GetAdaptivePreview() bool { | 120 | func (x *ApplicationWindow) GetAdaptivePreview() bool { | ||
| 121 | + | core.LazyRegister(&xApplicationWindowGetAdaptivePreview, "ADW", "adw_application_window_get_adaptive_preview", false) | |||
| 122 | + | ||||
| 118 | cret := xApplicationWindowGetAdaptivePreview(x.GoPointer()) | 123 | cret := xApplicationWindowGetAdaptivePreview(x.GoPointer()) | ||
| 119 | return cret | 124 | return cret | ||
| 120 | } | 125 | } | ||
| @@ -125,6 +130,7 @@ var xApplicationWindowGetContent func(uintptr) uintptr | |||||
| 125 | // | 130 | // | ||
| 126 | // This method should always be used instead of [method@Gtk.Window.get_child]. | 131 | // This method should always be used instead of [method@Gtk.Window.get_child]. | ||
| 127 | func (x *ApplicationWindow) GetContent() *gtk.Widget { | 132 | func (x *ApplicationWindow) GetContent() *gtk.Widget { | ||
| 133 | + | core.LazyRegister(&xApplicationWindowGetContent, "ADW", "adw_application_window_get_content", false) | |||
| 128 | var cls *gtk.Widget | 134 | var cls *gtk.Widget | ||
| 129 | 135 | ||||
| 130 | cret := xApplicationWindowGetContent(x.GoPointer()) | 136 | cret := xApplicationWindowGetContent(x.GoPointer()) | ||
| @@ -142,6 +148,7 @@ var xApplicationWindowGetCurrentBreakpoint func(uintptr) uintptr | |||||
| 142 | 148 | ||||
| 143 | // Gets the current breakpoint. | 149 | // Gets the current breakpoint. | ||
| 144 | func (x *ApplicationWindow) GetCurrentBreakpoint() *Breakpoint { | 150 | func (x *ApplicationWindow) GetCurrentBreakpoint() *Breakpoint { | ||
| 151 | + | core.LazyRegister(&xApplicationWindowGetCurrentBreakpoint, "ADW", "adw_application_window_get_current_breakpoint", false) | |||
| 145 | var cls *Breakpoint | 152 | var cls *Breakpoint | ||
| 146 | 153 | ||||
| 147 | cret := xApplicationWindowGetCurrentBreakpoint(x.GoPointer()) | 154 | cret := xApplicationWindowGetCurrentBreakpoint(x.GoPointer()) | ||
| @@ -161,6 +168,7 @@ var xApplicationWindowGetDialogs func(uintptr) uintptr | |||||
| 161 | // | 168 | // | ||
| 162 | // This can be used to keep an up-to-date view. | 169 | // This can be used to keep an up-to-date view. | ||
| 163 | func (x *ApplicationWindow) GetDialogs() *gio.ListModelBase { | 170 | func (x *ApplicationWindow) GetDialogs() *gio.ListModelBase { | ||
| 171 | + | core.LazyRegister(&xApplicationWindowGetDialogs, "ADW", "adw_application_window_get_dialogs", false) | |||
| 164 | var cls *gio.ListModelBase | 172 | var cls *gio.ListModelBase | ||
| 165 | 173 | ||||
| 166 | cret := xApplicationWindowGetDialogs(x.GoPointer()) | 174 | cret := xApplicationWindowGetDialogs(x.GoPointer()) | ||
| @@ -177,6 +185,7 @@ var xApplicationWindowGetVisibleDialog func(uintptr) uintptr | |||||
| 177 | 185 | ||||
| 178 | // Returns the currently visible dialog in @self, if there's one. | 186 | // Returns the currently visible dialog in @self, if there's one. | ||
| 179 | func (x *ApplicationWindow) GetVisibleDialog() *Dialog { | 187 | func (x *ApplicationWindow) GetVisibleDialog() *Dialog { | ||
| 188 | + | core.LazyRegister(&xApplicationWindowGetVisibleDialog, "ADW", "adw_application_window_get_visible_dialog", false) | |||
| 180 | var cls *Dialog | 189 | var cls *Dialog | ||
| 181 | 190 | ||||
| 182 | cret := xApplicationWindowGetVisibleDialog(x.GoPointer()) | 191 | cret := xApplicationWindowGetVisibleDialog(x.GoPointer()) | ||
| @@ -202,6 +211,8 @@ var xApplicationWindowSetAdaptivePreview func(uintptr, bool) | |||||
| 202 | // | 211 | // | ||
| 203 | // Most applications should not use this function. | 212 | // Most applications should not use this function. | ||
| 204 | func (x *ApplicationWindow) SetAdaptivePreview(AdaptivePreviewVar bool) { | 213 | func (x *ApplicationWindow) SetAdaptivePreview(AdaptivePreviewVar bool) { | ||
| 214 | + | core.LazyRegister(&xApplicationWindowSetAdaptivePreview, "ADW", "adw_application_window_set_adaptive_preview", false) | |||
| 215 | + | ||||
| 205 | xApplicationWindowSetAdaptivePreview(x.GoPointer(), AdaptivePreviewVar) | 216 | xApplicationWindowSetAdaptivePreview(x.GoPointer(), AdaptivePreviewVar) | ||
| 206 | } | 217 | } | ||
| 207 | 218 | ||||
| @@ -211,6 +222,8 @@ var xApplicationWindowSetContent func(uintptr, uintptr) | |||||
| 211 | // | 222 | // | ||
| 212 | // This method should always be used instead of [method@Gtk.Window.set_child]. | 223 | // This method should always be used instead of [method@Gtk.Window.set_child]. | ||
| 213 | func (x *ApplicationWindow) SetContent(ContentVar *gtk.Widget) { | 224 | func (x *ApplicationWindow) SetContent(ContentVar *gtk.Widget) { | ||
| 225 | + | core.LazyRegister(&xApplicationWindowSetContent, "ADW", "adw_application_window_set_content", false) | |||
| 226 | + | ||||
| 214 | xApplicationWindowSetContent(x.GoPointer(), ContentVar.GoPointer()) | 227 | xApplicationWindowSetContent(x.GoPointer(), ContentVar.GoPointer()) | ||
| 215 | } | 228 | } | ||
| 216 | 229 | ||||
| @@ -953,25 +966,4 @@ func (x *ApplicationWindow) SetFocus(FocusVar *gtk.Widget) { | |||||
| 953 | func init() { | 966 | func init() { | ||
| 954 | core.SetPackageName("ADW", "libadwaita-1") | 967 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 955 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 968 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | ||
| 956 | - | var libs []uintptr | |||
| 957 | - | for _, libPath := range core.GetPaths("ADW") { | |||
| 958 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 959 | - | if err != nil { | |||
| 960 | - | panic(err) | |||
| 961 | - | } | |||
| 962 | - | libs = append(libs, lib) | |||
| 963 | - | } | |||
| 964 | - | ||||
| 965 | - | core.PuregoSafeRegister(&xApplicationWindowGLibType, libs, "adw_application_window_get_type") | |||
| 966 | - | ||||
| 967 | - | core.PuregoSafeRegister(&xNewApplicationWindow, libs, "adw_application_window_new") | |||
| 968 | - | ||||
| 969 | - | core.PuregoSafeRegister(&xApplicationWindowAddBreakpoint, libs, "adw_application_window_add_breakpoint") | |||
| 970 | - | core.PuregoSafeRegister(&xApplicationWindowGetAdaptivePreview, libs, "adw_application_window_get_adaptive_preview") | |||
| 971 | - | core.PuregoSafeRegister(&xApplicationWindowGetContent, libs, "adw_application_window_get_content") | |||
| 972 | - | core.PuregoSafeRegister(&xApplicationWindowGetCurrentBreakpoint, libs, "adw_application_window_get_current_breakpoint") | |||
| 973 | - | core.PuregoSafeRegister(&xApplicationWindowGetDialogs, libs, "adw_application_window_get_dialogs") | |||
| 974 | - | core.PuregoSafeRegister(&xApplicationWindowGetVisibleDialog, libs, "adw_application_window_get_visible_dialog") | |||
| 975 | - | core.PuregoSafeRegister(&xApplicationWindowSetAdaptivePreview, libs, "adw_application_window_set_adaptive_preview") | |||
| 976 | - | core.PuregoSafeRegister(&xApplicationWindowSetContent, libs, "adw_application_window_set_content") | |||
| 977 | } | 969 | } | ||