Merge pull request #350 from bnema/fix/repin-fixed-puregotk
fix(deps): validate puregotk lazy registration fix
907 files · +27874 -25296
M go.mod +3 -1
| @@ -11,7 +11,7 @@ require ( | |||
| 11 | 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | |
| 12 | 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | |
| 13 | 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | |
| 14 | - | github.com/bnema/puregotk v0.7.0 | |
| 14 | + | github.com/bnema/puregotk v0.7.1-0.20260714200603-7370c78950ef | |
| 15 | 15 | github.com/charmbracelet/bubbles v1.0.0 | |
| 16 | 16 | github.com/charmbracelet/bubbletea v1.3.10 | |
| 17 | 17 | github.com/charmbracelet/lipgloss v1.1.0 | |
| @@ -47,6 +47,7 @@ require ( | |||
| 47 | 47 | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect | |
| 48 | 48 | github.com/fatih/color v1.19.0 // indirect | |
| 49 | 49 | github.com/go-viper/mapstructure/v2 v2.5.0 // indirect | |
| 50 | + | github.com/google/go-cmp v0.7.0 // indirect | |
| 50 | 51 | github.com/inconshreveable/mousetrap v1.1.0 // indirect | |
| 51 | 52 | github.com/lucasb-eyer/go-colorful v1.4.0 // indirect | |
| 52 | 53 | github.com/mattn/go-colorable v0.1.14 // indirect | |
| @@ -80,6 +81,7 @@ require ( | |||
| 80 | 81 | golang.org/x/text v0.40.0 // indirect | |
| 81 | 82 | golang.org/x/tools v0.47.0 // indirect | |
| 82 | 83 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | |
| 84 | + | mvdan.cc/gofumpt v0.9.2 // indirect | |
| 83 | 85 | ) | |
| 84 | 86 | ||
| 85 | 87 | tool github.com/a-h/templ/cmd/templ | |
| @@ -11,7 +11,7 @@ require ( | |||||
| 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | ||
| 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | ||
| 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | ||
| 14 | - | github.com/bnema/puregotk v0.7.0 | 14 | + | github.com/bnema/puregotk v0.7.1-0.20260714200603-7370c78950ef |
| 15 | github.com/charmbracelet/bubbles v1.0.0 | 15 | github.com/charmbracelet/bubbles v1.0.0 | ||
| 16 | github.com/charmbracelet/bubbletea v1.3.10 | 16 | github.com/charmbracelet/bubbletea v1.3.10 | ||
| 17 | github.com/charmbracelet/lipgloss v1.1.0 | 17 | github.com/charmbracelet/lipgloss v1.1.0 | ||
| @@ -47,6 +47,7 @@ require ( | |||||
| 47 | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect | 47 | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect | ||
| 48 | github.com/fatih/color v1.19.0 // indirect | 48 | github.com/fatih/color v1.19.0 // indirect | ||
| 49 | github.com/go-viper/mapstructure/v2 v2.5.0 // indirect | 49 | github.com/go-viper/mapstructure/v2 v2.5.0 // indirect | ||
| 50 | + | github.com/google/go-cmp v0.7.0 // indirect | |||
| 50 | github.com/inconshreveable/mousetrap v1.1.0 // indirect | 51 | github.com/inconshreveable/mousetrap v1.1.0 // indirect | ||
| 51 | github.com/lucasb-eyer/go-colorful v1.4.0 // indirect | 52 | github.com/lucasb-eyer/go-colorful v1.4.0 // indirect | ||
| 52 | github.com/mattn/go-colorable v0.1.14 // indirect | 53 | github.com/mattn/go-colorable v0.1.14 // indirect | ||
| @@ -80,6 +81,7 @@ require ( | |||||
| 80 | golang.org/x/text v0.40.0 // indirect | 81 | golang.org/x/text v0.40.0 // indirect | ||
| 81 | golang.org/x/tools v0.47.0 // indirect | 82 | golang.org/x/tools v0.47.0 // indirect | ||
| 82 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | 83 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | ||
| 84 | + | mvdan.cc/gofumpt v0.9.2 // indirect | |||
| 83 | ) | 85 | ) | ||
| 84 | 86 | ||||
| 85 | tool github.com/a-h/templ/cmd/templ | 87 | tool github.com/a-h/templ/cmd/templ | ||
M go.sum +4 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/internal/core/core.go +197 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/pkg/core/core.go +10 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-dialog.go +99 -64 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-window.go +95 -62 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-accent-color.go +7 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-action-row.go +33 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-alert-dialog.go +66 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-target.go +10 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-util.go +4 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation.go +24 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application-window.go +14 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application.go +3 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-avatar.go +22 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-banner.go +23 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bin.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bottom-sheet.go +47 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint-bin.go +10 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint.go +33 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-content.go +18 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-row.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-dots.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-lines.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel.go +47 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-layout.go +14 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-scrollable.go +17 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp.go +17 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-combo-row.go +34 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-dialog.go +45 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-easing.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-entry-row.go +40 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-enum-list-model.go +13 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-expander-row.go +40 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-flap.go +61 -48 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-fold-threshold-policy.go +10 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-header-bar.go +36 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-inline-view-switcher.go +18 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout-slot.go +4 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout.go +7 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-leaflet.go +69 -56 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-length-unit.go +5 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-main.go +5 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-message-dialog.go +63 -44 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-multi-layout-view.go +17 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-direction.go +10 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-split-view.go +36 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-view.go +60 -49 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-overlay-split-view.go +48 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-password-entry-row.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-dialog.go +23 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-group.go +24 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-page.go +38 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-row.go +18 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-window.go +31 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcut-label.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-dialog.go +4 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-item.go +23 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-section.go +8 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar-item.go +45 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar-section.go +24 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar.go +41 -39 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spin-row.go +40 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spinner-paintable.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spinner.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-split-button.go +39 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spring-animation.go +34 -30 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spring-params.go +17 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-squeezer.go +49 -44 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-status-page.go +20 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-style-manager.go +25 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-swipe-tracker.go +33 -30 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-swipeable.go +33 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-switch-row.go +6 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-bar.go +35 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-button.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-overview.go +45 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-view.go +123 -87 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-timed-animation.go +30 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toast-overlay.go +9 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toast.go +41 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toggle-group.go +64 -51 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toolbar-view.go +40 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-version.go +7 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-stack.go +78 -62 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-bar.go +9 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-sidebar.go +15 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-title.go +19 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher.go +10 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-window-title.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-window.go +14 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-wrap-box.go +66 -46 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-wrap-layout.go +57 -46 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/cairo/main.go +36 -79 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkapplaunchcontext.go +10 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcairo.go +12 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcairocontext.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcicpparams.go +20 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkclipboard.go +34 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcolorstate.go +12 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentdeserializer.go +26 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentformats.go +28 -31 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentprovider.go +23 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentserializer.go +26 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcursor.go +12 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdevice.go +36 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdevicepad.go +27 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdevicetool.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdisplay.go +51 -43 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdisplaymanager.go +10 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdmabuftexture.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdmabuftexturebuilder.go +53 -41 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdmabuftexturebuilder_extra.go +6 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdrag.go +20 -28 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
| @@ -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/glib" | |
| 11 | 10 | "github.com/bnema/puregotk/v4/gobject/types" | |
| @@ -34,6 +33,7 @@ type RGBA struct { | |||
| 34 | 33 | var xRGBAGLibType func() types.GType | |
| 35 | 34 | ||
| 36 | 35 | func RGBAGLibType() types.GType { | |
| 36 | + | core.LazyRegister(&xRGBAGLibType, "GDK", "gdk_rgba_get_type", false) | |
| 37 | 37 | return xRGBAGLibType() | |
| 38 | 38 | } | |
| 39 | 39 | ||
| @@ -55,6 +55,8 @@ var xRGBACopy func(uintptr) uintptr | |||
| 55 | 55 | // | |
| 56 | 56 | // The result must be freed through [method@Gdk.RGBA.free]. | |
| 57 | 57 | func (x *RGBA) Copy() *RGBA { | |
| 58 | + | core.LazyRegister(&xRGBACopy, "GDK", "gdk_rgba_copy", false) | |
| 59 | + | ||
| 58 | 60 | cret := xRGBACopy(x.GoPointer()) | |
| 59 | 61 | if cret == 0 { | |
| 60 | 62 | return nil | |
| @@ -66,6 +68,8 @@ var xRGBAEqual func(uintptr, uintptr) bool | |||
| 66 | 68 | ||
| 67 | 69 | // Compares two `GdkRGBA` colors. | |
| 68 | 70 | func (x *RGBA) Equal(P2Var uintptr) bool { | |
| 71 | + | core.LazyRegister(&xRGBAEqual, "GDK", "gdk_rgba_equal", false) | |
| 72 | + | ||
| 69 | 73 | cret := xRGBAEqual(x.GoPointer(), P2Var) | |
| 70 | 74 | return cret | |
| 71 | 75 | } | |
| @@ -74,6 +78,8 @@ var xRGBAFree func(uintptr) | |||
| 74 | 78 | ||
| 75 | 79 | // Frees a `GdkRGBA`. | |
| 76 | 80 | func (x *RGBA) Free() { | |
| 81 | + | core.LazyRegister(&xRGBAFree, "GDK", "gdk_rgba_free", false) | |
| 82 | + | ||
| 77 | 83 | xRGBAFree(x.GoPointer()) | |
| 78 | 84 | } | |
| 79 | 85 | ||
| @@ -82,6 +88,8 @@ var xRGBAHash func(uintptr) uint | |||
| 82 | 88 | // A hash function suitable for using for a hash | |
| 83 | 89 | // table that stores `GdkRGBA`s. | |
| 84 | 90 | func (x *RGBA) Hash() uint { | |
| 91 | + | core.LazyRegister(&xRGBAHash, "GDK", "gdk_rgba_hash", false) | |
| 92 | + | ||
| 85 | 93 | cret := xRGBAHash(x.GoPointer()) | |
| 86 | 94 | return cret | |
| 87 | 95 | } | |
| @@ -92,6 +100,8 @@ var xRGBAIsClear func(uintptr) bool | |||
| 92 | 100 | // | |
| 93 | 101 | // That is, drawing with the value would not produce any change. | |
| 94 | 102 | func (x *RGBA) IsClear() bool { | |
| 103 | + | core.LazyRegister(&xRGBAIsClear, "GDK", "gdk_rgba_is_clear", false) | |
| 104 | + | ||
| 95 | 105 | cret := xRGBAIsClear(x.GoPointer()) | |
| 96 | 106 | return cret | |
| 97 | 107 | } | |
| @@ -103,6 +113,8 @@ var xRGBAIsOpaque func(uintptr) bool | |||
| 103 | 113 | // That is, drawing with the value will not retain any results | |
| 104 | 114 | // from previous contents. | |
| 105 | 115 | func (x *RGBA) IsOpaque() bool { | |
| 116 | + | core.LazyRegister(&xRGBAIsOpaque, "GDK", "gdk_rgba_is_opaque", false) | |
| 117 | + | ||
| 106 | 118 | cret := xRGBAIsOpaque(x.GoPointer()) | |
| 107 | 119 | return cret | |
| 108 | 120 | } | |
| @@ -132,6 +144,8 @@ var xRGBAParse func(uintptr, string) bool | |||
| 132 | 144 | // “s”, “l” can be either numbers in the range 0 to 100 or | |
| 133 | 145 | // percentages. | |
| 134 | 146 | func (x *RGBA) Parse(SpecVar string) bool { | |
| 147 | + | core.LazyRegister(&xRGBAParse, "GDK", "gdk_rgba_parse", false) | |
| 148 | + | ||
| 135 | 149 | cret := xRGBAParse(x.GoPointer(), SpecVar) | |
| 136 | 150 | return cret | |
| 137 | 151 | } | |
| @@ -139,6 +153,8 @@ func (x *RGBA) Parse(SpecVar string) bool { | |||
| 139 | 153 | var xRGBAPrint func(uintptr, *glib.String) uintptr | |
| 140 | 154 | ||
| 141 | 155 | func (x *RGBA) Print(StringVar *glib.String) *glib.String { | |
| 156 | + | core.LazyRegister(&xRGBAPrint, "GDK", "gdk_rgba_print", false) | |
| 157 | + | ||
| 142 | 158 | cret := xRGBAPrint(x.GoPointer(), StringVar) | |
| 143 | 159 | if cret == 0 { | |
| 144 | 160 | return nil | |
| @@ -162,6 +178,8 @@ var xRGBAToString func(uintptr) string | |||
| 162 | 178 | // since “r”, “g” and “b” are represented as 8-bit integers. If | |
| 163 | 179 | // this is a concern, you should use a different representation. | |
| 164 | 180 | func (x *RGBA) ToString() string { | |
| 181 | + | core.LazyRegister(&xRGBAToString, "GDK", "gdk_rgba_to_string", false) | |
| 182 | + | ||
| 165 | 183 | cret := xRGBAToString(x.GoPointer()) | |
| 166 | 184 | return cret | |
| 167 | 185 | } | |
| @@ -169,24 +187,4 @@ func (x *RGBA) ToString() string { | |||
| 169 | 187 | func init() { | |
| 170 | 188 | core.SetPackageName("GDK", "gtk4") | |
| 171 | 189 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | |
| 172 | - | var libs []uintptr | |
| 173 | - | for _, libPath := range core.GetPaths("GDK") { | |
| 174 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 175 | - | if err != nil { | |
| 176 | - | panic(err) | |
| 177 | - | } | |
| 178 | - | libs = append(libs, lib) | |
| 179 | - | } | |
| 180 | - | ||
| 181 | - | core.PuregoSafeRegister(&xRGBAGLibType, libs, "gdk_rgba_get_type") | |
| 182 | - | ||
| 183 | - | core.PuregoSafeRegister(&xRGBACopy, libs, "gdk_rgba_copy") | |
| 184 | - | core.PuregoSafeRegister(&xRGBAEqual, libs, "gdk_rgba_equal") | |
| 185 | - | core.PuregoSafeRegister(&xRGBAFree, libs, "gdk_rgba_free") | |
| 186 | - | core.PuregoSafeRegister(&xRGBAHash, libs, "gdk_rgba_hash") | |
| 187 | - | core.PuregoSafeRegister(&xRGBAIsClear, libs, "gdk_rgba_is_clear") | |
| 188 | - | core.PuregoSafeRegister(&xRGBAIsOpaque, libs, "gdk_rgba_is_opaque") | |
| 189 | - | core.PuregoSafeRegister(&xRGBAParse, libs, "gdk_rgba_parse") | |
| 190 | - | core.PuregoSafeRegister(&xRGBAPrint, libs, "gdk_rgba_print") | |
| 191 | - | core.PuregoSafeRegister(&xRGBAToString, libs, "gdk_rgba_to_string") | |
| 192 | 190 | } | |
| @@ -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/glib" | 9 | "github.com/bnema/puregotk/v4/glib" | ||
| 11 | "github.com/bnema/puregotk/v4/gobject/types" | 10 | "github.com/bnema/puregotk/v4/gobject/types" | ||
| @@ -34,6 +33,7 @@ type RGBA struct { | |||||
| 34 | var xRGBAGLibType func() types.GType | 33 | var xRGBAGLibType func() types.GType | ||
| 35 | 34 | ||||
| 36 | func RGBAGLibType() types.GType { | 35 | func RGBAGLibType() types.GType { | ||
| 36 | + | core.LazyRegister(&xRGBAGLibType, "GDK", "gdk_rgba_get_type", false) | |||
| 37 | return xRGBAGLibType() | 37 | return xRGBAGLibType() | ||
| 38 | } | 38 | } | ||
| 39 | 39 | ||||
| @@ -55,6 +55,8 @@ var xRGBACopy func(uintptr) uintptr | |||||
| 55 | // | 55 | // | ||
| 56 | // The result must be freed through [method@Gdk.RGBA.free]. | 56 | // The result must be freed through [method@Gdk.RGBA.free]. | ||
| 57 | func (x *RGBA) Copy() *RGBA { | 57 | func (x *RGBA) Copy() *RGBA { | ||
| 58 | + | core.LazyRegister(&xRGBACopy, "GDK", "gdk_rgba_copy", false) | |||
| 59 | + | ||||
| 58 | cret := xRGBACopy(x.GoPointer()) | 60 | cret := xRGBACopy(x.GoPointer()) | ||
| 59 | if cret == 0 { | 61 | if cret == 0 { | ||
| 60 | return nil | 62 | return nil | ||
| @@ -66,6 +68,8 @@ var xRGBAEqual func(uintptr, uintptr) bool | |||||
| 66 | 68 | ||||
| 67 | // Compares two `GdkRGBA` colors. | 69 | // Compares two `GdkRGBA` colors. | ||
| 68 | func (x *RGBA) Equal(P2Var uintptr) bool { | 70 | func (x *RGBA) Equal(P2Var uintptr) bool { | ||
| 71 | + | core.LazyRegister(&xRGBAEqual, "GDK", "gdk_rgba_equal", false) | |||
| 72 | + | ||||
| 69 | cret := xRGBAEqual(x.GoPointer(), P2Var) | 73 | cret := xRGBAEqual(x.GoPointer(), P2Var) | ||
| 70 | return cret | 74 | return cret | ||
| 71 | } | 75 | } | ||
| @@ -74,6 +78,8 @@ var xRGBAFree func(uintptr) | |||||
| 74 | 78 | ||||
| 75 | // Frees a `GdkRGBA`. | 79 | // Frees a `GdkRGBA`. | ||
| 76 | func (x *RGBA) Free() { | 80 | func (x *RGBA) Free() { | ||
| 81 | + | core.LazyRegister(&xRGBAFree, "GDK", "gdk_rgba_free", false) | |||
| 82 | + | ||||
| 77 | xRGBAFree(x.GoPointer()) | 83 | xRGBAFree(x.GoPointer()) | ||
| 78 | } | 84 | } | ||
| 79 | 85 | ||||
| @@ -82,6 +88,8 @@ var xRGBAHash func(uintptr) uint | |||||
| 82 | // A hash function suitable for using for a hash | 88 | // A hash function suitable for using for a hash | ||
| 83 | // table that stores `GdkRGBA`s. | 89 | // table that stores `GdkRGBA`s. | ||
| 84 | func (x *RGBA) Hash() uint { | 90 | func (x *RGBA) Hash() uint { | ||
| 91 | + | core.LazyRegister(&xRGBAHash, "GDK", "gdk_rgba_hash", false) | |||
| 92 | + | ||||
| 85 | cret := xRGBAHash(x.GoPointer()) | 93 | cret := xRGBAHash(x.GoPointer()) | ||
| 86 | return cret | 94 | return cret | ||
| 87 | } | 95 | } | ||
| @@ -92,6 +100,8 @@ var xRGBAIsClear func(uintptr) bool | |||||
| 92 | // | 100 | // | ||
| 93 | // That is, drawing with the value would not produce any change. | 101 | // That is, drawing with the value would not produce any change. | ||
| 94 | func (x *RGBA) IsClear() bool { | 102 | func (x *RGBA) IsClear() bool { | ||
| 103 | + | core.LazyRegister(&xRGBAIsClear, "GDK", "gdk_rgba_is_clear", false) | |||
| 104 | + | ||||
| 95 | cret := xRGBAIsClear(x.GoPointer()) | 105 | cret := xRGBAIsClear(x.GoPointer()) | ||
| 96 | return cret | 106 | return cret | ||
| 97 | } | 107 | } | ||
| @@ -103,6 +113,8 @@ var xRGBAIsOpaque func(uintptr) bool | |||||
| 103 | // That is, drawing with the value will not retain any results | 113 | // That is, drawing with the value will not retain any results | ||
| 104 | // from previous contents. | 114 | // from previous contents. | ||
| 105 | func (x *RGBA) IsOpaque() bool { | 115 | func (x *RGBA) IsOpaque() bool { | ||
| 116 | + | core.LazyRegister(&xRGBAIsOpaque, "GDK", "gdk_rgba_is_opaque", false) | |||
| 117 | + | ||||
| 106 | cret := xRGBAIsOpaque(x.GoPointer()) | 118 | cret := xRGBAIsOpaque(x.GoPointer()) | ||
| 107 | return cret | 119 | return cret | ||
| 108 | } | 120 | } | ||
| @@ -132,6 +144,8 @@ var xRGBAParse func(uintptr, string) bool | |||||
| 132 | // “s”, “l” can be either numbers in the range 0 to 100 or | 144 | // “s”, “l” can be either numbers in the range 0 to 100 or | ||
| 133 | // percentages. | 145 | // percentages. | ||
| 134 | func (x *RGBA) Parse(SpecVar string) bool { | 146 | func (x *RGBA) Parse(SpecVar string) bool { | ||
| 147 | + | core.LazyRegister(&xRGBAParse, "GDK", "gdk_rgba_parse", false) | |||
| 148 | + | ||||
| 135 | cret := xRGBAParse(x.GoPointer(), SpecVar) | 149 | cret := xRGBAParse(x.GoPointer(), SpecVar) | ||
| 136 | return cret | 150 | return cret | ||
| 137 | } | 151 | } | ||
| @@ -139,6 +153,8 @@ func (x *RGBA) Parse(SpecVar string) bool { | |||||
| 139 | var xRGBAPrint func(uintptr, *glib.String) uintptr | 153 | var xRGBAPrint func(uintptr, *glib.String) uintptr | ||
| 140 | 154 | ||||
| 141 | func (x *RGBA) Print(StringVar *glib.String) *glib.String { | 155 | func (x *RGBA) Print(StringVar *glib.String) *glib.String { | ||
| 156 | + | core.LazyRegister(&xRGBAPrint, "GDK", "gdk_rgba_print", false) | |||
| 157 | + | ||||
| 142 | cret := xRGBAPrint(x.GoPointer(), StringVar) | 158 | cret := xRGBAPrint(x.GoPointer(), StringVar) | ||
| 143 | if cret == 0 { | 159 | if cret == 0 { | ||
| 144 | return nil | 160 | return nil | ||
| @@ -162,6 +178,8 @@ var xRGBAToString func(uintptr) string | |||||
| 162 | // since “r”, “g” and “b” are represented as 8-bit integers. If | 178 | // since “r”, “g” and “b” are represented as 8-bit integers. If | ||
| 163 | // this is a concern, you should use a different representation. | 179 | // this is a concern, you should use a different representation. | ||
| 164 | func (x *RGBA) ToString() string { | 180 | func (x *RGBA) ToString() string { | ||
| 181 | + | core.LazyRegister(&xRGBAToString, "GDK", "gdk_rgba_to_string", false) | |||
| 182 | + | ||||
| 165 | cret := xRGBAToString(x.GoPointer()) | 183 | cret := xRGBAToString(x.GoPointer()) | ||
| 166 | return cret | 184 | return cret | ||
| 167 | } | 185 | } | ||
| @@ -169,24 +187,4 @@ func (x *RGBA) ToString() string { | |||||
| 169 | func init() { | 187 | func init() { | ||
| 170 | core.SetPackageName("GDK", "gtk4") | 188 | core.SetPackageName("GDK", "gtk4") | ||
| 171 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | 189 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | ||
| 172 | - | var libs []uintptr | |||
| 173 | - | for _, libPath := range core.GetPaths("GDK") { | |||
| 174 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 175 | - | if err != nil { | |||
| 176 | - | panic(err) | |||
| 177 | - | } | |||
| 178 | - | libs = append(libs, lib) | |||
| 179 | - | } | |||
| 180 | - | ||||
| 181 | - | core.PuregoSafeRegister(&xRGBAGLibType, libs, "gdk_rgba_get_type") | |||
| 182 | - | ||||
| 183 | - | core.PuregoSafeRegister(&xRGBACopy, libs, "gdk_rgba_copy") | |||
| 184 | - | core.PuregoSafeRegister(&xRGBAEqual, libs, "gdk_rgba_equal") | |||
| 185 | - | core.PuregoSafeRegister(&xRGBAFree, libs, "gdk_rgba_free") | |||
| 186 | - | core.PuregoSafeRegister(&xRGBAHash, libs, "gdk_rgba_hash") | |||
| 187 | - | core.PuregoSafeRegister(&xRGBAIsClear, libs, "gdk_rgba_is_clear") | |||
| 188 | - | core.PuregoSafeRegister(&xRGBAIsOpaque, libs, "gdk_rgba_is_opaque") | |||
| 189 | - | core.PuregoSafeRegister(&xRGBAParse, libs, "gdk_rgba_parse") | |||
| 190 | - | core.PuregoSafeRegister(&xRGBAPrint, libs, "gdk_rgba_print") | |||
| 191 | - | core.PuregoSafeRegister(&xRGBAToString, libs, "gdk_rgba_to_string") | |||
| 192 | } | 190 | } | ||