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
| @@ -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" | |
| 10 | 11 | "github.com/bnema/puregotk/v4/gobject/types" | |
| @@ -52,7 +53,6 @@ type ShortcutsItem struct { | |||
| 52 | 53 | var xShortcutsItemGLibType func() types.GType | |
| 53 | 54 | ||
| 54 | 55 | func ShortcutsItemGLibType() types.GType { | |
| 55 | - | core.LazyRegister(&xShortcutsItemGLibType, "ADW", "adw_shortcuts_item_get_type", false) | |
| 56 | 56 | return xShortcutsItemGLibType() | |
| 57 | 57 | } | |
| 58 | 58 | ||
| @@ -66,7 +66,6 @@ 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) | |
| 70 | 69 | var cls *ShortcutsItem | |
| 71 | 70 | ||
| 72 | 71 | cret := xNewShortcutsItem(TitleVar, AcceleratorVar) | |
| @@ -83,7 +82,6 @@ var xNewShortcutsItemFromAction func(string, string) uintptr | |||
| 83 | 82 | ||
| 84 | 83 | // Creates a new `AdwShortcutsItem` with @title and @action_name. | |
| 85 | 84 | func NewShortcutsItemFromAction(TitleVar string, ActionNameVar string) *ShortcutsItem { | |
| 86 | - | core.LazyRegister(&xNewShortcutsItemFromAction, "ADW", "adw_shortcuts_item_new_from_action", false) | |
| 87 | 85 | var cls *ShortcutsItem | |
| 88 | 86 | ||
| 89 | 87 | cret := xNewShortcutsItemFromAction(TitleVar, ActionNameVar) | |
| @@ -100,8 +98,6 @@ var xShortcutsItemGetAccelerator func(uintptr) string | |||
| 100 | 98 | ||
| 101 | 99 | // Gets the accelerator of @self. | |
| 102 | 100 | func (x *ShortcutsItem) GetAccelerator() string { | |
| 103 | - | core.LazyRegister(&xShortcutsItemGetAccelerator, "ADW", "adw_shortcuts_item_get_accelerator", false) | |
| 104 | - | ||
| 105 | 101 | cret := xShortcutsItemGetAccelerator(x.GoPointer()) | |
| 106 | 102 | return cret | |
| 107 | 103 | } | |
| @@ -110,8 +106,6 @@ var xShortcutsItemGetActionName func(uintptr) string | |||
| 110 | 106 | ||
| 111 | 107 | // Gets the action name to get the accelerator from. | |
| 112 | 108 | func (x *ShortcutsItem) GetActionName() string { | |
| 113 | - | core.LazyRegister(&xShortcutsItemGetActionName, "ADW", "adw_shortcuts_item_get_action_name", false) | |
| 114 | - | ||
| 115 | 109 | cret := xShortcutsItemGetActionName(x.GoPointer()) | |
| 116 | 110 | return cret | |
| 117 | 111 | } | |
| @@ -120,8 +114,6 @@ var xShortcutsItemGetDirection func(uintptr) gtk.TextDirection | |||
| 120 | 114 | ||
| 121 | 115 | // Gets the direction of @self. | |
| 122 | 116 | func (x *ShortcutsItem) GetDirection() gtk.TextDirection { | |
| 123 | - | core.LazyRegister(&xShortcutsItemGetDirection, "ADW", "adw_shortcuts_item_get_direction", false) | |
| 124 | - | ||
| 125 | 117 | cret := xShortcutsItemGetDirection(x.GoPointer()) | |
| 126 | 118 | return cret | |
| 127 | 119 | } | |
| @@ -130,8 +122,6 @@ var xShortcutsItemGetSubtitle func(uintptr) string | |||
| 130 | 122 | ||
| 131 | 123 | // Gets the subtitle of @self. | |
| 132 | 124 | func (x *ShortcutsItem) GetSubtitle() string { | |
| 133 | - | core.LazyRegister(&xShortcutsItemGetSubtitle, "ADW", "adw_shortcuts_item_get_subtitle", false) | |
| 134 | - | ||
| 135 | 125 | cret := xShortcutsItemGetSubtitle(x.GoPointer()) | |
| 136 | 126 | return cret | |
| 137 | 127 | } | |
| @@ -140,8 +130,6 @@ var xShortcutsItemGetTitle func(uintptr) string | |||
| 140 | 130 | ||
| 141 | 131 | // Gets the title of @self. | |
| 142 | 132 | func (x *ShortcutsItem) GetTitle() string { | |
| 143 | - | core.LazyRegister(&xShortcutsItemGetTitle, "ADW", "adw_shortcuts_item_get_title", false) | |
| 144 | - | ||
| 145 | 133 | cret := xShortcutsItemGetTitle(x.GoPointer()) | |
| 146 | 134 | return cret | |
| 147 | 135 | } | |
| @@ -152,8 +140,6 @@ var xShortcutsItemSetAccelerator func(uintptr, string) | |||
| 152 | 140 | // | |
| 153 | 141 | // @accelerator must be in the format [class@ShortcutLabel] accepts. | |
| 154 | 142 | func (x *ShortcutsItem) SetAccelerator(AcceleratorVar string) { | |
| 155 | - | core.LazyRegister(&xShortcutsItemSetAccelerator, "ADW", "adw_shortcuts_item_set_accelerator", false) | |
| 156 | - | ||
| 157 | 143 | xShortcutsItemSetAccelerator(x.GoPointer(), AcceleratorVar) | |
| 158 | 144 | } | |
| 159 | 145 | ||
| @@ -161,8 +147,6 @@ var xShortcutsItemSetActionName func(uintptr, string) | |||
| 161 | 147 | ||
| 162 | 148 | // Sets the action name to get the accelerator from. | |
| 163 | 149 | func (x *ShortcutsItem) SetActionName(ActionNameVar string) { | |
| 164 | - | core.LazyRegister(&xShortcutsItemSetActionName, "ADW", "adw_shortcuts_item_set_action_name", false) | |
| 165 | - | ||
| 166 | 150 | xShortcutsItemSetActionName(x.GoPointer(), ActionNameVar) | |
| 167 | 151 | } | |
| 168 | 152 | ||
| @@ -173,8 +157,6 @@ var xShortcutsItemSetDirection func(uintptr, gtk.TextDirection) | |||
| 173 | 157 | // If set to [enum@Gtk.TextDirection.ltr] or [enum@Gtk.TextDirection.rtl], the | |
| 174 | 158 | // shortcut will only be displayed for this direction. | |
| 175 | 159 | func (x *ShortcutsItem) SetDirection(DirectionVar gtk.TextDirection) { | |
| 176 | - | core.LazyRegister(&xShortcutsItemSetDirection, "ADW", "adw_shortcuts_item_set_direction", false) | |
| 177 | - | ||
| 178 | 160 | xShortcutsItemSetDirection(x.GoPointer(), DirectionVar) | |
| 179 | 161 | } | |
| 180 | 162 | ||
| @@ -182,8 +164,6 @@ var xShortcutsItemSetSubtitle func(uintptr, string) | |||
| 182 | 164 | ||
| 183 | 165 | // Sets the subtitle of @self. | |
| 184 | 166 | func (x *ShortcutsItem) SetSubtitle(SubtitleVar string) { | |
| 185 | - | core.LazyRegister(&xShortcutsItemSetSubtitle, "ADW", "adw_shortcuts_item_set_subtitle", false) | |
| 186 | - | ||
| 187 | 167 | xShortcutsItemSetSubtitle(x.GoPointer(), SubtitleVar) | |
| 188 | 168 | } | |
| 189 | 169 | ||
| @@ -191,8 +171,6 @@ var xShortcutsItemSetTitle func(uintptr, string) | |||
| 191 | 171 | ||
| 192 | 172 | // Sets the title of @self. | |
| 193 | 173 | func (x *ShortcutsItem) SetTitle(TitleVar string) { | |
| 194 | - | core.LazyRegister(&xShortcutsItemSetTitle, "ADW", "adw_shortcuts_item_set_title", false) | |
| 195 | - | ||
| 196 | 174 | xShortcutsItemSetTitle(x.GoPointer(), TitleVar) | |
| 197 | 175 | } | |
| 198 | 176 | ||
| @@ -282,4 +260,28 @@ func (x *ShortcutsItem) GetPropertyTitle() string { | |||
| 282 | 260 | func init() { | |
| 283 | 261 | core.SetPackageName("ADW", "libadwaita-1") | |
| 284 | 262 | 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") | |
| 285 | 287 | } | |
| @@ -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" | 10 | "github.com/bnema/puregotk/v4/gobject" | ||
| 10 | "github.com/bnema/puregotk/v4/gobject/types" | 11 | "github.com/bnema/puregotk/v4/gobject/types" | ||
| @@ -52,7 +53,6 @@ type ShortcutsItem struct { | |||||
| 52 | var xShortcutsItemGLibType func() types.GType | 53 | var xShortcutsItemGLibType func() types.GType | ||
| 53 | 54 | ||||
| 54 | func ShortcutsItemGLibType() types.GType { | 55 | 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,7 +66,6 @@ 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) | |||
| 70 | var cls *ShortcutsItem | 69 | var cls *ShortcutsItem | ||
| 71 | 70 | ||||
| 72 | cret := xNewShortcutsItem(TitleVar, AcceleratorVar) | 71 | cret := xNewShortcutsItem(TitleVar, AcceleratorVar) | ||
| @@ -83,7 +82,6 @@ var xNewShortcutsItemFromAction func(string, string) uintptr | |||||
| 83 | 82 | ||||
| 84 | // Creates a new `AdwShortcutsItem` with @title and @action_name. | 83 | // Creates a new `AdwShortcutsItem` with @title and @action_name. | ||
| 85 | func NewShortcutsItemFromAction(TitleVar string, ActionNameVar string) *ShortcutsItem { | 84 | func NewShortcutsItemFromAction(TitleVar string, ActionNameVar string) *ShortcutsItem { | ||
| 86 | - | core.LazyRegister(&xNewShortcutsItemFromAction, "ADW", "adw_shortcuts_item_new_from_action", false) | |||
| 87 | var cls *ShortcutsItem | 85 | var cls *ShortcutsItem | ||
| 88 | 86 | ||||
| 89 | cret := xNewShortcutsItemFromAction(TitleVar, ActionNameVar) | 87 | cret := xNewShortcutsItemFromAction(TitleVar, ActionNameVar) | ||
| @@ -100,8 +98,6 @@ var xShortcutsItemGetAccelerator func(uintptr) string | |||||
| 100 | 98 | ||||
| 101 | // Gets the accelerator of @self. | 99 | // Gets the accelerator of @self. | ||
| 102 | func (x *ShortcutsItem) GetAccelerator() string { | 100 | func (x *ShortcutsItem) GetAccelerator() string { | ||
| 103 | - | core.LazyRegister(&xShortcutsItemGetAccelerator, "ADW", "adw_shortcuts_item_get_accelerator", false) | |||
| 104 | - | ||||
| 105 | cret := xShortcutsItemGetAccelerator(x.GoPointer()) | 101 | cret := xShortcutsItemGetAccelerator(x.GoPointer()) | ||
| 106 | return cret | 102 | return cret | ||
| 107 | } | 103 | } | ||
| @@ -110,8 +106,6 @@ var xShortcutsItemGetActionName func(uintptr) string | |||||
| 110 | 106 | ||||
| 111 | // Gets the action name to get the accelerator from. | 107 | // Gets the action name to get the accelerator from. | ||
| 112 | func (x *ShortcutsItem) GetActionName() string { | 108 | func (x *ShortcutsItem) GetActionName() string { | ||
| 113 | - | core.LazyRegister(&xShortcutsItemGetActionName, "ADW", "adw_shortcuts_item_get_action_name", false) | |||
| 114 | - | ||||
| 115 | cret := xShortcutsItemGetActionName(x.GoPointer()) | 109 | cret := xShortcutsItemGetActionName(x.GoPointer()) | ||
| 116 | return cret | 110 | return cret | ||
| 117 | } | 111 | } | ||
| @@ -120,8 +114,6 @@ var xShortcutsItemGetDirection func(uintptr) gtk.TextDirection | |||||
| 120 | 114 | ||||
| 121 | // Gets the direction of @self. | 115 | // Gets the direction of @self. | ||
| 122 | func (x *ShortcutsItem) GetDirection() gtk.TextDirection { | 116 | func (x *ShortcutsItem) GetDirection() gtk.TextDirection { | ||
| 123 | - | core.LazyRegister(&xShortcutsItemGetDirection, "ADW", "adw_shortcuts_item_get_direction", false) | |||
| 124 | - | ||||
| 125 | cret := xShortcutsItemGetDirection(x.GoPointer()) | 117 | cret := xShortcutsItemGetDirection(x.GoPointer()) | ||
| 126 | return cret | 118 | return cret | ||
| 127 | } | 119 | } | ||
| @@ -130,8 +122,6 @@ var xShortcutsItemGetSubtitle func(uintptr) string | |||||
| 130 | 122 | ||||
| 131 | // Gets the subtitle of @self. | 123 | // Gets the subtitle of @self. | ||
| 132 | func (x *ShortcutsItem) GetSubtitle() string { | 124 | func (x *ShortcutsItem) GetSubtitle() string { | ||
| 133 | - | core.LazyRegister(&xShortcutsItemGetSubtitle, "ADW", "adw_shortcuts_item_get_subtitle", false) | |||
| 134 | - | ||||
| 135 | cret := xShortcutsItemGetSubtitle(x.GoPointer()) | 125 | cret := xShortcutsItemGetSubtitle(x.GoPointer()) | ||
| 136 | return cret | 126 | return cret | ||
| 137 | } | 127 | } | ||
| @@ -140,8 +130,6 @@ var xShortcutsItemGetTitle func(uintptr) string | |||||
| 140 | 130 | ||||
| 141 | // Gets the title of @self. | 131 | // Gets the title of @self. | ||
| 142 | func (x *ShortcutsItem) GetTitle() string { | 132 | func (x *ShortcutsItem) GetTitle() string { | ||
| 143 | - | core.LazyRegister(&xShortcutsItemGetTitle, "ADW", "adw_shortcuts_item_get_title", false) | |||
| 144 | - | ||||
| 145 | cret := xShortcutsItemGetTitle(x.GoPointer()) | 133 | cret := xShortcutsItemGetTitle(x.GoPointer()) | ||
| 146 | return cret | 134 | return cret | ||
| 147 | } | 135 | } | ||
| @@ -152,8 +140,6 @@ var xShortcutsItemSetAccelerator func(uintptr, string) | |||||
| 152 | // | 140 | // | ||
| 153 | // @accelerator must be in the format [class@ShortcutLabel] accepts. | 141 | // @accelerator must be in the format [class@ShortcutLabel] accepts. | ||
| 154 | func (x *ShortcutsItem) SetAccelerator(AcceleratorVar string) { | 142 | func (x *ShortcutsItem) SetAccelerator(AcceleratorVar string) { | ||
| 155 | - | core.LazyRegister(&xShortcutsItemSetAccelerator, "ADW", "adw_shortcuts_item_set_accelerator", false) | |||
| 156 | - | ||||
| 157 | xShortcutsItemSetAccelerator(x.GoPointer(), AcceleratorVar) | 143 | xShortcutsItemSetAccelerator(x.GoPointer(), AcceleratorVar) | ||
| 158 | } | 144 | } | ||
| 159 | 145 | ||||
| @@ -161,8 +147,6 @@ var xShortcutsItemSetActionName func(uintptr, string) | |||||
| 161 | 147 | ||||
| 162 | // Sets the action name to get the accelerator from. | 148 | // Sets the action name to get the accelerator from. | ||
| 163 | func (x *ShortcutsItem) SetActionName(ActionNameVar string) { | 149 | func (x *ShortcutsItem) SetActionName(ActionNameVar string) { | ||
| 164 | - | core.LazyRegister(&xShortcutsItemSetActionName, "ADW", "adw_shortcuts_item_set_action_name", false) | |||
| 165 | - | ||||
| 166 | xShortcutsItemSetActionName(x.GoPointer(), ActionNameVar) | 150 | xShortcutsItemSetActionName(x.GoPointer(), ActionNameVar) | ||
| 167 | } | 151 | } | ||
| 168 | 152 | ||||
| @@ -173,8 +157,6 @@ var xShortcutsItemSetDirection func(uintptr, gtk.TextDirection) | |||||
| 173 | // If set to [enum@Gtk.TextDirection.ltr] or [enum@Gtk.TextDirection.rtl], the | 157 | // If set to [enum@Gtk.TextDirection.ltr] or [enum@Gtk.TextDirection.rtl], the | ||
| 174 | // shortcut will only be displayed for this direction. | 158 | // shortcut will only be displayed for this direction. | ||
| 175 | func (x *ShortcutsItem) SetDirection(DirectionVar gtk.TextDirection) { | 159 | func (x *ShortcutsItem) SetDirection(DirectionVar gtk.TextDirection) { | ||
| 176 | - | core.LazyRegister(&xShortcutsItemSetDirection, "ADW", "adw_shortcuts_item_set_direction", false) | |||
| 177 | - | ||||
| 178 | xShortcutsItemSetDirection(x.GoPointer(), DirectionVar) | 160 | xShortcutsItemSetDirection(x.GoPointer(), DirectionVar) | ||
| 179 | } | 161 | } | ||
| 180 | 162 | ||||
| @@ -182,8 +164,6 @@ var xShortcutsItemSetSubtitle func(uintptr, string) | |||||
| 182 | 164 | ||||
| 183 | // Sets the subtitle of @self. | 165 | // Sets the subtitle of @self. | ||
| 184 | func (x *ShortcutsItem) SetSubtitle(SubtitleVar string) { | 166 | func (x *ShortcutsItem) SetSubtitle(SubtitleVar string) { | ||
| 185 | - | core.LazyRegister(&xShortcutsItemSetSubtitle, "ADW", "adw_shortcuts_item_set_subtitle", false) | |||
| 186 | - | ||||
| 187 | xShortcutsItemSetSubtitle(x.GoPointer(), SubtitleVar) | 167 | xShortcutsItemSetSubtitle(x.GoPointer(), SubtitleVar) | ||
| 188 | } | 168 | } | ||
| 189 | 169 | ||||
| @@ -191,8 +171,6 @@ var xShortcutsItemSetTitle func(uintptr, string) | |||||
| 191 | 171 | ||||
| 192 | // Sets the title of @self. | 172 | // Sets the title of @self. | ||
| 193 | func (x *ShortcutsItem) SetTitle(TitleVar string) { | 173 | func (x *ShortcutsItem) SetTitle(TitleVar string) { | ||
| 194 | - | core.LazyRegister(&xShortcutsItemSetTitle, "ADW", "adw_shortcuts_item_set_title", false) | |||
| 195 | - | ||||
| 196 | xShortcutsItemSetTitle(x.GoPointer(), TitleVar) | 174 | xShortcutsItemSetTitle(x.GoPointer(), TitleVar) | ||
| 197 | } | 175 | } | ||
| 198 | 176 | ||||
| @@ -282,4 +260,28 @@ func (x *ShortcutsItem) GetPropertyTitle() string { | |||||
| 282 | func init() { | 260 | func init() { | ||
| 283 | core.SetPackageName("ADW", "libadwaita-1") | 261 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 284 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 262 | 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") | |||
| 285 | } | 287 | } | ||