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 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkframetimings.go +20 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkglcontext.go +36 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkgltexture.go +15 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkgltexturebuilder.go +35 -41 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkkeys.go +22 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkmemorytexture.go +13 -2 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkmemorytexturebuilder.go +35 -42 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkmonitor.go +27 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpaintable.go +33 -63 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpango.go +12 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpixbuf.go +12 -2 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpopup.go +26 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpopuplayout.go +32 -36
| @@ -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/gobject/types" | |
| 10 | 11 | ) | |
| @@ -49,7 +50,6 @@ type PopupLayout struct { | |||
| 49 | 50 | var xPopupLayoutGLibType func() types.GType | |
| 50 | 51 | ||
| 51 | 52 | func PopupLayoutGLibType() types.GType { | |
| 52 | - | core.LazyRegister(&xPopupLayoutGLibType, "GDK", "gdk_popup_layout_get_type", false) | |
| 53 | 53 | return xPopupLayoutGLibType() | |
| 54 | 54 | } | |
| 55 | 55 | ||
| @@ -80,8 +80,6 @@ var xNewPopupLayout func(*Rectangle, Gravity, Gravity) uintptr | |||
| 80 | 80 | // [method@Gdk.PopupLayout.set_offset], which is equivalent to offsetting the | |
| 81 | 81 | // position of surface. | |
| 82 | 82 | func NewPopupLayout(AnchorRectVar *Rectangle, RectAnchorVar Gravity, SurfaceAnchorVar Gravity) *PopupLayout { | |
| 83 | - | core.LazyRegister(&xNewPopupLayout, "GDK", "gdk_popup_layout_new", false) | |
| 84 | - | ||
| 85 | 83 | cret := xNewPopupLayout(AnchorRectVar, RectAnchorVar, SurfaceAnchorVar) | |
| 86 | 84 | if cret == 0 { | |
| 87 | 85 | return nil | |
| @@ -93,8 +91,6 @@ var xPopupLayoutCopy func(uintptr) uintptr | |||
| 93 | 91 | ||
| 94 | 92 | // Makes a copy of @layout. | |
| 95 | 93 | func (x *PopupLayout) Copy() *PopupLayout { | |
| 96 | - | core.LazyRegister(&xPopupLayoutCopy, "GDK", "gdk_popup_layout_copy", false) | |
| 97 | - | ||
| 98 | 94 | cret := xPopupLayoutCopy(x.GoPointer()) | |
| 99 | 95 | if cret == 0 { | |
| 100 | 96 | return nil | |
| @@ -106,8 +102,6 @@ var xPopupLayoutEqual func(uintptr, *PopupLayout) bool | |||
| 106 | 102 | ||
| 107 | 103 | // Check whether @layout and @other has identical layout properties. | |
| 108 | 104 | func (x *PopupLayout) Equal(OtherVar *PopupLayout) bool { | |
| 109 | - | core.LazyRegister(&xPopupLayoutEqual, "GDK", "gdk_popup_layout_equal", false) | |
| 110 | - | ||
| 111 | 105 | cret := xPopupLayoutEqual(x.GoPointer(), OtherVar) | |
| 112 | 106 | return cret | |
| 113 | 107 | } | |
| @@ -116,8 +110,6 @@ var xPopupLayoutGetAnchorHints func(uintptr) AnchorHints | |||
| 116 | 110 | ||
| 117 | 111 | // Get the anchor hints. | |
| 118 | 112 | func (x *PopupLayout) GetAnchorHints() AnchorHints { | |
| 119 | - | core.LazyRegister(&xPopupLayoutGetAnchorHints, "GDK", "gdk_popup_layout_get_anchor_hints", false) | |
| 120 | - | ||
| 121 | 113 | cret := xPopupLayoutGetAnchorHints(x.GoPointer()) | |
| 122 | 114 | return cret | |
| 123 | 115 | } | |
| @@ -126,8 +118,6 @@ var xPopupLayoutGetAnchorRect func(uintptr) uintptr | |||
| 126 | 118 | ||
| 127 | 119 | // Get the anchor rectangle. | |
| 128 | 120 | func (x *PopupLayout) GetAnchorRect() *Rectangle { | |
| 129 | - | core.LazyRegister(&xPopupLayoutGetAnchorRect, "GDK", "gdk_popup_layout_get_anchor_rect", false) | |
| 130 | - | ||
| 131 | 121 | cret := xPopupLayoutGetAnchorRect(x.GoPointer()) | |
| 132 | 122 | if cret == 0 { | |
| 133 | 123 | return nil | |
| @@ -139,8 +129,6 @@ var xPopupLayoutGetOffset func(uintptr, *int, *int) | |||
| 139 | 129 | ||
| 140 | 130 | // Retrieves the offset for the anchor rectangle. | |
| 141 | 131 | func (x *PopupLayout) GetOffset(DxVar *int, DyVar *int) { | |
| 142 | - | core.LazyRegister(&xPopupLayoutGetOffset, "GDK", "gdk_popup_layout_get_offset", false) | |
| 143 | - | ||
| 144 | 132 | xPopupLayoutGetOffset(x.GoPointer(), DxVar, DyVar) | |
| 145 | 133 | } | |
| 146 | 134 | ||
| @@ -148,8 +136,6 @@ var xPopupLayoutGetRectAnchor func(uintptr) Gravity | |||
| 148 | 136 | ||
| 149 | 137 | // Returns the anchor position on the anchor rectangle. | |
| 150 | 138 | func (x *PopupLayout) GetRectAnchor() Gravity { | |
| 151 | - | core.LazyRegister(&xPopupLayoutGetRectAnchor, "GDK", "gdk_popup_layout_get_rect_anchor", false) | |
| 152 | - | ||
| 153 | 139 | cret := xPopupLayoutGetRectAnchor(x.GoPointer()) | |
| 154 | 140 | return cret | |
| 155 | 141 | } | |
| @@ -158,8 +144,6 @@ var xPopupLayoutGetShadowWidth func(uintptr, *int, *int, *int, *int) | |||
| 158 | 144 | ||
| 159 | 145 | // Obtains the shadow widths of this layout. | |
| 160 | 146 | func (x *PopupLayout) GetShadowWidth(LeftVar *int, RightVar *int, TopVar *int, BottomVar *int) { | |
| 161 | - | core.LazyRegister(&xPopupLayoutGetShadowWidth, "GDK", "gdk_popup_layout_get_shadow_width", false) | |
| 162 | - | ||
| 163 | 147 | xPopupLayoutGetShadowWidth(x.GoPointer(), LeftVar, RightVar, TopVar, BottomVar) | |
| 164 | 148 | } | |
| 165 | 149 | ||
| @@ -167,8 +151,6 @@ var xPopupLayoutGetSurfaceAnchor func(uintptr) Gravity | |||
| 167 | 151 | ||
| 168 | 152 | // Returns the anchor position on the popup surface. | |
| 169 | 153 | func (x *PopupLayout) GetSurfaceAnchor() Gravity { | |
| 170 | - | core.LazyRegister(&xPopupLayoutGetSurfaceAnchor, "GDK", "gdk_popup_layout_get_surface_anchor", false) | |
| 171 | - | ||
| 172 | 154 | cret := xPopupLayoutGetSurfaceAnchor(x.GoPointer()) | |
| 173 | 155 | return cret | |
| 174 | 156 | } | |
| @@ -177,8 +159,6 @@ var xPopupLayoutRef func(uintptr) uintptr | |||
| 177 | 159 | ||
| 178 | 160 | // Increases the reference count of @value. | |
| 179 | 161 | func (x *PopupLayout) Ref() *PopupLayout { | |
| 180 | - | core.LazyRegister(&xPopupLayoutRef, "GDK", "gdk_popup_layout_ref", false) | |
| 181 | - | ||
| 182 | 162 | cret := xPopupLayoutRef(x.GoPointer()) | |
| 183 | 163 | if cret == 0 { | |
| 184 | 164 | return nil | |
| @@ -196,8 +176,6 @@ var xPopupLayoutSetAnchorHints func(uintptr, AnchorHints) | |||
| 196 | 176 | // `GDK_GRAVITY_NORTH_EAST` and vice versa if @surface extends | |
| 197 | 177 | // beyond the left or right edges of the monitor. | |
| 198 | 178 | func (x *PopupLayout) SetAnchorHints(AnchorHintsVar AnchorHints) { | |
| 199 | - | core.LazyRegister(&xPopupLayoutSetAnchorHints, "GDK", "gdk_popup_layout_set_anchor_hints", false) | |
| 200 | - | ||
| 201 | 179 | xPopupLayoutSetAnchorHints(x.GoPointer(), AnchorHintsVar) | |
| 202 | 180 | } | |
| 203 | 181 | ||
| @@ -205,8 +183,6 @@ var xPopupLayoutSetAnchorRect func(uintptr, *Rectangle) | |||
| 205 | 183 | ||
| 206 | 184 | // Set the anchor rectangle. | |
| 207 | 185 | func (x *PopupLayout) SetAnchorRect(AnchorRectVar *Rectangle) { | |
| 208 | - | core.LazyRegister(&xPopupLayoutSetAnchorRect, "GDK", "gdk_popup_layout_set_anchor_rect", false) | |
| 209 | - | ||
| 210 | 186 | xPopupLayoutSetAnchorRect(x.GoPointer(), AnchorRectVar) | |
| 211 | 187 | } | |
| 212 | 188 | ||
| @@ -214,8 +190,6 @@ var xPopupLayoutSetOffset func(uintptr, int, int) | |||
| 214 | 190 | ||
| 215 | 191 | // Offset the position of the anchor rectangle with the given delta. | |
| 216 | 192 | func (x *PopupLayout) SetOffset(DxVar int, DyVar int) { | |
| 217 | - | core.LazyRegister(&xPopupLayoutSetOffset, "GDK", "gdk_popup_layout_set_offset", false) | |
| 218 | - | ||
| 219 | 193 | xPopupLayoutSetOffset(x.GoPointer(), DxVar, DyVar) | |
| 220 | 194 | } | |
| 221 | 195 | ||
| @@ -223,8 +197,6 @@ var xPopupLayoutSetRectAnchor func(uintptr, Gravity) | |||
| 223 | 197 | ||
| 224 | 198 | // Set the anchor on the anchor rectangle. | |
| 225 | 199 | func (x *PopupLayout) SetRectAnchor(AnchorVar Gravity) { | |
| 226 | - | core.LazyRegister(&xPopupLayoutSetRectAnchor, "GDK", "gdk_popup_layout_set_rect_anchor", false) | |
| 227 | - | ||
| 228 | 200 | xPopupLayoutSetRectAnchor(x.GoPointer(), AnchorVar) | |
| 229 | 201 | } | |
| 230 | 202 | ||
| @@ -236,8 +208,6 @@ var xPopupLayoutSetShadowWidth func(uintptr, int, int, int, int) | |||
| 236 | 208 | // surface size that would consist of the shadow margin | |
| 237 | 209 | // surrounding the window, would there be any. | |
| 238 | 210 | func (x *PopupLayout) SetShadowWidth(LeftVar int, RightVar int, TopVar int, BottomVar int) { | |
| 239 | - | core.LazyRegister(&xPopupLayoutSetShadowWidth, "GDK", "gdk_popup_layout_set_shadow_width", false) | |
| 240 | - | ||
| 241 | 211 | xPopupLayoutSetShadowWidth(x.GoPointer(), LeftVar, RightVar, TopVar, BottomVar) | |
| 242 | 212 | } | |
| 243 | 213 | ||
| @@ -245,8 +215,6 @@ var xPopupLayoutSetSurfaceAnchor func(uintptr, Gravity) | |||
| 245 | 215 | ||
| 246 | 216 | // Set the anchor on the popup surface. | |
| 247 | 217 | func (x *PopupLayout) SetSurfaceAnchor(AnchorVar Gravity) { | |
| 248 | - | core.LazyRegister(&xPopupLayoutSetSurfaceAnchor, "GDK", "gdk_popup_layout_set_surface_anchor", false) | |
| 249 | - | ||
| 250 | 218 | xPopupLayoutSetSurfaceAnchor(x.GoPointer(), AnchorVar) | |
| 251 | 219 | } | |
| 252 | 220 | ||
| @@ -254,8 +222,6 @@ var xPopupLayoutUnref func(uintptr) | |||
| 254 | 222 | ||
| 255 | 223 | // Decreases the reference count of @value. | |
| 256 | 224 | func (x *PopupLayout) Unref() { | |
| 257 | - | core.LazyRegister(&xPopupLayoutUnref, "GDK", "gdk_popup_layout_unref", false) | |
| 258 | - | ||
| 259 | 225 | xPopupLayoutUnref(x.GoPointer()) | |
| 260 | 226 | } | |
| 261 | 227 | ||
| @@ -279,7 +245,6 @@ type AnchorHints int | |||
| 279 | 245 | var xAnchorHintsGLibType func() types.GType | |
| 280 | 246 | ||
| 281 | 247 | func AnchorHintsGLibType() types.GType { | |
| 282 | - | core.LazyRegister(&xAnchorHintsGLibType, "GDK", "gdk_anchor_hints_get_type", false) | |
| 283 | 248 | return xAnchorHintsGLibType() | |
| 284 | 249 | } | |
| 285 | 250 | ||
| @@ -308,4 +273,35 @@ const ( | |||
| 308 | 273 | func init() { | |
| 309 | 274 | core.SetPackageName("GDK", "gtk4") | |
| 310 | 275 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | |
| 276 | + | var libs []uintptr | |
| 277 | + | for _, libPath := range core.GetPaths("GDK") { | |
| 278 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 279 | + | if err != nil { | |
| 280 | + | panic(err) | |
| 281 | + | } | |
| 282 | + | libs = append(libs, lib) | |
| 283 | + | } | |
| 284 | + | ||
| 285 | + | core.PuregoSafeRegister(&xAnchorHintsGLibType, libs, "gdk_anchor_hints_get_type") | |
| 286 | + | ||
| 287 | + | core.PuregoSafeRegister(&xPopupLayoutGLibType, libs, "gdk_popup_layout_get_type") | |
| 288 | + | ||
| 289 | + | core.PuregoSafeRegister(&xNewPopupLayout, libs, "gdk_popup_layout_new") | |
| 290 | + | ||
| 291 | + | core.PuregoSafeRegister(&xPopupLayoutCopy, libs, "gdk_popup_layout_copy") | |
| 292 | + | core.PuregoSafeRegister(&xPopupLayoutEqual, libs, "gdk_popup_layout_equal") | |
| 293 | + | core.PuregoSafeRegister(&xPopupLayoutGetAnchorHints, libs, "gdk_popup_layout_get_anchor_hints") | |
| 294 | + | core.PuregoSafeRegister(&xPopupLayoutGetAnchorRect, libs, "gdk_popup_layout_get_anchor_rect") | |
| 295 | + | core.PuregoSafeRegister(&xPopupLayoutGetOffset, libs, "gdk_popup_layout_get_offset") | |
| 296 | + | core.PuregoSafeRegister(&xPopupLayoutGetRectAnchor, libs, "gdk_popup_layout_get_rect_anchor") | |
| 297 | + | core.PuregoSafeRegister(&xPopupLayoutGetShadowWidth, libs, "gdk_popup_layout_get_shadow_width") | |
| 298 | + | core.PuregoSafeRegister(&xPopupLayoutGetSurfaceAnchor, libs, "gdk_popup_layout_get_surface_anchor") | |
| 299 | + | core.PuregoSafeRegister(&xPopupLayoutRef, libs, "gdk_popup_layout_ref") | |
| 300 | + | core.PuregoSafeRegister(&xPopupLayoutSetAnchorHints, libs, "gdk_popup_layout_set_anchor_hints") | |
| 301 | + | core.PuregoSafeRegister(&xPopupLayoutSetAnchorRect, libs, "gdk_popup_layout_set_anchor_rect") | |
| 302 | + | core.PuregoSafeRegister(&xPopupLayoutSetOffset, libs, "gdk_popup_layout_set_offset") | |
| 303 | + | core.PuregoSafeRegister(&xPopupLayoutSetRectAnchor, libs, "gdk_popup_layout_set_rect_anchor") | |
| 304 | + | core.PuregoSafeRegister(&xPopupLayoutSetShadowWidth, libs, "gdk_popup_layout_set_shadow_width") | |
| 305 | + | core.PuregoSafeRegister(&xPopupLayoutSetSurfaceAnchor, libs, "gdk_popup_layout_set_surface_anchor") | |
| 306 | + | core.PuregoSafeRegister(&xPopupLayoutUnref, libs, "gdk_popup_layout_unref") | |
| 311 | 307 | } | |
| @@ -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/gobject/types" | 10 | "github.com/bnema/puregotk/v4/gobject/types" | ||
| 10 | ) | 11 | ) | ||
| @@ -49,7 +50,6 @@ type PopupLayout struct { | |||||
| 49 | var xPopupLayoutGLibType func() types.GType | 50 | var xPopupLayoutGLibType func() types.GType | ||
| 50 | 51 | ||||
| 51 | func PopupLayoutGLibType() types.GType { | 52 | func PopupLayoutGLibType() types.GType { | ||
| 52 | - | core.LazyRegister(&xPopupLayoutGLibType, "GDK", "gdk_popup_layout_get_type", false) | |||
| 53 | return xPopupLayoutGLibType() | 53 | return xPopupLayoutGLibType() | ||
| 54 | } | 54 | } | ||
| 55 | 55 | ||||
| @@ -80,8 +80,6 @@ var xNewPopupLayout func(*Rectangle, Gravity, Gravity) uintptr | |||||
| 80 | // [method@Gdk.PopupLayout.set_offset], which is equivalent to offsetting the | 80 | // [method@Gdk.PopupLayout.set_offset], which is equivalent to offsetting the | ||
| 81 | // position of surface. | 81 | // position of surface. | ||
| 82 | func NewPopupLayout(AnchorRectVar *Rectangle, RectAnchorVar Gravity, SurfaceAnchorVar Gravity) *PopupLayout { | 82 | func NewPopupLayout(AnchorRectVar *Rectangle, RectAnchorVar Gravity, SurfaceAnchorVar Gravity) *PopupLayout { | ||
| 83 | - | core.LazyRegister(&xNewPopupLayout, "GDK", "gdk_popup_layout_new", false) | |||
| 84 | - | ||||
| 85 | cret := xNewPopupLayout(AnchorRectVar, RectAnchorVar, SurfaceAnchorVar) | 83 | cret := xNewPopupLayout(AnchorRectVar, RectAnchorVar, SurfaceAnchorVar) | ||
| 86 | if cret == 0 { | 84 | if cret == 0 { | ||
| 87 | return nil | 85 | return nil | ||
| @@ -93,8 +91,6 @@ var xPopupLayoutCopy func(uintptr) uintptr | |||||
| 93 | 91 | ||||
| 94 | // Makes a copy of @layout. | 92 | // Makes a copy of @layout. | ||
| 95 | func (x *PopupLayout) Copy() *PopupLayout { | 93 | func (x *PopupLayout) Copy() *PopupLayout { | ||
| 96 | - | core.LazyRegister(&xPopupLayoutCopy, "GDK", "gdk_popup_layout_copy", false) | |||
| 97 | - | ||||
| 98 | cret := xPopupLayoutCopy(x.GoPointer()) | 94 | cret := xPopupLayoutCopy(x.GoPointer()) | ||
| 99 | if cret == 0 { | 95 | if cret == 0 { | ||
| 100 | return nil | 96 | return nil | ||
| @@ -106,8 +102,6 @@ var xPopupLayoutEqual func(uintptr, *PopupLayout) bool | |||||
| 106 | 102 | ||||
| 107 | // Check whether @layout and @other has identical layout properties. | 103 | // Check whether @layout and @other has identical layout properties. | ||
| 108 | func (x *PopupLayout) Equal(OtherVar *PopupLayout) bool { | 104 | func (x *PopupLayout) Equal(OtherVar *PopupLayout) bool { | ||
| 109 | - | core.LazyRegister(&xPopupLayoutEqual, "GDK", "gdk_popup_layout_equal", false) | |||
| 110 | - | ||||
| 111 | cret := xPopupLayoutEqual(x.GoPointer(), OtherVar) | 105 | cret := xPopupLayoutEqual(x.GoPointer(), OtherVar) | ||
| 112 | return cret | 106 | return cret | ||
| 113 | } | 107 | } | ||
| @@ -116,8 +110,6 @@ var xPopupLayoutGetAnchorHints func(uintptr) AnchorHints | |||||
| 116 | 110 | ||||
| 117 | // Get the anchor hints. | 111 | // Get the anchor hints. | ||
| 118 | func (x *PopupLayout) GetAnchorHints() AnchorHints { | 112 | func (x *PopupLayout) GetAnchorHints() AnchorHints { | ||
| 119 | - | core.LazyRegister(&xPopupLayoutGetAnchorHints, "GDK", "gdk_popup_layout_get_anchor_hints", false) | |||
| 120 | - | ||||
| 121 | cret := xPopupLayoutGetAnchorHints(x.GoPointer()) | 113 | cret := xPopupLayoutGetAnchorHints(x.GoPointer()) | ||
| 122 | return cret | 114 | return cret | ||
| 123 | } | 115 | } | ||
| @@ -126,8 +118,6 @@ var xPopupLayoutGetAnchorRect func(uintptr) uintptr | |||||
| 126 | 118 | ||||
| 127 | // Get the anchor rectangle. | 119 | // Get the anchor rectangle. | ||
| 128 | func (x *PopupLayout) GetAnchorRect() *Rectangle { | 120 | func (x *PopupLayout) GetAnchorRect() *Rectangle { | ||
| 129 | - | core.LazyRegister(&xPopupLayoutGetAnchorRect, "GDK", "gdk_popup_layout_get_anchor_rect", false) | |||
| 130 | - | ||||
| 131 | cret := xPopupLayoutGetAnchorRect(x.GoPointer()) | 121 | cret := xPopupLayoutGetAnchorRect(x.GoPointer()) | ||
| 132 | if cret == 0 { | 122 | if cret == 0 { | ||
| 133 | return nil | 123 | return nil | ||
| @@ -139,8 +129,6 @@ var xPopupLayoutGetOffset func(uintptr, *int, *int) | |||||
| 139 | 129 | ||||
| 140 | // Retrieves the offset for the anchor rectangle. | 130 | // Retrieves the offset for the anchor rectangle. | ||
| 141 | func (x *PopupLayout) GetOffset(DxVar *int, DyVar *int) { | 131 | func (x *PopupLayout) GetOffset(DxVar *int, DyVar *int) { | ||
| 142 | - | core.LazyRegister(&xPopupLayoutGetOffset, "GDK", "gdk_popup_layout_get_offset", false) | |||
| 143 | - | ||||
| 144 | xPopupLayoutGetOffset(x.GoPointer(), DxVar, DyVar) | 132 | xPopupLayoutGetOffset(x.GoPointer(), DxVar, DyVar) | ||
| 145 | } | 133 | } | ||
| 146 | 134 | ||||
| @@ -148,8 +136,6 @@ var xPopupLayoutGetRectAnchor func(uintptr) Gravity | |||||
| 148 | 136 | ||||
| 149 | // Returns the anchor position on the anchor rectangle. | 137 | // Returns the anchor position on the anchor rectangle. | ||
| 150 | func (x *PopupLayout) GetRectAnchor() Gravity { | 138 | func (x *PopupLayout) GetRectAnchor() Gravity { | ||
| 151 | - | core.LazyRegister(&xPopupLayoutGetRectAnchor, "GDK", "gdk_popup_layout_get_rect_anchor", false) | |||
| 152 | - | ||||
| 153 | cret := xPopupLayoutGetRectAnchor(x.GoPointer()) | 139 | cret := xPopupLayoutGetRectAnchor(x.GoPointer()) | ||
| 154 | return cret | 140 | return cret | ||
| 155 | } | 141 | } | ||
| @@ -158,8 +144,6 @@ var xPopupLayoutGetShadowWidth func(uintptr, *int, *int, *int, *int) | |||||
| 158 | 144 | ||||
| 159 | // Obtains the shadow widths of this layout. | 145 | // Obtains the shadow widths of this layout. | ||
| 160 | func (x *PopupLayout) GetShadowWidth(LeftVar *int, RightVar *int, TopVar *int, BottomVar *int) { | 146 | func (x *PopupLayout) GetShadowWidth(LeftVar *int, RightVar *int, TopVar *int, BottomVar *int) { | ||
| 161 | - | core.LazyRegister(&xPopupLayoutGetShadowWidth, "GDK", "gdk_popup_layout_get_shadow_width", false) | |||
| 162 | - | ||||
| 163 | xPopupLayoutGetShadowWidth(x.GoPointer(), LeftVar, RightVar, TopVar, BottomVar) | 147 | xPopupLayoutGetShadowWidth(x.GoPointer(), LeftVar, RightVar, TopVar, BottomVar) | ||
| 164 | } | 148 | } | ||
| 165 | 149 | ||||
| @@ -167,8 +151,6 @@ var xPopupLayoutGetSurfaceAnchor func(uintptr) Gravity | |||||
| 167 | 151 | ||||
| 168 | // Returns the anchor position on the popup surface. | 152 | // Returns the anchor position on the popup surface. | ||
| 169 | func (x *PopupLayout) GetSurfaceAnchor() Gravity { | 153 | func (x *PopupLayout) GetSurfaceAnchor() Gravity { | ||
| 170 | - | core.LazyRegister(&xPopupLayoutGetSurfaceAnchor, "GDK", "gdk_popup_layout_get_surface_anchor", false) | |||
| 171 | - | ||||
| 172 | cret := xPopupLayoutGetSurfaceAnchor(x.GoPointer()) | 154 | cret := xPopupLayoutGetSurfaceAnchor(x.GoPointer()) | ||
| 173 | return cret | 155 | return cret | ||
| 174 | } | 156 | } | ||
| @@ -177,8 +159,6 @@ var xPopupLayoutRef func(uintptr) uintptr | |||||
| 177 | 159 | ||||
| 178 | // Increases the reference count of @value. | 160 | // Increases the reference count of @value. | ||
| 179 | func (x *PopupLayout) Ref() *PopupLayout { | 161 | func (x *PopupLayout) Ref() *PopupLayout { | ||
| 180 | - | core.LazyRegister(&xPopupLayoutRef, "GDK", "gdk_popup_layout_ref", false) | |||
| 181 | - | ||||
| 182 | cret := xPopupLayoutRef(x.GoPointer()) | 162 | cret := xPopupLayoutRef(x.GoPointer()) | ||
| 183 | if cret == 0 { | 163 | if cret == 0 { | ||
| 184 | return nil | 164 | return nil | ||
| @@ -196,8 +176,6 @@ var xPopupLayoutSetAnchorHints func(uintptr, AnchorHints) | |||||
| 196 | // `GDK_GRAVITY_NORTH_EAST` and vice versa if @surface extends | 176 | // `GDK_GRAVITY_NORTH_EAST` and vice versa if @surface extends | ||
| 197 | // beyond the left or right edges of the monitor. | 177 | // beyond the left or right edges of the monitor. | ||
| 198 | func (x *PopupLayout) SetAnchorHints(AnchorHintsVar AnchorHints) { | 178 | func (x *PopupLayout) SetAnchorHints(AnchorHintsVar AnchorHints) { | ||
| 199 | - | core.LazyRegister(&xPopupLayoutSetAnchorHints, "GDK", "gdk_popup_layout_set_anchor_hints", false) | |||
| 200 | - | ||||
| 201 | xPopupLayoutSetAnchorHints(x.GoPointer(), AnchorHintsVar) | 179 | xPopupLayoutSetAnchorHints(x.GoPointer(), AnchorHintsVar) | ||
| 202 | } | 180 | } | ||
| 203 | 181 | ||||
| @@ -205,8 +183,6 @@ var xPopupLayoutSetAnchorRect func(uintptr, *Rectangle) | |||||
| 205 | 183 | ||||
| 206 | // Set the anchor rectangle. | 184 | // Set the anchor rectangle. | ||
| 207 | func (x *PopupLayout) SetAnchorRect(AnchorRectVar *Rectangle) { | 185 | func (x *PopupLayout) SetAnchorRect(AnchorRectVar *Rectangle) { | ||
| 208 | - | core.LazyRegister(&xPopupLayoutSetAnchorRect, "GDK", "gdk_popup_layout_set_anchor_rect", false) | |||
| 209 | - | ||||
| 210 | xPopupLayoutSetAnchorRect(x.GoPointer(), AnchorRectVar) | 186 | xPopupLayoutSetAnchorRect(x.GoPointer(), AnchorRectVar) | ||
| 211 | } | 187 | } | ||
| 212 | 188 | ||||
| @@ -214,8 +190,6 @@ var xPopupLayoutSetOffset func(uintptr, int, int) | |||||
| 214 | 190 | ||||
| 215 | // Offset the position of the anchor rectangle with the given delta. | 191 | // Offset the position of the anchor rectangle with the given delta. | ||
| 216 | func (x *PopupLayout) SetOffset(DxVar int, DyVar int) { | 192 | func (x *PopupLayout) SetOffset(DxVar int, DyVar int) { | ||
| 217 | - | core.LazyRegister(&xPopupLayoutSetOffset, "GDK", "gdk_popup_layout_set_offset", false) | |||
| 218 | - | ||||
| 219 | xPopupLayoutSetOffset(x.GoPointer(), DxVar, DyVar) | 193 | xPopupLayoutSetOffset(x.GoPointer(), DxVar, DyVar) | ||
| 220 | } | 194 | } | ||
| 221 | 195 | ||||
| @@ -223,8 +197,6 @@ var xPopupLayoutSetRectAnchor func(uintptr, Gravity) | |||||
| 223 | 197 | ||||
| 224 | // Set the anchor on the anchor rectangle. | 198 | // Set the anchor on the anchor rectangle. | ||
| 225 | func (x *PopupLayout) SetRectAnchor(AnchorVar Gravity) { | 199 | func (x *PopupLayout) SetRectAnchor(AnchorVar Gravity) { | ||
| 226 | - | core.LazyRegister(&xPopupLayoutSetRectAnchor, "GDK", "gdk_popup_layout_set_rect_anchor", false) | |||
| 227 | - | ||||
| 228 | xPopupLayoutSetRectAnchor(x.GoPointer(), AnchorVar) | 200 | xPopupLayoutSetRectAnchor(x.GoPointer(), AnchorVar) | ||
| 229 | } | 201 | } | ||
| 230 | 202 | ||||
| @@ -236,8 +208,6 @@ var xPopupLayoutSetShadowWidth func(uintptr, int, int, int, int) | |||||
| 236 | // surface size that would consist of the shadow margin | 208 | // surface size that would consist of the shadow margin | ||
| 237 | // surrounding the window, would there be any. | 209 | // surrounding the window, would there be any. | ||
| 238 | func (x *PopupLayout) SetShadowWidth(LeftVar int, RightVar int, TopVar int, BottomVar int) { | 210 | func (x *PopupLayout) SetShadowWidth(LeftVar int, RightVar int, TopVar int, BottomVar int) { | ||
| 239 | - | core.LazyRegister(&xPopupLayoutSetShadowWidth, "GDK", "gdk_popup_layout_set_shadow_width", false) | |||
| 240 | - | ||||
| 241 | xPopupLayoutSetShadowWidth(x.GoPointer(), LeftVar, RightVar, TopVar, BottomVar) | 211 | xPopupLayoutSetShadowWidth(x.GoPointer(), LeftVar, RightVar, TopVar, BottomVar) | ||
| 242 | } | 212 | } | ||
| 243 | 213 | ||||
| @@ -245,8 +215,6 @@ var xPopupLayoutSetSurfaceAnchor func(uintptr, Gravity) | |||||
| 245 | 215 | ||||
| 246 | // Set the anchor on the popup surface. | 216 | // Set the anchor on the popup surface. | ||
| 247 | func (x *PopupLayout) SetSurfaceAnchor(AnchorVar Gravity) { | 217 | func (x *PopupLayout) SetSurfaceAnchor(AnchorVar Gravity) { | ||
| 248 | - | core.LazyRegister(&xPopupLayoutSetSurfaceAnchor, "GDK", "gdk_popup_layout_set_surface_anchor", false) | |||
| 249 | - | ||||
| 250 | xPopupLayoutSetSurfaceAnchor(x.GoPointer(), AnchorVar) | 218 | xPopupLayoutSetSurfaceAnchor(x.GoPointer(), AnchorVar) | ||
| 251 | } | 219 | } | ||
| 252 | 220 | ||||
| @@ -254,8 +222,6 @@ var xPopupLayoutUnref func(uintptr) | |||||
| 254 | 222 | ||||
| 255 | // Decreases the reference count of @value. | 223 | // Decreases the reference count of @value. | ||
| 256 | func (x *PopupLayout) Unref() { | 224 | func (x *PopupLayout) Unref() { | ||
| 257 | - | core.LazyRegister(&xPopupLayoutUnref, "GDK", "gdk_popup_layout_unref", false) | |||
| 258 | - | ||||
| 259 | xPopupLayoutUnref(x.GoPointer()) | 225 | xPopupLayoutUnref(x.GoPointer()) | ||
| 260 | } | 226 | } | ||
| 261 | 227 | ||||
| @@ -279,7 +245,6 @@ type AnchorHints int | |||||
| 279 | var xAnchorHintsGLibType func() types.GType | 245 | var xAnchorHintsGLibType func() types.GType | ||
| 280 | 246 | ||||
| 281 | func AnchorHintsGLibType() types.GType { | 247 | func AnchorHintsGLibType() types.GType { | ||
| 282 | - | core.LazyRegister(&xAnchorHintsGLibType, "GDK", "gdk_anchor_hints_get_type", false) | |||
| 283 | return xAnchorHintsGLibType() | 248 | return xAnchorHintsGLibType() | ||
| 284 | } | 249 | } | ||
| 285 | 250 | ||||
| @@ -308,4 +273,35 @@ const ( | |||||
| 308 | func init() { | 273 | func init() { | ||
| 309 | core.SetPackageName("GDK", "gtk4") | 274 | core.SetPackageName("GDK", "gtk4") | ||
| 310 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | 275 | core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1", "libgtk-4.1.dylib"}) | ||
| 276 | + | var libs []uintptr | |||
| 277 | + | for _, libPath := range core.GetPaths("GDK") { | |||
| 278 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 279 | + | if err != nil { | |||
| 280 | + | panic(err) | |||
| 281 | + | } | |||
| 282 | + | libs = append(libs, lib) | |||
| 283 | + | } | |||
| 284 | + | ||||
| 285 | + | core.PuregoSafeRegister(&xAnchorHintsGLibType, libs, "gdk_anchor_hints_get_type") | |||
| 286 | + | ||||
| 287 | + | core.PuregoSafeRegister(&xPopupLayoutGLibType, libs, "gdk_popup_layout_get_type") | |||
| 288 | + | ||||
| 289 | + | core.PuregoSafeRegister(&xNewPopupLayout, libs, "gdk_popup_layout_new") | |||
| 290 | + | ||||
| 291 | + | core.PuregoSafeRegister(&xPopupLayoutCopy, libs, "gdk_popup_layout_copy") | |||
| 292 | + | core.PuregoSafeRegister(&xPopupLayoutEqual, libs, "gdk_popup_layout_equal") | |||
| 293 | + | core.PuregoSafeRegister(&xPopupLayoutGetAnchorHints, libs, "gdk_popup_layout_get_anchor_hints") | |||
| 294 | + | core.PuregoSafeRegister(&xPopupLayoutGetAnchorRect, libs, "gdk_popup_layout_get_anchor_rect") | |||
| 295 | + | core.PuregoSafeRegister(&xPopupLayoutGetOffset, libs, "gdk_popup_layout_get_offset") | |||
| 296 | + | core.PuregoSafeRegister(&xPopupLayoutGetRectAnchor, libs, "gdk_popup_layout_get_rect_anchor") | |||
| 297 | + | core.PuregoSafeRegister(&xPopupLayoutGetShadowWidth, libs, "gdk_popup_layout_get_shadow_width") | |||
| 298 | + | core.PuregoSafeRegister(&xPopupLayoutGetSurfaceAnchor, libs, "gdk_popup_layout_get_surface_anchor") | |||
| 299 | + | core.PuregoSafeRegister(&xPopupLayoutRef, libs, "gdk_popup_layout_ref") | |||
| 300 | + | core.PuregoSafeRegister(&xPopupLayoutSetAnchorHints, libs, "gdk_popup_layout_set_anchor_hints") | |||
| 301 | + | core.PuregoSafeRegister(&xPopupLayoutSetAnchorRect, libs, "gdk_popup_layout_set_anchor_rect") | |||
| 302 | + | core.PuregoSafeRegister(&xPopupLayoutSetOffset, libs, "gdk_popup_layout_set_offset") | |||
| 303 | + | core.PuregoSafeRegister(&xPopupLayoutSetRectAnchor, libs, "gdk_popup_layout_set_rect_anchor") | |||
| 304 | + | core.PuregoSafeRegister(&xPopupLayoutSetShadowWidth, libs, "gdk_popup_layout_set_shadow_width") | |||
| 305 | + | core.PuregoSafeRegister(&xPopupLayoutSetSurfaceAnchor, libs, "gdk_popup_layout_set_surface_anchor") | |||
| 306 | + | core.PuregoSafeRegister(&xPopupLayoutUnref, libs, "gdk_popup_layout_unref") | |||
| 311 | } | 307 | } | ||