Merge pull request #349 from bnema/fix/rollback-lazy-puregotk
fix(deps): emergency rollback puregotk lazy registration regression
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
| @@ -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" | |
| @@ -38,7 +39,6 @@ type CicpRange int | |||
| 38 | 39 | var xCicpRangeGLibType func() types.GType | |
| 39 | 40 | ||
| 40 | 41 | func CicpRangeGLibType() types.GType { | |
| 41 | - | core.LazyRegister(&xCicpRangeGLibType, "GDK", "gdk_cicp_range_get_type", false) | |
| 42 | 42 | return xCicpRangeGLibType() | |
| 43 | 43 | } | |
| 44 | 44 | ||
| @@ -76,7 +76,6 @@ type CicpParams struct { | |||
| 76 | 76 | var xCicpParamsGLibType func() types.GType | |
| 77 | 77 | ||
| 78 | 78 | func CicpParamsGLibType() types.GType { | |
| 79 | - | core.LazyRegister(&xCicpParamsGLibType, "GDK", "gdk_cicp_params_get_type", false) | |
| 80 | 79 | return xCicpParamsGLibType() | |
| 81 | 80 | } | |
| 82 | 81 | ||
| @@ -93,7 +92,6 @@ var xNewCicpParams func() uintptr | |||
| 93 | 92 | // The initial values of the properties are the values for "undefined" | |
| 94 | 93 | // and need to be set before a color state object can be built. | |
| 95 | 94 | func NewCicpParams() *CicpParams { | |
| 96 | - | core.LazyRegister(&xNewCicpParams, "GDK", "gdk_cicp_params_new", false) | |
| 97 | 95 | var cls *CicpParams | |
| 98 | 96 | ||
| 99 | 97 | cret := xNewCicpParams() | |
| @@ -114,7 +112,6 @@ var xCicpParamsBuildColorState func(uintptr, **glib.Error) uintptr | |||
| 114 | 112 | // supported by GTK. In that case, `NULL` is returned, and @error is set | |
| 115 | 113 | // with an error message that can be presented to the user. | |
| 116 | 114 | func (x *CicpParams) BuildColorState() (*ColorState, error) { | |
| 117 | - | core.LazyRegister(&xCicpParamsBuildColorState, "GDK", "gdk_cicp_params_build_color_state", false) | |
| 118 | 115 | var cerr *glib.Error | |
| 119 | 116 | ||
| 120 | 117 | cret := xCicpParamsBuildColorState(x.GoPointer(), &cerr) | |
| @@ -132,8 +129,6 @@ var xCicpParamsGetColorPrimaries func(uintptr) uint | |||
| 132 | 129 | // Returns the value of the color-primaries property | |
| 133 | 130 | // of @self. | |
| 134 | 131 | func (x *CicpParams) GetColorPrimaries() uint { | |
| 135 | - | core.LazyRegister(&xCicpParamsGetColorPrimaries, "GDK", "gdk_cicp_params_get_color_primaries", false) | |
| 136 | - | ||
| 137 | 132 | cret := xCicpParamsGetColorPrimaries(x.GoPointer()) | |
| 138 | 133 | return cret | |
| 139 | 134 | } | |
| @@ -142,8 +137,6 @@ var xCicpParamsGetMatrixCoefficients func(uintptr) uint | |||
| 142 | 137 | ||
| 143 | 138 | // Gets the matrix-coefficients property of @self. | |
| 144 | 139 | func (x *CicpParams) GetMatrixCoefficients() uint { | |
| 145 | - | core.LazyRegister(&xCicpParamsGetMatrixCoefficients, "GDK", "gdk_cicp_params_get_matrix_coefficients", false) | |
| 146 | - | ||
| 147 | 140 | cret := xCicpParamsGetMatrixCoefficients(x.GoPointer()) | |
| 148 | 141 | return cret | |
| 149 | 142 | } | |
| @@ -152,8 +145,6 @@ var xCicpParamsGetRange func(uintptr) CicpRange | |||
| 152 | 145 | ||
| 153 | 146 | // Gets the range property of @self. | |
| 154 | 147 | func (x *CicpParams) GetRange() CicpRange { | |
| 155 | - | core.LazyRegister(&xCicpParamsGetRange, "GDK", "gdk_cicp_params_get_range", false) | |
| 156 | - | ||
| 157 | 148 | cret := xCicpParamsGetRange(x.GoPointer()) | |
| 158 | 149 | return cret | |
| 159 | 150 | } | |
| @@ -162,8 +153,6 @@ var xCicpParamsGetTransferFunction func(uintptr) uint | |||
| 162 | 153 | ||
| 163 | 154 | // Gets the transfer-function property of @self. | |
| 164 | 155 | func (x *CicpParams) GetTransferFunction() uint { | |
| 165 | - | core.LazyRegister(&xCicpParamsGetTransferFunction, "GDK", "gdk_cicp_params_get_transfer_function", false) | |
| 166 | - | ||
| 167 | 156 | cret := xCicpParamsGetTransferFunction(x.GoPointer()) | |
| 168 | 157 | return cret | |
| 169 | 158 | } | |
| @@ -172,8 +161,6 @@ var xCicpParamsSetColorPrimaries func(uintptr, uint) | |||
| 172 | 161 | ||
| 173 | 162 | // Sets the color-primaries property of @self. | |
| 174 | 163 | func (x *CicpParams) SetColorPrimaries(ColorPrimariesVar uint) { | |
| 175 | - | core.LazyRegister(&xCicpParamsSetColorPrimaries, "GDK", "gdk_cicp_params_set_color_primaries", false) | |
| 176 | - | ||
| 177 | 164 | xCicpParamsSetColorPrimaries(x.GoPointer(), ColorPrimariesVar) | |
| 178 | 165 | } | |
| 179 | 166 | ||
| @@ -182,8 +169,6 @@ var xCicpParamsSetMatrixCoefficients func(uintptr, uint) | |||
| 182 | 169 | // @self a `GdkCicpParams` | |
| 183 | 170 | // Sets the matrix-coefficients property of @self. | |
| 184 | 171 | func (x *CicpParams) SetMatrixCoefficients(MatrixCoefficientsVar uint) { | |
| 185 | - | core.LazyRegister(&xCicpParamsSetMatrixCoefficients, "GDK", "gdk_cicp_params_set_matrix_coefficients", false) | |
| 186 | - | ||
| 187 | 172 | xCicpParamsSetMatrixCoefficients(x.GoPointer(), MatrixCoefficientsVar) | |
| 188 | 173 | } | |
| 189 | 174 | ||
| @@ -191,8 +176,6 @@ var xCicpParamsSetRange func(uintptr, CicpRange) | |||
| 191 | 176 | ||
| 192 | 177 | // Sets the range property of @self | |
| 193 | 178 | func (x *CicpParams) SetRange(RangeVar CicpRange) { | |
| 194 | - | core.LazyRegister(&xCicpParamsSetRange, "GDK", "gdk_cicp_params_set_range", false) | |
| 195 | - | ||
| 196 | 179 | xCicpParamsSetRange(x.GoPointer(), RangeVar) | |
| 197 | 180 | } | |
| 198 | 181 | ||
| @@ -200,8 +183,6 @@ var xCicpParamsSetTransferFunction func(uintptr, uint) | |||
| 200 | 183 | ||
| 201 | 184 | // Sets the transfer-function property of @self. | |
| 202 | 185 | func (x *CicpParams) SetTransferFunction(TransferFunctionVar uint) { | |
| 203 | - | core.LazyRegister(&xCicpParamsSetTransferFunction, "GDK", "gdk_cicp_params_set_transfer_function", false) | |
| 204 | - | ||
| 205 | 186 | xCicpParamsSetTransferFunction(x.GoPointer(), TransferFunctionVar) | |
| 206 | 187 | } | |
| 207 | 188 | ||
| @@ -326,4 +307,28 @@ func (x *CicpParams) GetPropertyTransferFunction() uint { | |||
| 326 | 307 | func init() { | |
| 327 | 308 | core.SetPackageName("GDK", "gtk4") | |
| 328 | 309 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | |
| 310 | + | var libs []uintptr | |
| 311 | + | for _, libPath := range core.GetPaths("GDK") { | |
| 312 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 313 | + | if err != nil { | |
| 314 | + | panic(err) | |
| 315 | + | } | |
| 316 | + | libs = append(libs, lib) | |
| 317 | + | } | |
| 318 | + | ||
| 319 | + | core.PuregoSafeRegister(&xCicpRangeGLibType, libs, "gdk_cicp_range_get_type") | |
| 320 | + | ||
| 321 | + | core.PuregoSafeRegister(&xCicpParamsGLibType, libs, "gdk_cicp_params_get_type") | |
| 322 | + | ||
| 323 | + | core.PuregoSafeRegister(&xNewCicpParams, libs, "gdk_cicp_params_new") | |
| 324 | + | ||
| 325 | + | core.PuregoSafeRegister(&xCicpParamsBuildColorState, libs, "gdk_cicp_params_build_color_state") | |
| 326 | + | core.PuregoSafeRegister(&xCicpParamsGetColorPrimaries, libs, "gdk_cicp_params_get_color_primaries") | |
| 327 | + | core.PuregoSafeRegister(&xCicpParamsGetMatrixCoefficients, libs, "gdk_cicp_params_get_matrix_coefficients") | |
| 328 | + | core.PuregoSafeRegister(&xCicpParamsGetRange, libs, "gdk_cicp_params_get_range") | |
| 329 | + | core.PuregoSafeRegister(&xCicpParamsGetTransferFunction, libs, "gdk_cicp_params_get_transfer_function") | |
| 330 | + | core.PuregoSafeRegister(&xCicpParamsSetColorPrimaries, libs, "gdk_cicp_params_set_color_primaries") | |
| 331 | + | core.PuregoSafeRegister(&xCicpParamsSetMatrixCoefficients, libs, "gdk_cicp_params_set_matrix_coefficients") | |
| 332 | + | core.PuregoSafeRegister(&xCicpParamsSetRange, libs, "gdk_cicp_params_set_range") | |
| 333 | + | core.PuregoSafeRegister(&xCicpParamsSetTransferFunction, libs, "gdk_cicp_params_set_transfer_function") | |
| 329 | 334 | } | |
| @@ -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" | ||
| @@ -38,7 +39,6 @@ type CicpRange int | |||||
| 38 | var xCicpRangeGLibType func() types.GType | 39 | var xCicpRangeGLibType func() types.GType | ||
| 39 | 40 | ||||
| 40 | func CicpRangeGLibType() types.GType { | 41 | func CicpRangeGLibType() types.GType { | ||
| 41 | - | core.LazyRegister(&xCicpRangeGLibType, "GDK", "gdk_cicp_range_get_type", false) | |||
| 42 | return xCicpRangeGLibType() | 42 | return xCicpRangeGLibType() | ||
| 43 | } | 43 | } | ||
| 44 | 44 | ||||
| @@ -76,7 +76,6 @@ type CicpParams struct { | |||||
| 76 | var xCicpParamsGLibType func() types.GType | 76 | var xCicpParamsGLibType func() types.GType | ||
| 77 | 77 | ||||
| 78 | func CicpParamsGLibType() types.GType { | 78 | func CicpParamsGLibType() types.GType { | ||
| 79 | - | core.LazyRegister(&xCicpParamsGLibType, "GDK", "gdk_cicp_params_get_type", false) | |||
| 80 | return xCicpParamsGLibType() | 79 | return xCicpParamsGLibType() | ||
| 81 | } | 80 | } | ||
| 82 | 81 | ||||
| @@ -93,7 +92,6 @@ var xNewCicpParams func() uintptr | |||||
| 93 | // The initial values of the properties are the values for "undefined" | 92 | // The initial values of the properties are the values for "undefined" | ||
| 94 | // and need to be set before a color state object can be built. | 93 | // and need to be set before a color state object can be built. | ||
| 95 | func NewCicpParams() *CicpParams { | 94 | func NewCicpParams() *CicpParams { | ||
| 96 | - | core.LazyRegister(&xNewCicpParams, "GDK", "gdk_cicp_params_new", false) | |||
| 97 | var cls *CicpParams | 95 | var cls *CicpParams | ||
| 98 | 96 | ||||
| 99 | cret := xNewCicpParams() | 97 | cret := xNewCicpParams() | ||
| @@ -114,7 +112,6 @@ var xCicpParamsBuildColorState func(uintptr, **glib.Error) uintptr | |||||
| 114 | // supported by GTK. In that case, `NULL` is returned, and @error is set | 112 | // supported by GTK. In that case, `NULL` is returned, and @error is set | ||
| 115 | // with an error message that can be presented to the user. | 113 | // with an error message that can be presented to the user. | ||
| 116 | func (x *CicpParams) BuildColorState() (*ColorState, error) { | 114 | func (x *CicpParams) BuildColorState() (*ColorState, error) { | ||
| 117 | - | core.LazyRegister(&xCicpParamsBuildColorState, "GDK", "gdk_cicp_params_build_color_state", false) | |||
| 118 | var cerr *glib.Error | 115 | var cerr *glib.Error | ||
| 119 | 116 | ||||
| 120 | cret := xCicpParamsBuildColorState(x.GoPointer(), &cerr) | 117 | cret := xCicpParamsBuildColorState(x.GoPointer(), &cerr) | ||
| @@ -132,8 +129,6 @@ var xCicpParamsGetColorPrimaries func(uintptr) uint | |||||
| 132 | // Returns the value of the color-primaries property | 129 | // Returns the value of the color-primaries property | ||
| 133 | // of @self. | 130 | // of @self. | ||
| 134 | func (x *CicpParams) GetColorPrimaries() uint { | 131 | func (x *CicpParams) GetColorPrimaries() uint { | ||
| 135 | - | core.LazyRegister(&xCicpParamsGetColorPrimaries, "GDK", "gdk_cicp_params_get_color_primaries", false) | |||
| 136 | - | ||||
| 137 | cret := xCicpParamsGetColorPrimaries(x.GoPointer()) | 132 | cret := xCicpParamsGetColorPrimaries(x.GoPointer()) | ||
| 138 | return cret | 133 | return cret | ||
| 139 | } | 134 | } | ||
| @@ -142,8 +137,6 @@ var xCicpParamsGetMatrixCoefficients func(uintptr) uint | |||||
| 142 | 137 | ||||
| 143 | // Gets the matrix-coefficients property of @self. | 138 | // Gets the matrix-coefficients property of @self. | ||
| 144 | func (x *CicpParams) GetMatrixCoefficients() uint { | 139 | func (x *CicpParams) GetMatrixCoefficients() uint { | ||
| 145 | - | core.LazyRegister(&xCicpParamsGetMatrixCoefficients, "GDK", "gdk_cicp_params_get_matrix_coefficients", false) | |||
| 146 | - | ||||
| 147 | cret := xCicpParamsGetMatrixCoefficients(x.GoPointer()) | 140 | cret := xCicpParamsGetMatrixCoefficients(x.GoPointer()) | ||
| 148 | return cret | 141 | return cret | ||
| 149 | } | 142 | } | ||
| @@ -152,8 +145,6 @@ var xCicpParamsGetRange func(uintptr) CicpRange | |||||
| 152 | 145 | ||||
| 153 | // Gets the range property of @self. | 146 | // Gets the range property of @self. | ||
| 154 | func (x *CicpParams) GetRange() CicpRange { | 147 | func (x *CicpParams) GetRange() CicpRange { | ||
| 155 | - | core.LazyRegister(&xCicpParamsGetRange, "GDK", "gdk_cicp_params_get_range", false) | |||
| 156 | - | ||||
| 157 | cret := xCicpParamsGetRange(x.GoPointer()) | 148 | cret := xCicpParamsGetRange(x.GoPointer()) | ||
| 158 | return cret | 149 | return cret | ||
| 159 | } | 150 | } | ||
| @@ -162,8 +153,6 @@ var xCicpParamsGetTransferFunction func(uintptr) uint | |||||
| 162 | 153 | ||||
| 163 | // Gets the transfer-function property of @self. | 154 | // Gets the transfer-function property of @self. | ||
| 164 | func (x *CicpParams) GetTransferFunction() uint { | 155 | func (x *CicpParams) GetTransferFunction() uint { | ||
| 165 | - | core.LazyRegister(&xCicpParamsGetTransferFunction, "GDK", "gdk_cicp_params_get_transfer_function", false) | |||
| 166 | - | ||||
| 167 | cret := xCicpParamsGetTransferFunction(x.GoPointer()) | 156 | cret := xCicpParamsGetTransferFunction(x.GoPointer()) | ||
| 168 | return cret | 157 | return cret | ||
| 169 | } | 158 | } | ||
| @@ -172,8 +161,6 @@ var xCicpParamsSetColorPrimaries func(uintptr, uint) | |||||
| 172 | 161 | ||||
| 173 | // Sets the color-primaries property of @self. | 162 | // Sets the color-primaries property of @self. | ||
| 174 | func (x *CicpParams) SetColorPrimaries(ColorPrimariesVar uint) { | 163 | func (x *CicpParams) SetColorPrimaries(ColorPrimariesVar uint) { | ||
| 175 | - | core.LazyRegister(&xCicpParamsSetColorPrimaries, "GDK", "gdk_cicp_params_set_color_primaries", false) | |||
| 176 | - | ||||
| 177 | xCicpParamsSetColorPrimaries(x.GoPointer(), ColorPrimariesVar) | 164 | xCicpParamsSetColorPrimaries(x.GoPointer(), ColorPrimariesVar) | ||
| 178 | } | 165 | } | ||
| 179 | 166 | ||||
| @@ -182,8 +169,6 @@ var xCicpParamsSetMatrixCoefficients func(uintptr, uint) | |||||
| 182 | // @self a `GdkCicpParams` | 169 | // @self a `GdkCicpParams` | ||
| 183 | // Sets the matrix-coefficients property of @self. | 170 | // Sets the matrix-coefficients property of @self. | ||
| 184 | func (x *CicpParams) SetMatrixCoefficients(MatrixCoefficientsVar uint) { | 171 | func (x *CicpParams) SetMatrixCoefficients(MatrixCoefficientsVar uint) { | ||
| 185 | - | core.LazyRegister(&xCicpParamsSetMatrixCoefficients, "GDK", "gdk_cicp_params_set_matrix_coefficients", false) | |||
| 186 | - | ||||
| 187 | xCicpParamsSetMatrixCoefficients(x.GoPointer(), MatrixCoefficientsVar) | 172 | xCicpParamsSetMatrixCoefficients(x.GoPointer(), MatrixCoefficientsVar) | ||
| 188 | } | 173 | } | ||
| 189 | 174 | ||||
| @@ -191,8 +176,6 @@ var xCicpParamsSetRange func(uintptr, CicpRange) | |||||
| 191 | 176 | ||||
| 192 | // Sets the range property of @self | 177 | // Sets the range property of @self | ||
| 193 | func (x *CicpParams) SetRange(RangeVar CicpRange) { | 178 | func (x *CicpParams) SetRange(RangeVar CicpRange) { | ||
| 194 | - | core.LazyRegister(&xCicpParamsSetRange, "GDK", "gdk_cicp_params_set_range", false) | |||
| 195 | - | ||||
| 196 | xCicpParamsSetRange(x.GoPointer(), RangeVar) | 179 | xCicpParamsSetRange(x.GoPointer(), RangeVar) | ||
| 197 | } | 180 | } | ||
| 198 | 181 | ||||
| @@ -200,8 +183,6 @@ var xCicpParamsSetTransferFunction func(uintptr, uint) | |||||
| 200 | 183 | ||||
| 201 | // Sets the transfer-function property of @self. | 184 | // Sets the transfer-function property of @self. | ||
| 202 | func (x *CicpParams) SetTransferFunction(TransferFunctionVar uint) { | 185 | func (x *CicpParams) SetTransferFunction(TransferFunctionVar uint) { | ||
| 203 | - | core.LazyRegister(&xCicpParamsSetTransferFunction, "GDK", "gdk_cicp_params_set_transfer_function", false) | |||
| 204 | - | ||||
| 205 | xCicpParamsSetTransferFunction(x.GoPointer(), TransferFunctionVar) | 186 | xCicpParamsSetTransferFunction(x.GoPointer(), TransferFunctionVar) | ||
| 206 | } | 187 | } | ||
| 207 | 188 | ||||
| @@ -326,4 +307,28 @@ func (x *CicpParams) GetPropertyTransferFunction() uint { | |||||
| 326 | func init() { | 307 | func init() { | ||
| 327 | core.SetPackageName("GDK", "gtk4") | 308 | core.SetPackageName("GDK", "gtk4") | ||
| 328 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | 309 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | ||
| 310 | + | var libs []uintptr | |||
| 311 | + | for _, libPath := range core.GetPaths("GDK") { | |||
| 312 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 313 | + | if err != nil { | |||
| 314 | + | panic(err) | |||
| 315 | + | } | |||
| 316 | + | libs = append(libs, lib) | |||
| 317 | + | } | |||
| 318 | + | ||||
| 319 | + | core.PuregoSafeRegister(&xCicpRangeGLibType, libs, "gdk_cicp_range_get_type") | |||
| 320 | + | ||||
| 321 | + | core.PuregoSafeRegister(&xCicpParamsGLibType, libs, "gdk_cicp_params_get_type") | |||
| 322 | + | ||||
| 323 | + | core.PuregoSafeRegister(&xNewCicpParams, libs, "gdk_cicp_params_new") | |||
| 324 | + | ||||
| 325 | + | core.PuregoSafeRegister(&xCicpParamsBuildColorState, libs, "gdk_cicp_params_build_color_state") | |||
| 326 | + | core.PuregoSafeRegister(&xCicpParamsGetColorPrimaries, libs, "gdk_cicp_params_get_color_primaries") | |||
| 327 | + | core.PuregoSafeRegister(&xCicpParamsGetMatrixCoefficients, libs, "gdk_cicp_params_get_matrix_coefficients") | |||
| 328 | + | core.PuregoSafeRegister(&xCicpParamsGetRange, libs, "gdk_cicp_params_get_range") | |||
| 329 | + | core.PuregoSafeRegister(&xCicpParamsGetTransferFunction, libs, "gdk_cicp_params_get_transfer_function") | |||
| 330 | + | core.PuregoSafeRegister(&xCicpParamsSetColorPrimaries, libs, "gdk_cicp_params_set_color_primaries") | |||
| 331 | + | core.PuregoSafeRegister(&xCicpParamsSetMatrixCoefficients, libs, "gdk_cicp_params_set_matrix_coefficients") | |||
| 332 | + | core.PuregoSafeRegister(&xCicpParamsSetRange, libs, "gdk_cicp_params_set_range") | |||
| 333 | + | core.PuregoSafeRegister(&xCicpParamsSetTransferFunction, libs, "gdk_cicp_params_set_transfer_function") | |||
| 329 | } | 334 | } | ||