fix(deps): repin puregotk lazy registration fix
- commit
- d685b6e820d6baba0d0dea254169664012ed203d
- author
- brice · · 2026-07-14 18:24 UTC
- parent
- ec6db2e
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
907 files · +27874 -25294
M go.mod +3 -1
| @@ -11,7 +11,7 @@ require ( | |||
| 11 | 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | |
| 12 | 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | |
| 13 | 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | |
| 14 | - | github.com/bnema/puregotk v0.7.0 | |
| 14 | + | github.com/bnema/puregotk v0.7.1-0.20260714181430-679a9ed72959 | |
| 15 | 15 | github.com/charmbracelet/bubbles v1.0.0 | |
| 16 | 16 | github.com/charmbracelet/bubbletea v1.3.10 | |
| 17 | 17 | github.com/charmbracelet/lipgloss v1.1.0 | |
| @@ -47,6 +47,7 @@ require ( | |||
| 47 | 47 | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect | |
| 48 | 48 | github.com/fatih/color v1.19.0 // indirect | |
| 49 | 49 | github.com/go-viper/mapstructure/v2 v2.5.0 // indirect | |
| 50 | + | github.com/google/go-cmp v0.7.0 // indirect | |
| 50 | 51 | github.com/inconshreveable/mousetrap v1.1.0 // indirect | |
| 51 | 52 | github.com/lucasb-eyer/go-colorful v1.4.0 // indirect | |
| 52 | 53 | github.com/mattn/go-colorable v0.1.14 // indirect | |
| @@ -80,6 +81,7 @@ require ( | |||
| 80 | 81 | golang.org/x/text v0.40.0 // indirect | |
| 81 | 82 | golang.org/x/tools v0.47.0 // indirect | |
| 82 | 83 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | |
| 84 | + | mvdan.cc/gofumpt v0.9.2 // indirect | |
| 83 | 85 | ) | |
| 84 | 86 | ||
| 85 | 87 | tool github.com/a-h/templ/cmd/templ | |
| @@ -11,7 +11,7 @@ require ( | |||||
| 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | ||
| 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | ||
| 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | ||
| 14 | - | github.com/bnema/puregotk v0.7.0 | 14 | + | github.com/bnema/puregotk v0.7.1-0.20260714181430-679a9ed72959 |
| 15 | github.com/charmbracelet/bubbles v1.0.0 | 15 | github.com/charmbracelet/bubbles v1.0.0 | ||
| 16 | github.com/charmbracelet/bubbletea v1.3.10 | 16 | github.com/charmbracelet/bubbletea v1.3.10 | ||
| 17 | github.com/charmbracelet/lipgloss v1.1.0 | 17 | github.com/charmbracelet/lipgloss v1.1.0 | ||
| @@ -47,6 +47,7 @@ require ( | |||||
| 47 | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect | 47 | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect | ||
| 48 | github.com/fatih/color v1.19.0 // indirect | 48 | github.com/fatih/color v1.19.0 // indirect | ||
| 49 | github.com/go-viper/mapstructure/v2 v2.5.0 // indirect | 49 | github.com/go-viper/mapstructure/v2 v2.5.0 // indirect | ||
| 50 | + | github.com/google/go-cmp v0.7.0 // indirect | |||
| 50 | github.com/inconshreveable/mousetrap v1.1.0 // indirect | 51 | github.com/inconshreveable/mousetrap v1.1.0 // indirect | ||
| 51 | github.com/lucasb-eyer/go-colorful v1.4.0 // indirect | 52 | github.com/lucasb-eyer/go-colorful v1.4.0 // indirect | ||
| 52 | github.com/mattn/go-colorable v0.1.14 // indirect | 53 | github.com/mattn/go-colorable v0.1.14 // indirect | ||
| @@ -80,6 +81,7 @@ require ( | |||||
| 80 | golang.org/x/text v0.40.0 // indirect | 81 | golang.org/x/text v0.40.0 // indirect | ||
| 81 | golang.org/x/tools v0.47.0 // indirect | 82 | golang.org/x/tools v0.47.0 // indirect | ||
| 82 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | 83 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | ||
| 84 | + | mvdan.cc/gofumpt v0.9.2 // indirect | |||
| 83 | ) | 85 | ) | ||
| 84 | 86 | ||||
| 85 | tool github.com/a-h/templ/cmd/templ | 87 | tool github.com/a-h/templ/cmd/templ | ||
M go.sum +4 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/internal/core/core.go +197 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/pkg/core/core.go +10 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-dialog.go +99 -64 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-window.go +95 -62 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-accent-color.go +7 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-action-row.go +33 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-alert-dialog.go +66 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-target.go +10 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-util.go +4 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation.go +24 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application-window.go +14 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application.go +3 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-avatar.go +22 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-banner.go +23 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bin.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bottom-sheet.go +47 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint-bin.go +10 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint.go +33 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-content.go +18 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-row.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-dots.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-lines.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel.go +47 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-layout.go +14 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-scrollable.go +17 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp.go +17 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-combo-row.go +34 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-dialog.go +45 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-easing.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-entry-row.go +40 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-enum-list-model.go +13 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-expander-row.go +40 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-flap.go +61 -48 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-fold-threshold-policy.go +10 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-header-bar.go +36 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-inline-view-switcher.go +18 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout-slot.go +4 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout.go +7 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-leaflet.go +69 -56 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-length-unit.go +5 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-main.go +5 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-message-dialog.go +63 -44 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-multi-layout-view.go +17 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-direction.go +10 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-split-view.go +36 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-view.go +60 -49 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-overlay-split-view.go +48 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-password-entry-row.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-dialog.go +23 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-group.go +24 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-page.go +38 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-row.go +18 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-window.go +31 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcut-label.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-dialog.go +4 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-item.go +23 -25
| @@ -5,7 +5,6 @@ import ( | |||
| 5 | 5 | "structs" | |
| 6 | 6 | "unsafe" | |
| 7 | 7 | ||
| 8 | - | "github.com/bnema/purego" | |
| 9 | 8 | "github.com/bnema/puregotk/pkg/core" | |
| 10 | 9 | "github.com/bnema/puregotk/v4/gobject" | |
| 11 | 10 | "github.com/bnema/puregotk/v4/gobject/types" | |
| @@ -53,6 +52,7 @@ type ShortcutsItem struct { | |||
| 53 | 52 | var xShortcutsItemGLibType func() types.GType | |
| 54 | 53 | ||
| 55 | 54 | func ShortcutsItemGLibType() types.GType { | |
| 55 | + | core.LazyRegister(&xShortcutsItemGLibType, "ADW", "adw_shortcuts_item_get_type", false) | |
| 56 | 56 | return xShortcutsItemGLibType() | |
| 57 | 57 | } | |
| 58 | 58 | ||
| @@ -66,6 +66,7 @@ var xNewShortcutsItem func(string, string) uintptr | |||
| 66 | 66 | ||
| 67 | 67 | // Creates a new `AdwShortcutsItem` with @title and @accelerator. | |
| 68 | 68 | func NewShortcutsItem(TitleVar string, AcceleratorVar string) *ShortcutsItem { | |
| 69 | + | core.LazyRegister(&xNewShortcutsItem, "ADW", "adw_shortcuts_item_new", false) | |
| 69 | 70 | var cls *ShortcutsItem | |
| 70 | 71 | ||
| 71 | 72 | cret := xNewShortcutsItem(TitleVar, AcceleratorVar) | |
| @@ -82,6 +83,7 @@ var xNewShortcutsItemFromAction func(string, string) uintptr | |||
| 82 | 83 | ||
| 83 | 84 | // Creates a new `AdwShortcutsItem` with @title and @action_name. | |
| 84 | 85 | func NewShortcutsItemFromAction(TitleVar string, ActionNameVar string) *ShortcutsItem { | |
| 86 | + | core.LazyRegister(&xNewShortcutsItemFromAction, "ADW", "adw_shortcuts_item_new_from_action", false) | |
| 85 | 87 | var cls *ShortcutsItem | |
| 86 | 88 | ||
| 87 | 89 | cret := xNewShortcutsItemFromAction(TitleVar, ActionNameVar) | |
| @@ -98,6 +100,8 @@ var xShortcutsItemGetAccelerator func(uintptr) string | |||
| 98 | 100 | ||
| 99 | 101 | // Gets the accelerator of @self. | |
| 100 | 102 | func (x *ShortcutsItem) GetAccelerator() string { | |
| 103 | + | core.LazyRegister(&xShortcutsItemGetAccelerator, "ADW", "adw_shortcuts_item_get_accelerator", false) | |
| 104 | + | ||
| 101 | 105 | cret := xShortcutsItemGetAccelerator(x.GoPointer()) | |
| 102 | 106 | return cret | |
| 103 | 107 | } | |
| @@ -106,6 +110,8 @@ var xShortcutsItemGetActionName func(uintptr) string | |||
| 106 | 110 | ||
| 107 | 111 | // Gets the action name to get the accelerator from. | |
| 108 | 112 | func (x *ShortcutsItem) GetActionName() string { | |
| 113 | + | core.LazyRegister(&xShortcutsItemGetActionName, "ADW", "adw_shortcuts_item_get_action_name", false) | |
| 114 | + | ||
| 109 | 115 | cret := xShortcutsItemGetActionName(x.GoPointer()) | |
| 110 | 116 | return cret | |
| 111 | 117 | } | |
| @@ -114,6 +120,8 @@ var xShortcutsItemGetDirection func(uintptr) gtk.TextDirection | |||
| 114 | 120 | ||
| 115 | 121 | // Gets the direction of @self. | |
| 116 | 122 | func (x *ShortcutsItem) GetDirection() gtk.TextDirection { | |
| 123 | + | core.LazyRegister(&xShortcutsItemGetDirection, "ADW", "adw_shortcuts_item_get_direction", false) | |
| 124 | + | ||
| 117 | 125 | cret := xShortcutsItemGetDirection(x.GoPointer()) | |
| 118 | 126 | return cret | |
| 119 | 127 | } | |
| @@ -122,6 +130,8 @@ var xShortcutsItemGetSubtitle func(uintptr) string | |||
| 122 | 130 | ||
| 123 | 131 | // Gets the subtitle of @self. | |
| 124 | 132 | func (x *ShortcutsItem) GetSubtitle() string { | |
| 133 | + | core.LazyRegister(&xShortcutsItemGetSubtitle, "ADW", "adw_shortcuts_item_get_subtitle", false) | |
| 134 | + | ||
| 125 | 135 | cret := xShortcutsItemGetSubtitle(x.GoPointer()) | |
| 126 | 136 | return cret | |
| 127 | 137 | } | |
| @@ -130,6 +140,8 @@ var xShortcutsItemGetTitle func(uintptr) string | |||
| 130 | 140 | ||
| 131 | 141 | // Gets the title of @self. | |
| 132 | 142 | func (x *ShortcutsItem) GetTitle() string { | |
| 143 | + | core.LazyRegister(&xShortcutsItemGetTitle, "ADW", "adw_shortcuts_item_get_title", false) | |
| 144 | + | ||
| 133 | 145 | cret := xShortcutsItemGetTitle(x.GoPointer()) | |
| 134 | 146 | return cret | |
| 135 | 147 | } | |
| @@ -140,6 +152,8 @@ var xShortcutsItemSetAccelerator func(uintptr, string) | |||
| 140 | 152 | // | |
| 141 | 153 | // @accelerator must be in the format [class@ShortcutLabel] accepts. | |
| 142 | 154 | func (x *ShortcutsItem) SetAccelerator(AcceleratorVar string) { | |
| 155 | + | core.LazyRegister(&xShortcutsItemSetAccelerator, "ADW", "adw_shortcuts_item_set_accelerator", false) | |
| 156 | + | ||
| 143 | 157 | xShortcutsItemSetAccelerator(x.GoPointer(), AcceleratorVar) | |
| 144 | 158 | } | |
| 145 | 159 | ||
| @@ -147,6 +161,8 @@ var xShortcutsItemSetActionName func(uintptr, string) | |||
| 147 | 161 | ||
| 148 | 162 | // Sets the action name to get the accelerator from. | |
| 149 | 163 | func (x *ShortcutsItem) SetActionName(ActionNameVar string) { | |
| 164 | + | core.LazyRegister(&xShortcutsItemSetActionName, "ADW", "adw_shortcuts_item_set_action_name", false) | |
| 165 | + | ||
| 150 | 166 | xShortcutsItemSetActionName(x.GoPointer(), ActionNameVar) | |
| 151 | 167 | } | |
| 152 | 168 | ||
| @@ -157,6 +173,8 @@ var xShortcutsItemSetDirection func(uintptr, gtk.TextDirection) | |||
| 157 | 173 | // If set to [enum@Gtk.TextDirection.ltr] or [enum@Gtk.TextDirection.rtl], the | |
| 158 | 174 | // shortcut will only be displayed for this direction. | |
| 159 | 175 | func (x *ShortcutsItem) SetDirection(DirectionVar gtk.TextDirection) { | |
| 176 | + | core.LazyRegister(&xShortcutsItemSetDirection, "ADW", "adw_shortcuts_item_set_direction", false) | |
| 177 | + | ||
| 160 | 178 | xShortcutsItemSetDirection(x.GoPointer(), DirectionVar) | |
| 161 | 179 | } | |
| 162 | 180 | ||
| @@ -164,6 +182,8 @@ var xShortcutsItemSetSubtitle func(uintptr, string) | |||
| 164 | 182 | ||
| 165 | 183 | // Sets the subtitle of @self. | |
| 166 | 184 | func (x *ShortcutsItem) SetSubtitle(SubtitleVar string) { | |
| 185 | + | core.LazyRegister(&xShortcutsItemSetSubtitle, "ADW", "adw_shortcuts_item_set_subtitle", false) | |
| 186 | + | ||
| 167 | 187 | xShortcutsItemSetSubtitle(x.GoPointer(), SubtitleVar) | |
| 168 | 188 | } | |
| 169 | 189 | ||
| @@ -171,6 +191,8 @@ var xShortcutsItemSetTitle func(uintptr, string) | |||
| 171 | 191 | ||
| 172 | 192 | // Sets the title of @self. | |
| 173 | 193 | func (x *ShortcutsItem) SetTitle(TitleVar string) { | |
| 194 | + | core.LazyRegister(&xShortcutsItemSetTitle, "ADW", "adw_shortcuts_item_set_title", false) | |
| 195 | + | ||
| 174 | 196 | xShortcutsItemSetTitle(x.GoPointer(), TitleVar) | |
| 175 | 197 | } | |
| 176 | 198 | ||
| @@ -260,28 +282,4 @@ func (x *ShortcutsItem) GetPropertyTitle() string { | |||
| 260 | 282 | func init() { | |
| 261 | 283 | core.SetPackageName("ADW", "libadwaita-1") | |
| 262 | 284 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | |
| 263 | - | var libs []uintptr | |
| 264 | - | for _, libPath := range core.GetPaths("ADW") { | |
| 265 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 266 | - | if err != nil { | |
| 267 | - | panic(err) | |
| 268 | - | } | |
| 269 | - | libs = append(libs, lib) | |
| 270 | - | } | |
| 271 | - | ||
| 272 | - | core.PuregoSafeRegister(&xShortcutsItemGLibType, libs, "adw_shortcuts_item_get_type") | |
| 273 | - | ||
| 274 | - | core.PuregoSafeRegister(&xNewShortcutsItem, libs, "adw_shortcuts_item_new") | |
| 275 | - | core.PuregoSafeRegister(&xNewShortcutsItemFromAction, libs, "adw_shortcuts_item_new_from_action") | |
| 276 | - | ||
| 277 | - | core.PuregoSafeRegister(&xShortcutsItemGetAccelerator, libs, "adw_shortcuts_item_get_accelerator") | |
| 278 | - | core.PuregoSafeRegister(&xShortcutsItemGetActionName, libs, "adw_shortcuts_item_get_action_name") | |
| 279 | - | core.PuregoSafeRegister(&xShortcutsItemGetDirection, libs, "adw_shortcuts_item_get_direction") | |
| 280 | - | core.PuregoSafeRegister(&xShortcutsItemGetSubtitle, libs, "adw_shortcuts_item_get_subtitle") | |
| 281 | - | core.PuregoSafeRegister(&xShortcutsItemGetTitle, libs, "adw_shortcuts_item_get_title") | |
| 282 | - | core.PuregoSafeRegister(&xShortcutsItemSetAccelerator, libs, "adw_shortcuts_item_set_accelerator") | |
| 283 | - | core.PuregoSafeRegister(&xShortcutsItemSetActionName, libs, "adw_shortcuts_item_set_action_name") | |
| 284 | - | core.PuregoSafeRegister(&xShortcutsItemSetDirection, libs, "adw_shortcuts_item_set_direction") | |
| 285 | - | core.PuregoSafeRegister(&xShortcutsItemSetSubtitle, libs, "adw_shortcuts_item_set_subtitle") | |
| 286 | - | core.PuregoSafeRegister(&xShortcutsItemSetTitle, libs, "adw_shortcuts_item_set_title") | |
| 287 | 285 | } | |
| @@ -5,7 +5,6 @@ import ( | |||||
| 5 | "structs" | 5 | "structs" | ||
| 6 | "unsafe" | 6 | "unsafe" | ||
| 7 | 7 | ||||
| 8 | - | "github.com/bnema/purego" | |||
| 9 | "github.com/bnema/puregotk/pkg/core" | 8 | "github.com/bnema/puregotk/pkg/core" | ||
| 10 | "github.com/bnema/puregotk/v4/gobject" | 9 | "github.com/bnema/puregotk/v4/gobject" | ||
| 11 | "github.com/bnema/puregotk/v4/gobject/types" | 10 | "github.com/bnema/puregotk/v4/gobject/types" | ||
| @@ -53,6 +52,7 @@ type ShortcutsItem struct { | |||||
| 53 | var xShortcutsItemGLibType func() types.GType | 52 | var xShortcutsItemGLibType func() types.GType | ||
| 54 | 53 | ||||
| 55 | func ShortcutsItemGLibType() types.GType { | 54 | func ShortcutsItemGLibType() types.GType { | ||
| 55 | + | core.LazyRegister(&xShortcutsItemGLibType, "ADW", "adw_shortcuts_item_get_type", false) | |||
| 56 | return xShortcutsItemGLibType() | 56 | return xShortcutsItemGLibType() | ||
| 57 | } | 57 | } | ||
| 58 | 58 | ||||
| @@ -66,6 +66,7 @@ var xNewShortcutsItem func(string, string) uintptr | |||||
| 66 | 66 | ||||
| 67 | // Creates a new `AdwShortcutsItem` with @title and @accelerator. | 67 | // Creates a new `AdwShortcutsItem` with @title and @accelerator. | ||
| 68 | func NewShortcutsItem(TitleVar string, AcceleratorVar string) *ShortcutsItem { | 68 | func NewShortcutsItem(TitleVar string, AcceleratorVar string) *ShortcutsItem { | ||
| 69 | + | core.LazyRegister(&xNewShortcutsItem, "ADW", "adw_shortcuts_item_new", false) | |||
| 69 | var cls *ShortcutsItem | 70 | var cls *ShortcutsItem | ||
| 70 | 71 | ||||
| 71 | cret := xNewShortcutsItem(TitleVar, AcceleratorVar) | 72 | cret := xNewShortcutsItem(TitleVar, AcceleratorVar) | ||
| @@ -82,6 +83,7 @@ var xNewShortcutsItemFromAction func(string, string) uintptr | |||||
| 82 | 83 | ||||
| 83 | // Creates a new `AdwShortcutsItem` with @title and @action_name. | 84 | // Creates a new `AdwShortcutsItem` with @title and @action_name. | ||
| 84 | func NewShortcutsItemFromAction(TitleVar string, ActionNameVar string) *ShortcutsItem { | 85 | func NewShortcutsItemFromAction(TitleVar string, ActionNameVar string) *ShortcutsItem { | ||
| 86 | + | core.LazyRegister(&xNewShortcutsItemFromAction, "ADW", "adw_shortcuts_item_new_from_action", false) | |||
| 85 | var cls *ShortcutsItem | 87 | var cls *ShortcutsItem | ||
| 86 | 88 | ||||
| 87 | cret := xNewShortcutsItemFromAction(TitleVar, ActionNameVar) | 89 | cret := xNewShortcutsItemFromAction(TitleVar, ActionNameVar) | ||
| @@ -98,6 +100,8 @@ var xShortcutsItemGetAccelerator func(uintptr) string | |||||
| 98 | 100 | ||||
| 99 | // Gets the accelerator of @self. | 101 | // Gets the accelerator of @self. | ||
| 100 | func (x *ShortcutsItem) GetAccelerator() string { | 102 | func (x *ShortcutsItem) GetAccelerator() string { | ||
| 103 | + | core.LazyRegister(&xShortcutsItemGetAccelerator, "ADW", "adw_shortcuts_item_get_accelerator", false) | |||
| 104 | + | ||||
| 101 | cret := xShortcutsItemGetAccelerator(x.GoPointer()) | 105 | cret := xShortcutsItemGetAccelerator(x.GoPointer()) | ||
| 102 | return cret | 106 | return cret | ||
| 103 | } | 107 | } | ||
| @@ -106,6 +110,8 @@ var xShortcutsItemGetActionName func(uintptr) string | |||||
| 106 | 110 | ||||
| 107 | // Gets the action name to get the accelerator from. | 111 | // Gets the action name to get the accelerator from. | ||
| 108 | func (x *ShortcutsItem) GetActionName() string { | 112 | func (x *ShortcutsItem) GetActionName() string { | ||
| 113 | + | core.LazyRegister(&xShortcutsItemGetActionName, "ADW", "adw_shortcuts_item_get_action_name", false) | |||
| 114 | + | ||||
| 109 | cret := xShortcutsItemGetActionName(x.GoPointer()) | 115 | cret := xShortcutsItemGetActionName(x.GoPointer()) | ||
| 110 | return cret | 116 | return cret | ||
| 111 | } | 117 | } | ||
| @@ -114,6 +120,8 @@ var xShortcutsItemGetDirection func(uintptr) gtk.TextDirection | |||||
| 114 | 120 | ||||
| 115 | // Gets the direction of @self. | 121 | // Gets the direction of @self. | ||
| 116 | func (x *ShortcutsItem) GetDirection() gtk.TextDirection { | 122 | func (x *ShortcutsItem) GetDirection() gtk.TextDirection { | ||
| 123 | + | core.LazyRegister(&xShortcutsItemGetDirection, "ADW", "adw_shortcuts_item_get_direction", false) | |||
| 124 | + | ||||
| 117 | cret := xShortcutsItemGetDirection(x.GoPointer()) | 125 | cret := xShortcutsItemGetDirection(x.GoPointer()) | ||
| 118 | return cret | 126 | return cret | ||
| 119 | } | 127 | } | ||
| @@ -122,6 +130,8 @@ var xShortcutsItemGetSubtitle func(uintptr) string | |||||
| 122 | 130 | ||||
| 123 | // Gets the subtitle of @self. | 131 | // Gets the subtitle of @self. | ||
| 124 | func (x *ShortcutsItem) GetSubtitle() string { | 132 | func (x *ShortcutsItem) GetSubtitle() string { | ||
| 133 | + | core.LazyRegister(&xShortcutsItemGetSubtitle, "ADW", "adw_shortcuts_item_get_subtitle", false) | |||
| 134 | + | ||||
| 125 | cret := xShortcutsItemGetSubtitle(x.GoPointer()) | 135 | cret := xShortcutsItemGetSubtitle(x.GoPointer()) | ||
| 126 | return cret | 136 | return cret | ||
| 127 | } | 137 | } | ||
| @@ -130,6 +140,8 @@ var xShortcutsItemGetTitle func(uintptr) string | |||||
| 130 | 140 | ||||
| 131 | // Gets the title of @self. | 141 | // Gets the title of @self. | ||
| 132 | func (x *ShortcutsItem) GetTitle() string { | 142 | func (x *ShortcutsItem) GetTitle() string { | ||
| 143 | + | core.LazyRegister(&xShortcutsItemGetTitle, "ADW", "adw_shortcuts_item_get_title", false) | |||
| 144 | + | ||||
| 133 | cret := xShortcutsItemGetTitle(x.GoPointer()) | 145 | cret := xShortcutsItemGetTitle(x.GoPointer()) | ||
| 134 | return cret | 146 | return cret | ||
| 135 | } | 147 | } | ||
| @@ -140,6 +152,8 @@ var xShortcutsItemSetAccelerator func(uintptr, string) | |||||
| 140 | // | 152 | // | ||
| 141 | // @accelerator must be in the format [class@ShortcutLabel] accepts. | 153 | // @accelerator must be in the format [class@ShortcutLabel] accepts. | ||
| 142 | func (x *ShortcutsItem) SetAccelerator(AcceleratorVar string) { | 154 | func (x *ShortcutsItem) SetAccelerator(AcceleratorVar string) { | ||
| 155 | + | core.LazyRegister(&xShortcutsItemSetAccelerator, "ADW", "adw_shortcuts_item_set_accelerator", false) | |||
| 156 | + | ||||
| 143 | xShortcutsItemSetAccelerator(x.GoPointer(), AcceleratorVar) | 157 | xShortcutsItemSetAccelerator(x.GoPointer(), AcceleratorVar) | ||
| 144 | } | 158 | } | ||
| 145 | 159 | ||||
| @@ -147,6 +161,8 @@ var xShortcutsItemSetActionName func(uintptr, string) | |||||
| 147 | 161 | ||||
| 148 | // Sets the action name to get the accelerator from. | 162 | // Sets the action name to get the accelerator from. | ||
| 149 | func (x *ShortcutsItem) SetActionName(ActionNameVar string) { | 163 | func (x *ShortcutsItem) SetActionName(ActionNameVar string) { | ||
| 164 | + | core.LazyRegister(&xShortcutsItemSetActionName, "ADW", "adw_shortcuts_item_set_action_name", false) | |||
| 165 | + | ||||
| 150 | xShortcutsItemSetActionName(x.GoPointer(), ActionNameVar) | 166 | xShortcutsItemSetActionName(x.GoPointer(), ActionNameVar) | ||
| 151 | } | 167 | } | ||
| 152 | 168 | ||||
| @@ -157,6 +173,8 @@ var xShortcutsItemSetDirection func(uintptr, gtk.TextDirection) | |||||
| 157 | // If set to [enum@Gtk.TextDirection.ltr] or [enum@Gtk.TextDirection.rtl], the | 173 | // If set to [enum@Gtk.TextDirection.ltr] or [enum@Gtk.TextDirection.rtl], the | ||
| 158 | // shortcut will only be displayed for this direction. | 174 | // shortcut will only be displayed for this direction. | ||
| 159 | func (x *ShortcutsItem) SetDirection(DirectionVar gtk.TextDirection) { | 175 | func (x *ShortcutsItem) SetDirection(DirectionVar gtk.TextDirection) { | ||
| 176 | + | core.LazyRegister(&xShortcutsItemSetDirection, "ADW", "adw_shortcuts_item_set_direction", false) | |||
| 177 | + | ||||
| 160 | xShortcutsItemSetDirection(x.GoPointer(), DirectionVar) | 178 | xShortcutsItemSetDirection(x.GoPointer(), DirectionVar) | ||
| 161 | } | 179 | } | ||
| 162 | 180 | ||||
| @@ -164,6 +182,8 @@ var xShortcutsItemSetSubtitle func(uintptr, string) | |||||
| 164 | 182 | ||||
| 165 | // Sets the subtitle of @self. | 183 | // Sets the subtitle of @self. | ||
| 166 | func (x *ShortcutsItem) SetSubtitle(SubtitleVar string) { | 184 | func (x *ShortcutsItem) SetSubtitle(SubtitleVar string) { | ||
| 185 | + | core.LazyRegister(&xShortcutsItemSetSubtitle, "ADW", "adw_shortcuts_item_set_subtitle", false) | |||
| 186 | + | ||||
| 167 | xShortcutsItemSetSubtitle(x.GoPointer(), SubtitleVar) | 187 | xShortcutsItemSetSubtitle(x.GoPointer(), SubtitleVar) | ||
| 168 | } | 188 | } | ||
| 169 | 189 | ||||
| @@ -171,6 +191,8 @@ var xShortcutsItemSetTitle func(uintptr, string) | |||||
| 171 | 191 | ||||
| 172 | // Sets the title of @self. | 192 | // Sets the title of @self. | ||
| 173 | func (x *ShortcutsItem) SetTitle(TitleVar string) { | 193 | func (x *ShortcutsItem) SetTitle(TitleVar string) { | ||
| 194 | + | core.LazyRegister(&xShortcutsItemSetTitle, "ADW", "adw_shortcuts_item_set_title", false) | |||
| 195 | + | ||||
| 174 | xShortcutsItemSetTitle(x.GoPointer(), TitleVar) | 196 | xShortcutsItemSetTitle(x.GoPointer(), TitleVar) | ||
| 175 | } | 197 | } | ||
| 176 | 198 | ||||
| @@ -260,28 +282,4 @@ func (x *ShortcutsItem) GetPropertyTitle() string { | |||||
| 260 | func init() { | 282 | func init() { | ||
| 261 | core.SetPackageName("ADW", "libadwaita-1") | 283 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 262 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 284 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | ||
| 263 | - | var libs []uintptr | |||
| 264 | - | for _, libPath := range core.GetPaths("ADW") { | |||
| 265 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 266 | - | if err != nil { | |||
| 267 | - | panic(err) | |||
| 268 | - | } | |||
| 269 | - | libs = append(libs, lib) | |||
| 270 | - | } | |||
| 271 | - | ||||
| 272 | - | core.PuregoSafeRegister(&xShortcutsItemGLibType, libs, "adw_shortcuts_item_get_type") | |||
| 273 | - | ||||
| 274 | - | core.PuregoSafeRegister(&xNewShortcutsItem, libs, "adw_shortcuts_item_new") | |||
| 275 | - | core.PuregoSafeRegister(&xNewShortcutsItemFromAction, libs, "adw_shortcuts_item_new_from_action") | |||
| 276 | - | ||||
| 277 | - | core.PuregoSafeRegister(&xShortcutsItemGetAccelerator, libs, "adw_shortcuts_item_get_accelerator") | |||
| 278 | - | core.PuregoSafeRegister(&xShortcutsItemGetActionName, libs, "adw_shortcuts_item_get_action_name") | |||
| 279 | - | core.PuregoSafeRegister(&xShortcutsItemGetDirection, libs, "adw_shortcuts_item_get_direction") | |||
| 280 | - | core.PuregoSafeRegister(&xShortcutsItemGetSubtitle, libs, "adw_shortcuts_item_get_subtitle") | |||
| 281 | - | core.PuregoSafeRegister(&xShortcutsItemGetTitle, libs, "adw_shortcuts_item_get_title") | |||
| 282 | - | core.PuregoSafeRegister(&xShortcutsItemSetAccelerator, libs, "adw_shortcuts_item_set_accelerator") | |||
| 283 | - | core.PuregoSafeRegister(&xShortcutsItemSetActionName, libs, "adw_shortcuts_item_set_action_name") | |||
| 284 | - | core.PuregoSafeRegister(&xShortcutsItemSetDirection, libs, "adw_shortcuts_item_set_direction") | |||
| 285 | - | core.PuregoSafeRegister(&xShortcutsItemSetSubtitle, libs, "adw_shortcuts_item_set_subtitle") | |||
| 286 | - | core.PuregoSafeRegister(&xShortcutsItemSetTitle, libs, "adw_shortcuts_item_set_title") | |||
| 287 | } | 285 | } | ||