Revert "chore(deps): pin puregotk nil-signal fix"
This reverts commit a161e348e2093172038390b0906448f0ae979a0d.
- commit
- 40378d5e4fd2372d054e49168ab2a6f67aedd0fd
- author
- brice · · 2026-07-14 17:59 UTC
- parent
- 8d647bb
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
905 files · +25263 -27842
M go.mod +1 -1
| @@ -11,7 +11,7 @@ require ( | |||
| 11 | 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | |
| 12 | 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | |
| 13 | 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | |
| 14 | - | github.com/bnema/puregotk v0.7.1-0.20260714170452-0b6b9b901234 | |
| 14 | + | github.com/bnema/puregotk v0.7.0 | |
| 15 | 15 | github.com/charmbracelet/bubbles v1.0.0 | |
| 16 | 16 | github.com/charmbracelet/bubbletea v1.3.10 | |
| 17 | 17 | github.com/charmbracelet/lipgloss v1.1.0 | |
| @@ -11,7 +11,7 @@ require ( | |||||
| 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | ||
| 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | ||
| 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | ||
| 14 | - | github.com/bnema/puregotk v0.7.1-0.20260714170452-0b6b9b901234 | 14 | + | github.com/bnema/puregotk v0.7.0 |
| 15 | github.com/charmbracelet/bubbles v1.0.0 | 15 | github.com/charmbracelet/bubbles v1.0.0 | ||
| 16 | github.com/charmbracelet/bubbletea v1.3.10 | 16 | github.com/charmbracelet/bubbletea v1.3.10 | ||
| 17 | github.com/charmbracelet/lipgloss v1.1.0 | 17 | github.com/charmbracelet/lipgloss v1.1.0 | ||
M go.sum +0 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/internal/core/core.go +4 -197 generated file: collapsed
M vendor/github.com/bnema/puregotk/pkg/core/core.go +0 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-dialog.go +64 -99 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-window.go +62 -95 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-accent-color.go +15 -7 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-action-row.go +29 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-alert-dialog.go +47 -66 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-target.go +27 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-util.go +12 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation.go +26 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application-window.go +22 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application.go +15 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-avatar.go +25 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-banner.go +26 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bin.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bottom-sheet.go +38 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint-bin.go +19 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint.go +37 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-content.go +22 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-row.go +18 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-dots.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-lines.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel.go +37 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-layout.go +20 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-scrollable.go +22 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp.go +22 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-combo-row.go +33 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-dialog.go +38 -45 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-easing.go +13 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-entry-row.go +33 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-enum-list-model.go +22 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-expander-row.go +33 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-flap.go +48 -61 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-fold-threshold-policy.go +1 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-header-bar.go +33 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-inline-view-switcher.go +24 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout-slot.go +15 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout.go +17 -7 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-leaflet.go +56 -69 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-length-unit.go +14 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-main.go +15 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-message-dialog.go +44 -63 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-multi-layout-view.go +23 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-direction.go +1 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-split-view.go +32 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-view.go +49 -60 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-overlay-split-view.go +38 -48 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-password-entry-row.go +13 -2 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-dialog.go +25 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-group.go +26 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-page.go +33 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-row.go +22 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-window.go +29 -31 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcut-label.go +18 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-dialog.go +15 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-item.go +25 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-section.go +17 -8 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar-item.go +37 -45 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar-section.go +27 -24
| @@ -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/gio" | |
| 10 | 11 | "github.com/bnema/puregotk/v4/glib" | |
| @@ -113,7 +114,6 @@ type SidebarSection struct { | |||
| 113 | 114 | var xSidebarSectionGLibType func() types.GType | |
| 114 | 115 | ||
| 115 | 116 | func SidebarSectionGLibType() types.GType { | |
| 116 | - | core.LazyRegister(&xSidebarSectionGLibType, "ADW", "adw_sidebar_section_get_type", false) | |
| 117 | 117 | return xSidebarSectionGLibType() | |
| 118 | 118 | } | |
| 119 | 119 | ||
| @@ -127,7 +127,6 @@ var xNewSidebarSection func() uintptr | |||
| 127 | 127 | ||
| 128 | 128 | // Creates a new `AdwSidebarSection`. | |
| 129 | 129 | func NewSidebarSection() *SidebarSection { | |
| 130 | - | core.LazyRegister(&xNewSidebarSection, "ADW", "adw_sidebar_section_new", false) | |
| 131 | 130 | var cls *SidebarSection | |
| 132 | 131 | ||
| 133 | 132 | cret := xNewSidebarSection() | |
| @@ -146,8 +145,6 @@ var xSidebarSectionAppend func(uintptr, uintptr) | |||
| 146 | 145 | // | |
| 147 | 146 | // Cannot be used while a model is bound via [method@SidebarSection.bind_model]. | |
| 148 | 147 | func (x *SidebarSection) Append(ItemVar *SidebarItem) { | |
| 149 | - | core.LazyRegister(&xSidebarSectionAppend, "ADW", "adw_sidebar_section_append", false) | |
| 150 | - | ||
| 151 | 148 | xSidebarSectionAppend(x.GoPointer(), ItemVar.GoPointer()) | |
| 152 | 149 | } | |
| 153 | 150 | ||
| @@ -170,8 +167,6 @@ var xSidebarSectionBindModel func(uintptr, uintptr, uintptr, uintptr, uintptr) | |||
| 170 | 167 | // Accessing items and modifying them is allowed, but the changes will be erased | |
| 171 | 168 | // whenever that part of the model changes, so it's not recommended. | |
| 172 | 169 | func (x *SidebarSection) BindModel(ModelVar gio.ListModel, CreateItemFuncVar *SidebarSectionCreateItemFunc, UserDataVar uintptr, UserDataFreeFuncVar *glib.DestroyNotify) { | |
| 173 | - | core.LazyRegister(&xSidebarSectionBindModel, "ADW", "adw_sidebar_section_bind_model", false) | |
| 174 | - | ||
| 175 | 170 | xSidebarSectionBindModel(x.GoPointer(), ModelVar.GoPointer(), glib.NewCallbackNullable(CreateItemFuncVar), UserDataVar, glib.NewCallback(UserDataFreeFuncVar)) | |
| 176 | 171 | } | |
| 177 | 172 | ||
| @@ -184,7 +179,6 @@ var xSidebarSectionGetItem func(uintptr, uint) uintptr | |||
| 184 | 179 | // | |
| 185 | 180 | // Can return `NULL` if @index is larger or equal to the number of items. | |
| 186 | 181 | func (x *SidebarSection) GetItem(IndexVar uint) *SidebarItem { | |
| 187 | - | core.LazyRegister(&xSidebarSectionGetItem, "ADW", "adw_sidebar_section_get_item", false) | |
| 188 | 182 | var cls *SidebarItem | |
| 189 | 183 | ||
| 190 | 184 | cret := xSidebarSectionGetItem(x.GoPointer(), IndexVar) | |
| @@ -204,7 +198,6 @@ var xSidebarSectionGetItems func(uintptr) uintptr | |||
| 204 | 198 | // | |
| 205 | 199 | // This can be used to keep an up-to-date view. | |
| 206 | 200 | func (x *SidebarSection) GetItems() *gio.ListModelBase { | |
| 207 | - | core.LazyRegister(&xSidebarSectionGetItems, "ADW", "adw_sidebar_section_get_items", false) | |
| 208 | 201 | var cls *gio.ListModelBase | |
| 209 | 202 | ||
| 210 | 203 | cret := xSidebarSectionGetItems(x.GoPointer()) | |
| @@ -221,7 +214,6 @@ var xSidebarSectionGetMenuModel func(uintptr) uintptr | |||
| 221 | 214 | ||
| 222 | 215 | // Gets the context menu model for @self's items. | |
| 223 | 216 | func (x *SidebarSection) GetMenuModel() *gio.MenuModel { | |
| 224 | - | core.LazyRegister(&xSidebarSectionGetMenuModel, "ADW", "adw_sidebar_section_get_menu_model", false) | |
| 225 | 217 | var cls *gio.MenuModel | |
| 226 | 218 | ||
| 227 | 219 | cret := xSidebarSectionGetMenuModel(x.GoPointer()) | |
| @@ -239,7 +231,6 @@ var xSidebarSectionGetSidebar func(uintptr) uintptr | |||
| 239 | 231 | ||
| 240 | 232 | // Gets the sidebar @self is in. | |
| 241 | 233 | func (x *SidebarSection) GetSidebar() *Sidebar { | |
| 242 | - | core.LazyRegister(&xSidebarSectionGetSidebar, "ADW", "adw_sidebar_section_get_sidebar", false) | |
| 243 | 234 | var cls *Sidebar | |
| 244 | 235 | ||
| 245 | 236 | cret := xSidebarSectionGetSidebar(x.GoPointer()) | |
| @@ -257,8 +248,6 @@ var xSidebarSectionGetTitle func(uintptr) string | |||
| 257 | 248 | ||
| 258 | 249 | // Gets the title of @self. | |
| 259 | 250 | func (x *SidebarSection) GetTitle() string { | |
| 260 | - | core.LazyRegister(&xSidebarSectionGetTitle, "ADW", "adw_sidebar_section_get_title", false) | |
| 261 | - | ||
| 262 | 251 | cret := xSidebarSectionGetTitle(x.GoPointer()) | |
| 263 | 252 | return cret | |
| 264 | 253 | } | |
| @@ -272,8 +261,6 @@ var xSidebarSectionInsert func(uintptr, uintptr, int) | |||
| 272 | 261 | // | |
| 273 | 262 | // Cannot be used while a model is bound via [method@SidebarSection.bind_model]. | |
| 274 | 263 | func (x *SidebarSection) Insert(ItemVar *SidebarItem, PositionVar int) { | |
| 275 | - | core.LazyRegister(&xSidebarSectionInsert, "ADW", "adw_sidebar_section_insert", false) | |
| 276 | - | ||
| 277 | 264 | xSidebarSectionInsert(x.GoPointer(), ItemVar.GoPointer(), PositionVar) | |
| 278 | 265 | } | |
| 279 | 266 | ||
| @@ -283,8 +270,6 @@ var xSidebarSectionPrepend func(uintptr, uintptr) | |||
| 283 | 270 | // | |
| 284 | 271 | // Cannot be used while a model is bound via [method@SidebarSection.bind_model]. | |
| 285 | 272 | func (x *SidebarSection) Prepend(ItemVar *SidebarItem) { | |
| 286 | - | core.LazyRegister(&xSidebarSectionPrepend, "ADW", "adw_sidebar_section_prepend", false) | |
| 287 | - | ||
| 288 | 273 | xSidebarSectionPrepend(x.GoPointer(), ItemVar.GoPointer()) | |
| 289 | 274 | } | |
| 290 | 275 | ||
| @@ -294,8 +279,6 @@ var xSidebarSectionRemove func(uintptr, uintptr) | |||
| 294 | 279 | // | |
| 295 | 280 | // Cannot be used while a model is bound via [method@SidebarSection.bind_model]. | |
| 296 | 281 | func (x *SidebarSection) Remove(ItemVar *SidebarItem) { | |
| 297 | - | core.LazyRegister(&xSidebarSectionRemove, "ADW", "adw_sidebar_section_remove", false) | |
| 298 | - | ||
| 299 | 282 | xSidebarSectionRemove(x.GoPointer(), ItemVar.GoPointer()) | |
| 300 | 283 | } | |
| 301 | 284 | ||
| @@ -305,8 +288,6 @@ var xSidebarSectionRemoveAll func(uintptr) | |||
| 305 | 288 | // | |
| 306 | 289 | // Cannot be used while a model is bound via [method@SidebarSection.bind_model]. | |
| 307 | 290 | func (x *SidebarSection) RemoveAll() { | |
| 308 | - | core.LazyRegister(&xSidebarSectionRemoveAll, "ADW", "adw_sidebar_section_remove_all", false) | |
| 309 | - | ||
| 310 | 291 | xSidebarSectionRemoveAll(x.GoPointer()) | |
| 311 | 292 | } | |
| 312 | 293 | ||
| @@ -320,8 +301,6 @@ var xSidebarSectionSetMenuModel func(uintptr, uintptr) | |||
| 320 | 301 | // | |
| 321 | 302 | // If not set, [property@Sidebar:menu-model] will be used instead. | |
| 322 | 303 | func (x *SidebarSection) SetMenuModel(MenuModelVar *gio.MenuModel) { | |
| 323 | - | core.LazyRegister(&xSidebarSectionSetMenuModel, "ADW", "adw_sidebar_section_set_menu_model", false) | |
| 324 | - | ||
| 325 | 304 | xSidebarSectionSetMenuModel(x.GoPointer(), MenuModelVar.GoPointer()) | |
| 326 | 305 | } | |
| 327 | 306 | ||
| @@ -331,8 +310,6 @@ var xSidebarSectionSetTitle func(uintptr, uintptr) | |||
| 331 | 310 | // | |
| 332 | 311 | // If set, it will be displayed instead of the separator before the section. | |
| 333 | 312 | func (x *SidebarSection) SetTitle(TitleVar *string) { | |
| 334 | - | core.LazyRegister(&xSidebarSectionSetTitle, "ADW", "adw_sidebar_section_set_title", false) | |
| 335 | - | ||
| 336 | 313 | TitleVarPtr := core.GStrdupNullable(TitleVar) | |
| 337 | 314 | defer core.GFreeNullable(TitleVarPtr) | |
| 338 | 315 | ||
| @@ -383,4 +360,30 @@ func (x *SidebarSection) GetBuildableId() string { | |||
| 383 | 360 | func init() { | |
| 384 | 361 | core.SetPackageName("ADW", "libadwaita-1") | |
| 385 | 362 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | |
| 363 | + | var libs []uintptr | |
| 364 | + | for _, libPath := range core.GetPaths("ADW") { | |
| 365 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 366 | + | if err != nil { | |
| 367 | + | panic(err) | |
| 368 | + | } | |
| 369 | + | libs = append(libs, lib) | |
| 370 | + | } | |
| 371 | + | ||
| 372 | + | core.PuregoSafeRegister(&xSidebarSectionGLibType, libs, "adw_sidebar_section_get_type") | |
| 373 | + | ||
| 374 | + | core.PuregoSafeRegister(&xNewSidebarSection, libs, "adw_sidebar_section_new") | |
| 375 | + | ||
| 376 | + | core.PuregoSafeRegister(&xSidebarSectionAppend, libs, "adw_sidebar_section_append") | |
| 377 | + | core.PuregoSafeRegister(&xSidebarSectionBindModel, libs, "adw_sidebar_section_bind_model") | |
| 378 | + | core.PuregoSafeRegister(&xSidebarSectionGetItem, libs, "adw_sidebar_section_get_item") | |
| 379 | + | core.PuregoSafeRegister(&xSidebarSectionGetItems, libs, "adw_sidebar_section_get_items") | |
| 380 | + | core.PuregoSafeRegister(&xSidebarSectionGetMenuModel, libs, "adw_sidebar_section_get_menu_model") | |
| 381 | + | core.PuregoSafeRegister(&xSidebarSectionGetSidebar, libs, "adw_sidebar_section_get_sidebar") | |
| 382 | + | core.PuregoSafeRegister(&xSidebarSectionGetTitle, libs, "adw_sidebar_section_get_title") | |
| 383 | + | core.PuregoSafeRegister(&xSidebarSectionInsert, libs, "adw_sidebar_section_insert") | |
| 384 | + | core.PuregoSafeRegister(&xSidebarSectionPrepend, libs, "adw_sidebar_section_prepend") | |
| 385 | + | core.PuregoSafeRegister(&xSidebarSectionRemove, libs, "adw_sidebar_section_remove") | |
| 386 | + | core.PuregoSafeRegister(&xSidebarSectionRemoveAll, libs, "adw_sidebar_section_remove_all") | |
| 387 | + | core.PuregoSafeRegister(&xSidebarSectionSetMenuModel, libs, "adw_sidebar_section_set_menu_model") | |
| 388 | + | core.PuregoSafeRegister(&xSidebarSectionSetTitle, libs, "adw_sidebar_section_set_title") | |
| 386 | 389 | } | |
| @@ -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/gio" | 10 | "github.com/bnema/puregotk/v4/gio" | ||
| 10 | "github.com/bnema/puregotk/v4/glib" | 11 | "github.com/bnema/puregotk/v4/glib" | ||
| @@ -113,7 +114,6 @@ type SidebarSection struct { | |||||
| 113 | var xSidebarSectionGLibType func() types.GType | 114 | var xSidebarSectionGLibType func() types.GType | ||
| 114 | 115 | ||||
| 115 | func SidebarSectionGLibType() types.GType { | 116 | func SidebarSectionGLibType() types.GType { | ||
| 116 | - | core.LazyRegister(&xSidebarSectionGLibType, "ADW", "adw_sidebar_section_get_type", false) | |||
| 117 | return xSidebarSectionGLibType() | 117 | return xSidebarSectionGLibType() | ||
| 118 | } | 118 | } | ||
| 119 | 119 | ||||
| @@ -127,7 +127,6 @@ var xNewSidebarSection func() uintptr | |||||
| 127 | 127 | ||||
| 128 | // Creates a new `AdwSidebarSection`. | 128 | // Creates a new `AdwSidebarSection`. | ||
| 129 | func NewSidebarSection() *SidebarSection { | 129 | func NewSidebarSection() *SidebarSection { | ||
| 130 | - | core.LazyRegister(&xNewSidebarSection, "ADW", "adw_sidebar_section_new", false) | |||
| 131 | var cls *SidebarSection | 130 | var cls *SidebarSection | ||
| 132 | 131 | ||||
| 133 | cret := xNewSidebarSection() | 132 | cret := xNewSidebarSection() | ||
| @@ -146,8 +145,6 @@ var xSidebarSectionAppend func(uintptr, uintptr) | |||||
| 146 | // | 145 | // | ||
| 147 | // Cannot be used while a model is bound via [method@SidebarSection.bind_model]. | 146 | // Cannot be used while a model is bound via [method@SidebarSection.bind_model]. | ||
| 148 | func (x *SidebarSection) Append(ItemVar *SidebarItem) { | 147 | func (x *SidebarSection) Append(ItemVar *SidebarItem) { | ||
| 149 | - | core.LazyRegister(&xSidebarSectionAppend, "ADW", "adw_sidebar_section_append", false) | |||
| 150 | - | ||||
| 151 | xSidebarSectionAppend(x.GoPointer(), ItemVar.GoPointer()) | 148 | xSidebarSectionAppend(x.GoPointer(), ItemVar.GoPointer()) | ||
| 152 | } | 149 | } | ||
| 153 | 150 | ||||
| @@ -170,8 +167,6 @@ var xSidebarSectionBindModel func(uintptr, uintptr, uintptr, uintptr, uintptr) | |||||
| 170 | // Accessing items and modifying them is allowed, but the changes will be erased | 167 | // Accessing items and modifying them is allowed, but the changes will be erased | ||
| 171 | // whenever that part of the model changes, so it's not recommended. | 168 | // whenever that part of the model changes, so it's not recommended. | ||
| 172 | func (x *SidebarSection) BindModel(ModelVar gio.ListModel, CreateItemFuncVar *SidebarSectionCreateItemFunc, UserDataVar uintptr, UserDataFreeFuncVar *glib.DestroyNotify) { | 169 | func (x *SidebarSection) BindModel(ModelVar gio.ListModel, CreateItemFuncVar *SidebarSectionCreateItemFunc, UserDataVar uintptr, UserDataFreeFuncVar *glib.DestroyNotify) { | ||
| 173 | - | core.LazyRegister(&xSidebarSectionBindModel, "ADW", "adw_sidebar_section_bind_model", false) | |||
| 174 | - | ||||
| 175 | xSidebarSectionBindModel(x.GoPointer(), ModelVar.GoPointer(), glib.NewCallbackNullable(CreateItemFuncVar), UserDataVar, glib.NewCallback(UserDataFreeFuncVar)) | 170 | xSidebarSectionBindModel(x.GoPointer(), ModelVar.GoPointer(), glib.NewCallbackNullable(CreateItemFuncVar), UserDataVar, glib.NewCallback(UserDataFreeFuncVar)) | ||
| 176 | } | 171 | } | ||
| 177 | 172 | ||||
| @@ -184,7 +179,6 @@ var xSidebarSectionGetItem func(uintptr, uint) uintptr | |||||
| 184 | // | 179 | // | ||
| 185 | // Can return `NULL` if @index is larger or equal to the number of items. | 180 | // Can return `NULL` if @index is larger or equal to the number of items. | ||
| 186 | func (x *SidebarSection) GetItem(IndexVar uint) *SidebarItem { | 181 | func (x *SidebarSection) GetItem(IndexVar uint) *SidebarItem { | ||
| 187 | - | core.LazyRegister(&xSidebarSectionGetItem, "ADW", "adw_sidebar_section_get_item", false) | |||
| 188 | var cls *SidebarItem | 182 | var cls *SidebarItem | ||
| 189 | 183 | ||||
| 190 | cret := xSidebarSectionGetItem(x.GoPointer(), IndexVar) | 184 | cret := xSidebarSectionGetItem(x.GoPointer(), IndexVar) | ||
| @@ -204,7 +198,6 @@ var xSidebarSectionGetItems func(uintptr) uintptr | |||||
| 204 | // | 198 | // | ||
| 205 | // This can be used to keep an up-to-date view. | 199 | // This can be used to keep an up-to-date view. | ||
| 206 | func (x *SidebarSection) GetItems() *gio.ListModelBase { | 200 | func (x *SidebarSection) GetItems() *gio.ListModelBase { | ||
| 207 | - | core.LazyRegister(&xSidebarSectionGetItems, "ADW", "adw_sidebar_section_get_items", false) | |||
| 208 | var cls *gio.ListModelBase | 201 | var cls *gio.ListModelBase | ||
| 209 | 202 | ||||
| 210 | cret := xSidebarSectionGetItems(x.GoPointer()) | 203 | cret := xSidebarSectionGetItems(x.GoPointer()) | ||
| @@ -221,7 +214,6 @@ var xSidebarSectionGetMenuModel func(uintptr) uintptr | |||||
| 221 | 214 | ||||
| 222 | // Gets the context menu model for @self's items. | 215 | // Gets the context menu model for @self's items. | ||
| 223 | func (x *SidebarSection) GetMenuModel() *gio.MenuModel { | 216 | func (x *SidebarSection) GetMenuModel() *gio.MenuModel { | ||
| 224 | - | core.LazyRegister(&xSidebarSectionGetMenuModel, "ADW", "adw_sidebar_section_get_menu_model", false) | |||
| 225 | var cls *gio.MenuModel | 217 | var cls *gio.MenuModel | ||
| 226 | 218 | ||||
| 227 | cret := xSidebarSectionGetMenuModel(x.GoPointer()) | 219 | cret := xSidebarSectionGetMenuModel(x.GoPointer()) | ||
| @@ -239,7 +231,6 @@ var xSidebarSectionGetSidebar func(uintptr) uintptr | |||||
| 239 | 231 | ||||
| 240 | // Gets the sidebar @self is in. | 232 | // Gets the sidebar @self is in. | ||
| 241 | func (x *SidebarSection) GetSidebar() *Sidebar { | 233 | func (x *SidebarSection) GetSidebar() *Sidebar { | ||
| 242 | - | core.LazyRegister(&xSidebarSectionGetSidebar, "ADW", "adw_sidebar_section_get_sidebar", false) | |||
| 243 | var cls *Sidebar | 234 | var cls *Sidebar | ||
| 244 | 235 | ||||
| 245 | cret := xSidebarSectionGetSidebar(x.GoPointer()) | 236 | cret := xSidebarSectionGetSidebar(x.GoPointer()) | ||
| @@ -257,8 +248,6 @@ var xSidebarSectionGetTitle func(uintptr) string | |||||
| 257 | 248 | ||||
| 258 | // Gets the title of @self. | 249 | // Gets the title of @self. | ||
| 259 | func (x *SidebarSection) GetTitle() string { | 250 | func (x *SidebarSection) GetTitle() string { | ||
| 260 | - | core.LazyRegister(&xSidebarSectionGetTitle, "ADW", "adw_sidebar_section_get_title", false) | |||
| 261 | - | ||||
| 262 | cret := xSidebarSectionGetTitle(x.GoPointer()) | 251 | cret := xSidebarSectionGetTitle(x.GoPointer()) | ||
| 263 | return cret | 252 | return cret | ||
| 264 | } | 253 | } | ||
| @@ -272,8 +261,6 @@ var xSidebarSectionInsert func(uintptr, uintptr, int) | |||||
| 272 | // | 261 | // | ||
| 273 | // Cannot be used while a model is bound via [method@SidebarSection.bind_model]. | 262 | // Cannot be used while a model is bound via [method@SidebarSection.bind_model]. | ||
| 274 | func (x *SidebarSection) Insert(ItemVar *SidebarItem, PositionVar int) { | 263 | func (x *SidebarSection) Insert(ItemVar *SidebarItem, PositionVar int) { | ||
| 275 | - | core.LazyRegister(&xSidebarSectionInsert, "ADW", "adw_sidebar_section_insert", false) | |||
| 276 | - | ||||
| 277 | xSidebarSectionInsert(x.GoPointer(), ItemVar.GoPointer(), PositionVar) | 264 | xSidebarSectionInsert(x.GoPointer(), ItemVar.GoPointer(), PositionVar) | ||
| 278 | } | 265 | } | ||
| 279 | 266 | ||||
| @@ -283,8 +270,6 @@ var xSidebarSectionPrepend func(uintptr, uintptr) | |||||
| 283 | // | 270 | // | ||
| 284 | // Cannot be used while a model is bound via [method@SidebarSection.bind_model]. | 271 | // Cannot be used while a model is bound via [method@SidebarSection.bind_model]. | ||
| 285 | func (x *SidebarSection) Prepend(ItemVar *SidebarItem) { | 272 | func (x *SidebarSection) Prepend(ItemVar *SidebarItem) { | ||
| 286 | - | core.LazyRegister(&xSidebarSectionPrepend, "ADW", "adw_sidebar_section_prepend", false) | |||
| 287 | - | ||||
| 288 | xSidebarSectionPrepend(x.GoPointer(), ItemVar.GoPointer()) | 273 | xSidebarSectionPrepend(x.GoPointer(), ItemVar.GoPointer()) | ||
| 289 | } | 274 | } | ||
| 290 | 275 | ||||
| @@ -294,8 +279,6 @@ var xSidebarSectionRemove func(uintptr, uintptr) | |||||
| 294 | // | 279 | // | ||
| 295 | // Cannot be used while a model is bound via [method@SidebarSection.bind_model]. | 280 | // Cannot be used while a model is bound via [method@SidebarSection.bind_model]. | ||
| 296 | func (x *SidebarSection) Remove(ItemVar *SidebarItem) { | 281 | func (x *SidebarSection) Remove(ItemVar *SidebarItem) { | ||
| 297 | - | core.LazyRegister(&xSidebarSectionRemove, "ADW", "adw_sidebar_section_remove", false) | |||
| 298 | - | ||||
| 299 | xSidebarSectionRemove(x.GoPointer(), ItemVar.GoPointer()) | 282 | xSidebarSectionRemove(x.GoPointer(), ItemVar.GoPointer()) | ||
| 300 | } | 283 | } | ||
| 301 | 284 | ||||
| @@ -305,8 +288,6 @@ var xSidebarSectionRemoveAll func(uintptr) | |||||
| 305 | // | 288 | // | ||
| 306 | // Cannot be used while a model is bound via [method@SidebarSection.bind_model]. | 289 | // Cannot be used while a model is bound via [method@SidebarSection.bind_model]. | ||
| 307 | func (x *SidebarSection) RemoveAll() { | 290 | func (x *SidebarSection) RemoveAll() { | ||
| 308 | - | core.LazyRegister(&xSidebarSectionRemoveAll, "ADW", "adw_sidebar_section_remove_all", false) | |||
| 309 | - | ||||
| 310 | xSidebarSectionRemoveAll(x.GoPointer()) | 291 | xSidebarSectionRemoveAll(x.GoPointer()) | ||
| 311 | } | 292 | } | ||
| 312 | 293 | ||||
| @@ -320,8 +301,6 @@ var xSidebarSectionSetMenuModel func(uintptr, uintptr) | |||||
| 320 | // | 301 | // | ||
| 321 | // If not set, [property@Sidebar:menu-model] will be used instead. | 302 | // If not set, [property@Sidebar:menu-model] will be used instead. | ||
| 322 | func (x *SidebarSection) SetMenuModel(MenuModelVar *gio.MenuModel) { | 303 | func (x *SidebarSection) SetMenuModel(MenuModelVar *gio.MenuModel) { | ||
| 323 | - | core.LazyRegister(&xSidebarSectionSetMenuModel, "ADW", "adw_sidebar_section_set_menu_model", false) | |||
| 324 | - | ||||
| 325 | xSidebarSectionSetMenuModel(x.GoPointer(), MenuModelVar.GoPointer()) | 304 | xSidebarSectionSetMenuModel(x.GoPointer(), MenuModelVar.GoPointer()) | ||
| 326 | } | 305 | } | ||
| 327 | 306 | ||||
| @@ -331,8 +310,6 @@ var xSidebarSectionSetTitle func(uintptr, uintptr) | |||||
| 331 | // | 310 | // | ||
| 332 | // If set, it will be displayed instead of the separator before the section. | 311 | // If set, it will be displayed instead of the separator before the section. | ||
| 333 | func (x *SidebarSection) SetTitle(TitleVar *string) { | 312 | func (x *SidebarSection) SetTitle(TitleVar *string) { | ||
| 334 | - | core.LazyRegister(&xSidebarSectionSetTitle, "ADW", "adw_sidebar_section_set_title", false) | |||
| 335 | - | ||||
| 336 | TitleVarPtr := core.GStrdupNullable(TitleVar) | 313 | TitleVarPtr := core.GStrdupNullable(TitleVar) | ||
| 337 | defer core.GFreeNullable(TitleVarPtr) | 314 | defer core.GFreeNullable(TitleVarPtr) | ||
| 338 | 315 | ||||
| @@ -383,4 +360,30 @@ func (x *SidebarSection) GetBuildableId() string { | |||||
| 383 | func init() { | 360 | func init() { | ||
| 384 | core.SetPackageName("ADW", "libadwaita-1") | 361 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 385 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 362 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | ||
| 363 | + | var libs []uintptr | |||
| 364 | + | for _, libPath := range core.GetPaths("ADW") { | |||
| 365 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 366 | + | if err != nil { | |||
| 367 | + | panic(err) | |||
| 368 | + | } | |||
| 369 | + | libs = append(libs, lib) | |||
| 370 | + | } | |||
| 371 | + | ||||
| 372 | + | core.PuregoSafeRegister(&xSidebarSectionGLibType, libs, "adw_sidebar_section_get_type") | |||
| 373 | + | ||||
| 374 | + | core.PuregoSafeRegister(&xNewSidebarSection, libs, "adw_sidebar_section_new") | |||
| 375 | + | ||||
| 376 | + | core.PuregoSafeRegister(&xSidebarSectionAppend, libs, "adw_sidebar_section_append") | |||
| 377 | + | core.PuregoSafeRegister(&xSidebarSectionBindModel, libs, "adw_sidebar_section_bind_model") | |||
| 378 | + | core.PuregoSafeRegister(&xSidebarSectionGetItem, libs, "adw_sidebar_section_get_item") | |||
| 379 | + | core.PuregoSafeRegister(&xSidebarSectionGetItems, libs, "adw_sidebar_section_get_items") | |||
| 380 | + | core.PuregoSafeRegister(&xSidebarSectionGetMenuModel, libs, "adw_sidebar_section_get_menu_model") | |||
| 381 | + | core.PuregoSafeRegister(&xSidebarSectionGetSidebar, libs, "adw_sidebar_section_get_sidebar") | |||
| 382 | + | core.PuregoSafeRegister(&xSidebarSectionGetTitle, libs, "adw_sidebar_section_get_title") | |||
| 383 | + | core.PuregoSafeRegister(&xSidebarSectionInsert, libs, "adw_sidebar_section_insert") | |||
| 384 | + | core.PuregoSafeRegister(&xSidebarSectionPrepend, libs, "adw_sidebar_section_prepend") | |||
| 385 | + | core.PuregoSafeRegister(&xSidebarSectionRemove, libs, "adw_sidebar_section_remove") | |||
| 386 | + | core.PuregoSafeRegister(&xSidebarSectionRemoveAll, libs, "adw_sidebar_section_remove_all") | |||
| 387 | + | core.PuregoSafeRegister(&xSidebarSectionSetMenuModel, libs, "adw_sidebar_section_set_menu_model") | |||
| 388 | + | core.PuregoSafeRegister(&xSidebarSectionSetTitle, libs, "adw_sidebar_section_set_title") | |||
| 386 | } | 389 | } | ||