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
| @@ -4,7 +4,6 @@ package gdk | |||
| 4 | 4 | import ( | |
| 5 | 5 | "unsafe" | |
| 6 | 6 | ||
| 7 | - | "github.com/bnema/purego" | |
| 8 | 7 | "github.com/bnema/puregotk/pkg/core" | |
| 9 | 8 | "github.com/bnema/puregotk/v4/gio" | |
| 10 | 9 | "github.com/bnema/puregotk/v4/glib" | |
| @@ -35,6 +34,7 @@ type Clipboard struct { | |||
| 35 | 34 | var xClipboardGLibType func() types.GType | |
| 36 | 35 | ||
| 37 | 36 | func ClipboardGLibType() types.GType { | |
| 37 | + | core.LazyRegister(&xClipboardGLibType, "GDK", "gdk_clipboard_get_type", false) | |
| 38 | 38 | return xClipboardGLibType() | |
| 39 | 39 | } | |
| 40 | 40 | ||
| @@ -51,6 +51,7 @@ var xClipboardGetContent func(uintptr) uintptr | |||
| 51 | 51 | // If the @clipboard is empty or its contents are not owned by the | |
| 52 | 52 | // current process, %NULL will be returned. | |
| 53 | 53 | func (x *Clipboard) GetContent() *ContentProvider { | |
| 54 | + | core.LazyRegister(&xClipboardGetContent, "GDK", "gdk_clipboard_get_content", false) | |
| 54 | 55 | var cls *ContentProvider | |
| 55 | 56 | ||
| 56 | 57 | cret := xClipboardGetContent(x.GoPointer()) | |
| @@ -68,6 +69,7 @@ var xClipboardGetDisplay func(uintptr) uintptr | |||
| 68 | 69 | ||
| 69 | 70 | // Gets the `GdkDisplay` that the clipboard was created for. | |
| 70 | 71 | func (x *Clipboard) GetDisplay() *Display { | |
| 72 | + | core.LazyRegister(&xClipboardGetDisplay, "GDK", "gdk_clipboard_get_display", false) | |
| 71 | 73 | var cls *Display | |
| 72 | 74 | ||
| 73 | 75 | cret := xClipboardGetDisplay(x.GoPointer()) | |
| @@ -85,6 +87,8 @@ var xClipboardGetFormats func(uintptr) uintptr | |||
| 85 | 87 | ||
| 86 | 88 | // Gets the formats that the clipboard can provide its current contents in. | |
| 87 | 89 | func (x *Clipboard) GetFormats() *ContentFormats { | |
| 90 | + | core.LazyRegister(&xClipboardGetFormats, "GDK", "gdk_clipboard_get_formats", false) | |
| 91 | + | ||
| 88 | 92 | cret := xClipboardGetFormats(x.GoPointer()) | |
| 89 | 93 | if cret == 0 { | |
| 90 | 94 | return nil | |
| @@ -102,6 +106,8 @@ var xClipboardIsLocal func(uintptr) bool | |||
| 102 | 106 | // Note that [method@Gdk.Clipboard.get_content] may return %NULL | |
| 103 | 107 | // even on a local clipboard. In this case the clipboard is empty. | |
| 104 | 108 | func (x *Clipboard) IsLocal() bool { | |
| 109 | + | core.LazyRegister(&xClipboardIsLocal, "GDK", "gdk_clipboard_is_local", false) | |
| 110 | + | ||
| 105 | 111 | cret := xClipboardIsLocal(x.GoPointer()) | |
| 106 | 112 | return cret | |
| 107 | 113 | } | |
| @@ -114,6 +120,8 @@ var xClipboardReadAsync func(uintptr, []string, int, uintptr, uintptr, uintptr) | |||
| 114 | 120 | // The clipboard will choose the most suitable mime type from the given list | |
| 115 | 121 | // to fulfill the request, preferring the ones listed first. | |
| 116 | 122 | func (x *Clipboard) ReadAsync(MimeTypesVar []string, IoPriorityVar int, CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) { | |
| 123 | + | core.LazyRegister(&xClipboardReadAsync, "GDK", "gdk_clipboard_read_async", false) | |
| 124 | + | ||
| 117 | 125 | xClipboardReadAsync(x.GoPointer(), MimeTypesVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | |
| 118 | 126 | } | |
| 119 | 127 | ||
| @@ -123,6 +131,7 @@ var xClipboardReadFinish func(uintptr, uintptr, *string, **glib.Error) uintptr | |||
| 123 | 131 | // | |
| 124 | 132 | // See [method@Gdk.Clipboard.read_async]. | |
| 125 | 133 | func (x *Clipboard) ReadFinish(ResultVar gio.AsyncResult, OutMimeTypeVar *string) (*gio.InputStream, error) { | |
| 134 | + | core.LazyRegister(&xClipboardReadFinish, "GDK", "gdk_clipboard_read_finish", false) | |
| 126 | 135 | var cls *gio.InputStream | |
| 127 | 136 | var cerr *glib.Error | |
| 128 | 137 | ||
| @@ -147,6 +156,8 @@ var xClipboardReadTextAsync func(uintptr, uintptr, uintptr, uintptr) | |||
| 147 | 156 | // Use that function or [method@Gdk.Clipboard.read_async] directly if you | |
| 148 | 157 | // need more control over the operation. | |
| 149 | 158 | func (x *Clipboard) ReadTextAsync(CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) { | |
| 159 | + | core.LazyRegister(&xClipboardReadTextAsync, "GDK", "gdk_clipboard_read_text_async", false) | |
| 160 | + | ||
| 150 | 161 | xClipboardReadTextAsync(x.GoPointer(), CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | |
| 151 | 162 | } | |
| 152 | 163 | ||
| @@ -156,6 +167,7 @@ var xClipboardReadTextFinish func(uintptr, uintptr, **glib.Error) string | |||
| 156 | 167 | // | |
| 157 | 168 | // See [method@Gdk.Clipboard.read_text_async]. | |
| 158 | 169 | func (x *Clipboard) ReadTextFinish(ResultVar gio.AsyncResult) (string, error) { | |
| 170 | + | core.LazyRegister(&xClipboardReadTextFinish, "GDK", "gdk_clipboard_read_text_finish", false) | |
| 159 | 171 | var cerr *glib.Error | |
| 160 | 172 | ||
| 161 | 173 | cret := xClipboardReadTextFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr) | |
| @@ -173,6 +185,8 @@ var xClipboardReadTextureAsync func(uintptr, uintptr, uintptr, uintptr) | |||
| 173 | 185 | // Use that function or [method@Gdk.Clipboard.read_async] directly if you | |
| 174 | 186 | // need more control over the operation. | |
| 175 | 187 | func (x *Clipboard) ReadTextureAsync(CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) { | |
| 188 | + | core.LazyRegister(&xClipboardReadTextureAsync, "GDK", "gdk_clipboard_read_texture_async", false) | |
| 189 | + | ||
| 176 | 190 | xClipboardReadTextureAsync(x.GoPointer(), CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | |
| 177 | 191 | } | |
| 178 | 192 | ||
| @@ -182,6 +196,7 @@ var xClipboardReadTextureFinish func(uintptr, uintptr, **glib.Error) uintptr | |||
| 182 | 196 | // | |
| 183 | 197 | // See [method@Gdk.Clipboard.read_texture_async]. | |
| 184 | 198 | func (x *Clipboard) ReadTextureFinish(ResultVar gio.AsyncResult) (*Texture, error) { | |
| 199 | + | core.LazyRegister(&xClipboardReadTextureFinish, "GDK", "gdk_clipboard_read_texture_finish", false) | |
| 185 | 200 | var cls *Texture | |
| 186 | 201 | var cerr *glib.Error | |
| 187 | 202 | ||
| @@ -207,6 +222,8 @@ var xClipboardReadValueAsync func(uintptr, types.GType, int, uintptr, uintptr, u | |||
| 207 | 222 | // the value will be copied directly. Otherwise, GDK will try to use | |
| 208 | 223 | // [func@content_deserialize_async] to convert the clipboard's data. | |
| 209 | 224 | func (x *Clipboard) ReadValueAsync(TypeVar types.GType, IoPriorityVar int, CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) { | |
| 225 | + | core.LazyRegister(&xClipboardReadValueAsync, "GDK", "gdk_clipboard_read_value_async", false) | |
| 226 | + | ||
| 210 | 227 | xClipboardReadValueAsync(x.GoPointer(), TypeVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | |
| 211 | 228 | } | |
| 212 | 229 | ||
| @@ -216,6 +233,7 @@ var xClipboardReadValueFinish func(uintptr, uintptr, **glib.Error) uintptr | |||
| 216 | 233 | // | |
| 217 | 234 | // See [method@Gdk.Clipboard.read_value_async]. | |
| 218 | 235 | func (x *Clipboard) ReadValueFinish(ResultVar gio.AsyncResult) (*gobject.Value, error) { | |
| 236 | + | core.LazyRegister(&xClipboardReadValueFinish, "GDK", "gdk_clipboard_read_value_finish", false) | |
| 219 | 237 | var cerr *glib.Error | |
| 220 | 238 | ||
| 221 | 239 | cret := xClipboardReadValueFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr) | |
| @@ -242,6 +260,8 @@ var xClipboardSet func(uintptr, types.GType, ...interface{}) | |||
| 242 | 260 | // gdk_clipboard_set (clipboard, GDK_TYPE_TEXTURE, some_texture); | |
| 243 | 261 | // ``` | |
| 244 | 262 | func (x *Clipboard) Set(TypeVar types.GType, varArgs ...interface{}) { | |
| 263 | + | core.LazyRegister(&xClipboardSet, "GDK", "gdk_clipboard_set", false) | |
| 264 | + | ||
| 245 | 265 | xClipboardSet(x.GoPointer(), TypeVar, varArgs...) | |
| 246 | 266 | } | |
| 247 | 267 | ||
| @@ -260,6 +280,8 @@ var xClipboardSetContent func(uintptr, uintptr) bool | |||
| 260 | 280 | // @clipboard's read functions, @clipboard will select the best format to | |
| 261 | 281 | // transfer the contents and then request that format from @provider. | |
| 262 | 282 | func (x *Clipboard) SetContent(ProviderVar *ContentProvider) bool { | |
| 283 | + | core.LazyRegister(&xClipboardSetContent, "GDK", "gdk_clipboard_set_content", false) | |
| 284 | + | ||
| 263 | 285 | cret := xClipboardSetContent(x.GoPointer(), ProviderVar.GoPointer()) | |
| 264 | 286 | return cret | |
| 265 | 287 | } | |
| @@ -268,6 +290,8 @@ var xClipboardSetText func(uintptr, string) | |||
| 268 | 290 | ||
| 269 | 291 | // Puts the given @text into the clipboard. | |
| 270 | 292 | func (x *Clipboard) SetText(TextVar string) { | |
| 293 | + | core.LazyRegister(&xClipboardSetText, "GDK", "gdk_clipboard_set_text", false) | |
| 294 | + | ||
| 271 | 295 | xClipboardSetText(x.GoPointer(), TextVar) | |
| 272 | 296 | } | |
| 273 | 297 | ||
| @@ -275,6 +299,8 @@ var xClipboardSetTexture func(uintptr, uintptr) | |||
| 275 | 299 | ||
| 276 | 300 | // Puts the given @texture into the clipboard. | |
| 277 | 301 | func (x *Clipboard) SetTexture(TextureVar *Texture) { | |
| 302 | + | core.LazyRegister(&xClipboardSetTexture, "GDK", "gdk_clipboard_set_texture", false) | |
| 303 | + | ||
| 278 | 304 | xClipboardSetTexture(x.GoPointer(), TextureVar.GoPointer()) | |
| 279 | 305 | } | |
| 280 | 306 | ||
| @@ -282,6 +308,8 @@ var xClipboardSetValist func(uintptr, types.GType, []interface{}) | |||
| 282 | 308 | ||
| 283 | 309 | // Sets the clipboard to contain the value collected from the given @args. | |
| 284 | 310 | func (x *Clipboard) SetValist(TypeVar types.GType, ArgsVar []interface{}) { | |
| 311 | + | core.LazyRegister(&xClipboardSetValist, "GDK", "gdk_clipboard_set_valist", false) | |
| 312 | + | ||
| 285 | 313 | xClipboardSetValist(x.GoPointer(), TypeVar, ArgsVar) | |
| 286 | 314 | } | |
| 287 | 315 | ||
| @@ -289,6 +317,8 @@ var xClipboardSetValue func(uintptr, *gobject.Value) | |||
| 289 | 317 | ||
| 290 | 318 | // Sets the @clipboard to contain the given @value. | |
| 291 | 319 | func (x *Clipboard) SetValue(ValueVar *gobject.Value) { | |
| 320 | + | core.LazyRegister(&xClipboardSetValue, "GDK", "gdk_clipboard_set_value", false) | |
| 321 | + | ||
| 292 | 322 | xClipboardSetValue(x.GoPointer(), ValueVar) | |
| 293 | 323 | } | |
| 294 | 324 | ||
| @@ -307,6 +337,8 @@ var xClipboardStoreAsync func(uintptr, int, uintptr, uintptr, uintptr) | |||
| 307 | 337 | // [GtkApplication](../gtk4/class.Application.html) | |
| 308 | 338 | // is shut down, so you likely don't need to call it. | |
| 309 | 339 | func (x *Clipboard) StoreAsync(IoPriorityVar int, CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) { | |
| 340 | + | core.LazyRegister(&xClipboardStoreAsync, "GDK", "gdk_clipboard_store_async", false) | |
| 341 | + | ||
| 310 | 342 | xClipboardStoreAsync(x.GoPointer(), IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | |
| 311 | 343 | } | |
| 312 | 344 | ||
| @@ -316,6 +348,7 @@ var xClipboardStoreFinish func(uintptr, uintptr, **glib.Error) bool | |||
| 316 | 348 | // | |
| 317 | 349 | // See [method@Gdk.Clipboard.store_async]. | |
| 318 | 350 | func (x *Clipboard) StoreFinish(ResultVar gio.AsyncResult) (bool, error) { | |
| 351 | + | core.LazyRegister(&xClipboardStoreFinish, "GDK", "gdk_clipboard_store_finish", false) | |
| 319 | 352 | var cerr *glib.Error | |
| 320 | 353 | ||
| 321 | 354 | cret := xClipboardStoreFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr) | |
| @@ -378,35 +411,4 @@ func (x *Clipboard) ConnectChanged(cb *func(Clipboard)) uint { | |||
| 378 | 411 | func init() { | |
| 379 | 412 | core.SetPackageName("GDK", "gtk4") | |
| 380 | 413 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | |
| 381 | - | var libs []uintptr | |
| 382 | - | for _, libPath := range core.GetPaths("GDK") { | |
| 383 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 384 | - | if err != nil { | |
| 385 | - | panic(err) | |
| 386 | - | } | |
| 387 | - | libs = append(libs, lib) | |
| 388 | - | } | |
| 389 | - | ||
| 390 | - | core.PuregoSafeRegister(&xClipboardGLibType, libs, "gdk_clipboard_get_type") | |
| 391 | - | ||
| 392 | - | core.PuregoSafeRegister(&xClipboardGetContent, libs, "gdk_clipboard_get_content") | |
| 393 | - | core.PuregoSafeRegister(&xClipboardGetDisplay, libs, "gdk_clipboard_get_display") | |
| 394 | - | core.PuregoSafeRegister(&xClipboardGetFormats, libs, "gdk_clipboard_get_formats") | |
| 395 | - | core.PuregoSafeRegister(&xClipboardIsLocal, libs, "gdk_clipboard_is_local") | |
| 396 | - | core.PuregoSafeRegister(&xClipboardReadAsync, libs, "gdk_clipboard_read_async") | |
| 397 | - | core.PuregoSafeRegister(&xClipboardReadFinish, libs, "gdk_clipboard_read_finish") | |
| 398 | - | core.PuregoSafeRegister(&xClipboardReadTextAsync, libs, "gdk_clipboard_read_text_async") | |
| 399 | - | core.PuregoSafeRegister(&xClipboardReadTextFinish, libs, "gdk_clipboard_read_text_finish") | |
| 400 | - | core.PuregoSafeRegister(&xClipboardReadTextureAsync, libs, "gdk_clipboard_read_texture_async") | |
| 401 | - | core.PuregoSafeRegister(&xClipboardReadTextureFinish, libs, "gdk_clipboard_read_texture_finish") | |
| 402 | - | core.PuregoSafeRegister(&xClipboardReadValueAsync, libs, "gdk_clipboard_read_value_async") | |
| 403 | - | core.PuregoSafeRegister(&xClipboardReadValueFinish, libs, "gdk_clipboard_read_value_finish") | |
| 404 | - | core.PuregoSafeRegister(&xClipboardSet, libs, "gdk_clipboard_set") | |
| 405 | - | core.PuregoSafeRegister(&xClipboardSetContent, libs, "gdk_clipboard_set_content") | |
| 406 | - | core.PuregoSafeRegister(&xClipboardSetText, libs, "gdk_clipboard_set_text") | |
| 407 | - | core.PuregoSafeRegister(&xClipboardSetTexture, libs, "gdk_clipboard_set_texture") | |
| 408 | - | core.PuregoSafeRegister(&xClipboardSetValist, libs, "gdk_clipboard_set_valist") | |
| 409 | - | core.PuregoSafeRegister(&xClipboardSetValue, libs, "gdk_clipboard_set_value") | |
| 410 | - | core.PuregoSafeRegister(&xClipboardStoreAsync, libs, "gdk_clipboard_store_async") | |
| 411 | - | core.PuregoSafeRegister(&xClipboardStoreFinish, libs, "gdk_clipboard_store_finish") | |
| 412 | 414 | } | |
| @@ -4,7 +4,6 @@ package gdk | |||||
| 4 | import ( | 4 | import ( | ||
| 5 | "unsafe" | 5 | "unsafe" | ||
| 6 | 6 | ||||
| 7 | - | "github.com/bnema/purego" | |||
| 8 | "github.com/bnema/puregotk/pkg/core" | 7 | "github.com/bnema/puregotk/pkg/core" | ||
| 9 | "github.com/bnema/puregotk/v4/gio" | 8 | "github.com/bnema/puregotk/v4/gio" | ||
| 10 | "github.com/bnema/puregotk/v4/glib" | 9 | "github.com/bnema/puregotk/v4/glib" | ||
| @@ -35,6 +34,7 @@ type Clipboard struct { | |||||
| 35 | var xClipboardGLibType func() types.GType | 34 | var xClipboardGLibType func() types.GType | ||
| 36 | 35 | ||||
| 37 | func ClipboardGLibType() types.GType { | 36 | func ClipboardGLibType() types.GType { | ||
| 37 | + | core.LazyRegister(&xClipboardGLibType, "GDK", "gdk_clipboard_get_type", false) | |||
| 38 | return xClipboardGLibType() | 38 | return xClipboardGLibType() | ||
| 39 | } | 39 | } | ||
| 40 | 40 | ||||
| @@ -51,6 +51,7 @@ var xClipboardGetContent func(uintptr) uintptr | |||||
| 51 | // If the @clipboard is empty or its contents are not owned by the | 51 | // If the @clipboard is empty or its contents are not owned by the | ||
| 52 | // current process, %NULL will be returned. | 52 | // current process, %NULL will be returned. | ||
| 53 | func (x *Clipboard) GetContent() *ContentProvider { | 53 | func (x *Clipboard) GetContent() *ContentProvider { | ||
| 54 | + | core.LazyRegister(&xClipboardGetContent, "GDK", "gdk_clipboard_get_content", false) | |||
| 54 | var cls *ContentProvider | 55 | var cls *ContentProvider | ||
| 55 | 56 | ||||
| 56 | cret := xClipboardGetContent(x.GoPointer()) | 57 | cret := xClipboardGetContent(x.GoPointer()) | ||
| @@ -68,6 +69,7 @@ var xClipboardGetDisplay func(uintptr) uintptr | |||||
| 68 | 69 | ||||
| 69 | // Gets the `GdkDisplay` that the clipboard was created for. | 70 | // Gets the `GdkDisplay` that the clipboard was created for. | ||
| 70 | func (x *Clipboard) GetDisplay() *Display { | 71 | func (x *Clipboard) GetDisplay() *Display { | ||
| 72 | + | core.LazyRegister(&xClipboardGetDisplay, "GDK", "gdk_clipboard_get_display", false) | |||
| 71 | var cls *Display | 73 | var cls *Display | ||
| 72 | 74 | ||||
| 73 | cret := xClipboardGetDisplay(x.GoPointer()) | 75 | cret := xClipboardGetDisplay(x.GoPointer()) | ||
| @@ -85,6 +87,8 @@ var xClipboardGetFormats func(uintptr) uintptr | |||||
| 85 | 87 | ||||
| 86 | // Gets the formats that the clipboard can provide its current contents in. | 88 | // Gets the formats that the clipboard can provide its current contents in. | ||
| 87 | func (x *Clipboard) GetFormats() *ContentFormats { | 89 | func (x *Clipboard) GetFormats() *ContentFormats { | ||
| 90 | + | core.LazyRegister(&xClipboardGetFormats, "GDK", "gdk_clipboard_get_formats", false) | |||
| 91 | + | ||||
| 88 | cret := xClipboardGetFormats(x.GoPointer()) | 92 | cret := xClipboardGetFormats(x.GoPointer()) | ||
| 89 | if cret == 0 { | 93 | if cret == 0 { | ||
| 90 | return nil | 94 | return nil | ||
| @@ -102,6 +106,8 @@ var xClipboardIsLocal func(uintptr) bool | |||||
| 102 | // Note that [method@Gdk.Clipboard.get_content] may return %NULL | 106 | // Note that [method@Gdk.Clipboard.get_content] may return %NULL | ||
| 103 | // even on a local clipboard. In this case the clipboard is empty. | 107 | // even on a local clipboard. In this case the clipboard is empty. | ||
| 104 | func (x *Clipboard) IsLocal() bool { | 108 | func (x *Clipboard) IsLocal() bool { | ||
| 109 | + | core.LazyRegister(&xClipboardIsLocal, "GDK", "gdk_clipboard_is_local", false) | |||
| 110 | + | ||||
| 105 | cret := xClipboardIsLocal(x.GoPointer()) | 111 | cret := xClipboardIsLocal(x.GoPointer()) | ||
| 106 | return cret | 112 | return cret | ||
| 107 | } | 113 | } | ||
| @@ -114,6 +120,8 @@ var xClipboardReadAsync func(uintptr, []string, int, uintptr, uintptr, uintptr) | |||||
| 114 | // The clipboard will choose the most suitable mime type from the given list | 120 | // The clipboard will choose the most suitable mime type from the given list | ||
| 115 | // to fulfill the request, preferring the ones listed first. | 121 | // to fulfill the request, preferring the ones listed first. | ||
| 116 | func (x *Clipboard) ReadAsync(MimeTypesVar []string, IoPriorityVar int, CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) { | 122 | func (x *Clipboard) ReadAsync(MimeTypesVar []string, IoPriorityVar int, CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) { | ||
| 123 | + | core.LazyRegister(&xClipboardReadAsync, "GDK", "gdk_clipboard_read_async", false) | |||
| 124 | + | ||||
| 117 | xClipboardReadAsync(x.GoPointer(), MimeTypesVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | 125 | xClipboardReadAsync(x.GoPointer(), MimeTypesVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | ||
| 118 | } | 126 | } | ||
| 119 | 127 | ||||
| @@ -123,6 +131,7 @@ var xClipboardReadFinish func(uintptr, uintptr, *string, **glib.Error) uintptr | |||||
| 123 | // | 131 | // | ||
| 124 | // See [method@Gdk.Clipboard.read_async]. | 132 | // See [method@Gdk.Clipboard.read_async]. | ||
| 125 | func (x *Clipboard) ReadFinish(ResultVar gio.AsyncResult, OutMimeTypeVar *string) (*gio.InputStream, error) { | 133 | func (x *Clipboard) ReadFinish(ResultVar gio.AsyncResult, OutMimeTypeVar *string) (*gio.InputStream, error) { | ||
| 134 | + | core.LazyRegister(&xClipboardReadFinish, "GDK", "gdk_clipboard_read_finish", false) | |||
| 126 | var cls *gio.InputStream | 135 | var cls *gio.InputStream | ||
| 127 | var cerr *glib.Error | 136 | var cerr *glib.Error | ||
| 128 | 137 | ||||
| @@ -147,6 +156,8 @@ var xClipboardReadTextAsync func(uintptr, uintptr, uintptr, uintptr) | |||||
| 147 | // Use that function or [method@Gdk.Clipboard.read_async] directly if you | 156 | // Use that function or [method@Gdk.Clipboard.read_async] directly if you | ||
| 148 | // need more control over the operation. | 157 | // need more control over the operation. | ||
| 149 | func (x *Clipboard) ReadTextAsync(CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) { | 158 | func (x *Clipboard) ReadTextAsync(CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) { | ||
| 159 | + | core.LazyRegister(&xClipboardReadTextAsync, "GDK", "gdk_clipboard_read_text_async", false) | |||
| 160 | + | ||||
| 150 | xClipboardReadTextAsync(x.GoPointer(), CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | 161 | xClipboardReadTextAsync(x.GoPointer(), CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | ||
| 151 | } | 162 | } | ||
| 152 | 163 | ||||
| @@ -156,6 +167,7 @@ var xClipboardReadTextFinish func(uintptr, uintptr, **glib.Error) string | |||||
| 156 | // | 167 | // | ||
| 157 | // See [method@Gdk.Clipboard.read_text_async]. | 168 | // See [method@Gdk.Clipboard.read_text_async]. | ||
| 158 | func (x *Clipboard) ReadTextFinish(ResultVar gio.AsyncResult) (string, error) { | 169 | func (x *Clipboard) ReadTextFinish(ResultVar gio.AsyncResult) (string, error) { | ||
| 170 | + | core.LazyRegister(&xClipboardReadTextFinish, "GDK", "gdk_clipboard_read_text_finish", false) | |||
| 159 | var cerr *glib.Error | 171 | var cerr *glib.Error | ||
| 160 | 172 | ||||
| 161 | cret := xClipboardReadTextFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr) | 173 | cret := xClipboardReadTextFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr) | ||
| @@ -173,6 +185,8 @@ var xClipboardReadTextureAsync func(uintptr, uintptr, uintptr, uintptr) | |||||
| 173 | // Use that function or [method@Gdk.Clipboard.read_async] directly if you | 185 | // Use that function or [method@Gdk.Clipboard.read_async] directly if you | ||
| 174 | // need more control over the operation. | 186 | // need more control over the operation. | ||
| 175 | func (x *Clipboard) ReadTextureAsync(CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) { | 187 | func (x *Clipboard) ReadTextureAsync(CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) { | ||
| 188 | + | core.LazyRegister(&xClipboardReadTextureAsync, "GDK", "gdk_clipboard_read_texture_async", false) | |||
| 189 | + | ||||
| 176 | xClipboardReadTextureAsync(x.GoPointer(), CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | 190 | xClipboardReadTextureAsync(x.GoPointer(), CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | ||
| 177 | } | 191 | } | ||
| 178 | 192 | ||||
| @@ -182,6 +196,7 @@ var xClipboardReadTextureFinish func(uintptr, uintptr, **glib.Error) uintptr | |||||
| 182 | // | 196 | // | ||
| 183 | // See [method@Gdk.Clipboard.read_texture_async]. | 197 | // See [method@Gdk.Clipboard.read_texture_async]. | ||
| 184 | func (x *Clipboard) ReadTextureFinish(ResultVar gio.AsyncResult) (*Texture, error) { | 198 | func (x *Clipboard) ReadTextureFinish(ResultVar gio.AsyncResult) (*Texture, error) { | ||
| 199 | + | core.LazyRegister(&xClipboardReadTextureFinish, "GDK", "gdk_clipboard_read_texture_finish", false) | |||
| 185 | var cls *Texture | 200 | var cls *Texture | ||
| 186 | var cerr *glib.Error | 201 | var cerr *glib.Error | ||
| 187 | 202 | ||||
| @@ -207,6 +222,8 @@ var xClipboardReadValueAsync func(uintptr, types.GType, int, uintptr, uintptr, u | |||||
| 207 | // the value will be copied directly. Otherwise, GDK will try to use | 222 | // the value will be copied directly. Otherwise, GDK will try to use | ||
| 208 | // [func@content_deserialize_async] to convert the clipboard's data. | 223 | // [func@content_deserialize_async] to convert the clipboard's data. | ||
| 209 | func (x *Clipboard) ReadValueAsync(TypeVar types.GType, IoPriorityVar int, CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) { | 224 | func (x *Clipboard) ReadValueAsync(TypeVar types.GType, IoPriorityVar int, CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) { | ||
| 225 | + | core.LazyRegister(&xClipboardReadValueAsync, "GDK", "gdk_clipboard_read_value_async", false) | |||
| 226 | + | ||||
| 210 | xClipboardReadValueAsync(x.GoPointer(), TypeVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | 227 | xClipboardReadValueAsync(x.GoPointer(), TypeVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | ||
| 211 | } | 228 | } | ||
| 212 | 229 | ||||
| @@ -216,6 +233,7 @@ var xClipboardReadValueFinish func(uintptr, uintptr, **glib.Error) uintptr | |||||
| 216 | // | 233 | // | ||
| 217 | // See [method@Gdk.Clipboard.read_value_async]. | 234 | // See [method@Gdk.Clipboard.read_value_async]. | ||
| 218 | func (x *Clipboard) ReadValueFinish(ResultVar gio.AsyncResult) (*gobject.Value, error) { | 235 | func (x *Clipboard) ReadValueFinish(ResultVar gio.AsyncResult) (*gobject.Value, error) { | ||
| 236 | + | core.LazyRegister(&xClipboardReadValueFinish, "GDK", "gdk_clipboard_read_value_finish", false) | |||
| 219 | var cerr *glib.Error | 237 | var cerr *glib.Error | ||
| 220 | 238 | ||||
| 221 | cret := xClipboardReadValueFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr) | 239 | cret := xClipboardReadValueFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr) | ||
| @@ -242,6 +260,8 @@ var xClipboardSet func(uintptr, types.GType, ...interface{}) | |||||
| 242 | // gdk_clipboard_set (clipboard, GDK_TYPE_TEXTURE, some_texture); | 260 | // gdk_clipboard_set (clipboard, GDK_TYPE_TEXTURE, some_texture); | ||
| 243 | // ``` | 261 | // ``` | ||
| 244 | func (x *Clipboard) Set(TypeVar types.GType, varArgs ...interface{}) { | 262 | func (x *Clipboard) Set(TypeVar types.GType, varArgs ...interface{}) { | ||
| 263 | + | core.LazyRegister(&xClipboardSet, "GDK", "gdk_clipboard_set", false) | |||
| 264 | + | ||||
| 245 | xClipboardSet(x.GoPointer(), TypeVar, varArgs...) | 265 | xClipboardSet(x.GoPointer(), TypeVar, varArgs...) | ||
| 246 | } | 266 | } | ||
| 247 | 267 | ||||
| @@ -260,6 +280,8 @@ var xClipboardSetContent func(uintptr, uintptr) bool | |||||
| 260 | // @clipboard's read functions, @clipboard will select the best format to | 280 | // @clipboard's read functions, @clipboard will select the best format to | ||
| 261 | // transfer the contents and then request that format from @provider. | 281 | // transfer the contents and then request that format from @provider. | ||
| 262 | func (x *Clipboard) SetContent(ProviderVar *ContentProvider) bool { | 282 | func (x *Clipboard) SetContent(ProviderVar *ContentProvider) bool { | ||
| 283 | + | core.LazyRegister(&xClipboardSetContent, "GDK", "gdk_clipboard_set_content", false) | |||
| 284 | + | ||||
| 263 | cret := xClipboardSetContent(x.GoPointer(), ProviderVar.GoPointer()) | 285 | cret := xClipboardSetContent(x.GoPointer(), ProviderVar.GoPointer()) | ||
| 264 | return cret | 286 | return cret | ||
| 265 | } | 287 | } | ||
| @@ -268,6 +290,8 @@ var xClipboardSetText func(uintptr, string) | |||||
| 268 | 290 | ||||
| 269 | // Puts the given @text into the clipboard. | 291 | // Puts the given @text into the clipboard. | ||
| 270 | func (x *Clipboard) SetText(TextVar string) { | 292 | func (x *Clipboard) SetText(TextVar string) { | ||
| 293 | + | core.LazyRegister(&xClipboardSetText, "GDK", "gdk_clipboard_set_text", false) | |||
| 294 | + | ||||
| 271 | xClipboardSetText(x.GoPointer(), TextVar) | 295 | xClipboardSetText(x.GoPointer(), TextVar) | ||
| 272 | } | 296 | } | ||
| 273 | 297 | ||||
| @@ -275,6 +299,8 @@ var xClipboardSetTexture func(uintptr, uintptr) | |||||
| 275 | 299 | ||||
| 276 | // Puts the given @texture into the clipboard. | 300 | // Puts the given @texture into the clipboard. | ||
| 277 | func (x *Clipboard) SetTexture(TextureVar *Texture) { | 301 | func (x *Clipboard) SetTexture(TextureVar *Texture) { | ||
| 302 | + | core.LazyRegister(&xClipboardSetTexture, "GDK", "gdk_clipboard_set_texture", false) | |||
| 303 | + | ||||
| 278 | xClipboardSetTexture(x.GoPointer(), TextureVar.GoPointer()) | 304 | xClipboardSetTexture(x.GoPointer(), TextureVar.GoPointer()) | ||
| 279 | } | 305 | } | ||
| 280 | 306 | ||||
| @@ -282,6 +308,8 @@ var xClipboardSetValist func(uintptr, types.GType, []interface{}) | |||||
| 282 | 308 | ||||
| 283 | // Sets the clipboard to contain the value collected from the given @args. | 309 | // Sets the clipboard to contain the value collected from the given @args. | ||
| 284 | func (x *Clipboard) SetValist(TypeVar types.GType, ArgsVar []interface{}) { | 310 | func (x *Clipboard) SetValist(TypeVar types.GType, ArgsVar []interface{}) { | ||
| 311 | + | core.LazyRegister(&xClipboardSetValist, "GDK", "gdk_clipboard_set_valist", false) | |||
| 312 | + | ||||
| 285 | xClipboardSetValist(x.GoPointer(), TypeVar, ArgsVar) | 313 | xClipboardSetValist(x.GoPointer(), TypeVar, ArgsVar) | ||
| 286 | } | 314 | } | ||
| 287 | 315 | ||||
| @@ -289,6 +317,8 @@ var xClipboardSetValue func(uintptr, *gobject.Value) | |||||
| 289 | 317 | ||||
| 290 | // Sets the @clipboard to contain the given @value. | 318 | // Sets the @clipboard to contain the given @value. | ||
| 291 | func (x *Clipboard) SetValue(ValueVar *gobject.Value) { | 319 | func (x *Clipboard) SetValue(ValueVar *gobject.Value) { | ||
| 320 | + | core.LazyRegister(&xClipboardSetValue, "GDK", "gdk_clipboard_set_value", false) | |||
| 321 | + | ||||
| 292 | xClipboardSetValue(x.GoPointer(), ValueVar) | 322 | xClipboardSetValue(x.GoPointer(), ValueVar) | ||
| 293 | } | 323 | } | ||
| 294 | 324 | ||||
| @@ -307,6 +337,8 @@ var xClipboardStoreAsync func(uintptr, int, uintptr, uintptr, uintptr) | |||||
| 307 | // [GtkApplication](../gtk4/class.Application.html) | 337 | // [GtkApplication](../gtk4/class.Application.html) | ||
| 308 | // is shut down, so you likely don't need to call it. | 338 | // is shut down, so you likely don't need to call it. | ||
| 309 | func (x *Clipboard) StoreAsync(IoPriorityVar int, CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) { | 339 | func (x *Clipboard) StoreAsync(IoPriorityVar int, CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) { | ||
| 340 | + | core.LazyRegister(&xClipboardStoreAsync, "GDK", "gdk_clipboard_store_async", false) | |||
| 341 | + | ||||
| 310 | xClipboardStoreAsync(x.GoPointer(), IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | 342 | xClipboardStoreAsync(x.GoPointer(), IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | ||
| 311 | } | 343 | } | ||
| 312 | 344 | ||||
| @@ -316,6 +348,7 @@ var xClipboardStoreFinish func(uintptr, uintptr, **glib.Error) bool | |||||
| 316 | // | 348 | // | ||
| 317 | // See [method@Gdk.Clipboard.store_async]. | 349 | // See [method@Gdk.Clipboard.store_async]. | ||
| 318 | func (x *Clipboard) StoreFinish(ResultVar gio.AsyncResult) (bool, error) { | 350 | func (x *Clipboard) StoreFinish(ResultVar gio.AsyncResult) (bool, error) { | ||
| 351 | + | core.LazyRegister(&xClipboardStoreFinish, "GDK", "gdk_clipboard_store_finish", false) | |||
| 319 | var cerr *glib.Error | 352 | var cerr *glib.Error | ||
| 320 | 353 | ||||
| 321 | cret := xClipboardStoreFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr) | 354 | cret := xClipboardStoreFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr) | ||
| @@ -378,35 +411,4 @@ func (x *Clipboard) ConnectChanged(cb *func(Clipboard)) uint { | |||||
| 378 | func init() { | 411 | func init() { | ||
| 379 | core.SetPackageName("GDK", "gtk4") | 412 | core.SetPackageName("GDK", "gtk4") | ||
| 380 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | 413 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | ||
| 381 | - | var libs []uintptr | |||
| 382 | - | for _, libPath := range core.GetPaths("GDK") { | |||
| 383 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 384 | - | if err != nil { | |||
| 385 | - | panic(err) | |||
| 386 | - | } | |||
| 387 | - | libs = append(libs, lib) | |||
| 388 | - | } | |||
| 389 | - | ||||
| 390 | - | core.PuregoSafeRegister(&xClipboardGLibType, libs, "gdk_clipboard_get_type") | |||
| 391 | - | ||||
| 392 | - | core.PuregoSafeRegister(&xClipboardGetContent, libs, "gdk_clipboard_get_content") | |||
| 393 | - | core.PuregoSafeRegister(&xClipboardGetDisplay, libs, "gdk_clipboard_get_display") | |||
| 394 | - | core.PuregoSafeRegister(&xClipboardGetFormats, libs, "gdk_clipboard_get_formats") | |||
| 395 | - | core.PuregoSafeRegister(&xClipboardIsLocal, libs, "gdk_clipboard_is_local") | |||
| 396 | - | core.PuregoSafeRegister(&xClipboardReadAsync, libs, "gdk_clipboard_read_async") | |||
| 397 | - | core.PuregoSafeRegister(&xClipboardReadFinish, libs, "gdk_clipboard_read_finish") | |||
| 398 | - | core.PuregoSafeRegister(&xClipboardReadTextAsync, libs, "gdk_clipboard_read_text_async") | |||
| 399 | - | core.PuregoSafeRegister(&xClipboardReadTextFinish, libs, "gdk_clipboard_read_text_finish") | |||
| 400 | - | core.PuregoSafeRegister(&xClipboardReadTextureAsync, libs, "gdk_clipboard_read_texture_async") | |||
| 401 | - | core.PuregoSafeRegister(&xClipboardReadTextureFinish, libs, "gdk_clipboard_read_texture_finish") | |||
| 402 | - | core.PuregoSafeRegister(&xClipboardReadValueAsync, libs, "gdk_clipboard_read_value_async") | |||
| 403 | - | core.PuregoSafeRegister(&xClipboardReadValueFinish, libs, "gdk_clipboard_read_value_finish") | |||
| 404 | - | core.PuregoSafeRegister(&xClipboardSet, libs, "gdk_clipboard_set") | |||
| 405 | - | core.PuregoSafeRegister(&xClipboardSetContent, libs, "gdk_clipboard_set_content") | |||
| 406 | - | core.PuregoSafeRegister(&xClipboardSetText, libs, "gdk_clipboard_set_text") | |||
| 407 | - | core.PuregoSafeRegister(&xClipboardSetTexture, libs, "gdk_clipboard_set_texture") | |||
| 408 | - | core.PuregoSafeRegister(&xClipboardSetValist, libs, "gdk_clipboard_set_valist") | |||
| 409 | - | core.PuregoSafeRegister(&xClipboardSetValue, libs, "gdk_clipboard_set_value") | |||
| 410 | - | core.PuregoSafeRegister(&xClipboardStoreAsync, libs, "gdk_clipboard_store_async") | |||
| 411 | - | core.PuregoSafeRegister(&xClipboardStoreFinish, libs, "gdk_clipboard_store_finish") | |||
| 412 | } | 414 | } | ||