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
| @@ -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" | |
| @@ -38,7 +39,6 @@ type BreakpointCondition struct { | |||
| 38 | 39 | var xBreakpointConditionGLibType func() types.GType | |
| 39 | 40 | ||
| 40 | 41 | func BreakpointConditionGLibType() types.GType { | |
| 41 | - | core.LazyRegister(&xBreakpointConditionGLibType, "ADW", "adw_breakpoint_condition_get_type", false) | |
| 42 | 42 | return xBreakpointConditionGLibType() | |
| 43 | 43 | } | |
| 44 | 44 | ||
| @@ -59,8 +59,6 @@ var xNewBreakpointConditionAnd func(*BreakpointCondition, *BreakpointCondition) | |||
| 59 | 59 | // Creates a condition that triggers when @condition_1 and @condition_2 are both | |
| 60 | 60 | // true. | |
| 61 | 61 | func NewBreakpointConditionAnd(Condition1Var *BreakpointCondition, Condition2Var *BreakpointCondition) *BreakpointCondition { | |
| 62 | - | core.LazyRegister(&xNewBreakpointConditionAnd, "ADW", "adw_breakpoint_condition_new_and", false) | |
| 63 | - | ||
| 64 | 62 | cret := xNewBreakpointConditionAnd(Condition1Var, Condition2Var) | |
| 65 | 63 | if cret == 0 { | |
| 66 | 64 | return nil | |
| @@ -72,8 +70,6 @@ var xNewBreakpointConditionLength func(BreakpointConditionLengthType, float64, L | |||
| 72 | 70 | ||
| 73 | 71 | // Creates a condition that triggers on length changes. | |
| 74 | 72 | func NewBreakpointConditionLength(TypeVar BreakpointConditionLengthType, ValueVar float64, UnitVar LengthUnit) *BreakpointCondition { | |
| 75 | - | core.LazyRegister(&xNewBreakpointConditionLength, "ADW", "adw_breakpoint_condition_new_length", false) | |
| 76 | - | ||
| 77 | 73 | cret := xNewBreakpointConditionLength(TypeVar, ValueVar, UnitVar) | |
| 78 | 74 | if cret == 0 { | |
| 79 | 75 | return nil | |
| @@ -86,8 +82,6 @@ var xNewBreakpointConditionOr func(*BreakpointCondition, *BreakpointCondition) u | |||
| 86 | 82 | // Creates a condition that triggers when either @condition_1 or @condition_2 is | |
| 87 | 83 | // true. | |
| 88 | 84 | func NewBreakpointConditionOr(Condition1Var *BreakpointCondition, Condition2Var *BreakpointCondition) *BreakpointCondition { | |
| 89 | - | core.LazyRegister(&xNewBreakpointConditionOr, "ADW", "adw_breakpoint_condition_new_or", false) | |
| 90 | - | ||
| 91 | 85 | cret := xNewBreakpointConditionOr(Condition1Var, Condition2Var) | |
| 92 | 86 | if cret == 0 { | |
| 93 | 87 | return nil | |
| @@ -101,8 +95,6 @@ var xNewBreakpointConditionRatio func(BreakpointConditionRatioType, int, int) ui | |||
| 101 | 95 | // | |
| 102 | 96 | // The ratio is represented as @width divided by @height. | |
| 103 | 97 | func NewBreakpointConditionRatio(TypeVar BreakpointConditionRatioType, WidthVar int, HeightVar int) *BreakpointCondition { | |
| 104 | - | core.LazyRegister(&xNewBreakpointConditionRatio, "ADW", "adw_breakpoint_condition_new_ratio", false) | |
| 105 | - | ||
| 106 | 98 | cret := xNewBreakpointConditionRatio(TypeVar, WidthVar, HeightVar) | |
| 107 | 99 | if cret == 0 { | |
| 108 | 100 | return nil | |
| @@ -114,8 +106,6 @@ var xBreakpointConditionCopy func(uintptr) uintptr | |||
| 114 | 106 | ||
| 115 | 107 | // Copies @self. | |
| 116 | 108 | func (x *BreakpointCondition) Copy() *BreakpointCondition { | |
| 117 | - | core.LazyRegister(&xBreakpointConditionCopy, "ADW", "adw_breakpoint_condition_copy", false) | |
| 118 | - | ||
| 119 | 109 | cret := xBreakpointConditionCopy(x.GoPointer()) | |
| 120 | 110 | if cret == 0 { | |
| 121 | 111 | return nil | |
| @@ -127,8 +117,6 @@ var xBreakpointConditionFree func(uintptr) | |||
| 127 | 117 | ||
| 128 | 118 | // Frees @self. | |
| 129 | 119 | func (x *BreakpointCondition) Free() { | |
| 130 | - | core.LazyRegister(&xBreakpointConditionFree, "ADW", "adw_breakpoint_condition_free", false) | |
| 131 | - | ||
| 132 | 120 | xBreakpointConditionFree(x.GoPointer()) | |
| 133 | 121 | } | |
| 134 | 122 | ||
| @@ -138,8 +126,6 @@ var xBreakpointConditionToString func(uintptr) string | |||
| 138 | 126 | // | |
| 139 | 127 | // The returned string can be parsed by [func@BreakpointCondition.parse]. | |
| 140 | 128 | func (x *BreakpointCondition) ToString() string { | |
| 141 | - | core.LazyRegister(&xBreakpointConditionToString, "ADW", "adw_breakpoint_condition_to_string", false) | |
| 142 | - | ||
| 143 | 129 | cret := xBreakpointConditionToString(x.GoPointer()) | |
| 144 | 130 | return cret | |
| 145 | 131 | } | |
| @@ -154,7 +140,6 @@ type BreakpointConditionLengthType int | |||
| 154 | 140 | var xBreakpointConditionLengthTypeGLibType func() types.GType | |
| 155 | 141 | ||
| 156 | 142 | func BreakpointConditionLengthTypeGLibType() types.GType { | |
| 157 | - | core.LazyRegister(&xBreakpointConditionLengthTypeGLibType, "ADW", "adw_breakpoint_condition_length_type_get_type", false) | |
| 158 | 143 | return xBreakpointConditionLengthTypeGLibType() | |
| 159 | 144 | } | |
| 160 | 145 | ||
| @@ -184,7 +169,6 @@ type BreakpointConditionRatioType int | |||
| 184 | 169 | var xBreakpointConditionRatioTypeGLibType func() types.GType | |
| 185 | 170 | ||
| 186 | 171 | func BreakpointConditionRatioTypeGLibType() types.GType { | |
| 187 | - | core.LazyRegister(&xBreakpointConditionRatioTypeGLibType, "ADW", "adw_breakpoint_condition_ratio_type_get_type", false) | |
| 188 | 172 | return xBreakpointConditionRatioTypeGLibType() | |
| 189 | 173 | } | |
| 190 | 174 | ||
| @@ -256,8 +240,6 @@ var xBreakpointConditionParse func(string) uintptr | |||
| 256 | 240 | // | |
| 257 | 241 | // If parentheses are omitted, the first operator takes priority. | |
| 258 | 242 | func BreakpointConditionParse(StrVar string) *BreakpointCondition { | |
| 259 | - | core.LazyRegister(&xBreakpointConditionParse, "ADW", "adw_breakpoint_condition_parse", false) | |
| 260 | - | ||
| 261 | 243 | cret := xBreakpointConditionParse(StrVar) | |
| 262 | 244 | if cret == 0 { | |
| 263 | 245 | return nil | |
| @@ -320,7 +302,6 @@ type Breakpoint struct { | |||
| 320 | 302 | var xBreakpointGLibType func() types.GType | |
| 321 | 303 | ||
| 322 | 304 | func BreakpointGLibType() types.GType { | |
| 323 | - | core.LazyRegister(&xBreakpointGLibType, "ADW", "adw_breakpoint_get_type", false) | |
| 324 | 305 | return xBreakpointGLibType() | |
| 325 | 306 | } | |
| 326 | 307 | ||
| @@ -334,7 +315,6 @@ var xNewBreakpoint func(*BreakpointCondition) uintptr | |||
| 334 | 315 | ||
| 335 | 316 | // Creates a new `AdwBreakpoint` with @condition. | |
| 336 | 317 | func NewBreakpoint(ConditionVar *BreakpointCondition) *Breakpoint { | |
| 337 | - | core.LazyRegister(&xNewBreakpoint, "ADW", "adw_breakpoint_new", false) | |
| 338 | 318 | var cls *Breakpoint | |
| 339 | 319 | ||
| 340 | 320 | cret := xNewBreakpoint(ConditionVar) | |
| @@ -393,8 +373,6 @@ var xBreakpointAddSetter func(uintptr, uintptr, string, *gobject.Value) | |||
| 393 | 373 | // | |
| 394 | 374 | // ``` | |
| 395 | 375 | func (x *Breakpoint) AddSetter(ObjectVar *gobject.Object, PropertyVar string, ValueVar *gobject.Value) { | |
| 396 | - | core.LazyRegister(&xBreakpointAddSetter, "ADW", "adw_breakpoint_add_setter", false) | |
| 397 | - | ||
| 398 | 376 | xBreakpointAddSetter(x.GoPointer(), ObjectVar.GoPointer(), PropertyVar, ValueVar) | |
| 399 | 377 | } | |
| 400 | 378 | ||
| @@ -416,8 +394,6 @@ var xBreakpointAddSetters func(uintptr, uintptr, string, ...interface{}) | |||
| 416 | 394 | // | |
| 417 | 395 | // ``` | |
| 418 | 396 | func (x *Breakpoint) AddSetters(FirstObjectVar *gobject.Object, FirstPropertyVar string, varArgs ...interface{}) { | |
| 419 | - | core.LazyRegister(&xBreakpointAddSetters, "ADW", "adw_breakpoint_add_setters", false) | |
| 420 | - | ||
| 421 | 397 | xBreakpointAddSetters(x.GoPointer(), FirstObjectVar.GoPointer(), FirstPropertyVar, varArgs...) | |
| 422 | 398 | } | |
| 423 | 399 | ||
| @@ -427,8 +403,6 @@ var xBreakpointAddSettersValist func(uintptr, uintptr, string, []interface{}) | |||
| 427 | 403 | // | |
| 428 | 404 | // See [method@Breakpoint.add_setters]. | |
| 429 | 405 | func (x *Breakpoint) AddSettersValist(FirstObjectVar *gobject.Object, FirstPropertyVar string, ArgsVar []interface{}) { | |
| 430 | - | core.LazyRegister(&xBreakpointAddSettersValist, "ADW", "adw_breakpoint_add_setters_valist", false) | |
| 431 | - | ||
| 432 | 406 | xBreakpointAddSettersValist(x.GoPointer(), FirstObjectVar.GoPointer(), FirstPropertyVar, ArgsVar) | |
| 433 | 407 | } | |
| 434 | 408 | ||
| @@ -442,8 +416,6 @@ var xBreakpointAddSettersv func(uintptr, int, uintptr, []string, uintptr) | |||
| 442 | 416 | // | |
| 443 | 417 | // This function is meant to be used by language bindings. | |
| 444 | 418 | func (x *Breakpoint) AddSettersv(NSettersVar int, ObjectsVar uintptr, NamesVar []string, ValuesVar uintptr) { | |
| 445 | - | core.LazyRegister(&xBreakpointAddSettersv, "ADW", "adw_breakpoint_add_settersv", false) | |
| 446 | - | ||
| 447 | 419 | xBreakpointAddSettersv(x.GoPointer(), NSettersVar, ObjectsVar, NamesVar, ValuesVar) | |
| 448 | 420 | } | |
| 449 | 421 | ||
| @@ -451,8 +423,6 @@ var xBreakpointGetCondition func(uintptr) uintptr | |||
| 451 | 423 | ||
| 452 | 424 | // Gets the condition for @self. | |
| 453 | 425 | func (x *Breakpoint) GetCondition() *BreakpointCondition { | |
| 454 | - | core.LazyRegister(&xBreakpointGetCondition, "ADW", "adw_breakpoint_get_condition", false) | |
| 455 | - | ||
| 456 | 426 | cret := xBreakpointGetCondition(x.GoPointer()) | |
| 457 | 427 | if cret == 0 { | |
| 458 | 428 | return nil | |
| @@ -464,8 +434,6 @@ var xBreakpointSetCondition func(uintptr, *BreakpointCondition) | |||
| 464 | 434 | ||
| 465 | 435 | // Sets the condition for @self. | |
| 466 | 436 | func (x *Breakpoint) SetCondition(ConditionVar *BreakpointCondition) { | |
| 467 | - | core.LazyRegister(&xBreakpointSetCondition, "ADW", "adw_breakpoint_set_condition", false) | |
| 468 | - | ||
| 469 | 437 | xBreakpointSetCondition(x.GoPointer(), ConditionVar) | |
| 470 | 438 | } | |
| 471 | 439 | ||
| @@ -559,4 +527,40 @@ func (x *Breakpoint) GetBuildableId() string { | |||
| 559 | 527 | func init() { | |
| 560 | 528 | core.SetPackageName("ADW", "libadwaita-1") | |
| 561 | 529 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | |
| 530 | + | var libs []uintptr | |
| 531 | + | for _, libPath := range core.GetPaths("ADW") { | |
| 532 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 533 | + | if err != nil { | |
| 534 | + | panic(err) | |
| 535 | + | } | |
| 536 | + | libs = append(libs, lib) | |
| 537 | + | } | |
| 538 | + | ||
| 539 | + | core.PuregoSafeRegister(&xBreakpointConditionLengthTypeGLibType, libs, "adw_breakpoint_condition_length_type_get_type") | |
| 540 | + | ||
| 541 | + | core.PuregoSafeRegister(&xBreakpointConditionRatioTypeGLibType, libs, "adw_breakpoint_condition_ratio_type_get_type") | |
| 542 | + | ||
| 543 | + | core.PuregoSafeRegister(&xBreakpointConditionParse, libs, "adw_breakpoint_condition_parse") | |
| 544 | + | ||
| 545 | + | core.PuregoSafeRegister(&xBreakpointConditionGLibType, libs, "adw_breakpoint_condition_get_type") | |
| 546 | + | ||
| 547 | + | core.PuregoSafeRegister(&xNewBreakpointConditionAnd, libs, "adw_breakpoint_condition_new_and") | |
| 548 | + | core.PuregoSafeRegister(&xNewBreakpointConditionLength, libs, "adw_breakpoint_condition_new_length") | |
| 549 | + | core.PuregoSafeRegister(&xNewBreakpointConditionOr, libs, "adw_breakpoint_condition_new_or") | |
| 550 | + | core.PuregoSafeRegister(&xNewBreakpointConditionRatio, libs, "adw_breakpoint_condition_new_ratio") | |
| 551 | + | ||
| 552 | + | core.PuregoSafeRegister(&xBreakpointConditionCopy, libs, "adw_breakpoint_condition_copy") | |
| 553 | + | core.PuregoSafeRegister(&xBreakpointConditionFree, libs, "adw_breakpoint_condition_free") | |
| 554 | + | core.PuregoSafeRegister(&xBreakpointConditionToString, libs, "adw_breakpoint_condition_to_string") | |
| 555 | + | ||
| 556 | + | core.PuregoSafeRegister(&xBreakpointGLibType, libs, "adw_breakpoint_get_type") | |
| 557 | + | ||
| 558 | + | core.PuregoSafeRegister(&xNewBreakpoint, libs, "adw_breakpoint_new") | |
| 559 | + | ||
| 560 | + | core.PuregoSafeRegister(&xBreakpointAddSetter, libs, "adw_breakpoint_add_setter") | |
| 561 | + | core.PuregoSafeRegister(&xBreakpointAddSetters, libs, "adw_breakpoint_add_setters") | |
| 562 | + | core.PuregoSafeRegister(&xBreakpointAddSettersValist, libs, "adw_breakpoint_add_setters_valist") | |
| 563 | + | core.PuregoSafeRegister(&xBreakpointAddSettersv, libs, "adw_breakpoint_add_settersv") | |
| 564 | + | core.PuregoSafeRegister(&xBreakpointGetCondition, libs, "adw_breakpoint_get_condition") | |
| 565 | + | core.PuregoSafeRegister(&xBreakpointSetCondition, libs, "adw_breakpoint_set_condition") | |
| 562 | 566 | } | |
| @@ -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" | ||
| @@ -38,7 +39,6 @@ type BreakpointCondition struct { | |||||
| 38 | var xBreakpointConditionGLibType func() types.GType | 39 | var xBreakpointConditionGLibType func() types.GType | ||
| 39 | 40 | ||||
| 40 | func BreakpointConditionGLibType() types.GType { | 41 | func BreakpointConditionGLibType() types.GType { | ||
| 41 | - | core.LazyRegister(&xBreakpointConditionGLibType, "ADW", "adw_breakpoint_condition_get_type", false) | |||
| 42 | return xBreakpointConditionGLibType() | 42 | return xBreakpointConditionGLibType() | ||
| 43 | } | 43 | } | ||
| 44 | 44 | ||||
| @@ -59,8 +59,6 @@ var xNewBreakpointConditionAnd func(*BreakpointCondition, *BreakpointCondition) | |||||
| 59 | // Creates a condition that triggers when @condition_1 and @condition_2 are both | 59 | // Creates a condition that triggers when @condition_1 and @condition_2 are both | ||
| 60 | // true. | 60 | // true. | ||
| 61 | func NewBreakpointConditionAnd(Condition1Var *BreakpointCondition, Condition2Var *BreakpointCondition) *BreakpointCondition { | 61 | func NewBreakpointConditionAnd(Condition1Var *BreakpointCondition, Condition2Var *BreakpointCondition) *BreakpointCondition { | ||
| 62 | - | core.LazyRegister(&xNewBreakpointConditionAnd, "ADW", "adw_breakpoint_condition_new_and", false) | |||
| 63 | - | ||||
| 64 | cret := xNewBreakpointConditionAnd(Condition1Var, Condition2Var) | 62 | cret := xNewBreakpointConditionAnd(Condition1Var, Condition2Var) | ||
| 65 | if cret == 0 { | 63 | if cret == 0 { | ||
| 66 | return nil | 64 | return nil | ||
| @@ -72,8 +70,6 @@ var xNewBreakpointConditionLength func(BreakpointConditionLengthType, float64, L | |||||
| 72 | 70 | ||||
| 73 | // Creates a condition that triggers on length changes. | 71 | // Creates a condition that triggers on length changes. | ||
| 74 | func NewBreakpointConditionLength(TypeVar BreakpointConditionLengthType, ValueVar float64, UnitVar LengthUnit) *BreakpointCondition { | 72 | func NewBreakpointConditionLength(TypeVar BreakpointConditionLengthType, ValueVar float64, UnitVar LengthUnit) *BreakpointCondition { | ||
| 75 | - | core.LazyRegister(&xNewBreakpointConditionLength, "ADW", "adw_breakpoint_condition_new_length", false) | |||
| 76 | - | ||||
| 77 | cret := xNewBreakpointConditionLength(TypeVar, ValueVar, UnitVar) | 73 | cret := xNewBreakpointConditionLength(TypeVar, ValueVar, UnitVar) | ||
| 78 | if cret == 0 { | 74 | if cret == 0 { | ||
| 79 | return nil | 75 | return nil | ||
| @@ -86,8 +82,6 @@ var xNewBreakpointConditionOr func(*BreakpointCondition, *BreakpointCondition) u | |||||
| 86 | // Creates a condition that triggers when either @condition_1 or @condition_2 is | 82 | // Creates a condition that triggers when either @condition_1 or @condition_2 is | ||
| 87 | // true. | 83 | // true. | ||
| 88 | func NewBreakpointConditionOr(Condition1Var *BreakpointCondition, Condition2Var *BreakpointCondition) *BreakpointCondition { | 84 | func NewBreakpointConditionOr(Condition1Var *BreakpointCondition, Condition2Var *BreakpointCondition) *BreakpointCondition { | ||
| 89 | - | core.LazyRegister(&xNewBreakpointConditionOr, "ADW", "adw_breakpoint_condition_new_or", false) | |||
| 90 | - | ||||
| 91 | cret := xNewBreakpointConditionOr(Condition1Var, Condition2Var) | 85 | cret := xNewBreakpointConditionOr(Condition1Var, Condition2Var) | ||
| 92 | if cret == 0 { | 86 | if cret == 0 { | ||
| 93 | return nil | 87 | return nil | ||
| @@ -101,8 +95,6 @@ var xNewBreakpointConditionRatio func(BreakpointConditionRatioType, int, int) ui | |||||
| 101 | // | 95 | // | ||
| 102 | // The ratio is represented as @width divided by @height. | 96 | // The ratio is represented as @width divided by @height. | ||
| 103 | func NewBreakpointConditionRatio(TypeVar BreakpointConditionRatioType, WidthVar int, HeightVar int) *BreakpointCondition { | 97 | func NewBreakpointConditionRatio(TypeVar BreakpointConditionRatioType, WidthVar int, HeightVar int) *BreakpointCondition { | ||
| 104 | - | core.LazyRegister(&xNewBreakpointConditionRatio, "ADW", "adw_breakpoint_condition_new_ratio", false) | |||
| 105 | - | ||||
| 106 | cret := xNewBreakpointConditionRatio(TypeVar, WidthVar, HeightVar) | 98 | cret := xNewBreakpointConditionRatio(TypeVar, WidthVar, HeightVar) | ||
| 107 | if cret == 0 { | 99 | if cret == 0 { | ||
| 108 | return nil | 100 | return nil | ||
| @@ -114,8 +106,6 @@ var xBreakpointConditionCopy func(uintptr) uintptr | |||||
| 114 | 106 | ||||
| 115 | // Copies @self. | 107 | // Copies @self. | ||
| 116 | func (x *BreakpointCondition) Copy() *BreakpointCondition { | 108 | func (x *BreakpointCondition) Copy() *BreakpointCondition { | ||
| 117 | - | core.LazyRegister(&xBreakpointConditionCopy, "ADW", "adw_breakpoint_condition_copy", false) | |||
| 118 | - | ||||
| 119 | cret := xBreakpointConditionCopy(x.GoPointer()) | 109 | cret := xBreakpointConditionCopy(x.GoPointer()) | ||
| 120 | if cret == 0 { | 110 | if cret == 0 { | ||
| 121 | return nil | 111 | return nil | ||
| @@ -127,8 +117,6 @@ var xBreakpointConditionFree func(uintptr) | |||||
| 127 | 117 | ||||
| 128 | // Frees @self. | 118 | // Frees @self. | ||
| 129 | func (x *BreakpointCondition) Free() { | 119 | func (x *BreakpointCondition) Free() { | ||
| 130 | - | core.LazyRegister(&xBreakpointConditionFree, "ADW", "adw_breakpoint_condition_free", false) | |||
| 131 | - | ||||
| 132 | xBreakpointConditionFree(x.GoPointer()) | 120 | xBreakpointConditionFree(x.GoPointer()) | ||
| 133 | } | 121 | } | ||
| 134 | 122 | ||||
| @@ -138,8 +126,6 @@ var xBreakpointConditionToString func(uintptr) string | |||||
| 138 | // | 126 | // | ||
| 139 | // The returned string can be parsed by [func@BreakpointCondition.parse]. | 127 | // The returned string can be parsed by [func@BreakpointCondition.parse]. | ||
| 140 | func (x *BreakpointCondition) ToString() string { | 128 | func (x *BreakpointCondition) ToString() string { | ||
| 141 | - | core.LazyRegister(&xBreakpointConditionToString, "ADW", "adw_breakpoint_condition_to_string", false) | |||
| 142 | - | ||||
| 143 | cret := xBreakpointConditionToString(x.GoPointer()) | 129 | cret := xBreakpointConditionToString(x.GoPointer()) | ||
| 144 | return cret | 130 | return cret | ||
| 145 | } | 131 | } | ||
| @@ -154,7 +140,6 @@ type BreakpointConditionLengthType int | |||||
| 154 | var xBreakpointConditionLengthTypeGLibType func() types.GType | 140 | var xBreakpointConditionLengthTypeGLibType func() types.GType | ||
| 155 | 141 | ||||
| 156 | func BreakpointConditionLengthTypeGLibType() types.GType { | 142 | func BreakpointConditionLengthTypeGLibType() types.GType { | ||
| 157 | - | core.LazyRegister(&xBreakpointConditionLengthTypeGLibType, "ADW", "adw_breakpoint_condition_length_type_get_type", false) | |||
| 158 | return xBreakpointConditionLengthTypeGLibType() | 143 | return xBreakpointConditionLengthTypeGLibType() | ||
| 159 | } | 144 | } | ||
| 160 | 145 | ||||
| @@ -184,7 +169,6 @@ type BreakpointConditionRatioType int | |||||
| 184 | var xBreakpointConditionRatioTypeGLibType func() types.GType | 169 | var xBreakpointConditionRatioTypeGLibType func() types.GType | ||
| 185 | 170 | ||||
| 186 | func BreakpointConditionRatioTypeGLibType() types.GType { | 171 | func BreakpointConditionRatioTypeGLibType() types.GType { | ||
| 187 | - | core.LazyRegister(&xBreakpointConditionRatioTypeGLibType, "ADW", "adw_breakpoint_condition_ratio_type_get_type", false) | |||
| 188 | return xBreakpointConditionRatioTypeGLibType() | 172 | return xBreakpointConditionRatioTypeGLibType() | ||
| 189 | } | 173 | } | ||
| 190 | 174 | ||||
| @@ -256,8 +240,6 @@ var xBreakpointConditionParse func(string) uintptr | |||||
| 256 | // | 240 | // | ||
| 257 | // If parentheses are omitted, the first operator takes priority. | 241 | // If parentheses are omitted, the first operator takes priority. | ||
| 258 | func BreakpointConditionParse(StrVar string) *BreakpointCondition { | 242 | func BreakpointConditionParse(StrVar string) *BreakpointCondition { | ||
| 259 | - | core.LazyRegister(&xBreakpointConditionParse, "ADW", "adw_breakpoint_condition_parse", false) | |||
| 260 | - | ||||
| 261 | cret := xBreakpointConditionParse(StrVar) | 243 | cret := xBreakpointConditionParse(StrVar) | ||
| 262 | if cret == 0 { | 244 | if cret == 0 { | ||
| 263 | return nil | 245 | return nil | ||
| @@ -320,7 +302,6 @@ type Breakpoint struct { | |||||
| 320 | var xBreakpointGLibType func() types.GType | 302 | var xBreakpointGLibType func() types.GType | ||
| 321 | 303 | ||||
| 322 | func BreakpointGLibType() types.GType { | 304 | func BreakpointGLibType() types.GType { | ||
| 323 | - | core.LazyRegister(&xBreakpointGLibType, "ADW", "adw_breakpoint_get_type", false) | |||
| 324 | return xBreakpointGLibType() | 305 | return xBreakpointGLibType() | ||
| 325 | } | 306 | } | ||
| 326 | 307 | ||||
| @@ -334,7 +315,6 @@ var xNewBreakpoint func(*BreakpointCondition) uintptr | |||||
| 334 | 315 | ||||
| 335 | // Creates a new `AdwBreakpoint` with @condition. | 316 | // Creates a new `AdwBreakpoint` with @condition. | ||
| 336 | func NewBreakpoint(ConditionVar *BreakpointCondition) *Breakpoint { | 317 | func NewBreakpoint(ConditionVar *BreakpointCondition) *Breakpoint { | ||
| 337 | - | core.LazyRegister(&xNewBreakpoint, "ADW", "adw_breakpoint_new", false) | |||
| 338 | var cls *Breakpoint | 318 | var cls *Breakpoint | ||
| 339 | 319 | ||||
| 340 | cret := xNewBreakpoint(ConditionVar) | 320 | cret := xNewBreakpoint(ConditionVar) | ||
| @@ -393,8 +373,6 @@ var xBreakpointAddSetter func(uintptr, uintptr, string, *gobject.Value) | |||||
| 393 | // | 373 | // | ||
| 394 | // ``` | 374 | // ``` | ||
| 395 | func (x *Breakpoint) AddSetter(ObjectVar *gobject.Object, PropertyVar string, ValueVar *gobject.Value) { | 375 | func (x *Breakpoint) AddSetter(ObjectVar *gobject.Object, PropertyVar string, ValueVar *gobject.Value) { | ||
| 396 | - | core.LazyRegister(&xBreakpointAddSetter, "ADW", "adw_breakpoint_add_setter", false) | |||
| 397 | - | ||||
| 398 | xBreakpointAddSetter(x.GoPointer(), ObjectVar.GoPointer(), PropertyVar, ValueVar) | 376 | xBreakpointAddSetter(x.GoPointer(), ObjectVar.GoPointer(), PropertyVar, ValueVar) | ||
| 399 | } | 377 | } | ||
| 400 | 378 | ||||
| @@ -416,8 +394,6 @@ var xBreakpointAddSetters func(uintptr, uintptr, string, ...interface{}) | |||||
| 416 | // | 394 | // | ||
| 417 | // ``` | 395 | // ``` | ||
| 418 | func (x *Breakpoint) AddSetters(FirstObjectVar *gobject.Object, FirstPropertyVar string, varArgs ...interface{}) { | 396 | func (x *Breakpoint) AddSetters(FirstObjectVar *gobject.Object, FirstPropertyVar string, varArgs ...interface{}) { | ||
| 419 | - | core.LazyRegister(&xBreakpointAddSetters, "ADW", "adw_breakpoint_add_setters", false) | |||
| 420 | - | ||||
| 421 | xBreakpointAddSetters(x.GoPointer(), FirstObjectVar.GoPointer(), FirstPropertyVar, varArgs...) | 397 | xBreakpointAddSetters(x.GoPointer(), FirstObjectVar.GoPointer(), FirstPropertyVar, varArgs...) | ||
| 422 | } | 398 | } | ||
| 423 | 399 | ||||
| @@ -427,8 +403,6 @@ var xBreakpointAddSettersValist func(uintptr, uintptr, string, []interface{}) | |||||
| 427 | // | 403 | // | ||
| 428 | // See [method@Breakpoint.add_setters]. | 404 | // See [method@Breakpoint.add_setters]. | ||
| 429 | func (x *Breakpoint) AddSettersValist(FirstObjectVar *gobject.Object, FirstPropertyVar string, ArgsVar []interface{}) { | 405 | func (x *Breakpoint) AddSettersValist(FirstObjectVar *gobject.Object, FirstPropertyVar string, ArgsVar []interface{}) { | ||
| 430 | - | core.LazyRegister(&xBreakpointAddSettersValist, "ADW", "adw_breakpoint_add_setters_valist", false) | |||
| 431 | - | ||||
| 432 | xBreakpointAddSettersValist(x.GoPointer(), FirstObjectVar.GoPointer(), FirstPropertyVar, ArgsVar) | 406 | xBreakpointAddSettersValist(x.GoPointer(), FirstObjectVar.GoPointer(), FirstPropertyVar, ArgsVar) | ||
| 433 | } | 407 | } | ||
| 434 | 408 | ||||
| @@ -442,8 +416,6 @@ var xBreakpointAddSettersv func(uintptr, int, uintptr, []string, uintptr) | |||||
| 442 | // | 416 | // | ||
| 443 | // This function is meant to be used by language bindings. | 417 | // This function is meant to be used by language bindings. | ||
| 444 | func (x *Breakpoint) AddSettersv(NSettersVar int, ObjectsVar uintptr, NamesVar []string, ValuesVar uintptr) { | 418 | func (x *Breakpoint) AddSettersv(NSettersVar int, ObjectsVar uintptr, NamesVar []string, ValuesVar uintptr) { | ||
| 445 | - | core.LazyRegister(&xBreakpointAddSettersv, "ADW", "adw_breakpoint_add_settersv", false) | |||
| 446 | - | ||||
| 447 | xBreakpointAddSettersv(x.GoPointer(), NSettersVar, ObjectsVar, NamesVar, ValuesVar) | 419 | xBreakpointAddSettersv(x.GoPointer(), NSettersVar, ObjectsVar, NamesVar, ValuesVar) | ||
| 448 | } | 420 | } | ||
| 449 | 421 | ||||
| @@ -451,8 +423,6 @@ var xBreakpointGetCondition func(uintptr) uintptr | |||||
| 451 | 423 | ||||
| 452 | // Gets the condition for @self. | 424 | // Gets the condition for @self. | ||
| 453 | func (x *Breakpoint) GetCondition() *BreakpointCondition { | 425 | func (x *Breakpoint) GetCondition() *BreakpointCondition { | ||
| 454 | - | core.LazyRegister(&xBreakpointGetCondition, "ADW", "adw_breakpoint_get_condition", false) | |||
| 455 | - | ||||
| 456 | cret := xBreakpointGetCondition(x.GoPointer()) | 426 | cret := xBreakpointGetCondition(x.GoPointer()) | ||
| 457 | if cret == 0 { | 427 | if cret == 0 { | ||
| 458 | return nil | 428 | return nil | ||
| @@ -464,8 +434,6 @@ var xBreakpointSetCondition func(uintptr, *BreakpointCondition) | |||||
| 464 | 434 | ||||
| 465 | // Sets the condition for @self. | 435 | // Sets the condition for @self. | ||
| 466 | func (x *Breakpoint) SetCondition(ConditionVar *BreakpointCondition) { | 436 | func (x *Breakpoint) SetCondition(ConditionVar *BreakpointCondition) { | ||
| 467 | - | core.LazyRegister(&xBreakpointSetCondition, "ADW", "adw_breakpoint_set_condition", false) | |||
| 468 | - | ||||
| 469 | xBreakpointSetCondition(x.GoPointer(), ConditionVar) | 437 | xBreakpointSetCondition(x.GoPointer(), ConditionVar) | ||
| 470 | } | 438 | } | ||
| 471 | 439 | ||||
| @@ -559,4 +527,40 @@ func (x *Breakpoint) GetBuildableId() string { | |||||
| 559 | func init() { | 527 | func init() { | ||
| 560 | core.SetPackageName("ADW", "libadwaita-1") | 528 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 561 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 529 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | ||
| 530 | + | var libs []uintptr | |||
| 531 | + | for _, libPath := range core.GetPaths("ADW") { | |||
| 532 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 533 | + | if err != nil { | |||
| 534 | + | panic(err) | |||
| 535 | + | } | |||
| 536 | + | libs = append(libs, lib) | |||
| 537 | + | } | |||
| 538 | + | ||||
| 539 | + | core.PuregoSafeRegister(&xBreakpointConditionLengthTypeGLibType, libs, "adw_breakpoint_condition_length_type_get_type") | |||
| 540 | + | ||||
| 541 | + | core.PuregoSafeRegister(&xBreakpointConditionRatioTypeGLibType, libs, "adw_breakpoint_condition_ratio_type_get_type") | |||
| 542 | + | ||||
| 543 | + | core.PuregoSafeRegister(&xBreakpointConditionParse, libs, "adw_breakpoint_condition_parse") | |||
| 544 | + | ||||
| 545 | + | core.PuregoSafeRegister(&xBreakpointConditionGLibType, libs, "adw_breakpoint_condition_get_type") | |||
| 546 | + | ||||
| 547 | + | core.PuregoSafeRegister(&xNewBreakpointConditionAnd, libs, "adw_breakpoint_condition_new_and") | |||
| 548 | + | core.PuregoSafeRegister(&xNewBreakpointConditionLength, libs, "adw_breakpoint_condition_new_length") | |||
| 549 | + | core.PuregoSafeRegister(&xNewBreakpointConditionOr, libs, "adw_breakpoint_condition_new_or") | |||
| 550 | + | core.PuregoSafeRegister(&xNewBreakpointConditionRatio, libs, "adw_breakpoint_condition_new_ratio") | |||
| 551 | + | ||||
| 552 | + | core.PuregoSafeRegister(&xBreakpointConditionCopy, libs, "adw_breakpoint_condition_copy") | |||
| 553 | + | core.PuregoSafeRegister(&xBreakpointConditionFree, libs, "adw_breakpoint_condition_free") | |||
| 554 | + | core.PuregoSafeRegister(&xBreakpointConditionToString, libs, "adw_breakpoint_condition_to_string") | |||
| 555 | + | ||||
| 556 | + | core.PuregoSafeRegister(&xBreakpointGLibType, libs, "adw_breakpoint_get_type") | |||
| 557 | + | ||||
| 558 | + | core.PuregoSafeRegister(&xNewBreakpoint, libs, "adw_breakpoint_new") | |||
| 559 | + | ||||
| 560 | + | core.PuregoSafeRegister(&xBreakpointAddSetter, libs, "adw_breakpoint_add_setter") | |||
| 561 | + | core.PuregoSafeRegister(&xBreakpointAddSetters, libs, "adw_breakpoint_add_setters") | |||
| 562 | + | core.PuregoSafeRegister(&xBreakpointAddSettersValist, libs, "adw_breakpoint_add_setters_valist") | |||
| 563 | + | core.PuregoSafeRegister(&xBreakpointAddSettersv, libs, "adw_breakpoint_add_settersv") | |||
| 564 | + | core.PuregoSafeRegister(&xBreakpointGetCondition, libs, "adw_breakpoint_get_condition") | |||
| 565 | + | core.PuregoSafeRegister(&xBreakpointSetCondition, libs, "adw_breakpoint_set_condition") | |||
| 562 | } | 566 | } | ||