Merge pull request #350 from bnema/fix/repin-fixed-puregotk
fix(deps): validate puregotk lazy registration fix
907 files · +27874 -25296
M go.mod +3 -1
| @@ -11,7 +11,7 @@ require ( | |||
| 11 | 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | |
| 12 | 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | |
| 13 | 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | |
| 14 | - | github.com/bnema/puregotk v0.7.0 | |
| 14 | + | github.com/bnema/puregotk v0.7.1-0.20260714200603-7370c78950ef | |
| 15 | 15 | github.com/charmbracelet/bubbles v1.0.0 | |
| 16 | 16 | github.com/charmbracelet/bubbletea v1.3.10 | |
| 17 | 17 | github.com/charmbracelet/lipgloss v1.1.0 | |
| @@ -47,6 +47,7 @@ require ( | |||
| 47 | 47 | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect | |
| 48 | 48 | github.com/fatih/color v1.19.0 // indirect | |
| 49 | 49 | github.com/go-viper/mapstructure/v2 v2.5.0 // indirect | |
| 50 | + | github.com/google/go-cmp v0.7.0 // indirect | |
| 50 | 51 | github.com/inconshreveable/mousetrap v1.1.0 // indirect | |
| 51 | 52 | github.com/lucasb-eyer/go-colorful v1.4.0 // indirect | |
| 52 | 53 | github.com/mattn/go-colorable v0.1.14 // indirect | |
| @@ -80,6 +81,7 @@ require ( | |||
| 80 | 81 | golang.org/x/text v0.40.0 // indirect | |
| 81 | 82 | golang.org/x/tools v0.47.0 // indirect | |
| 82 | 83 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | |
| 84 | + | mvdan.cc/gofumpt v0.9.2 // indirect | |
| 83 | 85 | ) | |
| 84 | 86 | ||
| 85 | 87 | tool github.com/a-h/templ/cmd/templ | |
| @@ -11,7 +11,7 @@ require ( | |||||
| 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | ||
| 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | ||
| 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | ||
| 14 | - | github.com/bnema/puregotk v0.7.0 | 14 | + | github.com/bnema/puregotk v0.7.1-0.20260714200603-7370c78950ef |
| 15 | github.com/charmbracelet/bubbles v1.0.0 | 15 | github.com/charmbracelet/bubbles v1.0.0 | ||
| 16 | github.com/charmbracelet/bubbletea v1.3.10 | 16 | github.com/charmbracelet/bubbletea v1.3.10 | ||
| 17 | github.com/charmbracelet/lipgloss v1.1.0 | 17 | github.com/charmbracelet/lipgloss v1.1.0 | ||
| @@ -47,6 +47,7 @@ require ( | |||||
| 47 | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect | 47 | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect | ||
| 48 | github.com/fatih/color v1.19.0 // indirect | 48 | github.com/fatih/color v1.19.0 // indirect | ||
| 49 | github.com/go-viper/mapstructure/v2 v2.5.0 // indirect | 49 | github.com/go-viper/mapstructure/v2 v2.5.0 // indirect | ||
| 50 | + | github.com/google/go-cmp v0.7.0 // indirect | |||
| 50 | github.com/inconshreveable/mousetrap v1.1.0 // indirect | 51 | github.com/inconshreveable/mousetrap v1.1.0 // indirect | ||
| 51 | github.com/lucasb-eyer/go-colorful v1.4.0 // indirect | 52 | github.com/lucasb-eyer/go-colorful v1.4.0 // indirect | ||
| 52 | github.com/mattn/go-colorable v0.1.14 // indirect | 53 | github.com/mattn/go-colorable v0.1.14 // indirect | ||
| @@ -80,6 +81,7 @@ require ( | |||||
| 80 | golang.org/x/text v0.40.0 // indirect | 81 | golang.org/x/text v0.40.0 // indirect | ||
| 81 | golang.org/x/tools v0.47.0 // indirect | 82 | golang.org/x/tools v0.47.0 // indirect | ||
| 82 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | 83 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | ||
| 84 | + | mvdan.cc/gofumpt v0.9.2 // indirect | |||
| 83 | ) | 85 | ) | ||
| 84 | 86 | ||||
| 85 | tool github.com/a-h/templ/cmd/templ | 87 | tool github.com/a-h/templ/cmd/templ | ||
M go.sum +4 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/internal/core/core.go +197 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/pkg/core/core.go +10 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-dialog.go +99 -64 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-window.go +95 -62 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-accent-color.go +7 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-action-row.go +33 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-alert-dialog.go +66 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-target.go +10 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-util.go +4 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation.go +24 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application-window.go +14 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application.go +3 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-avatar.go +22 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-banner.go +23 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bin.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bottom-sheet.go +47 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint-bin.go +10 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint.go +33 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-content.go +18 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-row.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-dots.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-lines.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel.go +47 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-layout.go +14 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-scrollable.go +17 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp.go +17 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-combo-row.go +34 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-dialog.go +45 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-easing.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-entry-row.go +40 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-enum-list-model.go +13 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-expander-row.go +40 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-flap.go +61 -48 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-fold-threshold-policy.go +10 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-header-bar.go +36 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-inline-view-switcher.go +18 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout-slot.go +4 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout.go +7 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-leaflet.go +69 -56 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-length-unit.go +5 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-main.go +5 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-message-dialog.go +63 -44 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-multi-layout-view.go +17 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-direction.go +10 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-split-view.go +36 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-view.go +60 -49 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-overlay-split-view.go +48 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-password-entry-row.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-dialog.go +23 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-group.go +24 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-page.go +38 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-row.go +18 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-window.go +31 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcut-label.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-dialog.go +4 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-item.go +23 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-section.go +8 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar-item.go +45 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar-section.go +24 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar.go +41 -39 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spin-row.go +40 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spinner-paintable.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spinner.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-split-button.go +39 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spring-animation.go +34 -30 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spring-params.go +17 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-squeezer.go +49 -44 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-status-page.go +20 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-style-manager.go +25 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-swipe-tracker.go +33 -30 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-swipeable.go +33 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-switch-row.go +6 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-bar.go +35 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-button.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-overview.go +45 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-view.go +123 -87 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-timed-animation.go +30 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toast-overlay.go +9 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toast.go +41 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toggle-group.go +64 -51 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toolbar-view.go +40 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-version.go +7 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-stack.go +78 -62 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-bar.go +9 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-sidebar.go +15 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-title.go +19 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher.go +10 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-window-title.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-window.go +14 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-wrap-box.go +66 -46 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-wrap-layout.go +57 -46 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/cairo/main.go +36 -79 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkapplaunchcontext.go +10 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcairo.go +12 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcairocontext.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcicpparams.go +20 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkclipboard.go +34 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcolorstate.go +12 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentdeserializer.go +26 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentformats.go +28 -31 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentprovider.go +23 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentserializer.go +26 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcursor.go +12 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdevice.go +36 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdevicepad.go +27 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdevicetool.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdisplay.go +51 -43 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdisplaymanager.go +10 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdmabuftexture.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdmabuftexturebuilder.go +53 -41 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdmabuftexturebuilder_extra.go +6 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdrag.go +20 -28
| @@ -4,7 +4,6 @@ package gdk | |||
| 4 | 4 | import ( | |
| 5 | 5 | "unsafe" | |
| 6 | 6 | ||
| 7 | - | "github.com/bnema/purego" | |
| 8 | 7 | "github.com/bnema/puregotk/pkg/core" | |
| 9 | 8 | "github.com/bnema/puregotk/v4/glib" | |
| 10 | 9 | "github.com/bnema/puregotk/v4/gobject" | |
| @@ -17,6 +16,7 @@ type DragCancelReason int | |||
| 17 | 16 | var xDragCancelReasonGLibType func() types.GType | |
| 18 | 17 | ||
| 19 | 18 | 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,6 +38,8 @@ 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 | + | ||
| 41 | 43 | cret := xDragActionIsUnique(ActionVar) | |
| 42 | 44 | return cret | |
| 43 | 45 | } | |
| @@ -59,6 +61,7 @@ type Drag struct { | |||
| 59 | 61 | var xDragGLibType func() types.GType | |
| 60 | 62 | ||
| 61 | 63 | func DragGLibType() types.GType { | |
| 64 | + | core.LazyRegister(&xDragGLibType, "GDK", "gdk_drag_get_type", false) | |
| 62 | 65 | return xDragGLibType() | |
| 63 | 66 | } | |
| 64 | 67 | ||
| @@ -82,6 +85,8 @@ var xDragDropDone func(uintptr, bool) | |||
| 82 | 85 | // call as effective, if this function is called multiple times, | |
| 83 | 86 | // all subsequent calls will be ignored. | |
| 84 | 87 | func (x *Drag) DropDone(SuccessVar bool) { | |
| 88 | + | core.LazyRegister(&xDragDropDone, "GDK", "gdk_drag_drop_done", false) | |
| 89 | + | ||
| 85 | 90 | xDragDropDone(x.GoPointer(), SuccessVar) | |
| 86 | 91 | } | |
| 87 | 92 | ||
| @@ -89,6 +94,8 @@ var xDragGetActions func(uintptr) DragAction | |||
| 89 | 94 | ||
| 90 | 95 | // Determines the bitmask of possible actions proposed by the source. | |
| 91 | 96 | func (x *Drag) GetActions() DragAction { | |
| 97 | + | core.LazyRegister(&xDragGetActions, "GDK", "gdk_drag_get_actions", false) | |
| 98 | + | ||
| 92 | 99 | cret := xDragGetActions(x.GoPointer()) | |
| 93 | 100 | return cret | |
| 94 | 101 | } | |
| @@ -97,6 +104,7 @@ var xDragGetContent func(uintptr) uintptr | |||
| 97 | 104 | ||
| 98 | 105 | // Returns the `GdkContentProvider` associated to the `GdkDrag` object. | |
| 99 | 106 | func (x *Drag) GetContent() *ContentProvider { | |
| 107 | + | core.LazyRegister(&xDragGetContent, "GDK", "gdk_drag_get_content", false) | |
| 100 | 108 | var cls *ContentProvider | |
| 101 | 109 | ||
| 102 | 110 | cret := xDragGetContent(x.GoPointer()) | |
| @@ -114,6 +122,7 @@ var xDragGetDevice func(uintptr) uintptr | |||
| 114 | 122 | ||
| 115 | 123 | // Returns the `GdkDevice` associated to the `GdkDrag` object. | |
| 116 | 124 | func (x *Drag) GetDevice() *Device { | |
| 125 | + | core.LazyRegister(&xDragGetDevice, "GDK", "gdk_drag_get_device", false) | |
| 117 | 126 | var cls *Device | |
| 118 | 127 | ||
| 119 | 128 | cret := xDragGetDevice(x.GoPointer()) | |
| @@ -131,6 +140,7 @@ var xDragGetDisplay func(uintptr) uintptr | |||
| 131 | 140 | ||
| 132 | 141 | // Gets the `GdkDisplay` that the drag object was created for. | |
| 133 | 142 | func (x *Drag) GetDisplay() *Display { | |
| 143 | + | core.LazyRegister(&xDragGetDisplay, "GDK", "gdk_drag_get_display", false) | |
| 134 | 144 | var cls *Display | |
| 135 | 145 | ||
| 136 | 146 | cret := xDragGetDisplay(x.GoPointer()) | |
| @@ -154,6 +164,7 @@ var xDragGetDragSurface func(uintptr) uintptr | |||
| 154 | 164 | // drag operation. The surface is owned by @drag and will be destroyed | |
| 155 | 165 | // when the drag operation is over. | |
| 156 | 166 | func (x *Drag) GetDragSurface() *Surface { | |
| 167 | + | core.LazyRegister(&xDragGetDragSurface, "GDK", "gdk_drag_get_drag_surface", false) | |
| 157 | 168 | var cls *Surface | |
| 158 | 169 | ||
| 159 | 170 | cret := xDragGetDragSurface(x.GoPointer()) | |
| @@ -171,6 +182,8 @@ var xDragGetFormats func(uintptr) uintptr | |||
| 171 | 182 | ||
| 172 | 183 | // Retrieves the formats supported by this `GdkDrag` object. | |
| 173 | 184 | func (x *Drag) GetFormats() *ContentFormats { | |
| 185 | + | core.LazyRegister(&xDragGetFormats, "GDK", "gdk_drag_get_formats", false) | |
| 186 | + | ||
| 174 | 187 | cret := xDragGetFormats(x.GoPointer()) | |
| 175 | 188 | if cret == 0 { | |
| 176 | 189 | return nil | |
| @@ -182,6 +195,8 @@ var xDragGetSelectedAction func(uintptr) DragAction | |||
| 182 | 195 | ||
| 183 | 196 | // Determines the action chosen by the drag destination. | |
| 184 | 197 | func (x *Drag) GetSelectedAction() DragAction { | |
| 198 | + | core.LazyRegister(&xDragGetSelectedAction, "GDK", "gdk_drag_get_selected_action", false) | |
| 199 | + | ||
| 185 | 200 | cret := xDragGetSelectedAction(x.GoPointer()) | |
| 186 | 201 | return cret | |
| 187 | 202 | } | |
| @@ -190,6 +205,7 @@ var xDragGetSurface func(uintptr) uintptr | |||
| 190 | 205 | ||
| 191 | 206 | // Returns the `GdkSurface` where the drag originates. | |
| 192 | 207 | func (x *Drag) GetSurface() *Surface { | |
| 208 | + | core.LazyRegister(&xDragGetSurface, "GDK", "gdk_drag_get_surface", false) | |
| 193 | 209 | var cls *Surface | |
| 194 | 210 | ||
| 195 | 211 | cret := xDragGetSurface(x.GoPointer()) | |
| @@ -210,6 +226,8 @@ var xDragSetHotspot func(uintptr, int, int) | |||
| 210 | 226 | // | |
| 211 | 227 | // Initially, the hotspot is at the top left corner of the drag surface. | |
| 212 | 228 | func (x *Drag) SetHotspot(HotXVar int, HotYVar int) { | |
| 229 | + | core.LazyRegister(&xDragSetHotspot, "GDK", "gdk_drag_set_hotspot", false) | |
| 230 | + | ||
| 213 | 231 | xDragSetHotspot(x.GoPointer(), HotXVar, HotYVar) | |
| 214 | 232 | } | |
| 215 | 233 | ||
| @@ -329,6 +347,7 @@ var xDragBegin func(uintptr, uintptr, uintptr, DragAction, float64, float64) uin | |||
| 329 | 347 | // the source if [method@Gdk.Drag.get_selected_action] returns | |
| 330 | 348 | // %GDK_ACTION_MOVE. | |
| 331 | 349 | func DragBegin(SurfaceVar *Surface, DeviceVar *Device, ContentVar *ContentProvider, ActionsVar DragAction, DxVar float64, DyVar float64) *Drag { | |
| 350 | + | core.LazyRegister(&xDragBegin, "GDK", "gdk_drag_begin", false) | |
| 332 | 351 | var cls *Drag | |
| 333 | 352 | ||
| 334 | 353 | cret := xDragBegin(SurfaceVar.GoPointer(), DeviceVar.GoPointer(), ContentVar.GoPointer(), ActionsVar, DxVar, DyVar) | |
| @@ -344,31 +363,4 @@ func DragBegin(SurfaceVar *Surface, DeviceVar *Device, ContentVar *ContentProvid | |||
| 344 | 363 | func init() { | |
| 345 | 364 | core.SetPackageName("GDK", "gtk4") | |
| 346 | 365 | 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") | |
| 374 | 366 | } | |
| @@ -4,7 +4,6 @@ package gdk | |||||
| 4 | import ( | 4 | import ( | ||
| 5 | "unsafe" | 5 | "unsafe" | ||
| 6 | 6 | ||||
| 7 | - | "github.com/bnema/purego" | |||
| 8 | "github.com/bnema/puregotk/pkg/core" | 7 | "github.com/bnema/puregotk/pkg/core" | ||
| 9 | "github.com/bnema/puregotk/v4/glib" | 8 | "github.com/bnema/puregotk/v4/glib" | ||
| 10 | "github.com/bnema/puregotk/v4/gobject" | 9 | "github.com/bnema/puregotk/v4/gobject" | ||
| @@ -17,6 +16,7 @@ type DragCancelReason int | |||||
| 17 | var xDragCancelReasonGLibType func() types.GType | 16 | var xDragCancelReasonGLibType func() types.GType | ||
| 18 | 17 | ||||
| 19 | func DragCancelReasonGLibType() types.GType { | 18 | 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,6 +38,8 @@ 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 | + | ||||
| 41 | cret := xDragActionIsUnique(ActionVar) | 43 | cret := xDragActionIsUnique(ActionVar) | ||
| 42 | return cret | 44 | return cret | ||
| 43 | } | 45 | } | ||
| @@ -59,6 +61,7 @@ type Drag struct { | |||||
| 59 | var xDragGLibType func() types.GType | 61 | var xDragGLibType func() types.GType | ||
| 60 | 62 | ||||
| 61 | func DragGLibType() types.GType { | 63 | func DragGLibType() types.GType { | ||
| 64 | + | core.LazyRegister(&xDragGLibType, "GDK", "gdk_drag_get_type", false) | |||
| 62 | return xDragGLibType() | 65 | return xDragGLibType() | ||
| 63 | } | 66 | } | ||
| 64 | 67 | ||||
| @@ -82,6 +85,8 @@ var xDragDropDone func(uintptr, bool) | |||||
| 82 | // call as effective, if this function is called multiple times, | 85 | // call as effective, if this function is called multiple times, | ||
| 83 | // all subsequent calls will be ignored. | 86 | // all subsequent calls will be ignored. | ||
| 84 | func (x *Drag) DropDone(SuccessVar bool) { | 87 | func (x *Drag) DropDone(SuccessVar bool) { | ||
| 88 | + | core.LazyRegister(&xDragDropDone, "GDK", "gdk_drag_drop_done", false) | |||
| 89 | + | ||||
| 85 | xDragDropDone(x.GoPointer(), SuccessVar) | 90 | xDragDropDone(x.GoPointer(), SuccessVar) | ||
| 86 | } | 91 | } | ||
| 87 | 92 | ||||
| @@ -89,6 +94,8 @@ var xDragGetActions func(uintptr) DragAction | |||||
| 89 | 94 | ||||
| 90 | // Determines the bitmask of possible actions proposed by the source. | 95 | // Determines the bitmask of possible actions proposed by the source. | ||
| 91 | func (x *Drag) GetActions() DragAction { | 96 | func (x *Drag) GetActions() DragAction { | ||
| 97 | + | core.LazyRegister(&xDragGetActions, "GDK", "gdk_drag_get_actions", false) | |||
| 98 | + | ||||
| 92 | cret := xDragGetActions(x.GoPointer()) | 99 | cret := xDragGetActions(x.GoPointer()) | ||
| 93 | return cret | 100 | return cret | ||
| 94 | } | 101 | } | ||
| @@ -97,6 +104,7 @@ var xDragGetContent func(uintptr) uintptr | |||||
| 97 | 104 | ||||
| 98 | // Returns the `GdkContentProvider` associated to the `GdkDrag` object. | 105 | // Returns the `GdkContentProvider` associated to the `GdkDrag` object. | ||
| 99 | func (x *Drag) GetContent() *ContentProvider { | 106 | func (x *Drag) GetContent() *ContentProvider { | ||
| 107 | + | core.LazyRegister(&xDragGetContent, "GDK", "gdk_drag_get_content", false) | |||
| 100 | var cls *ContentProvider | 108 | var cls *ContentProvider | ||
| 101 | 109 | ||||
| 102 | cret := xDragGetContent(x.GoPointer()) | 110 | cret := xDragGetContent(x.GoPointer()) | ||
| @@ -114,6 +122,7 @@ var xDragGetDevice func(uintptr) uintptr | |||||
| 114 | 122 | ||||
| 115 | // Returns the `GdkDevice` associated to the `GdkDrag` object. | 123 | // Returns the `GdkDevice` associated to the `GdkDrag` object. | ||
| 116 | func (x *Drag) GetDevice() *Device { | 124 | func (x *Drag) GetDevice() *Device { | ||
| 125 | + | core.LazyRegister(&xDragGetDevice, "GDK", "gdk_drag_get_device", false) | |||
| 117 | var cls *Device | 126 | var cls *Device | ||
| 118 | 127 | ||||
| 119 | cret := xDragGetDevice(x.GoPointer()) | 128 | cret := xDragGetDevice(x.GoPointer()) | ||
| @@ -131,6 +140,7 @@ var xDragGetDisplay func(uintptr) uintptr | |||||
| 131 | 140 | ||||
| 132 | // Gets the `GdkDisplay` that the drag object was created for. | 141 | // Gets the `GdkDisplay` that the drag object was created for. | ||
| 133 | func (x *Drag) GetDisplay() *Display { | 142 | func (x *Drag) GetDisplay() *Display { | ||
| 143 | + | core.LazyRegister(&xDragGetDisplay, "GDK", "gdk_drag_get_display", false) | |||
| 134 | var cls *Display | 144 | var cls *Display | ||
| 135 | 145 | ||||
| 136 | cret := xDragGetDisplay(x.GoPointer()) | 146 | cret := xDragGetDisplay(x.GoPointer()) | ||
| @@ -154,6 +164,7 @@ var xDragGetDragSurface func(uintptr) uintptr | |||||
| 154 | // drag operation. The surface is owned by @drag and will be destroyed | 164 | // drag operation. The surface is owned by @drag and will be destroyed | ||
| 155 | // when the drag operation is over. | 165 | // when the drag operation is over. | ||
| 156 | func (x *Drag) GetDragSurface() *Surface { | 166 | func (x *Drag) GetDragSurface() *Surface { | ||
| 167 | + | core.LazyRegister(&xDragGetDragSurface, "GDK", "gdk_drag_get_drag_surface", false) | |||
| 157 | var cls *Surface | 168 | var cls *Surface | ||
| 158 | 169 | ||||
| 159 | cret := xDragGetDragSurface(x.GoPointer()) | 170 | cret := xDragGetDragSurface(x.GoPointer()) | ||
| @@ -171,6 +182,8 @@ var xDragGetFormats func(uintptr) uintptr | |||||
| 171 | 182 | ||||
| 172 | // Retrieves the formats supported by this `GdkDrag` object. | 183 | // Retrieves the formats supported by this `GdkDrag` object. | ||
| 173 | func (x *Drag) GetFormats() *ContentFormats { | 184 | func (x *Drag) GetFormats() *ContentFormats { | ||
| 185 | + | core.LazyRegister(&xDragGetFormats, "GDK", "gdk_drag_get_formats", false) | |||
| 186 | + | ||||
| 174 | cret := xDragGetFormats(x.GoPointer()) | 187 | cret := xDragGetFormats(x.GoPointer()) | ||
| 175 | if cret == 0 { | 188 | if cret == 0 { | ||
| 176 | return nil | 189 | return nil | ||
| @@ -182,6 +195,8 @@ var xDragGetSelectedAction func(uintptr) DragAction | |||||
| 182 | 195 | ||||
| 183 | // Determines the action chosen by the drag destination. | 196 | // Determines the action chosen by the drag destination. | ||
| 184 | func (x *Drag) GetSelectedAction() DragAction { | 197 | func (x *Drag) GetSelectedAction() DragAction { | ||
| 198 | + | core.LazyRegister(&xDragGetSelectedAction, "GDK", "gdk_drag_get_selected_action", false) | |||
| 199 | + | ||||
| 185 | cret := xDragGetSelectedAction(x.GoPointer()) | 200 | cret := xDragGetSelectedAction(x.GoPointer()) | ||
| 186 | return cret | 201 | return cret | ||
| 187 | } | 202 | } | ||
| @@ -190,6 +205,7 @@ var xDragGetSurface func(uintptr) uintptr | |||||
| 190 | 205 | ||||
| 191 | // Returns the `GdkSurface` where the drag originates. | 206 | // Returns the `GdkSurface` where the drag originates. | ||
| 192 | func (x *Drag) GetSurface() *Surface { | 207 | func (x *Drag) GetSurface() *Surface { | ||
| 208 | + | core.LazyRegister(&xDragGetSurface, "GDK", "gdk_drag_get_surface", false) | |||
| 193 | var cls *Surface | 209 | var cls *Surface | ||
| 194 | 210 | ||||
| 195 | cret := xDragGetSurface(x.GoPointer()) | 211 | cret := xDragGetSurface(x.GoPointer()) | ||
| @@ -210,6 +226,8 @@ var xDragSetHotspot func(uintptr, int, int) | |||||
| 210 | // | 226 | // | ||
| 211 | // Initially, the hotspot is at the top left corner of the drag surface. | 227 | // Initially, the hotspot is at the top left corner of the drag surface. | ||
| 212 | func (x *Drag) SetHotspot(HotXVar int, HotYVar int) { | 228 | func (x *Drag) SetHotspot(HotXVar int, HotYVar int) { | ||
| 229 | + | core.LazyRegister(&xDragSetHotspot, "GDK", "gdk_drag_set_hotspot", false) | |||
| 230 | + | ||||
| 213 | xDragSetHotspot(x.GoPointer(), HotXVar, HotYVar) | 231 | xDragSetHotspot(x.GoPointer(), HotXVar, HotYVar) | ||
| 214 | } | 232 | } | ||
| 215 | 233 | ||||
| @@ -329,6 +347,7 @@ var xDragBegin func(uintptr, uintptr, uintptr, DragAction, float64, float64) uin | |||||
| 329 | // the source if [method@Gdk.Drag.get_selected_action] returns | 347 | // the source if [method@Gdk.Drag.get_selected_action] returns | ||
| 330 | // %GDK_ACTION_MOVE. | 348 | // %GDK_ACTION_MOVE. | ||
| 331 | func DragBegin(SurfaceVar *Surface, DeviceVar *Device, ContentVar *ContentProvider, ActionsVar DragAction, DxVar float64, DyVar float64) *Drag { | 349 | func DragBegin(SurfaceVar *Surface, DeviceVar *Device, ContentVar *ContentProvider, ActionsVar DragAction, DxVar float64, DyVar float64) *Drag { | ||
| 350 | + | core.LazyRegister(&xDragBegin, "GDK", "gdk_drag_begin", false) | |||
| 332 | var cls *Drag | 351 | var cls *Drag | ||
| 333 | 352 | ||||
| 334 | cret := xDragBegin(SurfaceVar.GoPointer(), DeviceVar.GoPointer(), ContentVar.GoPointer(), ActionsVar, DxVar, DyVar) | 353 | cret := xDragBegin(SurfaceVar.GoPointer(), DeviceVar.GoPointer(), ContentVar.GoPointer(), ActionsVar, DxVar, DyVar) | ||
| @@ -344,31 +363,4 @@ func DragBegin(SurfaceVar *Surface, DeviceVar *Device, ContentVar *ContentProvid | |||||
| 344 | func init() { | 363 | func init() { | ||
| 345 | core.SetPackageName("GDK", "gtk4") | 364 | core.SetPackageName("GDK", "gtk4") | ||
| 346 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | 365 | 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") | |||
| 374 | } | 366 | } | ||