Merge pull request #350 from bnema/fix/repin-fixed-puregotk
fix(deps): validate puregotk lazy registration fix
907 files · +27874 -25296
M go.mod +3 -1
| @@ -11,7 +11,7 @@ require ( | |||
| 11 | 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | |
| 12 | 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | |
| 13 | 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | |
| 14 | - | github.com/bnema/puregotk v0.7.0 | |
| 14 | + | github.com/bnema/puregotk v0.7.1-0.20260714200603-7370c78950ef | |
| 15 | 15 | github.com/charmbracelet/bubbles v1.0.0 | |
| 16 | 16 | github.com/charmbracelet/bubbletea v1.3.10 | |
| 17 | 17 | github.com/charmbracelet/lipgloss v1.1.0 | |
| @@ -47,6 +47,7 @@ require ( | |||
| 47 | 47 | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect | |
| 48 | 48 | github.com/fatih/color v1.19.0 // indirect | |
| 49 | 49 | github.com/go-viper/mapstructure/v2 v2.5.0 // indirect | |
| 50 | + | github.com/google/go-cmp v0.7.0 // indirect | |
| 50 | 51 | github.com/inconshreveable/mousetrap v1.1.0 // indirect | |
| 51 | 52 | github.com/lucasb-eyer/go-colorful v1.4.0 // indirect | |
| 52 | 53 | github.com/mattn/go-colorable v0.1.14 // indirect | |
| @@ -80,6 +81,7 @@ require ( | |||
| 80 | 81 | golang.org/x/text v0.40.0 // indirect | |
| 81 | 82 | golang.org/x/tools v0.47.0 // indirect | |
| 82 | 83 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | |
| 84 | + | mvdan.cc/gofumpt v0.9.2 // indirect | |
| 83 | 85 | ) | |
| 84 | 86 | ||
| 85 | 87 | tool github.com/a-h/templ/cmd/templ | |
| @@ -11,7 +11,7 @@ require ( | |||||
| 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | ||
| 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | ||
| 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | ||
| 14 | - | github.com/bnema/puregotk v0.7.0 | 14 | + | github.com/bnema/puregotk v0.7.1-0.20260714200603-7370c78950ef |
| 15 | github.com/charmbracelet/bubbles v1.0.0 | 15 | github.com/charmbracelet/bubbles v1.0.0 | ||
| 16 | github.com/charmbracelet/bubbletea v1.3.10 | 16 | github.com/charmbracelet/bubbletea v1.3.10 | ||
| 17 | github.com/charmbracelet/lipgloss v1.1.0 | 17 | github.com/charmbracelet/lipgloss v1.1.0 | ||
| @@ -47,6 +47,7 @@ require ( | |||||
| 47 | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect | 47 | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect | ||
| 48 | github.com/fatih/color v1.19.0 // indirect | 48 | github.com/fatih/color v1.19.0 // indirect | ||
| 49 | github.com/go-viper/mapstructure/v2 v2.5.0 // indirect | 49 | github.com/go-viper/mapstructure/v2 v2.5.0 // indirect | ||
| 50 | + | github.com/google/go-cmp v0.7.0 // indirect | |||
| 50 | github.com/inconshreveable/mousetrap v1.1.0 // indirect | 51 | github.com/inconshreveable/mousetrap v1.1.0 // indirect | ||
| 51 | github.com/lucasb-eyer/go-colorful v1.4.0 // indirect | 52 | github.com/lucasb-eyer/go-colorful v1.4.0 // indirect | ||
| 52 | github.com/mattn/go-colorable v0.1.14 // indirect | 53 | github.com/mattn/go-colorable v0.1.14 // indirect | ||
| @@ -80,6 +81,7 @@ require ( | |||||
| 80 | golang.org/x/text v0.40.0 // indirect | 81 | golang.org/x/text v0.40.0 // indirect | ||
| 81 | golang.org/x/tools v0.47.0 // indirect | 82 | golang.org/x/tools v0.47.0 // indirect | ||
| 82 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | 83 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | ||
| 84 | + | mvdan.cc/gofumpt v0.9.2 // indirect | |||
| 83 | ) | 85 | ) | ||
| 84 | 86 | ||||
| 85 | tool github.com/a-h/templ/cmd/templ | 87 | tool github.com/a-h/templ/cmd/templ | ||
M go.sum +4 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/internal/core/core.go +197 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/pkg/core/core.go +10 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-dialog.go +99 -64 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-window.go +95 -62 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-accent-color.go +7 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-action-row.go +33 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-alert-dialog.go +66 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-target.go +10 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-util.go +4 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation.go +24 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application-window.go +14 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application.go +3 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-avatar.go +22 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-banner.go +23 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bin.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bottom-sheet.go +47 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint-bin.go +10 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint.go +33 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-content.go +18 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-row.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-dots.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-lines.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel.go +47 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-layout.go +14 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-scrollable.go +17 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp.go +17 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-combo-row.go +34 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-dialog.go +45 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-easing.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-entry-row.go +40 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-enum-list-model.go +13 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-expander-row.go +40 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-flap.go +61 -48 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-fold-threshold-policy.go +10 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-header-bar.go +36 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-inline-view-switcher.go +18 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout-slot.go +4 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout.go +7 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-leaflet.go +69 -56 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-length-unit.go +5 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-main.go +5 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-message-dialog.go +63 -44 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-multi-layout-view.go +17 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-direction.go +10 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-split-view.go +36 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-view.go +60 -49 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-overlay-split-view.go +48 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-password-entry-row.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-dialog.go +23 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-group.go +24 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-page.go +38 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-row.go +18 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-window.go +31 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcut-label.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-dialog.go +4 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-item.go +23 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-section.go +8 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar-item.go +45 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar-section.go +24 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar.go +41 -39 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spin-row.go +40 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spinner-paintable.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spinner.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-split-button.go +39 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spring-animation.go +34 -30 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spring-params.go +17 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-squeezer.go +49 -44 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-status-page.go +20 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-style-manager.go +25 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-swipe-tracker.go +33 -30 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-swipeable.go +33 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-switch-row.go +6 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-bar.go +35 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-button.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-overview.go +45 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-view.go +123 -87 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-timed-animation.go +30 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toast-overlay.go +9 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toast.go +41 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toggle-group.go +64 -51 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toolbar-view.go +40 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-version.go +7 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-stack.go +78 -62 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-bar.go +9 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-sidebar.go +15 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-title.go +19 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher.go +10 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-window-title.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-window.go +14 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-wrap-box.go +66 -46 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-wrap-layout.go +57 -46 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/cairo/main.go +36 -79 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkapplaunchcontext.go +10 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcairo.go +12 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcairocontext.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcicpparams.go +20 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkclipboard.go +34 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcolorstate.go +12 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentdeserializer.go +26 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentformats.go +28 -31 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentprovider.go +23 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentserializer.go +26 -27
| @@ -4,7 +4,6 @@ package gdk | |||
| 4 | 4 | import ( | |
| 5 | 5 | "unsafe" | |
| 6 | 6 | ||
| 7 | - | "github.com/bnema/purego" | |
| 8 | 7 | "github.com/bnema/puregotk/pkg/core" | |
| 9 | 8 | "github.com/bnema/puregotk/v4/gio" | |
| 10 | 9 | "github.com/bnema/puregotk/v4/glib" | |
| @@ -27,6 +26,8 @@ var xContentRegisterSerializer func(types.GType, string, uintptr, uintptr, uintp | |||
| 27 | 26 | // use the last registered serializer for a given mime type, | |
| 28 | 27 | // so applications can override the built-in serializers. | |
| 29 | 28 | func ContentRegisterSerializer(TypeVar types.GType, MimeTypeVar string, SerializeVar *ContentSerializeFunc, DataVar uintptr, NotifyVar *glib.DestroyNotify) { | |
| 29 | + | core.LazyRegister(&xContentRegisterSerializer, "GDK", "gdk_content_register_serializer", false) | |
| 30 | + | ||
| 30 | 31 | xContentRegisterSerializer(TypeVar, MimeTypeVar, glib.NewCallback(SerializeVar), DataVar, glib.NewCallbackNullable(NotifyVar)) | |
| 31 | 32 | } | |
| 32 | 33 | ||
| @@ -37,6 +38,8 @@ var xContentSerializeAsync func(uintptr, string, *gobject.Value, int, uintptr, u | |||
| 37 | 38 | // The default I/O priority is %G_PRIORITY_DEFAULT (i.e. 0), and lower numbers | |
| 38 | 39 | // indicate a higher priority. | |
| 39 | 40 | func ContentSerializeAsync(StreamVar *gio.OutputStream, MimeTypeVar string, ValueVar *gobject.Value, IoPriorityVar int, CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) { | |
| 41 | + | core.LazyRegister(&xContentSerializeAsync, "GDK", "gdk_content_serialize_async", false) | |
| 42 | + | ||
| 40 | 43 | xContentSerializeAsync(StreamVar.GoPointer(), MimeTypeVar, ValueVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | |
| 41 | 44 | } | |
| 42 | 45 | ||
| @@ -44,6 +47,7 @@ var xContentSerializeFinish func(uintptr, **glib.Error) bool | |||
| 44 | 47 | ||
| 45 | 48 | // Finishes a content serialization operation. | |
| 46 | 49 | func ContentSerializeFinish(ResultVar gio.AsyncResult) (bool, error) { | |
| 50 | + | core.LazyRegister(&xContentSerializeFinish, "GDK", "gdk_content_serialize_finish", false) | |
| 47 | 51 | var cerr *glib.Error | |
| 48 | 52 | ||
| 49 | 53 | cret := xContentSerializeFinish(ResultVar.GoPointer(), &cerr) | |
| @@ -71,6 +75,7 @@ type ContentSerializer struct { | |||
| 71 | 75 | var xContentSerializerGLibType func() types.GType | |
| 72 | 76 | ||
| 73 | 77 | func ContentSerializerGLibType() types.GType { | |
| 78 | + | core.LazyRegister(&xContentSerializerGLibType, "GDK", "gdk_content_serializer_get_type", false) | |
| 74 | 79 | return xContentSerializerGLibType() | |
| 75 | 80 | } | |
| 76 | 81 | ||
| @@ -86,6 +91,7 @@ var xContentSerializerGetCancellable func(uintptr) uintptr | |||
| 86 | 91 | // | |
| 87 | 92 | // This is the `GCancellable` that was passed to [func@content_serialize_async]. | |
| 88 | 93 | func (x *ContentSerializer) GetCancellable() *gio.Cancellable { | |
| 94 | + | core.LazyRegister(&xContentSerializerGetCancellable, "GDK", "gdk_content_serializer_get_cancellable", false) | |
| 89 | 95 | var cls *gio.Cancellable | |
| 90 | 96 | ||
| 91 | 97 | cret := xContentSerializerGetCancellable(x.GoPointer()) | |
| @@ -103,6 +109,8 @@ var xContentSerializerGetGtype func(uintptr) types.GType | |||
| 103 | 109 | ||
| 104 | 110 | // Gets the `GType` to of the object to serialize. | |
| 105 | 111 | func (x *ContentSerializer) GetGtype() types.GType { | |
| 112 | + | core.LazyRegister(&xContentSerializerGetGtype, "GDK", "gdk_content_serializer_get_gtype", false) | |
| 113 | + | ||
| 106 | 114 | cret := xContentSerializerGetGtype(x.GoPointer()) | |
| 107 | 115 | return cret | |
| 108 | 116 | } | |
| @@ -111,6 +119,8 @@ var xContentSerializerGetMimeType func(uintptr) string | |||
| 111 | 119 | ||
| 112 | 120 | // Gets the mime type to serialize to. | |
| 113 | 121 | func (x *ContentSerializer) GetMimeType() string { | |
| 122 | + | core.LazyRegister(&xContentSerializerGetMimeType, "GDK", "gdk_content_serializer_get_mime_type", false) | |
| 123 | + | ||
| 114 | 124 | cret := xContentSerializerGetMimeType(x.GoPointer()) | |
| 115 | 125 | return cret | |
| 116 | 126 | } | |
| @@ -121,6 +131,7 @@ var xContentSerializerGetOutputStream func(uintptr) uintptr | |||
| 121 | 131 | // | |
| 122 | 132 | // This is the stream that was passed to [func@content_serialize_async]. | |
| 123 | 133 | func (x *ContentSerializer) GetOutputStream() *gio.OutputStream { | |
| 134 | + | core.LazyRegister(&xContentSerializerGetOutputStream, "GDK", "gdk_content_serializer_get_output_stream", false) | |
| 124 | 135 | var cls *gio.OutputStream | |
| 125 | 136 | ||
| 126 | 137 | cret := xContentSerializerGetOutputStream(x.GoPointer()) | |
| @@ -140,6 +151,8 @@ var xContentSerializerGetPriority func(uintptr) int | |||
| 140 | 151 | // | |
| 141 | 152 | // This is the priority that was passed to [func@content_serialize_async]. | |
| 142 | 153 | func (x *ContentSerializer) GetPriority() int { | |
| 154 | + | core.LazyRegister(&xContentSerializerGetPriority, "GDK", "gdk_content_serializer_get_priority", false) | |
| 155 | + | ||
| 143 | 156 | cret := xContentSerializerGetPriority(x.GoPointer()) | |
| 144 | 157 | return cret | |
| 145 | 158 | } | |
| @@ -150,6 +163,8 @@ var xContentSerializerGetTaskData func(uintptr) uintptr | |||
| 150 | 163 | // | |
| 151 | 164 | // See [method@Gdk.ContentSerializer.set_task_data]. | |
| 152 | 165 | func (x *ContentSerializer) GetTaskData() uintptr { | |
| 166 | + | core.LazyRegister(&xContentSerializerGetTaskData, "GDK", "gdk_content_serializer_get_task_data", false) | |
| 167 | + | ||
| 153 | 168 | cret := xContentSerializerGetTaskData(x.GoPointer()) | |
| 154 | 169 | return cret | |
| 155 | 170 | } | |
| @@ -158,6 +173,8 @@ var xContentSerializerGetUserData func(uintptr) uintptr | |||
| 158 | 173 | ||
| 159 | 174 | // Gets the user data that was passed when the serializer was registered. | |
| 160 | 175 | func (x *ContentSerializer) GetUserData() uintptr { | |
| 176 | + | core.LazyRegister(&xContentSerializerGetUserData, "GDK", "gdk_content_serializer_get_user_data", false) | |
| 177 | + | ||
| 161 | 178 | cret := xContentSerializerGetUserData(x.GoPointer()) | |
| 162 | 179 | return cret | |
| 163 | 180 | } | |
| @@ -166,6 +183,8 @@ var xContentSerializerGetValue func(uintptr) uintptr | |||
| 166 | 183 | ||
| 167 | 184 | // Gets the `GValue` to read the object to serialize from. | |
| 168 | 185 | func (x *ContentSerializer) GetValue() *gobject.Value { | |
| 186 | + | core.LazyRegister(&xContentSerializerGetValue, "GDK", "gdk_content_serializer_get_value", false) | |
| 187 | + | ||
| 169 | 188 | cret := xContentSerializerGetValue(x.GoPointer()) | |
| 170 | 189 | if cret == 0 { | |
| 171 | 190 | return nil | |
| @@ -179,6 +198,8 @@ var xContentSerializerReturnError func(uintptr, *glib.Error) | |||
| 179 | 198 | // | |
| 180 | 199 | // This function consumes @error. | |
| 181 | 200 | func (x *ContentSerializer) ReturnError(ErrorVar *glib.Error) { | |
| 201 | + | core.LazyRegister(&xContentSerializerReturnError, "GDK", "gdk_content_serializer_return_error", false) | |
| 202 | + | ||
| 182 | 203 | xContentSerializerReturnError(x.GoPointer(), ErrorVar) | |
| 183 | 204 | } | |
| 184 | 205 | ||
| @@ -186,6 +207,8 @@ var xContentSerializerReturnSuccess func(uintptr) | |||
| 186 | 207 | ||
| 187 | 208 | // Indicate that the serialization has been successfully completed. | |
| 188 | 209 | func (x *ContentSerializer) ReturnSuccess() { | |
| 210 | + | core.LazyRegister(&xContentSerializerReturnSuccess, "GDK", "gdk_content_serializer_return_success", false) | |
| 211 | + | ||
| 189 | 212 | xContentSerializerReturnSuccess(x.GoPointer()) | |
| 190 | 213 | } | |
| 191 | 214 | ||
| @@ -193,6 +216,8 @@ var xContentSerializerSetTaskData func(uintptr, uintptr, uintptr) | |||
| 193 | 216 | ||
| 194 | 217 | // Associate data with the current serialization operation. | |
| 195 | 218 | func (x *ContentSerializer) SetTaskData(DataVar uintptr, NotifyVar *glib.DestroyNotify) { | |
| 219 | + | core.LazyRegister(&xContentSerializerSetTaskData, "GDK", "gdk_content_serializer_set_task_data", false) | |
| 220 | + | ||
| 196 | 221 | xContentSerializerSetTaskData(x.GoPointer(), DataVar, glib.NewCallbackNullable(NotifyVar)) | |
| 197 | 222 | } | |
| 198 | 223 | ||
| @@ -251,30 +276,4 @@ func (x *ContentSerializer) LegacyPropagateError() (bool, error) { | |||
| 251 | 276 | func init() { | |
| 252 | 277 | core.SetPackageName("GDK", "gtk4") | |
| 253 | 278 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | |
| 254 | - | var libs []uintptr | |
| 255 | - | for _, libPath := range core.GetPaths("GDK") { | |
| 256 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 257 | - | if err != nil { | |
| 258 | - | panic(err) | |
| 259 | - | } | |
| 260 | - | libs = append(libs, lib) | |
| 261 | - | } | |
| 262 | - | ||
| 263 | - | core.PuregoSafeRegister(&xContentRegisterSerializer, libs, "gdk_content_register_serializer") | |
| 264 | - | core.PuregoSafeRegister(&xContentSerializeAsync, libs, "gdk_content_serialize_async") | |
| 265 | - | core.PuregoSafeRegister(&xContentSerializeFinish, libs, "gdk_content_serialize_finish") | |
| 266 | - | ||
| 267 | - | core.PuregoSafeRegister(&xContentSerializerGLibType, libs, "gdk_content_serializer_get_type") | |
| 268 | - | ||
| 269 | - | core.PuregoSafeRegister(&xContentSerializerGetCancellable, libs, "gdk_content_serializer_get_cancellable") | |
| 270 | - | core.PuregoSafeRegister(&xContentSerializerGetGtype, libs, "gdk_content_serializer_get_gtype") | |
| 271 | - | core.PuregoSafeRegister(&xContentSerializerGetMimeType, libs, "gdk_content_serializer_get_mime_type") | |
| 272 | - | core.PuregoSafeRegister(&xContentSerializerGetOutputStream, libs, "gdk_content_serializer_get_output_stream") | |
| 273 | - | core.PuregoSafeRegister(&xContentSerializerGetPriority, libs, "gdk_content_serializer_get_priority") | |
| 274 | - | core.PuregoSafeRegister(&xContentSerializerGetTaskData, libs, "gdk_content_serializer_get_task_data") | |
| 275 | - | core.PuregoSafeRegister(&xContentSerializerGetUserData, libs, "gdk_content_serializer_get_user_data") | |
| 276 | - | core.PuregoSafeRegister(&xContentSerializerGetValue, libs, "gdk_content_serializer_get_value") | |
| 277 | - | core.PuregoSafeRegister(&xContentSerializerReturnError, libs, "gdk_content_serializer_return_error") | |
| 278 | - | core.PuregoSafeRegister(&xContentSerializerReturnSuccess, libs, "gdk_content_serializer_return_success") | |
| 279 | - | core.PuregoSafeRegister(&xContentSerializerSetTaskData, libs, "gdk_content_serializer_set_task_data") | |
| 280 | 279 | } | |
| @@ -4,7 +4,6 @@ package gdk | |||||
| 4 | import ( | 4 | import ( | ||
| 5 | "unsafe" | 5 | "unsafe" | ||
| 6 | 6 | ||||
| 7 | - | "github.com/bnema/purego" | |||
| 8 | "github.com/bnema/puregotk/pkg/core" | 7 | "github.com/bnema/puregotk/pkg/core" | ||
| 9 | "github.com/bnema/puregotk/v4/gio" | 8 | "github.com/bnema/puregotk/v4/gio" | ||
| 10 | "github.com/bnema/puregotk/v4/glib" | 9 | "github.com/bnema/puregotk/v4/glib" | ||
| @@ -27,6 +26,8 @@ var xContentRegisterSerializer func(types.GType, string, uintptr, uintptr, uintp | |||||
| 27 | // use the last registered serializer for a given mime type, | 26 | // use the last registered serializer for a given mime type, | ||
| 28 | // so applications can override the built-in serializers. | 27 | // so applications can override the built-in serializers. | ||
| 29 | func ContentRegisterSerializer(TypeVar types.GType, MimeTypeVar string, SerializeVar *ContentSerializeFunc, DataVar uintptr, NotifyVar *glib.DestroyNotify) { | 28 | func ContentRegisterSerializer(TypeVar types.GType, MimeTypeVar string, SerializeVar *ContentSerializeFunc, DataVar uintptr, NotifyVar *glib.DestroyNotify) { | ||
| 29 | + | core.LazyRegister(&xContentRegisterSerializer, "GDK", "gdk_content_register_serializer", false) | |||
| 30 | + | ||||
| 30 | xContentRegisterSerializer(TypeVar, MimeTypeVar, glib.NewCallback(SerializeVar), DataVar, glib.NewCallbackNullable(NotifyVar)) | 31 | xContentRegisterSerializer(TypeVar, MimeTypeVar, glib.NewCallback(SerializeVar), DataVar, glib.NewCallbackNullable(NotifyVar)) | ||
| 31 | } | 32 | } | ||
| 32 | 33 | ||||
| @@ -37,6 +38,8 @@ var xContentSerializeAsync func(uintptr, string, *gobject.Value, int, uintptr, u | |||||
| 37 | // The default I/O priority is %G_PRIORITY_DEFAULT (i.e. 0), and lower numbers | 38 | // The default I/O priority is %G_PRIORITY_DEFAULT (i.e. 0), and lower numbers | ||
| 38 | // indicate a higher priority. | 39 | // indicate a higher priority. | ||
| 39 | func ContentSerializeAsync(StreamVar *gio.OutputStream, MimeTypeVar string, ValueVar *gobject.Value, IoPriorityVar int, CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) { | 40 | func ContentSerializeAsync(StreamVar *gio.OutputStream, MimeTypeVar string, ValueVar *gobject.Value, IoPriorityVar int, CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) { | ||
| 41 | + | core.LazyRegister(&xContentSerializeAsync, "GDK", "gdk_content_serialize_async", false) | |||
| 42 | + | ||||
| 40 | xContentSerializeAsync(StreamVar.GoPointer(), MimeTypeVar, ValueVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | 43 | xContentSerializeAsync(StreamVar.GoPointer(), MimeTypeVar, ValueVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | ||
| 41 | } | 44 | } | ||
| 42 | 45 | ||||
| @@ -44,6 +47,7 @@ var xContentSerializeFinish func(uintptr, **glib.Error) bool | |||||
| 44 | 47 | ||||
| 45 | // Finishes a content serialization operation. | 48 | // Finishes a content serialization operation. | ||
| 46 | func ContentSerializeFinish(ResultVar gio.AsyncResult) (bool, error) { | 49 | func ContentSerializeFinish(ResultVar gio.AsyncResult) (bool, error) { | ||
| 50 | + | core.LazyRegister(&xContentSerializeFinish, "GDK", "gdk_content_serialize_finish", false) | |||
| 47 | var cerr *glib.Error | 51 | var cerr *glib.Error | ||
| 48 | 52 | ||||
| 49 | cret := xContentSerializeFinish(ResultVar.GoPointer(), &cerr) | 53 | cret := xContentSerializeFinish(ResultVar.GoPointer(), &cerr) | ||
| @@ -71,6 +75,7 @@ type ContentSerializer struct { | |||||
| 71 | var xContentSerializerGLibType func() types.GType | 75 | var xContentSerializerGLibType func() types.GType | ||
| 72 | 76 | ||||
| 73 | func ContentSerializerGLibType() types.GType { | 77 | func ContentSerializerGLibType() types.GType { | ||
| 78 | + | core.LazyRegister(&xContentSerializerGLibType, "GDK", "gdk_content_serializer_get_type", false) | |||
| 74 | return xContentSerializerGLibType() | 79 | return xContentSerializerGLibType() | ||
| 75 | } | 80 | } | ||
| 76 | 81 | ||||
| @@ -86,6 +91,7 @@ var xContentSerializerGetCancellable func(uintptr) uintptr | |||||
| 86 | // | 91 | // | ||
| 87 | // This is the `GCancellable` that was passed to [func@content_serialize_async]. | 92 | // This is the `GCancellable` that was passed to [func@content_serialize_async]. | ||
| 88 | func (x *ContentSerializer) GetCancellable() *gio.Cancellable { | 93 | func (x *ContentSerializer) GetCancellable() *gio.Cancellable { | ||
| 94 | + | core.LazyRegister(&xContentSerializerGetCancellable, "GDK", "gdk_content_serializer_get_cancellable", false) | |||
| 89 | var cls *gio.Cancellable | 95 | var cls *gio.Cancellable | ||
| 90 | 96 | ||||
| 91 | cret := xContentSerializerGetCancellable(x.GoPointer()) | 97 | cret := xContentSerializerGetCancellable(x.GoPointer()) | ||
| @@ -103,6 +109,8 @@ var xContentSerializerGetGtype func(uintptr) types.GType | |||||
| 103 | 109 | ||||
| 104 | // Gets the `GType` to of the object to serialize. | 110 | // Gets the `GType` to of the object to serialize. | ||
| 105 | func (x *ContentSerializer) GetGtype() types.GType { | 111 | func (x *ContentSerializer) GetGtype() types.GType { | ||
| 112 | + | core.LazyRegister(&xContentSerializerGetGtype, "GDK", "gdk_content_serializer_get_gtype", false) | |||
| 113 | + | ||||
| 106 | cret := xContentSerializerGetGtype(x.GoPointer()) | 114 | cret := xContentSerializerGetGtype(x.GoPointer()) | ||
| 107 | return cret | 115 | return cret | ||
| 108 | } | 116 | } | ||
| @@ -111,6 +119,8 @@ var xContentSerializerGetMimeType func(uintptr) string | |||||
| 111 | 119 | ||||
| 112 | // Gets the mime type to serialize to. | 120 | // Gets the mime type to serialize to. | ||
| 113 | func (x *ContentSerializer) GetMimeType() string { | 121 | func (x *ContentSerializer) GetMimeType() string { | ||
| 122 | + | core.LazyRegister(&xContentSerializerGetMimeType, "GDK", "gdk_content_serializer_get_mime_type", false) | |||
| 123 | + | ||||
| 114 | cret := xContentSerializerGetMimeType(x.GoPointer()) | 124 | cret := xContentSerializerGetMimeType(x.GoPointer()) | ||
| 115 | return cret | 125 | return cret | ||
| 116 | } | 126 | } | ||
| @@ -121,6 +131,7 @@ var xContentSerializerGetOutputStream func(uintptr) uintptr | |||||
| 121 | // | 131 | // | ||
| 122 | // This is the stream that was passed to [func@content_serialize_async]. | 132 | // This is the stream that was passed to [func@content_serialize_async]. | ||
| 123 | func (x *ContentSerializer) GetOutputStream() *gio.OutputStream { | 133 | func (x *ContentSerializer) GetOutputStream() *gio.OutputStream { | ||
| 134 | + | core.LazyRegister(&xContentSerializerGetOutputStream, "GDK", "gdk_content_serializer_get_output_stream", false) | |||
| 124 | var cls *gio.OutputStream | 135 | var cls *gio.OutputStream | ||
| 125 | 136 | ||||
| 126 | cret := xContentSerializerGetOutputStream(x.GoPointer()) | 137 | cret := xContentSerializerGetOutputStream(x.GoPointer()) | ||
| @@ -140,6 +151,8 @@ var xContentSerializerGetPriority func(uintptr) int | |||||
| 140 | // | 151 | // | ||
| 141 | // This is the priority that was passed to [func@content_serialize_async]. | 152 | // This is the priority that was passed to [func@content_serialize_async]. | ||
| 142 | func (x *ContentSerializer) GetPriority() int { | 153 | func (x *ContentSerializer) GetPriority() int { | ||
| 154 | + | core.LazyRegister(&xContentSerializerGetPriority, "GDK", "gdk_content_serializer_get_priority", false) | |||
| 155 | + | ||||
| 143 | cret := xContentSerializerGetPriority(x.GoPointer()) | 156 | cret := xContentSerializerGetPriority(x.GoPointer()) | ||
| 144 | return cret | 157 | return cret | ||
| 145 | } | 158 | } | ||
| @@ -150,6 +163,8 @@ var xContentSerializerGetTaskData func(uintptr) uintptr | |||||
| 150 | // | 163 | // | ||
| 151 | // See [method@Gdk.ContentSerializer.set_task_data]. | 164 | // See [method@Gdk.ContentSerializer.set_task_data]. | ||
| 152 | func (x *ContentSerializer) GetTaskData() uintptr { | 165 | func (x *ContentSerializer) GetTaskData() uintptr { | ||
| 166 | + | core.LazyRegister(&xContentSerializerGetTaskData, "GDK", "gdk_content_serializer_get_task_data", false) | |||
| 167 | + | ||||
| 153 | cret := xContentSerializerGetTaskData(x.GoPointer()) | 168 | cret := xContentSerializerGetTaskData(x.GoPointer()) | ||
| 154 | return cret | 169 | return cret | ||
| 155 | } | 170 | } | ||
| @@ -158,6 +173,8 @@ var xContentSerializerGetUserData func(uintptr) uintptr | |||||
| 158 | 173 | ||||
| 159 | // Gets the user data that was passed when the serializer was registered. | 174 | // Gets the user data that was passed when the serializer was registered. | ||
| 160 | func (x *ContentSerializer) GetUserData() uintptr { | 175 | func (x *ContentSerializer) GetUserData() uintptr { | ||
| 176 | + | core.LazyRegister(&xContentSerializerGetUserData, "GDK", "gdk_content_serializer_get_user_data", false) | |||
| 177 | + | ||||
| 161 | cret := xContentSerializerGetUserData(x.GoPointer()) | 178 | cret := xContentSerializerGetUserData(x.GoPointer()) | ||
| 162 | return cret | 179 | return cret | ||
| 163 | } | 180 | } | ||
| @@ -166,6 +183,8 @@ var xContentSerializerGetValue func(uintptr) uintptr | |||||
| 166 | 183 | ||||
| 167 | // Gets the `GValue` to read the object to serialize from. | 184 | // Gets the `GValue` to read the object to serialize from. | ||
| 168 | func (x *ContentSerializer) GetValue() *gobject.Value { | 185 | func (x *ContentSerializer) GetValue() *gobject.Value { | ||
| 186 | + | core.LazyRegister(&xContentSerializerGetValue, "GDK", "gdk_content_serializer_get_value", false) | |||
| 187 | + | ||||
| 169 | cret := xContentSerializerGetValue(x.GoPointer()) | 188 | cret := xContentSerializerGetValue(x.GoPointer()) | ||
| 170 | if cret == 0 { | 189 | if cret == 0 { | ||
| 171 | return nil | 190 | return nil | ||
| @@ -179,6 +198,8 @@ var xContentSerializerReturnError func(uintptr, *glib.Error) | |||||
| 179 | // | 198 | // | ||
| 180 | // This function consumes @error. | 199 | // This function consumes @error. | ||
| 181 | func (x *ContentSerializer) ReturnError(ErrorVar *glib.Error) { | 200 | func (x *ContentSerializer) ReturnError(ErrorVar *glib.Error) { | ||
| 201 | + | core.LazyRegister(&xContentSerializerReturnError, "GDK", "gdk_content_serializer_return_error", false) | |||
| 202 | + | ||||
| 182 | xContentSerializerReturnError(x.GoPointer(), ErrorVar) | 203 | xContentSerializerReturnError(x.GoPointer(), ErrorVar) | ||
| 183 | } | 204 | } | ||
| 184 | 205 | ||||
| @@ -186,6 +207,8 @@ var xContentSerializerReturnSuccess func(uintptr) | |||||
| 186 | 207 | ||||
| 187 | // Indicate that the serialization has been successfully completed. | 208 | // Indicate that the serialization has been successfully completed. | ||
| 188 | func (x *ContentSerializer) ReturnSuccess() { | 209 | func (x *ContentSerializer) ReturnSuccess() { | ||
| 210 | + | core.LazyRegister(&xContentSerializerReturnSuccess, "GDK", "gdk_content_serializer_return_success", false) | |||
| 211 | + | ||||
| 189 | xContentSerializerReturnSuccess(x.GoPointer()) | 212 | xContentSerializerReturnSuccess(x.GoPointer()) | ||
| 190 | } | 213 | } | ||
| 191 | 214 | ||||
| @@ -193,6 +216,8 @@ var xContentSerializerSetTaskData func(uintptr, uintptr, uintptr) | |||||
| 193 | 216 | ||||
| 194 | // Associate data with the current serialization operation. | 217 | // Associate data with the current serialization operation. | ||
| 195 | func (x *ContentSerializer) SetTaskData(DataVar uintptr, NotifyVar *glib.DestroyNotify) { | 218 | func (x *ContentSerializer) SetTaskData(DataVar uintptr, NotifyVar *glib.DestroyNotify) { | ||
| 219 | + | core.LazyRegister(&xContentSerializerSetTaskData, "GDK", "gdk_content_serializer_set_task_data", false) | |||
| 220 | + | ||||
| 196 | xContentSerializerSetTaskData(x.GoPointer(), DataVar, glib.NewCallbackNullable(NotifyVar)) | 221 | xContentSerializerSetTaskData(x.GoPointer(), DataVar, glib.NewCallbackNullable(NotifyVar)) | ||
| 197 | } | 222 | } | ||
| 198 | 223 | ||||
| @@ -251,30 +276,4 @@ func (x *ContentSerializer) LegacyPropagateError() (bool, error) { | |||||
| 251 | func init() { | 276 | func init() { | ||
| 252 | core.SetPackageName("GDK", "gtk4") | 277 | core.SetPackageName("GDK", "gtk4") | ||
| 253 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | 278 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | ||
| 254 | - | var libs []uintptr | |||
| 255 | - | for _, libPath := range core.GetPaths("GDK") { | |||
| 256 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 257 | - | if err != nil { | |||
| 258 | - | panic(err) | |||
| 259 | - | } | |||
| 260 | - | libs = append(libs, lib) | |||
| 261 | - | } | |||
| 262 | - | ||||
| 263 | - | core.PuregoSafeRegister(&xContentRegisterSerializer, libs, "gdk_content_register_serializer") | |||
| 264 | - | core.PuregoSafeRegister(&xContentSerializeAsync, libs, "gdk_content_serialize_async") | |||
| 265 | - | core.PuregoSafeRegister(&xContentSerializeFinish, libs, "gdk_content_serialize_finish") | |||
| 266 | - | ||||
| 267 | - | core.PuregoSafeRegister(&xContentSerializerGLibType, libs, "gdk_content_serializer_get_type") | |||
| 268 | - | ||||
| 269 | - | core.PuregoSafeRegister(&xContentSerializerGetCancellable, libs, "gdk_content_serializer_get_cancellable") | |||
| 270 | - | core.PuregoSafeRegister(&xContentSerializerGetGtype, libs, "gdk_content_serializer_get_gtype") | |||
| 271 | - | core.PuregoSafeRegister(&xContentSerializerGetMimeType, libs, "gdk_content_serializer_get_mime_type") | |||
| 272 | - | core.PuregoSafeRegister(&xContentSerializerGetOutputStream, libs, "gdk_content_serializer_get_output_stream") | |||
| 273 | - | core.PuregoSafeRegister(&xContentSerializerGetPriority, libs, "gdk_content_serializer_get_priority") | |||
| 274 | - | core.PuregoSafeRegister(&xContentSerializerGetTaskData, libs, "gdk_content_serializer_get_task_data") | |||
| 275 | - | core.PuregoSafeRegister(&xContentSerializerGetUserData, libs, "gdk_content_serializer_get_user_data") | |||
| 276 | - | core.PuregoSafeRegister(&xContentSerializerGetValue, libs, "gdk_content_serializer_get_value") | |||
| 277 | - | core.PuregoSafeRegister(&xContentSerializerReturnError, libs, "gdk_content_serializer_return_error") | |||
| 278 | - | core.PuregoSafeRegister(&xContentSerializerReturnSuccess, libs, "gdk_content_serializer_return_success") | |||
| 279 | - | core.PuregoSafeRegister(&xContentSerializerSetTaskData, libs, "gdk_content_serializer_set_task_data") | |||
| 280 | } | 279 | } | ||