Merge pull request #349 from bnema/fix/rollback-lazy-puregotk
fix(deps): emergency rollback puregotk lazy registration regression
905 files · +25263 -27842
M go.mod +1 -1
| @@ -11,7 +11,7 @@ require ( | |||
| 11 | 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | |
| 12 | 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | |
| 13 | 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | |
| 14 | - | github.com/bnema/puregotk v0.7.1-0.20260714170452-0b6b9b901234 | |
| 14 | + | github.com/bnema/puregotk v0.7.0 | |
| 15 | 15 | github.com/charmbracelet/bubbles v1.0.0 | |
| 16 | 16 | github.com/charmbracelet/bubbletea v1.3.10 | |
| 17 | 17 | github.com/charmbracelet/lipgloss v1.1.0 | |
| @@ -11,7 +11,7 @@ require ( | |||||
| 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | ||
| 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | ||
| 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | ||
| 14 | - | github.com/bnema/puregotk v0.7.1-0.20260714170452-0b6b9b901234 | 14 | + | github.com/bnema/puregotk v0.7.0 |
| 15 | github.com/charmbracelet/bubbles v1.0.0 | 15 | github.com/charmbracelet/bubbles v1.0.0 | ||
| 16 | github.com/charmbracelet/bubbletea v1.3.10 | 16 | github.com/charmbracelet/bubbletea v1.3.10 | ||
| 17 | github.com/charmbracelet/lipgloss v1.1.0 | 17 | github.com/charmbracelet/lipgloss v1.1.0 | ||
M go.sum +0 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/internal/core/core.go +4 -197 generated file: collapsed
M vendor/github.com/bnema/puregotk/pkg/core/core.go +0 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-dialog.go +64 -99 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-window.go +62 -95 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-accent-color.go +15 -7 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-action-row.go +29 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-alert-dialog.go +47 -66 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-target.go +27 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-util.go +12 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation.go +26 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application-window.go +22 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application.go +15 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-avatar.go +25 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-banner.go +26 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bin.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bottom-sheet.go +38 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint-bin.go +19 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint.go +37 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-content.go +22 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-row.go +18 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-dots.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-lines.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel.go +37 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-layout.go +20 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-scrollable.go +22 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp.go +22 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-combo-row.go +33 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-dialog.go +38 -45 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-easing.go +13 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-entry-row.go +33 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-enum-list-model.go +22 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-expander-row.go +33 -40 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 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spin-row.go +34 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spinner-paintable.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spinner.go +13 -2 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-split-button.go +34 -39 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spring-animation.go +30 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spring-params.go +21 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-squeezer.go +44 -49 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-status-page.go +24 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-style-manager.go +28 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-swipe-tracker.go +30 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-swipeable.go +21 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-switch-row.go +16 -6 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-bar.go +32 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-button.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-overview.go +37 -45 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-view.go +87 -123 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-timed-animation.go +28 -30 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toast-overlay.go +18 -9 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toast.go +36 -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/glib" | |
| 10 | 11 | "github.com/bnema/puregotk/v4/gobject" | |
| @@ -36,7 +37,6 @@ type ToastPriority int | |||
| 36 | 37 | var xToastPriorityGLibType func() types.GType | |
| 37 | 38 | ||
| 38 | 39 | func ToastPriorityGLibType() types.GType { | |
| 39 | - | core.LazyRegister(&xToastPriorityGLibType, "ADW", "adw_toast_priority_get_type", false) | |
| 40 | 40 | return xToastPriorityGLibType() | |
| 41 | 41 | } | |
| 42 | 42 | ||
| @@ -191,7 +191,6 @@ type Toast struct { | |||
| 191 | 191 | var xToastGLibType func() types.GType | |
| 192 | 192 | ||
| 193 | 193 | func ToastGLibType() types.GType { | |
| 194 | - | core.LazyRegister(&xToastGLibType, "ADW", "adw_toast_get_type", false) | |
| 195 | 194 | return xToastGLibType() | |
| 196 | 195 | } | |
| 197 | 196 | ||
| @@ -209,7 +208,6 @@ var xNewToast func(string) uintptr | |||
| 209 | 208 | // | |
| 210 | 209 | // @title can be marked up with the Pango text markup language. | |
| 211 | 210 | func NewToast(TitleVar string) *Toast { | |
| 212 | - | core.LazyRegister(&xNewToast, "ADW", "adw_toast_new", false) | |
| 213 | 211 | var cls *Toast | |
| 214 | 212 | ||
| 215 | 213 | cret := xNewToast(TitleVar) | |
| @@ -230,7 +228,6 @@ var xNewToastFormat func(string, ...interface{}) uintptr | |||
| 230 | 228 | // | |
| 231 | 229 | // See also: [ctor@Toast.new] | |
| 232 | 230 | func NewToastFormat(FormatVar string, varArgs ...interface{}) *Toast { | |
| 233 | - | core.LazyRegister(&xNewToastFormat, "ADW", "adw_toast_new_format", false) | |
| 234 | 231 | var cls *Toast | |
| 235 | 232 | ||
| 236 | 233 | cret := xNewToastFormat(FormatVar, varArgs...) | |
| @@ -250,8 +247,6 @@ var xToastDismiss func(uintptr) | |||
| 250 | 247 | // Does nothing if @self has already been dismissed, or hasn't been added to an | |
| 251 | 248 | // [class@ToastOverlay]. | |
| 252 | 249 | func (x *Toast) Dismiss() { | |
| 253 | - | core.LazyRegister(&xToastDismiss, "ADW", "adw_toast_dismiss", false) | |
| 254 | - | ||
| 255 | 250 | xToastDismiss(x.GoPointer()) | |
| 256 | 251 | } | |
| 257 | 252 | ||
| @@ -259,8 +254,6 @@ var xToastGetActionName func(uintptr) string | |||
| 259 | 254 | ||
| 260 | 255 | // Gets the name of the associated action. | |
| 261 | 256 | func (x *Toast) GetActionName() string { | |
| 262 | - | core.LazyRegister(&xToastGetActionName, "ADW", "adw_toast_get_action_name", false) | |
| 263 | - | ||
| 264 | 257 | cret := xToastGetActionName(x.GoPointer()) | |
| 265 | 258 | return cret | |
| 266 | 259 | } | |
| @@ -269,8 +262,6 @@ var xToastGetActionTargetValue func(uintptr) uintptr | |||
| 269 | 262 | ||
| 270 | 263 | // Gets the parameter for action invocations. | |
| 271 | 264 | func (x *Toast) GetActionTargetValue() *glib.Variant { | |
| 272 | - | core.LazyRegister(&xToastGetActionTargetValue, "ADW", "adw_toast_get_action_target_value", false) | |
| 273 | - | ||
| 274 | 265 | cret := xToastGetActionTargetValue(x.GoPointer()) | |
| 275 | 266 | if cret == 0 { | |
| 276 | 267 | return nil | |
| @@ -282,8 +273,6 @@ var xToastGetButtonLabel func(uintptr) string | |||
| 282 | 273 | ||
| 283 | 274 | // Gets the label to show on the button. | |
| 284 | 275 | func (x *Toast) GetButtonLabel() string { | |
| 285 | - | core.LazyRegister(&xToastGetButtonLabel, "ADW", "adw_toast_get_button_label", false) | |
| 286 | - | ||
| 287 | 276 | cret := xToastGetButtonLabel(x.GoPointer()) | |
| 288 | 277 | return cret | |
| 289 | 278 | } | |
| @@ -292,7 +281,6 @@ var xToastGetCustomTitle func(uintptr) uintptr | |||
| 292 | 281 | ||
| 293 | 282 | // Gets the custom title widget of @self. | |
| 294 | 283 | func (x *Toast) GetCustomTitle() *gtk.Widget { | |
| 295 | - | core.LazyRegister(&xToastGetCustomTitle, "ADW", "adw_toast_get_custom_title", false) | |
| 296 | 284 | var cls *gtk.Widget | |
| 297 | 285 | ||
| 298 | 286 | cret := xToastGetCustomTitle(x.GoPointer()) | |
| @@ -310,8 +298,6 @@ var xToastGetPriority func(uintptr) ToastPriority | |||
| 310 | 298 | ||
| 311 | 299 | // Gets priority for @self. | |
| 312 | 300 | func (x *Toast) GetPriority() ToastPriority { | |
| 313 | - | core.LazyRegister(&xToastGetPriority, "ADW", "adw_toast_get_priority", false) | |
| 314 | - | ||
| 315 | 301 | cret := xToastGetPriority(x.GoPointer()) | |
| 316 | 302 | return cret | |
| 317 | 303 | } | |
| @@ -320,8 +306,6 @@ var xToastGetTimeout func(uintptr) uint | |||
| 320 | 306 | ||
| 321 | 307 | // Gets timeout for @self. | |
| 322 | 308 | func (x *Toast) GetTimeout() uint { | |
| 323 | - | core.LazyRegister(&xToastGetTimeout, "ADW", "adw_toast_get_timeout", false) | |
| 324 | - | ||
| 325 | 309 | cret := xToastGetTimeout(x.GoPointer()) | |
| 326 | 310 | return cret | |
| 327 | 311 | } | |
| @@ -333,8 +317,6 @@ var xToastGetTitle func(uintptr) string | |||
| 333 | 317 | // If a custom title has been set with [method@Adw.Toast.set_custom_title] | |
| 334 | 318 | // the return value will be %NULL. | |
| 335 | 319 | func (x *Toast) GetTitle() string { | |
| 336 | - | core.LazyRegister(&xToastGetTitle, "ADW", "adw_toast_get_title", false) | |
| 337 | - | ||
| 338 | 320 | cret := xToastGetTitle(x.GoPointer()) | |
| 339 | 321 | return cret | |
| 340 | 322 | } | |
| @@ -343,8 +325,6 @@ var xToastGetUseMarkup func(uintptr) bool | |||
| 343 | 325 | ||
| 344 | 326 | // Gets whether to use Pango markup for the toast title. | |
| 345 | 327 | func (x *Toast) GetUseMarkup() bool { | |
| 346 | - | core.LazyRegister(&xToastGetUseMarkup, "ADW", "adw_toast_get_use_markup", false) | |
| 347 | - | ||
| 348 | 328 | cret := xToastGetUseMarkup(x.GoPointer()) | |
| 349 | 329 | return cret | |
| 350 | 330 | } | |
| @@ -357,8 +337,6 @@ var xToastSetActionName func(uintptr, uintptr) | |||
| 357 | 337 | // | |
| 358 | 338 | // See [property@Toast:action-target]. | |
| 359 | 339 | func (x *Toast) SetActionName(ActionNameVar *string) { | |
| 360 | - | core.LazyRegister(&xToastSetActionName, "ADW", "adw_toast_set_action_name", false) | |
| 361 | - | ||
| 362 | 340 | ActionNameVarPtr := core.GStrdupNullable(ActionNameVar) | |
| 363 | 341 | defer core.GFreeNullable(ActionNameVarPtr) | |
| 364 | 342 | ||
| @@ -377,8 +355,6 @@ var xToastSetActionTarget func(uintptr, uintptr, ...interface{}) | |||
| 377 | 355 | // the action name at the same time, you can use | |
| 378 | 356 | // [method@Toast.set_detailed_action_name]. | |
| 379 | 357 | func (x *Toast) SetActionTarget(FormatStringVar *string, varArgs ...interface{}) { | |
| 380 | - | core.LazyRegister(&xToastSetActionTarget, "ADW", "adw_toast_set_action_target", false) | |
| 381 | - | ||
| 382 | 358 | FormatStringVarPtr := core.GStrdupNullable(FormatStringVar) | |
| 383 | 359 | defer core.GFreeNullable(FormatStringVarPtr) | |
| 384 | 360 | ||
| @@ -392,8 +368,6 @@ var xToastSetActionTargetValue func(uintptr, *glib.Variant) | |||
| 392 | 368 | // If the @action_target variant has a floating reference this function | |
| 393 | 369 | // will sink it. | |
| 394 | 370 | func (x *Toast) SetActionTargetValue(ActionTargetVar *glib.Variant) { | |
| 395 | - | core.LazyRegister(&xToastSetActionTargetValue, "ADW", "adw_toast_set_action_target_value", false) | |
| 396 | - | ||
| 397 | 371 | xToastSetActionTargetValue(x.GoPointer(), ActionTargetVar) | |
| 398 | 372 | } | |
| 399 | 373 | ||
| @@ -407,8 +381,6 @@ var xToastSetButtonLabel func(uintptr, uintptr) | |||
| 407 | 381 | // | |
| 408 | 382 | // See [property@Toast:action-name]. | |
| 409 | 383 | func (x *Toast) SetButtonLabel(ButtonLabelVar *string) { | |
| 410 | - | core.LazyRegister(&xToastSetButtonLabel, "ADW", "adw_toast_set_button_label", false) | |
| 411 | - | ||
| 412 | 384 | ButtonLabelVarPtr := core.GStrdupNullable(ButtonLabelVar) | |
| 413 | 385 | defer core.GFreeNullable(ButtonLabelVarPtr) | |
| 414 | 386 | ||
| @@ -424,8 +396,6 @@ var xToastSetCustomTitle func(uintptr, uintptr) | |||
| 424 | 396 | // | |
| 425 | 397 | // Setting a custom title will unset [property@Toast:title]. | |
| 426 | 398 | func (x *Toast) SetCustomTitle(WidgetVar *gtk.Widget) { | |
| 427 | - | core.LazyRegister(&xToastSetCustomTitle, "ADW", "adw_toast_set_custom_title", false) | |
| 428 | - | ||
| 429 | 399 | xToastSetCustomTitle(x.GoPointer(), WidgetVar.GoPointer()) | |
| 430 | 400 | } | |
| 431 | 401 | ||
| @@ -436,8 +406,6 @@ var xToastSetDetailedActionName func(uintptr, uintptr) | |||
| 436 | 406 | // @detailed_action_name is a string in the format accepted by | |
| 437 | 407 | // [func@Gio.Action.parse_detailed_name]. | |
| 438 | 408 | func (x *Toast) SetDetailedActionName(DetailedActionNameVar *string) { | |
| 439 | - | core.LazyRegister(&xToastSetDetailedActionName, "ADW", "adw_toast_set_detailed_action_name", false) | |
| 440 | - | ||
| 441 | 409 | DetailedActionNameVarPtr := core.GStrdupNullable(DetailedActionNameVar) | |
| 442 | 410 | defer core.GFreeNullable(DetailedActionNameVarPtr) | |
| 443 | 411 | ||
| @@ -456,8 +424,6 @@ var xToastSetPriority func(uintptr, ToastPriority) | |||
| 456 | 424 | // If @priority is [enum@Adw.ToastPriority.high], the toast will be displayed | |
| 457 | 425 | // immediately, pushing the previous toast into the queue instead. | |
| 458 | 426 | func (x *Toast) SetPriority(PriorityVar ToastPriority) { | |
| 459 | - | core.LazyRegister(&xToastSetPriority, "ADW", "adw_toast_set_priority", false) | |
| 460 | - | ||
| 461 | 427 | xToastSetPriority(x.GoPointer(), PriorityVar) | |
| 462 | 428 | } | |
| 463 | 429 | ||
| @@ -471,8 +437,6 @@ var xToastSetTimeout func(uintptr, uint) | |||
| 471 | 437 | // Toasts cannot disappear while being hovered, pressed (on touchscreen), or | |
| 472 | 438 | // have keyboard focus inside them. | |
| 473 | 439 | func (x *Toast) SetTimeout(TimeoutVar uint) { | |
| 474 | - | core.LazyRegister(&xToastSetTimeout, "ADW", "adw_toast_set_timeout", false) | |
| 475 | - | ||
| 476 | 440 | xToastSetTimeout(x.GoPointer(), TimeoutVar) | |
| 477 | 441 | } | |
| 478 | 442 | ||
| @@ -486,8 +450,6 @@ var xToastSetTitle func(uintptr, string) | |||
| 486 | 450 | // | |
| 487 | 451 | // If [property@Toast:custom-title] is set, it will be used instead. | |
| 488 | 452 | func (x *Toast) SetTitle(TitleVar string) { | |
| 489 | - | core.LazyRegister(&xToastSetTitle, "ADW", "adw_toast_set_title", false) | |
| 490 | - | ||
| 491 | 453 | xToastSetTitle(x.GoPointer(), TitleVar) | |
| 492 | 454 | } | |
| 493 | 455 | ||
| @@ -497,8 +459,6 @@ var xToastSetUseMarkup func(uintptr, bool) | |||
| 497 | 459 | // | |
| 498 | 460 | // See also [func@Pango.parse_markup]. | |
| 499 | 461 | func (x *Toast) SetUseMarkup(UseMarkupVar bool) { | |
| 500 | - | core.LazyRegister(&xToastSetUseMarkup, "ADW", "adw_toast_set_use_markup", false) | |
| 501 | - | ||
| 502 | 462 | xToastSetUseMarkup(x.GoPointer(), UseMarkupVar) | |
| 503 | 463 | } | |
| 504 | 464 | ||
| @@ -714,4 +674,39 @@ func (x *Toast) ConnectDismissed(cb *func(Toast)) uint { | |||
| 714 | 674 | func init() { | |
| 715 | 675 | core.SetPackageName("ADW", "libadwaita-1") | |
| 716 | 676 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | |
| 677 | + | var libs []uintptr | |
| 678 | + | for _, libPath := range core.GetPaths("ADW") { | |
| 679 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 680 | + | if err != nil { | |
| 681 | + | panic(err) | |
| 682 | + | } | |
| 683 | + | libs = append(libs, lib) | |
| 684 | + | } | |
| 685 | + | ||
| 686 | + | core.PuregoSafeRegister(&xToastPriorityGLibType, libs, "adw_toast_priority_get_type") | |
| 687 | + | ||
| 688 | + | core.PuregoSafeRegister(&xToastGLibType, libs, "adw_toast_get_type") | |
| 689 | + | ||
| 690 | + | core.PuregoSafeRegister(&xNewToast, libs, "adw_toast_new") | |
| 691 | + | core.PuregoSafeRegister(&xNewToastFormat, libs, "adw_toast_new_format") | |
| 692 | + | ||
| 693 | + | core.PuregoSafeRegister(&xToastDismiss, libs, "adw_toast_dismiss") | |
| 694 | + | core.PuregoSafeRegister(&xToastGetActionName, libs, "adw_toast_get_action_name") | |
| 695 | + | core.PuregoSafeRegister(&xToastGetActionTargetValue, libs, "adw_toast_get_action_target_value") | |
| 696 | + | core.PuregoSafeRegister(&xToastGetButtonLabel, libs, "adw_toast_get_button_label") | |
| 697 | + | core.PuregoSafeRegister(&xToastGetCustomTitle, libs, "adw_toast_get_custom_title") | |
| 698 | + | core.PuregoSafeRegister(&xToastGetPriority, libs, "adw_toast_get_priority") | |
| 699 | + | core.PuregoSafeRegister(&xToastGetTimeout, libs, "adw_toast_get_timeout") | |
| 700 | + | core.PuregoSafeRegister(&xToastGetTitle, libs, "adw_toast_get_title") | |
| 701 | + | core.PuregoSafeRegister(&xToastGetUseMarkup, libs, "adw_toast_get_use_markup") | |
| 702 | + | core.PuregoSafeRegister(&xToastSetActionName, libs, "adw_toast_set_action_name") | |
| 703 | + | core.PuregoSafeRegister(&xToastSetActionTarget, libs, "adw_toast_set_action_target") | |
| 704 | + | core.PuregoSafeRegister(&xToastSetActionTargetValue, libs, "adw_toast_set_action_target_value") | |
| 705 | + | core.PuregoSafeRegister(&xToastSetButtonLabel, libs, "adw_toast_set_button_label") | |
| 706 | + | core.PuregoSafeRegister(&xToastSetCustomTitle, libs, "adw_toast_set_custom_title") | |
| 707 | + | core.PuregoSafeRegister(&xToastSetDetailedActionName, libs, "adw_toast_set_detailed_action_name") | |
| 708 | + | core.PuregoSafeRegister(&xToastSetPriority, libs, "adw_toast_set_priority") | |
| 709 | + | core.PuregoSafeRegister(&xToastSetTimeout, libs, "adw_toast_set_timeout") | |
| 710 | + | core.PuregoSafeRegister(&xToastSetTitle, libs, "adw_toast_set_title") | |
| 711 | + | core.PuregoSafeRegister(&xToastSetUseMarkup, libs, "adw_toast_set_use_markup") | |
| 717 | 712 | } | |
| @@ -5,6 +5,7 @@ import ( | |||||
| 5 | "structs" | 5 | "structs" | ||
| 6 | "unsafe" | 6 | "unsafe" | ||
| 7 | 7 | ||||
| 8 | + | "github.com/bnema/purego" | |||
| 8 | "github.com/bnema/puregotk/pkg/core" | 9 | "github.com/bnema/puregotk/pkg/core" | ||
| 9 | "github.com/bnema/puregotk/v4/glib" | 10 | "github.com/bnema/puregotk/v4/glib" | ||
| 10 | "github.com/bnema/puregotk/v4/gobject" | 11 | "github.com/bnema/puregotk/v4/gobject" | ||
| @@ -36,7 +37,6 @@ type ToastPriority int | |||||
| 36 | var xToastPriorityGLibType func() types.GType | 37 | var xToastPriorityGLibType func() types.GType | ||
| 37 | 38 | ||||
| 38 | func ToastPriorityGLibType() types.GType { | 39 | func ToastPriorityGLibType() types.GType { | ||
| 39 | - | core.LazyRegister(&xToastPriorityGLibType, "ADW", "adw_toast_priority_get_type", false) | |||
| 40 | return xToastPriorityGLibType() | 40 | return xToastPriorityGLibType() | ||
| 41 | } | 41 | } | ||
| 42 | 42 | ||||
| @@ -191,7 +191,6 @@ type Toast struct { | |||||
| 191 | var xToastGLibType func() types.GType | 191 | var xToastGLibType func() types.GType | ||
| 192 | 192 | ||||
| 193 | func ToastGLibType() types.GType { | 193 | func ToastGLibType() types.GType { | ||
| 194 | - | core.LazyRegister(&xToastGLibType, "ADW", "adw_toast_get_type", false) | |||
| 195 | return xToastGLibType() | 194 | return xToastGLibType() | ||
| 196 | } | 195 | } | ||
| 197 | 196 | ||||
| @@ -209,7 +208,6 @@ var xNewToast func(string) uintptr | |||||
| 209 | // | 208 | // | ||
| 210 | // @title can be marked up with the Pango text markup language. | 209 | // @title can be marked up with the Pango text markup language. | ||
| 211 | func NewToast(TitleVar string) *Toast { | 210 | func NewToast(TitleVar string) *Toast { | ||
| 212 | - | core.LazyRegister(&xNewToast, "ADW", "adw_toast_new", false) | |||
| 213 | var cls *Toast | 211 | var cls *Toast | ||
| 214 | 212 | ||||
| 215 | cret := xNewToast(TitleVar) | 213 | cret := xNewToast(TitleVar) | ||
| @@ -230,7 +228,6 @@ var xNewToastFormat func(string, ...interface{}) uintptr | |||||
| 230 | // | 228 | // | ||
| 231 | // See also: [ctor@Toast.new] | 229 | // See also: [ctor@Toast.new] | ||
| 232 | func NewToastFormat(FormatVar string, varArgs ...interface{}) *Toast { | 230 | func NewToastFormat(FormatVar string, varArgs ...interface{}) *Toast { | ||
| 233 | - | core.LazyRegister(&xNewToastFormat, "ADW", "adw_toast_new_format", false) | |||
| 234 | var cls *Toast | 231 | var cls *Toast | ||
| 235 | 232 | ||||
| 236 | cret := xNewToastFormat(FormatVar, varArgs...) | 233 | cret := xNewToastFormat(FormatVar, varArgs...) | ||
| @@ -250,8 +247,6 @@ var xToastDismiss func(uintptr) | |||||
| 250 | // Does nothing if @self has already been dismissed, or hasn't been added to an | 247 | // Does nothing if @self has already been dismissed, or hasn't been added to an | ||
| 251 | // [class@ToastOverlay]. | 248 | // [class@ToastOverlay]. | ||
| 252 | func (x *Toast) Dismiss() { | 249 | func (x *Toast) Dismiss() { | ||
| 253 | - | core.LazyRegister(&xToastDismiss, "ADW", "adw_toast_dismiss", false) | |||
| 254 | - | ||||
| 255 | xToastDismiss(x.GoPointer()) | 250 | xToastDismiss(x.GoPointer()) | ||
| 256 | } | 251 | } | ||
| 257 | 252 | ||||
| @@ -259,8 +254,6 @@ var xToastGetActionName func(uintptr) string | |||||
| 259 | 254 | ||||
| 260 | // Gets the name of the associated action. | 255 | // Gets the name of the associated action. | ||
| 261 | func (x *Toast) GetActionName() string { | 256 | func (x *Toast) GetActionName() string { | ||
| 262 | - | core.LazyRegister(&xToastGetActionName, "ADW", "adw_toast_get_action_name", false) | |||
| 263 | - | ||||
| 264 | cret := xToastGetActionName(x.GoPointer()) | 257 | cret := xToastGetActionName(x.GoPointer()) | ||
| 265 | return cret | 258 | return cret | ||
| 266 | } | 259 | } | ||
| @@ -269,8 +262,6 @@ var xToastGetActionTargetValue func(uintptr) uintptr | |||||
| 269 | 262 | ||||
| 270 | // Gets the parameter for action invocations. | 263 | // Gets the parameter for action invocations. | ||
| 271 | func (x *Toast) GetActionTargetValue() *glib.Variant { | 264 | func (x *Toast) GetActionTargetValue() *glib.Variant { | ||
| 272 | - | core.LazyRegister(&xToastGetActionTargetValue, "ADW", "adw_toast_get_action_target_value", false) | |||
| 273 | - | ||||
| 274 | cret := xToastGetActionTargetValue(x.GoPointer()) | 265 | cret := xToastGetActionTargetValue(x.GoPointer()) | ||
| 275 | if cret == 0 { | 266 | if cret == 0 { | ||
| 276 | return nil | 267 | return nil | ||
| @@ -282,8 +273,6 @@ var xToastGetButtonLabel func(uintptr) string | |||||
| 282 | 273 | ||||
| 283 | // Gets the label to show on the button. | 274 | // Gets the label to show on the button. | ||
| 284 | func (x *Toast) GetButtonLabel() string { | 275 | func (x *Toast) GetButtonLabel() string { | ||
| 285 | - | core.LazyRegister(&xToastGetButtonLabel, "ADW", "adw_toast_get_button_label", false) | |||
| 286 | - | ||||
| 287 | cret := xToastGetButtonLabel(x.GoPointer()) | 276 | cret := xToastGetButtonLabel(x.GoPointer()) | ||
| 288 | return cret | 277 | return cret | ||
| 289 | } | 278 | } | ||
| @@ -292,7 +281,6 @@ var xToastGetCustomTitle func(uintptr) uintptr | |||||
| 292 | 281 | ||||
| 293 | // Gets the custom title widget of @self. | 282 | // Gets the custom title widget of @self. | ||
| 294 | func (x *Toast) GetCustomTitle() *gtk.Widget { | 283 | func (x *Toast) GetCustomTitle() *gtk.Widget { | ||
| 295 | - | core.LazyRegister(&xToastGetCustomTitle, "ADW", "adw_toast_get_custom_title", false) | |||
| 296 | var cls *gtk.Widget | 284 | var cls *gtk.Widget | ||
| 297 | 285 | ||||
| 298 | cret := xToastGetCustomTitle(x.GoPointer()) | 286 | cret := xToastGetCustomTitle(x.GoPointer()) | ||
| @@ -310,8 +298,6 @@ var xToastGetPriority func(uintptr) ToastPriority | |||||
| 310 | 298 | ||||
| 311 | // Gets priority for @self. | 299 | // Gets priority for @self. | ||
| 312 | func (x *Toast) GetPriority() ToastPriority { | 300 | func (x *Toast) GetPriority() ToastPriority { | ||
| 313 | - | core.LazyRegister(&xToastGetPriority, "ADW", "adw_toast_get_priority", false) | |||
| 314 | - | ||||
| 315 | cret := xToastGetPriority(x.GoPointer()) | 301 | cret := xToastGetPriority(x.GoPointer()) | ||
| 316 | return cret | 302 | return cret | ||
| 317 | } | 303 | } | ||
| @@ -320,8 +306,6 @@ var xToastGetTimeout func(uintptr) uint | |||||
| 320 | 306 | ||||
| 321 | // Gets timeout for @self. | 307 | // Gets timeout for @self. | ||
| 322 | func (x *Toast) GetTimeout() uint { | 308 | func (x *Toast) GetTimeout() uint { | ||
| 323 | - | core.LazyRegister(&xToastGetTimeout, "ADW", "adw_toast_get_timeout", false) | |||
| 324 | - | ||||
| 325 | cret := xToastGetTimeout(x.GoPointer()) | 309 | cret := xToastGetTimeout(x.GoPointer()) | ||
| 326 | return cret | 310 | return cret | ||
| 327 | } | 311 | } | ||
| @@ -333,8 +317,6 @@ var xToastGetTitle func(uintptr) string | |||||
| 333 | // If a custom title has been set with [method@Adw.Toast.set_custom_title] | 317 | // If a custom title has been set with [method@Adw.Toast.set_custom_title] | ||
| 334 | // the return value will be %NULL. | 318 | // the return value will be %NULL. | ||
| 335 | func (x *Toast) GetTitle() string { | 319 | func (x *Toast) GetTitle() string { | ||
| 336 | - | core.LazyRegister(&xToastGetTitle, "ADW", "adw_toast_get_title", false) | |||
| 337 | - | ||||
| 338 | cret := xToastGetTitle(x.GoPointer()) | 320 | cret := xToastGetTitle(x.GoPointer()) | ||
| 339 | return cret | 321 | return cret | ||
| 340 | } | 322 | } | ||
| @@ -343,8 +325,6 @@ var xToastGetUseMarkup func(uintptr) bool | |||||
| 343 | 325 | ||||
| 344 | // Gets whether to use Pango markup for the toast title. | 326 | // Gets whether to use Pango markup for the toast title. | ||
| 345 | func (x *Toast) GetUseMarkup() bool { | 327 | func (x *Toast) GetUseMarkup() bool { | ||
| 346 | - | core.LazyRegister(&xToastGetUseMarkup, "ADW", "adw_toast_get_use_markup", false) | |||
| 347 | - | ||||
| 348 | cret := xToastGetUseMarkup(x.GoPointer()) | 328 | cret := xToastGetUseMarkup(x.GoPointer()) | ||
| 349 | return cret | 329 | return cret | ||
| 350 | } | 330 | } | ||
| @@ -357,8 +337,6 @@ var xToastSetActionName func(uintptr, uintptr) | |||||
| 357 | // | 337 | // | ||
| 358 | // See [property@Toast:action-target]. | 338 | // See [property@Toast:action-target]. | ||
| 359 | func (x *Toast) SetActionName(ActionNameVar *string) { | 339 | func (x *Toast) SetActionName(ActionNameVar *string) { | ||
| 360 | - | core.LazyRegister(&xToastSetActionName, "ADW", "adw_toast_set_action_name", false) | |||
| 361 | - | ||||
| 362 | ActionNameVarPtr := core.GStrdupNullable(ActionNameVar) | 340 | ActionNameVarPtr := core.GStrdupNullable(ActionNameVar) | ||
| 363 | defer core.GFreeNullable(ActionNameVarPtr) | 341 | defer core.GFreeNullable(ActionNameVarPtr) | ||
| 364 | 342 | ||||
| @@ -377,8 +355,6 @@ var xToastSetActionTarget func(uintptr, uintptr, ...interface{}) | |||||
| 377 | // the action name at the same time, you can use | 355 | // the action name at the same time, you can use | ||
| 378 | // [method@Toast.set_detailed_action_name]. | 356 | // [method@Toast.set_detailed_action_name]. | ||
| 379 | func (x *Toast) SetActionTarget(FormatStringVar *string, varArgs ...interface{}) { | 357 | func (x *Toast) SetActionTarget(FormatStringVar *string, varArgs ...interface{}) { | ||
| 380 | - | core.LazyRegister(&xToastSetActionTarget, "ADW", "adw_toast_set_action_target", false) | |||
| 381 | - | ||||
| 382 | FormatStringVarPtr := core.GStrdupNullable(FormatStringVar) | 358 | FormatStringVarPtr := core.GStrdupNullable(FormatStringVar) | ||
| 383 | defer core.GFreeNullable(FormatStringVarPtr) | 359 | defer core.GFreeNullable(FormatStringVarPtr) | ||
| 384 | 360 | ||||
| @@ -392,8 +368,6 @@ var xToastSetActionTargetValue func(uintptr, *glib.Variant) | |||||
| 392 | // If the @action_target variant has a floating reference this function | 368 | // If the @action_target variant has a floating reference this function | ||
| 393 | // will sink it. | 369 | // will sink it. | ||
| 394 | func (x *Toast) SetActionTargetValue(ActionTargetVar *glib.Variant) { | 370 | func (x *Toast) SetActionTargetValue(ActionTargetVar *glib.Variant) { | ||
| 395 | - | core.LazyRegister(&xToastSetActionTargetValue, "ADW", "adw_toast_set_action_target_value", false) | |||
| 396 | - | ||||
| 397 | xToastSetActionTargetValue(x.GoPointer(), ActionTargetVar) | 371 | xToastSetActionTargetValue(x.GoPointer(), ActionTargetVar) | ||
| 398 | } | 372 | } | ||
| 399 | 373 | ||||
| @@ -407,8 +381,6 @@ var xToastSetButtonLabel func(uintptr, uintptr) | |||||
| 407 | // | 381 | // | ||
| 408 | // See [property@Toast:action-name]. | 382 | // See [property@Toast:action-name]. | ||
| 409 | func (x *Toast) SetButtonLabel(ButtonLabelVar *string) { | 383 | func (x *Toast) SetButtonLabel(ButtonLabelVar *string) { | ||
| 410 | - | core.LazyRegister(&xToastSetButtonLabel, "ADW", "adw_toast_set_button_label", false) | |||
| 411 | - | ||||
| 412 | ButtonLabelVarPtr := core.GStrdupNullable(ButtonLabelVar) | 384 | ButtonLabelVarPtr := core.GStrdupNullable(ButtonLabelVar) | ||
| 413 | defer core.GFreeNullable(ButtonLabelVarPtr) | 385 | defer core.GFreeNullable(ButtonLabelVarPtr) | ||
| 414 | 386 | ||||
| @@ -424,8 +396,6 @@ var xToastSetCustomTitle func(uintptr, uintptr) | |||||
| 424 | // | 396 | // | ||
| 425 | // Setting a custom title will unset [property@Toast:title]. | 397 | // Setting a custom title will unset [property@Toast:title]. | ||
| 426 | func (x *Toast) SetCustomTitle(WidgetVar *gtk.Widget) { | 398 | func (x *Toast) SetCustomTitle(WidgetVar *gtk.Widget) { | ||
| 427 | - | core.LazyRegister(&xToastSetCustomTitle, "ADW", "adw_toast_set_custom_title", false) | |||
| 428 | - | ||||
| 429 | xToastSetCustomTitle(x.GoPointer(), WidgetVar.GoPointer()) | 399 | xToastSetCustomTitle(x.GoPointer(), WidgetVar.GoPointer()) | ||
| 430 | } | 400 | } | ||
| 431 | 401 | ||||
| @@ -436,8 +406,6 @@ var xToastSetDetailedActionName func(uintptr, uintptr) | |||||
| 436 | // @detailed_action_name is a string in the format accepted by | 406 | // @detailed_action_name is a string in the format accepted by | ||
| 437 | // [func@Gio.Action.parse_detailed_name]. | 407 | // [func@Gio.Action.parse_detailed_name]. | ||
| 438 | func (x *Toast) SetDetailedActionName(DetailedActionNameVar *string) { | 408 | func (x *Toast) SetDetailedActionName(DetailedActionNameVar *string) { | ||
| 439 | - | core.LazyRegister(&xToastSetDetailedActionName, "ADW", "adw_toast_set_detailed_action_name", false) | |||
| 440 | - | ||||
| 441 | DetailedActionNameVarPtr := core.GStrdupNullable(DetailedActionNameVar) | 409 | DetailedActionNameVarPtr := core.GStrdupNullable(DetailedActionNameVar) | ||
| 442 | defer core.GFreeNullable(DetailedActionNameVarPtr) | 410 | defer core.GFreeNullable(DetailedActionNameVarPtr) | ||
| 443 | 411 | ||||
| @@ -456,8 +424,6 @@ var xToastSetPriority func(uintptr, ToastPriority) | |||||
| 456 | // If @priority is [enum@Adw.ToastPriority.high], the toast will be displayed | 424 | // If @priority is [enum@Adw.ToastPriority.high], the toast will be displayed | ||
| 457 | // immediately, pushing the previous toast into the queue instead. | 425 | // immediately, pushing the previous toast into the queue instead. | ||
| 458 | func (x *Toast) SetPriority(PriorityVar ToastPriority) { | 426 | func (x *Toast) SetPriority(PriorityVar ToastPriority) { | ||
| 459 | - | core.LazyRegister(&xToastSetPriority, "ADW", "adw_toast_set_priority", false) | |||
| 460 | - | ||||
| 461 | xToastSetPriority(x.GoPointer(), PriorityVar) | 427 | xToastSetPriority(x.GoPointer(), PriorityVar) | ||
| 462 | } | 428 | } | ||
| 463 | 429 | ||||
| @@ -471,8 +437,6 @@ var xToastSetTimeout func(uintptr, uint) | |||||
| 471 | // Toasts cannot disappear while being hovered, pressed (on touchscreen), or | 437 | // Toasts cannot disappear while being hovered, pressed (on touchscreen), or | ||
| 472 | // have keyboard focus inside them. | 438 | // have keyboard focus inside them. | ||
| 473 | func (x *Toast) SetTimeout(TimeoutVar uint) { | 439 | func (x *Toast) SetTimeout(TimeoutVar uint) { | ||
| 474 | - | core.LazyRegister(&xToastSetTimeout, "ADW", "adw_toast_set_timeout", false) | |||
| 475 | - | ||||
| 476 | xToastSetTimeout(x.GoPointer(), TimeoutVar) | 440 | xToastSetTimeout(x.GoPointer(), TimeoutVar) | ||
| 477 | } | 441 | } | ||
| 478 | 442 | ||||
| @@ -486,8 +450,6 @@ var xToastSetTitle func(uintptr, string) | |||||
| 486 | // | 450 | // | ||
| 487 | // If [property@Toast:custom-title] is set, it will be used instead. | 451 | // If [property@Toast:custom-title] is set, it will be used instead. | ||
| 488 | func (x *Toast) SetTitle(TitleVar string) { | 452 | func (x *Toast) SetTitle(TitleVar string) { | ||
| 489 | - | core.LazyRegister(&xToastSetTitle, "ADW", "adw_toast_set_title", false) | |||
| 490 | - | ||||
| 491 | xToastSetTitle(x.GoPointer(), TitleVar) | 453 | xToastSetTitle(x.GoPointer(), TitleVar) | ||
| 492 | } | 454 | } | ||
| 493 | 455 | ||||
| @@ -497,8 +459,6 @@ var xToastSetUseMarkup func(uintptr, bool) | |||||
| 497 | // | 459 | // | ||
| 498 | // See also [func@Pango.parse_markup]. | 460 | // See also [func@Pango.parse_markup]. | ||
| 499 | func (x *Toast) SetUseMarkup(UseMarkupVar bool) { | 461 | func (x *Toast) SetUseMarkup(UseMarkupVar bool) { | ||
| 500 | - | core.LazyRegister(&xToastSetUseMarkup, "ADW", "adw_toast_set_use_markup", false) | |||
| 501 | - | ||||
| 502 | xToastSetUseMarkup(x.GoPointer(), UseMarkupVar) | 462 | xToastSetUseMarkup(x.GoPointer(), UseMarkupVar) | ||
| 503 | } | 463 | } | ||
| 504 | 464 | ||||
| @@ -714,4 +674,39 @@ func (x *Toast) ConnectDismissed(cb *func(Toast)) uint { | |||||
| 714 | func init() { | 674 | func init() { | ||
| 715 | core.SetPackageName("ADW", "libadwaita-1") | 675 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 716 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 676 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | ||
| 677 | + | var libs []uintptr | |||
| 678 | + | for _, libPath := range core.GetPaths("ADW") { | |||
| 679 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 680 | + | if err != nil { | |||
| 681 | + | panic(err) | |||
| 682 | + | } | |||
| 683 | + | libs = append(libs, lib) | |||
| 684 | + | } | |||
| 685 | + | ||||
| 686 | + | core.PuregoSafeRegister(&xToastPriorityGLibType, libs, "adw_toast_priority_get_type") | |||
| 687 | + | ||||
| 688 | + | core.PuregoSafeRegister(&xToastGLibType, libs, "adw_toast_get_type") | |||
| 689 | + | ||||
| 690 | + | core.PuregoSafeRegister(&xNewToast, libs, "adw_toast_new") | |||
| 691 | + | core.PuregoSafeRegister(&xNewToastFormat, libs, "adw_toast_new_format") | |||
| 692 | + | ||||
| 693 | + | core.PuregoSafeRegister(&xToastDismiss, libs, "adw_toast_dismiss") | |||
| 694 | + | core.PuregoSafeRegister(&xToastGetActionName, libs, "adw_toast_get_action_name") | |||
| 695 | + | core.PuregoSafeRegister(&xToastGetActionTargetValue, libs, "adw_toast_get_action_target_value") | |||
| 696 | + | core.PuregoSafeRegister(&xToastGetButtonLabel, libs, "adw_toast_get_button_label") | |||
| 697 | + | core.PuregoSafeRegister(&xToastGetCustomTitle, libs, "adw_toast_get_custom_title") | |||
| 698 | + | core.PuregoSafeRegister(&xToastGetPriority, libs, "adw_toast_get_priority") | |||
| 699 | + | core.PuregoSafeRegister(&xToastGetTimeout, libs, "adw_toast_get_timeout") | |||
| 700 | + | core.PuregoSafeRegister(&xToastGetTitle, libs, "adw_toast_get_title") | |||
| 701 | + | core.PuregoSafeRegister(&xToastGetUseMarkup, libs, "adw_toast_get_use_markup") | |||
| 702 | + | core.PuregoSafeRegister(&xToastSetActionName, libs, "adw_toast_set_action_name") | |||
| 703 | + | core.PuregoSafeRegister(&xToastSetActionTarget, libs, "adw_toast_set_action_target") | |||
| 704 | + | core.PuregoSafeRegister(&xToastSetActionTargetValue, libs, "adw_toast_set_action_target_value") | |||
| 705 | + | core.PuregoSafeRegister(&xToastSetButtonLabel, libs, "adw_toast_set_button_label") | |||
| 706 | + | core.PuregoSafeRegister(&xToastSetCustomTitle, libs, "adw_toast_set_custom_title") | |||
| 707 | + | core.PuregoSafeRegister(&xToastSetDetailedActionName, libs, "adw_toast_set_detailed_action_name") | |||
| 708 | + | core.PuregoSafeRegister(&xToastSetPriority, libs, "adw_toast_set_priority") | |||
| 709 | + | core.PuregoSafeRegister(&xToastSetTimeout, libs, "adw_toast_set_timeout") | |||
| 710 | + | core.PuregoSafeRegister(&xToastSetTitle, libs, "adw_toast_set_title") | |||
| 711 | + | core.PuregoSafeRegister(&xToastSetUseMarkup, libs, "adw_toast_set_use_markup") | |||
| 717 | } | 712 | } | ||