Merge pull request #349 from bnema/fix/rollback-lazy-puregotk
fix(deps): emergency rollback puregotk lazy registration regression
905 files · +25263 -27842
M go.mod +1 -1
| @@ -11,7 +11,7 @@ require ( | |||
| 11 | 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | |
| 12 | 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | |
| 13 | 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | |
| 14 | - | github.com/bnema/puregotk v0.7.1-0.20260714170452-0b6b9b901234 | |
| 14 | + | github.com/bnema/puregotk v0.7.0 | |
| 15 | 15 | github.com/charmbracelet/bubbles v1.0.0 | |
| 16 | 16 | github.com/charmbracelet/bubbletea v1.3.10 | |
| 17 | 17 | github.com/charmbracelet/lipgloss v1.1.0 | |
| @@ -11,7 +11,7 @@ require ( | |||||
| 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | ||
| 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | ||
| 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | ||
| 14 | - | github.com/bnema/puregotk v0.7.1-0.20260714170452-0b6b9b901234 | 14 | + | github.com/bnema/puregotk v0.7.0 |
| 15 | github.com/charmbracelet/bubbles v1.0.0 | 15 | github.com/charmbracelet/bubbles v1.0.0 | ||
| 16 | github.com/charmbracelet/bubbletea v1.3.10 | 16 | github.com/charmbracelet/bubbletea v1.3.10 | ||
| 17 | github.com/charmbracelet/lipgloss v1.1.0 | 17 | github.com/charmbracelet/lipgloss v1.1.0 | ||
M go.sum +0 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/internal/core/core.go +4 -197 generated file: collapsed
M vendor/github.com/bnema/puregotk/pkg/core/core.go +0 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-dialog.go +64 -99 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-window.go +62 -95 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-accent-color.go +15 -7 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-action-row.go +29 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-alert-dialog.go +47 -66 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-target.go +27 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-util.go +12 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation.go +26 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application-window.go +22 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application.go +15 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-avatar.go +25 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-banner.go +26 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bin.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bottom-sheet.go +38 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint-bin.go +19 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint.go +37 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-content.go +22 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-row.go +18 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-dots.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-lines.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel.go +37 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-layout.go +20 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-scrollable.go +22 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp.go +22 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-combo-row.go +33 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-dialog.go +38 -45 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-easing.go +13 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-entry-row.go +33 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-enum-list-model.go +22 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-expander-row.go +33 -40
| @@ -5,6 +5,7 @@ import ( | |||
| 5 | 5 | "structs" | |
| 6 | 6 | "unsafe" | |
| 7 | 7 | ||
| 8 | + | "github.com/bnema/purego" | |
| 8 | 9 | "github.com/bnema/puregotk/pkg/core" | |
| 9 | 10 | "github.com/bnema/puregotk/v4/glib" | |
| 10 | 11 | "github.com/bnema/puregotk/v4/gobject" | |
| @@ -78,7 +79,6 @@ type ExpanderRow struct { | |||
| 78 | 79 | var xExpanderRowGLibType func() types.GType | |
| 79 | 80 | ||
| 80 | 81 | func ExpanderRowGLibType() types.GType { | |
| 81 | - | core.LazyRegister(&xExpanderRowGLibType, "ADW", "adw_expander_row_get_type", false) | |
| 82 | 82 | return xExpanderRowGLibType() | |
| 83 | 83 | } | |
| 84 | 84 | ||
| @@ -92,7 +92,6 @@ var xNewExpanderRow func() uintptr | |||
| 92 | 92 | ||
| 93 | 93 | // Creates a new `AdwExpanderRow`. | |
| 94 | 94 | func NewExpanderRow() *ExpanderRow { | |
| 95 | - | core.LazyRegister(&xNewExpanderRow, "ADW", "adw_expander_row_new", false) | |
| 96 | 95 | var cls *ExpanderRow | |
| 97 | 96 | ||
| 98 | 97 | cret := xNewExpanderRow() | |
| @@ -110,8 +109,6 @@ var xExpanderRowAddAction func(uintptr, uintptr) | |||
| 110 | 109 | ||
| 111 | 110 | // Adds an action widget to @self. | |
| 112 | 111 | func (x *ExpanderRow) AddAction(WidgetVar *gtk.Widget) { | |
| 113 | - | core.LazyRegister(&xExpanderRowAddAction, "ADW", "adw_expander_row_add_action", false) | |
| 114 | - | ||
| 115 | 112 | xExpanderRowAddAction(x.GoPointer(), WidgetVar.GoPointer()) | |
| 116 | 113 | } | |
| 117 | 114 | ||
| @@ -119,8 +116,6 @@ var xExpanderRowAddPrefix func(uintptr, uintptr) | |||
| 119 | 116 | ||
| 120 | 117 | // Adds a prefix widget to @self. | |
| 121 | 118 | func (x *ExpanderRow) AddPrefix(WidgetVar *gtk.Widget) { | |
| 122 | - | core.LazyRegister(&xExpanderRowAddPrefix, "ADW", "adw_expander_row_add_prefix", false) | |
| 123 | - | ||
| 124 | 119 | xExpanderRowAddPrefix(x.GoPointer(), WidgetVar.GoPointer()) | |
| 125 | 120 | } | |
| 126 | 121 | ||
| @@ -130,8 +125,6 @@ var xExpanderRowAddRow func(uintptr, uintptr) | |||
| 130 | 125 | // | |
| 131 | 126 | // The widget will appear in the expanding list below @self. | |
| 132 | 127 | func (x *ExpanderRow) AddRow(ChildVar *gtk.Widget) { | |
| 133 | - | core.LazyRegister(&xExpanderRowAddRow, "ADW", "adw_expander_row_add_row", false) | |
| 134 | - | ||
| 135 | 128 | xExpanderRowAddRow(x.GoPointer(), ChildVar.GoPointer()) | |
| 136 | 129 | } | |
| 137 | 130 | ||
| @@ -139,8 +132,6 @@ var xExpanderRowAddSuffix func(uintptr, uintptr) | |||
| 139 | 132 | ||
| 140 | 133 | // Adds an suffix widget to @self. | |
| 141 | 134 | func (x *ExpanderRow) AddSuffix(WidgetVar *gtk.Widget) { | |
| 142 | - | core.LazyRegister(&xExpanderRowAddSuffix, "ADW", "adw_expander_row_add_suffix", false) | |
| 143 | - | ||
| 144 | 135 | xExpanderRowAddSuffix(x.GoPointer(), WidgetVar.GoPointer()) | |
| 145 | 136 | } | |
| 146 | 137 | ||
| @@ -148,8 +139,6 @@ var xExpanderRowGetEnableExpansion func(uintptr) bool | |||
| 148 | 139 | ||
| 149 | 140 | // Gets whether the expansion of @self is enabled. | |
| 150 | 141 | func (x *ExpanderRow) GetEnableExpansion() bool { | |
| 151 | - | core.LazyRegister(&xExpanderRowGetEnableExpansion, "ADW", "adw_expander_row_get_enable_expansion", false) | |
| 152 | - | ||
| 153 | 142 | cret := xExpanderRowGetEnableExpansion(x.GoPointer()) | |
| 154 | 143 | return cret | |
| 155 | 144 | } | |
| @@ -158,8 +147,6 @@ var xExpanderRowGetExpanded func(uintptr) bool | |||
| 158 | 147 | ||
| 159 | 148 | // Gets whether @self is expanded. | |
| 160 | 149 | func (x *ExpanderRow) GetExpanded() bool { | |
| 161 | - | core.LazyRegister(&xExpanderRowGetExpanded, "ADW", "adw_expander_row_get_expanded", false) | |
| 162 | - | ||
| 163 | 150 | cret := xExpanderRowGetExpanded(x.GoPointer()) | |
| 164 | 151 | return cret | |
| 165 | 152 | } | |
| @@ -168,8 +155,6 @@ var xExpanderRowGetIconName func(uintptr) string | |||
| 168 | 155 | ||
| 169 | 156 | // Gets the icon name for @self. | |
| 170 | 157 | func (x *ExpanderRow) GetIconName() string { | |
| 171 | - | core.LazyRegister(&xExpanderRowGetIconName, "ADW", "adw_expander_row_get_icon_name", false) | |
| 172 | - | ||
| 173 | 158 | cret := xExpanderRowGetIconName(x.GoPointer()) | |
| 174 | 159 | return cret | |
| 175 | 160 | } | |
| @@ -178,8 +163,6 @@ var xExpanderRowGetShowEnableSwitch func(uintptr) bool | |||
| 178 | 163 | ||
| 179 | 164 | // Gets whether the switch enabling the expansion of @self is visible. | |
| 180 | 165 | func (x *ExpanderRow) GetShowEnableSwitch() bool { | |
| 181 | - | core.LazyRegister(&xExpanderRowGetShowEnableSwitch, "ADW", "adw_expander_row_get_show_enable_switch", false) | |
| 182 | - | ||
| 183 | 166 | cret := xExpanderRowGetShowEnableSwitch(x.GoPointer()) | |
| 184 | 167 | return cret | |
| 185 | 168 | } | |
| @@ -188,8 +171,6 @@ var xExpanderRowGetSubtitle func(uintptr) string | |||
| 188 | 171 | ||
| 189 | 172 | // Gets the subtitle for @self. | |
| 190 | 173 | func (x *ExpanderRow) GetSubtitle() string { | |
| 191 | - | core.LazyRegister(&xExpanderRowGetSubtitle, "ADW", "adw_expander_row_get_subtitle", false) | |
| 192 | - | ||
| 193 | 174 | cret := xExpanderRowGetSubtitle(x.GoPointer()) | |
| 194 | 175 | return cret | |
| 195 | 176 | } | |
| @@ -199,8 +180,6 @@ var xExpanderRowGetSubtitleLines func(uintptr) int | |||
| 199 | 180 | // Gets the number of lines at the end of which the subtitle label will be | |
| 200 | 181 | // ellipsized. | |
| 201 | 182 | func (x *ExpanderRow) GetSubtitleLines() int { | |
| 202 | - | core.LazyRegister(&xExpanderRowGetSubtitleLines, "ADW", "adw_expander_row_get_subtitle_lines", false) | |
| 203 | - | ||
| 204 | 183 | cret := xExpanderRowGetSubtitleLines(x.GoPointer()) | |
| 205 | 184 | return cret | |
| 206 | 185 | } | |
| @@ -210,8 +189,6 @@ var xExpanderRowGetTitleLines func(uintptr) int | |||
| 210 | 189 | // Gets the number of lines at the end of which the title label will be | |
| 211 | 190 | // ellipsized. | |
| 212 | 191 | func (x *ExpanderRow) GetTitleLines() int { | |
| 213 | - | core.LazyRegister(&xExpanderRowGetTitleLines, "ADW", "adw_expander_row_get_title_lines", false) | |
| 214 | - | ||
| 215 | 192 | cret := xExpanderRowGetTitleLines(x.GoPointer()) | |
| 216 | 193 | return cret | |
| 217 | 194 | } | |
| @@ -220,8 +197,6 @@ var xExpanderRowRemove func(uintptr, uintptr) | |||
| 220 | 197 | ||
| 221 | 198 | // Removes a child from @self. | |
| 222 | 199 | func (x *ExpanderRow) Remove(ChildVar *gtk.Widget) { | |
| 223 | - | core.LazyRegister(&xExpanderRowRemove, "ADW", "adw_expander_row_remove", false) | |
| 224 | - | ||
| 225 | 200 | xExpanderRowRemove(x.GoPointer(), ChildVar.GoPointer()) | |
| 226 | 201 | } | |
| 227 | 202 | ||
| @@ -229,8 +204,6 @@ var xExpanderRowSetEnableExpansion func(uintptr, bool) | |||
| 229 | 204 | ||
| 230 | 205 | // Sets whether the expansion of @self is enabled. | |
| 231 | 206 | func (x *ExpanderRow) SetEnableExpansion(EnableExpansionVar bool) { | |
| 232 | - | core.LazyRegister(&xExpanderRowSetEnableExpansion, "ADW", "adw_expander_row_set_enable_expansion", false) | |
| 233 | - | ||
| 234 | 207 | xExpanderRowSetEnableExpansion(x.GoPointer(), EnableExpansionVar) | |
| 235 | 208 | } | |
| 236 | 209 | ||
| @@ -238,8 +211,6 @@ var xExpanderRowSetExpanded func(uintptr, bool) | |||
| 238 | 211 | ||
| 239 | 212 | // Sets whether @self is expanded. | |
| 240 | 213 | func (x *ExpanderRow) SetExpanded(ExpandedVar bool) { | |
| 241 | - | core.LazyRegister(&xExpanderRowSetExpanded, "ADW", "adw_expander_row_set_expanded", false) | |
| 242 | - | ||
| 243 | 214 | xExpanderRowSetExpanded(x.GoPointer(), ExpandedVar) | |
| 244 | 215 | } | |
| 245 | 216 | ||
| @@ -247,8 +218,6 @@ var xExpanderRowSetIconName func(uintptr, uintptr) | |||
| 247 | 218 | ||
| 248 | 219 | // Sets the icon name for @self. | |
| 249 | 220 | func (x *ExpanderRow) SetIconName(IconNameVar *string) { | |
| 250 | - | core.LazyRegister(&xExpanderRowSetIconName, "ADW", "adw_expander_row_set_icon_name", false) | |
| 251 | - | ||
| 252 | 221 | IconNameVarPtr := core.GStrdupNullable(IconNameVar) | |
| 253 | 222 | defer core.GFreeNullable(IconNameVarPtr) | |
| 254 | 223 | ||
| @@ -259,8 +228,6 @@ var xExpanderRowSetShowEnableSwitch func(uintptr, bool) | |||
| 259 | 228 | ||
| 260 | 229 | // Sets whether the switch enabling the expansion of @self is visible. | |
| 261 | 230 | func (x *ExpanderRow) SetShowEnableSwitch(ShowEnableSwitchVar bool) { | |
| 262 | - | core.LazyRegister(&xExpanderRowSetShowEnableSwitch, "ADW", "adw_expander_row_set_show_enable_switch", false) | |
| 263 | - | ||
| 264 | 231 | xExpanderRowSetShowEnableSwitch(x.GoPointer(), ShowEnableSwitchVar) | |
| 265 | 232 | } | |
| 266 | 233 | ||
| @@ -271,8 +238,6 @@ var xExpanderRowSetSubtitle func(uintptr, string) | |||
| 271 | 238 | // The subtitle is interpreted as Pango markup unless | |
| 272 | 239 | // [property@PreferencesRow:use-markup] is set to `FALSE`. | |
| 273 | 240 | func (x *ExpanderRow) SetSubtitle(SubtitleVar string) { | |
| 274 | - | core.LazyRegister(&xExpanderRowSetSubtitle, "ADW", "adw_expander_row_set_subtitle", false) | |
| 275 | - | ||
| 276 | 241 | xExpanderRowSetSubtitle(x.GoPointer(), SubtitleVar) | |
| 277 | 242 | } | |
| 278 | 243 | ||
| @@ -283,8 +248,6 @@ var xExpanderRowSetSubtitleLines func(uintptr, int) | |||
| 283 | 248 | // | |
| 284 | 249 | // If the value is 0, the number of lines won't be limited. | |
| 285 | 250 | func (x *ExpanderRow) SetSubtitleLines(SubtitleLinesVar int) { | |
| 286 | - | core.LazyRegister(&xExpanderRowSetSubtitleLines, "ADW", "adw_expander_row_set_subtitle_lines", false) | |
| 287 | - | ||
| 288 | 251 | xExpanderRowSetSubtitleLines(x.GoPointer(), SubtitleLinesVar) | |
| 289 | 252 | } | |
| 290 | 253 | ||
| @@ -295,8 +258,6 @@ var xExpanderRowSetTitleLines func(uintptr, int) | |||
| 295 | 258 | // | |
| 296 | 259 | // If the value is 0, the number of lines won't be limited. | |
| 297 | 260 | func (x *ExpanderRow) SetTitleLines(TitleLinesVar int) { | |
| 298 | - | core.LazyRegister(&xExpanderRowSetTitleLines, "ADW", "adw_expander_row_set_title_lines", false) | |
| 299 | - | ||
| 300 | 261 | xExpanderRowSetTitleLines(x.GoPointer(), TitleLinesVar) | |
| 301 | 262 | } | |
| 302 | 263 | ||
| @@ -788,4 +749,36 @@ func (x *ExpanderRow) GetBuildableId() string { | |||
| 788 | 749 | func init() { | |
| 789 | 750 | core.SetPackageName("ADW", "libadwaita-1") | |
| 790 | 751 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | |
| 752 | + | var libs []uintptr | |
| 753 | + | for _, libPath := range core.GetPaths("ADW") { | |
| 754 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 755 | + | if err != nil { | |
| 756 | + | panic(err) | |
| 757 | + | } | |
| 758 | + | libs = append(libs, lib) | |
| 759 | + | } | |
| 760 | + | ||
| 761 | + | core.PuregoSafeRegister(&xExpanderRowGLibType, libs, "adw_expander_row_get_type") | |
| 762 | + | ||
| 763 | + | core.PuregoSafeRegister(&xNewExpanderRow, libs, "adw_expander_row_new") | |
| 764 | + | ||
| 765 | + | core.PuregoSafeRegister(&xExpanderRowAddAction, libs, "adw_expander_row_add_action") | |
| 766 | + | core.PuregoSafeRegister(&xExpanderRowAddPrefix, libs, "adw_expander_row_add_prefix") | |
| 767 | + | core.PuregoSafeRegister(&xExpanderRowAddRow, libs, "adw_expander_row_add_row") | |
| 768 | + | core.PuregoSafeRegister(&xExpanderRowAddSuffix, libs, "adw_expander_row_add_suffix") | |
| 769 | + | core.PuregoSafeRegister(&xExpanderRowGetEnableExpansion, libs, "adw_expander_row_get_enable_expansion") | |
| 770 | + | core.PuregoSafeRegister(&xExpanderRowGetExpanded, libs, "adw_expander_row_get_expanded") | |
| 771 | + | core.PuregoSafeRegister(&xExpanderRowGetIconName, libs, "adw_expander_row_get_icon_name") | |
| 772 | + | core.PuregoSafeRegister(&xExpanderRowGetShowEnableSwitch, libs, "adw_expander_row_get_show_enable_switch") | |
| 773 | + | core.PuregoSafeRegister(&xExpanderRowGetSubtitle, libs, "adw_expander_row_get_subtitle") | |
| 774 | + | core.PuregoSafeRegister(&xExpanderRowGetSubtitleLines, libs, "adw_expander_row_get_subtitle_lines") | |
| 775 | + | core.PuregoSafeRegister(&xExpanderRowGetTitleLines, libs, "adw_expander_row_get_title_lines") | |
| 776 | + | core.PuregoSafeRegister(&xExpanderRowRemove, libs, "adw_expander_row_remove") | |
| 777 | + | core.PuregoSafeRegister(&xExpanderRowSetEnableExpansion, libs, "adw_expander_row_set_enable_expansion") | |
| 778 | + | core.PuregoSafeRegister(&xExpanderRowSetExpanded, libs, "adw_expander_row_set_expanded") | |
| 779 | + | core.PuregoSafeRegister(&xExpanderRowSetIconName, libs, "adw_expander_row_set_icon_name") | |
| 780 | + | core.PuregoSafeRegister(&xExpanderRowSetShowEnableSwitch, libs, "adw_expander_row_set_show_enable_switch") | |
| 781 | + | core.PuregoSafeRegister(&xExpanderRowSetSubtitle, libs, "adw_expander_row_set_subtitle") | |
| 782 | + | core.PuregoSafeRegister(&xExpanderRowSetSubtitleLines, libs, "adw_expander_row_set_subtitle_lines") | |
| 783 | + | core.PuregoSafeRegister(&xExpanderRowSetTitleLines, libs, "adw_expander_row_set_title_lines") | |
| 791 | 784 | } | |
| @@ -5,6 +5,7 @@ import ( | |||||
| 5 | "structs" | 5 | "structs" | ||
| 6 | "unsafe" | 6 | "unsafe" | ||
| 7 | 7 | ||||
| 8 | + | "github.com/bnema/purego" | |||
| 8 | "github.com/bnema/puregotk/pkg/core" | 9 | "github.com/bnema/puregotk/pkg/core" | ||
| 9 | "github.com/bnema/puregotk/v4/glib" | 10 | "github.com/bnema/puregotk/v4/glib" | ||
| 10 | "github.com/bnema/puregotk/v4/gobject" | 11 | "github.com/bnema/puregotk/v4/gobject" | ||
| @@ -78,7 +79,6 @@ type ExpanderRow struct { | |||||
| 78 | var xExpanderRowGLibType func() types.GType | 79 | var xExpanderRowGLibType func() types.GType | ||
| 79 | 80 | ||||
| 80 | func ExpanderRowGLibType() types.GType { | 81 | func ExpanderRowGLibType() types.GType { | ||
| 81 | - | core.LazyRegister(&xExpanderRowGLibType, "ADW", "adw_expander_row_get_type", false) | |||
| 82 | return xExpanderRowGLibType() | 82 | return xExpanderRowGLibType() | ||
| 83 | } | 83 | } | ||
| 84 | 84 | ||||
| @@ -92,7 +92,6 @@ var xNewExpanderRow func() uintptr | |||||
| 92 | 92 | ||||
| 93 | // Creates a new `AdwExpanderRow`. | 93 | // Creates a new `AdwExpanderRow`. | ||
| 94 | func NewExpanderRow() *ExpanderRow { | 94 | func NewExpanderRow() *ExpanderRow { | ||
| 95 | - | core.LazyRegister(&xNewExpanderRow, "ADW", "adw_expander_row_new", false) | |||
| 96 | var cls *ExpanderRow | 95 | var cls *ExpanderRow | ||
| 97 | 96 | ||||
| 98 | cret := xNewExpanderRow() | 97 | cret := xNewExpanderRow() | ||
| @@ -110,8 +109,6 @@ var xExpanderRowAddAction func(uintptr, uintptr) | |||||
| 110 | 109 | ||||
| 111 | // Adds an action widget to @self. | 110 | // Adds an action widget to @self. | ||
| 112 | func (x *ExpanderRow) AddAction(WidgetVar *gtk.Widget) { | 111 | func (x *ExpanderRow) AddAction(WidgetVar *gtk.Widget) { | ||
| 113 | - | core.LazyRegister(&xExpanderRowAddAction, "ADW", "adw_expander_row_add_action", false) | |||
| 114 | - | ||||
| 115 | xExpanderRowAddAction(x.GoPointer(), WidgetVar.GoPointer()) | 112 | xExpanderRowAddAction(x.GoPointer(), WidgetVar.GoPointer()) | ||
| 116 | } | 113 | } | ||
| 117 | 114 | ||||
| @@ -119,8 +116,6 @@ var xExpanderRowAddPrefix func(uintptr, uintptr) | |||||
| 119 | 116 | ||||
| 120 | // Adds a prefix widget to @self. | 117 | // Adds a prefix widget to @self. | ||
| 121 | func (x *ExpanderRow) AddPrefix(WidgetVar *gtk.Widget) { | 118 | func (x *ExpanderRow) AddPrefix(WidgetVar *gtk.Widget) { | ||
| 122 | - | core.LazyRegister(&xExpanderRowAddPrefix, "ADW", "adw_expander_row_add_prefix", false) | |||
| 123 | - | ||||
| 124 | xExpanderRowAddPrefix(x.GoPointer(), WidgetVar.GoPointer()) | 119 | xExpanderRowAddPrefix(x.GoPointer(), WidgetVar.GoPointer()) | ||
| 125 | } | 120 | } | ||
| 126 | 121 | ||||
| @@ -130,8 +125,6 @@ var xExpanderRowAddRow func(uintptr, uintptr) | |||||
| 130 | // | 125 | // | ||
| 131 | // The widget will appear in the expanding list below @self. | 126 | // The widget will appear in the expanding list below @self. | ||
| 132 | func (x *ExpanderRow) AddRow(ChildVar *gtk.Widget) { | 127 | func (x *ExpanderRow) AddRow(ChildVar *gtk.Widget) { | ||
| 133 | - | core.LazyRegister(&xExpanderRowAddRow, "ADW", "adw_expander_row_add_row", false) | |||
| 134 | - | ||||
| 135 | xExpanderRowAddRow(x.GoPointer(), ChildVar.GoPointer()) | 128 | xExpanderRowAddRow(x.GoPointer(), ChildVar.GoPointer()) | ||
| 136 | } | 129 | } | ||
| 137 | 130 | ||||
| @@ -139,8 +132,6 @@ var xExpanderRowAddSuffix func(uintptr, uintptr) | |||||
| 139 | 132 | ||||
| 140 | // Adds an suffix widget to @self. | 133 | // Adds an suffix widget to @self. | ||
| 141 | func (x *ExpanderRow) AddSuffix(WidgetVar *gtk.Widget) { | 134 | func (x *ExpanderRow) AddSuffix(WidgetVar *gtk.Widget) { | ||
| 142 | - | core.LazyRegister(&xExpanderRowAddSuffix, "ADW", "adw_expander_row_add_suffix", false) | |||
| 143 | - | ||||
| 144 | xExpanderRowAddSuffix(x.GoPointer(), WidgetVar.GoPointer()) | 135 | xExpanderRowAddSuffix(x.GoPointer(), WidgetVar.GoPointer()) | ||
| 145 | } | 136 | } | ||
| 146 | 137 | ||||
| @@ -148,8 +139,6 @@ var xExpanderRowGetEnableExpansion func(uintptr) bool | |||||
| 148 | 139 | ||||
| 149 | // Gets whether the expansion of @self is enabled. | 140 | // Gets whether the expansion of @self is enabled. | ||
| 150 | func (x *ExpanderRow) GetEnableExpansion() bool { | 141 | func (x *ExpanderRow) GetEnableExpansion() bool { | ||
| 151 | - | core.LazyRegister(&xExpanderRowGetEnableExpansion, "ADW", "adw_expander_row_get_enable_expansion", false) | |||
| 152 | - | ||||
| 153 | cret := xExpanderRowGetEnableExpansion(x.GoPointer()) | 142 | cret := xExpanderRowGetEnableExpansion(x.GoPointer()) | ||
| 154 | return cret | 143 | return cret | ||
| 155 | } | 144 | } | ||
| @@ -158,8 +147,6 @@ var xExpanderRowGetExpanded func(uintptr) bool | |||||
| 158 | 147 | ||||
| 159 | // Gets whether @self is expanded. | 148 | // Gets whether @self is expanded. | ||
| 160 | func (x *ExpanderRow) GetExpanded() bool { | 149 | func (x *ExpanderRow) GetExpanded() bool { | ||
| 161 | - | core.LazyRegister(&xExpanderRowGetExpanded, "ADW", "adw_expander_row_get_expanded", false) | |||
| 162 | - | ||||
| 163 | cret := xExpanderRowGetExpanded(x.GoPointer()) | 150 | cret := xExpanderRowGetExpanded(x.GoPointer()) | ||
| 164 | return cret | 151 | return cret | ||
| 165 | } | 152 | } | ||
| @@ -168,8 +155,6 @@ var xExpanderRowGetIconName func(uintptr) string | |||||
| 168 | 155 | ||||
| 169 | // Gets the icon name for @self. | 156 | // Gets the icon name for @self. | ||
| 170 | func (x *ExpanderRow) GetIconName() string { | 157 | func (x *ExpanderRow) GetIconName() string { | ||
| 171 | - | core.LazyRegister(&xExpanderRowGetIconName, "ADW", "adw_expander_row_get_icon_name", false) | |||
| 172 | - | ||||
| 173 | cret := xExpanderRowGetIconName(x.GoPointer()) | 158 | cret := xExpanderRowGetIconName(x.GoPointer()) | ||
| 174 | return cret | 159 | return cret | ||
| 175 | } | 160 | } | ||
| @@ -178,8 +163,6 @@ var xExpanderRowGetShowEnableSwitch func(uintptr) bool | |||||
| 178 | 163 | ||||
| 179 | // Gets whether the switch enabling the expansion of @self is visible. | 164 | // Gets whether the switch enabling the expansion of @self is visible. | ||
| 180 | func (x *ExpanderRow) GetShowEnableSwitch() bool { | 165 | func (x *ExpanderRow) GetShowEnableSwitch() bool { | ||
| 181 | - | core.LazyRegister(&xExpanderRowGetShowEnableSwitch, "ADW", "adw_expander_row_get_show_enable_switch", false) | |||
| 182 | - | ||||
| 183 | cret := xExpanderRowGetShowEnableSwitch(x.GoPointer()) | 166 | cret := xExpanderRowGetShowEnableSwitch(x.GoPointer()) | ||
| 184 | return cret | 167 | return cret | ||
| 185 | } | 168 | } | ||
| @@ -188,8 +171,6 @@ var xExpanderRowGetSubtitle func(uintptr) string | |||||
| 188 | 171 | ||||
| 189 | // Gets the subtitle for @self. | 172 | // Gets the subtitle for @self. | ||
| 190 | func (x *ExpanderRow) GetSubtitle() string { | 173 | func (x *ExpanderRow) GetSubtitle() string { | ||
| 191 | - | core.LazyRegister(&xExpanderRowGetSubtitle, "ADW", "adw_expander_row_get_subtitle", false) | |||
| 192 | - | ||||
| 193 | cret := xExpanderRowGetSubtitle(x.GoPointer()) | 174 | cret := xExpanderRowGetSubtitle(x.GoPointer()) | ||
| 194 | return cret | 175 | return cret | ||
| 195 | } | 176 | } | ||
| @@ -199,8 +180,6 @@ var xExpanderRowGetSubtitleLines func(uintptr) int | |||||
| 199 | // Gets the number of lines at the end of which the subtitle label will be | 180 | // Gets the number of lines at the end of which the subtitle label will be | ||
| 200 | // ellipsized. | 181 | // ellipsized. | ||
| 201 | func (x *ExpanderRow) GetSubtitleLines() int { | 182 | func (x *ExpanderRow) GetSubtitleLines() int { | ||
| 202 | - | core.LazyRegister(&xExpanderRowGetSubtitleLines, "ADW", "adw_expander_row_get_subtitle_lines", false) | |||
| 203 | - | ||||
| 204 | cret := xExpanderRowGetSubtitleLines(x.GoPointer()) | 183 | cret := xExpanderRowGetSubtitleLines(x.GoPointer()) | ||
| 205 | return cret | 184 | return cret | ||
| 206 | } | 185 | } | ||
| @@ -210,8 +189,6 @@ var xExpanderRowGetTitleLines func(uintptr) int | |||||
| 210 | // Gets the number of lines at the end of which the title label will be | 189 | // Gets the number of lines at the end of which the title label will be | ||
| 211 | // ellipsized. | 190 | // ellipsized. | ||
| 212 | func (x *ExpanderRow) GetTitleLines() int { | 191 | func (x *ExpanderRow) GetTitleLines() int { | ||
| 213 | - | core.LazyRegister(&xExpanderRowGetTitleLines, "ADW", "adw_expander_row_get_title_lines", false) | |||
| 214 | - | ||||
| 215 | cret := xExpanderRowGetTitleLines(x.GoPointer()) | 192 | cret := xExpanderRowGetTitleLines(x.GoPointer()) | ||
| 216 | return cret | 193 | return cret | ||
| 217 | } | 194 | } | ||
| @@ -220,8 +197,6 @@ var xExpanderRowRemove func(uintptr, uintptr) | |||||
| 220 | 197 | ||||
| 221 | // Removes a child from @self. | 198 | // Removes a child from @self. | ||
| 222 | func (x *ExpanderRow) Remove(ChildVar *gtk.Widget) { | 199 | func (x *ExpanderRow) Remove(ChildVar *gtk.Widget) { | ||
| 223 | - | core.LazyRegister(&xExpanderRowRemove, "ADW", "adw_expander_row_remove", false) | |||
| 224 | - | ||||
| 225 | xExpanderRowRemove(x.GoPointer(), ChildVar.GoPointer()) | 200 | xExpanderRowRemove(x.GoPointer(), ChildVar.GoPointer()) | ||
| 226 | } | 201 | } | ||
| 227 | 202 | ||||
| @@ -229,8 +204,6 @@ var xExpanderRowSetEnableExpansion func(uintptr, bool) | |||||
| 229 | 204 | ||||
| 230 | // Sets whether the expansion of @self is enabled. | 205 | // Sets whether the expansion of @self is enabled. | ||
| 231 | func (x *ExpanderRow) SetEnableExpansion(EnableExpansionVar bool) { | 206 | func (x *ExpanderRow) SetEnableExpansion(EnableExpansionVar bool) { | ||
| 232 | - | core.LazyRegister(&xExpanderRowSetEnableExpansion, "ADW", "adw_expander_row_set_enable_expansion", false) | |||
| 233 | - | ||||
| 234 | xExpanderRowSetEnableExpansion(x.GoPointer(), EnableExpansionVar) | 207 | xExpanderRowSetEnableExpansion(x.GoPointer(), EnableExpansionVar) | ||
| 235 | } | 208 | } | ||
| 236 | 209 | ||||
| @@ -238,8 +211,6 @@ var xExpanderRowSetExpanded func(uintptr, bool) | |||||
| 238 | 211 | ||||
| 239 | // Sets whether @self is expanded. | 212 | // Sets whether @self is expanded. | ||
| 240 | func (x *ExpanderRow) SetExpanded(ExpandedVar bool) { | 213 | func (x *ExpanderRow) SetExpanded(ExpandedVar bool) { | ||
| 241 | - | core.LazyRegister(&xExpanderRowSetExpanded, "ADW", "adw_expander_row_set_expanded", false) | |||
| 242 | - | ||||
| 243 | xExpanderRowSetExpanded(x.GoPointer(), ExpandedVar) | 214 | xExpanderRowSetExpanded(x.GoPointer(), ExpandedVar) | ||
| 244 | } | 215 | } | ||
| 245 | 216 | ||||
| @@ -247,8 +218,6 @@ var xExpanderRowSetIconName func(uintptr, uintptr) | |||||
| 247 | 218 | ||||
| 248 | // Sets the icon name for @self. | 219 | // Sets the icon name for @self. | ||
| 249 | func (x *ExpanderRow) SetIconName(IconNameVar *string) { | 220 | func (x *ExpanderRow) SetIconName(IconNameVar *string) { | ||
| 250 | - | core.LazyRegister(&xExpanderRowSetIconName, "ADW", "adw_expander_row_set_icon_name", false) | |||
| 251 | - | ||||
| 252 | IconNameVarPtr := core.GStrdupNullable(IconNameVar) | 221 | IconNameVarPtr := core.GStrdupNullable(IconNameVar) | ||
| 253 | defer core.GFreeNullable(IconNameVarPtr) | 222 | defer core.GFreeNullable(IconNameVarPtr) | ||
| 254 | 223 | ||||
| @@ -259,8 +228,6 @@ var xExpanderRowSetShowEnableSwitch func(uintptr, bool) | |||||
| 259 | 228 | ||||
| 260 | // Sets whether the switch enabling the expansion of @self is visible. | 229 | // Sets whether the switch enabling the expansion of @self is visible. | ||
| 261 | func (x *ExpanderRow) SetShowEnableSwitch(ShowEnableSwitchVar bool) { | 230 | func (x *ExpanderRow) SetShowEnableSwitch(ShowEnableSwitchVar bool) { | ||
| 262 | - | core.LazyRegister(&xExpanderRowSetShowEnableSwitch, "ADW", "adw_expander_row_set_show_enable_switch", false) | |||
| 263 | - | ||||
| 264 | xExpanderRowSetShowEnableSwitch(x.GoPointer(), ShowEnableSwitchVar) | 231 | xExpanderRowSetShowEnableSwitch(x.GoPointer(), ShowEnableSwitchVar) | ||
| 265 | } | 232 | } | ||
| 266 | 233 | ||||
| @@ -271,8 +238,6 @@ var xExpanderRowSetSubtitle func(uintptr, string) | |||||
| 271 | // The subtitle is interpreted as Pango markup unless | 238 | // The subtitle is interpreted as Pango markup unless | ||
| 272 | // [property@PreferencesRow:use-markup] is set to `FALSE`. | 239 | // [property@PreferencesRow:use-markup] is set to `FALSE`. | ||
| 273 | func (x *ExpanderRow) SetSubtitle(SubtitleVar string) { | 240 | func (x *ExpanderRow) SetSubtitle(SubtitleVar string) { | ||
| 274 | - | core.LazyRegister(&xExpanderRowSetSubtitle, "ADW", "adw_expander_row_set_subtitle", false) | |||
| 275 | - | ||||
| 276 | xExpanderRowSetSubtitle(x.GoPointer(), SubtitleVar) | 241 | xExpanderRowSetSubtitle(x.GoPointer(), SubtitleVar) | ||
| 277 | } | 242 | } | ||
| 278 | 243 | ||||
| @@ -283,8 +248,6 @@ var xExpanderRowSetSubtitleLines func(uintptr, int) | |||||
| 283 | // | 248 | // | ||
| 284 | // If the value is 0, the number of lines won't be limited. | 249 | // If the value is 0, the number of lines won't be limited. | ||
| 285 | func (x *ExpanderRow) SetSubtitleLines(SubtitleLinesVar int) { | 250 | func (x *ExpanderRow) SetSubtitleLines(SubtitleLinesVar int) { | ||
| 286 | - | core.LazyRegister(&xExpanderRowSetSubtitleLines, "ADW", "adw_expander_row_set_subtitle_lines", false) | |||
| 287 | - | ||||
| 288 | xExpanderRowSetSubtitleLines(x.GoPointer(), SubtitleLinesVar) | 251 | xExpanderRowSetSubtitleLines(x.GoPointer(), SubtitleLinesVar) | ||
| 289 | } | 252 | } | ||
| 290 | 253 | ||||
| @@ -295,8 +258,6 @@ var xExpanderRowSetTitleLines func(uintptr, int) | |||||
| 295 | // | 258 | // | ||
| 296 | // If the value is 0, the number of lines won't be limited. | 259 | // If the value is 0, the number of lines won't be limited. | ||
| 297 | func (x *ExpanderRow) SetTitleLines(TitleLinesVar int) { | 260 | func (x *ExpanderRow) SetTitleLines(TitleLinesVar int) { | ||
| 298 | - | core.LazyRegister(&xExpanderRowSetTitleLines, "ADW", "adw_expander_row_set_title_lines", false) | |||
| 299 | - | ||||
| 300 | xExpanderRowSetTitleLines(x.GoPointer(), TitleLinesVar) | 261 | xExpanderRowSetTitleLines(x.GoPointer(), TitleLinesVar) | ||
| 301 | } | 262 | } | ||
| 302 | 263 | ||||
| @@ -788,4 +749,36 @@ func (x *ExpanderRow) GetBuildableId() string { | |||||
| 788 | func init() { | 749 | func init() { | ||
| 789 | core.SetPackageName("ADW", "libadwaita-1") | 750 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 790 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 751 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | ||
| 752 | + | var libs []uintptr | |||
| 753 | + | for _, libPath := range core.GetPaths("ADW") { | |||
| 754 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 755 | + | if err != nil { | |||
| 756 | + | panic(err) | |||
| 757 | + | } | |||
| 758 | + | libs = append(libs, lib) | |||
| 759 | + | } | |||
| 760 | + | ||||
| 761 | + | core.PuregoSafeRegister(&xExpanderRowGLibType, libs, "adw_expander_row_get_type") | |||
| 762 | + | ||||
| 763 | + | core.PuregoSafeRegister(&xNewExpanderRow, libs, "adw_expander_row_new") | |||
| 764 | + | ||||
| 765 | + | core.PuregoSafeRegister(&xExpanderRowAddAction, libs, "adw_expander_row_add_action") | |||
| 766 | + | core.PuregoSafeRegister(&xExpanderRowAddPrefix, libs, "adw_expander_row_add_prefix") | |||
| 767 | + | core.PuregoSafeRegister(&xExpanderRowAddRow, libs, "adw_expander_row_add_row") | |||
| 768 | + | core.PuregoSafeRegister(&xExpanderRowAddSuffix, libs, "adw_expander_row_add_suffix") | |||
| 769 | + | core.PuregoSafeRegister(&xExpanderRowGetEnableExpansion, libs, "adw_expander_row_get_enable_expansion") | |||
| 770 | + | core.PuregoSafeRegister(&xExpanderRowGetExpanded, libs, "adw_expander_row_get_expanded") | |||
| 771 | + | core.PuregoSafeRegister(&xExpanderRowGetIconName, libs, "adw_expander_row_get_icon_name") | |||
| 772 | + | core.PuregoSafeRegister(&xExpanderRowGetShowEnableSwitch, libs, "adw_expander_row_get_show_enable_switch") | |||
| 773 | + | core.PuregoSafeRegister(&xExpanderRowGetSubtitle, libs, "adw_expander_row_get_subtitle") | |||
| 774 | + | core.PuregoSafeRegister(&xExpanderRowGetSubtitleLines, libs, "adw_expander_row_get_subtitle_lines") | |||
| 775 | + | core.PuregoSafeRegister(&xExpanderRowGetTitleLines, libs, "adw_expander_row_get_title_lines") | |||
| 776 | + | core.PuregoSafeRegister(&xExpanderRowRemove, libs, "adw_expander_row_remove") | |||
| 777 | + | core.PuregoSafeRegister(&xExpanderRowSetEnableExpansion, libs, "adw_expander_row_set_enable_expansion") | |||
| 778 | + | core.PuregoSafeRegister(&xExpanderRowSetExpanded, libs, "adw_expander_row_set_expanded") | |||
| 779 | + | core.PuregoSafeRegister(&xExpanderRowSetIconName, libs, "adw_expander_row_set_icon_name") | |||
| 780 | + | core.PuregoSafeRegister(&xExpanderRowSetShowEnableSwitch, libs, "adw_expander_row_set_show_enable_switch") | |||
| 781 | + | core.PuregoSafeRegister(&xExpanderRowSetSubtitle, libs, "adw_expander_row_set_subtitle") | |||
| 782 | + | core.PuregoSafeRegister(&xExpanderRowSetSubtitleLines, libs, "adw_expander_row_set_subtitle_lines") | |||
| 783 | + | core.PuregoSafeRegister(&xExpanderRowSetTitleLines, libs, "adw_expander_row_set_title_lines") | |||
| 791 | } | 784 | } | ||