Revert "chore(deps): pin puregotk nil-signal fix"
This reverts commit a161e348e2093172038390b0906448f0ae979a0d.
- commit
- 40378d5e4fd2372d054e49168ab2a6f67aedd0fd
- author
- brice · · 2026-07-14 17:59 UTC
- parent
- 8d647bb
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
905 files · +25263 -27842
M go.mod +1 -1
| @@ -11,7 +11,7 @@ require ( | |||
| 11 | 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | |
| 12 | 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | |
| 13 | 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | |
| 14 | - | github.com/bnema/puregotk v0.7.1-0.20260714170452-0b6b9b901234 | |
| 14 | + | github.com/bnema/puregotk v0.7.0 | |
| 15 | 15 | github.com/charmbracelet/bubbles v1.0.0 | |
| 16 | 16 | github.com/charmbracelet/bubbletea v1.3.10 | |
| 17 | 17 | github.com/charmbracelet/lipgloss v1.1.0 | |
| @@ -11,7 +11,7 @@ require ( | |||||
| 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | ||
| 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | ||
| 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | ||
| 14 | - | github.com/bnema/puregotk v0.7.1-0.20260714170452-0b6b9b901234 | 14 | + | github.com/bnema/puregotk v0.7.0 |
| 15 | github.com/charmbracelet/bubbles v1.0.0 | 15 | github.com/charmbracelet/bubbles v1.0.0 | ||
| 16 | github.com/charmbracelet/bubbletea v1.3.10 | 16 | github.com/charmbracelet/bubbletea v1.3.10 | ||
| 17 | github.com/charmbracelet/lipgloss v1.1.0 | 17 | github.com/charmbracelet/lipgloss v1.1.0 | ||
M go.sum +0 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/internal/core/core.go +4 -197 generated file: collapsed
M vendor/github.com/bnema/puregotk/pkg/core/core.go +0 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-dialog.go +64 -99 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-window.go +62 -95 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-accent-color.go +15 -7 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-action-row.go +29 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-alert-dialog.go +47 -66 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-target.go +27 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-util.go +12 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation.go +26 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application-window.go +22 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application.go +15 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-avatar.go +25 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-banner.go +26 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bin.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bottom-sheet.go +38 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint-bin.go +19 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint.go +37 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-content.go +22 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-row.go +18 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-dots.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-lines.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel.go +37 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-layout.go +20 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-scrollable.go +22 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp.go +22 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-combo-row.go +33 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-dialog.go +38 -45 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-easing.go +13 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-entry-row.go +33 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-enum-list-model.go +22 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-expander-row.go +33 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-flap.go +48 -61 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-fold-threshold-policy.go +1 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-header-bar.go +33 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-inline-view-switcher.go +24 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout-slot.go +15 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout.go +17 -7 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-leaflet.go +56 -69 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-length-unit.go +14 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-main.go +15 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-message-dialog.go +44 -63 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-multi-layout-view.go +23 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-direction.go +1 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-split-view.go +32 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-view.go +49 -60 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-overlay-split-view.go +38 -48 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-password-entry-row.go +13 -2 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-dialog.go +25 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-group.go +26 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-page.go +33 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-row.go +22 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-window.go +29 -31 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcut-label.go +18 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-dialog.go +15 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-item.go +25 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-section.go +17 -8 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar-item.go +37 -45 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar-section.go +27 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar.go +39 -41
| @@ -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/gdk" | |
| 10 | 11 | "github.com/bnema/puregotk/v4/gio" | |
| @@ -40,7 +41,6 @@ type SidebarMode int | |||
| 40 | 41 | var xSidebarModeGLibType func() types.GType | |
| 41 | 42 | ||
| 42 | 43 | func SidebarModeGLibType() types.GType { | |
| 43 | - | core.LazyRegister(&xSidebarModeGLibType, "ADW", "adw_sidebar_mode_get_type", false) | |
| 44 | 44 | return xSidebarModeGLibType() | |
| 45 | 45 | } | |
| 46 | 46 | ||
| @@ -283,7 +283,6 @@ type Sidebar struct { | |||
| 283 | 283 | var xSidebarGLibType func() types.GType | |
| 284 | 284 | ||
| 285 | 285 | func SidebarGLibType() types.GType { | |
| 286 | - | core.LazyRegister(&xSidebarGLibType, "ADW", "adw_sidebar_get_type", false) | |
| 287 | 286 | return xSidebarGLibType() | |
| 288 | 287 | } | |
| 289 | 288 | ||
| @@ -297,7 +296,6 @@ var xNewSidebar func() uintptr | |||
| 297 | 296 | ||
| 298 | 297 | // Creates a new `AdwSidebar`. | |
| 299 | 298 | func NewSidebar() *Sidebar { | |
| 300 | - | core.LazyRegister(&xNewSidebar, "ADW", "adw_sidebar_new", false) | |
| 301 | 299 | var cls *Sidebar | |
| 302 | 300 | ||
| 303 | 301 | cret := xNewSidebar() | |
| @@ -315,8 +313,6 @@ var xSidebarAppend func(uintptr, uintptr) | |||
| 315 | 313 | ||
| 316 | 314 | // Appends @section to @self. | |
| 317 | 315 | func (x *Sidebar) Append(SectionVar *SidebarSection) { | |
| 318 | - | core.LazyRegister(&xSidebarAppend, "ADW", "adw_sidebar_append", false) | |
| 319 | - | ||
| 320 | 316 | xSidebarAppend(x.GoPointer(), SectionVar.GoPointer()) | |
| 321 | 317 | } | |
| 322 | 318 | ||
| @@ -324,8 +320,6 @@ var xSidebarGetDropPreload func(uintptr) bool | |||
| 324 | 320 | ||
| 325 | 321 | // Gets whether drop data should be preloaded on hover. | |
| 326 | 322 | func (x *Sidebar) GetDropPreload() bool { | |
| 327 | - | core.LazyRegister(&xSidebarGetDropPreload, "ADW", "adw_sidebar_get_drop_preload", false) | |
| 328 | - | ||
| 329 | 323 | cret := xSidebarGetDropPreload(x.GoPointer()) | |
| 330 | 324 | return cret | |
| 331 | 325 | } | |
| @@ -334,7 +328,6 @@ var xSidebarGetFilter func(uintptr) uintptr | |||
| 334 | 328 | ||
| 335 | 329 | // Gets the item filter for @self. | |
| 336 | 330 | func (x *Sidebar) GetFilter() *gtk.Filter { | |
| 337 | - | core.LazyRegister(&xSidebarGetFilter, "ADW", "adw_sidebar_get_filter", false) | |
| 338 | 331 | var cls *gtk.Filter | |
| 339 | 332 | ||
| 340 | 333 | cret := xSidebarGetFilter(x.GoPointer()) | |
| @@ -357,7 +350,6 @@ var xSidebarGetItem func(uintptr, uint) uintptr | |||
| 357 | 350 | // | |
| 358 | 351 | // Can return `NULL` if @index is larger or equal to the number of items. | |
| 359 | 352 | func (x *Sidebar) GetItem(IndexVar uint) *SidebarItem { | |
| 360 | - | core.LazyRegister(&xSidebarGetItem, "ADW", "adw_sidebar_get_item", false) | |
| 361 | 353 | var cls *SidebarItem | |
| 362 | 354 | ||
| 363 | 355 | cret := xSidebarGetItem(x.GoPointer(), IndexVar) | |
| @@ -385,7 +377,6 @@ var xSidebarGetItems func(uintptr) uintptr | |||
| 385 | 377 | // | |
| 386 | 378 | // To only track sections, use [property@Sidebar:sections] instead. | |
| 387 | 379 | func (x *Sidebar) GetItems() *gtk.SelectionModelBase { | |
| 388 | - | core.LazyRegister(&xSidebarGetItems, "ADW", "adw_sidebar_get_items", false) | |
| 389 | 380 | var cls *gtk.SelectionModelBase | |
| 390 | 381 | ||
| 391 | 382 | cret := xSidebarGetItems(x.GoPointer()) | |
| @@ -402,7 +393,6 @@ var xSidebarGetMenuModel func(uintptr) uintptr | |||
| 402 | 393 | ||
| 403 | 394 | // Gets the context menu model for @self's items. | |
| 404 | 395 | func (x *Sidebar) GetMenuModel() *gio.MenuModel { | |
| 405 | - | core.LazyRegister(&xSidebarGetMenuModel, "ADW", "adw_sidebar_get_menu_model", false) | |
| 406 | 396 | var cls *gio.MenuModel | |
| 407 | 397 | ||
| 408 | 398 | cret := xSidebarGetMenuModel(x.GoPointer()) | |
| @@ -420,8 +410,6 @@ var xSidebarGetMode func(uintptr) SidebarMode | |||
| 420 | 410 | ||
| 421 | 411 | // Gets @self's look and behavior. | |
| 422 | 412 | func (x *Sidebar) GetMode() SidebarMode { | |
| 423 | - | core.LazyRegister(&xSidebarGetMode, "ADW", "adw_sidebar_get_mode", false) | |
| 424 | - | ||
| 425 | 413 | cret := xSidebarGetMode(x.GoPointer()) | |
| 426 | 414 | return cret | |
| 427 | 415 | } | |
| @@ -430,7 +418,6 @@ var xSidebarGetPlaceholder func(uintptr) uintptr | |||
| 430 | 418 | ||
| 431 | 419 | // Gets the placeholder widget for @self. | |
| 432 | 420 | func (x *Sidebar) GetPlaceholder() *gtk.Widget { | |
| 433 | - | core.LazyRegister(&xSidebarGetPlaceholder, "ADW", "adw_sidebar_get_placeholder", false) | |
| 434 | 421 | var cls *gtk.Widget | |
| 435 | 422 | ||
| 436 | 423 | cret := xSidebarGetPlaceholder(x.GoPointer()) | |
| @@ -450,7 +437,6 @@ var xSidebarGetSection func(uintptr, uint) uintptr | |||
| 450 | 437 | // | |
| 451 | 438 | // Can return `NULL` if @index is larger or equal to the number of sections. | |
| 452 | 439 | func (x *Sidebar) GetSection(IndexVar uint) *SidebarSection { | |
| 453 | - | core.LazyRegister(&xSidebarGetSection, "ADW", "adw_sidebar_get_section", false) | |
| 454 | 440 | var cls *SidebarSection | |
| 455 | 441 | ||
| 456 | 442 | cret := xSidebarGetSection(x.GoPointer(), IndexVar) | |
| @@ -472,7 +458,6 @@ var xSidebarGetSections func(uintptr) uintptr | |||
| 472 | 458 | // | |
| 473 | 459 | // To track items, use [property@Sidebar:items] instead. | |
| 474 | 460 | func (x *Sidebar) GetSections() *gio.ListModelBase { | |
| 475 | - | core.LazyRegister(&xSidebarGetSections, "ADW", "adw_sidebar_get_sections", false) | |
| 476 | 461 | var cls *gio.ListModelBase | |
| 477 | 462 | ||
| 478 | 463 | cret := xSidebarGetSections(x.GoPointer()) | |
| @@ -491,8 +476,6 @@ var xSidebarGetSelected func(uintptr) uint | |||
| 491 | 476 | // | |
| 492 | 477 | // See also: [method@Sidebar.get_selected_item]. | |
| 493 | 478 | func (x *Sidebar) GetSelected() uint { | |
| 494 | - | core.LazyRegister(&xSidebarGetSelected, "ADW", "adw_sidebar_get_selected", false) | |
| 495 | - | ||
| 496 | 479 | cret := xSidebarGetSelected(x.GoPointer()) | |
| 497 | 480 | return cret | |
| 498 | 481 | } | |
| @@ -506,7 +489,6 @@ var xSidebarGetSelectedItem func(uintptr) uintptr | |||
| 506 | 489 | // | |
| 507 | 490 | // To change selection, use [method@Sidebar.set_selected]. | |
| 508 | 491 | func (x *Sidebar) GetSelectedItem() *SidebarItem { | |
| 509 | - | core.LazyRegister(&xSidebarGetSelectedItem, "ADW", "adw_sidebar_get_selected_item", false) | |
| 510 | 492 | var cls *SidebarItem | |
| 511 | 493 | ||
| 512 | 494 | cret := xSidebarGetSelectedItem(x.GoPointer()) | |
| @@ -527,8 +509,6 @@ var xSidebarInsert func(uintptr, uintptr, int) | |||
| 527 | 509 | // If @position is -1, or larger than the total number of sections in @self, | |
| 528 | 510 | // the section will be appended to the end. | |
| 529 | 511 | func (x *Sidebar) Insert(SectionVar *SidebarSection, PositionVar int) { | |
| 530 | - | core.LazyRegister(&xSidebarInsert, "ADW", "adw_sidebar_insert", false) | |
| 531 | - | ||
| 532 | 512 | xSidebarInsert(x.GoPointer(), SectionVar.GoPointer(), PositionVar) | |
| 533 | 513 | } | |
| 534 | 514 | ||
| @@ -536,8 +516,6 @@ var xSidebarPrepend func(uintptr, uintptr) | |||
| 536 | 516 | ||
| 537 | 517 | // Prepends @section to @self. | |
| 538 | 518 | func (x *Sidebar) Prepend(SectionVar *SidebarSection) { | |
| 539 | - | core.LazyRegister(&xSidebarPrepend, "ADW", "adw_sidebar_prepend", false) | |
| 540 | - | ||
| 541 | 519 | xSidebarPrepend(x.GoPointer(), SectionVar.GoPointer()) | |
| 542 | 520 | } | |
| 543 | 521 | ||
| @@ -545,8 +523,6 @@ var xSidebarRemove func(uintptr, uintptr) | |||
| 545 | 523 | ||
| 546 | 524 | // Removes @section from @self. | |
| 547 | 525 | func (x *Sidebar) Remove(SectionVar *SidebarSection) { | |
| 548 | - | core.LazyRegister(&xSidebarRemove, "ADW", "adw_sidebar_remove", false) | |
| 549 | - | ||
| 550 | 526 | xSidebarRemove(x.GoPointer(), SectionVar.GoPointer()) | |
| 551 | 527 | } | |
| 552 | 528 | ||
| @@ -554,8 +530,6 @@ var xSidebarRemoveAll func(uintptr) | |||
| 554 | 530 | ||
| 555 | 531 | // Removes all sections from @self. | |
| 556 | 532 | func (x *Sidebar) RemoveAll() { | |
| 557 | - | core.LazyRegister(&xSidebarRemoveAll, "ADW", "adw_sidebar_remove_all", false) | |
| 558 | - | ||
| 559 | 533 | xSidebarRemoveAll(x.GoPointer()) | |
| 560 | 534 | } | |
| 561 | 535 | ||
| @@ -565,8 +539,6 @@ var xSidebarSetDropPreload func(uintptr, bool) | |||
| 565 | 539 | // | |
| 566 | 540 | // See [property@Gtk.DropTarget:preload]. | |
| 567 | 541 | func (x *Sidebar) SetDropPreload(PreloadVar bool) { | |
| 568 | - | core.LazyRegister(&xSidebarSetDropPreload, "ADW", "adw_sidebar_set_drop_preload", false) | |
| 569 | - | ||
| 570 | 542 | xSidebarSetDropPreload(x.GoPointer(), PreloadVar) | |
| 571 | 543 | } | |
| 572 | 544 | ||
| @@ -578,8 +550,6 @@ var xSidebarSetFilter func(uintptr, uintptr) | |||
| 578 | 550 | // | |
| 579 | 551 | // Use [property@Sidebar:placeholder] to provide an empty state. | |
| 580 | 552 | func (x *Sidebar) SetFilter(FilterVar *gtk.Filter) { | |
| 581 | - | core.LazyRegister(&xSidebarSetFilter, "ADW", "adw_sidebar_set_filter", false) | |
| 582 | - | ||
| 583 | 553 | xSidebarSetFilter(x.GoPointer(), FilterVar.GoPointer()) | |
| 584 | 554 | } | |
| 585 | 555 | ||
| @@ -593,8 +563,6 @@ var xSidebarSetMenuModel func(uintptr, uintptr) | |||
| 593 | 563 | // | |
| 594 | 564 | // [property@Sidebar:menu-model] will be preferred over this model if set. | |
| 595 | 565 | func (x *Sidebar) SetMenuModel(MenuModelVar *gio.MenuModel) { | |
| 596 | - | core.LazyRegister(&xSidebarSetMenuModel, "ADW", "adw_sidebar_set_menu_model", false) | |
| 597 | - | ||
| 598 | 566 | xSidebarSetMenuModel(x.GoPointer(), MenuModelVar.GoPointer()) | |
| 599 | 567 | } | |
| 600 | 568 | ||
| @@ -622,8 +590,6 @@ var xSidebarSetMode func(uintptr, SidebarMode) | |||
| 622 | 590 | // When used with [class@OverlaySplitView], the sidebar should stay in sidebar | |
| 623 | 591 | // mode, as the sidebar pane is still a sidebar when collapsed. | |
| 624 | 592 | func (x *Sidebar) SetMode(ModeVar SidebarMode) { | |
| 625 | - | core.LazyRegister(&xSidebarSetMode, "ADW", "adw_sidebar_set_mode", false) | |
| 626 | - | ||
| 627 | 593 | xSidebarSetMode(x.GoPointer(), ModeVar) | |
| 628 | 594 | } | |
| 629 | 595 | ||
| @@ -634,8 +600,6 @@ var xSidebarSetPlaceholder func(uintptr, uintptr) | |||
| 634 | 600 | // This widget will be shown if @self has no items, or all of its items have | |
| 635 | 601 | // been filtered out by [property@Sidebar:filter]. | |
| 636 | 602 | func (x *Sidebar) SetPlaceholder(PlaceholderVar *gtk.Widget) { | |
| 637 | - | core.LazyRegister(&xSidebarSetPlaceholder, "ADW", "adw_sidebar_set_placeholder", false) | |
| 638 | - | ||
| 639 | 603 | xSidebarSetPlaceholder(x.GoPointer(), PlaceholderVar.GoPointer()) | |
| 640 | 604 | } | |
| 641 | 605 | ||
| @@ -651,8 +615,6 @@ var xSidebarSetSelected func(uintptr, uint) | |||
| 651 | 615 | // | |
| 652 | 616 | // See also: [property@Sidebar:selected-item]. | |
| 653 | 617 | func (x *Sidebar) SetSelected(SelectedVar uint) { | |
| 654 | - | core.LazyRegister(&xSidebarSetSelected, "ADW", "adw_sidebar_set_selected", false) | |
| 655 | - | ||
| 656 | 618 | xSidebarSetSelected(x.GoPointer(), SelectedVar) | |
| 657 | 619 | } | |
| 658 | 620 | ||
| @@ -664,8 +626,6 @@ var xSidebarSetupDropTarget func(uintptr, gdk.DragAction, []types.GType, uint) | |||
| 664 | 626 | // | |
| 665 | 627 | // The [signal@Sidebar::drop] signal can be used to handle the drop. | |
| 666 | 628 | func (x *Sidebar) SetupDropTarget(ActionsVar gdk.DragAction, TypesVar []types.GType, NTypesVar uint) { | |
| 667 | - | core.LazyRegister(&xSidebarSetupDropTarget, "ADW", "adw_sidebar_setup_drop_target", false) | |
| 668 | - | ||
| 669 | 629 | xSidebarSetupDropTarget(x.GoPointer(), ActionsVar, TypesVar, NTypesVar) | |
| 670 | 630 | } | |
| 671 | 631 | ||
| @@ -1141,4 +1101,42 @@ func (x *Sidebar) GetBuildableId() string { | |||
| 1141 | 1101 | func init() { | |
| 1142 | 1102 | core.SetPackageName("ADW", "libadwaita-1") | |
| 1143 | 1103 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | |
| 1104 | + | var libs []uintptr | |
| 1105 | + | for _, libPath := range core.GetPaths("ADW") { | |
| 1106 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 1107 | + | if err != nil { | |
| 1108 | + | panic(err) | |
| 1109 | + | } | |
| 1110 | + | libs = append(libs, lib) | |
| 1111 | + | } | |
| 1112 | + | ||
| 1113 | + | core.PuregoSafeRegister(&xSidebarModeGLibType, libs, "adw_sidebar_mode_get_type") | |
| 1114 | + | ||
| 1115 | + | core.PuregoSafeRegister(&xSidebarGLibType, libs, "adw_sidebar_get_type") | |
| 1116 | + | ||
| 1117 | + | core.PuregoSafeRegister(&xNewSidebar, libs, "adw_sidebar_new") | |
| 1118 | + | ||
| 1119 | + | core.PuregoSafeRegister(&xSidebarAppend, libs, "adw_sidebar_append") | |
| 1120 | + | core.PuregoSafeRegister(&xSidebarGetDropPreload, libs, "adw_sidebar_get_drop_preload") | |
| 1121 | + | core.PuregoSafeRegister(&xSidebarGetFilter, libs, "adw_sidebar_get_filter") | |
| 1122 | + | core.PuregoSafeRegister(&xSidebarGetItem, libs, "adw_sidebar_get_item") | |
| 1123 | + | core.PuregoSafeRegister(&xSidebarGetItems, libs, "adw_sidebar_get_items") | |
| 1124 | + | core.PuregoSafeRegister(&xSidebarGetMenuModel, libs, "adw_sidebar_get_menu_model") | |
| 1125 | + | core.PuregoSafeRegister(&xSidebarGetMode, libs, "adw_sidebar_get_mode") | |
| 1126 | + | core.PuregoSafeRegister(&xSidebarGetPlaceholder, libs, "adw_sidebar_get_placeholder") | |
| 1127 | + | core.PuregoSafeRegister(&xSidebarGetSection, libs, "adw_sidebar_get_section") | |
| 1128 | + | core.PuregoSafeRegister(&xSidebarGetSections, libs, "adw_sidebar_get_sections") | |
| 1129 | + | core.PuregoSafeRegister(&xSidebarGetSelected, libs, "adw_sidebar_get_selected") | |
| 1130 | + | core.PuregoSafeRegister(&xSidebarGetSelectedItem, libs, "adw_sidebar_get_selected_item") | |
| 1131 | + | core.PuregoSafeRegister(&xSidebarInsert, libs, "adw_sidebar_insert") | |
| 1132 | + | core.PuregoSafeRegister(&xSidebarPrepend, libs, "adw_sidebar_prepend") | |
| 1133 | + | core.PuregoSafeRegister(&xSidebarRemove, libs, "adw_sidebar_remove") | |
| 1134 | + | core.PuregoSafeRegister(&xSidebarRemoveAll, libs, "adw_sidebar_remove_all") | |
| 1135 | + | core.PuregoSafeRegister(&xSidebarSetDropPreload, libs, "adw_sidebar_set_drop_preload") | |
| 1136 | + | core.PuregoSafeRegister(&xSidebarSetFilter, libs, "adw_sidebar_set_filter") | |
| 1137 | + | core.PuregoSafeRegister(&xSidebarSetMenuModel, libs, "adw_sidebar_set_menu_model") | |
| 1138 | + | core.PuregoSafeRegister(&xSidebarSetMode, libs, "adw_sidebar_set_mode") | |
| 1139 | + | core.PuregoSafeRegister(&xSidebarSetPlaceholder, libs, "adw_sidebar_set_placeholder") | |
| 1140 | + | core.PuregoSafeRegister(&xSidebarSetSelected, libs, "adw_sidebar_set_selected") | |
| 1141 | + | core.PuregoSafeRegister(&xSidebarSetupDropTarget, libs, "adw_sidebar_setup_drop_target") | |
| 1144 | 1142 | } | |
| @@ -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/gdk" | 10 | "github.com/bnema/puregotk/v4/gdk" | ||
| 10 | "github.com/bnema/puregotk/v4/gio" | 11 | "github.com/bnema/puregotk/v4/gio" | ||
| @@ -40,7 +41,6 @@ type SidebarMode int | |||||
| 40 | var xSidebarModeGLibType func() types.GType | 41 | var xSidebarModeGLibType func() types.GType | ||
| 41 | 42 | ||||
| 42 | func SidebarModeGLibType() types.GType { | 43 | func SidebarModeGLibType() types.GType { | ||
| 43 | - | core.LazyRegister(&xSidebarModeGLibType, "ADW", "adw_sidebar_mode_get_type", false) | |||
| 44 | return xSidebarModeGLibType() | 44 | return xSidebarModeGLibType() | ||
| 45 | } | 45 | } | ||
| 46 | 46 | ||||
| @@ -283,7 +283,6 @@ type Sidebar struct { | |||||
| 283 | var xSidebarGLibType func() types.GType | 283 | var xSidebarGLibType func() types.GType | ||
| 284 | 284 | ||||
| 285 | func SidebarGLibType() types.GType { | 285 | func SidebarGLibType() types.GType { | ||
| 286 | - | core.LazyRegister(&xSidebarGLibType, "ADW", "adw_sidebar_get_type", false) | |||
| 287 | return xSidebarGLibType() | 286 | return xSidebarGLibType() | ||
| 288 | } | 287 | } | ||
| 289 | 288 | ||||
| @@ -297,7 +296,6 @@ var xNewSidebar func() uintptr | |||||
| 297 | 296 | ||||
| 298 | // Creates a new `AdwSidebar`. | 297 | // Creates a new `AdwSidebar`. | ||
| 299 | func NewSidebar() *Sidebar { | 298 | func NewSidebar() *Sidebar { | ||
| 300 | - | core.LazyRegister(&xNewSidebar, "ADW", "adw_sidebar_new", false) | |||
| 301 | var cls *Sidebar | 299 | var cls *Sidebar | ||
| 302 | 300 | ||||
| 303 | cret := xNewSidebar() | 301 | cret := xNewSidebar() | ||
| @@ -315,8 +313,6 @@ var xSidebarAppend func(uintptr, uintptr) | |||||
| 315 | 313 | ||||
| 316 | // Appends @section to @self. | 314 | // Appends @section to @self. | ||
| 317 | func (x *Sidebar) Append(SectionVar *SidebarSection) { | 315 | func (x *Sidebar) Append(SectionVar *SidebarSection) { | ||
| 318 | - | core.LazyRegister(&xSidebarAppend, "ADW", "adw_sidebar_append", false) | |||
| 319 | - | ||||
| 320 | xSidebarAppend(x.GoPointer(), SectionVar.GoPointer()) | 316 | xSidebarAppend(x.GoPointer(), SectionVar.GoPointer()) | ||
| 321 | } | 317 | } | ||
| 322 | 318 | ||||
| @@ -324,8 +320,6 @@ var xSidebarGetDropPreload func(uintptr) bool | |||||
| 324 | 320 | ||||
| 325 | // Gets whether drop data should be preloaded on hover. | 321 | // Gets whether drop data should be preloaded on hover. | ||
| 326 | func (x *Sidebar) GetDropPreload() bool { | 322 | func (x *Sidebar) GetDropPreload() bool { | ||
| 327 | - | core.LazyRegister(&xSidebarGetDropPreload, "ADW", "adw_sidebar_get_drop_preload", false) | |||
| 328 | - | ||||
| 329 | cret := xSidebarGetDropPreload(x.GoPointer()) | 323 | cret := xSidebarGetDropPreload(x.GoPointer()) | ||
| 330 | return cret | 324 | return cret | ||
| 331 | } | 325 | } | ||
| @@ -334,7 +328,6 @@ var xSidebarGetFilter func(uintptr) uintptr | |||||
| 334 | 328 | ||||
| 335 | // Gets the item filter for @self. | 329 | // Gets the item filter for @self. | ||
| 336 | func (x *Sidebar) GetFilter() *gtk.Filter { | 330 | func (x *Sidebar) GetFilter() *gtk.Filter { | ||
| 337 | - | core.LazyRegister(&xSidebarGetFilter, "ADW", "adw_sidebar_get_filter", false) | |||
| 338 | var cls *gtk.Filter | 331 | var cls *gtk.Filter | ||
| 339 | 332 | ||||
| 340 | cret := xSidebarGetFilter(x.GoPointer()) | 333 | cret := xSidebarGetFilter(x.GoPointer()) | ||
| @@ -357,7 +350,6 @@ var xSidebarGetItem func(uintptr, uint) uintptr | |||||
| 357 | // | 350 | // | ||
| 358 | // Can return `NULL` if @index is larger or equal to the number of items. | 351 | // Can return `NULL` if @index is larger or equal to the number of items. | ||
| 359 | func (x *Sidebar) GetItem(IndexVar uint) *SidebarItem { | 352 | func (x *Sidebar) GetItem(IndexVar uint) *SidebarItem { | ||
| 360 | - | core.LazyRegister(&xSidebarGetItem, "ADW", "adw_sidebar_get_item", false) | |||
| 361 | var cls *SidebarItem | 353 | var cls *SidebarItem | ||
| 362 | 354 | ||||
| 363 | cret := xSidebarGetItem(x.GoPointer(), IndexVar) | 355 | cret := xSidebarGetItem(x.GoPointer(), IndexVar) | ||
| @@ -385,7 +377,6 @@ var xSidebarGetItems func(uintptr) uintptr | |||||
| 385 | // | 377 | // | ||
| 386 | // To only track sections, use [property@Sidebar:sections] instead. | 378 | // To only track sections, use [property@Sidebar:sections] instead. | ||
| 387 | func (x *Sidebar) GetItems() *gtk.SelectionModelBase { | 379 | func (x *Sidebar) GetItems() *gtk.SelectionModelBase { | ||
| 388 | - | core.LazyRegister(&xSidebarGetItems, "ADW", "adw_sidebar_get_items", false) | |||
| 389 | var cls *gtk.SelectionModelBase | 380 | var cls *gtk.SelectionModelBase | ||
| 390 | 381 | ||||
| 391 | cret := xSidebarGetItems(x.GoPointer()) | 382 | cret := xSidebarGetItems(x.GoPointer()) | ||
| @@ -402,7 +393,6 @@ var xSidebarGetMenuModel func(uintptr) uintptr | |||||
| 402 | 393 | ||||
| 403 | // Gets the context menu model for @self's items. | 394 | // Gets the context menu model for @self's items. | ||
| 404 | func (x *Sidebar) GetMenuModel() *gio.MenuModel { | 395 | func (x *Sidebar) GetMenuModel() *gio.MenuModel { | ||
| 405 | - | core.LazyRegister(&xSidebarGetMenuModel, "ADW", "adw_sidebar_get_menu_model", false) | |||
| 406 | var cls *gio.MenuModel | 396 | var cls *gio.MenuModel | ||
| 407 | 397 | ||||
| 408 | cret := xSidebarGetMenuModel(x.GoPointer()) | 398 | cret := xSidebarGetMenuModel(x.GoPointer()) | ||
| @@ -420,8 +410,6 @@ var xSidebarGetMode func(uintptr) SidebarMode | |||||
| 420 | 410 | ||||
| 421 | // Gets @self's look and behavior. | 411 | // Gets @self's look and behavior. | ||
| 422 | func (x *Sidebar) GetMode() SidebarMode { | 412 | func (x *Sidebar) GetMode() SidebarMode { | ||
| 423 | - | core.LazyRegister(&xSidebarGetMode, "ADW", "adw_sidebar_get_mode", false) | |||
| 424 | - | ||||
| 425 | cret := xSidebarGetMode(x.GoPointer()) | 413 | cret := xSidebarGetMode(x.GoPointer()) | ||
| 426 | return cret | 414 | return cret | ||
| 427 | } | 415 | } | ||
| @@ -430,7 +418,6 @@ var xSidebarGetPlaceholder func(uintptr) uintptr | |||||
| 430 | 418 | ||||
| 431 | // Gets the placeholder widget for @self. | 419 | // Gets the placeholder widget for @self. | ||
| 432 | func (x *Sidebar) GetPlaceholder() *gtk.Widget { | 420 | func (x *Sidebar) GetPlaceholder() *gtk.Widget { | ||
| 433 | - | core.LazyRegister(&xSidebarGetPlaceholder, "ADW", "adw_sidebar_get_placeholder", false) | |||
| 434 | var cls *gtk.Widget | 421 | var cls *gtk.Widget | ||
| 435 | 422 | ||||
| 436 | cret := xSidebarGetPlaceholder(x.GoPointer()) | 423 | cret := xSidebarGetPlaceholder(x.GoPointer()) | ||
| @@ -450,7 +437,6 @@ var xSidebarGetSection func(uintptr, uint) uintptr | |||||
| 450 | // | 437 | // | ||
| 451 | // Can return `NULL` if @index is larger or equal to the number of sections. | 438 | // Can return `NULL` if @index is larger or equal to the number of sections. | ||
| 452 | func (x *Sidebar) GetSection(IndexVar uint) *SidebarSection { | 439 | func (x *Sidebar) GetSection(IndexVar uint) *SidebarSection { | ||
| 453 | - | core.LazyRegister(&xSidebarGetSection, "ADW", "adw_sidebar_get_section", false) | |||
| 454 | var cls *SidebarSection | 440 | var cls *SidebarSection | ||
| 455 | 441 | ||||
| 456 | cret := xSidebarGetSection(x.GoPointer(), IndexVar) | 442 | cret := xSidebarGetSection(x.GoPointer(), IndexVar) | ||
| @@ -472,7 +458,6 @@ var xSidebarGetSections func(uintptr) uintptr | |||||
| 472 | // | 458 | // | ||
| 473 | // To track items, use [property@Sidebar:items] instead. | 459 | // To track items, use [property@Sidebar:items] instead. | ||
| 474 | func (x *Sidebar) GetSections() *gio.ListModelBase { | 460 | func (x *Sidebar) GetSections() *gio.ListModelBase { | ||
| 475 | - | core.LazyRegister(&xSidebarGetSections, "ADW", "adw_sidebar_get_sections", false) | |||
| 476 | var cls *gio.ListModelBase | 461 | var cls *gio.ListModelBase | ||
| 477 | 462 | ||||
| 478 | cret := xSidebarGetSections(x.GoPointer()) | 463 | cret := xSidebarGetSections(x.GoPointer()) | ||
| @@ -491,8 +476,6 @@ var xSidebarGetSelected func(uintptr) uint | |||||
| 491 | // | 476 | // | ||
| 492 | // See also: [method@Sidebar.get_selected_item]. | 477 | // See also: [method@Sidebar.get_selected_item]. | ||
| 493 | func (x *Sidebar) GetSelected() uint { | 478 | func (x *Sidebar) GetSelected() uint { | ||
| 494 | - | core.LazyRegister(&xSidebarGetSelected, "ADW", "adw_sidebar_get_selected", false) | |||
| 495 | - | ||||
| 496 | cret := xSidebarGetSelected(x.GoPointer()) | 479 | cret := xSidebarGetSelected(x.GoPointer()) | ||
| 497 | return cret | 480 | return cret | ||
| 498 | } | 481 | } | ||
| @@ -506,7 +489,6 @@ var xSidebarGetSelectedItem func(uintptr) uintptr | |||||
| 506 | // | 489 | // | ||
| 507 | // To change selection, use [method@Sidebar.set_selected]. | 490 | // To change selection, use [method@Sidebar.set_selected]. | ||
| 508 | func (x *Sidebar) GetSelectedItem() *SidebarItem { | 491 | func (x *Sidebar) GetSelectedItem() *SidebarItem { | ||
| 509 | - | core.LazyRegister(&xSidebarGetSelectedItem, "ADW", "adw_sidebar_get_selected_item", false) | |||
| 510 | var cls *SidebarItem | 492 | var cls *SidebarItem | ||
| 511 | 493 | ||||
| 512 | cret := xSidebarGetSelectedItem(x.GoPointer()) | 494 | cret := xSidebarGetSelectedItem(x.GoPointer()) | ||
| @@ -527,8 +509,6 @@ var xSidebarInsert func(uintptr, uintptr, int) | |||||
| 527 | // If @position is -1, or larger than the total number of sections in @self, | 509 | // If @position is -1, or larger than the total number of sections in @self, | ||
| 528 | // the section will be appended to the end. | 510 | // the section will be appended to the end. | ||
| 529 | func (x *Sidebar) Insert(SectionVar *SidebarSection, PositionVar int) { | 511 | func (x *Sidebar) Insert(SectionVar *SidebarSection, PositionVar int) { | ||
| 530 | - | core.LazyRegister(&xSidebarInsert, "ADW", "adw_sidebar_insert", false) | |||
| 531 | - | ||||
| 532 | xSidebarInsert(x.GoPointer(), SectionVar.GoPointer(), PositionVar) | 512 | xSidebarInsert(x.GoPointer(), SectionVar.GoPointer(), PositionVar) | ||
| 533 | } | 513 | } | ||
| 534 | 514 | ||||
| @@ -536,8 +516,6 @@ var xSidebarPrepend func(uintptr, uintptr) | |||||
| 536 | 516 | ||||
| 537 | // Prepends @section to @self. | 517 | // Prepends @section to @self. | ||
| 538 | func (x *Sidebar) Prepend(SectionVar *SidebarSection) { | 518 | func (x *Sidebar) Prepend(SectionVar *SidebarSection) { | ||
| 539 | - | core.LazyRegister(&xSidebarPrepend, "ADW", "adw_sidebar_prepend", false) | |||
| 540 | - | ||||
| 541 | xSidebarPrepend(x.GoPointer(), SectionVar.GoPointer()) | 519 | xSidebarPrepend(x.GoPointer(), SectionVar.GoPointer()) | ||
| 542 | } | 520 | } | ||
| 543 | 521 | ||||
| @@ -545,8 +523,6 @@ var xSidebarRemove func(uintptr, uintptr) | |||||
| 545 | 523 | ||||
| 546 | // Removes @section from @self. | 524 | // Removes @section from @self. | ||
| 547 | func (x *Sidebar) Remove(SectionVar *SidebarSection) { | 525 | func (x *Sidebar) Remove(SectionVar *SidebarSection) { | ||
| 548 | - | core.LazyRegister(&xSidebarRemove, "ADW", "adw_sidebar_remove", false) | |||
| 549 | - | ||||
| 550 | xSidebarRemove(x.GoPointer(), SectionVar.GoPointer()) | 526 | xSidebarRemove(x.GoPointer(), SectionVar.GoPointer()) | ||
| 551 | } | 527 | } | ||
| 552 | 528 | ||||
| @@ -554,8 +530,6 @@ var xSidebarRemoveAll func(uintptr) | |||||
| 554 | 530 | ||||
| 555 | // Removes all sections from @self. | 531 | // Removes all sections from @self. | ||
| 556 | func (x *Sidebar) RemoveAll() { | 532 | func (x *Sidebar) RemoveAll() { | ||
| 557 | - | core.LazyRegister(&xSidebarRemoveAll, "ADW", "adw_sidebar_remove_all", false) | |||
| 558 | - | ||||
| 559 | xSidebarRemoveAll(x.GoPointer()) | 533 | xSidebarRemoveAll(x.GoPointer()) | ||
| 560 | } | 534 | } | ||
| 561 | 535 | ||||
| @@ -565,8 +539,6 @@ var xSidebarSetDropPreload func(uintptr, bool) | |||||
| 565 | // | 539 | // | ||
| 566 | // See [property@Gtk.DropTarget:preload]. | 540 | // See [property@Gtk.DropTarget:preload]. | ||
| 567 | func (x *Sidebar) SetDropPreload(PreloadVar bool) { | 541 | func (x *Sidebar) SetDropPreload(PreloadVar bool) { | ||
| 568 | - | core.LazyRegister(&xSidebarSetDropPreload, "ADW", "adw_sidebar_set_drop_preload", false) | |||
| 569 | - | ||||
| 570 | xSidebarSetDropPreload(x.GoPointer(), PreloadVar) | 542 | xSidebarSetDropPreload(x.GoPointer(), PreloadVar) | ||
| 571 | } | 543 | } | ||
| 572 | 544 | ||||
| @@ -578,8 +550,6 @@ var xSidebarSetFilter func(uintptr, uintptr) | |||||
| 578 | // | 550 | // | ||
| 579 | // Use [property@Sidebar:placeholder] to provide an empty state. | 551 | // Use [property@Sidebar:placeholder] to provide an empty state. | ||
| 580 | func (x *Sidebar) SetFilter(FilterVar *gtk.Filter) { | 552 | func (x *Sidebar) SetFilter(FilterVar *gtk.Filter) { | ||
| 581 | - | core.LazyRegister(&xSidebarSetFilter, "ADW", "adw_sidebar_set_filter", false) | |||
| 582 | - | ||||
| 583 | xSidebarSetFilter(x.GoPointer(), FilterVar.GoPointer()) | 553 | xSidebarSetFilter(x.GoPointer(), FilterVar.GoPointer()) | ||
| 584 | } | 554 | } | ||
| 585 | 555 | ||||
| @@ -593,8 +563,6 @@ var xSidebarSetMenuModel func(uintptr, uintptr) | |||||
| 593 | // | 563 | // | ||
| 594 | // [property@Sidebar:menu-model] will be preferred over this model if set. | 564 | // [property@Sidebar:menu-model] will be preferred over this model if set. | ||
| 595 | func (x *Sidebar) SetMenuModel(MenuModelVar *gio.MenuModel) { | 565 | func (x *Sidebar) SetMenuModel(MenuModelVar *gio.MenuModel) { | ||
| 596 | - | core.LazyRegister(&xSidebarSetMenuModel, "ADW", "adw_sidebar_set_menu_model", false) | |||
| 597 | - | ||||
| 598 | xSidebarSetMenuModel(x.GoPointer(), MenuModelVar.GoPointer()) | 566 | xSidebarSetMenuModel(x.GoPointer(), MenuModelVar.GoPointer()) | ||
| 599 | } | 567 | } | ||
| 600 | 568 | ||||
| @@ -622,8 +590,6 @@ var xSidebarSetMode func(uintptr, SidebarMode) | |||||
| 622 | // When used with [class@OverlaySplitView], the sidebar should stay in sidebar | 590 | // When used with [class@OverlaySplitView], the sidebar should stay in sidebar | ||
| 623 | // mode, as the sidebar pane is still a sidebar when collapsed. | 591 | // mode, as the sidebar pane is still a sidebar when collapsed. | ||
| 624 | func (x *Sidebar) SetMode(ModeVar SidebarMode) { | 592 | func (x *Sidebar) SetMode(ModeVar SidebarMode) { | ||
| 625 | - | core.LazyRegister(&xSidebarSetMode, "ADW", "adw_sidebar_set_mode", false) | |||
| 626 | - | ||||
| 627 | xSidebarSetMode(x.GoPointer(), ModeVar) | 593 | xSidebarSetMode(x.GoPointer(), ModeVar) | ||
| 628 | } | 594 | } | ||
| 629 | 595 | ||||
| @@ -634,8 +600,6 @@ var xSidebarSetPlaceholder func(uintptr, uintptr) | |||||
| 634 | // This widget will be shown if @self has no items, or all of its items have | 600 | // This widget will be shown if @self has no items, or all of its items have | ||
| 635 | // been filtered out by [property@Sidebar:filter]. | 601 | // been filtered out by [property@Sidebar:filter]. | ||
| 636 | func (x *Sidebar) SetPlaceholder(PlaceholderVar *gtk.Widget) { | 602 | func (x *Sidebar) SetPlaceholder(PlaceholderVar *gtk.Widget) { | ||
| 637 | - | core.LazyRegister(&xSidebarSetPlaceholder, "ADW", "adw_sidebar_set_placeholder", false) | |||
| 638 | - | ||||
| 639 | xSidebarSetPlaceholder(x.GoPointer(), PlaceholderVar.GoPointer()) | 603 | xSidebarSetPlaceholder(x.GoPointer(), PlaceholderVar.GoPointer()) | ||
| 640 | } | 604 | } | ||
| 641 | 605 | ||||
| @@ -651,8 +615,6 @@ var xSidebarSetSelected func(uintptr, uint) | |||||
| 651 | // | 615 | // | ||
| 652 | // See also: [property@Sidebar:selected-item]. | 616 | // See also: [property@Sidebar:selected-item]. | ||
| 653 | func (x *Sidebar) SetSelected(SelectedVar uint) { | 617 | func (x *Sidebar) SetSelected(SelectedVar uint) { | ||
| 654 | - | core.LazyRegister(&xSidebarSetSelected, "ADW", "adw_sidebar_set_selected", false) | |||
| 655 | - | ||||
| 656 | xSidebarSetSelected(x.GoPointer(), SelectedVar) | 618 | xSidebarSetSelected(x.GoPointer(), SelectedVar) | ||
| 657 | } | 619 | } | ||
| 658 | 620 | ||||
| @@ -664,8 +626,6 @@ var xSidebarSetupDropTarget func(uintptr, gdk.DragAction, []types.GType, uint) | |||||
| 664 | // | 626 | // | ||
| 665 | // The [signal@Sidebar::drop] signal can be used to handle the drop. | 627 | // The [signal@Sidebar::drop] signal can be used to handle the drop. | ||
| 666 | func (x *Sidebar) SetupDropTarget(ActionsVar gdk.DragAction, TypesVar []types.GType, NTypesVar uint) { | 628 | func (x *Sidebar) SetupDropTarget(ActionsVar gdk.DragAction, TypesVar []types.GType, NTypesVar uint) { | ||
| 667 | - | core.LazyRegister(&xSidebarSetupDropTarget, "ADW", "adw_sidebar_setup_drop_target", false) | |||
| 668 | - | ||||
| 669 | xSidebarSetupDropTarget(x.GoPointer(), ActionsVar, TypesVar, NTypesVar) | 629 | xSidebarSetupDropTarget(x.GoPointer(), ActionsVar, TypesVar, NTypesVar) | ||
| 670 | } | 630 | } | ||
| 671 | 631 | ||||
| @@ -1141,4 +1101,42 @@ func (x *Sidebar) GetBuildableId() string { | |||||
| 1141 | func init() { | 1101 | func init() { | ||
| 1142 | core.SetPackageName("ADW", "libadwaita-1") | 1102 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 1143 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 1103 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | ||
| 1104 | + | var libs []uintptr | |||
| 1105 | + | for _, libPath := range core.GetPaths("ADW") { | |||
| 1106 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 1107 | + | if err != nil { | |||
| 1108 | + | panic(err) | |||
| 1109 | + | } | |||
| 1110 | + | libs = append(libs, lib) | |||
| 1111 | + | } | |||
| 1112 | + | ||||
| 1113 | + | core.PuregoSafeRegister(&xSidebarModeGLibType, libs, "adw_sidebar_mode_get_type") | |||
| 1114 | + | ||||
| 1115 | + | core.PuregoSafeRegister(&xSidebarGLibType, libs, "adw_sidebar_get_type") | |||
| 1116 | + | ||||
| 1117 | + | core.PuregoSafeRegister(&xNewSidebar, libs, "adw_sidebar_new") | |||
| 1118 | + | ||||
| 1119 | + | core.PuregoSafeRegister(&xSidebarAppend, libs, "adw_sidebar_append") | |||
| 1120 | + | core.PuregoSafeRegister(&xSidebarGetDropPreload, libs, "adw_sidebar_get_drop_preload") | |||
| 1121 | + | core.PuregoSafeRegister(&xSidebarGetFilter, libs, "adw_sidebar_get_filter") | |||
| 1122 | + | core.PuregoSafeRegister(&xSidebarGetItem, libs, "adw_sidebar_get_item") | |||
| 1123 | + | core.PuregoSafeRegister(&xSidebarGetItems, libs, "adw_sidebar_get_items") | |||
| 1124 | + | core.PuregoSafeRegister(&xSidebarGetMenuModel, libs, "adw_sidebar_get_menu_model") | |||
| 1125 | + | core.PuregoSafeRegister(&xSidebarGetMode, libs, "adw_sidebar_get_mode") | |||
| 1126 | + | core.PuregoSafeRegister(&xSidebarGetPlaceholder, libs, "adw_sidebar_get_placeholder") | |||
| 1127 | + | core.PuregoSafeRegister(&xSidebarGetSection, libs, "adw_sidebar_get_section") | |||
| 1128 | + | core.PuregoSafeRegister(&xSidebarGetSections, libs, "adw_sidebar_get_sections") | |||
| 1129 | + | core.PuregoSafeRegister(&xSidebarGetSelected, libs, "adw_sidebar_get_selected") | |||
| 1130 | + | core.PuregoSafeRegister(&xSidebarGetSelectedItem, libs, "adw_sidebar_get_selected_item") | |||
| 1131 | + | core.PuregoSafeRegister(&xSidebarInsert, libs, "adw_sidebar_insert") | |||
| 1132 | + | core.PuregoSafeRegister(&xSidebarPrepend, libs, "adw_sidebar_prepend") | |||
| 1133 | + | core.PuregoSafeRegister(&xSidebarRemove, libs, "adw_sidebar_remove") | |||
| 1134 | + | core.PuregoSafeRegister(&xSidebarRemoveAll, libs, "adw_sidebar_remove_all") | |||
| 1135 | + | core.PuregoSafeRegister(&xSidebarSetDropPreload, libs, "adw_sidebar_set_drop_preload") | |||
| 1136 | + | core.PuregoSafeRegister(&xSidebarSetFilter, libs, "adw_sidebar_set_filter") | |||
| 1137 | + | core.PuregoSafeRegister(&xSidebarSetMenuModel, libs, "adw_sidebar_set_menu_model") | |||
| 1138 | + | core.PuregoSafeRegister(&xSidebarSetMode, libs, "adw_sidebar_set_mode") | |||
| 1139 | + | core.PuregoSafeRegister(&xSidebarSetPlaceholder, libs, "adw_sidebar_set_placeholder") | |||
| 1140 | + | core.PuregoSafeRegister(&xSidebarSetSelected, libs, "adw_sidebar_set_selected") | |||
| 1141 | + | core.PuregoSafeRegister(&xSidebarSetupDropTarget, libs, "adw_sidebar_setup_drop_target") | |||
| 1144 | } | 1142 | } | ||