Revert "chore(deps): pin puregotk nil-signal fix"
This reverts commit a161e348e2093172038390b0906448f0ae979a0d.
- commit
- 40378d5e4fd2372d054e49168ab2a6f67aedd0fd
- author
- brice · · 2026-07-14 17:59 UTC
- parent
- 8d647bb
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
905 files · +25263 -27842
M go.mod +1 -1
| @@ -11,7 +11,7 @@ require ( | |||
| 11 | 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | |
| 12 | 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | |
| 13 | 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | |
| 14 | - | github.com/bnema/puregotk v0.7.1-0.20260714170452-0b6b9b901234 | |
| 14 | + | github.com/bnema/puregotk v0.7.0 | |
| 15 | 15 | github.com/charmbracelet/bubbles v1.0.0 | |
| 16 | 16 | github.com/charmbracelet/bubbletea v1.3.10 | |
| 17 | 17 | github.com/charmbracelet/lipgloss v1.1.0 | |
| @@ -11,7 +11,7 @@ require ( | |||||
| 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | ||
| 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | ||
| 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | ||
| 14 | - | github.com/bnema/puregotk v0.7.1-0.20260714170452-0b6b9b901234 | 14 | + | github.com/bnema/puregotk v0.7.0 |
| 15 | github.com/charmbracelet/bubbles v1.0.0 | 15 | github.com/charmbracelet/bubbles v1.0.0 | ||
| 16 | github.com/charmbracelet/bubbletea v1.3.10 | 16 | github.com/charmbracelet/bubbletea v1.3.10 | ||
| 17 | github.com/charmbracelet/lipgloss v1.1.0 | 17 | github.com/charmbracelet/lipgloss v1.1.0 | ||
M go.sum +0 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/internal/core/core.go +4 -197 generated file: collapsed
M vendor/github.com/bnema/puregotk/pkg/core/core.go +0 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-dialog.go +64 -99 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-window.go +62 -95 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-accent-color.go +15 -7 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-action-row.go +29 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-alert-dialog.go +47 -66 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-target.go +27 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-util.go +12 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation.go +26 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application-window.go +22 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application.go +15 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-avatar.go +25 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-banner.go +26 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bin.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bottom-sheet.go +38 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint-bin.go +19 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint.go +37 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-content.go +22 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-row.go +18 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-dots.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-lines.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel.go +37 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-layout.go +20 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-scrollable.go +22 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp.go +22 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-combo-row.go +33 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-dialog.go +38 -45 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-easing.go +13 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-entry-row.go +33 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-enum-list-model.go +22 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-expander-row.go +33 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-flap.go +48 -61 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-fold-threshold-policy.go +1 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-header-bar.go +33 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-inline-view-switcher.go +24 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout-slot.go +15 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout.go +17 -7 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-leaflet.go +56 -69 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-length-unit.go +14 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-main.go +15 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-message-dialog.go +44 -63 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-multi-layout-view.go +23 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-direction.go +1 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-split-view.go +32 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-view.go +49 -60 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-overlay-split-view.go +38 -48 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-password-entry-row.go +13 -2 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-dialog.go +25 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-group.go +26 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-page.go +33 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-row.go +22 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-window.go +29 -31 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcut-label.go +18 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-dialog.go +15 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-item.go +25 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-section.go +17 -8 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar-item.go +37 -45 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar-section.go +27 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar.go +39 -41 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spin-row.go +34 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spinner-paintable.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spinner.go +13 -2 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-split-button.go +34 -39 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spring-animation.go +30 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spring-params.go +21 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-squeezer.go +44 -49 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 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/cairo/main.go +79 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkapplaunchcontext.go +17 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcairo.go +16 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcairocontext.go +13 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcicpparams.go +25 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkclipboard.go +32 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcolorstate.go +16 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentdeserializer.go +27 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentformats.go +31 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentprovider.go +28 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentserializer.go +27 -26
| @@ -4,6 +4,7 @@ package gdk | |||
| 4 | 4 | import ( | |
| 5 | 5 | "unsafe" | |
| 6 | 6 | ||
| 7 | + | "github.com/bnema/purego" | |
| 7 | 8 | "github.com/bnema/puregotk/pkg/core" | |
| 8 | 9 | "github.com/bnema/puregotk/v4/gio" | |
| 9 | 10 | "github.com/bnema/puregotk/v4/glib" | |
| @@ -26,8 +27,6 @@ var xContentRegisterSerializer func(types.GType, string, uintptr, uintptr, uintp | |||
| 26 | 27 | // use the last registered serializer for a given mime type, | |
| 27 | 28 | // so applications can override the built-in serializers. | |
| 28 | 29 | 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 | - | ||
| 31 | 30 | xContentRegisterSerializer(TypeVar, MimeTypeVar, glib.NewCallback(SerializeVar), DataVar, glib.NewCallbackNullable(NotifyVar)) | |
| 32 | 31 | } | |
| 33 | 32 | ||
| @@ -38,8 +37,6 @@ var xContentSerializeAsync func(uintptr, string, *gobject.Value, int, uintptr, u | |||
| 38 | 37 | // The default I/O priority is %G_PRIORITY_DEFAULT (i.e. 0), and lower numbers | |
| 39 | 38 | // indicate a higher priority. | |
| 40 | 39 | 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 | - | ||
| 43 | 40 | xContentSerializeAsync(StreamVar.GoPointer(), MimeTypeVar, ValueVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | |
| 44 | 41 | } | |
| 45 | 42 | ||
| @@ -47,7 +44,6 @@ var xContentSerializeFinish func(uintptr, **glib.Error) bool | |||
| 47 | 44 | ||
| 48 | 45 | // Finishes a content serialization operation. | |
| 49 | 46 | func ContentSerializeFinish(ResultVar gio.AsyncResult) (bool, error) { | |
| 50 | - | core.LazyRegister(&xContentSerializeFinish, "GDK", "gdk_content_serialize_finish", false) | |
| 51 | 47 | var cerr *glib.Error | |
| 52 | 48 | ||
| 53 | 49 | cret := xContentSerializeFinish(ResultVar.GoPointer(), &cerr) | |
| @@ -75,7 +71,6 @@ type ContentSerializer struct { | |||
| 75 | 71 | var xContentSerializerGLibType func() types.GType | |
| 76 | 72 | ||
| 77 | 73 | func ContentSerializerGLibType() types.GType { | |
| 78 | - | core.LazyRegister(&xContentSerializerGLibType, "GDK", "gdk_content_serializer_get_type", false) | |
| 79 | 74 | return xContentSerializerGLibType() | |
| 80 | 75 | } | |
| 81 | 76 | ||
| @@ -91,7 +86,6 @@ var xContentSerializerGetCancellable func(uintptr) uintptr | |||
| 91 | 86 | // | |
| 92 | 87 | // This is the `GCancellable` that was passed to [func@content_serialize_async]. | |
| 93 | 88 | func (x *ContentSerializer) GetCancellable() *gio.Cancellable { | |
| 94 | - | core.LazyRegister(&xContentSerializerGetCancellable, "GDK", "gdk_content_serializer_get_cancellable", false) | |
| 95 | 89 | var cls *gio.Cancellable | |
| 96 | 90 | ||
| 97 | 91 | cret := xContentSerializerGetCancellable(x.GoPointer()) | |
| @@ -109,8 +103,6 @@ var xContentSerializerGetGtype func(uintptr) types.GType | |||
| 109 | 103 | ||
| 110 | 104 | // Gets the `GType` to of the object to serialize. | |
| 111 | 105 | func (x *ContentSerializer) GetGtype() types.GType { | |
| 112 | - | core.LazyRegister(&xContentSerializerGetGtype, "GDK", "gdk_content_serializer_get_gtype", false) | |
| 113 | - | ||
| 114 | 106 | cret := xContentSerializerGetGtype(x.GoPointer()) | |
| 115 | 107 | return cret | |
| 116 | 108 | } | |
| @@ -119,8 +111,6 @@ var xContentSerializerGetMimeType func(uintptr) string | |||
| 119 | 111 | ||
| 120 | 112 | // Gets the mime type to serialize to. | |
| 121 | 113 | func (x *ContentSerializer) GetMimeType() string { | |
| 122 | - | core.LazyRegister(&xContentSerializerGetMimeType, "GDK", "gdk_content_serializer_get_mime_type", false) | |
| 123 | - | ||
| 124 | 114 | cret := xContentSerializerGetMimeType(x.GoPointer()) | |
| 125 | 115 | return cret | |
| 126 | 116 | } | |
| @@ -131,7 +121,6 @@ var xContentSerializerGetOutputStream func(uintptr) uintptr | |||
| 131 | 121 | // | |
| 132 | 122 | // This is the stream that was passed to [func@content_serialize_async]. | |
| 133 | 123 | func (x *ContentSerializer) GetOutputStream() *gio.OutputStream { | |
| 134 | - | core.LazyRegister(&xContentSerializerGetOutputStream, "GDK", "gdk_content_serializer_get_output_stream", false) | |
| 135 | 124 | var cls *gio.OutputStream | |
| 136 | 125 | ||
| 137 | 126 | cret := xContentSerializerGetOutputStream(x.GoPointer()) | |
| @@ -151,8 +140,6 @@ var xContentSerializerGetPriority func(uintptr) int | |||
| 151 | 140 | // | |
| 152 | 141 | // This is the priority that was passed to [func@content_serialize_async]. | |
| 153 | 142 | func (x *ContentSerializer) GetPriority() int { | |
| 154 | - | core.LazyRegister(&xContentSerializerGetPriority, "GDK", "gdk_content_serializer_get_priority", false) | |
| 155 | - | ||
| 156 | 143 | cret := xContentSerializerGetPriority(x.GoPointer()) | |
| 157 | 144 | return cret | |
| 158 | 145 | } | |
| @@ -163,8 +150,6 @@ var xContentSerializerGetTaskData func(uintptr) uintptr | |||
| 163 | 150 | // | |
| 164 | 151 | // See [method@Gdk.ContentSerializer.set_task_data]. | |
| 165 | 152 | func (x *ContentSerializer) GetTaskData() uintptr { | |
| 166 | - | core.LazyRegister(&xContentSerializerGetTaskData, "GDK", "gdk_content_serializer_get_task_data", false) | |
| 167 | - | ||
| 168 | 153 | cret := xContentSerializerGetTaskData(x.GoPointer()) | |
| 169 | 154 | return cret | |
| 170 | 155 | } | |
| @@ -173,8 +158,6 @@ var xContentSerializerGetUserData func(uintptr) uintptr | |||
| 173 | 158 | ||
| 174 | 159 | // Gets the user data that was passed when the serializer was registered. | |
| 175 | 160 | func (x *ContentSerializer) GetUserData() uintptr { | |
| 176 | - | core.LazyRegister(&xContentSerializerGetUserData, "GDK", "gdk_content_serializer_get_user_data", false) | |
| 177 | - | ||
| 178 | 161 | cret := xContentSerializerGetUserData(x.GoPointer()) | |
| 179 | 162 | return cret | |
| 180 | 163 | } | |
| @@ -183,8 +166,6 @@ var xContentSerializerGetValue func(uintptr) uintptr | |||
| 183 | 166 | ||
| 184 | 167 | // Gets the `GValue` to read the object to serialize from. | |
| 185 | 168 | func (x *ContentSerializer) GetValue() *gobject.Value { | |
| 186 | - | core.LazyRegister(&xContentSerializerGetValue, "GDK", "gdk_content_serializer_get_value", false) | |
| 187 | - | ||
| 188 | 169 | cret := xContentSerializerGetValue(x.GoPointer()) | |
| 189 | 170 | if cret == 0 { | |
| 190 | 171 | return nil | |
| @@ -198,8 +179,6 @@ var xContentSerializerReturnError func(uintptr, *glib.Error) | |||
| 198 | 179 | // | |
| 199 | 180 | // This function consumes @error. | |
| 200 | 181 | func (x *ContentSerializer) ReturnError(ErrorVar *glib.Error) { | |
| 201 | - | core.LazyRegister(&xContentSerializerReturnError, "GDK", "gdk_content_serializer_return_error", false) | |
| 202 | - | ||
| 203 | 182 | xContentSerializerReturnError(x.GoPointer(), ErrorVar) | |
| 204 | 183 | } | |
| 205 | 184 | ||
| @@ -207,8 +186,6 @@ var xContentSerializerReturnSuccess func(uintptr) | |||
| 207 | 186 | ||
| 208 | 187 | // Indicate that the serialization has been successfully completed. | |
| 209 | 188 | func (x *ContentSerializer) ReturnSuccess() { | |
| 210 | - | core.LazyRegister(&xContentSerializerReturnSuccess, "GDK", "gdk_content_serializer_return_success", false) | |
| 211 | - | ||
| 212 | 189 | xContentSerializerReturnSuccess(x.GoPointer()) | |
| 213 | 190 | } | |
| 214 | 191 | ||
| @@ -216,8 +193,6 @@ var xContentSerializerSetTaskData func(uintptr, uintptr, uintptr) | |||
| 216 | 193 | ||
| 217 | 194 | // Associate data with the current serialization operation. | |
| 218 | 195 | func (x *ContentSerializer) SetTaskData(DataVar uintptr, NotifyVar *glib.DestroyNotify) { | |
| 219 | - | core.LazyRegister(&xContentSerializerSetTaskData, "GDK", "gdk_content_serializer_set_task_data", false) | |
| 220 | - | ||
| 221 | 196 | xContentSerializerSetTaskData(x.GoPointer(), DataVar, glib.NewCallbackNullable(NotifyVar)) | |
| 222 | 197 | } | |
| 223 | 198 | ||
| @@ -276,4 +251,30 @@ func (x *ContentSerializer) LegacyPropagateError() (bool, error) { | |||
| 276 | 251 | func init() { | |
| 277 | 252 | core.SetPackageName("GDK", "gtk4") | |
| 278 | 253 | 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") | |
| 279 | 280 | } | |
| @@ -4,6 +4,7 @@ package gdk | |||||
| 4 | import ( | 4 | import ( | ||
| 5 | "unsafe" | 5 | "unsafe" | ||
| 6 | 6 | ||||
| 7 | + | "github.com/bnema/purego" | |||
| 7 | "github.com/bnema/puregotk/pkg/core" | 8 | "github.com/bnema/puregotk/pkg/core" | ||
| 8 | "github.com/bnema/puregotk/v4/gio" | 9 | "github.com/bnema/puregotk/v4/gio" | ||
| 9 | "github.com/bnema/puregotk/v4/glib" | 10 | "github.com/bnema/puregotk/v4/glib" | ||
| @@ -26,8 +27,6 @@ var xContentRegisterSerializer func(types.GType, string, uintptr, uintptr, uintp | |||||
| 26 | // use the last registered serializer for a given mime type, | 27 | // use the last registered serializer for a given mime type, | ||
| 27 | // so applications can override the built-in serializers. | 28 | // so applications can override the built-in serializers. | ||
| 28 | func ContentRegisterSerializer(TypeVar types.GType, MimeTypeVar string, SerializeVar *ContentSerializeFunc, DataVar uintptr, NotifyVar *glib.DestroyNotify) { | 29 | 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 | - | ||||
| 31 | xContentRegisterSerializer(TypeVar, MimeTypeVar, glib.NewCallback(SerializeVar), DataVar, glib.NewCallbackNullable(NotifyVar)) | 30 | xContentRegisterSerializer(TypeVar, MimeTypeVar, glib.NewCallback(SerializeVar), DataVar, glib.NewCallbackNullable(NotifyVar)) | ||
| 32 | } | 31 | } | ||
| 33 | 32 | ||||
| @@ -38,8 +37,6 @@ var xContentSerializeAsync func(uintptr, string, *gobject.Value, int, uintptr, u | |||||
| 38 | // The default I/O priority is %G_PRIORITY_DEFAULT (i.e. 0), and lower numbers | 37 | // The default I/O priority is %G_PRIORITY_DEFAULT (i.e. 0), and lower numbers | ||
| 39 | // indicate a higher priority. | 38 | // indicate a higher priority. | ||
| 40 | func ContentSerializeAsync(StreamVar *gio.OutputStream, MimeTypeVar string, ValueVar *gobject.Value, IoPriorityVar int, CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) { | 39 | 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 | - | ||||
| 43 | xContentSerializeAsync(StreamVar.GoPointer(), MimeTypeVar, ValueVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | 40 | xContentSerializeAsync(StreamVar.GoPointer(), MimeTypeVar, ValueVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | ||
| 44 | } | 41 | } | ||
| 45 | 42 | ||||
| @@ -47,7 +44,6 @@ var xContentSerializeFinish func(uintptr, **glib.Error) bool | |||||
| 47 | 44 | ||||
| 48 | // Finishes a content serialization operation. | 45 | // Finishes a content serialization operation. | ||
| 49 | func ContentSerializeFinish(ResultVar gio.AsyncResult) (bool, error) { | 46 | func ContentSerializeFinish(ResultVar gio.AsyncResult) (bool, error) { | ||
| 50 | - | core.LazyRegister(&xContentSerializeFinish, "GDK", "gdk_content_serialize_finish", false) | |||
| 51 | var cerr *glib.Error | 47 | var cerr *glib.Error | ||
| 52 | 48 | ||||
| 53 | cret := xContentSerializeFinish(ResultVar.GoPointer(), &cerr) | 49 | cret := xContentSerializeFinish(ResultVar.GoPointer(), &cerr) | ||
| @@ -75,7 +71,6 @@ type ContentSerializer struct { | |||||
| 75 | var xContentSerializerGLibType func() types.GType | 71 | var xContentSerializerGLibType func() types.GType | ||
| 76 | 72 | ||||
| 77 | func ContentSerializerGLibType() types.GType { | 73 | func ContentSerializerGLibType() types.GType { | ||
| 78 | - | core.LazyRegister(&xContentSerializerGLibType, "GDK", "gdk_content_serializer_get_type", false) | |||
| 79 | return xContentSerializerGLibType() | 74 | return xContentSerializerGLibType() | ||
| 80 | } | 75 | } | ||
| 81 | 76 | ||||
| @@ -91,7 +86,6 @@ var xContentSerializerGetCancellable func(uintptr) uintptr | |||||
| 91 | // | 86 | // | ||
| 92 | // This is the `GCancellable` that was passed to [func@content_serialize_async]. | 87 | // This is the `GCancellable` that was passed to [func@content_serialize_async]. | ||
| 93 | func (x *ContentSerializer) GetCancellable() *gio.Cancellable { | 88 | func (x *ContentSerializer) GetCancellable() *gio.Cancellable { | ||
| 94 | - | core.LazyRegister(&xContentSerializerGetCancellable, "GDK", "gdk_content_serializer_get_cancellable", false) | |||
| 95 | var cls *gio.Cancellable | 89 | var cls *gio.Cancellable | ||
| 96 | 90 | ||||
| 97 | cret := xContentSerializerGetCancellable(x.GoPointer()) | 91 | cret := xContentSerializerGetCancellable(x.GoPointer()) | ||
| @@ -109,8 +103,6 @@ var xContentSerializerGetGtype func(uintptr) types.GType | |||||
| 109 | 103 | ||||
| 110 | // Gets the `GType` to of the object to serialize. | 104 | // Gets the `GType` to of the object to serialize. | ||
| 111 | func (x *ContentSerializer) GetGtype() types.GType { | 105 | func (x *ContentSerializer) GetGtype() types.GType { | ||
| 112 | - | core.LazyRegister(&xContentSerializerGetGtype, "GDK", "gdk_content_serializer_get_gtype", false) | |||
| 113 | - | ||||
| 114 | cret := xContentSerializerGetGtype(x.GoPointer()) | 106 | cret := xContentSerializerGetGtype(x.GoPointer()) | ||
| 115 | return cret | 107 | return cret | ||
| 116 | } | 108 | } | ||
| @@ -119,8 +111,6 @@ var xContentSerializerGetMimeType func(uintptr) string | |||||
| 119 | 111 | ||||
| 120 | // Gets the mime type to serialize to. | 112 | // Gets the mime type to serialize to. | ||
| 121 | func (x *ContentSerializer) GetMimeType() string { | 113 | func (x *ContentSerializer) GetMimeType() string { | ||
| 122 | - | core.LazyRegister(&xContentSerializerGetMimeType, "GDK", "gdk_content_serializer_get_mime_type", false) | |||
| 123 | - | ||||
| 124 | cret := xContentSerializerGetMimeType(x.GoPointer()) | 114 | cret := xContentSerializerGetMimeType(x.GoPointer()) | ||
| 125 | return cret | 115 | return cret | ||
| 126 | } | 116 | } | ||
| @@ -131,7 +121,6 @@ var xContentSerializerGetOutputStream func(uintptr) uintptr | |||||
| 131 | // | 121 | // | ||
| 132 | // This is the stream that was passed to [func@content_serialize_async]. | 122 | // This is the stream that was passed to [func@content_serialize_async]. | ||
| 133 | func (x *ContentSerializer) GetOutputStream() *gio.OutputStream { | 123 | func (x *ContentSerializer) GetOutputStream() *gio.OutputStream { | ||
| 134 | - | core.LazyRegister(&xContentSerializerGetOutputStream, "GDK", "gdk_content_serializer_get_output_stream", false) | |||
| 135 | var cls *gio.OutputStream | 124 | var cls *gio.OutputStream | ||
| 136 | 125 | ||||
| 137 | cret := xContentSerializerGetOutputStream(x.GoPointer()) | 126 | cret := xContentSerializerGetOutputStream(x.GoPointer()) | ||
| @@ -151,8 +140,6 @@ var xContentSerializerGetPriority func(uintptr) int | |||||
| 151 | // | 140 | // | ||
| 152 | // This is the priority that was passed to [func@content_serialize_async]. | 141 | // This is the priority that was passed to [func@content_serialize_async]. | ||
| 153 | func (x *ContentSerializer) GetPriority() int { | 142 | func (x *ContentSerializer) GetPriority() int { | ||
| 154 | - | core.LazyRegister(&xContentSerializerGetPriority, "GDK", "gdk_content_serializer_get_priority", false) | |||
| 155 | - | ||||
| 156 | cret := xContentSerializerGetPriority(x.GoPointer()) | 143 | cret := xContentSerializerGetPriority(x.GoPointer()) | ||
| 157 | return cret | 144 | return cret | ||
| 158 | } | 145 | } | ||
| @@ -163,8 +150,6 @@ var xContentSerializerGetTaskData func(uintptr) uintptr | |||||
| 163 | // | 150 | // | ||
| 164 | // See [method@Gdk.ContentSerializer.set_task_data]. | 151 | // See [method@Gdk.ContentSerializer.set_task_data]. | ||
| 165 | func (x *ContentSerializer) GetTaskData() uintptr { | 152 | func (x *ContentSerializer) GetTaskData() uintptr { | ||
| 166 | - | core.LazyRegister(&xContentSerializerGetTaskData, "GDK", "gdk_content_serializer_get_task_data", false) | |||
| 167 | - | ||||
| 168 | cret := xContentSerializerGetTaskData(x.GoPointer()) | 153 | cret := xContentSerializerGetTaskData(x.GoPointer()) | ||
| 169 | return cret | 154 | return cret | ||
| 170 | } | 155 | } | ||
| @@ -173,8 +158,6 @@ var xContentSerializerGetUserData func(uintptr) uintptr | |||||
| 173 | 158 | ||||
| 174 | // Gets the user data that was passed when the serializer was registered. | 159 | // Gets the user data that was passed when the serializer was registered. | ||
| 175 | func (x *ContentSerializer) GetUserData() uintptr { | 160 | func (x *ContentSerializer) GetUserData() uintptr { | ||
| 176 | - | core.LazyRegister(&xContentSerializerGetUserData, "GDK", "gdk_content_serializer_get_user_data", false) | |||
| 177 | - | ||||
| 178 | cret := xContentSerializerGetUserData(x.GoPointer()) | 161 | cret := xContentSerializerGetUserData(x.GoPointer()) | ||
| 179 | return cret | 162 | return cret | ||
| 180 | } | 163 | } | ||
| @@ -183,8 +166,6 @@ var xContentSerializerGetValue func(uintptr) uintptr | |||||
| 183 | 166 | ||||
| 184 | // Gets the `GValue` to read the object to serialize from. | 167 | // Gets the `GValue` to read the object to serialize from. | ||
| 185 | func (x *ContentSerializer) GetValue() *gobject.Value { | 168 | func (x *ContentSerializer) GetValue() *gobject.Value { | ||
| 186 | - | core.LazyRegister(&xContentSerializerGetValue, "GDK", "gdk_content_serializer_get_value", false) | |||
| 187 | - | ||||
| 188 | cret := xContentSerializerGetValue(x.GoPointer()) | 169 | cret := xContentSerializerGetValue(x.GoPointer()) | ||
| 189 | if cret == 0 { | 170 | if cret == 0 { | ||
| 190 | return nil | 171 | return nil | ||
| @@ -198,8 +179,6 @@ var xContentSerializerReturnError func(uintptr, *glib.Error) | |||||
| 198 | // | 179 | // | ||
| 199 | // This function consumes @error. | 180 | // This function consumes @error. | ||
| 200 | func (x *ContentSerializer) ReturnError(ErrorVar *glib.Error) { | 181 | func (x *ContentSerializer) ReturnError(ErrorVar *glib.Error) { | ||
| 201 | - | core.LazyRegister(&xContentSerializerReturnError, "GDK", "gdk_content_serializer_return_error", false) | |||
| 202 | - | ||||
| 203 | xContentSerializerReturnError(x.GoPointer(), ErrorVar) | 182 | xContentSerializerReturnError(x.GoPointer(), ErrorVar) | ||
| 204 | } | 183 | } | ||
| 205 | 184 | ||||
| @@ -207,8 +186,6 @@ var xContentSerializerReturnSuccess func(uintptr) | |||||
| 207 | 186 | ||||
| 208 | // Indicate that the serialization has been successfully completed. | 187 | // Indicate that the serialization has been successfully completed. | ||
| 209 | func (x *ContentSerializer) ReturnSuccess() { | 188 | func (x *ContentSerializer) ReturnSuccess() { | ||
| 210 | - | core.LazyRegister(&xContentSerializerReturnSuccess, "GDK", "gdk_content_serializer_return_success", false) | |||
| 211 | - | ||||
| 212 | xContentSerializerReturnSuccess(x.GoPointer()) | 189 | xContentSerializerReturnSuccess(x.GoPointer()) | ||
| 213 | } | 190 | } | ||
| 214 | 191 | ||||
| @@ -216,8 +193,6 @@ var xContentSerializerSetTaskData func(uintptr, uintptr, uintptr) | |||||
| 216 | 193 | ||||
| 217 | // Associate data with the current serialization operation. | 194 | // Associate data with the current serialization operation. | ||
| 218 | func (x *ContentSerializer) SetTaskData(DataVar uintptr, NotifyVar *glib.DestroyNotify) { | 195 | func (x *ContentSerializer) SetTaskData(DataVar uintptr, NotifyVar *glib.DestroyNotify) { | ||
| 219 | - | core.LazyRegister(&xContentSerializerSetTaskData, "GDK", "gdk_content_serializer_set_task_data", false) | |||
| 220 | - | ||||
| 221 | xContentSerializerSetTaskData(x.GoPointer(), DataVar, glib.NewCallbackNullable(NotifyVar)) | 196 | xContentSerializerSetTaskData(x.GoPointer(), DataVar, glib.NewCallbackNullable(NotifyVar)) | ||
| 222 | } | 197 | } | ||
| 223 | 198 | ||||
| @@ -276,4 +251,30 @@ func (x *ContentSerializer) LegacyPropagateError() (bool, error) { | |||||
| 276 | func init() { | 251 | func init() { | ||
| 277 | core.SetPackageName("GDK", "gtk4") | 252 | core.SetPackageName("GDK", "gtk4") | ||
| 278 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | 253 | 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") | |||
| 279 | } | 280 | } | ||