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
| @@ -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/glib" | |
| 9 | 10 | "github.com/bnema/puregotk/v4/gobject" | |
| @@ -16,7 +17,6 @@ type DragCancelReason int | |||
| 16 | 17 | var xDragCancelReasonGLibType func() types.GType | |
| 17 | 18 | ||
| 18 | 19 | func DragCancelReasonGLibType() types.GType { | |
| 19 | - | core.LazyRegister(&xDragCancelReasonGLibType, "GDK", "gdk_drag_cancel_reason_get_type", false) | |
| 20 | 20 | return xDragCancelReasonGLibType() | |
| 21 | 21 | } | |
| 22 | 22 | ||
| @@ -38,8 +38,6 @@ var xDragActionIsUnique func(DragAction) bool | |||
| 38 | 38 | // When @action is `GDK_ACTION_NONE` - ie no action was given, `TRUE` | |
| 39 | 39 | // is returned. | |
| 40 | 40 | func DragActionIsUnique(ActionVar DragAction) bool { | |
| 41 | - | core.LazyRegister(&xDragActionIsUnique, "GDK", "gdk_drag_action_is_unique", false) | |
| 42 | - | ||
| 43 | 41 | cret := xDragActionIsUnique(ActionVar) | |
| 44 | 42 | return cret | |
| 45 | 43 | } | |
| @@ -61,7 +59,6 @@ type Drag struct { | |||
| 61 | 59 | var xDragGLibType func() types.GType | |
| 62 | 60 | ||
| 63 | 61 | func DragGLibType() types.GType { | |
| 64 | - | core.LazyRegister(&xDragGLibType, "GDK", "gdk_drag_get_type", false) | |
| 65 | 62 | return xDragGLibType() | |
| 66 | 63 | } | |
| 67 | 64 | ||
| @@ -85,8 +82,6 @@ var xDragDropDone func(uintptr, bool) | |||
| 85 | 82 | // call as effective, if this function is called multiple times, | |
| 86 | 83 | // all subsequent calls will be ignored. | |
| 87 | 84 | func (x *Drag) DropDone(SuccessVar bool) { | |
| 88 | - | core.LazyRegister(&xDragDropDone, "GDK", "gdk_drag_drop_done", false) | |
| 89 | - | ||
| 90 | 85 | xDragDropDone(x.GoPointer(), SuccessVar) | |
| 91 | 86 | } | |
| 92 | 87 | ||
| @@ -94,8 +89,6 @@ var xDragGetActions func(uintptr) DragAction | |||
| 94 | 89 | ||
| 95 | 90 | // Determines the bitmask of possible actions proposed by the source. | |
| 96 | 91 | func (x *Drag) GetActions() DragAction { | |
| 97 | - | core.LazyRegister(&xDragGetActions, "GDK", "gdk_drag_get_actions", false) | |
| 98 | - | ||
| 99 | 92 | cret := xDragGetActions(x.GoPointer()) | |
| 100 | 93 | return cret | |
| 101 | 94 | } | |
| @@ -104,7 +97,6 @@ var xDragGetContent func(uintptr) uintptr | |||
| 104 | 97 | ||
| 105 | 98 | // Returns the `GdkContentProvider` associated to the `GdkDrag` object. | |
| 106 | 99 | func (x *Drag) GetContent() *ContentProvider { | |
| 107 | - | core.LazyRegister(&xDragGetContent, "GDK", "gdk_drag_get_content", false) | |
| 108 | 100 | var cls *ContentProvider | |
| 109 | 101 | ||
| 110 | 102 | cret := xDragGetContent(x.GoPointer()) | |
| @@ -122,7 +114,6 @@ var xDragGetDevice func(uintptr) uintptr | |||
| 122 | 114 | ||
| 123 | 115 | // Returns the `GdkDevice` associated to the `GdkDrag` object. | |
| 124 | 116 | func (x *Drag) GetDevice() *Device { | |
| 125 | - | core.LazyRegister(&xDragGetDevice, "GDK", "gdk_drag_get_device", false) | |
| 126 | 117 | var cls *Device | |
| 127 | 118 | ||
| 128 | 119 | cret := xDragGetDevice(x.GoPointer()) | |
| @@ -140,7 +131,6 @@ var xDragGetDisplay func(uintptr) uintptr | |||
| 140 | 131 | ||
| 141 | 132 | // Gets the `GdkDisplay` that the drag object was created for. | |
| 142 | 133 | func (x *Drag) GetDisplay() *Display { | |
| 143 | - | core.LazyRegister(&xDragGetDisplay, "GDK", "gdk_drag_get_display", false) | |
| 144 | 134 | var cls *Display | |
| 145 | 135 | ||
| 146 | 136 | cret := xDragGetDisplay(x.GoPointer()) | |
| @@ -164,7 +154,6 @@ var xDragGetDragSurface func(uintptr) uintptr | |||
| 164 | 154 | // drag operation. The surface is owned by @drag and will be destroyed | |
| 165 | 155 | // when the drag operation is over. | |
| 166 | 156 | func (x *Drag) GetDragSurface() *Surface { | |
| 167 | - | core.LazyRegister(&xDragGetDragSurface, "GDK", "gdk_drag_get_drag_surface", false) | |
| 168 | 157 | var cls *Surface | |
| 169 | 158 | ||
| 170 | 159 | cret := xDragGetDragSurface(x.GoPointer()) | |
| @@ -182,8 +171,6 @@ var xDragGetFormats func(uintptr) uintptr | |||
| 182 | 171 | ||
| 183 | 172 | // Retrieves the formats supported by this `GdkDrag` object. | |
| 184 | 173 | func (x *Drag) GetFormats() *ContentFormats { | |
| 185 | - | core.LazyRegister(&xDragGetFormats, "GDK", "gdk_drag_get_formats", false) | |
| 186 | - | ||
| 187 | 174 | cret := xDragGetFormats(x.GoPointer()) | |
| 188 | 175 | if cret == 0 { | |
| 189 | 176 | return nil | |
| @@ -195,8 +182,6 @@ var xDragGetSelectedAction func(uintptr) DragAction | |||
| 195 | 182 | ||
| 196 | 183 | // Determines the action chosen by the drag destination. | |
| 197 | 184 | func (x *Drag) GetSelectedAction() DragAction { | |
| 198 | - | core.LazyRegister(&xDragGetSelectedAction, "GDK", "gdk_drag_get_selected_action", false) | |
| 199 | - | ||
| 200 | 185 | cret := xDragGetSelectedAction(x.GoPointer()) | |
| 201 | 186 | return cret | |
| 202 | 187 | } | |
| @@ -205,7 +190,6 @@ var xDragGetSurface func(uintptr) uintptr | |||
| 205 | 190 | ||
| 206 | 191 | // Returns the `GdkSurface` where the drag originates. | |
| 207 | 192 | func (x *Drag) GetSurface() *Surface { | |
| 208 | - | core.LazyRegister(&xDragGetSurface, "GDK", "gdk_drag_get_surface", false) | |
| 209 | 193 | var cls *Surface | |
| 210 | 194 | ||
| 211 | 195 | cret := xDragGetSurface(x.GoPointer()) | |
| @@ -226,8 +210,6 @@ var xDragSetHotspot func(uintptr, int, int) | |||
| 226 | 210 | // | |
| 227 | 211 | // Initially, the hotspot is at the top left corner of the drag surface. | |
| 228 | 212 | func (x *Drag) SetHotspot(HotXVar int, HotYVar int) { | |
| 229 | - | core.LazyRegister(&xDragSetHotspot, "GDK", "gdk_drag_set_hotspot", false) | |
| 230 | - | ||
| 231 | 213 | xDragSetHotspot(x.GoPointer(), HotXVar, HotYVar) | |
| 232 | 214 | } | |
| 233 | 215 | ||
| @@ -347,7 +329,6 @@ var xDragBegin func(uintptr, uintptr, uintptr, DragAction, float64, float64) uin | |||
| 347 | 329 | // the source if [method@Gdk.Drag.get_selected_action] returns | |
| 348 | 330 | // %GDK_ACTION_MOVE. | |
| 349 | 331 | func DragBegin(SurfaceVar *Surface, DeviceVar *Device, ContentVar *ContentProvider, ActionsVar DragAction, DxVar float64, DyVar float64) *Drag { | |
| 350 | - | core.LazyRegister(&xDragBegin, "GDK", "gdk_drag_begin", false) | |
| 351 | 332 | var cls *Drag | |
| 352 | 333 | ||
| 353 | 334 | cret := xDragBegin(SurfaceVar.GoPointer(), DeviceVar.GoPointer(), ContentVar.GoPointer(), ActionsVar, DxVar, DyVar) | |
| @@ -363,4 +344,31 @@ func DragBegin(SurfaceVar *Surface, DeviceVar *Device, ContentVar *ContentProvid | |||
| 363 | 344 | func init() { | |
| 364 | 345 | core.SetPackageName("GDK", "gtk4") | |
| 365 | 346 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | |
| 347 | + | var libs []uintptr | |
| 348 | + | for _, libPath := range core.GetPaths("GDK") { | |
| 349 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 350 | + | if err != nil { | |
| 351 | + | panic(err) | |
| 352 | + | } | |
| 353 | + | libs = append(libs, lib) | |
| 354 | + | } | |
| 355 | + | ||
| 356 | + | core.PuregoSafeRegister(&xDragCancelReasonGLibType, libs, "gdk_drag_cancel_reason_get_type") | |
| 357 | + | ||
| 358 | + | core.PuregoSafeRegister(&xDragActionIsUnique, libs, "gdk_drag_action_is_unique") | |
| 359 | + | ||
| 360 | + | core.PuregoSafeRegister(&xDragGLibType, libs, "gdk_drag_get_type") | |
| 361 | + | ||
| 362 | + | core.PuregoSafeRegister(&xDragDropDone, libs, "gdk_drag_drop_done") | |
| 363 | + | core.PuregoSafeRegister(&xDragGetActions, libs, "gdk_drag_get_actions") | |
| 364 | + | core.PuregoSafeRegister(&xDragGetContent, libs, "gdk_drag_get_content") | |
| 365 | + | core.PuregoSafeRegister(&xDragGetDevice, libs, "gdk_drag_get_device") | |
| 366 | + | core.PuregoSafeRegister(&xDragGetDisplay, libs, "gdk_drag_get_display") | |
| 367 | + | core.PuregoSafeRegister(&xDragGetDragSurface, libs, "gdk_drag_get_drag_surface") | |
| 368 | + | core.PuregoSafeRegister(&xDragGetFormats, libs, "gdk_drag_get_formats") | |
| 369 | + | core.PuregoSafeRegister(&xDragGetSelectedAction, libs, "gdk_drag_get_selected_action") | |
| 370 | + | core.PuregoSafeRegister(&xDragGetSurface, libs, "gdk_drag_get_surface") | |
| 371 | + | core.PuregoSafeRegister(&xDragSetHotspot, libs, "gdk_drag_set_hotspot") | |
| 372 | + | ||
| 373 | + | core.PuregoSafeRegister(&xDragBegin, libs, "gdk_drag_begin") | |
| 366 | 374 | } | |
| @@ -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/glib" | 9 | "github.com/bnema/puregotk/v4/glib" | ||
| 9 | "github.com/bnema/puregotk/v4/gobject" | 10 | "github.com/bnema/puregotk/v4/gobject" | ||
| @@ -16,7 +17,6 @@ type DragCancelReason int | |||||
| 16 | var xDragCancelReasonGLibType func() types.GType | 17 | var xDragCancelReasonGLibType func() types.GType | ||
| 17 | 18 | ||||
| 18 | func DragCancelReasonGLibType() types.GType { | 19 | func DragCancelReasonGLibType() types.GType { | ||
| 19 | - | core.LazyRegister(&xDragCancelReasonGLibType, "GDK", "gdk_drag_cancel_reason_get_type", false) | |||
| 20 | return xDragCancelReasonGLibType() | 20 | return xDragCancelReasonGLibType() | ||
| 21 | } | 21 | } | ||
| 22 | 22 | ||||
| @@ -38,8 +38,6 @@ var xDragActionIsUnique func(DragAction) bool | |||||
| 38 | // When @action is `GDK_ACTION_NONE` - ie no action was given, `TRUE` | 38 | // When @action is `GDK_ACTION_NONE` - ie no action was given, `TRUE` | ||
| 39 | // is returned. | 39 | // is returned. | ||
| 40 | func DragActionIsUnique(ActionVar DragAction) bool { | 40 | func DragActionIsUnique(ActionVar DragAction) bool { | ||
| 41 | - | core.LazyRegister(&xDragActionIsUnique, "GDK", "gdk_drag_action_is_unique", false) | |||
| 42 | - | ||||
| 43 | cret := xDragActionIsUnique(ActionVar) | 41 | cret := xDragActionIsUnique(ActionVar) | ||
| 44 | return cret | 42 | return cret | ||
| 45 | } | 43 | } | ||
| @@ -61,7 +59,6 @@ type Drag struct { | |||||
| 61 | var xDragGLibType func() types.GType | 59 | var xDragGLibType func() types.GType | ||
| 62 | 60 | ||||
| 63 | func DragGLibType() types.GType { | 61 | func DragGLibType() types.GType { | ||
| 64 | - | core.LazyRegister(&xDragGLibType, "GDK", "gdk_drag_get_type", false) | |||
| 65 | return xDragGLibType() | 62 | return xDragGLibType() | ||
| 66 | } | 63 | } | ||
| 67 | 64 | ||||
| @@ -85,8 +82,6 @@ var xDragDropDone func(uintptr, bool) | |||||
| 85 | // call as effective, if this function is called multiple times, | 82 | // call as effective, if this function is called multiple times, | ||
| 86 | // all subsequent calls will be ignored. | 83 | // all subsequent calls will be ignored. | ||
| 87 | func (x *Drag) DropDone(SuccessVar bool) { | 84 | func (x *Drag) DropDone(SuccessVar bool) { | ||
| 88 | - | core.LazyRegister(&xDragDropDone, "GDK", "gdk_drag_drop_done", false) | |||
| 89 | - | ||||
| 90 | xDragDropDone(x.GoPointer(), SuccessVar) | 85 | xDragDropDone(x.GoPointer(), SuccessVar) | ||
| 91 | } | 86 | } | ||
| 92 | 87 | ||||
| @@ -94,8 +89,6 @@ var xDragGetActions func(uintptr) DragAction | |||||
| 94 | 89 | ||||
| 95 | // Determines the bitmask of possible actions proposed by the source. | 90 | // Determines the bitmask of possible actions proposed by the source. | ||
| 96 | func (x *Drag) GetActions() DragAction { | 91 | func (x *Drag) GetActions() DragAction { | ||
| 97 | - | core.LazyRegister(&xDragGetActions, "GDK", "gdk_drag_get_actions", false) | |||
| 98 | - | ||||
| 99 | cret := xDragGetActions(x.GoPointer()) | 92 | cret := xDragGetActions(x.GoPointer()) | ||
| 100 | return cret | 93 | return cret | ||
| 101 | } | 94 | } | ||
| @@ -104,7 +97,6 @@ var xDragGetContent func(uintptr) uintptr | |||||
| 104 | 97 | ||||
| 105 | // Returns the `GdkContentProvider` associated to the `GdkDrag` object. | 98 | // Returns the `GdkContentProvider` associated to the `GdkDrag` object. | ||
| 106 | func (x *Drag) GetContent() *ContentProvider { | 99 | func (x *Drag) GetContent() *ContentProvider { | ||
| 107 | - | core.LazyRegister(&xDragGetContent, "GDK", "gdk_drag_get_content", false) | |||
| 108 | var cls *ContentProvider | 100 | var cls *ContentProvider | ||
| 109 | 101 | ||||
| 110 | cret := xDragGetContent(x.GoPointer()) | 102 | cret := xDragGetContent(x.GoPointer()) | ||
| @@ -122,7 +114,6 @@ var xDragGetDevice func(uintptr) uintptr | |||||
| 122 | 114 | ||||
| 123 | // Returns the `GdkDevice` associated to the `GdkDrag` object. | 115 | // Returns the `GdkDevice` associated to the `GdkDrag` object. | ||
| 124 | func (x *Drag) GetDevice() *Device { | 116 | func (x *Drag) GetDevice() *Device { | ||
| 125 | - | core.LazyRegister(&xDragGetDevice, "GDK", "gdk_drag_get_device", false) | |||
| 126 | var cls *Device | 117 | var cls *Device | ||
| 127 | 118 | ||||
| 128 | cret := xDragGetDevice(x.GoPointer()) | 119 | cret := xDragGetDevice(x.GoPointer()) | ||
| @@ -140,7 +131,6 @@ var xDragGetDisplay func(uintptr) uintptr | |||||
| 140 | 131 | ||||
| 141 | // Gets the `GdkDisplay` that the drag object was created for. | 132 | // Gets the `GdkDisplay` that the drag object was created for. | ||
| 142 | func (x *Drag) GetDisplay() *Display { | 133 | func (x *Drag) GetDisplay() *Display { | ||
| 143 | - | core.LazyRegister(&xDragGetDisplay, "GDK", "gdk_drag_get_display", false) | |||
| 144 | var cls *Display | 134 | var cls *Display | ||
| 145 | 135 | ||||
| 146 | cret := xDragGetDisplay(x.GoPointer()) | 136 | cret := xDragGetDisplay(x.GoPointer()) | ||
| @@ -164,7 +154,6 @@ var xDragGetDragSurface func(uintptr) uintptr | |||||
| 164 | // drag operation. The surface is owned by @drag and will be destroyed | 154 | // drag operation. The surface is owned by @drag and will be destroyed | ||
| 165 | // when the drag operation is over. | 155 | // when the drag operation is over. | ||
| 166 | func (x *Drag) GetDragSurface() *Surface { | 156 | func (x *Drag) GetDragSurface() *Surface { | ||
| 167 | - | core.LazyRegister(&xDragGetDragSurface, "GDK", "gdk_drag_get_drag_surface", false) | |||
| 168 | var cls *Surface | 157 | var cls *Surface | ||
| 169 | 158 | ||||
| 170 | cret := xDragGetDragSurface(x.GoPointer()) | 159 | cret := xDragGetDragSurface(x.GoPointer()) | ||
| @@ -182,8 +171,6 @@ var xDragGetFormats func(uintptr) uintptr | |||||
| 182 | 171 | ||||
| 183 | // Retrieves the formats supported by this `GdkDrag` object. | 172 | // Retrieves the formats supported by this `GdkDrag` object. | ||
| 184 | func (x *Drag) GetFormats() *ContentFormats { | 173 | func (x *Drag) GetFormats() *ContentFormats { | ||
| 185 | - | core.LazyRegister(&xDragGetFormats, "GDK", "gdk_drag_get_formats", false) | |||
| 186 | - | ||||
| 187 | cret := xDragGetFormats(x.GoPointer()) | 174 | cret := xDragGetFormats(x.GoPointer()) | ||
| 188 | if cret == 0 { | 175 | if cret == 0 { | ||
| 189 | return nil | 176 | return nil | ||
| @@ -195,8 +182,6 @@ var xDragGetSelectedAction func(uintptr) DragAction | |||||
| 195 | 182 | ||||
| 196 | // Determines the action chosen by the drag destination. | 183 | // Determines the action chosen by the drag destination. | ||
| 197 | func (x *Drag) GetSelectedAction() DragAction { | 184 | func (x *Drag) GetSelectedAction() DragAction { | ||
| 198 | - | core.LazyRegister(&xDragGetSelectedAction, "GDK", "gdk_drag_get_selected_action", false) | |||
| 199 | - | ||||
| 200 | cret := xDragGetSelectedAction(x.GoPointer()) | 185 | cret := xDragGetSelectedAction(x.GoPointer()) | ||
| 201 | return cret | 186 | return cret | ||
| 202 | } | 187 | } | ||
| @@ -205,7 +190,6 @@ var xDragGetSurface func(uintptr) uintptr | |||||
| 205 | 190 | ||||
| 206 | // Returns the `GdkSurface` where the drag originates. | 191 | // Returns the `GdkSurface` where the drag originates. | ||
| 207 | func (x *Drag) GetSurface() *Surface { | 192 | func (x *Drag) GetSurface() *Surface { | ||
| 208 | - | core.LazyRegister(&xDragGetSurface, "GDK", "gdk_drag_get_surface", false) | |||
| 209 | var cls *Surface | 193 | var cls *Surface | ||
| 210 | 194 | ||||
| 211 | cret := xDragGetSurface(x.GoPointer()) | 195 | cret := xDragGetSurface(x.GoPointer()) | ||
| @@ -226,8 +210,6 @@ var xDragSetHotspot func(uintptr, int, int) | |||||
| 226 | // | 210 | // | ||
| 227 | // Initially, the hotspot is at the top left corner of the drag surface. | 211 | // Initially, the hotspot is at the top left corner of the drag surface. | ||
| 228 | func (x *Drag) SetHotspot(HotXVar int, HotYVar int) { | 212 | func (x *Drag) SetHotspot(HotXVar int, HotYVar int) { | ||
| 229 | - | core.LazyRegister(&xDragSetHotspot, "GDK", "gdk_drag_set_hotspot", false) | |||
| 230 | - | ||||
| 231 | xDragSetHotspot(x.GoPointer(), HotXVar, HotYVar) | 213 | xDragSetHotspot(x.GoPointer(), HotXVar, HotYVar) | ||
| 232 | } | 214 | } | ||
| 233 | 215 | ||||
| @@ -347,7 +329,6 @@ var xDragBegin func(uintptr, uintptr, uintptr, DragAction, float64, float64) uin | |||||
| 347 | // the source if [method@Gdk.Drag.get_selected_action] returns | 329 | // the source if [method@Gdk.Drag.get_selected_action] returns | ||
| 348 | // %GDK_ACTION_MOVE. | 330 | // %GDK_ACTION_MOVE. | ||
| 349 | func DragBegin(SurfaceVar *Surface, DeviceVar *Device, ContentVar *ContentProvider, ActionsVar DragAction, DxVar float64, DyVar float64) *Drag { | 331 | func DragBegin(SurfaceVar *Surface, DeviceVar *Device, ContentVar *ContentProvider, ActionsVar DragAction, DxVar float64, DyVar float64) *Drag { | ||
| 350 | - | core.LazyRegister(&xDragBegin, "GDK", "gdk_drag_begin", false) | |||
| 351 | var cls *Drag | 332 | var cls *Drag | ||
| 352 | 333 | ||||
| 353 | cret := xDragBegin(SurfaceVar.GoPointer(), DeviceVar.GoPointer(), ContentVar.GoPointer(), ActionsVar, DxVar, DyVar) | 334 | cret := xDragBegin(SurfaceVar.GoPointer(), DeviceVar.GoPointer(), ContentVar.GoPointer(), ActionsVar, DxVar, DyVar) | ||
| @@ -363,4 +344,31 @@ func DragBegin(SurfaceVar *Surface, DeviceVar *Device, ContentVar *ContentProvid | |||||
| 363 | func init() { | 344 | func init() { | ||
| 364 | core.SetPackageName("GDK", "gtk4") | 345 | core.SetPackageName("GDK", "gtk4") | ||
| 365 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | 346 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | ||
| 347 | + | var libs []uintptr | |||
| 348 | + | for _, libPath := range core.GetPaths("GDK") { | |||
| 349 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 350 | + | if err != nil { | |||
| 351 | + | panic(err) | |||
| 352 | + | } | |||
| 353 | + | libs = append(libs, lib) | |||
| 354 | + | } | |||
| 355 | + | ||||
| 356 | + | core.PuregoSafeRegister(&xDragCancelReasonGLibType, libs, "gdk_drag_cancel_reason_get_type") | |||
| 357 | + | ||||
| 358 | + | core.PuregoSafeRegister(&xDragActionIsUnique, libs, "gdk_drag_action_is_unique") | |||
| 359 | + | ||||
| 360 | + | core.PuregoSafeRegister(&xDragGLibType, libs, "gdk_drag_get_type") | |||
| 361 | + | ||||
| 362 | + | core.PuregoSafeRegister(&xDragDropDone, libs, "gdk_drag_drop_done") | |||
| 363 | + | core.PuregoSafeRegister(&xDragGetActions, libs, "gdk_drag_get_actions") | |||
| 364 | + | core.PuregoSafeRegister(&xDragGetContent, libs, "gdk_drag_get_content") | |||
| 365 | + | core.PuregoSafeRegister(&xDragGetDevice, libs, "gdk_drag_get_device") | |||
| 366 | + | core.PuregoSafeRegister(&xDragGetDisplay, libs, "gdk_drag_get_display") | |||
| 367 | + | core.PuregoSafeRegister(&xDragGetDragSurface, libs, "gdk_drag_get_drag_surface") | |||
| 368 | + | core.PuregoSafeRegister(&xDragGetFormats, libs, "gdk_drag_get_formats") | |||
| 369 | + | core.PuregoSafeRegister(&xDragGetSelectedAction, libs, "gdk_drag_get_selected_action") | |||
| 370 | + | core.PuregoSafeRegister(&xDragGetSurface, libs, "gdk_drag_get_surface") | |||
| 371 | + | core.PuregoSafeRegister(&xDragSetHotspot, libs, "gdk_drag_set_hotspot") | |||
| 372 | + | ||||
| 373 | + | core.PuregoSafeRegister(&xDragBegin, libs, "gdk_drag_begin") | |||
| 366 | } | 374 | } | ||