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
| @@ -4,6 +4,7 @@ package gdk | |||
| 4 | 4 | import ( | |
| 5 | 5 | "unsafe" | |
| 6 | 6 | ||
| 7 | + | "github.com/bnema/purego" | |
| 7 | 8 | "github.com/bnema/puregotk/pkg/core" | |
| 8 | 9 | "github.com/bnema/puregotk/v4/gio" | |
| 9 | 10 | "github.com/bnema/puregotk/v4/glib" | |
| @@ -32,7 +33,6 @@ type Display struct { | |||
| 32 | 33 | var xDisplayGLibType func() types.GType | |
| 33 | 34 | ||
| 34 | 35 | func DisplayGLibType() types.GType { | |
| 35 | - | core.LazyRegister(&xDisplayGLibType, "GDK", "gdk_display_get_type", false) | |
| 36 | 36 | return xDisplayGLibType() | |
| 37 | 37 | } | |
| 38 | 38 | ||
| @@ -46,8 +46,6 @@ var xDisplayBeep func(uintptr) | |||
| 46 | 46 | ||
| 47 | 47 | // Emits a short beep on @display | |
| 48 | 48 | func (x *Display) Beep() { | |
| 49 | - | core.LazyRegister(&xDisplayBeep, "GDK", "gdk_display_beep", false) | |
| 50 | - | ||
| 51 | 49 | xDisplayBeep(x.GoPointer()) | |
| 52 | 50 | } | |
| 53 | 51 | ||
| @@ -57,8 +55,6 @@ var xDisplayClose func(uintptr) | |||
| 57 | 55 | // | |
| 58 | 56 | // This cleans up associated resources. | |
| 59 | 57 | func (x *Display) Close() { | |
| 60 | - | core.LazyRegister(&xDisplayClose, "GDK", "gdk_display_close", false) | |
| 61 | - | ||
| 62 | 58 | xDisplayClose(x.GoPointer()) | |
| 63 | 59 | } | |
| 64 | 60 | ||
| @@ -74,7 +70,6 @@ var xDisplayCreateGlContext func(uintptr, **glib.Error) uintptr | |||
| 74 | 70 | // Before using the returned `GdkGLContext`, you will need to | |
| 75 | 71 | // call [method@Gdk.GLContext.make_current] or [method@Gdk.GLContext.realize]. | |
| 76 | 72 | func (x *Display) CreateGlContext() (*GLContext, error) { | |
| 77 | - | core.LazyRegister(&xDisplayCreateGlContext, "GDK", "gdk_display_create_gl_context", false) | |
| 78 | 73 | var cls *GLContext | |
| 79 | 74 | var cerr *glib.Error | |
| 80 | 75 | ||
| @@ -95,8 +90,6 @@ var xDisplayDeviceIsGrabbed func(uintptr, uintptr) bool | |||
| 95 | 90 | ||
| 96 | 91 | // Returns %TRUE if there is an ongoing grab on @device for @display. | |
| 97 | 92 | func (x *Display) DeviceIsGrabbed(DeviceVar *Device) bool { | |
| 98 | - | core.LazyRegister(&xDisplayDeviceIsGrabbed, "GDK", "gdk_display_device_is_grabbed", false) | |
| 99 | - | ||
| 100 | 93 | cret := xDisplayDeviceIsGrabbed(x.GoPointer(), DeviceVar.GoPointer()) | |
| 101 | 94 | return cret | |
| 102 | 95 | } | |
| @@ -114,8 +107,6 @@ var xDisplayFlush func(uintptr) | |||
| 114 | 107 | // This is most useful for X11. On windowing systems where requests are | |
| 115 | 108 | // handled synchronously, this function will do nothing. | |
| 116 | 109 | func (x *Display) Flush() { | |
| 117 | - | core.LazyRegister(&xDisplayFlush, "GDK", "gdk_display_flush", false) | |
| 118 | - | ||
| 119 | 110 | xDisplayFlush(x.GoPointer()) | |
| 120 | 111 | } | |
| 121 | 112 | ||
| @@ -124,7 +115,6 @@ var xDisplayGetAppLaunchContext func(uintptr) uintptr | |||
| 124 | 115 | // Returns a `GdkAppLaunchContext` suitable for launching | |
| 125 | 116 | // applications on the given display. | |
| 126 | 117 | func (x *Display) GetAppLaunchContext() *AppLaunchContext { | |
| 127 | - | core.LazyRegister(&xDisplayGetAppLaunchContext, "GDK", "gdk_display_get_app_launch_context", false) | |
| 128 | 118 | var cls *AppLaunchContext | |
| 129 | 119 | ||
| 130 | 120 | cret := xDisplayGetAppLaunchContext(x.GoPointer()) | |
| @@ -141,7 +131,6 @@ var xDisplayGetClipboard func(uintptr) uintptr | |||
| 141 | 131 | ||
| 142 | 132 | // Gets the clipboard used for copy/paste operations. | |
| 143 | 133 | func (x *Display) GetClipboard() *Clipboard { | |
| 144 | - | core.LazyRegister(&xDisplayGetClipboard, "GDK", "gdk_display_get_clipboard", false) | |
| 145 | 134 | var cls *Clipboard | |
| 146 | 135 | ||
| 147 | 136 | cret := xDisplayGetClipboard(x.GoPointer()) | |
| @@ -162,7 +151,6 @@ var xDisplayGetDefaultSeat func(uintptr) uintptr | |||
| 162 | 151 | // Note that a display may not have a seat. In this case, | |
| 163 | 152 | // this function will return %NULL. | |
| 164 | 153 | func (x *Display) GetDefaultSeat() *Seat { | |
| 165 | - | core.LazyRegister(&xDisplayGetDefaultSeat, "GDK", "gdk_display_get_default_seat", false) | |
| 166 | 154 | var cls *Seat | |
| 167 | 155 | ||
| 168 | 156 | cret := xDisplayGetDefaultSeat(x.GoPointer()) | |
| @@ -190,8 +178,6 @@ var xDisplayGetDmabufFormats func(uintptr) uintptr | |||
| 190 | 178 | // | |
| 191 | 179 | // This function is threadsafe. It can be called from any thread. | |
| 192 | 180 | func (x *Display) GetDmabufFormats() *DmabufFormats { | |
| 193 | - | core.LazyRegister(&xDisplayGetDmabufFormats, "GDK", "gdk_display_get_dmabuf_formats", false) | |
| 194 | - | ||
| 195 | 181 | cret := xDisplayGetDmabufFormats(x.GoPointer()) | |
| 196 | 182 | if cret == 0 { | |
| 197 | 183 | return nil | |
| @@ -204,7 +190,6 @@ var xDisplayGetMonitorAtSurface func(uintptr, uintptr) uintptr | |||
| 204 | 190 | // Gets the monitor in which the largest area of @surface | |
| 205 | 191 | // resides. | |
| 206 | 192 | func (x *Display) GetMonitorAtSurface(SurfaceVar *Surface) *Monitor { | |
| 207 | - | core.LazyRegister(&xDisplayGetMonitorAtSurface, "GDK", "gdk_display_get_monitor_at_surface", false) | |
| 208 | 193 | var cls *Monitor | |
| 209 | 194 | ||
| 210 | 195 | cret := xDisplayGetMonitorAtSurface(x.GoPointer(), SurfaceVar.GoPointer()) | |
| @@ -228,7 +213,6 @@ var xDisplayGetMonitors func(uintptr) uintptr | |||
| 228 | 213 | // You can listen to the GListModel::items-changed signal on | |
| 229 | 214 | // this list to monitor changes to the monitor of this display. | |
| 230 | 215 | func (x *Display) GetMonitors() *gio.ListModelBase { | |
| 231 | - | core.LazyRegister(&xDisplayGetMonitors, "GDK", "gdk_display_get_monitors", false) | |
| 232 | 216 | var cls *gio.ListModelBase | |
| 233 | 217 | ||
| 234 | 218 | cret := xDisplayGetMonitors(x.GoPointer()) | |
| @@ -246,8 +230,6 @@ var xDisplayGetName func(uintptr) string | |||
| 246 | 230 | ||
| 247 | 231 | // Gets the name of the display. | |
| 248 | 232 | func (x *Display) GetName() string { | |
| 249 | - | core.LazyRegister(&xDisplayGetName, "GDK", "gdk_display_get_name", false) | |
| 250 | - | ||
| 251 | 233 | cret := xDisplayGetName(x.GoPointer()) | |
| 252 | 234 | return cret | |
| 253 | 235 | } | |
| @@ -259,7 +241,6 @@ var xDisplayGetPrimaryClipboard func(uintptr) uintptr | |||
| 259 | 241 | // On backends where the primary clipboard is not supported natively, | |
| 260 | 242 | // GDK emulates this clipboard locally. | |
| 261 | 243 | func (x *Display) GetPrimaryClipboard() *Clipboard { | |
| 262 | - | core.LazyRegister(&xDisplayGetPrimaryClipboard, "GDK", "gdk_display_get_primary_clipboard", false) | |
| 263 | 244 | var cls *Clipboard | |
| 264 | 245 | ||
| 265 | 246 | cret := xDisplayGetPrimaryClipboard(x.GoPointer()) | |
| @@ -278,8 +259,6 @@ var xDisplayGetSetting func(uintptr, string, *gobject.Value) bool | |||
| 278 | 259 | // Retrieves a desktop-wide setting such as double-click time | |
| 279 | 260 | // for the @display. | |
| 280 | 261 | func (x *Display) GetSetting(NameVar string, ValueVar *gobject.Value) bool { | |
| 281 | - | core.LazyRegister(&xDisplayGetSetting, "GDK", "gdk_display_get_setting", false) | |
| 282 | - | ||
| 283 | 262 | cret := xDisplayGetSetting(x.GoPointer(), NameVar, ValueVar) | |
| 284 | 263 | return cret | |
| 285 | 264 | } | |
| @@ -289,8 +268,6 @@ var xDisplayGetStartupNotificationId func(uintptr) string | |||
| 289 | 268 | // Gets the startup notification ID for a Wayland display, or %NULL | |
| 290 | 269 | // if no ID has been defined. | |
| 291 | 270 | func (x *Display) GetStartupNotificationId() string { | |
| 292 | - | core.LazyRegister(&xDisplayGetStartupNotificationId, "GDK", "gdk_display_get_startup_notification_id", false) | |
| 293 | - | ||
| 294 | 271 | cret := xDisplayGetStartupNotificationId(x.GoPointer()) | |
| 295 | 272 | return cret | |
| 296 | 273 | } | |
| @@ -299,8 +276,6 @@ var xDisplayIsClosed func(uintptr) bool | |||
| 299 | 276 | ||
| 300 | 277 | // Finds out if the display has been closed. | |
| 301 | 278 | func (x *Display) IsClosed() bool { | |
| 302 | - | core.LazyRegister(&xDisplayIsClosed, "GDK", "gdk_display_is_closed", false) | |
| 303 | - | ||
| 304 | 279 | cret := xDisplayIsClosed(x.GoPointer()) | |
| 305 | 280 | return cret | |
| 306 | 281 | } | |
| @@ -318,8 +293,6 @@ var xDisplayIsComposited func(uintptr) bool | |||
| 318 | 293 | // | |
| 319 | 294 | // On modern displays, this value is always %TRUE. | |
| 320 | 295 | func (x *Display) IsComposited() bool { | |
| 321 | - | core.LazyRegister(&xDisplayIsComposited, "GDK", "gdk_display_is_composited", false) | |
| 322 | - | ||
| 323 | 296 | cret := xDisplayIsComposited(x.GoPointer()) | |
| 324 | 297 | return cret | |
| 325 | 298 | } | |
| @@ -338,8 +311,6 @@ var xDisplayIsRgba func(uintptr) bool | |||
| 338 | 311 | // | |
| 339 | 312 | // On modern displays, this value is always %TRUE. | |
| 340 | 313 | func (x *Display) IsRgba() bool { | |
| 341 | - | core.LazyRegister(&xDisplayIsRgba, "GDK", "gdk_display_is_rgba", false) | |
| 342 | - | ||
| 343 | 314 | cret := xDisplayIsRgba(x.GoPointer()) | |
| 344 | 315 | return cret | |
| 345 | 316 | } | |
| @@ -348,8 +319,6 @@ var xDisplayListSeats func(uintptr) uintptr | |||
| 348 | 319 | ||
| 349 | 320 | // Returns the list of seats known to @display. | |
| 350 | 321 | func (x *Display) ListSeats() *glib.List { | |
| 351 | - | core.LazyRegister(&xDisplayListSeats, "GDK", "gdk_display_list_seats", false) | |
| 352 | - | ||
| 353 | 322 | cret := xDisplayListSeats(x.GoPointer()) | |
| 354 | 323 | if cret == 0 { | |
| 355 | 324 | return nil | |
| @@ -369,8 +338,6 @@ var xDisplayMapKeycode func(uintptr, uint, *uintptr, *[]uint, *int) bool | |||
| 369 | 338 | // | |
| 370 | 339 | // Free the returned arrays with g_free(). | |
| 371 | 340 | func (x *Display) MapKeycode(KeycodeVar uint, KeysVar *uintptr, KeyvalsVar *[]uint, NEntriesVar *int) bool { | |
| 372 | - | core.LazyRegister(&xDisplayMapKeycode, "GDK", "gdk_display_map_keycode", false) | |
| 373 | - | ||
| 374 | 341 | cret := xDisplayMapKeycode(x.GoPointer(), KeycodeVar, KeysVar, KeyvalsVar, NEntriesVar) | |
| 375 | 342 | return cret | |
| 376 | 343 | } | |
| @@ -393,8 +360,6 @@ var xDisplayMapKeyval func(uintptr, uint, *uintptr, *int) bool | |||
| 393 | 360 | // | |
| 394 | 361 | // The returned array should be freed with g_free(). | |
| 395 | 362 | func (x *Display) MapKeyval(KeyvalVar uint, KeysVar *uintptr, NKeysVar *int) bool { | |
| 396 | - | core.LazyRegister(&xDisplayMapKeyval, "GDK", "gdk_display_map_keyval", false) | |
| 397 | - | ||
| 398 | 363 | cret := xDisplayMapKeyval(x.GoPointer(), KeyvalVar, KeysVar, NKeysVar) | |
| 399 | 364 | return cret | |
| 400 | 365 | } | |
| @@ -409,8 +374,6 @@ var xDisplayNotifyStartupComplete func(uintptr, string) | |||
| 409 | 374 | // [gtk_window_set_auto_startup_notification()](../gtk4/method.Window.set_auto_startup_notification.html) | |
| 410 | 375 | // is called to disable that feature. | |
| 411 | 376 | func (x *Display) NotifyStartupComplete(StartupIdVar string) { | |
| 412 | - | core.LazyRegister(&xDisplayNotifyStartupComplete, "GDK", "gdk_display_notify_startup_complete", false) | |
| 413 | - | ||
| 414 | 377 | xDisplayNotifyStartupComplete(x.GoPointer(), StartupIdVar) | |
| 415 | 378 | } | |
| 416 | 379 | ||
| @@ -431,7 +394,6 @@ var xDisplayPrepareGl func(uintptr, **glib.Error) bool | |||
| 431 | 394 | // as needed. But you can use it as a check when setting up code that | |
| 432 | 395 | // might make use of OpenGL. | |
| 433 | 396 | func (x *Display) PrepareGl() (bool, error) { | |
| 434 | - | core.LazyRegister(&xDisplayPrepareGl, "GDK", "gdk_display_prepare_gl", false) | |
| 435 | 397 | var cerr *glib.Error | |
| 436 | 398 | ||
| 437 | 399 | cret := xDisplayPrepareGl(x.GoPointer(), &cerr) | |
| @@ -445,8 +407,6 @@ var xDisplayPutEvent func(uintptr, uintptr) | |||
| 445 | 407 | ||
| 446 | 408 | // Adds the given event to the event queue for @display. | |
| 447 | 409 | func (x *Display) PutEvent(EventVar *Event) { | |
| 448 | - | core.LazyRegister(&xDisplayPutEvent, "GDK", "gdk_display_put_event", false) | |
| 449 | - | ||
| 450 | 410 | xDisplayPutEvent(x.GoPointer(), EventVar.GoPointer()) | |
| 451 | 411 | } | |
| 452 | 412 | ||
| @@ -459,8 +419,6 @@ var xDisplaySupportsInputShapes func(uintptr) bool | |||
| 459 | 419 | // | |
| 460 | 420 | // On modern displays, this value is always %TRUE. | |
| 461 | 421 | func (x *Display) SupportsInputShapes() bool { | |
| 462 | - | core.LazyRegister(&xDisplaySupportsInputShapes, "GDK", "gdk_display_supports_input_shapes", false) | |
| 463 | - | ||
| 464 | 422 | cret := xDisplaySupportsInputShapes(x.GoPointer()) | |
| 465 | 423 | return cret | |
| 466 | 424 | } | |
| @@ -472,8 +430,6 @@ var xDisplaySupportsShadowWidth func(uintptr) bool | |||
| 472 | 430 | // If %TRUE is returned the application decides if it wants to draw shadows. | |
| 473 | 431 | // If %FALSE is returned, the compositor decides if it wants to draw shadows. | |
| 474 | 432 | func (x *Display) SupportsShadowWidth() bool { | |
| 475 | - | core.LazyRegister(&xDisplaySupportsShadowWidth, "GDK", "gdk_display_supports_shadow_width", false) | |
| 476 | - | ||
| 477 | 433 | cret := xDisplaySupportsShadowWidth(x.GoPointer()) | |
| 478 | 434 | return cret | |
| 479 | 435 | } | |
| @@ -491,8 +447,6 @@ var xDisplaySync func(uintptr) | |||
| 491 | 447 | // This is most useful for X11. On windowing systems where requests are | |
| 492 | 448 | // handled synchronously, this function will do nothing. | |
| 493 | 449 | func (x *Display) Sync() { | |
| 494 | - | core.LazyRegister(&xDisplaySync, "GDK", "gdk_display_sync", false) | |
| 495 | - | ||
| 496 | 450 | xDisplaySync(x.GoPointer()) | |
| 497 | 451 | } | |
| 498 | 452 | ||
| @@ -518,8 +472,6 @@ var xDisplayTranslateKey func(uintptr, uint, ModifierType, int, *uint, *int, *in | |||
| 518 | 472 | // contains the translated keyval. It is exported for the benefit of | |
| 519 | 473 | // virtualized test environments. | |
| 520 | 474 | func (x *Display) TranslateKey(KeycodeVar uint, StateVar ModifierType, GroupVar int, KeyvalVar *uint, EffectiveGroupVar *int, LevelVar *int, ConsumedVar *ModifierType) bool { | |
| 521 | - | core.LazyRegister(&xDisplayTranslateKey, "GDK", "gdk_display_translate_key", false) | |
| 522 | - | ||
| 523 | 475 | cret := xDisplayTranslateKey(x.GoPointer(), KeycodeVar, StateVar, GroupVar, KeyvalVar, EffectiveGroupVar, LevelVar, ConsumedVar) | |
| 524 | 476 | return cret | |
| 525 | 477 | } | |
| @@ -698,7 +650,6 @@ var xDisplayGetDefault func() uintptr | |||
| 698 | 650 | // | |
| 699 | 651 | // gdk_display_manager_get_default_display (gdk_display_manager_get ()) | |
| 700 | 652 | func DisplayGetDefault() *Display { | |
| 701 | - | core.LazyRegister(&xDisplayGetDefault, "GDK", "gdk_display_get_default", false) | |
| 702 | 653 | var cls *Display | |
| 703 | 654 | ||
| 704 | 655 | cret := xDisplayGetDefault() | |
| @@ -718,7 +669,6 @@ var xDisplayOpen func(uintptr) uintptr | |||
| 718 | 669 | // | |
| 719 | 670 | // If opening the display fails, `NULL` is returned. | |
| 720 | 671 | func DisplayOpen(DisplayNameVar *string) *Display { | |
| 721 | - | core.LazyRegister(&xDisplayOpen, "GDK", "gdk_display_open", false) | |
| 722 | 672 | var cls *Display | |
| 723 | 673 | ||
| 724 | 674 | DisplayNameVarPtr := core.GStrdupNullable(DisplayNameVar) | |
| @@ -738,4 +688,46 @@ func DisplayOpen(DisplayNameVar *string) *Display { | |||
| 738 | 688 | func init() { | |
| 739 | 689 | core.SetPackageName("GDK", "gtk4") | |
| 740 | 690 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | |
| 691 | + | var libs []uintptr | |
| 692 | + | for _, libPath := range core.GetPaths("GDK") { | |
| 693 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 694 | + | if err != nil { | |
| 695 | + | panic(err) | |
| 696 | + | } | |
| 697 | + | libs = append(libs, lib) | |
| 698 | + | } | |
| 699 | + | ||
| 700 | + | core.PuregoSafeRegister(&xDisplayGLibType, libs, "gdk_display_get_type") | |
| 701 | + | ||
| 702 | + | core.PuregoSafeRegister(&xDisplayBeep, libs, "gdk_display_beep") | |
| 703 | + | core.PuregoSafeRegister(&xDisplayClose, libs, "gdk_display_close") | |
| 704 | + | core.PuregoSafeRegister(&xDisplayCreateGlContext, libs, "gdk_display_create_gl_context") | |
| 705 | + | core.PuregoSafeRegister(&xDisplayDeviceIsGrabbed, libs, "gdk_display_device_is_grabbed") | |
| 706 | + | core.PuregoSafeRegister(&xDisplayFlush, libs, "gdk_display_flush") | |
| 707 | + | core.PuregoSafeRegister(&xDisplayGetAppLaunchContext, libs, "gdk_display_get_app_launch_context") | |
| 708 | + | core.PuregoSafeRegister(&xDisplayGetClipboard, libs, "gdk_display_get_clipboard") | |
| 709 | + | core.PuregoSafeRegister(&xDisplayGetDefaultSeat, libs, "gdk_display_get_default_seat") | |
| 710 | + | core.PuregoSafeRegister(&xDisplayGetDmabufFormats, libs, "gdk_display_get_dmabuf_formats") | |
| 711 | + | core.PuregoSafeRegister(&xDisplayGetMonitorAtSurface, libs, "gdk_display_get_monitor_at_surface") | |
| 712 | + | core.PuregoSafeRegister(&xDisplayGetMonitors, libs, "gdk_display_get_monitors") | |
| 713 | + | core.PuregoSafeRegister(&xDisplayGetName, libs, "gdk_display_get_name") | |
| 714 | + | core.PuregoSafeRegister(&xDisplayGetPrimaryClipboard, libs, "gdk_display_get_primary_clipboard") | |
| 715 | + | core.PuregoSafeRegister(&xDisplayGetSetting, libs, "gdk_display_get_setting") | |
| 716 | + | core.PuregoSafeRegister(&xDisplayGetStartupNotificationId, libs, "gdk_display_get_startup_notification_id") | |
| 717 | + | core.PuregoSafeRegister(&xDisplayIsClosed, libs, "gdk_display_is_closed") | |
| 718 | + | core.PuregoSafeRegister(&xDisplayIsComposited, libs, "gdk_display_is_composited") | |
| 719 | + | core.PuregoSafeRegister(&xDisplayIsRgba, libs, "gdk_display_is_rgba") | |
| 720 | + | core.PuregoSafeRegister(&xDisplayListSeats, libs, "gdk_display_list_seats") | |
| 721 | + | core.PuregoSafeRegister(&xDisplayMapKeycode, libs, "gdk_display_map_keycode") | |
| 722 | + | core.PuregoSafeRegister(&xDisplayMapKeyval, libs, "gdk_display_map_keyval") | |
| 723 | + | core.PuregoSafeRegister(&xDisplayNotifyStartupComplete, libs, "gdk_display_notify_startup_complete") | |
| 724 | + | core.PuregoSafeRegister(&xDisplayPrepareGl, libs, "gdk_display_prepare_gl") | |
| 725 | + | core.PuregoSafeRegister(&xDisplayPutEvent, libs, "gdk_display_put_event") | |
| 726 | + | core.PuregoSafeRegister(&xDisplaySupportsInputShapes, libs, "gdk_display_supports_input_shapes") | |
| 727 | + | core.PuregoSafeRegister(&xDisplaySupportsShadowWidth, libs, "gdk_display_supports_shadow_width") | |
| 728 | + | core.PuregoSafeRegister(&xDisplaySync, libs, "gdk_display_sync") | |
| 729 | + | core.PuregoSafeRegister(&xDisplayTranslateKey, libs, "gdk_display_translate_key") | |
| 730 | + | ||
| 731 | + | core.PuregoSafeRegister(&xDisplayGetDefault, libs, "gdk_display_get_default") | |
| 732 | + | core.PuregoSafeRegister(&xDisplayOpen, libs, "gdk_display_open") | |
| 741 | 733 | } | |
| @@ -4,6 +4,7 @@ package gdk | |||||
| 4 | import ( | 4 | import ( | ||
| 5 | "unsafe" | 5 | "unsafe" | ||
| 6 | 6 | ||||
| 7 | + | "github.com/bnema/purego" | |||
| 7 | "github.com/bnema/puregotk/pkg/core" | 8 | "github.com/bnema/puregotk/pkg/core" | ||
| 8 | "github.com/bnema/puregotk/v4/gio" | 9 | "github.com/bnema/puregotk/v4/gio" | ||
| 9 | "github.com/bnema/puregotk/v4/glib" | 10 | "github.com/bnema/puregotk/v4/glib" | ||
| @@ -32,7 +33,6 @@ type Display struct { | |||||
| 32 | var xDisplayGLibType func() types.GType | 33 | var xDisplayGLibType func() types.GType | ||
| 33 | 34 | ||||
| 34 | func DisplayGLibType() types.GType { | 35 | func DisplayGLibType() types.GType { | ||
| 35 | - | core.LazyRegister(&xDisplayGLibType, "GDK", "gdk_display_get_type", false) | |||
| 36 | return xDisplayGLibType() | 36 | return xDisplayGLibType() | ||
| 37 | } | 37 | } | ||
| 38 | 38 | ||||
| @@ -46,8 +46,6 @@ var xDisplayBeep func(uintptr) | |||||
| 46 | 46 | ||||
| 47 | // Emits a short beep on @display | 47 | // Emits a short beep on @display | ||
| 48 | func (x *Display) Beep() { | 48 | func (x *Display) Beep() { | ||
| 49 | - | core.LazyRegister(&xDisplayBeep, "GDK", "gdk_display_beep", false) | |||
| 50 | - | ||||
| 51 | xDisplayBeep(x.GoPointer()) | 49 | xDisplayBeep(x.GoPointer()) | ||
| 52 | } | 50 | } | ||
| 53 | 51 | ||||
| @@ -57,8 +55,6 @@ var xDisplayClose func(uintptr) | |||||
| 57 | // | 55 | // | ||
| 58 | // This cleans up associated resources. | 56 | // This cleans up associated resources. | ||
| 59 | func (x *Display) Close() { | 57 | func (x *Display) Close() { | ||
| 60 | - | core.LazyRegister(&xDisplayClose, "GDK", "gdk_display_close", false) | |||
| 61 | - | ||||
| 62 | xDisplayClose(x.GoPointer()) | 58 | xDisplayClose(x.GoPointer()) | ||
| 63 | } | 59 | } | ||
| 64 | 60 | ||||
| @@ -74,7 +70,6 @@ var xDisplayCreateGlContext func(uintptr, **glib.Error) uintptr | |||||
| 74 | // Before using the returned `GdkGLContext`, you will need to | 70 | // Before using the returned `GdkGLContext`, you will need to | ||
| 75 | // call [method@Gdk.GLContext.make_current] or [method@Gdk.GLContext.realize]. | 71 | // call [method@Gdk.GLContext.make_current] or [method@Gdk.GLContext.realize]. | ||
| 76 | func (x *Display) CreateGlContext() (*GLContext, error) { | 72 | func (x *Display) CreateGlContext() (*GLContext, error) { | ||
| 77 | - | core.LazyRegister(&xDisplayCreateGlContext, "GDK", "gdk_display_create_gl_context", false) | |||
| 78 | var cls *GLContext | 73 | var cls *GLContext | ||
| 79 | var cerr *glib.Error | 74 | var cerr *glib.Error | ||
| 80 | 75 | ||||
| @@ -95,8 +90,6 @@ var xDisplayDeviceIsGrabbed func(uintptr, uintptr) bool | |||||
| 95 | 90 | ||||
| 96 | // Returns %TRUE if there is an ongoing grab on @device for @display. | 91 | // Returns %TRUE if there is an ongoing grab on @device for @display. | ||
| 97 | func (x *Display) DeviceIsGrabbed(DeviceVar *Device) bool { | 92 | func (x *Display) DeviceIsGrabbed(DeviceVar *Device) bool { | ||
| 98 | - | core.LazyRegister(&xDisplayDeviceIsGrabbed, "GDK", "gdk_display_device_is_grabbed", false) | |||
| 99 | - | ||||
| 100 | cret := xDisplayDeviceIsGrabbed(x.GoPointer(), DeviceVar.GoPointer()) | 93 | cret := xDisplayDeviceIsGrabbed(x.GoPointer(), DeviceVar.GoPointer()) | ||
| 101 | return cret | 94 | return cret | ||
| 102 | } | 95 | } | ||
| @@ -114,8 +107,6 @@ var xDisplayFlush func(uintptr) | |||||
| 114 | // This is most useful for X11. On windowing systems where requests are | 107 | // This is most useful for X11. On windowing systems where requests are | ||
| 115 | // handled synchronously, this function will do nothing. | 108 | // handled synchronously, this function will do nothing. | ||
| 116 | func (x *Display) Flush() { | 109 | func (x *Display) Flush() { | ||
| 117 | - | core.LazyRegister(&xDisplayFlush, "GDK", "gdk_display_flush", false) | |||
| 118 | - | ||||
| 119 | xDisplayFlush(x.GoPointer()) | 110 | xDisplayFlush(x.GoPointer()) | ||
| 120 | } | 111 | } | ||
| 121 | 112 | ||||
| @@ -124,7 +115,6 @@ var xDisplayGetAppLaunchContext func(uintptr) uintptr | |||||
| 124 | // Returns a `GdkAppLaunchContext` suitable for launching | 115 | // Returns a `GdkAppLaunchContext` suitable for launching | ||
| 125 | // applications on the given display. | 116 | // applications on the given display. | ||
| 126 | func (x *Display) GetAppLaunchContext() *AppLaunchContext { | 117 | func (x *Display) GetAppLaunchContext() *AppLaunchContext { | ||
| 127 | - | core.LazyRegister(&xDisplayGetAppLaunchContext, "GDK", "gdk_display_get_app_launch_context", false) | |||
| 128 | var cls *AppLaunchContext | 118 | var cls *AppLaunchContext | ||
| 129 | 119 | ||||
| 130 | cret := xDisplayGetAppLaunchContext(x.GoPointer()) | 120 | cret := xDisplayGetAppLaunchContext(x.GoPointer()) | ||
| @@ -141,7 +131,6 @@ var xDisplayGetClipboard func(uintptr) uintptr | |||||
| 141 | 131 | ||||
| 142 | // Gets the clipboard used for copy/paste operations. | 132 | // Gets the clipboard used for copy/paste operations. | ||
| 143 | func (x *Display) GetClipboard() *Clipboard { | 133 | func (x *Display) GetClipboard() *Clipboard { | ||
| 144 | - | core.LazyRegister(&xDisplayGetClipboard, "GDK", "gdk_display_get_clipboard", false) | |||
| 145 | var cls *Clipboard | 134 | var cls *Clipboard | ||
| 146 | 135 | ||||
| 147 | cret := xDisplayGetClipboard(x.GoPointer()) | 136 | cret := xDisplayGetClipboard(x.GoPointer()) | ||
| @@ -162,7 +151,6 @@ var xDisplayGetDefaultSeat func(uintptr) uintptr | |||||
| 162 | // Note that a display may not have a seat. In this case, | 151 | // Note that a display may not have a seat. In this case, | ||
| 163 | // this function will return %NULL. | 152 | // this function will return %NULL. | ||
| 164 | func (x *Display) GetDefaultSeat() *Seat { | 153 | func (x *Display) GetDefaultSeat() *Seat { | ||
| 165 | - | core.LazyRegister(&xDisplayGetDefaultSeat, "GDK", "gdk_display_get_default_seat", false) | |||
| 166 | var cls *Seat | 154 | var cls *Seat | ||
| 167 | 155 | ||||
| 168 | cret := xDisplayGetDefaultSeat(x.GoPointer()) | 156 | cret := xDisplayGetDefaultSeat(x.GoPointer()) | ||
| @@ -190,8 +178,6 @@ var xDisplayGetDmabufFormats func(uintptr) uintptr | |||||
| 190 | // | 178 | // | ||
| 191 | // This function is threadsafe. It can be called from any thread. | 179 | // This function is threadsafe. It can be called from any thread. | ||
| 192 | func (x *Display) GetDmabufFormats() *DmabufFormats { | 180 | func (x *Display) GetDmabufFormats() *DmabufFormats { | ||
| 193 | - | core.LazyRegister(&xDisplayGetDmabufFormats, "GDK", "gdk_display_get_dmabuf_formats", false) | |||
| 194 | - | ||||
| 195 | cret := xDisplayGetDmabufFormats(x.GoPointer()) | 181 | cret := xDisplayGetDmabufFormats(x.GoPointer()) | ||
| 196 | if cret == 0 { | 182 | if cret == 0 { | ||
| 197 | return nil | 183 | return nil | ||
| @@ -204,7 +190,6 @@ var xDisplayGetMonitorAtSurface func(uintptr, uintptr) uintptr | |||||
| 204 | // Gets the monitor in which the largest area of @surface | 190 | // Gets the monitor in which the largest area of @surface | ||
| 205 | // resides. | 191 | // resides. | ||
| 206 | func (x *Display) GetMonitorAtSurface(SurfaceVar *Surface) *Monitor { | 192 | func (x *Display) GetMonitorAtSurface(SurfaceVar *Surface) *Monitor { | ||
| 207 | - | core.LazyRegister(&xDisplayGetMonitorAtSurface, "GDK", "gdk_display_get_monitor_at_surface", false) | |||
| 208 | var cls *Monitor | 193 | var cls *Monitor | ||
| 209 | 194 | ||||
| 210 | cret := xDisplayGetMonitorAtSurface(x.GoPointer(), SurfaceVar.GoPointer()) | 195 | cret := xDisplayGetMonitorAtSurface(x.GoPointer(), SurfaceVar.GoPointer()) | ||
| @@ -228,7 +213,6 @@ var xDisplayGetMonitors func(uintptr) uintptr | |||||
| 228 | // You can listen to the GListModel::items-changed signal on | 213 | // You can listen to the GListModel::items-changed signal on | ||
| 229 | // this list to monitor changes to the monitor of this display. | 214 | // this list to monitor changes to the monitor of this display. | ||
| 230 | func (x *Display) GetMonitors() *gio.ListModelBase { | 215 | func (x *Display) GetMonitors() *gio.ListModelBase { | ||
| 231 | - | core.LazyRegister(&xDisplayGetMonitors, "GDK", "gdk_display_get_monitors", false) | |||
| 232 | var cls *gio.ListModelBase | 216 | var cls *gio.ListModelBase | ||
| 233 | 217 | ||||
| 234 | cret := xDisplayGetMonitors(x.GoPointer()) | 218 | cret := xDisplayGetMonitors(x.GoPointer()) | ||
| @@ -246,8 +230,6 @@ var xDisplayGetName func(uintptr) string | |||||
| 246 | 230 | ||||
| 247 | // Gets the name of the display. | 231 | // Gets the name of the display. | ||
| 248 | func (x *Display) GetName() string { | 232 | func (x *Display) GetName() string { | ||
| 249 | - | core.LazyRegister(&xDisplayGetName, "GDK", "gdk_display_get_name", false) | |||
| 250 | - | ||||
| 251 | cret := xDisplayGetName(x.GoPointer()) | 233 | cret := xDisplayGetName(x.GoPointer()) | ||
| 252 | return cret | 234 | return cret | ||
| 253 | } | 235 | } | ||
| @@ -259,7 +241,6 @@ var xDisplayGetPrimaryClipboard func(uintptr) uintptr | |||||
| 259 | // On backends where the primary clipboard is not supported natively, | 241 | // On backends where the primary clipboard is not supported natively, | ||
| 260 | // GDK emulates this clipboard locally. | 242 | // GDK emulates this clipboard locally. | ||
| 261 | func (x *Display) GetPrimaryClipboard() *Clipboard { | 243 | func (x *Display) GetPrimaryClipboard() *Clipboard { | ||
| 262 | - | core.LazyRegister(&xDisplayGetPrimaryClipboard, "GDK", "gdk_display_get_primary_clipboard", false) | |||
| 263 | var cls *Clipboard | 244 | var cls *Clipboard | ||
| 264 | 245 | ||||
| 265 | cret := xDisplayGetPrimaryClipboard(x.GoPointer()) | 246 | cret := xDisplayGetPrimaryClipboard(x.GoPointer()) | ||
| @@ -278,8 +259,6 @@ var xDisplayGetSetting func(uintptr, string, *gobject.Value) bool | |||||
| 278 | // Retrieves a desktop-wide setting such as double-click time | 259 | // Retrieves a desktop-wide setting such as double-click time | ||
| 279 | // for the @display. | 260 | // for the @display. | ||
| 280 | func (x *Display) GetSetting(NameVar string, ValueVar *gobject.Value) bool { | 261 | func (x *Display) GetSetting(NameVar string, ValueVar *gobject.Value) bool { | ||
| 281 | - | core.LazyRegister(&xDisplayGetSetting, "GDK", "gdk_display_get_setting", false) | |||
| 282 | - | ||||
| 283 | cret := xDisplayGetSetting(x.GoPointer(), NameVar, ValueVar) | 262 | cret := xDisplayGetSetting(x.GoPointer(), NameVar, ValueVar) | ||
| 284 | return cret | 263 | return cret | ||
| 285 | } | 264 | } | ||
| @@ -289,8 +268,6 @@ var xDisplayGetStartupNotificationId func(uintptr) string | |||||
| 289 | // Gets the startup notification ID for a Wayland display, or %NULL | 268 | // Gets the startup notification ID for a Wayland display, or %NULL | ||
| 290 | // if no ID has been defined. | 269 | // if no ID has been defined. | ||
| 291 | func (x *Display) GetStartupNotificationId() string { | 270 | func (x *Display) GetStartupNotificationId() string { | ||
| 292 | - | core.LazyRegister(&xDisplayGetStartupNotificationId, "GDK", "gdk_display_get_startup_notification_id", false) | |||
| 293 | - | ||||
| 294 | cret := xDisplayGetStartupNotificationId(x.GoPointer()) | 271 | cret := xDisplayGetStartupNotificationId(x.GoPointer()) | ||
| 295 | return cret | 272 | return cret | ||
| 296 | } | 273 | } | ||
| @@ -299,8 +276,6 @@ var xDisplayIsClosed func(uintptr) bool | |||||
| 299 | 276 | ||||
| 300 | // Finds out if the display has been closed. | 277 | // Finds out if the display has been closed. | ||
| 301 | func (x *Display) IsClosed() bool { | 278 | func (x *Display) IsClosed() bool { | ||
| 302 | - | core.LazyRegister(&xDisplayIsClosed, "GDK", "gdk_display_is_closed", false) | |||
| 303 | - | ||||
| 304 | cret := xDisplayIsClosed(x.GoPointer()) | 279 | cret := xDisplayIsClosed(x.GoPointer()) | ||
| 305 | return cret | 280 | return cret | ||
| 306 | } | 281 | } | ||
| @@ -318,8 +293,6 @@ var xDisplayIsComposited func(uintptr) bool | |||||
| 318 | // | 293 | // | ||
| 319 | // On modern displays, this value is always %TRUE. | 294 | // On modern displays, this value is always %TRUE. | ||
| 320 | func (x *Display) IsComposited() bool { | 295 | func (x *Display) IsComposited() bool { | ||
| 321 | - | core.LazyRegister(&xDisplayIsComposited, "GDK", "gdk_display_is_composited", false) | |||
| 322 | - | ||||
| 323 | cret := xDisplayIsComposited(x.GoPointer()) | 296 | cret := xDisplayIsComposited(x.GoPointer()) | ||
| 324 | return cret | 297 | return cret | ||
| 325 | } | 298 | } | ||
| @@ -338,8 +311,6 @@ var xDisplayIsRgba func(uintptr) bool | |||||
| 338 | // | 311 | // | ||
| 339 | // On modern displays, this value is always %TRUE. | 312 | // On modern displays, this value is always %TRUE. | ||
| 340 | func (x *Display) IsRgba() bool { | 313 | func (x *Display) IsRgba() bool { | ||
| 341 | - | core.LazyRegister(&xDisplayIsRgba, "GDK", "gdk_display_is_rgba", false) | |||
| 342 | - | ||||
| 343 | cret := xDisplayIsRgba(x.GoPointer()) | 314 | cret := xDisplayIsRgba(x.GoPointer()) | ||
| 344 | return cret | 315 | return cret | ||
| 345 | } | 316 | } | ||
| @@ -348,8 +319,6 @@ var xDisplayListSeats func(uintptr) uintptr | |||||
| 348 | 319 | ||||
| 349 | // Returns the list of seats known to @display. | 320 | // Returns the list of seats known to @display. | ||
| 350 | func (x *Display) ListSeats() *glib.List { | 321 | func (x *Display) ListSeats() *glib.List { | ||
| 351 | - | core.LazyRegister(&xDisplayListSeats, "GDK", "gdk_display_list_seats", false) | |||
| 352 | - | ||||
| 353 | cret := xDisplayListSeats(x.GoPointer()) | 322 | cret := xDisplayListSeats(x.GoPointer()) | ||
| 354 | if cret == 0 { | 323 | if cret == 0 { | ||
| 355 | return nil | 324 | return nil | ||
| @@ -369,8 +338,6 @@ var xDisplayMapKeycode func(uintptr, uint, *uintptr, *[]uint, *int) bool | |||||
| 369 | // | 338 | // | ||
| 370 | // Free the returned arrays with g_free(). | 339 | // Free the returned arrays with g_free(). | ||
| 371 | func (x *Display) MapKeycode(KeycodeVar uint, KeysVar *uintptr, KeyvalsVar *[]uint, NEntriesVar *int) bool { | 340 | func (x *Display) MapKeycode(KeycodeVar uint, KeysVar *uintptr, KeyvalsVar *[]uint, NEntriesVar *int) bool { | ||
| 372 | - | core.LazyRegister(&xDisplayMapKeycode, "GDK", "gdk_display_map_keycode", false) | |||
| 373 | - | ||||
| 374 | cret := xDisplayMapKeycode(x.GoPointer(), KeycodeVar, KeysVar, KeyvalsVar, NEntriesVar) | 341 | cret := xDisplayMapKeycode(x.GoPointer(), KeycodeVar, KeysVar, KeyvalsVar, NEntriesVar) | ||
| 375 | return cret | 342 | return cret | ||
| 376 | } | 343 | } | ||
| @@ -393,8 +360,6 @@ var xDisplayMapKeyval func(uintptr, uint, *uintptr, *int) bool | |||||
| 393 | // | 360 | // | ||
| 394 | // The returned array should be freed with g_free(). | 361 | // The returned array should be freed with g_free(). | ||
| 395 | func (x *Display) MapKeyval(KeyvalVar uint, KeysVar *uintptr, NKeysVar *int) bool { | 362 | func (x *Display) MapKeyval(KeyvalVar uint, KeysVar *uintptr, NKeysVar *int) bool { | ||
| 396 | - | core.LazyRegister(&xDisplayMapKeyval, "GDK", "gdk_display_map_keyval", false) | |||
| 397 | - | ||||
| 398 | cret := xDisplayMapKeyval(x.GoPointer(), KeyvalVar, KeysVar, NKeysVar) | 363 | cret := xDisplayMapKeyval(x.GoPointer(), KeyvalVar, KeysVar, NKeysVar) | ||
| 399 | return cret | 364 | return cret | ||
| 400 | } | 365 | } | ||
| @@ -409,8 +374,6 @@ var xDisplayNotifyStartupComplete func(uintptr, string) | |||||
| 409 | // [gtk_window_set_auto_startup_notification()](../gtk4/method.Window.set_auto_startup_notification.html) | 374 | // [gtk_window_set_auto_startup_notification()](../gtk4/method.Window.set_auto_startup_notification.html) | ||
| 410 | // is called to disable that feature. | 375 | // is called to disable that feature. | ||
| 411 | func (x *Display) NotifyStartupComplete(StartupIdVar string) { | 376 | func (x *Display) NotifyStartupComplete(StartupIdVar string) { | ||
| 412 | - | core.LazyRegister(&xDisplayNotifyStartupComplete, "GDK", "gdk_display_notify_startup_complete", false) | |||
| 413 | - | ||||
| 414 | xDisplayNotifyStartupComplete(x.GoPointer(), StartupIdVar) | 377 | xDisplayNotifyStartupComplete(x.GoPointer(), StartupIdVar) | ||
| 415 | } | 378 | } | ||
| 416 | 379 | ||||
| @@ -431,7 +394,6 @@ var xDisplayPrepareGl func(uintptr, **glib.Error) bool | |||||
| 431 | // as needed. But you can use it as a check when setting up code that | 394 | // as needed. But you can use it as a check when setting up code that | ||
| 432 | // might make use of OpenGL. | 395 | // might make use of OpenGL. | ||
| 433 | func (x *Display) PrepareGl() (bool, error) { | 396 | func (x *Display) PrepareGl() (bool, error) { | ||
| 434 | - | core.LazyRegister(&xDisplayPrepareGl, "GDK", "gdk_display_prepare_gl", false) | |||
| 435 | var cerr *glib.Error | 397 | var cerr *glib.Error | ||
| 436 | 398 | ||||
| 437 | cret := xDisplayPrepareGl(x.GoPointer(), &cerr) | 399 | cret := xDisplayPrepareGl(x.GoPointer(), &cerr) | ||
| @@ -445,8 +407,6 @@ var xDisplayPutEvent func(uintptr, uintptr) | |||||
| 445 | 407 | ||||
| 446 | // Adds the given event to the event queue for @display. | 408 | // Adds the given event to the event queue for @display. | ||
| 447 | func (x *Display) PutEvent(EventVar *Event) { | 409 | func (x *Display) PutEvent(EventVar *Event) { | ||
| 448 | - | core.LazyRegister(&xDisplayPutEvent, "GDK", "gdk_display_put_event", false) | |||
| 449 | - | ||||
| 450 | xDisplayPutEvent(x.GoPointer(), EventVar.GoPointer()) | 410 | xDisplayPutEvent(x.GoPointer(), EventVar.GoPointer()) | ||
| 451 | } | 411 | } | ||
| 452 | 412 | ||||
| @@ -459,8 +419,6 @@ var xDisplaySupportsInputShapes func(uintptr) bool | |||||
| 459 | // | 419 | // | ||
| 460 | // On modern displays, this value is always %TRUE. | 420 | // On modern displays, this value is always %TRUE. | ||
| 461 | func (x *Display) SupportsInputShapes() bool { | 421 | func (x *Display) SupportsInputShapes() bool { | ||
| 462 | - | core.LazyRegister(&xDisplaySupportsInputShapes, "GDK", "gdk_display_supports_input_shapes", false) | |||
| 463 | - | ||||
| 464 | cret := xDisplaySupportsInputShapes(x.GoPointer()) | 422 | cret := xDisplaySupportsInputShapes(x.GoPointer()) | ||
| 465 | return cret | 423 | return cret | ||
| 466 | } | 424 | } | ||
| @@ -472,8 +430,6 @@ var xDisplaySupportsShadowWidth func(uintptr) bool | |||||
| 472 | // If %TRUE is returned the application decides if it wants to draw shadows. | 430 | // If %TRUE is returned the application decides if it wants to draw shadows. | ||
| 473 | // If %FALSE is returned, the compositor decides if it wants to draw shadows. | 431 | // If %FALSE is returned, the compositor decides if it wants to draw shadows. | ||
| 474 | func (x *Display) SupportsShadowWidth() bool { | 432 | func (x *Display) SupportsShadowWidth() bool { | ||
| 475 | - | core.LazyRegister(&xDisplaySupportsShadowWidth, "GDK", "gdk_display_supports_shadow_width", false) | |||
| 476 | - | ||||
| 477 | cret := xDisplaySupportsShadowWidth(x.GoPointer()) | 433 | cret := xDisplaySupportsShadowWidth(x.GoPointer()) | ||
| 478 | return cret | 434 | return cret | ||
| 479 | } | 435 | } | ||
| @@ -491,8 +447,6 @@ var xDisplaySync func(uintptr) | |||||
| 491 | // This is most useful for X11. On windowing systems where requests are | 447 | // This is most useful for X11. On windowing systems where requests are | ||
| 492 | // handled synchronously, this function will do nothing. | 448 | // handled synchronously, this function will do nothing. | ||
| 493 | func (x *Display) Sync() { | 449 | func (x *Display) Sync() { | ||
| 494 | - | core.LazyRegister(&xDisplaySync, "GDK", "gdk_display_sync", false) | |||
| 495 | - | ||||
| 496 | xDisplaySync(x.GoPointer()) | 450 | xDisplaySync(x.GoPointer()) | ||
| 497 | } | 451 | } | ||
| 498 | 452 | ||||
| @@ -518,8 +472,6 @@ var xDisplayTranslateKey func(uintptr, uint, ModifierType, int, *uint, *int, *in | |||||
| 518 | // contains the translated keyval. It is exported for the benefit of | 472 | // contains the translated keyval. It is exported for the benefit of | ||
| 519 | // virtualized test environments. | 473 | // virtualized test environments. | ||
| 520 | func (x *Display) TranslateKey(KeycodeVar uint, StateVar ModifierType, GroupVar int, KeyvalVar *uint, EffectiveGroupVar *int, LevelVar *int, ConsumedVar *ModifierType) bool { | 474 | func (x *Display) TranslateKey(KeycodeVar uint, StateVar ModifierType, GroupVar int, KeyvalVar *uint, EffectiveGroupVar *int, LevelVar *int, ConsumedVar *ModifierType) bool { | ||
| 521 | - | core.LazyRegister(&xDisplayTranslateKey, "GDK", "gdk_display_translate_key", false) | |||
| 522 | - | ||||
| 523 | cret := xDisplayTranslateKey(x.GoPointer(), KeycodeVar, StateVar, GroupVar, KeyvalVar, EffectiveGroupVar, LevelVar, ConsumedVar) | 475 | cret := xDisplayTranslateKey(x.GoPointer(), KeycodeVar, StateVar, GroupVar, KeyvalVar, EffectiveGroupVar, LevelVar, ConsumedVar) | ||
| 524 | return cret | 476 | return cret | ||
| 525 | } | 477 | } | ||
| @@ -698,7 +650,6 @@ var xDisplayGetDefault func() uintptr | |||||
| 698 | // | 650 | // | ||
| 699 | // gdk_display_manager_get_default_display (gdk_display_manager_get ()) | 651 | // gdk_display_manager_get_default_display (gdk_display_manager_get ()) | ||
| 700 | func DisplayGetDefault() *Display { | 652 | func DisplayGetDefault() *Display { | ||
| 701 | - | core.LazyRegister(&xDisplayGetDefault, "GDK", "gdk_display_get_default", false) | |||
| 702 | var cls *Display | 653 | var cls *Display | ||
| 703 | 654 | ||||
| 704 | cret := xDisplayGetDefault() | 655 | cret := xDisplayGetDefault() | ||
| @@ -718,7 +669,6 @@ var xDisplayOpen func(uintptr) uintptr | |||||
| 718 | // | 669 | // | ||
| 719 | // If opening the display fails, `NULL` is returned. | 670 | // If opening the display fails, `NULL` is returned. | ||
| 720 | func DisplayOpen(DisplayNameVar *string) *Display { | 671 | func DisplayOpen(DisplayNameVar *string) *Display { | ||
| 721 | - | core.LazyRegister(&xDisplayOpen, "GDK", "gdk_display_open", false) | |||
| 722 | var cls *Display | 672 | var cls *Display | ||
| 723 | 673 | ||||
| 724 | DisplayNameVarPtr := core.GStrdupNullable(DisplayNameVar) | 674 | DisplayNameVarPtr := core.GStrdupNullable(DisplayNameVar) | ||
| @@ -738,4 +688,46 @@ func DisplayOpen(DisplayNameVar *string) *Display { | |||||
| 738 | func init() { | 688 | func init() { | ||
| 739 | core.SetPackageName("GDK", "gtk4") | 689 | core.SetPackageName("GDK", "gtk4") | ||
| 740 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | 690 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | ||
| 691 | + | var libs []uintptr | |||
| 692 | + | for _, libPath := range core.GetPaths("GDK") { | |||
| 693 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 694 | + | if err != nil { | |||
| 695 | + | panic(err) | |||
| 696 | + | } | |||
| 697 | + | libs = append(libs, lib) | |||
| 698 | + | } | |||
| 699 | + | ||||
| 700 | + | core.PuregoSafeRegister(&xDisplayGLibType, libs, "gdk_display_get_type") | |||
| 701 | + | ||||
| 702 | + | core.PuregoSafeRegister(&xDisplayBeep, libs, "gdk_display_beep") | |||
| 703 | + | core.PuregoSafeRegister(&xDisplayClose, libs, "gdk_display_close") | |||
| 704 | + | core.PuregoSafeRegister(&xDisplayCreateGlContext, libs, "gdk_display_create_gl_context") | |||
| 705 | + | core.PuregoSafeRegister(&xDisplayDeviceIsGrabbed, libs, "gdk_display_device_is_grabbed") | |||
| 706 | + | core.PuregoSafeRegister(&xDisplayFlush, libs, "gdk_display_flush") | |||
| 707 | + | core.PuregoSafeRegister(&xDisplayGetAppLaunchContext, libs, "gdk_display_get_app_launch_context") | |||
| 708 | + | core.PuregoSafeRegister(&xDisplayGetClipboard, libs, "gdk_display_get_clipboard") | |||
| 709 | + | core.PuregoSafeRegister(&xDisplayGetDefaultSeat, libs, "gdk_display_get_default_seat") | |||
| 710 | + | core.PuregoSafeRegister(&xDisplayGetDmabufFormats, libs, "gdk_display_get_dmabuf_formats") | |||
| 711 | + | core.PuregoSafeRegister(&xDisplayGetMonitorAtSurface, libs, "gdk_display_get_monitor_at_surface") | |||
| 712 | + | core.PuregoSafeRegister(&xDisplayGetMonitors, libs, "gdk_display_get_monitors") | |||
| 713 | + | core.PuregoSafeRegister(&xDisplayGetName, libs, "gdk_display_get_name") | |||
| 714 | + | core.PuregoSafeRegister(&xDisplayGetPrimaryClipboard, libs, "gdk_display_get_primary_clipboard") | |||
| 715 | + | core.PuregoSafeRegister(&xDisplayGetSetting, libs, "gdk_display_get_setting") | |||
| 716 | + | core.PuregoSafeRegister(&xDisplayGetStartupNotificationId, libs, "gdk_display_get_startup_notification_id") | |||
| 717 | + | core.PuregoSafeRegister(&xDisplayIsClosed, libs, "gdk_display_is_closed") | |||
| 718 | + | core.PuregoSafeRegister(&xDisplayIsComposited, libs, "gdk_display_is_composited") | |||
| 719 | + | core.PuregoSafeRegister(&xDisplayIsRgba, libs, "gdk_display_is_rgba") | |||
| 720 | + | core.PuregoSafeRegister(&xDisplayListSeats, libs, "gdk_display_list_seats") | |||
| 721 | + | core.PuregoSafeRegister(&xDisplayMapKeycode, libs, "gdk_display_map_keycode") | |||
| 722 | + | core.PuregoSafeRegister(&xDisplayMapKeyval, libs, "gdk_display_map_keyval") | |||
| 723 | + | core.PuregoSafeRegister(&xDisplayNotifyStartupComplete, libs, "gdk_display_notify_startup_complete") | |||
| 724 | + | core.PuregoSafeRegister(&xDisplayPrepareGl, libs, "gdk_display_prepare_gl") | |||
| 725 | + | core.PuregoSafeRegister(&xDisplayPutEvent, libs, "gdk_display_put_event") | |||
| 726 | + | core.PuregoSafeRegister(&xDisplaySupportsInputShapes, libs, "gdk_display_supports_input_shapes") | |||
| 727 | + | core.PuregoSafeRegister(&xDisplaySupportsShadowWidth, libs, "gdk_display_supports_shadow_width") | |||
| 728 | + | core.PuregoSafeRegister(&xDisplaySync, libs, "gdk_display_sync") | |||
| 729 | + | core.PuregoSafeRegister(&xDisplayTranslateKey, libs, "gdk_display_translate_key") | |||
| 730 | + | ||||
| 731 | + | core.PuregoSafeRegister(&xDisplayGetDefault, libs, "gdk_display_get_default") | |||
| 732 | + | core.PuregoSafeRegister(&xDisplayOpen, libs, "gdk_display_open") | |||
| 741 | } | 733 | } | ||