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