fix(deps): repin puregotk lazy registration fix
- commit
- d685b6e820d6baba0d0dea254169664012ed203d
- author
- brice · · 2026-07-14 18:24 UTC
- parent
- ec6db2e
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
907 files · +27874 -25294
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.20260714181430-679a9ed72959 | |
| 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.20260714181430-679a9ed72959 |
| 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 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/internal/core/core.go +197 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/pkg/core/core.go +10 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-dialog.go +99 -64 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-window.go +95 -62 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-accent-color.go +7 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-action-row.go +33 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-alert-dialog.go +66 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-target.go +10 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-util.go +4 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation.go +24 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application-window.go +14 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application.go +3 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-avatar.go +22 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-banner.go +23 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bin.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bottom-sheet.go +47 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint-bin.go +10 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint.go +33 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-content.go +18 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-row.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-dots.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-lines.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel.go +47 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-layout.go +14 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-scrollable.go +17 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp.go +17 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-combo-row.go +34 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-dialog.go +45 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-easing.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-entry-row.go +40 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-enum-list-model.go +13 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-expander-row.go +40 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-flap.go +61 -48 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-fold-threshold-policy.go +10 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-header-bar.go +36 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-inline-view-switcher.go +18 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout-slot.go +4 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout.go +7 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-leaflet.go +69 -56 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-length-unit.go +5 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-main.go +5 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-message-dialog.go +63 -44 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-multi-layout-view.go +17 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-direction.go +10 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-split-view.go +36 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-view.go +60 -49 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-overlay-split-view.go +48 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-password-entry-row.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-dialog.go +23 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-group.go +24 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-page.go +38 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-row.go +18 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-window.go +31 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcut-label.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-dialog.go +4 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-item.go +23 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-section.go +8 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar-item.go +45 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar-section.go +24 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar.go +41 -39 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spin-row.go +40 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spinner-paintable.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spinner.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-split-button.go +39 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spring-animation.go +34 -30 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spring-params.go +17 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-squeezer.go +49 -44 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-status-page.go +20 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-style-manager.go +25 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-swipe-tracker.go +33 -30 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-swipeable.go +33 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-switch-row.go +6 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-bar.go +35 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-button.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-overview.go +45 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-view.go +123 -87 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-timed-animation.go +30 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toast-overlay.go +9 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toast.go +41 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toggle-group.go +64 -51 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toolbar-view.go +40 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-version.go +7 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-stack.go +78 -62 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-bar.go +9 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-sidebar.go +15 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-title.go +19 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher.go +10 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-window-title.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-window.go +14 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-wrap-box.go +66 -46 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-wrap-layout.go +57 -46 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/cairo/main.go +36 -79 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkapplaunchcontext.go +10 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcairo.go +12 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcairocontext.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcicpparams.go +20 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkclipboard.go +34 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcolorstate.go +12 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentdeserializer.go +26 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentformats.go +28 -31 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentprovider.go +23 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentserializer.go +26 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcursor.go +12 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdevice.go +36 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdevicepad.go +27 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdevicetool.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdisplay.go +51 -43 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdisplaymanager.go +10 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdmabuftexture.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdmabuftexturebuilder.go +53 -41 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdmabuftexturebuilder_extra.go +6 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdrag.go +20 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdragsurface.go +6 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdragsurfacesize.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdrawcontext.go +11 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdrop.go +19 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkenums.go +21 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkevents.go +120 -118 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkframeclock.go +22 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkframetimings.go +17 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkglcontext.go +40 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkgltexture.go +4 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkgltexturebuilder.go +41 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkkeys.go +19 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkmemorytexture.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkmemorytexturebuilder.go +42 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkmonitor.go +27 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpaintable.go +63 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpango.go +4 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpixbuf.go +2 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpopup.go +47 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpopuplayout.go +36 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkrgba.go +19 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkseat.go +11 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdksnapshot.go +7 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdksurface.go +46 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdktexture.go +27 -31
| @@ -5,7 +5,6 @@ import ( | |||
| 5 | 5 | "structs" | |
| 6 | 6 | "unsafe" | |
| 7 | 7 | ||
| 8 | - | "github.com/bnema/purego" | |
| 9 | 8 | "github.com/bnema/puregotk/pkg/core" | |
| 10 | 9 | "github.com/bnema/puregotk/v4/gdkpixbuf" | |
| 11 | 10 | "github.com/bnema/puregotk/v4/gio" | |
| @@ -36,6 +35,7 @@ type TextureError int | |||
| 36 | 35 | var xTextureErrorGLibType func() types.GType | |
| 37 | 36 | ||
| 38 | 37 | func TextureErrorGLibType() types.GType { | |
| 38 | + | core.LazyRegister(&xTextureErrorGLibType, "GDK", "gdk_texture_error_get_type", false) | |
| 39 | 39 | return xTextureErrorGLibType() | |
| 40 | 40 | } | |
| 41 | 41 | ||
| @@ -56,6 +56,8 @@ var xTextureErrorQuark func() glib.Quark | |||
| 56 | 56 | ||
| 57 | 57 | // Registers an error quark for [class@Gdk.Texture] errors. | |
| 58 | 58 | func TextureErrorQuark() glib.Quark { | |
| 59 | + | core.LazyRegister(&xTextureErrorQuark, "GDK", "gdk_texture_error_quark", false) | |
| 60 | + | ||
| 59 | 61 | cret := xTextureErrorQuark() | |
| 60 | 62 | return cret | |
| 61 | 63 | } | |
| @@ -93,6 +95,7 @@ type Texture struct { | |||
| 93 | 95 | var xTextureGLibType func() types.GType | |
| 94 | 96 | ||
| 95 | 97 | func TextureGLibType() types.GType { | |
| 98 | + | core.LazyRegister(&xTextureGLibType, "GDK", "gdk_texture_get_type", false) | |
| 96 | 99 | return xTextureGLibType() | |
| 97 | 100 | } | |
| 98 | 101 | ||
| @@ -110,6 +113,7 @@ var xNewTextureForPixbuf func(uintptr) uintptr | |||
| 110 | 113 | // and [method@Gio.Task.run_in_thread] to avoid blocking the main | |
| 111 | 114 | // thread while loading a big image. | |
| 112 | 115 | func NewTextureForPixbuf(PixbufVar *gdkpixbuf.Pixbuf) *Texture { | |
| 116 | + | core.LazyRegister(&xNewTextureForPixbuf, "GDK", "gdk_texture_new_for_pixbuf", false) | |
| 113 | 117 | var cls *Texture | |
| 114 | 118 | ||
| 115 | 119 | cret := xNewTextureForPixbuf(PixbufVar.GoPointer()) | |
| @@ -141,6 +145,7 @@ var xNewTextureFromBytes func(*glib.Bytes, **glib.Error) uintptr | |||
| 141 | 145 | // Use a proper image loading framework such as libglycin, which can | |
| 142 | 146 | // load many image formats into a `GdkTexture`. | |
| 143 | 147 | func NewTextureFromBytes(BytesVar *glib.Bytes) (*Texture, error) { | |
| 148 | + | core.LazyRegister(&xNewTextureFromBytes, "GDK", "gdk_texture_new_from_bytes", false) | |
| 144 | 149 | var cls *Texture | |
| 145 | 150 | var cerr *glib.Error | |
| 146 | 151 | ||
| @@ -176,6 +181,7 @@ var xNewTextureFromFile func(uintptr, **glib.Error) uintptr | |||
| 176 | 181 | // Use a proper image loading framework such as libglycin, which can | |
| 177 | 182 | // load many image formats into a `GdkTexture`. | |
| 178 | 183 | func NewTextureFromFile(FileVar gio.File) (*Texture, error) { | |
| 184 | + | core.LazyRegister(&xNewTextureFromFile, "GDK", "gdk_texture_new_from_file", false) | |
| 179 | 185 | var cls *Texture | |
| 180 | 186 | var cerr *glib.Error | |
| 181 | 187 | ||
| @@ -211,6 +217,7 @@ var xNewTextureFromFilename func(string, **glib.Error) uintptr | |||
| 211 | 217 | // Use a proper image loading framework such as libglycin, which can | |
| 212 | 218 | // load many image formats into a `GdkTexture`. | |
| 213 | 219 | func NewTextureFromFilename(PathVar string) (*Texture, error) { | |
| 220 | + | core.LazyRegister(&xNewTextureFromFilename, "GDK", "gdk_texture_new_from_filename", false) | |
| 214 | 221 | var cls *Texture | |
| 215 | 222 | var cerr *glib.Error | |
| 216 | 223 | ||
| @@ -243,6 +250,7 @@ var xNewTextureFromResource func(string) uintptr | |||
| 243 | 250 | // and [method@Gio.Task.run_in_thread] to avoid blocking the main thread | |
| 244 | 251 | // while loading a big image. | |
| 245 | 252 | func NewTextureFromResource(ResourcePathVar string) *Texture { | |
| 253 | + | core.LazyRegister(&xNewTextureFromResource, "GDK", "gdk_texture_new_from_resource", false) | |
| 246 | 254 | var cls *Texture | |
| 247 | 255 | ||
| 248 | 256 | cret := xNewTextureFromResource(ResourcePathVar) | |
| @@ -284,6 +292,8 @@ var xTextureDownload func(uintptr, []byte, uint) | |||
| 284 | 292 | // For more flexible download capabilities, see | |
| 285 | 293 | // [struct@Gdk.TextureDownloader]. | |
| 286 | 294 | func (x *Texture) Download(DataVar []byte, StrideVar uint) { | |
| 295 | + | core.LazyRegister(&xTextureDownload, "GDK", "gdk_texture_download", false) | |
| 296 | + | ||
| 287 | 297 | xTextureDownload(x.GoPointer(), DataVar, StrideVar) | |
| 288 | 298 | } | |
| 289 | 299 | ||
| @@ -291,6 +301,8 @@ var xTextureGetColorState func(uintptr) uintptr | |||
| 291 | 301 | ||
| 292 | 302 | // Returns the color state associated with the texture. | |
| 293 | 303 | func (x *Texture) GetColorState() *ColorState { | |
| 304 | + | core.LazyRegister(&xTextureGetColorState, "GDK", "gdk_texture_get_color_state", false) | |
| 305 | + | ||
| 294 | 306 | cret := xTextureGetColorState(x.GoPointer()) | |
| 295 | 307 | if cret == 0 { | |
| 296 | 308 | return nil | |
| @@ -310,6 +322,8 @@ var xTextureGetFormat func(uintptr) MemoryFormat | |||
| 310 | 322 | // of the texture and is useful to determine the best format for | |
| 311 | 323 | // downloading the texture. | |
| 312 | 324 | func (x *Texture) GetFormat() MemoryFormat { | |
| 325 | + | core.LazyRegister(&xTextureGetFormat, "GDK", "gdk_texture_get_format", false) | |
| 326 | + | ||
| 313 | 327 | cret := xTextureGetFormat(x.GoPointer()) | |
| 314 | 328 | return cret | |
| 315 | 329 | } | |
| @@ -318,6 +332,8 @@ var xTextureGetHeight func(uintptr) int | |||
| 318 | 332 | ||
| 319 | 333 | // Returns the height of the @texture, in pixels. | |
| 320 | 334 | func (x *Texture) GetHeight() int { | |
| 335 | + | core.LazyRegister(&xTextureGetHeight, "GDK", "gdk_texture_get_height", false) | |
| 336 | + | ||
| 321 | 337 | cret := xTextureGetHeight(x.GoPointer()) | |
| 322 | 338 | return cret | |
| 323 | 339 | } | |
| @@ -326,6 +342,8 @@ var xTextureGetWidth func(uintptr) int | |||
| 326 | 342 | ||
| 327 | 343 | // Returns the width of @texture, in pixels. | |
| 328 | 344 | func (x *Texture) GetWidth() int { | |
| 345 | + | core.LazyRegister(&xTextureGetWidth, "GDK", "gdk_texture_get_width", false) | |
| 346 | + | ||
| 329 | 347 | cret := xTextureGetWidth(x.GoPointer()) | |
| 330 | 348 | return cret | |
| 331 | 349 | } | |
| @@ -340,6 +358,8 @@ var xTextureSaveToPng func(uintptr, string) bool | |||
| 340 | 358 | // want to use [method@Gdk.Texture.save_to_png_bytes] or look into | |
| 341 | 359 | // the libglycin library. | |
| 342 | 360 | func (x *Texture) SaveToPng(FilenameVar string) bool { | |
| 361 | + | core.LazyRegister(&xTextureSaveToPng, "GDK", "gdk_texture_save_to_png", false) | |
| 362 | + | ||
| 343 | 363 | cret := xTextureSaveToPng(x.GoPointer(), FilenameVar) | |
| 344 | 364 | return cret | |
| 345 | 365 | } | |
| @@ -361,6 +381,8 @@ var xTextureSaveToPngBytes func(uintptr) uintptr | |||
| 361 | 381 | // might also want to consider [method@Gdk.Texture.save_to_tiff_bytes] | |
| 362 | 382 | // instead. | |
| 363 | 383 | func (x *Texture) SaveToPngBytes() *glib.Bytes { | |
| 384 | + | core.LazyRegister(&xTextureSaveToPngBytes, "GDK", "gdk_texture_save_to_png_bytes", false) | |
| 385 | + | ||
| 364 | 386 | cret := xTextureSaveToPngBytes(x.GoPointer()) | |
| 365 | 387 | if cret == 0 { | |
| 366 | 388 | return nil | |
| @@ -374,6 +396,8 @@ var xTextureSaveToTiff func(uintptr, string) bool | |||
| 374 | 396 | // | |
| 375 | 397 | // GTK will attempt to store data without loss. | |
| 376 | 398 | func (x *Texture) SaveToTiff(FilenameVar string) bool { | |
| 399 | + | core.LazyRegister(&xTextureSaveToTiff, "GDK", "gdk_texture_save_to_tiff", false) | |
| 400 | + | ||
| 377 | 401 | cret := xTextureSaveToTiff(x.GoPointer(), FilenameVar) | |
| 378 | 402 | return cret | |
| 379 | 403 | } | |
| @@ -393,6 +417,8 @@ var xTextureSaveToTiffBytes func(uintptr) uintptr | |||
| 393 | 417 | // smaller size and a more portable format, you might want to | |
| 394 | 418 | // use [method@Gdk.Texture.save_to_png_bytes]. | |
| 395 | 419 | func (x *Texture) SaveToTiffBytes() *glib.Bytes { | |
| 420 | + | core.LazyRegister(&xTextureSaveToTiffBytes, "GDK", "gdk_texture_save_to_tiff_bytes", false) | |
| 421 | + | ||
| 396 | 422 | cret := xTextureSaveToTiffBytes(x.GoPointer()) | |
| 397 | 423 | if cret == 0 { | |
| 398 | 424 | return nil | |
| @@ -687,34 +713,4 @@ func (x *Texture) LoadFinish(ResVar gio.AsyncResult, TypeVar *string) (*gio.Inpu | |||
| 687 | 713 | func init() { | |
| 688 | 714 | core.SetPackageName("GDK", "gtk4") | |
| 689 | 715 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | |
| 690 | - | var libs []uintptr | |
| 691 | - | for _, libPath := range core.GetPaths("GDK") { | |
| 692 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 693 | - | if err != nil { | |
| 694 | - | panic(err) | |
| 695 | - | } | |
| 696 | - | libs = append(libs, lib) | |
| 697 | - | } | |
| 698 | - | ||
| 699 | - | core.PuregoSafeRegister(&xTextureErrorGLibType, libs, "gdk_texture_error_get_type") | |
| 700 | - | ||
| 701 | - | core.PuregoSafeRegister(&xTextureErrorQuark, libs, "gdk_texture_error_quark") | |
| 702 | - | ||
| 703 | - | core.PuregoSafeRegister(&xTextureGLibType, libs, "gdk_texture_get_type") | |
| 704 | - | ||
| 705 | - | core.PuregoSafeRegister(&xNewTextureForPixbuf, libs, "gdk_texture_new_for_pixbuf") | |
| 706 | - | core.PuregoSafeRegister(&xNewTextureFromBytes, libs, "gdk_texture_new_from_bytes") | |
| 707 | - | core.PuregoSafeRegister(&xNewTextureFromFile, libs, "gdk_texture_new_from_file") | |
| 708 | - | core.PuregoSafeRegister(&xNewTextureFromFilename, libs, "gdk_texture_new_from_filename") | |
| 709 | - | core.PuregoSafeRegister(&xNewTextureFromResource, libs, "gdk_texture_new_from_resource") | |
| 710 | - | ||
| 711 | - | core.PuregoSafeRegister(&xTextureDownload, libs, "gdk_texture_download") | |
| 712 | - | core.PuregoSafeRegister(&xTextureGetColorState, libs, "gdk_texture_get_color_state") | |
| 713 | - | core.PuregoSafeRegister(&xTextureGetFormat, libs, "gdk_texture_get_format") | |
| 714 | - | core.PuregoSafeRegister(&xTextureGetHeight, libs, "gdk_texture_get_height") | |
| 715 | - | core.PuregoSafeRegister(&xTextureGetWidth, libs, "gdk_texture_get_width") | |
| 716 | - | core.PuregoSafeRegister(&xTextureSaveToPng, libs, "gdk_texture_save_to_png") | |
| 717 | - | core.PuregoSafeRegister(&xTextureSaveToPngBytes, libs, "gdk_texture_save_to_png_bytes") | |
| 718 | - | core.PuregoSafeRegister(&xTextureSaveToTiff, libs, "gdk_texture_save_to_tiff") | |
| 719 | - | core.PuregoSafeRegister(&xTextureSaveToTiffBytes, libs, "gdk_texture_save_to_tiff_bytes") | |
| 720 | 716 | } | |
| @@ -5,7 +5,6 @@ import ( | |||||
| 5 | "structs" | 5 | "structs" | ||
| 6 | "unsafe" | 6 | "unsafe" | ||
| 7 | 7 | ||||
| 8 | - | "github.com/bnema/purego" | |||
| 9 | "github.com/bnema/puregotk/pkg/core" | 8 | "github.com/bnema/puregotk/pkg/core" | ||
| 10 | "github.com/bnema/puregotk/v4/gdkpixbuf" | 9 | "github.com/bnema/puregotk/v4/gdkpixbuf" | ||
| 11 | "github.com/bnema/puregotk/v4/gio" | 10 | "github.com/bnema/puregotk/v4/gio" | ||
| @@ -36,6 +35,7 @@ type TextureError int | |||||
| 36 | var xTextureErrorGLibType func() types.GType | 35 | var xTextureErrorGLibType func() types.GType | ||
| 37 | 36 | ||||
| 38 | func TextureErrorGLibType() types.GType { | 37 | func TextureErrorGLibType() types.GType { | ||
| 38 | + | core.LazyRegister(&xTextureErrorGLibType, "GDK", "gdk_texture_error_get_type", false) | |||
| 39 | return xTextureErrorGLibType() | 39 | return xTextureErrorGLibType() | ||
| 40 | } | 40 | } | ||
| 41 | 41 | ||||
| @@ -56,6 +56,8 @@ var xTextureErrorQuark func() glib.Quark | |||||
| 56 | 56 | ||||
| 57 | // Registers an error quark for [class@Gdk.Texture] errors. | 57 | // Registers an error quark for [class@Gdk.Texture] errors. | ||
| 58 | func TextureErrorQuark() glib.Quark { | 58 | func TextureErrorQuark() glib.Quark { | ||
| 59 | + | core.LazyRegister(&xTextureErrorQuark, "GDK", "gdk_texture_error_quark", false) | |||
| 60 | + | ||||
| 59 | cret := xTextureErrorQuark() | 61 | cret := xTextureErrorQuark() | ||
| 60 | return cret | 62 | return cret | ||
| 61 | } | 63 | } | ||
| @@ -93,6 +95,7 @@ type Texture struct { | |||||
| 93 | var xTextureGLibType func() types.GType | 95 | var xTextureGLibType func() types.GType | ||
| 94 | 96 | ||||
| 95 | func TextureGLibType() types.GType { | 97 | func TextureGLibType() types.GType { | ||
| 98 | + | core.LazyRegister(&xTextureGLibType, "GDK", "gdk_texture_get_type", false) | |||
| 96 | return xTextureGLibType() | 99 | return xTextureGLibType() | ||
| 97 | } | 100 | } | ||
| 98 | 101 | ||||
| @@ -110,6 +113,7 @@ var xNewTextureForPixbuf func(uintptr) uintptr | |||||
| 110 | // and [method@Gio.Task.run_in_thread] to avoid blocking the main | 113 | // and [method@Gio.Task.run_in_thread] to avoid blocking the main | ||
| 111 | // thread while loading a big image. | 114 | // thread while loading a big image. | ||
| 112 | func NewTextureForPixbuf(PixbufVar *gdkpixbuf.Pixbuf) *Texture { | 115 | func NewTextureForPixbuf(PixbufVar *gdkpixbuf.Pixbuf) *Texture { | ||
| 116 | + | core.LazyRegister(&xNewTextureForPixbuf, "GDK", "gdk_texture_new_for_pixbuf", false) | |||
| 113 | var cls *Texture | 117 | var cls *Texture | ||
| 114 | 118 | ||||
| 115 | cret := xNewTextureForPixbuf(PixbufVar.GoPointer()) | 119 | cret := xNewTextureForPixbuf(PixbufVar.GoPointer()) | ||
| @@ -141,6 +145,7 @@ var xNewTextureFromBytes func(*glib.Bytes, **glib.Error) uintptr | |||||
| 141 | // Use a proper image loading framework such as libglycin, which can | 145 | // Use a proper image loading framework such as libglycin, which can | ||
| 142 | // load many image formats into a `GdkTexture`. | 146 | // load many image formats into a `GdkTexture`. | ||
| 143 | func NewTextureFromBytes(BytesVar *glib.Bytes) (*Texture, error) { | 147 | func NewTextureFromBytes(BytesVar *glib.Bytes) (*Texture, error) { | ||
| 148 | + | core.LazyRegister(&xNewTextureFromBytes, "GDK", "gdk_texture_new_from_bytes", false) | |||
| 144 | var cls *Texture | 149 | var cls *Texture | ||
| 145 | var cerr *glib.Error | 150 | var cerr *glib.Error | ||
| 146 | 151 | ||||
| @@ -176,6 +181,7 @@ var xNewTextureFromFile func(uintptr, **glib.Error) uintptr | |||||
| 176 | // Use a proper image loading framework such as libglycin, which can | 181 | // Use a proper image loading framework such as libglycin, which can | ||
| 177 | // load many image formats into a `GdkTexture`. | 182 | // load many image formats into a `GdkTexture`. | ||
| 178 | func NewTextureFromFile(FileVar gio.File) (*Texture, error) { | 183 | func NewTextureFromFile(FileVar gio.File) (*Texture, error) { | ||
| 184 | + | core.LazyRegister(&xNewTextureFromFile, "GDK", "gdk_texture_new_from_file", false) | |||
| 179 | var cls *Texture | 185 | var cls *Texture | ||
| 180 | var cerr *glib.Error | 186 | var cerr *glib.Error | ||
| 181 | 187 | ||||
| @@ -211,6 +217,7 @@ var xNewTextureFromFilename func(string, **glib.Error) uintptr | |||||
| 211 | // Use a proper image loading framework such as libglycin, which can | 217 | // Use a proper image loading framework such as libglycin, which can | ||
| 212 | // load many image formats into a `GdkTexture`. | 218 | // load many image formats into a `GdkTexture`. | ||
| 213 | func NewTextureFromFilename(PathVar string) (*Texture, error) { | 219 | func NewTextureFromFilename(PathVar string) (*Texture, error) { | ||
| 220 | + | core.LazyRegister(&xNewTextureFromFilename, "GDK", "gdk_texture_new_from_filename", false) | |||
| 214 | var cls *Texture | 221 | var cls *Texture | ||
| 215 | var cerr *glib.Error | 222 | var cerr *glib.Error | ||
| 216 | 223 | ||||
| @@ -243,6 +250,7 @@ var xNewTextureFromResource func(string) uintptr | |||||
| 243 | // and [method@Gio.Task.run_in_thread] to avoid blocking the main thread | 250 | // and [method@Gio.Task.run_in_thread] to avoid blocking the main thread | ||
| 244 | // while loading a big image. | 251 | // while loading a big image. | ||
| 245 | func NewTextureFromResource(ResourcePathVar string) *Texture { | 252 | func NewTextureFromResource(ResourcePathVar string) *Texture { | ||
| 253 | + | core.LazyRegister(&xNewTextureFromResource, "GDK", "gdk_texture_new_from_resource", false) | |||
| 246 | var cls *Texture | 254 | var cls *Texture | ||
| 247 | 255 | ||||
| 248 | cret := xNewTextureFromResource(ResourcePathVar) | 256 | cret := xNewTextureFromResource(ResourcePathVar) | ||
| @@ -284,6 +292,8 @@ var xTextureDownload func(uintptr, []byte, uint) | |||||
| 284 | // For more flexible download capabilities, see | 292 | // For more flexible download capabilities, see | ||
| 285 | // [struct@Gdk.TextureDownloader]. | 293 | // [struct@Gdk.TextureDownloader]. | ||
| 286 | func (x *Texture) Download(DataVar []byte, StrideVar uint) { | 294 | func (x *Texture) Download(DataVar []byte, StrideVar uint) { | ||
| 295 | + | core.LazyRegister(&xTextureDownload, "GDK", "gdk_texture_download", false) | |||
| 296 | + | ||||
| 287 | xTextureDownload(x.GoPointer(), DataVar, StrideVar) | 297 | xTextureDownload(x.GoPointer(), DataVar, StrideVar) | ||
| 288 | } | 298 | } | ||
| 289 | 299 | ||||
| @@ -291,6 +301,8 @@ var xTextureGetColorState func(uintptr) uintptr | |||||
| 291 | 301 | ||||
| 292 | // Returns the color state associated with the texture. | 302 | // Returns the color state associated with the texture. | ||
| 293 | func (x *Texture) GetColorState() *ColorState { | 303 | func (x *Texture) GetColorState() *ColorState { | ||
| 304 | + | core.LazyRegister(&xTextureGetColorState, "GDK", "gdk_texture_get_color_state", false) | |||
| 305 | + | ||||
| 294 | cret := xTextureGetColorState(x.GoPointer()) | 306 | cret := xTextureGetColorState(x.GoPointer()) | ||
| 295 | if cret == 0 { | 307 | if cret == 0 { | ||
| 296 | return nil | 308 | return nil | ||
| @@ -310,6 +322,8 @@ var xTextureGetFormat func(uintptr) MemoryFormat | |||||
| 310 | // of the texture and is useful to determine the best format for | 322 | // of the texture and is useful to determine the best format for | ||
| 311 | // downloading the texture. | 323 | // downloading the texture. | ||
| 312 | func (x *Texture) GetFormat() MemoryFormat { | 324 | func (x *Texture) GetFormat() MemoryFormat { | ||
| 325 | + | core.LazyRegister(&xTextureGetFormat, "GDK", "gdk_texture_get_format", false) | |||
| 326 | + | ||||
| 313 | cret := xTextureGetFormat(x.GoPointer()) | 327 | cret := xTextureGetFormat(x.GoPointer()) | ||
| 314 | return cret | 328 | return cret | ||
| 315 | } | 329 | } | ||
| @@ -318,6 +332,8 @@ var xTextureGetHeight func(uintptr) int | |||||
| 318 | 332 | ||||
| 319 | // Returns the height of the @texture, in pixels. | 333 | // Returns the height of the @texture, in pixels. | ||
| 320 | func (x *Texture) GetHeight() int { | 334 | func (x *Texture) GetHeight() int { | ||
| 335 | + | core.LazyRegister(&xTextureGetHeight, "GDK", "gdk_texture_get_height", false) | |||
| 336 | + | ||||
| 321 | cret := xTextureGetHeight(x.GoPointer()) | 337 | cret := xTextureGetHeight(x.GoPointer()) | ||
| 322 | return cret | 338 | return cret | ||
| 323 | } | 339 | } | ||
| @@ -326,6 +342,8 @@ var xTextureGetWidth func(uintptr) int | |||||
| 326 | 342 | ||||
| 327 | // Returns the width of @texture, in pixels. | 343 | // Returns the width of @texture, in pixels. | ||
| 328 | func (x *Texture) GetWidth() int { | 344 | func (x *Texture) GetWidth() int { | ||
| 345 | + | core.LazyRegister(&xTextureGetWidth, "GDK", "gdk_texture_get_width", false) | |||
| 346 | + | ||||
| 329 | cret := xTextureGetWidth(x.GoPointer()) | 347 | cret := xTextureGetWidth(x.GoPointer()) | ||
| 330 | return cret | 348 | return cret | ||
| 331 | } | 349 | } | ||
| @@ -340,6 +358,8 @@ var xTextureSaveToPng func(uintptr, string) bool | |||||
| 340 | // want to use [method@Gdk.Texture.save_to_png_bytes] or look into | 358 | // want to use [method@Gdk.Texture.save_to_png_bytes] or look into | ||
| 341 | // the libglycin library. | 359 | // the libglycin library. | ||
| 342 | func (x *Texture) SaveToPng(FilenameVar string) bool { | 360 | func (x *Texture) SaveToPng(FilenameVar string) bool { | ||
| 361 | + | core.LazyRegister(&xTextureSaveToPng, "GDK", "gdk_texture_save_to_png", false) | |||
| 362 | + | ||||
| 343 | cret := xTextureSaveToPng(x.GoPointer(), FilenameVar) | 363 | cret := xTextureSaveToPng(x.GoPointer(), FilenameVar) | ||
| 344 | return cret | 364 | return cret | ||
| 345 | } | 365 | } | ||
| @@ -361,6 +381,8 @@ var xTextureSaveToPngBytes func(uintptr) uintptr | |||||
| 361 | // might also want to consider [method@Gdk.Texture.save_to_tiff_bytes] | 381 | // might also want to consider [method@Gdk.Texture.save_to_tiff_bytes] | ||
| 362 | // instead. | 382 | // instead. | ||
| 363 | func (x *Texture) SaveToPngBytes() *glib.Bytes { | 383 | func (x *Texture) SaveToPngBytes() *glib.Bytes { | ||
| 384 | + | core.LazyRegister(&xTextureSaveToPngBytes, "GDK", "gdk_texture_save_to_png_bytes", false) | |||
| 385 | + | ||||
| 364 | cret := xTextureSaveToPngBytes(x.GoPointer()) | 386 | cret := xTextureSaveToPngBytes(x.GoPointer()) | ||
| 365 | if cret == 0 { | 387 | if cret == 0 { | ||
| 366 | return nil | 388 | return nil | ||
| @@ -374,6 +396,8 @@ var xTextureSaveToTiff func(uintptr, string) bool | |||||
| 374 | // | 396 | // | ||
| 375 | // GTK will attempt to store data without loss. | 397 | // GTK will attempt to store data without loss. | ||
| 376 | func (x *Texture) SaveToTiff(FilenameVar string) bool { | 398 | func (x *Texture) SaveToTiff(FilenameVar string) bool { | ||
| 399 | + | core.LazyRegister(&xTextureSaveToTiff, "GDK", "gdk_texture_save_to_tiff", false) | |||
| 400 | + | ||||
| 377 | cret := xTextureSaveToTiff(x.GoPointer(), FilenameVar) | 401 | cret := xTextureSaveToTiff(x.GoPointer(), FilenameVar) | ||
| 378 | return cret | 402 | return cret | ||
| 379 | } | 403 | } | ||
| @@ -393,6 +417,8 @@ var xTextureSaveToTiffBytes func(uintptr) uintptr | |||||
| 393 | // smaller size and a more portable format, you might want to | 417 | // smaller size and a more portable format, you might want to | ||
| 394 | // use [method@Gdk.Texture.save_to_png_bytes]. | 418 | // use [method@Gdk.Texture.save_to_png_bytes]. | ||
| 395 | func (x *Texture) SaveToTiffBytes() *glib.Bytes { | 419 | func (x *Texture) SaveToTiffBytes() *glib.Bytes { | ||
| 420 | + | core.LazyRegister(&xTextureSaveToTiffBytes, "GDK", "gdk_texture_save_to_tiff_bytes", false) | |||
| 421 | + | ||||
| 396 | cret := xTextureSaveToTiffBytes(x.GoPointer()) | 422 | cret := xTextureSaveToTiffBytes(x.GoPointer()) | ||
| 397 | if cret == 0 { | 423 | if cret == 0 { | ||
| 398 | return nil | 424 | return nil | ||
| @@ -687,34 +713,4 @@ func (x *Texture) LoadFinish(ResVar gio.AsyncResult, TypeVar *string) (*gio.Inpu | |||||
| 687 | func init() { | 713 | func init() { | ||
| 688 | core.SetPackageName("GDK", "gtk4") | 714 | core.SetPackageName("GDK", "gtk4") | ||
| 689 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | 715 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | ||
| 690 | - | var libs []uintptr | |||
| 691 | - | for _, libPath := range core.GetPaths("GDK") { | |||
| 692 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 693 | - | if err != nil { | |||
| 694 | - | panic(err) | |||
| 695 | - | } | |||
| 696 | - | libs = append(libs, lib) | |||
| 697 | - | } | |||
| 698 | - | ||||
| 699 | - | core.PuregoSafeRegister(&xTextureErrorGLibType, libs, "gdk_texture_error_get_type") | |||
| 700 | - | ||||
| 701 | - | core.PuregoSafeRegister(&xTextureErrorQuark, libs, "gdk_texture_error_quark") | |||
| 702 | - | ||||
| 703 | - | core.PuregoSafeRegister(&xTextureGLibType, libs, "gdk_texture_get_type") | |||
| 704 | - | ||||
| 705 | - | core.PuregoSafeRegister(&xNewTextureForPixbuf, libs, "gdk_texture_new_for_pixbuf") | |||
| 706 | - | core.PuregoSafeRegister(&xNewTextureFromBytes, libs, "gdk_texture_new_from_bytes") | |||
| 707 | - | core.PuregoSafeRegister(&xNewTextureFromFile, libs, "gdk_texture_new_from_file") | |||
| 708 | - | core.PuregoSafeRegister(&xNewTextureFromFilename, libs, "gdk_texture_new_from_filename") | |||
| 709 | - | core.PuregoSafeRegister(&xNewTextureFromResource, libs, "gdk_texture_new_from_resource") | |||
| 710 | - | ||||
| 711 | - | core.PuregoSafeRegister(&xTextureDownload, libs, "gdk_texture_download") | |||
| 712 | - | core.PuregoSafeRegister(&xTextureGetColorState, libs, "gdk_texture_get_color_state") | |||
| 713 | - | core.PuregoSafeRegister(&xTextureGetFormat, libs, "gdk_texture_get_format") | |||
| 714 | - | core.PuregoSafeRegister(&xTextureGetHeight, libs, "gdk_texture_get_height") | |||
| 715 | - | core.PuregoSafeRegister(&xTextureGetWidth, libs, "gdk_texture_get_width") | |||
| 716 | - | core.PuregoSafeRegister(&xTextureSaveToPng, libs, "gdk_texture_save_to_png") | |||
| 717 | - | core.PuregoSafeRegister(&xTextureSaveToPngBytes, libs, "gdk_texture_save_to_png_bytes") | |||
| 718 | - | core.PuregoSafeRegister(&xTextureSaveToTiff, libs, "gdk_texture_save_to_tiff") | |||
| 719 | - | core.PuregoSafeRegister(&xTextureSaveToTiffBytes, libs, "gdk_texture_save_to_tiff_bytes") | |||
| 720 | } | 716 | } | ||