Revert "chore(deps): pin puregotk nil-signal fix"
This reverts commit a161e348e2093172038390b0906448f0ae979a0d.
- commit
- 40378d5e4fd2372d054e49168ab2a6f67aedd0fd
- author
- brice · · 2026-07-14 17:59 UTC
- parent
- 8d647bb
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
905 files · +25263 -27842
M go.mod +1 -1
| @@ -11,7 +11,7 @@ require ( | |||
| 11 | 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | |
| 12 | 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | |
| 13 | 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | |
| 14 | - | github.com/bnema/puregotk v0.7.1-0.20260714170452-0b6b9b901234 | |
| 14 | + | github.com/bnema/puregotk v0.7.0 | |
| 15 | 15 | github.com/charmbracelet/bubbles v1.0.0 | |
| 16 | 16 | github.com/charmbracelet/bubbletea v1.3.10 | |
| 17 | 17 | github.com/charmbracelet/lipgloss v1.1.0 | |
| @@ -11,7 +11,7 @@ require ( | |||||
| 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | ||
| 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | ||
| 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | ||
| 14 | - | github.com/bnema/puregotk v0.7.1-0.20260714170452-0b6b9b901234 | 14 | + | github.com/bnema/puregotk v0.7.0 |
| 15 | github.com/charmbracelet/bubbles v1.0.0 | 15 | github.com/charmbracelet/bubbles v1.0.0 | ||
| 16 | github.com/charmbracelet/bubbletea v1.3.10 | 16 | github.com/charmbracelet/bubbletea v1.3.10 | ||
| 17 | github.com/charmbracelet/lipgloss v1.1.0 | 17 | github.com/charmbracelet/lipgloss v1.1.0 | ||
M go.sum +0 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/internal/core/core.go +4 -197 generated file: collapsed
M vendor/github.com/bnema/puregotk/pkg/core/core.go +0 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-dialog.go +64 -99 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-window.go +62 -95 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-accent-color.go +15 -7 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-action-row.go +29 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-alert-dialog.go +47 -66 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-target.go +27 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-util.go +12 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation.go +26 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application-window.go +22 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application.go +15 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-avatar.go +25 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-banner.go +26 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bin.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bottom-sheet.go +38 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint-bin.go +19 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint.go +37 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-content.go +22 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-row.go +18 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-dots.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-lines.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel.go +37 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-layout.go +20 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-scrollable.go +22 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp.go +22 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-combo-row.go +33 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-dialog.go +38 -45 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-easing.go +13 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-entry-row.go +33 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-enum-list-model.go +22 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-expander-row.go +33 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-flap.go +48 -61 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-fold-threshold-policy.go +1 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-header-bar.go +33 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-inline-view-switcher.go +24 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout-slot.go +15 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout.go +17 -7 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-leaflet.go +56 -69 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-length-unit.go +14 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-main.go +15 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-message-dialog.go +44 -63 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-multi-layout-view.go +23 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-direction.go +1 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-split-view.go +32 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-view.go +49 -60 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-overlay-split-view.go +38 -48 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-password-entry-row.go +13 -2 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-dialog.go +25 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-group.go +26 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-page.go +33 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-row.go +22 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-window.go +29 -31 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcut-label.go +18 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-dialog.go +15 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-item.go +25 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-section.go +17 -8 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar-item.go +37 -45 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar-section.go +27 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar.go +39 -41 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spin-row.go +34 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spinner-paintable.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spinner.go +13 -2 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-split-button.go +34 -39 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spring-animation.go +30 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spring-params.go +21 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-squeezer.go +44 -49 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-status-page.go +24 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-style-manager.go +28 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-swipe-tracker.go +30 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-swipeable.go +21 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-switch-row.go +16 -6 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-bar.go +32 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-button.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-overview.go +37 -45 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-view.go +87 -123 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-timed-animation.go +28 -30 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toast-overlay.go +18 -9 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toast.go +36 -41 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toggle-group.go +51 -64 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toolbar-view.go +35 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-version.go +16 -7 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-stack.go +62 -78 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-bar.go +18 -9 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-sidebar.go +22 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-title.go +23 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher.go +20 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-window-title.go +18 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-window.go +22 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-wrap-box.go +46 -66 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-wrap-layout.go +46 -57 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/cairo/main.go +79 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkapplaunchcontext.go +17 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcairo.go +16 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcairocontext.go +13 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcicpparams.go +25 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkclipboard.go +32 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcolorstate.go +16 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentdeserializer.go +27 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentformats.go +31 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentprovider.go +28 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentserializer.go +27 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcursor.go +21 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdevice.go +33 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdevicepad.go +22 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdevicetool.go +18 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdisplay.go +43 -51 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdisplaymanager.go +20 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdmabuftexture.go +13 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdmabuftexturebuilder.go +41 -53 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdrag.go +28 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdragsurface.go +14 -6 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdragsurfacesize.go +13 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdrawcontext.go +18 -11 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdrop.go +24 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkenums.go +1 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkevents.go +118 -120 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkframeclock.go +24 -22
| @@ -5,6 +5,7 @@ import ( | |||
| 5 | 5 | "structs" | |
| 6 | 6 | "unsafe" | |
| 7 | 7 | ||
| 8 | + | "github.com/bnema/purego" | |
| 8 | 9 | "github.com/bnema/puregotk/pkg/core" | |
| 9 | 10 | "github.com/bnema/puregotk/v4/glib" | |
| 10 | 11 | "github.com/bnema/puregotk/v4/gobject" | |
| @@ -51,7 +52,6 @@ type FrameClockPhase int | |||
| 51 | 52 | var xFrameClockPhaseGLibType func() types.GType | |
| 52 | 53 | ||
| 53 | 54 | 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,7 +114,6 @@ 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) | |
| 118 | 117 | return xFrameClockGLibType() | |
| 119 | 118 | } | |
| 120 | 119 | ||
| @@ -134,8 +133,6 @@ var xFrameClockBeginUpdating func(uintptr) | |||
| 134 | 133 | // times and frames will be requested until gdk_frame_clock_end_updating() | |
| 135 | 134 | // is called the same number of times. | |
| 136 | 135 | func (x *FrameClock) BeginUpdating() { | |
| 137 | - | core.LazyRegister(&xFrameClockBeginUpdating, "GDK", "gdk_frame_clock_begin_updating", false) | |
| 138 | - | ||
| 139 | 136 | xFrameClockBeginUpdating(x.GoPointer()) | |
| 140 | 137 | } | |
| 141 | 138 | ||
| @@ -145,8 +142,6 @@ var xFrameClockEndUpdating func(uintptr) | |||
| 145 | 142 | // | |
| 146 | 143 | // See the documentation for [method@Gdk.FrameClock.begin_updating]. | |
| 147 | 144 | func (x *FrameClock) EndUpdating() { | |
| 148 | - | core.LazyRegister(&xFrameClockEndUpdating, "GDK", "gdk_frame_clock_end_updating", false) | |
| 149 | - | ||
| 150 | 145 | xFrameClockEndUpdating(x.GoPointer()) | |
| 151 | 146 | } | |
| 152 | 147 | ||
| @@ -154,8 +149,6 @@ var xFrameClockGetCurrentTimings func(uintptr) uintptr | |||
| 154 | 149 | ||
| 155 | 150 | // Gets the frame timings for the current frame. | |
| 156 | 151 | func (x *FrameClock) GetCurrentTimings() *FrameTimings { | |
| 157 | - | core.LazyRegister(&xFrameClockGetCurrentTimings, "GDK", "gdk_frame_clock_get_current_timings", false) | |
| 158 | - | ||
| 159 | 152 | cret := xFrameClockGetCurrentTimings(x.GoPointer()) | |
| 160 | 153 | if cret == 0 { | |
| 161 | 154 | return nil | |
| @@ -168,8 +161,6 @@ var xFrameClockGetFps func(uintptr) float64 | |||
| 168 | 161 | // Calculates the current frames-per-second, based on the | |
| 169 | 162 | // frame timings of @frame_clock. | |
| 170 | 163 | func (x *FrameClock) GetFps() float64 { | |
| 171 | - | core.LazyRegister(&xFrameClockGetFps, "GDK", "gdk_frame_clock_get_fps", false) | |
| 172 | - | ||
| 173 | 164 | cret := xFrameClockGetFps(x.GoPointer()) | |
| 174 | 165 | return cret | |
| 175 | 166 | } | |
| @@ -179,8 +170,6 @@ var xFrameClockGetFrameCounter func(uintptr) int64 | |||
| 179 | 170 | // `GdkFrameClock` maintains a 64-bit counter that increments for | |
| 180 | 171 | // each frame drawn. | |
| 181 | 172 | func (x *FrameClock) GetFrameCounter() int64 { | |
| 182 | - | core.LazyRegister(&xFrameClockGetFrameCounter, "GDK", "gdk_frame_clock_get_frame_counter", false) | |
| 183 | - | ||
| 184 | 173 | cret := xFrameClockGetFrameCounter(x.GoPointer()) | |
| 185 | 174 | return cret | |
| 186 | 175 | } | |
| @@ -195,8 +184,6 @@ var xFrameClockGetFrameTime func(uintptr) int64 | |||
| 195 | 184 | // the actual previous frame time, or if that’s too old, an updated | |
| 196 | 185 | // time. | |
| 197 | 186 | func (x *FrameClock) GetFrameTime() int64 { | |
| 198 | - | core.LazyRegister(&xFrameClockGetFrameTime, "GDK", "gdk_frame_clock_get_frame_time", false) | |
| 199 | - | ||
| 200 | 187 | cret := xFrameClockGetFrameTime(x.GoPointer()) | |
| 201 | 188 | return cret | |
| 202 | 189 | } | |
| @@ -212,8 +199,6 @@ var xFrameClockGetHistoryStart func(uintptr) int64 | |||
| 212 | 199 | // [method@Gdk.FrameClock.get_history_start] and | |
| 213 | 200 | // [method@Gdk.FrameClock.get_frame_counter], inclusive. | |
| 214 | 201 | func (x *FrameClock) GetHistoryStart() int64 { | |
| 215 | - | core.LazyRegister(&xFrameClockGetHistoryStart, "GDK", "gdk_frame_clock_get_history_start", false) | |
| 216 | - | ||
| 217 | 202 | cret := xFrameClockGetHistoryStart(x.GoPointer()) | |
| 218 | 203 | return cret | |
| 219 | 204 | } | |
| @@ -228,8 +213,6 @@ var xFrameClockGetRefreshInfo func(uintptr, int64, *int64, *int64) | |||
| 228 | 213 | // predicts a presentation time that is a multiple of the refresh | |
| 229 | 214 | // interval after the last presentation time, and later than @base_time. | |
| 230 | 215 | func (x *FrameClock) GetRefreshInfo(BaseTimeVar int64, RefreshIntervalReturnVar *int64, PresentationTimeReturnVar *int64) { | |
| 231 | - | core.LazyRegister(&xFrameClockGetRefreshInfo, "GDK", "gdk_frame_clock_get_refresh_info", false) | |
| 232 | - | ||
| 233 | 216 | xFrameClockGetRefreshInfo(x.GoPointer(), BaseTimeVar, RefreshIntervalReturnVar, PresentationTimeReturnVar) | |
| 234 | 217 | } | |
| 235 | 218 | ||
| @@ -242,8 +225,6 @@ var xFrameClockGetTimings func(uintptr, int64) uintptr | |||
| 242 | 225 | // [method@Gdk.FrameTimings.get_complete] and | |
| 243 | 226 | // [method@Gdk.FrameClock.get_history_start]. | |
| 244 | 227 | func (x *FrameClock) GetTimings(FrameCounterVar int64) *FrameTimings { | |
| 245 | - | core.LazyRegister(&xFrameClockGetTimings, "GDK", "gdk_frame_clock_get_timings", false) | |
| 246 | - | ||
| 247 | 228 | cret := xFrameClockGetTimings(x.GoPointer(), FrameCounterVar) | |
| 248 | 229 | if cret == 0 { | |
| 249 | 230 | return nil | |
| @@ -265,8 +246,6 @@ var xFrameClockRequestPhase func(uintptr, FrameClockPhase) | |||
| 265 | 246 | // since this allows GTK to adjust system parameters to get maximally | |
| 266 | 247 | // smooth animations. | |
| 267 | 248 | func (x *FrameClock) RequestPhase(PhaseVar FrameClockPhase) { | |
| 268 | - | core.LazyRegister(&xFrameClockRequestPhase, "GDK", "gdk_frame_clock_request_phase", false) | |
| 269 | - | ||
| 270 | 249 | xFrameClockRequestPhase(x.GoPointer(), PhaseVar) | |
| 271 | 250 | } | |
| 272 | 251 | ||
| @@ -471,4 +450,27 @@ func (x *FrameClock) ConnectUpdate(cb *func(FrameClock)) uint { | |||
| 471 | 450 | func init() { | |
| 472 | 451 | core.SetPackageName("GDK", "gtk4") | |
| 473 | 452 | 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") | |
| 474 | 476 | } | |
| @@ -5,6 +5,7 @@ import ( | |||||
| 5 | "structs" | 5 | "structs" | ||
| 6 | "unsafe" | 6 | "unsafe" | ||
| 7 | 7 | ||||
| 8 | + | "github.com/bnema/purego" | |||
| 8 | "github.com/bnema/puregotk/pkg/core" | 9 | "github.com/bnema/puregotk/pkg/core" | ||
| 9 | "github.com/bnema/puregotk/v4/glib" | 10 | "github.com/bnema/puregotk/v4/glib" | ||
| 10 | "github.com/bnema/puregotk/v4/gobject" | 11 | "github.com/bnema/puregotk/v4/gobject" | ||
| @@ -51,7 +52,6 @@ type FrameClockPhase int | |||||
| 51 | var xFrameClockPhaseGLibType func() types.GType | 52 | var xFrameClockPhaseGLibType func() types.GType | ||
| 52 | 53 | ||||
| 53 | func FrameClockPhaseGLibType() types.GType { | 54 | 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,7 +114,6 @@ 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) | |||
| 118 | return xFrameClockGLibType() | 117 | return xFrameClockGLibType() | ||
| 119 | } | 118 | } | ||
| 120 | 119 | ||||
| @@ -134,8 +133,6 @@ var xFrameClockBeginUpdating func(uintptr) | |||||
| 134 | // times and frames will be requested until gdk_frame_clock_end_updating() | 133 | // times and frames will be requested until gdk_frame_clock_end_updating() | ||
| 135 | // is called the same number of times. | 134 | // is called the same number of times. | ||
| 136 | func (x *FrameClock) BeginUpdating() { | 135 | func (x *FrameClock) BeginUpdating() { | ||
| 137 | - | core.LazyRegister(&xFrameClockBeginUpdating, "GDK", "gdk_frame_clock_begin_updating", false) | |||
| 138 | - | ||||
| 139 | xFrameClockBeginUpdating(x.GoPointer()) | 136 | xFrameClockBeginUpdating(x.GoPointer()) | ||
| 140 | } | 137 | } | ||
| 141 | 138 | ||||
| @@ -145,8 +142,6 @@ var xFrameClockEndUpdating func(uintptr) | |||||
| 145 | // | 142 | // | ||
| 146 | // See the documentation for [method@Gdk.FrameClock.begin_updating]. | 143 | // See the documentation for [method@Gdk.FrameClock.begin_updating]. | ||
| 147 | func (x *FrameClock) EndUpdating() { | 144 | func (x *FrameClock) EndUpdating() { | ||
| 148 | - | core.LazyRegister(&xFrameClockEndUpdating, "GDK", "gdk_frame_clock_end_updating", false) | |||
| 149 | - | ||||
| 150 | xFrameClockEndUpdating(x.GoPointer()) | 145 | xFrameClockEndUpdating(x.GoPointer()) | ||
| 151 | } | 146 | } | ||
| 152 | 147 | ||||
| @@ -154,8 +149,6 @@ var xFrameClockGetCurrentTimings func(uintptr) uintptr | |||||
| 154 | 149 | ||||
| 155 | // Gets the frame timings for the current frame. | 150 | // Gets the frame timings for the current frame. | ||
| 156 | func (x *FrameClock) GetCurrentTimings() *FrameTimings { | 151 | func (x *FrameClock) GetCurrentTimings() *FrameTimings { | ||
| 157 | - | core.LazyRegister(&xFrameClockGetCurrentTimings, "GDK", "gdk_frame_clock_get_current_timings", false) | |||
| 158 | - | ||||
| 159 | cret := xFrameClockGetCurrentTimings(x.GoPointer()) | 152 | cret := xFrameClockGetCurrentTimings(x.GoPointer()) | ||
| 160 | if cret == 0 { | 153 | if cret == 0 { | ||
| 161 | return nil | 154 | return nil | ||
| @@ -168,8 +161,6 @@ var xFrameClockGetFps func(uintptr) float64 | |||||
| 168 | // Calculates the current frames-per-second, based on the | 161 | // Calculates the current frames-per-second, based on the | ||
| 169 | // frame timings of @frame_clock. | 162 | // frame timings of @frame_clock. | ||
| 170 | func (x *FrameClock) GetFps() float64 { | 163 | func (x *FrameClock) GetFps() float64 { | ||
| 171 | - | core.LazyRegister(&xFrameClockGetFps, "GDK", "gdk_frame_clock_get_fps", false) | |||
| 172 | - | ||||
| 173 | cret := xFrameClockGetFps(x.GoPointer()) | 164 | cret := xFrameClockGetFps(x.GoPointer()) | ||
| 174 | return cret | 165 | return cret | ||
| 175 | } | 166 | } | ||
| @@ -179,8 +170,6 @@ var xFrameClockGetFrameCounter func(uintptr) int64 | |||||
| 179 | // `GdkFrameClock` maintains a 64-bit counter that increments for | 170 | // `GdkFrameClock` maintains a 64-bit counter that increments for | ||
| 180 | // each frame drawn. | 171 | // each frame drawn. | ||
| 181 | func (x *FrameClock) GetFrameCounter() int64 { | 172 | func (x *FrameClock) GetFrameCounter() int64 { | ||
| 182 | - | core.LazyRegister(&xFrameClockGetFrameCounter, "GDK", "gdk_frame_clock_get_frame_counter", false) | |||
| 183 | - | ||||
| 184 | cret := xFrameClockGetFrameCounter(x.GoPointer()) | 173 | cret := xFrameClockGetFrameCounter(x.GoPointer()) | ||
| 185 | return cret | 174 | return cret | ||
| 186 | } | 175 | } | ||
| @@ -195,8 +184,6 @@ var xFrameClockGetFrameTime func(uintptr) int64 | |||||
| 195 | // the actual previous frame time, or if that’s too old, an updated | 184 | // the actual previous frame time, or if that’s too old, an updated | ||
| 196 | // time. | 185 | // time. | ||
| 197 | func (x *FrameClock) GetFrameTime() int64 { | 186 | func (x *FrameClock) GetFrameTime() int64 { | ||
| 198 | - | core.LazyRegister(&xFrameClockGetFrameTime, "GDK", "gdk_frame_clock_get_frame_time", false) | |||
| 199 | - | ||||
| 200 | cret := xFrameClockGetFrameTime(x.GoPointer()) | 187 | cret := xFrameClockGetFrameTime(x.GoPointer()) | ||
| 201 | return cret | 188 | return cret | ||
| 202 | } | 189 | } | ||
| @@ -212,8 +199,6 @@ var xFrameClockGetHistoryStart func(uintptr) int64 | |||||
| 212 | // [method@Gdk.FrameClock.get_history_start] and | 199 | // [method@Gdk.FrameClock.get_history_start] and | ||
| 213 | // [method@Gdk.FrameClock.get_frame_counter], inclusive. | 200 | // [method@Gdk.FrameClock.get_frame_counter], inclusive. | ||
| 214 | func (x *FrameClock) GetHistoryStart() int64 { | 201 | func (x *FrameClock) GetHistoryStart() int64 { | ||
| 215 | - | core.LazyRegister(&xFrameClockGetHistoryStart, "GDK", "gdk_frame_clock_get_history_start", false) | |||
| 216 | - | ||||
| 217 | cret := xFrameClockGetHistoryStart(x.GoPointer()) | 202 | cret := xFrameClockGetHistoryStart(x.GoPointer()) | ||
| 218 | return cret | 203 | return cret | ||
| 219 | } | 204 | } | ||
| @@ -228,8 +213,6 @@ var xFrameClockGetRefreshInfo func(uintptr, int64, *int64, *int64) | |||||
| 228 | // predicts a presentation time that is a multiple of the refresh | 213 | // predicts a presentation time that is a multiple of the refresh | ||
| 229 | // interval after the last presentation time, and later than @base_time. | 214 | // interval after the last presentation time, and later than @base_time. | ||
| 230 | func (x *FrameClock) GetRefreshInfo(BaseTimeVar int64, RefreshIntervalReturnVar *int64, PresentationTimeReturnVar *int64) { | 215 | func (x *FrameClock) GetRefreshInfo(BaseTimeVar int64, RefreshIntervalReturnVar *int64, PresentationTimeReturnVar *int64) { | ||
| 231 | - | core.LazyRegister(&xFrameClockGetRefreshInfo, "GDK", "gdk_frame_clock_get_refresh_info", false) | |||
| 232 | - | ||||
| 233 | xFrameClockGetRefreshInfo(x.GoPointer(), BaseTimeVar, RefreshIntervalReturnVar, PresentationTimeReturnVar) | 216 | xFrameClockGetRefreshInfo(x.GoPointer(), BaseTimeVar, RefreshIntervalReturnVar, PresentationTimeReturnVar) | ||
| 234 | } | 217 | } | ||
| 235 | 218 | ||||
| @@ -242,8 +225,6 @@ var xFrameClockGetTimings func(uintptr, int64) uintptr | |||||
| 242 | // [method@Gdk.FrameTimings.get_complete] and | 225 | // [method@Gdk.FrameTimings.get_complete] and | ||
| 243 | // [method@Gdk.FrameClock.get_history_start]. | 226 | // [method@Gdk.FrameClock.get_history_start]. | ||
| 244 | func (x *FrameClock) GetTimings(FrameCounterVar int64) *FrameTimings { | 227 | func (x *FrameClock) GetTimings(FrameCounterVar int64) *FrameTimings { | ||
| 245 | - | core.LazyRegister(&xFrameClockGetTimings, "GDK", "gdk_frame_clock_get_timings", false) | |||
| 246 | - | ||||
| 247 | cret := xFrameClockGetTimings(x.GoPointer(), FrameCounterVar) | 228 | cret := xFrameClockGetTimings(x.GoPointer(), FrameCounterVar) | ||
| 248 | if cret == 0 { | 229 | if cret == 0 { | ||
| 249 | return nil | 230 | return nil | ||
| @@ -265,8 +246,6 @@ var xFrameClockRequestPhase func(uintptr, FrameClockPhase) | |||||
| 265 | // since this allows GTK to adjust system parameters to get maximally | 246 | // since this allows GTK to adjust system parameters to get maximally | ||
| 266 | // smooth animations. | 247 | // smooth animations. | ||
| 267 | func (x *FrameClock) RequestPhase(PhaseVar FrameClockPhase) { | 248 | func (x *FrameClock) RequestPhase(PhaseVar FrameClockPhase) { | ||
| 268 | - | core.LazyRegister(&xFrameClockRequestPhase, "GDK", "gdk_frame_clock_request_phase", false) | |||
| 269 | - | ||||
| 270 | xFrameClockRequestPhase(x.GoPointer(), PhaseVar) | 249 | xFrameClockRequestPhase(x.GoPointer(), PhaseVar) | ||
| 271 | } | 250 | } | ||
| 272 | 251 | ||||
| @@ -471,4 +450,27 @@ func (x *FrameClock) ConnectUpdate(cb *func(FrameClock)) uint { | |||||
| 471 | func init() { | 450 | func init() { | ||
| 472 | core.SetPackageName("GDK", "gtk4") | 451 | core.SetPackageName("GDK", "gtk4") | ||
| 473 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | 452 | 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") | |||
| 474 | } | 476 | } | ||