chore(deps): pin puregotk nil-signal fix
- commit
- a161e348e2093172038390b0906448f0ae979a0d
- author
- brice · · 2026-07-14 17:11 UTC
- parent
- c053b99
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
905 files · +27842 -25263
M go.mod +1 -1
| @@ -10,7 +10,7 @@ require ( | |||
| 10 | 10 | github.com/bnema/purego-cef2gtk v0.8.4-0.20260714160309-bbd397409ebe | |
| 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 | - | github.com/bnema/puregotk v0.7.0 | |
| 13 | + | github.com/bnema/puregotk v0.7.1-0.20260714170452-0b6b9b901234 | |
| 14 | 14 | github.com/charmbracelet/bubbles v1.0.0 | |
| 15 | 15 | github.com/charmbracelet/bubbletea v1.3.10 | |
| 16 | 16 | github.com/charmbracelet/lipgloss v1.1.0 | |
| @@ -10,7 +10,7 @@ require ( | |||||
| 10 | github.com/bnema/purego-cef2gtk v0.8.4-0.20260714160309-bbd397409ebe | 10 | github.com/bnema/purego-cef2gtk v0.8.4-0.20260714160309-bbd397409ebe | ||
| 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/puregotk v0.7.0 | 13 | + | github.com/bnema/puregotk v0.7.1-0.20260714170452-0b6b9b901234 |
| 14 | github.com/charmbracelet/bubbles v1.0.0 | 14 | github.com/charmbracelet/bubbles v1.0.0 | ||
| 15 | github.com/charmbracelet/bubbletea v1.3.10 | 15 | github.com/charmbracelet/bubbletea v1.3.10 | ||
| 16 | github.com/charmbracelet/lipgloss v1.1.0 | 16 | github.com/charmbracelet/lipgloss v1.1.0 | ||
M go.sum +4 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/internal/core/core.go +197 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/pkg/core/core.go +10 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-dialog.go +99 -64 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-window.go +95 -62 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-accent-color.go +7 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-action-row.go +33 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-alert-dialog.go +66 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-target.go +10 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-util.go +4 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation.go +24 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application-window.go +14 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application.go +3 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-avatar.go +22 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-banner.go +23 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bin.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bottom-sheet.go +47 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint-bin.go +10 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint.go +33 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-content.go +18 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-row.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-dots.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-lines.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel.go +47 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-layout.go +14 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-scrollable.go +17 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp.go +17 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-combo-row.go +34 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-dialog.go +45 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-easing.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-entry-row.go +40 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-enum-list-model.go +13 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-expander-row.go +40 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-flap.go +61 -48 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-fold-threshold-policy.go +10 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-header-bar.go +36 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-inline-view-switcher.go +18 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout-slot.go +4 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout.go +7 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-leaflet.go +69 -56 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-length-unit.go +5 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-main.go +5 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-message-dialog.go +63 -44 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-multi-layout-view.go +17 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-direction.go +10 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-split-view.go +36 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-view.go +60 -49 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-overlay-split-view.go +48 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-password-entry-row.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-dialog.go +23 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-group.go +24 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-page.go +38 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-row.go +18 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-window.go +31 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcut-label.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-dialog.go +4 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-item.go +23 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-section.go +8 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar-item.go +45 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar-section.go +24 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar.go +41 -39 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spin-row.go +40 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spinner-paintable.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spinner.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-split-button.go +39 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spring-animation.go +34 -30 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spring-params.go +17 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-squeezer.go +49 -44 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-status-page.go +20 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-style-manager.go +25 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-swipe-tracker.go +33 -30 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-swipeable.go +33 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-switch-row.go +6 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-bar.go +35 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-button.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-overview.go +45 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-view.go +123 -87 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-timed-animation.go +30 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toast-overlay.go +9 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toast.go +41 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toggle-group.go +64 -51 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toolbar-view.go +40 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-version.go +7 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-stack.go +78 -62 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-bar.go +9 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-sidebar.go +15 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-title.go +19 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher.go +10 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-window-title.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-window.go +14 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-wrap-box.go +66 -46 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-wrap-layout.go +57 -46 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/cairo/main.go +36 -79 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkapplaunchcontext.go +10 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcairo.go +12 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcairocontext.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcicpparams.go +20 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkclipboard.go +34 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcolorstate.go +12 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentdeserializer.go +26 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentformats.go +28 -31 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentprovider.go +23 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentserializer.go +26 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcursor.go +12 -21
| @@ -2,7 +2,6 @@ | |||
| 2 | 2 | package gdk | |
| 3 | 3 | ||
| 4 | 4 | import ( | |
| 5 | - | "github.com/bnema/purego" | |
| 6 | 5 | "github.com/bnema/puregotk/pkg/core" | |
| 7 | 6 | "github.com/bnema/puregotk/v4/glib" | |
| 8 | 7 | "github.com/bnema/puregotk/v4/gobject" | |
| @@ -64,6 +63,7 @@ type Cursor struct { | |||
| 64 | 63 | var xCursorGLibType func() types.GType | |
| 65 | 64 | ||
| 66 | 65 | func CursorGLibType() types.GType { | |
| 66 | + | core.LazyRegister(&xCursorGLibType, "GDK", "gdk_cursor_get_type", false) | |
| 67 | 67 | return xCursorGLibType() | |
| 68 | 68 | } | |
| 69 | 69 | ||
| @@ -80,6 +80,7 @@ var xNewCursorFromCallback func(uintptr, uintptr, uintptr, uintptr) uintptr | |||
| 80 | 80 | // Cursors of this kind produce textures for the cursor | |
| 81 | 81 | // image on demand, when the @callback is called. | |
| 82 | 82 | func NewCursorFromCallback(CallbackVar *CursorGetTextureCallback, DataVar uintptr, DestroyVar *glib.DestroyNotify, FallbackVar *Cursor) *Cursor { | |
| 83 | + | core.LazyRegister(&xNewCursorFromCallback, "GDK", "gdk_cursor_new_from_callback", false) | |
| 83 | 84 | var cls *Cursor | |
| 84 | 85 | ||
| 85 | 86 | cret := xNewCursorFromCallback(glib.NewCallback(CallbackVar), DataVar, glib.NewCallbackNullable(DestroyVar), FallbackVar.GoPointer()) | |
| @@ -140,6 +141,7 @@ var xNewCursorFromName func(string, uintptr) uintptr | |||
| 140 | 141 | // |  | "zoom-in" | Zoom in | | |
| 141 | 142 | // |  | "zoom-out" | Zoom out | | |
| 142 | 143 | func NewCursorFromName(NameVar string, FallbackVar *Cursor) *Cursor { | |
| 144 | + | core.LazyRegister(&xNewCursorFromName, "GDK", "gdk_cursor_new_from_name", false) | |
| 143 | 145 | var cls *Cursor | |
| 144 | 146 | ||
| 145 | 147 | cret := xNewCursorFromName(NameVar, FallbackVar.GoPointer()) | |
| @@ -156,6 +158,7 @@ var xNewCursorFromTexture func(uintptr, int, int, uintptr) uintptr | |||
| 156 | 158 | ||
| 157 | 159 | // Creates a new cursor from a `GdkTexture`. | |
| 158 | 160 | func NewCursorFromTexture(TextureVar *Texture, HotspotXVar int, HotspotYVar int, FallbackVar *Cursor) *Cursor { | |
| 161 | + | core.LazyRegister(&xNewCursorFromTexture, "GDK", "gdk_cursor_new_from_texture", false) | |
| 159 | 162 | var cls *Cursor | |
| 160 | 163 | ||
| 161 | 164 | cret := xNewCursorFromTexture(TextureVar.GoPointer(), HotspotXVar, HotspotYVar, FallbackVar.GoPointer()) | |
| @@ -178,6 +181,7 @@ var xCursorGetFallback func(uintptr) uintptr | |||
| 178 | 181 | // this can happen when the texture is too large or when the `GdkDisplay` | |
| 179 | 182 | // it is used on does not support textured cursors. | |
| 180 | 183 | func (x *Cursor) GetFallback() *Cursor { | |
| 184 | + | core.LazyRegister(&xCursorGetFallback, "GDK", "gdk_cursor_get_fallback", false) | |
| 181 | 185 | var cls *Cursor | |
| 182 | 186 | ||
| 183 | 187 | cret := xCursorGetFallback(x.GoPointer()) | |
| @@ -201,6 +205,8 @@ var xCursorGetHotspotX func(uintptr) int | |||
| 201 | 205 | // will only return the hotspot position for cursors created with | |
| 202 | 206 | // [ctor@Gdk.Cursor.new_from_texture]. | |
| 203 | 207 | func (x *Cursor) GetHotspotX() int { | |
| 208 | + | core.LazyRegister(&xCursorGetHotspotX, "GDK", "gdk_cursor_get_hotspot_x", false) | |
| 209 | + | ||
| 204 | 210 | cret := xCursorGetHotspotX(x.GoPointer()) | |
| 205 | 211 | return cret | |
| 206 | 212 | } | |
| @@ -215,6 +221,8 @@ var xCursorGetHotspotY func(uintptr) int | |||
| 215 | 221 | // will only return the hotspot position for cursors created with | |
| 216 | 222 | // [ctor@Gdk.Cursor.new_from_texture]. | |
| 217 | 223 | func (x *Cursor) GetHotspotY() int { | |
| 224 | + | core.LazyRegister(&xCursorGetHotspotY, "GDK", "gdk_cursor_get_hotspot_y", false) | |
| 225 | + | ||
| 218 | 226 | cret := xCursorGetHotspotY(x.GoPointer()) | |
| 219 | 227 | return cret | |
| 220 | 228 | } | |
| @@ -225,6 +233,8 @@ var xCursorGetName func(uintptr) string | |||
| 225 | 233 | // | |
| 226 | 234 | // If the cursor is not a named cursor, %NULL will be returned. | |
| 227 | 235 | func (x *Cursor) GetName() string { | |
| 236 | + | core.LazyRegister(&xCursorGetName, "GDK", "gdk_cursor_get_name", false) | |
| 237 | + | ||
| 228 | 238 | cret := xCursorGetName(x.GoPointer()) | |
| 229 | 239 | return cret | |
| 230 | 240 | } | |
| @@ -235,6 +245,7 @@ var xCursorGetTexture func(uintptr) uintptr | |||
| 235 | 245 | // | |
| 236 | 246 | // If the cursor is a named cursor, %NULL will be returned. | |
| 237 | 247 | func (x *Cursor) GetTexture() *Texture { | |
| 248 | + | core.LazyRegister(&xCursorGetTexture, "GDK", "gdk_cursor_get_texture", false) | |
| 238 | 249 | var cls *Texture | |
| 239 | 250 | ||
| 240 | 251 | cret := xCursorGetTexture(x.GoPointer()) | |
| @@ -317,24 +328,4 @@ func (x *Cursor) GetPropertyName() string { | |||
| 317 | 328 | func init() { | |
| 318 | 329 | core.SetPackageName("GDK", "gtk4") | |
| 319 | 330 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | |
| 320 | - | var libs []uintptr | |
| 321 | - | for _, libPath := range core.GetPaths("GDK") { | |
| 322 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 323 | - | if err != nil { | |
| 324 | - | panic(err) | |
| 325 | - | } | |
| 326 | - | libs = append(libs, lib) | |
| 327 | - | } | |
| 328 | - | ||
| 329 | - | core.PuregoSafeRegister(&xCursorGLibType, libs, "gdk_cursor_get_type") | |
| 330 | - | ||
| 331 | - | core.PuregoSafeRegister(&xNewCursorFromCallback, libs, "gdk_cursor_new_from_callback") | |
| 332 | - | core.PuregoSafeRegister(&xNewCursorFromName, libs, "gdk_cursor_new_from_name") | |
| 333 | - | core.PuregoSafeRegister(&xNewCursorFromTexture, libs, "gdk_cursor_new_from_texture") | |
| 334 | - | ||
| 335 | - | core.PuregoSafeRegister(&xCursorGetFallback, libs, "gdk_cursor_get_fallback") | |
| 336 | - | core.PuregoSafeRegister(&xCursorGetHotspotX, libs, "gdk_cursor_get_hotspot_x") | |
| 337 | - | core.PuregoSafeRegister(&xCursorGetHotspotY, libs, "gdk_cursor_get_hotspot_y") | |
| 338 | - | core.PuregoSafeRegister(&xCursorGetName, libs, "gdk_cursor_get_name") | |
| 339 | - | core.PuregoSafeRegister(&xCursorGetTexture, libs, "gdk_cursor_get_texture") | |
| 340 | 331 | } | |
| @@ -2,7 +2,6 @@ | |||||
| 2 | package gdk | 2 | package gdk | ||
| 3 | 3 | ||||
| 4 | import ( | 4 | import ( | ||
| 5 | - | "github.com/bnema/purego" | |||
| 6 | "github.com/bnema/puregotk/pkg/core" | 5 | "github.com/bnema/puregotk/pkg/core" | ||
| 7 | "github.com/bnema/puregotk/v4/glib" | 6 | "github.com/bnema/puregotk/v4/glib" | ||
| 8 | "github.com/bnema/puregotk/v4/gobject" | 7 | "github.com/bnema/puregotk/v4/gobject" | ||
| @@ -64,6 +63,7 @@ type Cursor struct { | |||||
| 64 | var xCursorGLibType func() types.GType | 63 | var xCursorGLibType func() types.GType | ||
| 65 | 64 | ||||
| 66 | func CursorGLibType() types.GType { | 65 | func CursorGLibType() types.GType { | ||
| 66 | + | core.LazyRegister(&xCursorGLibType, "GDK", "gdk_cursor_get_type", false) | |||
| 67 | return xCursorGLibType() | 67 | return xCursorGLibType() | ||
| 68 | } | 68 | } | ||
| 69 | 69 | ||||
| @@ -80,6 +80,7 @@ var xNewCursorFromCallback func(uintptr, uintptr, uintptr, uintptr) uintptr | |||||
| 80 | // Cursors of this kind produce textures for the cursor | 80 | // Cursors of this kind produce textures for the cursor | ||
| 81 | // image on demand, when the @callback is called. | 81 | // image on demand, when the @callback is called. | ||
| 82 | func NewCursorFromCallback(CallbackVar *CursorGetTextureCallback, DataVar uintptr, DestroyVar *glib.DestroyNotify, FallbackVar *Cursor) *Cursor { | 82 | func NewCursorFromCallback(CallbackVar *CursorGetTextureCallback, DataVar uintptr, DestroyVar *glib.DestroyNotify, FallbackVar *Cursor) *Cursor { | ||
| 83 | + | core.LazyRegister(&xNewCursorFromCallback, "GDK", "gdk_cursor_new_from_callback", false) | |||
| 83 | var cls *Cursor | 84 | var cls *Cursor | ||
| 84 | 85 | ||||
| 85 | cret := xNewCursorFromCallback(glib.NewCallback(CallbackVar), DataVar, glib.NewCallbackNullable(DestroyVar), FallbackVar.GoPointer()) | 86 | cret := xNewCursorFromCallback(glib.NewCallback(CallbackVar), DataVar, glib.NewCallbackNullable(DestroyVar), FallbackVar.GoPointer()) | ||
| @@ -140,6 +141,7 @@ var xNewCursorFromName func(string, uintptr) uintptr | |||||
| 140 | // |  | "zoom-in" | Zoom in | | 141 | // |  | "zoom-in" | Zoom in | | ||
| 141 | // |  | "zoom-out" | Zoom out | | 142 | // |  | "zoom-out" | Zoom out | | ||
| 142 | func NewCursorFromName(NameVar string, FallbackVar *Cursor) *Cursor { | 143 | func NewCursorFromName(NameVar string, FallbackVar *Cursor) *Cursor { | ||
| 144 | + | core.LazyRegister(&xNewCursorFromName, "GDK", "gdk_cursor_new_from_name", false) | |||
| 143 | var cls *Cursor | 145 | var cls *Cursor | ||
| 144 | 146 | ||||
| 145 | cret := xNewCursorFromName(NameVar, FallbackVar.GoPointer()) | 147 | cret := xNewCursorFromName(NameVar, FallbackVar.GoPointer()) | ||
| @@ -156,6 +158,7 @@ var xNewCursorFromTexture func(uintptr, int, int, uintptr) uintptr | |||||
| 156 | 158 | ||||
| 157 | // Creates a new cursor from a `GdkTexture`. | 159 | // Creates a new cursor from a `GdkTexture`. | ||
| 158 | func NewCursorFromTexture(TextureVar *Texture, HotspotXVar int, HotspotYVar int, FallbackVar *Cursor) *Cursor { | 160 | func NewCursorFromTexture(TextureVar *Texture, HotspotXVar int, HotspotYVar int, FallbackVar *Cursor) *Cursor { | ||
| 161 | + | core.LazyRegister(&xNewCursorFromTexture, "GDK", "gdk_cursor_new_from_texture", false) | |||
| 159 | var cls *Cursor | 162 | var cls *Cursor | ||
| 160 | 163 | ||||
| 161 | cret := xNewCursorFromTexture(TextureVar.GoPointer(), HotspotXVar, HotspotYVar, FallbackVar.GoPointer()) | 164 | cret := xNewCursorFromTexture(TextureVar.GoPointer(), HotspotXVar, HotspotYVar, FallbackVar.GoPointer()) | ||
| @@ -178,6 +181,7 @@ var xCursorGetFallback func(uintptr) uintptr | |||||
| 178 | // this can happen when the texture is too large or when the `GdkDisplay` | 181 | // this can happen when the texture is too large or when the `GdkDisplay` | ||
| 179 | // it is used on does not support textured cursors. | 182 | // it is used on does not support textured cursors. | ||
| 180 | func (x *Cursor) GetFallback() *Cursor { | 183 | func (x *Cursor) GetFallback() *Cursor { | ||
| 184 | + | core.LazyRegister(&xCursorGetFallback, "GDK", "gdk_cursor_get_fallback", false) | |||
| 181 | var cls *Cursor | 185 | var cls *Cursor | ||
| 182 | 186 | ||||
| 183 | cret := xCursorGetFallback(x.GoPointer()) | 187 | cret := xCursorGetFallback(x.GoPointer()) | ||
| @@ -201,6 +205,8 @@ var xCursorGetHotspotX func(uintptr) int | |||||
| 201 | // will only return the hotspot position for cursors created with | 205 | // will only return the hotspot position for cursors created with | ||
| 202 | // [ctor@Gdk.Cursor.new_from_texture]. | 206 | // [ctor@Gdk.Cursor.new_from_texture]. | ||
| 203 | func (x *Cursor) GetHotspotX() int { | 207 | func (x *Cursor) GetHotspotX() int { | ||
| 208 | + | core.LazyRegister(&xCursorGetHotspotX, "GDK", "gdk_cursor_get_hotspot_x", false) | |||
| 209 | + | ||||
| 204 | cret := xCursorGetHotspotX(x.GoPointer()) | 210 | cret := xCursorGetHotspotX(x.GoPointer()) | ||
| 205 | return cret | 211 | return cret | ||
| 206 | } | 212 | } | ||
| @@ -215,6 +221,8 @@ var xCursorGetHotspotY func(uintptr) int | |||||
| 215 | // will only return the hotspot position for cursors created with | 221 | // will only return the hotspot position for cursors created with | ||
| 216 | // [ctor@Gdk.Cursor.new_from_texture]. | 222 | // [ctor@Gdk.Cursor.new_from_texture]. | ||
| 217 | func (x *Cursor) GetHotspotY() int { | 223 | func (x *Cursor) GetHotspotY() int { | ||
| 224 | + | core.LazyRegister(&xCursorGetHotspotY, "GDK", "gdk_cursor_get_hotspot_y", false) | |||
| 225 | + | ||||
| 218 | cret := xCursorGetHotspotY(x.GoPointer()) | 226 | cret := xCursorGetHotspotY(x.GoPointer()) | ||
| 219 | return cret | 227 | return cret | ||
| 220 | } | 228 | } | ||
| @@ -225,6 +233,8 @@ var xCursorGetName func(uintptr) string | |||||
| 225 | // | 233 | // | ||
| 226 | // If the cursor is not a named cursor, %NULL will be returned. | 234 | // If the cursor is not a named cursor, %NULL will be returned. | ||
| 227 | func (x *Cursor) GetName() string { | 235 | func (x *Cursor) GetName() string { | ||
| 236 | + | core.LazyRegister(&xCursorGetName, "GDK", "gdk_cursor_get_name", false) | |||
| 237 | + | ||||
| 228 | cret := xCursorGetName(x.GoPointer()) | 238 | cret := xCursorGetName(x.GoPointer()) | ||
| 229 | return cret | 239 | return cret | ||
| 230 | } | 240 | } | ||
| @@ -235,6 +245,7 @@ var xCursorGetTexture func(uintptr) uintptr | |||||
| 235 | // | 245 | // | ||
| 236 | // If the cursor is a named cursor, %NULL will be returned. | 246 | // If the cursor is a named cursor, %NULL will be returned. | ||
| 237 | func (x *Cursor) GetTexture() *Texture { | 247 | func (x *Cursor) GetTexture() *Texture { | ||
| 248 | + | core.LazyRegister(&xCursorGetTexture, "GDK", "gdk_cursor_get_texture", false) | |||
| 238 | var cls *Texture | 249 | var cls *Texture | ||
| 239 | 250 | ||||
| 240 | cret := xCursorGetTexture(x.GoPointer()) | 251 | cret := xCursorGetTexture(x.GoPointer()) | ||
| @@ -317,24 +328,4 @@ func (x *Cursor) GetPropertyName() string { | |||||
| 317 | func init() { | 328 | func init() { | ||
| 318 | core.SetPackageName("GDK", "gtk4") | 329 | core.SetPackageName("GDK", "gtk4") | ||
| 319 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | 330 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | ||
| 320 | - | var libs []uintptr | |||
| 321 | - | for _, libPath := range core.GetPaths("GDK") { | |||
| 322 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 323 | - | if err != nil { | |||
| 324 | - | panic(err) | |||
| 325 | - | } | |||
| 326 | - | libs = append(libs, lib) | |||
| 327 | - | } | |||
| 328 | - | ||||
| 329 | - | core.PuregoSafeRegister(&xCursorGLibType, libs, "gdk_cursor_get_type") | |||
| 330 | - | ||||
| 331 | - | core.PuregoSafeRegister(&xNewCursorFromCallback, libs, "gdk_cursor_new_from_callback") | |||
| 332 | - | core.PuregoSafeRegister(&xNewCursorFromName, libs, "gdk_cursor_new_from_name") | |||
| 333 | - | core.PuregoSafeRegister(&xNewCursorFromTexture, libs, "gdk_cursor_new_from_texture") | |||
| 334 | - | ||||
| 335 | - | core.PuregoSafeRegister(&xCursorGetFallback, libs, "gdk_cursor_get_fallback") | |||
| 336 | - | core.PuregoSafeRegister(&xCursorGetHotspotX, libs, "gdk_cursor_get_hotspot_x") | |||
| 337 | - | core.PuregoSafeRegister(&xCursorGetHotspotY, libs, "gdk_cursor_get_hotspot_y") | |||
| 338 | - | core.PuregoSafeRegister(&xCursorGetName, libs, "gdk_cursor_get_name") | |||
| 339 | - | core.PuregoSafeRegister(&xCursorGetTexture, libs, "gdk_cursor_get_texture") | |||
| 340 | } | 331 | } | ||