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
| @@ -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" | |
| @@ -52,6 +51,7 @@ type FrameClockPhase int | |||
| 52 | 51 | var xFrameClockPhaseGLibType func() types.GType | |
| 53 | 52 | ||
| 54 | 53 | func FrameClockPhaseGLibType() types.GType { | |
| 54 | + | core.LazyRegister(&xFrameClockPhaseGLibType, "GDK", "gdk_frame_clock_phase_get_type", false) | |
| 55 | 55 | return xFrameClockPhaseGLibType() | |
| 56 | 56 | } | |
| 57 | 57 | ||
| @@ -114,6 +114,7 @@ type FrameClock struct { | |||
| 114 | 114 | var xFrameClockGLibType func() types.GType | |
| 115 | 115 | ||
| 116 | 116 | func FrameClockGLibType() types.GType { | |
| 117 | + | core.LazyRegister(&xFrameClockGLibType, "GDK", "gdk_frame_clock_get_type", false) | |
| 117 | 118 | return xFrameClockGLibType() | |
| 118 | 119 | } | |
| 119 | 120 | ||
| @@ -133,6 +134,8 @@ var xFrameClockBeginUpdating func(uintptr) | |||
| 133 | 134 | // times and frames will be requested until gdk_frame_clock_end_updating() | |
| 134 | 135 | // is called the same number of times. | |
| 135 | 136 | func (x *FrameClock) BeginUpdating() { | |
| 137 | + | core.LazyRegister(&xFrameClockBeginUpdating, "GDK", "gdk_frame_clock_begin_updating", false) | |
| 138 | + | ||
| 136 | 139 | xFrameClockBeginUpdating(x.GoPointer()) | |
| 137 | 140 | } | |
| 138 | 141 | ||
| @@ -142,6 +145,8 @@ var xFrameClockEndUpdating func(uintptr) | |||
| 142 | 145 | // | |
| 143 | 146 | // See the documentation for [method@Gdk.FrameClock.begin_updating]. | |
| 144 | 147 | func (x *FrameClock) EndUpdating() { | |
| 148 | + | core.LazyRegister(&xFrameClockEndUpdating, "GDK", "gdk_frame_clock_end_updating", false) | |
| 149 | + | ||
| 145 | 150 | xFrameClockEndUpdating(x.GoPointer()) | |
| 146 | 151 | } | |
| 147 | 152 | ||
| @@ -149,6 +154,8 @@ var xFrameClockGetCurrentTimings func(uintptr) uintptr | |||
| 149 | 154 | ||
| 150 | 155 | // Gets the frame timings for the current frame. | |
| 151 | 156 | func (x *FrameClock) GetCurrentTimings() *FrameTimings { | |
| 157 | + | core.LazyRegister(&xFrameClockGetCurrentTimings, "GDK", "gdk_frame_clock_get_current_timings", false) | |
| 158 | + | ||
| 152 | 159 | cret := xFrameClockGetCurrentTimings(x.GoPointer()) | |
| 153 | 160 | if cret == 0 { | |
| 154 | 161 | return nil | |
| @@ -161,6 +168,8 @@ var xFrameClockGetFps func(uintptr) float64 | |||
| 161 | 168 | // Calculates the current frames-per-second, based on the | |
| 162 | 169 | // frame timings of @frame_clock. | |
| 163 | 170 | func (x *FrameClock) GetFps() float64 { | |
| 171 | + | core.LazyRegister(&xFrameClockGetFps, "GDK", "gdk_frame_clock_get_fps", false) | |
| 172 | + | ||
| 164 | 173 | cret := xFrameClockGetFps(x.GoPointer()) | |
| 165 | 174 | return cret | |
| 166 | 175 | } | |
| @@ -170,6 +179,8 @@ var xFrameClockGetFrameCounter func(uintptr) int64 | |||
| 170 | 179 | // `GdkFrameClock` maintains a 64-bit counter that increments for | |
| 171 | 180 | // each frame drawn. | |
| 172 | 181 | func (x *FrameClock) GetFrameCounter() int64 { | |
| 182 | + | core.LazyRegister(&xFrameClockGetFrameCounter, "GDK", "gdk_frame_clock_get_frame_counter", false) | |
| 183 | + | ||
| 173 | 184 | cret := xFrameClockGetFrameCounter(x.GoPointer()) | |
| 174 | 185 | return cret | |
| 175 | 186 | } | |
| @@ -184,6 +195,8 @@ var xFrameClockGetFrameTime func(uintptr) int64 | |||
| 184 | 195 | // the actual previous frame time, or if that’s too old, an updated | |
| 185 | 196 | // time. | |
| 186 | 197 | func (x *FrameClock) GetFrameTime() int64 { | |
| 198 | + | core.LazyRegister(&xFrameClockGetFrameTime, "GDK", "gdk_frame_clock_get_frame_time", false) | |
| 199 | + | ||
| 187 | 200 | cret := xFrameClockGetFrameTime(x.GoPointer()) | |
| 188 | 201 | return cret | |
| 189 | 202 | } | |
| @@ -199,6 +212,8 @@ var xFrameClockGetHistoryStart func(uintptr) int64 | |||
| 199 | 212 | // [method@Gdk.FrameClock.get_history_start] and | |
| 200 | 213 | // [method@Gdk.FrameClock.get_frame_counter], inclusive. | |
| 201 | 214 | func (x *FrameClock) GetHistoryStart() int64 { | |
| 215 | + | core.LazyRegister(&xFrameClockGetHistoryStart, "GDK", "gdk_frame_clock_get_history_start", false) | |
| 216 | + | ||
| 202 | 217 | cret := xFrameClockGetHistoryStart(x.GoPointer()) | |
| 203 | 218 | return cret | |
| 204 | 219 | } | |
| @@ -213,6 +228,8 @@ var xFrameClockGetRefreshInfo func(uintptr, int64, *int64, *int64) | |||
| 213 | 228 | // predicts a presentation time that is a multiple of the refresh | |
| 214 | 229 | // interval after the last presentation time, and later than @base_time. | |
| 215 | 230 | func (x *FrameClock) GetRefreshInfo(BaseTimeVar int64, RefreshIntervalReturnVar *int64, PresentationTimeReturnVar *int64) { | |
| 231 | + | core.LazyRegister(&xFrameClockGetRefreshInfo, "GDK", "gdk_frame_clock_get_refresh_info", false) | |
| 232 | + | ||
| 216 | 233 | xFrameClockGetRefreshInfo(x.GoPointer(), BaseTimeVar, RefreshIntervalReturnVar, PresentationTimeReturnVar) | |
| 217 | 234 | } | |
| 218 | 235 | ||
| @@ -225,6 +242,8 @@ var xFrameClockGetTimings func(uintptr, int64) uintptr | |||
| 225 | 242 | // [method@Gdk.FrameTimings.get_complete] and | |
| 226 | 243 | // [method@Gdk.FrameClock.get_history_start]. | |
| 227 | 244 | func (x *FrameClock) GetTimings(FrameCounterVar int64) *FrameTimings { | |
| 245 | + | core.LazyRegister(&xFrameClockGetTimings, "GDK", "gdk_frame_clock_get_timings", false) | |
| 246 | + | ||
| 228 | 247 | cret := xFrameClockGetTimings(x.GoPointer(), FrameCounterVar) | |
| 229 | 248 | if cret == 0 { | |
| 230 | 249 | return nil | |
| @@ -246,6 +265,8 @@ var xFrameClockRequestPhase func(uintptr, FrameClockPhase) | |||
| 246 | 265 | // since this allows GTK to adjust system parameters to get maximally | |
| 247 | 266 | // smooth animations. | |
| 248 | 267 | func (x *FrameClock) RequestPhase(PhaseVar FrameClockPhase) { | |
| 268 | + | core.LazyRegister(&xFrameClockRequestPhase, "GDK", "gdk_frame_clock_request_phase", false) | |
| 269 | + | ||
| 249 | 270 | xFrameClockRequestPhase(x.GoPointer(), PhaseVar) | |
| 250 | 271 | } | |
| 251 | 272 | ||
| @@ -450,27 +471,4 @@ func (x *FrameClock) ConnectUpdate(cb *func(FrameClock)) uint { | |||
| 450 | 471 | func init() { | |
| 451 | 472 | core.SetPackageName("GDK", "gtk4") | |
| 452 | 473 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | |
| 453 | - | var libs []uintptr | |
| 454 | - | for _, libPath := range core.GetPaths("GDK") { | |
| 455 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 456 | - | if err != nil { | |
| 457 | - | panic(err) | |
| 458 | - | } | |
| 459 | - | libs = append(libs, lib) | |
| 460 | - | } | |
| 461 | - | ||
| 462 | - | core.PuregoSafeRegister(&xFrameClockPhaseGLibType, libs, "gdk_frame_clock_phase_get_type") | |
| 463 | - | ||
| 464 | - | core.PuregoSafeRegister(&xFrameClockGLibType, libs, "gdk_frame_clock_get_type") | |
| 465 | - | ||
| 466 | - | core.PuregoSafeRegister(&xFrameClockBeginUpdating, libs, "gdk_frame_clock_begin_updating") | |
| 467 | - | core.PuregoSafeRegister(&xFrameClockEndUpdating, libs, "gdk_frame_clock_end_updating") | |
| 468 | - | core.PuregoSafeRegister(&xFrameClockGetCurrentTimings, libs, "gdk_frame_clock_get_current_timings") | |
| 469 | - | core.PuregoSafeRegister(&xFrameClockGetFps, libs, "gdk_frame_clock_get_fps") | |
| 470 | - | core.PuregoSafeRegister(&xFrameClockGetFrameCounter, libs, "gdk_frame_clock_get_frame_counter") | |
| 471 | - | core.PuregoSafeRegister(&xFrameClockGetFrameTime, libs, "gdk_frame_clock_get_frame_time") | |
| 472 | - | core.PuregoSafeRegister(&xFrameClockGetHistoryStart, libs, "gdk_frame_clock_get_history_start") | |
| 473 | - | core.PuregoSafeRegister(&xFrameClockGetRefreshInfo, libs, "gdk_frame_clock_get_refresh_info") | |
| 474 | - | core.PuregoSafeRegister(&xFrameClockGetTimings, libs, "gdk_frame_clock_get_timings") | |
| 475 | - | core.PuregoSafeRegister(&xFrameClockRequestPhase, libs, "gdk_frame_clock_request_phase") | |
| 476 | 474 | } | |
| @@ -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" | 10 | "github.com/bnema/puregotk/v4/gobject" | ||
| @@ -52,6 +51,7 @@ type FrameClockPhase int | |||||
| 52 | var xFrameClockPhaseGLibType func() types.GType | 51 | var xFrameClockPhaseGLibType func() types.GType | ||
| 53 | 52 | ||||
| 54 | func FrameClockPhaseGLibType() types.GType { | 53 | func FrameClockPhaseGLibType() types.GType { | ||
| 54 | + | core.LazyRegister(&xFrameClockPhaseGLibType, "GDK", "gdk_frame_clock_phase_get_type", false) | |||
| 55 | return xFrameClockPhaseGLibType() | 55 | return xFrameClockPhaseGLibType() | ||
| 56 | } | 56 | } | ||
| 57 | 57 | ||||
| @@ -114,6 +114,7 @@ type FrameClock struct { | |||||
| 114 | var xFrameClockGLibType func() types.GType | 114 | var xFrameClockGLibType func() types.GType | ||
| 115 | 115 | ||||
| 116 | func FrameClockGLibType() types.GType { | 116 | func FrameClockGLibType() types.GType { | ||
| 117 | + | core.LazyRegister(&xFrameClockGLibType, "GDK", "gdk_frame_clock_get_type", false) | |||
| 117 | return xFrameClockGLibType() | 118 | return xFrameClockGLibType() | ||
| 118 | } | 119 | } | ||
| 119 | 120 | ||||
| @@ -133,6 +134,8 @@ var xFrameClockBeginUpdating func(uintptr) | |||||
| 133 | // times and frames will be requested until gdk_frame_clock_end_updating() | 134 | // times and frames will be requested until gdk_frame_clock_end_updating() | ||
| 134 | // is called the same number of times. | 135 | // is called the same number of times. | ||
| 135 | func (x *FrameClock) BeginUpdating() { | 136 | func (x *FrameClock) BeginUpdating() { | ||
| 137 | + | core.LazyRegister(&xFrameClockBeginUpdating, "GDK", "gdk_frame_clock_begin_updating", false) | |||
| 138 | + | ||||
| 136 | xFrameClockBeginUpdating(x.GoPointer()) | 139 | xFrameClockBeginUpdating(x.GoPointer()) | ||
| 137 | } | 140 | } | ||
| 138 | 141 | ||||
| @@ -142,6 +145,8 @@ var xFrameClockEndUpdating func(uintptr) | |||||
| 142 | // | 145 | // | ||
| 143 | // See the documentation for [method@Gdk.FrameClock.begin_updating]. | 146 | // See the documentation for [method@Gdk.FrameClock.begin_updating]. | ||
| 144 | func (x *FrameClock) EndUpdating() { | 147 | func (x *FrameClock) EndUpdating() { | ||
| 148 | + | core.LazyRegister(&xFrameClockEndUpdating, "GDK", "gdk_frame_clock_end_updating", false) | |||
| 149 | + | ||||
| 145 | xFrameClockEndUpdating(x.GoPointer()) | 150 | xFrameClockEndUpdating(x.GoPointer()) | ||
| 146 | } | 151 | } | ||
| 147 | 152 | ||||
| @@ -149,6 +154,8 @@ var xFrameClockGetCurrentTimings func(uintptr) uintptr | |||||
| 149 | 154 | ||||
| 150 | // Gets the frame timings for the current frame. | 155 | // Gets the frame timings for the current frame. | ||
| 151 | func (x *FrameClock) GetCurrentTimings() *FrameTimings { | 156 | func (x *FrameClock) GetCurrentTimings() *FrameTimings { | ||
| 157 | + | core.LazyRegister(&xFrameClockGetCurrentTimings, "GDK", "gdk_frame_clock_get_current_timings", false) | |||
| 158 | + | ||||
| 152 | cret := xFrameClockGetCurrentTimings(x.GoPointer()) | 159 | cret := xFrameClockGetCurrentTimings(x.GoPointer()) | ||
| 153 | if cret == 0 { | 160 | if cret == 0 { | ||
| 154 | return nil | 161 | return nil | ||
| @@ -161,6 +168,8 @@ var xFrameClockGetFps func(uintptr) float64 | |||||
| 161 | // Calculates the current frames-per-second, based on the | 168 | // Calculates the current frames-per-second, based on the | ||
| 162 | // frame timings of @frame_clock. | 169 | // frame timings of @frame_clock. | ||
| 163 | func (x *FrameClock) GetFps() float64 { | 170 | func (x *FrameClock) GetFps() float64 { | ||
| 171 | + | core.LazyRegister(&xFrameClockGetFps, "GDK", "gdk_frame_clock_get_fps", false) | |||
| 172 | + | ||||
| 164 | cret := xFrameClockGetFps(x.GoPointer()) | 173 | cret := xFrameClockGetFps(x.GoPointer()) | ||
| 165 | return cret | 174 | return cret | ||
| 166 | } | 175 | } | ||
| @@ -170,6 +179,8 @@ var xFrameClockGetFrameCounter func(uintptr) int64 | |||||
| 170 | // `GdkFrameClock` maintains a 64-bit counter that increments for | 179 | // `GdkFrameClock` maintains a 64-bit counter that increments for | ||
| 171 | // each frame drawn. | 180 | // each frame drawn. | ||
| 172 | func (x *FrameClock) GetFrameCounter() int64 { | 181 | func (x *FrameClock) GetFrameCounter() int64 { | ||
| 182 | + | core.LazyRegister(&xFrameClockGetFrameCounter, "GDK", "gdk_frame_clock_get_frame_counter", false) | |||
| 183 | + | ||||
| 173 | cret := xFrameClockGetFrameCounter(x.GoPointer()) | 184 | cret := xFrameClockGetFrameCounter(x.GoPointer()) | ||
| 174 | return cret | 185 | return cret | ||
| 175 | } | 186 | } | ||
| @@ -184,6 +195,8 @@ var xFrameClockGetFrameTime func(uintptr) int64 | |||||
| 184 | // the actual previous frame time, or if that’s too old, an updated | 195 | // the actual previous frame time, or if that’s too old, an updated | ||
| 185 | // time. | 196 | // time. | ||
| 186 | func (x *FrameClock) GetFrameTime() int64 { | 197 | func (x *FrameClock) GetFrameTime() int64 { | ||
| 198 | + | core.LazyRegister(&xFrameClockGetFrameTime, "GDK", "gdk_frame_clock_get_frame_time", false) | |||
| 199 | + | ||||
| 187 | cret := xFrameClockGetFrameTime(x.GoPointer()) | 200 | cret := xFrameClockGetFrameTime(x.GoPointer()) | ||
| 188 | return cret | 201 | return cret | ||
| 189 | } | 202 | } | ||
| @@ -199,6 +212,8 @@ var xFrameClockGetHistoryStart func(uintptr) int64 | |||||
| 199 | // [method@Gdk.FrameClock.get_history_start] and | 212 | // [method@Gdk.FrameClock.get_history_start] and | ||
| 200 | // [method@Gdk.FrameClock.get_frame_counter], inclusive. | 213 | // [method@Gdk.FrameClock.get_frame_counter], inclusive. | ||
| 201 | func (x *FrameClock) GetHistoryStart() int64 { | 214 | func (x *FrameClock) GetHistoryStart() int64 { | ||
| 215 | + | core.LazyRegister(&xFrameClockGetHistoryStart, "GDK", "gdk_frame_clock_get_history_start", false) | |||
| 216 | + | ||||
| 202 | cret := xFrameClockGetHistoryStart(x.GoPointer()) | 217 | cret := xFrameClockGetHistoryStart(x.GoPointer()) | ||
| 203 | return cret | 218 | return cret | ||
| 204 | } | 219 | } | ||
| @@ -213,6 +228,8 @@ var xFrameClockGetRefreshInfo func(uintptr, int64, *int64, *int64) | |||||
| 213 | // predicts a presentation time that is a multiple of the refresh | 228 | // predicts a presentation time that is a multiple of the refresh | ||
| 214 | // interval after the last presentation time, and later than @base_time. | 229 | // interval after the last presentation time, and later than @base_time. | ||
| 215 | func (x *FrameClock) GetRefreshInfo(BaseTimeVar int64, RefreshIntervalReturnVar *int64, PresentationTimeReturnVar *int64) { | 230 | func (x *FrameClock) GetRefreshInfo(BaseTimeVar int64, RefreshIntervalReturnVar *int64, PresentationTimeReturnVar *int64) { | ||
| 231 | + | core.LazyRegister(&xFrameClockGetRefreshInfo, "GDK", "gdk_frame_clock_get_refresh_info", false) | |||
| 232 | + | ||||
| 216 | xFrameClockGetRefreshInfo(x.GoPointer(), BaseTimeVar, RefreshIntervalReturnVar, PresentationTimeReturnVar) | 233 | xFrameClockGetRefreshInfo(x.GoPointer(), BaseTimeVar, RefreshIntervalReturnVar, PresentationTimeReturnVar) | ||
| 217 | } | 234 | } | ||
| 218 | 235 | ||||
| @@ -225,6 +242,8 @@ var xFrameClockGetTimings func(uintptr, int64) uintptr | |||||
| 225 | // [method@Gdk.FrameTimings.get_complete] and | 242 | // [method@Gdk.FrameTimings.get_complete] and | ||
| 226 | // [method@Gdk.FrameClock.get_history_start]. | 243 | // [method@Gdk.FrameClock.get_history_start]. | ||
| 227 | func (x *FrameClock) GetTimings(FrameCounterVar int64) *FrameTimings { | 244 | func (x *FrameClock) GetTimings(FrameCounterVar int64) *FrameTimings { | ||
| 245 | + | core.LazyRegister(&xFrameClockGetTimings, "GDK", "gdk_frame_clock_get_timings", false) | |||
| 246 | + | ||||
| 228 | cret := xFrameClockGetTimings(x.GoPointer(), FrameCounterVar) | 247 | cret := xFrameClockGetTimings(x.GoPointer(), FrameCounterVar) | ||
| 229 | if cret == 0 { | 248 | if cret == 0 { | ||
| 230 | return nil | 249 | return nil | ||
| @@ -246,6 +265,8 @@ var xFrameClockRequestPhase func(uintptr, FrameClockPhase) | |||||
| 246 | // since this allows GTK to adjust system parameters to get maximally | 265 | // since this allows GTK to adjust system parameters to get maximally | ||
| 247 | // smooth animations. | 266 | // smooth animations. | ||
| 248 | func (x *FrameClock) RequestPhase(PhaseVar FrameClockPhase) { | 267 | func (x *FrameClock) RequestPhase(PhaseVar FrameClockPhase) { | ||
| 268 | + | core.LazyRegister(&xFrameClockRequestPhase, "GDK", "gdk_frame_clock_request_phase", false) | |||
| 269 | + | ||||
| 249 | xFrameClockRequestPhase(x.GoPointer(), PhaseVar) | 270 | xFrameClockRequestPhase(x.GoPointer(), PhaseVar) | ||
| 250 | } | 271 | } | ||
| 251 | 272 | ||||
| @@ -450,27 +471,4 @@ func (x *FrameClock) ConnectUpdate(cb *func(FrameClock)) uint { | |||||
| 450 | func init() { | 471 | func init() { | ||
| 451 | core.SetPackageName("GDK", "gtk4") | 472 | core.SetPackageName("GDK", "gtk4") | ||
| 452 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | 473 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | ||
| 453 | - | var libs []uintptr | |||
| 454 | - | for _, libPath := range core.GetPaths("GDK") { | |||
| 455 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 456 | - | if err != nil { | |||
| 457 | - | panic(err) | |||
| 458 | - | } | |||
| 459 | - | libs = append(libs, lib) | |||
| 460 | - | } | |||
| 461 | - | ||||
| 462 | - | core.PuregoSafeRegister(&xFrameClockPhaseGLibType, libs, "gdk_frame_clock_phase_get_type") | |||
| 463 | - | ||||
| 464 | - | core.PuregoSafeRegister(&xFrameClockGLibType, libs, "gdk_frame_clock_get_type") | |||
| 465 | - | ||||
| 466 | - | core.PuregoSafeRegister(&xFrameClockBeginUpdating, libs, "gdk_frame_clock_begin_updating") | |||
| 467 | - | core.PuregoSafeRegister(&xFrameClockEndUpdating, libs, "gdk_frame_clock_end_updating") | |||
| 468 | - | core.PuregoSafeRegister(&xFrameClockGetCurrentTimings, libs, "gdk_frame_clock_get_current_timings") | |||
| 469 | - | core.PuregoSafeRegister(&xFrameClockGetFps, libs, "gdk_frame_clock_get_fps") | |||
| 470 | - | core.PuregoSafeRegister(&xFrameClockGetFrameCounter, libs, "gdk_frame_clock_get_frame_counter") | |||
| 471 | - | core.PuregoSafeRegister(&xFrameClockGetFrameTime, libs, "gdk_frame_clock_get_frame_time") | |||
| 472 | - | core.PuregoSafeRegister(&xFrameClockGetHistoryStart, libs, "gdk_frame_clock_get_history_start") | |||
| 473 | - | core.PuregoSafeRegister(&xFrameClockGetRefreshInfo, libs, "gdk_frame_clock_get_refresh_info") | |||
| 474 | - | core.PuregoSafeRegister(&xFrameClockGetTimings, libs, "gdk_frame_clock_get_timings") | |||
| 475 | - | core.PuregoSafeRegister(&xFrameClockRequestPhase, libs, "gdk_frame_clock_request_phase") | |||
| 476 | } | 474 | } | ||