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 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcursor.go +21 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdevice.go +33 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdevicepad.go +22 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdevicetool.go +18 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdisplay.go +43 -51 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdisplaymanager.go +20 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdmabuftexture.go +13 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdmabuftexturebuilder.go +41 -53 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdrag.go +28 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdragsurface.go +14 -6 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdragsurfacesize.go +13 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdrawcontext.go +18 -11 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdrop.go +24 -19
| @@ -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" | |
| @@ -32,7 +33,6 @@ type Drop struct { | |||
| 32 | 33 | var xDropGLibType func() types.GType | |
| 33 | 34 | ||
| 34 | 35 | func DropGLibType() types.GType { | |
| 35 | - | core.LazyRegister(&xDropGLibType, "GDK", "gdk_drop_get_type", false) | |
| 36 | 36 | return xDropGLibType() | |
| 37 | 37 | } | |
| 38 | 38 | ||
| @@ -49,8 +49,6 @@ var xDropFinish func(uintptr, DragAction) | |||
| 49 | 49 | // The @action must be a single action selected from the actions | |
| 50 | 50 | // available via [method@Gdk.Drop.get_actions]. | |
| 51 | 51 | func (x *Drop) Finish(ActionVar DragAction) { | |
| 52 | - | core.LazyRegister(&xDropFinish, "GDK", "gdk_drop_finish", false) | |
| 53 | - | ||
| 54 | 52 | xDropFinish(x.GoPointer(), ActionVar) | |
| 55 | 53 | } | |
| 56 | 54 | ||
| @@ -71,8 +69,6 @@ var xDropGetActions func(uintptr) DragAction | |||
| 71 | 69 | // [method@Gdk.Drop.status] or [method@Gdk.Drop.finish]. The source | |
| 72 | 70 | // side will not change this value anymore once a drop has started. | |
| 73 | 71 | func (x *Drop) GetActions() DragAction { | |
| 74 | - | core.LazyRegister(&xDropGetActions, "GDK", "gdk_drop_get_actions", false) | |
| 75 | - | ||
| 76 | 72 | cret := xDropGetActions(x.GoPointer()) | |
| 77 | 73 | return cret | |
| 78 | 74 | } | |
| @@ -81,7 +77,6 @@ var xDropGetDevice func(uintptr) uintptr | |||
| 81 | 77 | ||
| 82 | 78 | // Returns the `GdkDevice` performing the drop. | |
| 83 | 79 | func (x *Drop) GetDevice() *Device { | |
| 84 | - | core.LazyRegister(&xDropGetDevice, "GDK", "gdk_drop_get_device", false) | |
| 85 | 80 | var cls *Device | |
| 86 | 81 | ||
| 87 | 82 | cret := xDropGetDevice(x.GoPointer()) | |
| @@ -99,7 +94,6 @@ var xDropGetDisplay func(uintptr) uintptr | |||
| 99 | 94 | ||
| 100 | 95 | // Gets the `GdkDisplay` that @self was created for. | |
| 101 | 96 | func (x *Drop) GetDisplay() *Display { | |
| 102 | - | core.LazyRegister(&xDropGetDisplay, "GDK", "gdk_drop_get_display", false) | |
| 103 | 97 | var cls *Display | |
| 104 | 98 | ||
| 105 | 99 | cret := xDropGetDisplay(x.GoPointer()) | |
| @@ -120,7 +114,6 @@ var xDropGetDrag func(uintptr) uintptr | |||
| 120 | 114 | // | |
| 121 | 115 | // If it is not, `NULL` is returned. | |
| 122 | 116 | func (x *Drop) GetDrag() *Drag { | |
| 123 | - | core.LazyRegister(&xDropGetDrag, "GDK", "gdk_drop_get_drag", false) | |
| 124 | 117 | var cls *Drag | |
| 125 | 118 | ||
| 126 | 119 | cret := xDropGetDrag(x.GoPointer()) | |
| @@ -139,8 +132,6 @@ var xDropGetFormats func(uintptr) uintptr | |||
| 139 | 132 | // Returns the `GdkContentFormats` that the drop offers the data | |
| 140 | 133 | // to be read in. | |
| 141 | 134 | func (x *Drop) GetFormats() *ContentFormats { | |
| 142 | - | core.LazyRegister(&xDropGetFormats, "GDK", "gdk_drop_get_formats", false) | |
| 143 | - | ||
| 144 | 135 | cret := xDropGetFormats(x.GoPointer()) | |
| 145 | 136 | if cret == 0 { | |
| 146 | 137 | return nil | |
| @@ -152,7 +143,6 @@ var xDropGetSurface func(uintptr) uintptr | |||
| 152 | 143 | ||
| 153 | 144 | // Returns the `GdkSurface` performing the drop. | |
| 154 | 145 | func (x *Drop) GetSurface() *Surface { | |
| 155 | - | core.LazyRegister(&xDropGetSurface, "GDK", "gdk_drop_get_surface", false) | |
| 156 | 146 | var cls *Surface | |
| 157 | 147 | ||
| 158 | 148 | cret := xDropGetSurface(x.GoPointer()) | |
| @@ -171,8 +161,6 @@ var xDropReadAsync func(uintptr, []string, int, uintptr, uintptr, uintptr) | |||
| 171 | 161 | // Asynchronously read the dropped data from a `GdkDrop` | |
| 172 | 162 | // in a format that complies with one of the mime types. | |
| 173 | 163 | func (x *Drop) ReadAsync(MimeTypesVar []string, IoPriorityVar int, CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) { | |
| 174 | - | core.LazyRegister(&xDropReadAsync, "GDK", "gdk_drop_read_async", false) | |
| 175 | - | ||
| 176 | 164 | xDropReadAsync(x.GoPointer(), MimeTypesVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | |
| 177 | 165 | } | |
| 178 | 166 | ||
| @@ -187,7 +175,6 @@ var xDropReadFinish func(uintptr, uintptr, *string, **glib.Error) uintptr | |||
| 187 | 175 | // | |
| 188 | 176 | // See [method@Gdk.Drop.read_async]. | |
| 189 | 177 | func (x *Drop) ReadFinish(ResultVar gio.AsyncResult, OutMimeTypeVar *string) (*gio.InputStream, error) { | |
| 190 | - | core.LazyRegister(&xDropReadFinish, "GDK", "gdk_drop_read_finish", false) | |
| 191 | 178 | var cls *gio.InputStream | |
| 192 | 179 | var cerr *glib.Error | |
| 193 | 180 | ||
| @@ -213,8 +200,6 @@ var xDropReadValueAsync func(uintptr, types.GType, int, uintptr, uintptr, uintpt | |||
| 213 | 200 | // `GType`, the value will be copied directly. Otherwise, GDK will | |
| 214 | 201 | // try to use [func@Gdk.content_deserialize_async] to convert the data. | |
| 215 | 202 | func (x *Drop) ReadValueAsync(TypeVar types.GType, IoPriorityVar int, CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) { | |
| 216 | - | core.LazyRegister(&xDropReadValueAsync, "GDK", "gdk_drop_read_value_async", false) | |
| 217 | - | ||
| 218 | 203 | xDropReadValueAsync(x.GoPointer(), TypeVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | |
| 219 | 204 | } | |
| 220 | 205 | ||
| @@ -224,7 +209,6 @@ var xDropReadValueFinish func(uintptr, uintptr, **glib.Error) uintptr | |||
| 224 | 209 | // | |
| 225 | 210 | // See [method@Gdk.Drop.read_value_async]. | |
| 226 | 211 | func (x *Drop) ReadValueFinish(ResultVar gio.AsyncResult) (*gobject.Value, error) { | |
| 227 | - | core.LazyRegister(&xDropReadValueFinish, "GDK", "gdk_drop_read_value_finish", false) | |
| 228 | 212 | var cerr *glib.Error | |
| 229 | 213 | ||
| 230 | 214 | cret := xDropReadValueFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr) | |
| @@ -253,8 +237,6 @@ var xDropStatus func(uintptr, DragAction, DragAction) | |||
| 253 | 237 | // not yet know the exact actions it supports, it should set any possible | |
| 254 | 238 | // actions first and then later call this function again. | |
| 255 | 239 | func (x *Drop) Status(ActionsVar DragAction, PreferredVar DragAction) { | |
| 256 | - | core.LazyRegister(&xDropStatus, "GDK", "gdk_drop_status", false) | |
| 257 | - | ||
| 258 | 240 | xDropStatus(x.GoPointer(), ActionsVar, PreferredVar) | |
| 259 | 241 | } | |
| 260 | 242 | ||
| @@ -289,4 +271,27 @@ func (x *Drop) GetPropertyFormats() uintptr { | |||
| 289 | 271 | func init() { | |
| 290 | 272 | core.SetPackageName("GDK", "gtk4") | |
| 291 | 273 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | |
| 274 | + | var libs []uintptr | |
| 275 | + | for _, libPath := range core.GetPaths("GDK") { | |
| 276 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 277 | + | if err != nil { | |
| 278 | + | panic(err) | |
| 279 | + | } | |
| 280 | + | libs = append(libs, lib) | |
| 281 | + | } | |
| 282 | + | ||
| 283 | + | core.PuregoSafeRegister(&xDropGLibType, libs, "gdk_drop_get_type") | |
| 284 | + | ||
| 285 | + | core.PuregoSafeRegister(&xDropFinish, libs, "gdk_drop_finish") | |
| 286 | + | core.PuregoSafeRegister(&xDropGetActions, libs, "gdk_drop_get_actions") | |
| 287 | + | core.PuregoSafeRegister(&xDropGetDevice, libs, "gdk_drop_get_device") | |
| 288 | + | core.PuregoSafeRegister(&xDropGetDisplay, libs, "gdk_drop_get_display") | |
| 289 | + | core.PuregoSafeRegister(&xDropGetDrag, libs, "gdk_drop_get_drag") | |
| 290 | + | core.PuregoSafeRegister(&xDropGetFormats, libs, "gdk_drop_get_formats") | |
| 291 | + | core.PuregoSafeRegister(&xDropGetSurface, libs, "gdk_drop_get_surface") | |
| 292 | + | core.PuregoSafeRegister(&xDropReadAsync, libs, "gdk_drop_read_async") | |
| 293 | + | core.PuregoSafeRegister(&xDropReadFinish, libs, "gdk_drop_read_finish") | |
| 294 | + | core.PuregoSafeRegister(&xDropReadValueAsync, libs, "gdk_drop_read_value_async") | |
| 295 | + | core.PuregoSafeRegister(&xDropReadValueFinish, libs, "gdk_drop_read_value_finish") | |
| 296 | + | core.PuregoSafeRegister(&xDropStatus, libs, "gdk_drop_status") | |
| 292 | 297 | } | |
| @@ -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" | ||
| @@ -32,7 +33,6 @@ type Drop struct { | |||||
| 32 | var xDropGLibType func() types.GType | 33 | var xDropGLibType func() types.GType | ||
| 33 | 34 | ||||
| 34 | func DropGLibType() types.GType { | 35 | func DropGLibType() types.GType { | ||
| 35 | - | core.LazyRegister(&xDropGLibType, "GDK", "gdk_drop_get_type", false) | |||
| 36 | return xDropGLibType() | 36 | return xDropGLibType() | ||
| 37 | } | 37 | } | ||
| 38 | 38 | ||||
| @@ -49,8 +49,6 @@ var xDropFinish func(uintptr, DragAction) | |||||
| 49 | // The @action must be a single action selected from the actions | 49 | // The @action must be a single action selected from the actions | ||
| 50 | // available via [method@Gdk.Drop.get_actions]. | 50 | // available via [method@Gdk.Drop.get_actions]. | ||
| 51 | func (x *Drop) Finish(ActionVar DragAction) { | 51 | func (x *Drop) Finish(ActionVar DragAction) { | ||
| 52 | - | core.LazyRegister(&xDropFinish, "GDK", "gdk_drop_finish", false) | |||
| 53 | - | ||||
| 54 | xDropFinish(x.GoPointer(), ActionVar) | 52 | xDropFinish(x.GoPointer(), ActionVar) | ||
| 55 | } | 53 | } | ||
| 56 | 54 | ||||
| @@ -71,8 +69,6 @@ var xDropGetActions func(uintptr) DragAction | |||||
| 71 | // [method@Gdk.Drop.status] or [method@Gdk.Drop.finish]. The source | 69 | // [method@Gdk.Drop.status] or [method@Gdk.Drop.finish]. The source | ||
| 72 | // side will not change this value anymore once a drop has started. | 70 | // side will not change this value anymore once a drop has started. | ||
| 73 | func (x *Drop) GetActions() DragAction { | 71 | func (x *Drop) GetActions() DragAction { | ||
| 74 | - | core.LazyRegister(&xDropGetActions, "GDK", "gdk_drop_get_actions", false) | |||
| 75 | - | ||||
| 76 | cret := xDropGetActions(x.GoPointer()) | 72 | cret := xDropGetActions(x.GoPointer()) | ||
| 77 | return cret | 73 | return cret | ||
| 78 | } | 74 | } | ||
| @@ -81,7 +77,6 @@ var xDropGetDevice func(uintptr) uintptr | |||||
| 81 | 77 | ||||
| 82 | // Returns the `GdkDevice` performing the drop. | 78 | // Returns the `GdkDevice` performing the drop. | ||
| 83 | func (x *Drop) GetDevice() *Device { | 79 | func (x *Drop) GetDevice() *Device { | ||
| 84 | - | core.LazyRegister(&xDropGetDevice, "GDK", "gdk_drop_get_device", false) | |||
| 85 | var cls *Device | 80 | var cls *Device | ||
| 86 | 81 | ||||
| 87 | cret := xDropGetDevice(x.GoPointer()) | 82 | cret := xDropGetDevice(x.GoPointer()) | ||
| @@ -99,7 +94,6 @@ var xDropGetDisplay func(uintptr) uintptr | |||||
| 99 | 94 | ||||
| 100 | // Gets the `GdkDisplay` that @self was created for. | 95 | // Gets the `GdkDisplay` that @self was created for. | ||
| 101 | func (x *Drop) GetDisplay() *Display { | 96 | func (x *Drop) GetDisplay() *Display { | ||
| 102 | - | core.LazyRegister(&xDropGetDisplay, "GDK", "gdk_drop_get_display", false) | |||
| 103 | var cls *Display | 97 | var cls *Display | ||
| 104 | 98 | ||||
| 105 | cret := xDropGetDisplay(x.GoPointer()) | 99 | cret := xDropGetDisplay(x.GoPointer()) | ||
| @@ -120,7 +114,6 @@ var xDropGetDrag func(uintptr) uintptr | |||||
| 120 | // | 114 | // | ||
| 121 | // If it is not, `NULL` is returned. | 115 | // If it is not, `NULL` is returned. | ||
| 122 | func (x *Drop) GetDrag() *Drag { | 116 | func (x *Drop) GetDrag() *Drag { | ||
| 123 | - | core.LazyRegister(&xDropGetDrag, "GDK", "gdk_drop_get_drag", false) | |||
| 124 | var cls *Drag | 117 | var cls *Drag | ||
| 125 | 118 | ||||
| 126 | cret := xDropGetDrag(x.GoPointer()) | 119 | cret := xDropGetDrag(x.GoPointer()) | ||
| @@ -139,8 +132,6 @@ var xDropGetFormats func(uintptr) uintptr | |||||
| 139 | // Returns the `GdkContentFormats` that the drop offers the data | 132 | // Returns the `GdkContentFormats` that the drop offers the data | ||
| 140 | // to be read in. | 133 | // to be read in. | ||
| 141 | func (x *Drop) GetFormats() *ContentFormats { | 134 | func (x *Drop) GetFormats() *ContentFormats { | ||
| 142 | - | core.LazyRegister(&xDropGetFormats, "GDK", "gdk_drop_get_formats", false) | |||
| 143 | - | ||||
| 144 | cret := xDropGetFormats(x.GoPointer()) | 135 | cret := xDropGetFormats(x.GoPointer()) | ||
| 145 | if cret == 0 { | 136 | if cret == 0 { | ||
| 146 | return nil | 137 | return nil | ||
| @@ -152,7 +143,6 @@ var xDropGetSurface func(uintptr) uintptr | |||||
| 152 | 143 | ||||
| 153 | // Returns the `GdkSurface` performing the drop. | 144 | // Returns the `GdkSurface` performing the drop. | ||
| 154 | func (x *Drop) GetSurface() *Surface { | 145 | func (x *Drop) GetSurface() *Surface { | ||
| 155 | - | core.LazyRegister(&xDropGetSurface, "GDK", "gdk_drop_get_surface", false) | |||
| 156 | var cls *Surface | 146 | var cls *Surface | ||
| 157 | 147 | ||||
| 158 | cret := xDropGetSurface(x.GoPointer()) | 148 | cret := xDropGetSurface(x.GoPointer()) | ||
| @@ -171,8 +161,6 @@ var xDropReadAsync func(uintptr, []string, int, uintptr, uintptr, uintptr) | |||||
| 171 | // Asynchronously read the dropped data from a `GdkDrop` | 161 | // Asynchronously read the dropped data from a `GdkDrop` | ||
| 172 | // in a format that complies with one of the mime types. | 162 | // in a format that complies with one of the mime types. | ||
| 173 | func (x *Drop) ReadAsync(MimeTypesVar []string, IoPriorityVar int, CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) { | 163 | func (x *Drop) ReadAsync(MimeTypesVar []string, IoPriorityVar int, CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) { | ||
| 174 | - | core.LazyRegister(&xDropReadAsync, "GDK", "gdk_drop_read_async", false) | |||
| 175 | - | ||||
| 176 | xDropReadAsync(x.GoPointer(), MimeTypesVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | 164 | xDropReadAsync(x.GoPointer(), MimeTypesVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | ||
| 177 | } | 165 | } | ||
| 178 | 166 | ||||
| @@ -187,7 +175,6 @@ var xDropReadFinish func(uintptr, uintptr, *string, **glib.Error) uintptr | |||||
| 187 | // | 175 | // | ||
| 188 | // See [method@Gdk.Drop.read_async]. | 176 | // See [method@Gdk.Drop.read_async]. | ||
| 189 | func (x *Drop) ReadFinish(ResultVar gio.AsyncResult, OutMimeTypeVar *string) (*gio.InputStream, error) { | 177 | func (x *Drop) ReadFinish(ResultVar gio.AsyncResult, OutMimeTypeVar *string) (*gio.InputStream, error) { | ||
| 190 | - | core.LazyRegister(&xDropReadFinish, "GDK", "gdk_drop_read_finish", false) | |||
| 191 | var cls *gio.InputStream | 178 | var cls *gio.InputStream | ||
| 192 | var cerr *glib.Error | 179 | var cerr *glib.Error | ||
| 193 | 180 | ||||
| @@ -213,8 +200,6 @@ var xDropReadValueAsync func(uintptr, types.GType, int, uintptr, uintptr, uintpt | |||||
| 213 | // `GType`, the value will be copied directly. Otherwise, GDK will | 200 | // `GType`, the value will be copied directly. Otherwise, GDK will | ||
| 214 | // try to use [func@Gdk.content_deserialize_async] to convert the data. | 201 | // try to use [func@Gdk.content_deserialize_async] to convert the data. | ||
| 215 | func (x *Drop) ReadValueAsync(TypeVar types.GType, IoPriorityVar int, CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) { | 202 | func (x *Drop) ReadValueAsync(TypeVar types.GType, IoPriorityVar int, CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) { | ||
| 216 | - | core.LazyRegister(&xDropReadValueAsync, "GDK", "gdk_drop_read_value_async", false) | |||
| 217 | - | ||||
| 218 | xDropReadValueAsync(x.GoPointer(), TypeVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | 203 | xDropReadValueAsync(x.GoPointer(), TypeVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | ||
| 219 | } | 204 | } | ||
| 220 | 205 | ||||
| @@ -224,7 +209,6 @@ var xDropReadValueFinish func(uintptr, uintptr, **glib.Error) uintptr | |||||
| 224 | // | 209 | // | ||
| 225 | // See [method@Gdk.Drop.read_value_async]. | 210 | // See [method@Gdk.Drop.read_value_async]. | ||
| 226 | func (x *Drop) ReadValueFinish(ResultVar gio.AsyncResult) (*gobject.Value, error) { | 211 | func (x *Drop) ReadValueFinish(ResultVar gio.AsyncResult) (*gobject.Value, error) { | ||
| 227 | - | core.LazyRegister(&xDropReadValueFinish, "GDK", "gdk_drop_read_value_finish", false) | |||
| 228 | var cerr *glib.Error | 212 | var cerr *glib.Error | ||
| 229 | 213 | ||||
| 230 | cret := xDropReadValueFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr) | 214 | cret := xDropReadValueFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr) | ||
| @@ -253,8 +237,6 @@ var xDropStatus func(uintptr, DragAction, DragAction) | |||||
| 253 | // not yet know the exact actions it supports, it should set any possible | 237 | // not yet know the exact actions it supports, it should set any possible | ||
| 254 | // actions first and then later call this function again. | 238 | // actions first and then later call this function again. | ||
| 255 | func (x *Drop) Status(ActionsVar DragAction, PreferredVar DragAction) { | 239 | func (x *Drop) Status(ActionsVar DragAction, PreferredVar DragAction) { | ||
| 256 | - | core.LazyRegister(&xDropStatus, "GDK", "gdk_drop_status", false) | |||
| 257 | - | ||||
| 258 | xDropStatus(x.GoPointer(), ActionsVar, PreferredVar) | 240 | xDropStatus(x.GoPointer(), ActionsVar, PreferredVar) | ||
| 259 | } | 241 | } | ||
| 260 | 242 | ||||
| @@ -289,4 +271,27 @@ func (x *Drop) GetPropertyFormats() uintptr { | |||||
| 289 | func init() { | 271 | func init() { | ||
| 290 | core.SetPackageName("GDK", "gtk4") | 272 | core.SetPackageName("GDK", "gtk4") | ||
| 291 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | 273 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | ||
| 274 | + | var libs []uintptr | |||
| 275 | + | for _, libPath := range core.GetPaths("GDK") { | |||
| 276 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 277 | + | if err != nil { | |||
| 278 | + | panic(err) | |||
| 279 | + | } | |||
| 280 | + | libs = append(libs, lib) | |||
| 281 | + | } | |||
| 282 | + | ||||
| 283 | + | core.PuregoSafeRegister(&xDropGLibType, libs, "gdk_drop_get_type") | |||
| 284 | + | ||||
| 285 | + | core.PuregoSafeRegister(&xDropFinish, libs, "gdk_drop_finish") | |||
| 286 | + | core.PuregoSafeRegister(&xDropGetActions, libs, "gdk_drop_get_actions") | |||
| 287 | + | core.PuregoSafeRegister(&xDropGetDevice, libs, "gdk_drop_get_device") | |||
| 288 | + | core.PuregoSafeRegister(&xDropGetDisplay, libs, "gdk_drop_get_display") | |||
| 289 | + | core.PuregoSafeRegister(&xDropGetDrag, libs, "gdk_drop_get_drag") | |||
| 290 | + | core.PuregoSafeRegister(&xDropGetFormats, libs, "gdk_drop_get_formats") | |||
| 291 | + | core.PuregoSafeRegister(&xDropGetSurface, libs, "gdk_drop_get_surface") | |||
| 292 | + | core.PuregoSafeRegister(&xDropReadAsync, libs, "gdk_drop_read_async") | |||
| 293 | + | core.PuregoSafeRegister(&xDropReadFinish, libs, "gdk_drop_read_finish") | |||
| 294 | + | core.PuregoSafeRegister(&xDropReadValueAsync, libs, "gdk_drop_read_value_async") | |||
| 295 | + | core.PuregoSafeRegister(&xDropReadValueFinish, libs, "gdk_drop_read_value_finish") | |||
| 296 | + | core.PuregoSafeRegister(&xDropStatus, libs, "gdk_drop_status") | |||
| 292 | } | 297 | } | ||