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
| @@ -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/gobject" | |
| @@ -71,7 +72,6 @@ type SidebarItem struct { | |||
| 71 | 72 | var xSidebarItemGLibType func() types.GType | |
| 72 | 73 | ||
| 73 | 74 | func SidebarItemGLibType() types.GType { | |
| 74 | - | core.LazyRegister(&xSidebarItemGLibType, "ADW", "adw_sidebar_item_get_type", false) | |
| 75 | 75 | return xSidebarItemGLibType() | |
| 76 | 76 | } | |
| 77 | 77 | ||
| @@ -85,7 +85,6 @@ var xNewSidebarItem func(string) uintptr | |||
| 85 | 85 | ||
| 86 | 86 | // Creates a new `AdwSidebarItem` with @title as its title. | |
| 87 | 87 | func NewSidebarItem(TitleVar string) *SidebarItem { | |
| 88 | - | core.LazyRegister(&xNewSidebarItem, "ADW", "adw_sidebar_item_new", false) | |
| 89 | 88 | var cls *SidebarItem | |
| 90 | 89 | ||
| 91 | 90 | cret := xNewSidebarItem(TitleVar) | |
| @@ -102,8 +101,6 @@ var xSidebarItemGetDragMotionActivate func(uintptr) bool | |||
| 102 | 101 | ||
| 103 | 102 | // Gets whether @self will be activated on pointer motion during Drag-and-Drop. | |
| 104 | 103 | func (x *SidebarItem) GetDragMotionActivate() bool { | |
| 105 | - | core.LazyRegister(&xSidebarItemGetDragMotionActivate, "ADW", "adw_sidebar_item_get_drag_motion_activate", false) | |
| 106 | - | ||
| 107 | 104 | cret := xSidebarItemGetDragMotionActivate(x.GoPointer()) | |
| 108 | 105 | return cret | |
| 109 | 106 | } | |
| @@ -112,8 +109,6 @@ var xSidebarItemGetEnabled func(uintptr) bool | |||
| 112 | 109 | ||
| 113 | 110 | // Gets whether @self is enabled. | |
| 114 | 111 | func (x *SidebarItem) GetEnabled() bool { | |
| 115 | - | core.LazyRegister(&xSidebarItemGetEnabled, "ADW", "adw_sidebar_item_get_enabled", false) | |
| 116 | - | ||
| 117 | 112 | cret := xSidebarItemGetEnabled(x.GoPointer()) | |
| 118 | 113 | return cret | |
| 119 | 114 | } | |
| @@ -122,8 +117,6 @@ var xSidebarItemGetIconName func(uintptr) string | |||
| 122 | 117 | ||
| 123 | 118 | // Gets the icon name for @item. | |
| 124 | 119 | func (x *SidebarItem) GetIconName() string { | |
| 125 | - | core.LazyRegister(&xSidebarItemGetIconName, "ADW", "adw_sidebar_item_get_icon_name", false) | |
| 126 | - | ||
| 127 | 120 | cret := xSidebarItemGetIconName(x.GoPointer()) | |
| 128 | 121 | return cret | |
| 129 | 122 | } | |
| @@ -132,7 +125,6 @@ var xSidebarItemGetIconPaintable func(uintptr) uintptr | |||
| 132 | 125 | ||
| 133 | 126 | // Gets the paintable used as the icon for @item. | |
| 134 | 127 | func (x *SidebarItem) GetIconPaintable() *gdk.PaintableBase { | |
| 135 | - | core.LazyRegister(&xSidebarItemGetIconPaintable, "ADW", "adw_sidebar_item_get_icon_paintable", false) | |
| 136 | 128 | var cls *gdk.PaintableBase | |
| 137 | 129 | ||
| 138 | 130 | cret := xSidebarItemGetIconPaintable(x.GoPointer()) | |
| @@ -158,8 +150,6 @@ var xSidebarItemGetIndex func(uintptr) uint | |||
| 158 | 150 | // The item can later be retrieved by passing this index into | |
| 159 | 151 | // [method@Sidebar.get_item]. | |
| 160 | 152 | func (x *SidebarItem) GetIndex() uint { | |
| 161 | - | core.LazyRegister(&xSidebarItemGetIndex, "ADW", "adw_sidebar_item_get_index", false) | |
| 162 | - | ||
| 163 | 153 | cret := xSidebarItemGetIndex(x.GoPointer()) | |
| 164 | 154 | return cret | |
| 165 | 155 | } | |
| @@ -168,7 +158,6 @@ var xSidebarItemGetSection func(uintptr) uintptr | |||
| 168 | 158 | ||
| 169 | 159 | // Gets the section @self is in. | |
| 170 | 160 | func (x *SidebarItem) GetSection() *SidebarSection { | |
| 171 | - | core.LazyRegister(&xSidebarItemGetSection, "ADW", "adw_sidebar_item_get_section", false) | |
| 172 | 161 | var cls *SidebarSection | |
| 173 | 162 | ||
| 174 | 163 | cret := xSidebarItemGetSection(x.GoPointer()) | |
| @@ -191,8 +180,6 @@ var xSidebarItemGetSectionIndex func(uintptr) uint | |||
| 191 | 180 | // The item can later be retrieved by passing this index into | |
| 192 | 181 | // [method@SidebarSection.get_item]. | |
| 193 | 182 | func (x *SidebarItem) GetSectionIndex() uint { | |
| 194 | - | core.LazyRegister(&xSidebarItemGetSectionIndex, "ADW", "adw_sidebar_item_get_section_index", false) | |
| 195 | - | ||
| 196 | 183 | cret := xSidebarItemGetSectionIndex(x.GoPointer()) | |
| 197 | 184 | return cret | |
| 198 | 185 | } | |
| @@ -201,8 +188,6 @@ var xSidebarItemGetSubtitle func(uintptr) string | |||
| 201 | 188 | ||
| 202 | 189 | // Gets the subtitle of @self. | |
| 203 | 190 | func (x *SidebarItem) GetSubtitle() string { | |
| 204 | - | core.LazyRegister(&xSidebarItemGetSubtitle, "ADW", "adw_sidebar_item_get_subtitle", false) | |
| 205 | - | ||
| 206 | 191 | cret := xSidebarItemGetSubtitle(x.GoPointer()) | |
| 207 | 192 | return cret | |
| 208 | 193 | } | |
| @@ -211,7 +196,6 @@ var xSidebarItemGetSuffix func(uintptr) uintptr | |||
| 211 | 196 | ||
| 212 | 197 | // Gets the suffix widget for @self. | |
| 213 | 198 | func (x *SidebarItem) GetSuffix() *gtk.Widget { | |
| 214 | - | core.LazyRegister(&xSidebarItemGetSuffix, "ADW", "adw_sidebar_item_get_suffix", false) | |
| 215 | 199 | var cls *gtk.Widget | |
| 216 | 200 | ||
| 217 | 201 | cret := xSidebarItemGetSuffix(x.GoPointer()) | |
| @@ -229,8 +213,6 @@ var xSidebarItemGetTitle func(uintptr) string | |||
| 229 | 213 | ||
| 230 | 214 | // Gets the title of @self. | |
| 231 | 215 | func (x *SidebarItem) GetTitle() string { | |
| 232 | - | core.LazyRegister(&xSidebarItemGetTitle, "ADW", "adw_sidebar_item_get_title", false) | |
| 233 | - | ||
| 234 | 216 | cret := xSidebarItemGetTitle(x.GoPointer()) | |
| 235 | 217 | return cret | |
| 236 | 218 | } | |
| @@ -239,8 +221,6 @@ var xSidebarItemGetTooltip func(uintptr) string | |||
| 239 | 221 | ||
| 240 | 222 | // Gets the tooltip of @self. | |
| 241 | 223 | func (x *SidebarItem) GetTooltip() string { | |
| 242 | - | core.LazyRegister(&xSidebarItemGetTooltip, "ADW", "adw_sidebar_item_get_tooltip", false) | |
| 243 | - | ||
| 244 | 224 | cret := xSidebarItemGetTooltip(x.GoPointer()) | |
| 245 | 225 | return cret | |
| 246 | 226 | } | |
| @@ -249,8 +229,6 @@ var xSidebarItemGetUseUnderline func(uintptr) bool | |||
| 249 | 229 | ||
| 250 | 230 | // Gets whether an underline in the title indicates a mnemonic. | |
| 251 | 231 | func (x *SidebarItem) GetUseUnderline() bool { | |
| 252 | - | core.LazyRegister(&xSidebarItemGetUseUnderline, "ADW", "adw_sidebar_item_get_use_underline", false) | |
| 253 | - | ||
| 254 | 232 | cret := xSidebarItemGetUseUnderline(x.GoPointer()) | |
| 255 | 233 | return cret | |
| 256 | 234 | } | |
| @@ -259,8 +237,6 @@ var xSidebarItemGetVisible func(uintptr) bool | |||
| 259 | 237 | ||
| 260 | 238 | // Gets whether @self is visible. | |
| 261 | 239 | func (x *SidebarItem) GetVisible() bool { | |
| 262 | - | core.LazyRegister(&xSidebarItemGetVisible, "ADW", "adw_sidebar_item_get_visible", false) | |
| 263 | - | ||
| 264 | 240 | cret := xSidebarItemGetVisible(x.GoPointer()) | |
| 265 | 241 | return cret | |
| 266 | 242 | } | |
| @@ -273,8 +249,6 @@ var xSidebarItemSetDragMotionActivate func(uintptr, bool) | |||
| 273 | 249 | // represents, when the sidebar is used as a page switcher. However, it may be | |
| 274 | 250 | // unwanted when dropping content onto the item itself, so it can be disabled. | |
| 275 | 251 | func (x *SidebarItem) SetDragMotionActivate(DragMotionActivateVar bool) { | |
| 276 | - | core.LazyRegister(&xSidebarItemSetDragMotionActivate, "ADW", "adw_sidebar_item_set_drag_motion_activate", false) | |
| 277 | - | ||
| 278 | 252 | xSidebarItemSetDragMotionActivate(x.GoPointer(), DragMotionActivateVar) | |
| 279 | 253 | } | |
| 280 | 254 | ||
| @@ -284,8 +258,6 @@ var xSidebarItemSetEnabled func(uintptr, bool) | |||
| 284 | 258 | // | |
| 285 | 259 | // See [property@Gtk.Widget:sensitive]. | |
| 286 | 260 | func (x *SidebarItem) SetEnabled(EnabledVar bool) { | |
| 287 | - | core.LazyRegister(&xSidebarItemSetEnabled, "ADW", "adw_sidebar_item_set_enabled", false) | |
| 288 | - | ||
| 289 | 261 | xSidebarItemSetEnabled(x.GoPointer(), EnabledVar) | |
| 290 | 262 | } | |
| 291 | 263 | ||
| @@ -295,8 +267,6 @@ var xSidebarItemSetIconName func(uintptr, uintptr) | |||
| 295 | 267 | // | |
| 296 | 268 | // Mutually exclusive with [property@SidebarItem:icon-paintable]. | |
| 297 | 269 | func (x *SidebarItem) SetIconName(IconNameVar *string) { | |
| 298 | - | core.LazyRegister(&xSidebarItemSetIconName, "ADW", "adw_sidebar_item_set_icon_name", false) | |
| 299 | - | ||
| 300 | 270 | IconNameVarPtr := core.GStrdupNullable(IconNameVar) | |
| 301 | 271 | defer core.GFreeNullable(IconNameVarPtr) | |
| 302 | 272 | ||
| @@ -309,8 +279,6 @@ var xSidebarItemSetIconPaintable func(uintptr, uintptr) | |||
| 309 | 279 | // | |
| 310 | 280 | // Mutually exclusive with [property@SidebarItem:icon-name]. | |
| 311 | 281 | func (x *SidebarItem) SetIconPaintable(PaintableVar gdk.Paintable) { | |
| 312 | - | core.LazyRegister(&xSidebarItemSetIconPaintable, "ADW", "adw_sidebar_item_set_icon_paintable", false) | |
| 313 | - | ||
| 314 | 282 | xSidebarItemSetIconPaintable(x.GoPointer(), PaintableVar.GoPointer()) | |
| 315 | 283 | } | |
| 316 | 284 | ||
| @@ -318,8 +286,6 @@ var xSidebarItemSetSubtitle func(uintptr, uintptr) | |||
| 318 | 286 | ||
| 319 | 287 | // Sets the subtitle of @self. | |
| 320 | 288 | func (x *SidebarItem) SetSubtitle(SubtitleVar *string) { | |
| 321 | - | core.LazyRegister(&xSidebarItemSetSubtitle, "ADW", "adw_sidebar_item_set_subtitle", false) | |
| 322 | - | ||
| 323 | 289 | SubtitleVarPtr := core.GStrdupNullable(SubtitleVar) | |
| 324 | 290 | defer core.GFreeNullable(SubtitleVarPtr) | |
| 325 | 291 | ||
| @@ -333,8 +299,6 @@ var xSidebarItemSetSuffix func(uintptr, uintptr) | |||
| 333 | 299 | // Suffix will be shown at the end of the item's row, or before the arrow in | |
| 334 | 300 | // the [enum@Adw.SidebarMode.page] mode. | |
| 335 | 301 | func (x *SidebarItem) SetSuffix(SuffixVar *gtk.Widget) { | |
| 336 | - | core.LazyRegister(&xSidebarItemSetSuffix, "ADW", "adw_sidebar_item_set_suffix", false) | |
| 337 | - | ||
| 338 | 302 | xSidebarItemSetSuffix(x.GoPointer(), SuffixVar.GoPointer()) | |
| 339 | 303 | } | |
| 340 | 304 | ||
| @@ -342,8 +306,6 @@ var xSidebarItemSetTitle func(uintptr, uintptr) | |||
| 342 | 306 | ||
| 343 | 307 | // Sets the title of @self. | |
| 344 | 308 | func (x *SidebarItem) SetTitle(TitleVar *string) { | |
| 345 | - | core.LazyRegister(&xSidebarItemSetTitle, "ADW", "adw_sidebar_item_set_title", false) | |
| 346 | - | ||
| 347 | 309 | TitleVarPtr := core.GStrdupNullable(TitleVar) | |
| 348 | 310 | defer core.GFreeNullable(TitleVarPtr) | |
| 349 | 311 | ||
| @@ -356,8 +318,6 @@ var xSidebarItemSetTooltip func(uintptr, uintptr) | |||
| 356 | 318 | // | |
| 357 | 319 | // The tooltip can be marked up with the Pango text markup language. | |
| 358 | 320 | func (x *SidebarItem) SetTooltip(TooltipVar *string) { | |
| 359 | - | core.LazyRegister(&xSidebarItemSetTooltip, "ADW", "adw_sidebar_item_set_tooltip", false) | |
| 360 | - | ||
| 361 | 321 | TooltipVarPtr := core.GStrdupNullable(TooltipVar) | |
| 362 | 322 | defer core.GFreeNullable(TooltipVarPtr) | |
| 363 | 323 | ||
| @@ -370,8 +330,6 @@ var xSidebarItemSetUseUnderline func(uintptr, bool) | |||
| 370 | 330 | // | |
| 371 | 331 | // The mnemonic can be used to activate the item. | |
| 372 | 332 | func (x *SidebarItem) SetUseUnderline(UseUnderlineVar bool) { | |
| 373 | - | core.LazyRegister(&xSidebarItemSetUseUnderline, "ADW", "adw_sidebar_item_set_use_underline", false) | |
| 374 | - | ||
| 375 | 333 | xSidebarItemSetUseUnderline(x.GoPointer(), UseUnderlineVar) | |
| 376 | 334 | } | |
| 377 | 335 | ||
| @@ -379,8 +337,6 @@ var xSidebarItemSetVisible func(uintptr, bool) | |||
| 379 | 337 | ||
| 380 | 338 | // Sets whether @self is visible. | |
| 381 | 339 | func (x *SidebarItem) SetVisible(VisibleVar bool) { | |
| 382 | - | core.LazyRegister(&xSidebarItemSetVisible, "ADW", "adw_sidebar_item_set_visible", false) | |
| 383 | - | ||
| 384 | 340 | xSidebarItemSetVisible(x.GoPointer(), VisibleVar) | |
| 385 | 341 | } | |
| 386 | 342 | ||
| @@ -558,4 +514,40 @@ func (x *SidebarItem) GetPropertyVisible() bool { | |||
| 558 | 514 | func init() { | |
| 559 | 515 | core.SetPackageName("ADW", "libadwaita-1") | |
| 560 | 516 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | |
| 517 | + | var libs []uintptr | |
| 518 | + | for _, libPath := range core.GetPaths("ADW") { | |
| 519 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 520 | + | if err != nil { | |
| 521 | + | panic(err) | |
| 522 | + | } | |
| 523 | + | libs = append(libs, lib) | |
| 524 | + | } | |
| 525 | + | ||
| 526 | + | core.PuregoSafeRegister(&xSidebarItemGLibType, libs, "adw_sidebar_item_get_type") | |
| 527 | + | ||
| 528 | + | core.PuregoSafeRegister(&xNewSidebarItem, libs, "adw_sidebar_item_new") | |
| 529 | + | ||
| 530 | + | core.PuregoSafeRegister(&xSidebarItemGetDragMotionActivate, libs, "adw_sidebar_item_get_drag_motion_activate") | |
| 531 | + | core.PuregoSafeRegister(&xSidebarItemGetEnabled, libs, "adw_sidebar_item_get_enabled") | |
| 532 | + | core.PuregoSafeRegister(&xSidebarItemGetIconName, libs, "adw_sidebar_item_get_icon_name") | |
| 533 | + | core.PuregoSafeRegister(&xSidebarItemGetIconPaintable, libs, "adw_sidebar_item_get_icon_paintable") | |
| 534 | + | core.PuregoSafeRegister(&xSidebarItemGetIndex, libs, "adw_sidebar_item_get_index") | |
| 535 | + | core.PuregoSafeRegister(&xSidebarItemGetSection, libs, "adw_sidebar_item_get_section") | |
| 536 | + | core.PuregoSafeRegister(&xSidebarItemGetSectionIndex, libs, "adw_sidebar_item_get_section_index") | |
| 537 | + | core.PuregoSafeRegister(&xSidebarItemGetSubtitle, libs, "adw_sidebar_item_get_subtitle") | |
| 538 | + | core.PuregoSafeRegister(&xSidebarItemGetSuffix, libs, "adw_sidebar_item_get_suffix") | |
| 539 | + | core.PuregoSafeRegister(&xSidebarItemGetTitle, libs, "adw_sidebar_item_get_title") | |
| 540 | + | core.PuregoSafeRegister(&xSidebarItemGetTooltip, libs, "adw_sidebar_item_get_tooltip") | |
| 541 | + | core.PuregoSafeRegister(&xSidebarItemGetUseUnderline, libs, "adw_sidebar_item_get_use_underline") | |
| 542 | + | core.PuregoSafeRegister(&xSidebarItemGetVisible, libs, "adw_sidebar_item_get_visible") | |
| 543 | + | core.PuregoSafeRegister(&xSidebarItemSetDragMotionActivate, libs, "adw_sidebar_item_set_drag_motion_activate") | |
| 544 | + | core.PuregoSafeRegister(&xSidebarItemSetEnabled, libs, "adw_sidebar_item_set_enabled") | |
| 545 | + | core.PuregoSafeRegister(&xSidebarItemSetIconName, libs, "adw_sidebar_item_set_icon_name") | |
| 546 | + | core.PuregoSafeRegister(&xSidebarItemSetIconPaintable, libs, "adw_sidebar_item_set_icon_paintable") | |
| 547 | + | core.PuregoSafeRegister(&xSidebarItemSetSubtitle, libs, "adw_sidebar_item_set_subtitle") | |
| 548 | + | core.PuregoSafeRegister(&xSidebarItemSetSuffix, libs, "adw_sidebar_item_set_suffix") | |
| 549 | + | core.PuregoSafeRegister(&xSidebarItemSetTitle, libs, "adw_sidebar_item_set_title") | |
| 550 | + | core.PuregoSafeRegister(&xSidebarItemSetTooltip, libs, "adw_sidebar_item_set_tooltip") | |
| 551 | + | core.PuregoSafeRegister(&xSidebarItemSetUseUnderline, libs, "adw_sidebar_item_set_use_underline") | |
| 552 | + | core.PuregoSafeRegister(&xSidebarItemSetVisible, libs, "adw_sidebar_item_set_visible") | |
| 561 | 553 | } | |
| @@ -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/gobject" | 11 | "github.com/bnema/puregotk/v4/gobject" | ||
| @@ -71,7 +72,6 @@ type SidebarItem struct { | |||||
| 71 | var xSidebarItemGLibType func() types.GType | 72 | var xSidebarItemGLibType func() types.GType | ||
| 72 | 73 | ||||
| 73 | func SidebarItemGLibType() types.GType { | 74 | func SidebarItemGLibType() types.GType { | ||
| 74 | - | core.LazyRegister(&xSidebarItemGLibType, "ADW", "adw_sidebar_item_get_type", false) | |||
| 75 | return xSidebarItemGLibType() | 75 | return xSidebarItemGLibType() | ||
| 76 | } | 76 | } | ||
| 77 | 77 | ||||
| @@ -85,7 +85,6 @@ var xNewSidebarItem func(string) uintptr | |||||
| 85 | 85 | ||||
| 86 | // Creates a new `AdwSidebarItem` with @title as its title. | 86 | // Creates a new `AdwSidebarItem` with @title as its title. | ||
| 87 | func NewSidebarItem(TitleVar string) *SidebarItem { | 87 | func NewSidebarItem(TitleVar string) *SidebarItem { | ||
| 88 | - | core.LazyRegister(&xNewSidebarItem, "ADW", "adw_sidebar_item_new", false) | |||
| 89 | var cls *SidebarItem | 88 | var cls *SidebarItem | ||
| 90 | 89 | ||||
| 91 | cret := xNewSidebarItem(TitleVar) | 90 | cret := xNewSidebarItem(TitleVar) | ||
| @@ -102,8 +101,6 @@ var xSidebarItemGetDragMotionActivate func(uintptr) bool | |||||
| 102 | 101 | ||||
| 103 | // Gets whether @self will be activated on pointer motion during Drag-and-Drop. | 102 | // Gets whether @self will be activated on pointer motion during Drag-and-Drop. | ||
| 104 | func (x *SidebarItem) GetDragMotionActivate() bool { | 103 | func (x *SidebarItem) GetDragMotionActivate() bool { | ||
| 105 | - | core.LazyRegister(&xSidebarItemGetDragMotionActivate, "ADW", "adw_sidebar_item_get_drag_motion_activate", false) | |||
| 106 | - | ||||
| 107 | cret := xSidebarItemGetDragMotionActivate(x.GoPointer()) | 104 | cret := xSidebarItemGetDragMotionActivate(x.GoPointer()) | ||
| 108 | return cret | 105 | return cret | ||
| 109 | } | 106 | } | ||
| @@ -112,8 +109,6 @@ var xSidebarItemGetEnabled func(uintptr) bool | |||||
| 112 | 109 | ||||
| 113 | // Gets whether @self is enabled. | 110 | // Gets whether @self is enabled. | ||
| 114 | func (x *SidebarItem) GetEnabled() bool { | 111 | func (x *SidebarItem) GetEnabled() bool { | ||
| 115 | - | core.LazyRegister(&xSidebarItemGetEnabled, "ADW", "adw_sidebar_item_get_enabled", false) | |||
| 116 | - | ||||
| 117 | cret := xSidebarItemGetEnabled(x.GoPointer()) | 112 | cret := xSidebarItemGetEnabled(x.GoPointer()) | ||
| 118 | return cret | 113 | return cret | ||
| 119 | } | 114 | } | ||
| @@ -122,8 +117,6 @@ var xSidebarItemGetIconName func(uintptr) string | |||||
| 122 | 117 | ||||
| 123 | // Gets the icon name for @item. | 118 | // Gets the icon name for @item. | ||
| 124 | func (x *SidebarItem) GetIconName() string { | 119 | func (x *SidebarItem) GetIconName() string { | ||
| 125 | - | core.LazyRegister(&xSidebarItemGetIconName, "ADW", "adw_sidebar_item_get_icon_name", false) | |||
| 126 | - | ||||
| 127 | cret := xSidebarItemGetIconName(x.GoPointer()) | 120 | cret := xSidebarItemGetIconName(x.GoPointer()) | ||
| 128 | return cret | 121 | return cret | ||
| 129 | } | 122 | } | ||
| @@ -132,7 +125,6 @@ var xSidebarItemGetIconPaintable func(uintptr) uintptr | |||||
| 132 | 125 | ||||
| 133 | // Gets the paintable used as the icon for @item. | 126 | // Gets the paintable used as the icon for @item. | ||
| 134 | func (x *SidebarItem) GetIconPaintable() *gdk.PaintableBase { | 127 | func (x *SidebarItem) GetIconPaintable() *gdk.PaintableBase { | ||
| 135 | - | core.LazyRegister(&xSidebarItemGetIconPaintable, "ADW", "adw_sidebar_item_get_icon_paintable", false) | |||
| 136 | var cls *gdk.PaintableBase | 128 | var cls *gdk.PaintableBase | ||
| 137 | 129 | ||||
| 138 | cret := xSidebarItemGetIconPaintable(x.GoPointer()) | 130 | cret := xSidebarItemGetIconPaintable(x.GoPointer()) | ||
| @@ -158,8 +150,6 @@ var xSidebarItemGetIndex func(uintptr) uint | |||||
| 158 | // The item can later be retrieved by passing this index into | 150 | // The item can later be retrieved by passing this index into | ||
| 159 | // [method@Sidebar.get_item]. | 151 | // [method@Sidebar.get_item]. | ||
| 160 | func (x *SidebarItem) GetIndex() uint { | 152 | func (x *SidebarItem) GetIndex() uint { | ||
| 161 | - | core.LazyRegister(&xSidebarItemGetIndex, "ADW", "adw_sidebar_item_get_index", false) | |||
| 162 | - | ||||
| 163 | cret := xSidebarItemGetIndex(x.GoPointer()) | 153 | cret := xSidebarItemGetIndex(x.GoPointer()) | ||
| 164 | return cret | 154 | return cret | ||
| 165 | } | 155 | } | ||
| @@ -168,7 +158,6 @@ var xSidebarItemGetSection func(uintptr) uintptr | |||||
| 168 | 158 | ||||
| 169 | // Gets the section @self is in. | 159 | // Gets the section @self is in. | ||
| 170 | func (x *SidebarItem) GetSection() *SidebarSection { | 160 | func (x *SidebarItem) GetSection() *SidebarSection { | ||
| 171 | - | core.LazyRegister(&xSidebarItemGetSection, "ADW", "adw_sidebar_item_get_section", false) | |||
| 172 | var cls *SidebarSection | 161 | var cls *SidebarSection | ||
| 173 | 162 | ||||
| 174 | cret := xSidebarItemGetSection(x.GoPointer()) | 163 | cret := xSidebarItemGetSection(x.GoPointer()) | ||
| @@ -191,8 +180,6 @@ var xSidebarItemGetSectionIndex func(uintptr) uint | |||||
| 191 | // The item can later be retrieved by passing this index into | 180 | // The item can later be retrieved by passing this index into | ||
| 192 | // [method@SidebarSection.get_item]. | 181 | // [method@SidebarSection.get_item]. | ||
| 193 | func (x *SidebarItem) GetSectionIndex() uint { | 182 | func (x *SidebarItem) GetSectionIndex() uint { | ||
| 194 | - | core.LazyRegister(&xSidebarItemGetSectionIndex, "ADW", "adw_sidebar_item_get_section_index", false) | |||
| 195 | - | ||||
| 196 | cret := xSidebarItemGetSectionIndex(x.GoPointer()) | 183 | cret := xSidebarItemGetSectionIndex(x.GoPointer()) | ||
| 197 | return cret | 184 | return cret | ||
| 198 | } | 185 | } | ||
| @@ -201,8 +188,6 @@ var xSidebarItemGetSubtitle func(uintptr) string | |||||
| 201 | 188 | ||||
| 202 | // Gets the subtitle of @self. | 189 | // Gets the subtitle of @self. | ||
| 203 | func (x *SidebarItem) GetSubtitle() string { | 190 | func (x *SidebarItem) GetSubtitle() string { | ||
| 204 | - | core.LazyRegister(&xSidebarItemGetSubtitle, "ADW", "adw_sidebar_item_get_subtitle", false) | |||
| 205 | - | ||||
| 206 | cret := xSidebarItemGetSubtitle(x.GoPointer()) | 191 | cret := xSidebarItemGetSubtitle(x.GoPointer()) | ||
| 207 | return cret | 192 | return cret | ||
| 208 | } | 193 | } | ||
| @@ -211,7 +196,6 @@ var xSidebarItemGetSuffix func(uintptr) uintptr | |||||
| 211 | 196 | ||||
| 212 | // Gets the suffix widget for @self. | 197 | // Gets the suffix widget for @self. | ||
| 213 | func (x *SidebarItem) GetSuffix() *gtk.Widget { | 198 | func (x *SidebarItem) GetSuffix() *gtk.Widget { | ||
| 214 | - | core.LazyRegister(&xSidebarItemGetSuffix, "ADW", "adw_sidebar_item_get_suffix", false) | |||
| 215 | var cls *gtk.Widget | 199 | var cls *gtk.Widget | ||
| 216 | 200 | ||||
| 217 | cret := xSidebarItemGetSuffix(x.GoPointer()) | 201 | cret := xSidebarItemGetSuffix(x.GoPointer()) | ||
| @@ -229,8 +213,6 @@ var xSidebarItemGetTitle func(uintptr) string | |||||
| 229 | 213 | ||||
| 230 | // Gets the title of @self. | 214 | // Gets the title of @self. | ||
| 231 | func (x *SidebarItem) GetTitle() string { | 215 | func (x *SidebarItem) GetTitle() string { | ||
| 232 | - | core.LazyRegister(&xSidebarItemGetTitle, "ADW", "adw_sidebar_item_get_title", false) | |||
| 233 | - | ||||
| 234 | cret := xSidebarItemGetTitle(x.GoPointer()) | 216 | cret := xSidebarItemGetTitle(x.GoPointer()) | ||
| 235 | return cret | 217 | return cret | ||
| 236 | } | 218 | } | ||
| @@ -239,8 +221,6 @@ var xSidebarItemGetTooltip func(uintptr) string | |||||
| 239 | 221 | ||||
| 240 | // Gets the tooltip of @self. | 222 | // Gets the tooltip of @self. | ||
| 241 | func (x *SidebarItem) GetTooltip() string { | 223 | func (x *SidebarItem) GetTooltip() string { | ||
| 242 | - | core.LazyRegister(&xSidebarItemGetTooltip, "ADW", "adw_sidebar_item_get_tooltip", false) | |||
| 243 | - | ||||
| 244 | cret := xSidebarItemGetTooltip(x.GoPointer()) | 224 | cret := xSidebarItemGetTooltip(x.GoPointer()) | ||
| 245 | return cret | 225 | return cret | ||
| 246 | } | 226 | } | ||
| @@ -249,8 +229,6 @@ var xSidebarItemGetUseUnderline func(uintptr) bool | |||||
| 249 | 229 | ||||
| 250 | // Gets whether an underline in the title indicates a mnemonic. | 230 | // Gets whether an underline in the title indicates a mnemonic. | ||
| 251 | func (x *SidebarItem) GetUseUnderline() bool { | 231 | func (x *SidebarItem) GetUseUnderline() bool { | ||
| 252 | - | core.LazyRegister(&xSidebarItemGetUseUnderline, "ADW", "adw_sidebar_item_get_use_underline", false) | |||
| 253 | - | ||||
| 254 | cret := xSidebarItemGetUseUnderline(x.GoPointer()) | 232 | cret := xSidebarItemGetUseUnderline(x.GoPointer()) | ||
| 255 | return cret | 233 | return cret | ||
| 256 | } | 234 | } | ||
| @@ -259,8 +237,6 @@ var xSidebarItemGetVisible func(uintptr) bool | |||||
| 259 | 237 | ||||
| 260 | // Gets whether @self is visible. | 238 | // Gets whether @self is visible. | ||
| 261 | func (x *SidebarItem) GetVisible() bool { | 239 | func (x *SidebarItem) GetVisible() bool { | ||
| 262 | - | core.LazyRegister(&xSidebarItemGetVisible, "ADW", "adw_sidebar_item_get_visible", false) | |||
| 263 | - | ||||
| 264 | cret := xSidebarItemGetVisible(x.GoPointer()) | 240 | cret := xSidebarItemGetVisible(x.GoPointer()) | ||
| 265 | return cret | 241 | return cret | ||
| 266 | } | 242 | } | ||
| @@ -273,8 +249,6 @@ var xSidebarItemSetDragMotionActivate func(uintptr, bool) | |||||
| 273 | // represents, when the sidebar is used as a page switcher. However, it may be | 249 | // represents, when the sidebar is used as a page switcher. However, it may be | ||
| 274 | // unwanted when dropping content onto the item itself, so it can be disabled. | 250 | // unwanted when dropping content onto the item itself, so it can be disabled. | ||
| 275 | func (x *SidebarItem) SetDragMotionActivate(DragMotionActivateVar bool) { | 251 | func (x *SidebarItem) SetDragMotionActivate(DragMotionActivateVar bool) { | ||
| 276 | - | core.LazyRegister(&xSidebarItemSetDragMotionActivate, "ADW", "adw_sidebar_item_set_drag_motion_activate", false) | |||
| 277 | - | ||||
| 278 | xSidebarItemSetDragMotionActivate(x.GoPointer(), DragMotionActivateVar) | 252 | xSidebarItemSetDragMotionActivate(x.GoPointer(), DragMotionActivateVar) | ||
| 279 | } | 253 | } | ||
| 280 | 254 | ||||
| @@ -284,8 +258,6 @@ var xSidebarItemSetEnabled func(uintptr, bool) | |||||
| 284 | // | 258 | // | ||
| 285 | // See [property@Gtk.Widget:sensitive]. | 259 | // See [property@Gtk.Widget:sensitive]. | ||
| 286 | func (x *SidebarItem) SetEnabled(EnabledVar bool) { | 260 | func (x *SidebarItem) SetEnabled(EnabledVar bool) { | ||
| 287 | - | core.LazyRegister(&xSidebarItemSetEnabled, "ADW", "adw_sidebar_item_set_enabled", false) | |||
| 288 | - | ||||
| 289 | xSidebarItemSetEnabled(x.GoPointer(), EnabledVar) | 261 | xSidebarItemSetEnabled(x.GoPointer(), EnabledVar) | ||
| 290 | } | 262 | } | ||
| 291 | 263 | ||||
| @@ -295,8 +267,6 @@ var xSidebarItemSetIconName func(uintptr, uintptr) | |||||
| 295 | // | 267 | // | ||
| 296 | // Mutually exclusive with [property@SidebarItem:icon-paintable]. | 268 | // Mutually exclusive with [property@SidebarItem:icon-paintable]. | ||
| 297 | func (x *SidebarItem) SetIconName(IconNameVar *string) { | 269 | func (x *SidebarItem) SetIconName(IconNameVar *string) { | ||
| 298 | - | core.LazyRegister(&xSidebarItemSetIconName, "ADW", "adw_sidebar_item_set_icon_name", false) | |||
| 299 | - | ||||
| 300 | IconNameVarPtr := core.GStrdupNullable(IconNameVar) | 270 | IconNameVarPtr := core.GStrdupNullable(IconNameVar) | ||
| 301 | defer core.GFreeNullable(IconNameVarPtr) | 271 | defer core.GFreeNullable(IconNameVarPtr) | ||
| 302 | 272 | ||||
| @@ -309,8 +279,6 @@ var xSidebarItemSetIconPaintable func(uintptr, uintptr) | |||||
| 309 | // | 279 | // | ||
| 310 | // Mutually exclusive with [property@SidebarItem:icon-name]. | 280 | // Mutually exclusive with [property@SidebarItem:icon-name]. | ||
| 311 | func (x *SidebarItem) SetIconPaintable(PaintableVar gdk.Paintable) { | 281 | func (x *SidebarItem) SetIconPaintable(PaintableVar gdk.Paintable) { | ||
| 312 | - | core.LazyRegister(&xSidebarItemSetIconPaintable, "ADW", "adw_sidebar_item_set_icon_paintable", false) | |||
| 313 | - | ||||
| 314 | xSidebarItemSetIconPaintable(x.GoPointer(), PaintableVar.GoPointer()) | 282 | xSidebarItemSetIconPaintable(x.GoPointer(), PaintableVar.GoPointer()) | ||
| 315 | } | 283 | } | ||
| 316 | 284 | ||||
| @@ -318,8 +286,6 @@ var xSidebarItemSetSubtitle func(uintptr, uintptr) | |||||
| 318 | 286 | ||||
| 319 | // Sets the subtitle of @self. | 287 | // Sets the subtitle of @self. | ||
| 320 | func (x *SidebarItem) SetSubtitle(SubtitleVar *string) { | 288 | func (x *SidebarItem) SetSubtitle(SubtitleVar *string) { | ||
| 321 | - | core.LazyRegister(&xSidebarItemSetSubtitle, "ADW", "adw_sidebar_item_set_subtitle", false) | |||
| 322 | - | ||||
| 323 | SubtitleVarPtr := core.GStrdupNullable(SubtitleVar) | 289 | SubtitleVarPtr := core.GStrdupNullable(SubtitleVar) | ||
| 324 | defer core.GFreeNullable(SubtitleVarPtr) | 290 | defer core.GFreeNullable(SubtitleVarPtr) | ||
| 325 | 291 | ||||
| @@ -333,8 +299,6 @@ var xSidebarItemSetSuffix func(uintptr, uintptr) | |||||
| 333 | // Suffix will be shown at the end of the item's row, or before the arrow in | 299 | // Suffix will be shown at the end of the item's row, or before the arrow in | ||
| 334 | // the [enum@Adw.SidebarMode.page] mode. | 300 | // the [enum@Adw.SidebarMode.page] mode. | ||
| 335 | func (x *SidebarItem) SetSuffix(SuffixVar *gtk.Widget) { | 301 | func (x *SidebarItem) SetSuffix(SuffixVar *gtk.Widget) { | ||
| 336 | - | core.LazyRegister(&xSidebarItemSetSuffix, "ADW", "adw_sidebar_item_set_suffix", false) | |||
| 337 | - | ||||
| 338 | xSidebarItemSetSuffix(x.GoPointer(), SuffixVar.GoPointer()) | 302 | xSidebarItemSetSuffix(x.GoPointer(), SuffixVar.GoPointer()) | ||
| 339 | } | 303 | } | ||
| 340 | 304 | ||||
| @@ -342,8 +306,6 @@ var xSidebarItemSetTitle func(uintptr, uintptr) | |||||
| 342 | 306 | ||||
| 343 | // Sets the title of @self. | 307 | // Sets the title of @self. | ||
| 344 | func (x *SidebarItem) SetTitle(TitleVar *string) { | 308 | func (x *SidebarItem) SetTitle(TitleVar *string) { | ||
| 345 | - | core.LazyRegister(&xSidebarItemSetTitle, "ADW", "adw_sidebar_item_set_title", false) | |||
| 346 | - | ||||
| 347 | TitleVarPtr := core.GStrdupNullable(TitleVar) | 309 | TitleVarPtr := core.GStrdupNullable(TitleVar) | ||
| 348 | defer core.GFreeNullable(TitleVarPtr) | 310 | defer core.GFreeNullable(TitleVarPtr) | ||
| 349 | 311 | ||||
| @@ -356,8 +318,6 @@ var xSidebarItemSetTooltip func(uintptr, uintptr) | |||||
| 356 | // | 318 | // | ||
| 357 | // The tooltip can be marked up with the Pango text markup language. | 319 | // The tooltip can be marked up with the Pango text markup language. | ||
| 358 | func (x *SidebarItem) SetTooltip(TooltipVar *string) { | 320 | func (x *SidebarItem) SetTooltip(TooltipVar *string) { | ||
| 359 | - | core.LazyRegister(&xSidebarItemSetTooltip, "ADW", "adw_sidebar_item_set_tooltip", false) | |||
| 360 | - | ||||
| 361 | TooltipVarPtr := core.GStrdupNullable(TooltipVar) | 321 | TooltipVarPtr := core.GStrdupNullable(TooltipVar) | ||
| 362 | defer core.GFreeNullable(TooltipVarPtr) | 322 | defer core.GFreeNullable(TooltipVarPtr) | ||
| 363 | 323 | ||||
| @@ -370,8 +330,6 @@ var xSidebarItemSetUseUnderline func(uintptr, bool) | |||||
| 370 | // | 330 | // | ||
| 371 | // The mnemonic can be used to activate the item. | 331 | // The mnemonic can be used to activate the item. | ||
| 372 | func (x *SidebarItem) SetUseUnderline(UseUnderlineVar bool) { | 332 | func (x *SidebarItem) SetUseUnderline(UseUnderlineVar bool) { | ||
| 373 | - | core.LazyRegister(&xSidebarItemSetUseUnderline, "ADW", "adw_sidebar_item_set_use_underline", false) | |||
| 374 | - | ||||
| 375 | xSidebarItemSetUseUnderline(x.GoPointer(), UseUnderlineVar) | 333 | xSidebarItemSetUseUnderline(x.GoPointer(), UseUnderlineVar) | ||
| 376 | } | 334 | } | ||
| 377 | 335 | ||||
| @@ -379,8 +337,6 @@ var xSidebarItemSetVisible func(uintptr, bool) | |||||
| 379 | 337 | ||||
| 380 | // Sets whether @self is visible. | 338 | // Sets whether @self is visible. | ||
| 381 | func (x *SidebarItem) SetVisible(VisibleVar bool) { | 339 | func (x *SidebarItem) SetVisible(VisibleVar bool) { | ||
| 382 | - | core.LazyRegister(&xSidebarItemSetVisible, "ADW", "adw_sidebar_item_set_visible", false) | |||
| 383 | - | ||||
| 384 | xSidebarItemSetVisible(x.GoPointer(), VisibleVar) | 340 | xSidebarItemSetVisible(x.GoPointer(), VisibleVar) | ||
| 385 | } | 341 | } | ||
| 386 | 342 | ||||
| @@ -558,4 +514,40 @@ func (x *SidebarItem) GetPropertyVisible() bool { | |||||
| 558 | func init() { | 514 | func init() { | ||
| 559 | core.SetPackageName("ADW", "libadwaita-1") | 515 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 560 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 516 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | ||
| 517 | + | var libs []uintptr | |||
| 518 | + | for _, libPath := range core.GetPaths("ADW") { | |||
| 519 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 520 | + | if err != nil { | |||
| 521 | + | panic(err) | |||
| 522 | + | } | |||
| 523 | + | libs = append(libs, lib) | |||
| 524 | + | } | |||
| 525 | + | ||||
| 526 | + | core.PuregoSafeRegister(&xSidebarItemGLibType, libs, "adw_sidebar_item_get_type") | |||
| 527 | + | ||||
| 528 | + | core.PuregoSafeRegister(&xNewSidebarItem, libs, "adw_sidebar_item_new") | |||
| 529 | + | ||||
| 530 | + | core.PuregoSafeRegister(&xSidebarItemGetDragMotionActivate, libs, "adw_sidebar_item_get_drag_motion_activate") | |||
| 531 | + | core.PuregoSafeRegister(&xSidebarItemGetEnabled, libs, "adw_sidebar_item_get_enabled") | |||
| 532 | + | core.PuregoSafeRegister(&xSidebarItemGetIconName, libs, "adw_sidebar_item_get_icon_name") | |||
| 533 | + | core.PuregoSafeRegister(&xSidebarItemGetIconPaintable, libs, "adw_sidebar_item_get_icon_paintable") | |||
| 534 | + | core.PuregoSafeRegister(&xSidebarItemGetIndex, libs, "adw_sidebar_item_get_index") | |||
| 535 | + | core.PuregoSafeRegister(&xSidebarItemGetSection, libs, "adw_sidebar_item_get_section") | |||
| 536 | + | core.PuregoSafeRegister(&xSidebarItemGetSectionIndex, libs, "adw_sidebar_item_get_section_index") | |||
| 537 | + | core.PuregoSafeRegister(&xSidebarItemGetSubtitle, libs, "adw_sidebar_item_get_subtitle") | |||
| 538 | + | core.PuregoSafeRegister(&xSidebarItemGetSuffix, libs, "adw_sidebar_item_get_suffix") | |||
| 539 | + | core.PuregoSafeRegister(&xSidebarItemGetTitle, libs, "adw_sidebar_item_get_title") | |||
| 540 | + | core.PuregoSafeRegister(&xSidebarItemGetTooltip, libs, "adw_sidebar_item_get_tooltip") | |||
| 541 | + | core.PuregoSafeRegister(&xSidebarItemGetUseUnderline, libs, "adw_sidebar_item_get_use_underline") | |||
| 542 | + | core.PuregoSafeRegister(&xSidebarItemGetVisible, libs, "adw_sidebar_item_get_visible") | |||
| 543 | + | core.PuregoSafeRegister(&xSidebarItemSetDragMotionActivate, libs, "adw_sidebar_item_set_drag_motion_activate") | |||
| 544 | + | core.PuregoSafeRegister(&xSidebarItemSetEnabled, libs, "adw_sidebar_item_set_enabled") | |||
| 545 | + | core.PuregoSafeRegister(&xSidebarItemSetIconName, libs, "adw_sidebar_item_set_icon_name") | |||
| 546 | + | core.PuregoSafeRegister(&xSidebarItemSetIconPaintable, libs, "adw_sidebar_item_set_icon_paintable") | |||
| 547 | + | core.PuregoSafeRegister(&xSidebarItemSetSubtitle, libs, "adw_sidebar_item_set_subtitle") | |||
| 548 | + | core.PuregoSafeRegister(&xSidebarItemSetSuffix, libs, "adw_sidebar_item_set_suffix") | |||
| 549 | + | core.PuregoSafeRegister(&xSidebarItemSetTitle, libs, "adw_sidebar_item_set_title") | |||
| 550 | + | core.PuregoSafeRegister(&xSidebarItemSetTooltip, libs, "adw_sidebar_item_set_tooltip") | |||
| 551 | + | core.PuregoSafeRegister(&xSidebarItemSetUseUnderline, libs, "adw_sidebar_item_set_use_underline") | |||
| 552 | + | core.PuregoSafeRegister(&xSidebarItemSetVisible, libs, "adw_sidebar_item_set_visible") | |||
| 561 | } | 553 | } | ||