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
| @@ -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/gobject" | |
| 10 | 11 | "github.com/bnema/puregotk/v4/gobject/types" | |
| @@ -35,7 +36,6 @@ type CenteringPolicy int | |||
| 35 | 36 | var xCenteringPolicyGLibType func() types.GType | |
| 36 | 37 | ||
| 37 | 38 | func CenteringPolicyGLibType() types.GType { | |
| 38 | - | core.LazyRegister(&xCenteringPolicyGLibType, "ADW", "adw_centering_policy_get_type", false) | |
| 39 | 39 | return xCenteringPolicyGLibType() | |
| 40 | 40 | } | |
| 41 | 41 | ||
| @@ -152,7 +152,6 @@ type HeaderBar struct { | |||
| 152 | 152 | var xHeaderBarGLibType func() types.GType | |
| 153 | 153 | ||
| 154 | 154 | func HeaderBarGLibType() types.GType { | |
| 155 | - | core.LazyRegister(&xHeaderBarGLibType, "ADW", "adw_header_bar_get_type", false) | |
| 156 | 155 | return xHeaderBarGLibType() | |
| 157 | 156 | } | |
| 158 | 157 | ||
| @@ -166,7 +165,6 @@ var xNewHeaderBar func() uintptr | |||
| 166 | 165 | ||
| 167 | 166 | // Creates a new `AdwHeaderBar`. | |
| 168 | 167 | func NewHeaderBar() *HeaderBar { | |
| 169 | - | core.LazyRegister(&xNewHeaderBar, "ADW", "adw_header_bar_new", false) | |
| 170 | 168 | var cls *HeaderBar | |
| 171 | 169 | ||
| 172 | 170 | cret := xNewHeaderBar() | |
| @@ -184,8 +182,6 @@ var xHeaderBarGetCenteringPolicy func(uintptr) CenteringPolicy | |||
| 184 | 182 | ||
| 185 | 183 | // Gets the policy for aligning the center widget. | |
| 186 | 184 | func (x *HeaderBar) GetCenteringPolicy() CenteringPolicy { | |
| 187 | - | core.LazyRegister(&xHeaderBarGetCenteringPolicy, "ADW", "adw_header_bar_get_centering_policy", false) | |
| 188 | - | ||
| 189 | 185 | cret := xHeaderBarGetCenteringPolicy(x.GoPointer()) | |
| 190 | 186 | return cret | |
| 191 | 187 | } | |
| @@ -194,8 +190,6 @@ var xHeaderBarGetDecorationLayout func(uintptr) string | |||
| 194 | 190 | ||
| 195 | 191 | // Gets the decoration layout for @self. | |
| 196 | 192 | func (x *HeaderBar) GetDecorationLayout() string { | |
| 197 | - | core.LazyRegister(&xHeaderBarGetDecorationLayout, "ADW", "adw_header_bar_get_decoration_layout", false) | |
| 198 | - | ||
| 199 | 193 | cret := xHeaderBarGetDecorationLayout(x.GoPointer()) | |
| 200 | 194 | return cret | |
| 201 | 195 | } | |
| @@ -204,8 +198,6 @@ var xHeaderBarGetShowBackButton func(uintptr) bool | |||
| 204 | 198 | ||
| 205 | 199 | // Gets whether @self can show the back button. | |
| 206 | 200 | func (x *HeaderBar) GetShowBackButton() bool { | |
| 207 | - | core.LazyRegister(&xHeaderBarGetShowBackButton, "ADW", "adw_header_bar_get_show_back_button", false) | |
| 208 | - | ||
| 209 | 201 | cret := xHeaderBarGetShowBackButton(x.GoPointer()) | |
| 210 | 202 | return cret | |
| 211 | 203 | } | |
| @@ -214,8 +206,6 @@ var xHeaderBarGetShowEndTitleButtons func(uintptr) bool | |||
| 214 | 206 | ||
| 215 | 207 | // Gets whether to show title buttons at the end of @self. | |
| 216 | 208 | func (x *HeaderBar) GetShowEndTitleButtons() bool { | |
| 217 | - | core.LazyRegister(&xHeaderBarGetShowEndTitleButtons, "ADW", "adw_header_bar_get_show_end_title_buttons", false) | |
| 218 | - | ||
| 219 | 209 | cret := xHeaderBarGetShowEndTitleButtons(x.GoPointer()) | |
| 220 | 210 | return cret | |
| 221 | 211 | } | |
| @@ -224,8 +214,6 @@ var xHeaderBarGetShowStartTitleButtons func(uintptr) bool | |||
| 224 | 214 | ||
| 225 | 215 | // Gets whether to show title buttons at the start of @self. | |
| 226 | 216 | func (x *HeaderBar) GetShowStartTitleButtons() bool { | |
| 227 | - | core.LazyRegister(&xHeaderBarGetShowStartTitleButtons, "ADW", "adw_header_bar_get_show_start_title_buttons", false) | |
| 228 | - | ||
| 229 | 217 | cret := xHeaderBarGetShowStartTitleButtons(x.GoPointer()) | |
| 230 | 218 | return cret | |
| 231 | 219 | } | |
| @@ -234,8 +222,6 @@ var xHeaderBarGetShowTitle func(uintptr) bool | |||
| 234 | 222 | ||
| 235 | 223 | // Gets whether the title widget should be shown. | |
| 236 | 224 | func (x *HeaderBar) GetShowTitle() bool { | |
| 237 | - | core.LazyRegister(&xHeaderBarGetShowTitle, "ADW", "adw_header_bar_get_show_title", false) | |
| 238 | - | ||
| 239 | 225 | cret := xHeaderBarGetShowTitle(x.GoPointer()) | |
| 240 | 226 | return cret | |
| 241 | 227 | } | |
| @@ -244,7 +230,6 @@ var xHeaderBarGetTitleWidget func(uintptr) uintptr | |||
| 244 | 230 | ||
| 245 | 231 | // Gets the title widget widget of @self. | |
| 246 | 232 | func (x *HeaderBar) GetTitleWidget() *gtk.Widget { | |
| 247 | - | core.LazyRegister(&xHeaderBarGetTitleWidget, "ADW", "adw_header_bar_get_title_widget", false) | |
| 248 | 233 | var cls *gtk.Widget | |
| 249 | 234 | ||
| 250 | 235 | cret := xHeaderBarGetTitleWidget(x.GoPointer()) | |
| @@ -262,8 +247,6 @@ var xHeaderBarPackEnd func(uintptr, uintptr) | |||
| 262 | 247 | ||
| 263 | 248 | // Adds @child to @self, packed with reference to the end of @self. | |
| 264 | 249 | func (x *HeaderBar) PackEnd(ChildVar *gtk.Widget) { | |
| 265 | - | core.LazyRegister(&xHeaderBarPackEnd, "ADW", "adw_header_bar_pack_end", false) | |
| 266 | - | ||
| 267 | 250 | xHeaderBarPackEnd(x.GoPointer(), ChildVar.GoPointer()) | |
| 268 | 251 | } | |
| 269 | 252 | ||
| @@ -271,8 +254,6 @@ var xHeaderBarPackStart func(uintptr, uintptr) | |||
| 271 | 254 | ||
| 272 | 255 | // Adds @child to @self, packed with reference to the start of the @self. | |
| 273 | 256 | func (x *HeaderBar) PackStart(ChildVar *gtk.Widget) { | |
| 274 | - | core.LazyRegister(&xHeaderBarPackStart, "ADW", "adw_header_bar_pack_start", false) | |
| 275 | - | ||
| 276 | 257 | xHeaderBarPackStart(x.GoPointer(), ChildVar.GoPointer()) | |
| 277 | 258 | } | |
| 278 | 259 | ||
| @@ -283,8 +264,6 @@ var xHeaderBarRemove func(uintptr, uintptr) | |||
| 283 | 264 | // The child must have been added with [method@HeaderBar.pack_start], | |
| 284 | 265 | // [method@HeaderBar.pack_end] or [property@HeaderBar:title-widget]. | |
| 285 | 266 | func (x *HeaderBar) Remove(ChildVar *gtk.Widget) { | |
| 286 | - | core.LazyRegister(&xHeaderBarRemove, "ADW", "adw_header_bar_remove", false) | |
| 287 | - | ||
| 288 | 267 | xHeaderBarRemove(x.GoPointer(), ChildVar.GoPointer()) | |
| 289 | 268 | } | |
| 290 | 269 | ||
| @@ -292,8 +271,6 @@ var xHeaderBarSetCenteringPolicy func(uintptr, CenteringPolicy) | |||
| 292 | 271 | ||
| 293 | 272 | // Sets the policy for aligning the center widget. | |
| 294 | 273 | func (x *HeaderBar) SetCenteringPolicy(CenteringPolicyVar CenteringPolicy) { | |
| 295 | - | core.LazyRegister(&xHeaderBarSetCenteringPolicy, "ADW", "adw_header_bar_set_centering_policy", false) | |
| 296 | - | ||
| 297 | 274 | xHeaderBarSetCenteringPolicy(x.GoPointer(), CenteringPolicyVar) | |
| 298 | 275 | } | |
| 299 | 276 | ||
| @@ -312,8 +289,6 @@ var xHeaderBarSetDecorationLayout func(uintptr, uintptr) | |||
| 312 | 289 | // For example, “icon:minimize,maximize,close” specifies an icon at the start, | |
| 313 | 290 | // and minimize, maximize and close buttons at the end. | |
| 314 | 291 | func (x *HeaderBar) SetDecorationLayout(LayoutVar *string) { | |
| 315 | - | core.LazyRegister(&xHeaderBarSetDecorationLayout, "ADW", "adw_header_bar_set_decoration_layout", false) | |
| 316 | - | ||
| 317 | 292 | LayoutVarPtr := core.GStrdupNullable(LayoutVar) | |
| 318 | 293 | defer core.GFreeNullable(LayoutVarPtr) | |
| 319 | 294 | ||
| @@ -327,8 +302,6 @@ var xHeaderBarSetShowBackButton func(uintptr, bool) | |||
| 327 | 302 | // The back button will never be shown unless the header bar is placed inside an | |
| 328 | 303 | // [class@NavigationView]. Usually, there is no reason to set it to `FALSE`. | |
| 329 | 304 | func (x *HeaderBar) SetShowBackButton(ShowBackButtonVar bool) { | |
| 330 | - | core.LazyRegister(&xHeaderBarSetShowBackButton, "ADW", "adw_header_bar_set_show_back_button", false) | |
| 331 | - | ||
| 332 | 305 | xHeaderBarSetShowBackButton(x.GoPointer(), ShowBackButtonVar) | |
| 333 | 306 | } | |
| 334 | 307 | ||
| @@ -342,8 +315,6 @@ var xHeaderBarSetShowEndTitleButtons func(uintptr, bool) | |||
| 342 | 315 | // [property@HeaderBar:decoration-layout] property, and by the state of the | |
| 343 | 316 | // window (e.g. a close button will not be shown if the window can't be closed). | |
| 344 | 317 | func (x *HeaderBar) SetShowEndTitleButtons(SettingVar bool) { | |
| 345 | - | core.LazyRegister(&xHeaderBarSetShowEndTitleButtons, "ADW", "adw_header_bar_set_show_end_title_buttons", false) | |
| 346 | - | ||
| 347 | 318 | xHeaderBarSetShowEndTitleButtons(x.GoPointer(), SettingVar) | |
| 348 | 319 | } | |
| 349 | 320 | ||
| @@ -357,8 +328,6 @@ var xHeaderBarSetShowStartTitleButtons func(uintptr, bool) | |||
| 357 | 328 | // [property@HeaderBar:decoration-layout] property, and by the state of the | |
| 358 | 329 | // window (e.g. a close button will not be shown if the window can't be closed). | |
| 359 | 330 | func (x *HeaderBar) SetShowStartTitleButtons(SettingVar bool) { | |
| 360 | - | core.LazyRegister(&xHeaderBarSetShowStartTitleButtons, "ADW", "adw_header_bar_set_show_start_title_buttons", false) | |
| 361 | - | ||
| 362 | 331 | xHeaderBarSetShowStartTitleButtons(x.GoPointer(), SettingVar) | |
| 363 | 332 | } | |
| 364 | 333 | ||
| @@ -366,8 +335,6 @@ var xHeaderBarSetShowTitle func(uintptr, bool) | |||
| 366 | 335 | ||
| 367 | 336 | // Sets whether the title widget should be shown. | |
| 368 | 337 | func (x *HeaderBar) SetShowTitle(ShowTitleVar bool) { | |
| 369 | - | core.LazyRegister(&xHeaderBarSetShowTitle, "ADW", "adw_header_bar_set_show_title", false) | |
| 370 | - | ||
| 371 | 338 | xHeaderBarSetShowTitle(x.GoPointer(), ShowTitleVar) | |
| 372 | 339 | } | |
| 373 | 340 | ||
| @@ -392,8 +359,6 @@ var xHeaderBarSetTitleWidget func(uintptr, uintptr) | |||
| 392 | 359 | // </object> | |
| 393 | 360 | // ``` | |
| 394 | 361 | func (x *HeaderBar) SetTitleWidget(TitleWidgetVar *gtk.Widget) { | |
| 395 | - | core.LazyRegister(&xHeaderBarSetTitleWidget, "ADW", "adw_header_bar_set_title_widget", false) | |
| 396 | - | ||
| 397 | 362 | xHeaderBarSetTitleWidget(x.GoPointer(), TitleWidgetVar.GoPointer()) | |
| 398 | 363 | } | |
| 399 | 364 | ||
| @@ -812,4 +777,36 @@ func (x *HeaderBar) GetBuildableId() string { | |||
| 812 | 777 | func init() { | |
| 813 | 778 | core.SetPackageName("ADW", "libadwaita-1") | |
| 814 | 779 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | |
| 780 | + | var libs []uintptr | |
| 781 | + | for _, libPath := range core.GetPaths("ADW") { | |
| 782 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 783 | + | if err != nil { | |
| 784 | + | panic(err) | |
| 785 | + | } | |
| 786 | + | libs = append(libs, lib) | |
| 787 | + | } | |
| 788 | + | ||
| 789 | + | core.PuregoSafeRegister(&xCenteringPolicyGLibType, libs, "adw_centering_policy_get_type") | |
| 790 | + | ||
| 791 | + | core.PuregoSafeRegister(&xHeaderBarGLibType, libs, "adw_header_bar_get_type") | |
| 792 | + | ||
| 793 | + | core.PuregoSafeRegister(&xNewHeaderBar, libs, "adw_header_bar_new") | |
| 794 | + | ||
| 795 | + | core.PuregoSafeRegister(&xHeaderBarGetCenteringPolicy, libs, "adw_header_bar_get_centering_policy") | |
| 796 | + | core.PuregoSafeRegister(&xHeaderBarGetDecorationLayout, libs, "adw_header_bar_get_decoration_layout") | |
| 797 | + | core.PuregoSafeRegister(&xHeaderBarGetShowBackButton, libs, "adw_header_bar_get_show_back_button") | |
| 798 | + | core.PuregoSafeRegister(&xHeaderBarGetShowEndTitleButtons, libs, "adw_header_bar_get_show_end_title_buttons") | |
| 799 | + | core.PuregoSafeRegister(&xHeaderBarGetShowStartTitleButtons, libs, "adw_header_bar_get_show_start_title_buttons") | |
| 800 | + | core.PuregoSafeRegister(&xHeaderBarGetShowTitle, libs, "adw_header_bar_get_show_title") | |
| 801 | + | core.PuregoSafeRegister(&xHeaderBarGetTitleWidget, libs, "adw_header_bar_get_title_widget") | |
| 802 | + | core.PuregoSafeRegister(&xHeaderBarPackEnd, libs, "adw_header_bar_pack_end") | |
| 803 | + | core.PuregoSafeRegister(&xHeaderBarPackStart, libs, "adw_header_bar_pack_start") | |
| 804 | + | core.PuregoSafeRegister(&xHeaderBarRemove, libs, "adw_header_bar_remove") | |
| 805 | + | core.PuregoSafeRegister(&xHeaderBarSetCenteringPolicy, libs, "adw_header_bar_set_centering_policy") | |
| 806 | + | core.PuregoSafeRegister(&xHeaderBarSetDecorationLayout, libs, "adw_header_bar_set_decoration_layout") | |
| 807 | + | core.PuregoSafeRegister(&xHeaderBarSetShowBackButton, libs, "adw_header_bar_set_show_back_button") | |
| 808 | + | core.PuregoSafeRegister(&xHeaderBarSetShowEndTitleButtons, libs, "adw_header_bar_set_show_end_title_buttons") | |
| 809 | + | core.PuregoSafeRegister(&xHeaderBarSetShowStartTitleButtons, libs, "adw_header_bar_set_show_start_title_buttons") | |
| 810 | + | core.PuregoSafeRegister(&xHeaderBarSetShowTitle, libs, "adw_header_bar_set_show_title") | |
| 811 | + | core.PuregoSafeRegister(&xHeaderBarSetTitleWidget, libs, "adw_header_bar_set_title_widget") | |
| 815 | 812 | } | |
| @@ -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/gobject" | 10 | "github.com/bnema/puregotk/v4/gobject" | ||
| 10 | "github.com/bnema/puregotk/v4/gobject/types" | 11 | "github.com/bnema/puregotk/v4/gobject/types" | ||
| @@ -35,7 +36,6 @@ type CenteringPolicy int | |||||
| 35 | var xCenteringPolicyGLibType func() types.GType | 36 | var xCenteringPolicyGLibType func() types.GType | ||
| 36 | 37 | ||||
| 37 | func CenteringPolicyGLibType() types.GType { | 38 | func CenteringPolicyGLibType() types.GType { | ||
| 38 | - | core.LazyRegister(&xCenteringPolicyGLibType, "ADW", "adw_centering_policy_get_type", false) | |||
| 39 | return xCenteringPolicyGLibType() | 39 | return xCenteringPolicyGLibType() | ||
| 40 | } | 40 | } | ||
| 41 | 41 | ||||
| @@ -152,7 +152,6 @@ type HeaderBar struct { | |||||
| 152 | var xHeaderBarGLibType func() types.GType | 152 | var xHeaderBarGLibType func() types.GType | ||
| 153 | 153 | ||||
| 154 | func HeaderBarGLibType() types.GType { | 154 | func HeaderBarGLibType() types.GType { | ||
| 155 | - | core.LazyRegister(&xHeaderBarGLibType, "ADW", "adw_header_bar_get_type", false) | |||
| 156 | return xHeaderBarGLibType() | 155 | return xHeaderBarGLibType() | ||
| 157 | } | 156 | } | ||
| 158 | 157 | ||||
| @@ -166,7 +165,6 @@ var xNewHeaderBar func() uintptr | |||||
| 166 | 165 | ||||
| 167 | // Creates a new `AdwHeaderBar`. | 166 | // Creates a new `AdwHeaderBar`. | ||
| 168 | func NewHeaderBar() *HeaderBar { | 167 | func NewHeaderBar() *HeaderBar { | ||
| 169 | - | core.LazyRegister(&xNewHeaderBar, "ADW", "adw_header_bar_new", false) | |||
| 170 | var cls *HeaderBar | 168 | var cls *HeaderBar | ||
| 171 | 169 | ||||
| 172 | cret := xNewHeaderBar() | 170 | cret := xNewHeaderBar() | ||
| @@ -184,8 +182,6 @@ var xHeaderBarGetCenteringPolicy func(uintptr) CenteringPolicy | |||||
| 184 | 182 | ||||
| 185 | // Gets the policy for aligning the center widget. | 183 | // Gets the policy for aligning the center widget. | ||
| 186 | func (x *HeaderBar) GetCenteringPolicy() CenteringPolicy { | 184 | func (x *HeaderBar) GetCenteringPolicy() CenteringPolicy { | ||
| 187 | - | core.LazyRegister(&xHeaderBarGetCenteringPolicy, "ADW", "adw_header_bar_get_centering_policy", false) | |||
| 188 | - | ||||
| 189 | cret := xHeaderBarGetCenteringPolicy(x.GoPointer()) | 185 | cret := xHeaderBarGetCenteringPolicy(x.GoPointer()) | ||
| 190 | return cret | 186 | return cret | ||
| 191 | } | 187 | } | ||
| @@ -194,8 +190,6 @@ var xHeaderBarGetDecorationLayout func(uintptr) string | |||||
| 194 | 190 | ||||
| 195 | // Gets the decoration layout for @self. | 191 | // Gets the decoration layout for @self. | ||
| 196 | func (x *HeaderBar) GetDecorationLayout() string { | 192 | func (x *HeaderBar) GetDecorationLayout() string { | ||
| 197 | - | core.LazyRegister(&xHeaderBarGetDecorationLayout, "ADW", "adw_header_bar_get_decoration_layout", false) | |||
| 198 | - | ||||
| 199 | cret := xHeaderBarGetDecorationLayout(x.GoPointer()) | 193 | cret := xHeaderBarGetDecorationLayout(x.GoPointer()) | ||
| 200 | return cret | 194 | return cret | ||
| 201 | } | 195 | } | ||
| @@ -204,8 +198,6 @@ var xHeaderBarGetShowBackButton func(uintptr) bool | |||||
| 204 | 198 | ||||
| 205 | // Gets whether @self can show the back button. | 199 | // Gets whether @self can show the back button. | ||
| 206 | func (x *HeaderBar) GetShowBackButton() bool { | 200 | func (x *HeaderBar) GetShowBackButton() bool { | ||
| 207 | - | core.LazyRegister(&xHeaderBarGetShowBackButton, "ADW", "adw_header_bar_get_show_back_button", false) | |||
| 208 | - | ||||
| 209 | cret := xHeaderBarGetShowBackButton(x.GoPointer()) | 201 | cret := xHeaderBarGetShowBackButton(x.GoPointer()) | ||
| 210 | return cret | 202 | return cret | ||
| 211 | } | 203 | } | ||
| @@ -214,8 +206,6 @@ var xHeaderBarGetShowEndTitleButtons func(uintptr) bool | |||||
| 214 | 206 | ||||
| 215 | // Gets whether to show title buttons at the end of @self. | 207 | // Gets whether to show title buttons at the end of @self. | ||
| 216 | func (x *HeaderBar) GetShowEndTitleButtons() bool { | 208 | func (x *HeaderBar) GetShowEndTitleButtons() bool { | ||
| 217 | - | core.LazyRegister(&xHeaderBarGetShowEndTitleButtons, "ADW", "adw_header_bar_get_show_end_title_buttons", false) | |||
| 218 | - | ||||
| 219 | cret := xHeaderBarGetShowEndTitleButtons(x.GoPointer()) | 209 | cret := xHeaderBarGetShowEndTitleButtons(x.GoPointer()) | ||
| 220 | return cret | 210 | return cret | ||
| 221 | } | 211 | } | ||
| @@ -224,8 +214,6 @@ var xHeaderBarGetShowStartTitleButtons func(uintptr) bool | |||||
| 224 | 214 | ||||
| 225 | // Gets whether to show title buttons at the start of @self. | 215 | // Gets whether to show title buttons at the start of @self. | ||
| 226 | func (x *HeaderBar) GetShowStartTitleButtons() bool { | 216 | func (x *HeaderBar) GetShowStartTitleButtons() bool { | ||
| 227 | - | core.LazyRegister(&xHeaderBarGetShowStartTitleButtons, "ADW", "adw_header_bar_get_show_start_title_buttons", false) | |||
| 228 | - | ||||
| 229 | cret := xHeaderBarGetShowStartTitleButtons(x.GoPointer()) | 217 | cret := xHeaderBarGetShowStartTitleButtons(x.GoPointer()) | ||
| 230 | return cret | 218 | return cret | ||
| 231 | } | 219 | } | ||
| @@ -234,8 +222,6 @@ var xHeaderBarGetShowTitle func(uintptr) bool | |||||
| 234 | 222 | ||||
| 235 | // Gets whether the title widget should be shown. | 223 | // Gets whether the title widget should be shown. | ||
| 236 | func (x *HeaderBar) GetShowTitle() bool { | 224 | func (x *HeaderBar) GetShowTitle() bool { | ||
| 237 | - | core.LazyRegister(&xHeaderBarGetShowTitle, "ADW", "adw_header_bar_get_show_title", false) | |||
| 238 | - | ||||
| 239 | cret := xHeaderBarGetShowTitle(x.GoPointer()) | 225 | cret := xHeaderBarGetShowTitle(x.GoPointer()) | ||
| 240 | return cret | 226 | return cret | ||
| 241 | } | 227 | } | ||
| @@ -244,7 +230,6 @@ var xHeaderBarGetTitleWidget func(uintptr) uintptr | |||||
| 244 | 230 | ||||
| 245 | // Gets the title widget widget of @self. | 231 | // Gets the title widget widget of @self. | ||
| 246 | func (x *HeaderBar) GetTitleWidget() *gtk.Widget { | 232 | func (x *HeaderBar) GetTitleWidget() *gtk.Widget { | ||
| 247 | - | core.LazyRegister(&xHeaderBarGetTitleWidget, "ADW", "adw_header_bar_get_title_widget", false) | |||
| 248 | var cls *gtk.Widget | 233 | var cls *gtk.Widget | ||
| 249 | 234 | ||||
| 250 | cret := xHeaderBarGetTitleWidget(x.GoPointer()) | 235 | cret := xHeaderBarGetTitleWidget(x.GoPointer()) | ||
| @@ -262,8 +247,6 @@ var xHeaderBarPackEnd func(uintptr, uintptr) | |||||
| 262 | 247 | ||||
| 263 | // Adds @child to @self, packed with reference to the end of @self. | 248 | // Adds @child to @self, packed with reference to the end of @self. | ||
| 264 | func (x *HeaderBar) PackEnd(ChildVar *gtk.Widget) { | 249 | func (x *HeaderBar) PackEnd(ChildVar *gtk.Widget) { | ||
| 265 | - | core.LazyRegister(&xHeaderBarPackEnd, "ADW", "adw_header_bar_pack_end", false) | |||
| 266 | - | ||||
| 267 | xHeaderBarPackEnd(x.GoPointer(), ChildVar.GoPointer()) | 250 | xHeaderBarPackEnd(x.GoPointer(), ChildVar.GoPointer()) | ||
| 268 | } | 251 | } | ||
| 269 | 252 | ||||
| @@ -271,8 +254,6 @@ var xHeaderBarPackStart func(uintptr, uintptr) | |||||
| 271 | 254 | ||||
| 272 | // Adds @child to @self, packed with reference to the start of the @self. | 255 | // Adds @child to @self, packed with reference to the start of the @self. | ||
| 273 | func (x *HeaderBar) PackStart(ChildVar *gtk.Widget) { | 256 | func (x *HeaderBar) PackStart(ChildVar *gtk.Widget) { | ||
| 274 | - | core.LazyRegister(&xHeaderBarPackStart, "ADW", "adw_header_bar_pack_start", false) | |||
| 275 | - | ||||
| 276 | xHeaderBarPackStart(x.GoPointer(), ChildVar.GoPointer()) | 257 | xHeaderBarPackStart(x.GoPointer(), ChildVar.GoPointer()) | ||
| 277 | } | 258 | } | ||
| 278 | 259 | ||||
| @@ -283,8 +264,6 @@ var xHeaderBarRemove func(uintptr, uintptr) | |||||
| 283 | // The child must have been added with [method@HeaderBar.pack_start], | 264 | // The child must have been added with [method@HeaderBar.pack_start], | ||
| 284 | // [method@HeaderBar.pack_end] or [property@HeaderBar:title-widget]. | 265 | // [method@HeaderBar.pack_end] or [property@HeaderBar:title-widget]. | ||
| 285 | func (x *HeaderBar) Remove(ChildVar *gtk.Widget) { | 266 | func (x *HeaderBar) Remove(ChildVar *gtk.Widget) { | ||
| 286 | - | core.LazyRegister(&xHeaderBarRemove, "ADW", "adw_header_bar_remove", false) | |||
| 287 | - | ||||
| 288 | xHeaderBarRemove(x.GoPointer(), ChildVar.GoPointer()) | 267 | xHeaderBarRemove(x.GoPointer(), ChildVar.GoPointer()) | ||
| 289 | } | 268 | } | ||
| 290 | 269 | ||||
| @@ -292,8 +271,6 @@ var xHeaderBarSetCenteringPolicy func(uintptr, CenteringPolicy) | |||||
| 292 | 271 | ||||
| 293 | // Sets the policy for aligning the center widget. | 272 | // Sets the policy for aligning the center widget. | ||
| 294 | func (x *HeaderBar) SetCenteringPolicy(CenteringPolicyVar CenteringPolicy) { | 273 | func (x *HeaderBar) SetCenteringPolicy(CenteringPolicyVar CenteringPolicy) { | ||
| 295 | - | core.LazyRegister(&xHeaderBarSetCenteringPolicy, "ADW", "adw_header_bar_set_centering_policy", false) | |||
| 296 | - | ||||
| 297 | xHeaderBarSetCenteringPolicy(x.GoPointer(), CenteringPolicyVar) | 274 | xHeaderBarSetCenteringPolicy(x.GoPointer(), CenteringPolicyVar) | ||
| 298 | } | 275 | } | ||
| 299 | 276 | ||||
| @@ -312,8 +289,6 @@ var xHeaderBarSetDecorationLayout func(uintptr, uintptr) | |||||
| 312 | // For example, “icon:minimize,maximize,close” specifies an icon at the start, | 289 | // For example, “icon:minimize,maximize,close” specifies an icon at the start, | ||
| 313 | // and minimize, maximize and close buttons at the end. | 290 | // and minimize, maximize and close buttons at the end. | ||
| 314 | func (x *HeaderBar) SetDecorationLayout(LayoutVar *string) { | 291 | func (x *HeaderBar) SetDecorationLayout(LayoutVar *string) { | ||
| 315 | - | core.LazyRegister(&xHeaderBarSetDecorationLayout, "ADW", "adw_header_bar_set_decoration_layout", false) | |||
| 316 | - | ||||
| 317 | LayoutVarPtr := core.GStrdupNullable(LayoutVar) | 292 | LayoutVarPtr := core.GStrdupNullable(LayoutVar) | ||
| 318 | defer core.GFreeNullable(LayoutVarPtr) | 293 | defer core.GFreeNullable(LayoutVarPtr) | ||
| 319 | 294 | ||||
| @@ -327,8 +302,6 @@ var xHeaderBarSetShowBackButton func(uintptr, bool) | |||||
| 327 | // The back button will never be shown unless the header bar is placed inside an | 302 | // The back button will never be shown unless the header bar is placed inside an | ||
| 328 | // [class@NavigationView]. Usually, there is no reason to set it to `FALSE`. | 303 | // [class@NavigationView]. Usually, there is no reason to set it to `FALSE`. | ||
| 329 | func (x *HeaderBar) SetShowBackButton(ShowBackButtonVar bool) { | 304 | func (x *HeaderBar) SetShowBackButton(ShowBackButtonVar bool) { | ||
| 330 | - | core.LazyRegister(&xHeaderBarSetShowBackButton, "ADW", "adw_header_bar_set_show_back_button", false) | |||
| 331 | - | ||||
| 332 | xHeaderBarSetShowBackButton(x.GoPointer(), ShowBackButtonVar) | 305 | xHeaderBarSetShowBackButton(x.GoPointer(), ShowBackButtonVar) | ||
| 333 | } | 306 | } | ||
| 334 | 307 | ||||
| @@ -342,8 +315,6 @@ var xHeaderBarSetShowEndTitleButtons func(uintptr, bool) | |||||
| 342 | // [property@HeaderBar:decoration-layout] property, and by the state of the | 315 | // [property@HeaderBar:decoration-layout] property, and by the state of the | ||
| 343 | // window (e.g. a close button will not be shown if the window can't be closed). | 316 | // window (e.g. a close button will not be shown if the window can't be closed). | ||
| 344 | func (x *HeaderBar) SetShowEndTitleButtons(SettingVar bool) { | 317 | func (x *HeaderBar) SetShowEndTitleButtons(SettingVar bool) { | ||
| 345 | - | core.LazyRegister(&xHeaderBarSetShowEndTitleButtons, "ADW", "adw_header_bar_set_show_end_title_buttons", false) | |||
| 346 | - | ||||
| 347 | xHeaderBarSetShowEndTitleButtons(x.GoPointer(), SettingVar) | 318 | xHeaderBarSetShowEndTitleButtons(x.GoPointer(), SettingVar) | ||
| 348 | } | 319 | } | ||
| 349 | 320 | ||||
| @@ -357,8 +328,6 @@ var xHeaderBarSetShowStartTitleButtons func(uintptr, bool) | |||||
| 357 | // [property@HeaderBar:decoration-layout] property, and by the state of the | 328 | // [property@HeaderBar:decoration-layout] property, and by the state of the | ||
| 358 | // window (e.g. a close button will not be shown if the window can't be closed). | 329 | // window (e.g. a close button will not be shown if the window can't be closed). | ||
| 359 | func (x *HeaderBar) SetShowStartTitleButtons(SettingVar bool) { | 330 | func (x *HeaderBar) SetShowStartTitleButtons(SettingVar bool) { | ||
| 360 | - | core.LazyRegister(&xHeaderBarSetShowStartTitleButtons, "ADW", "adw_header_bar_set_show_start_title_buttons", false) | |||
| 361 | - | ||||
| 362 | xHeaderBarSetShowStartTitleButtons(x.GoPointer(), SettingVar) | 331 | xHeaderBarSetShowStartTitleButtons(x.GoPointer(), SettingVar) | ||
| 363 | } | 332 | } | ||
| 364 | 333 | ||||
| @@ -366,8 +335,6 @@ var xHeaderBarSetShowTitle func(uintptr, bool) | |||||
| 366 | 335 | ||||
| 367 | // Sets whether the title widget should be shown. | 336 | // Sets whether the title widget should be shown. | ||
| 368 | func (x *HeaderBar) SetShowTitle(ShowTitleVar bool) { | 337 | func (x *HeaderBar) SetShowTitle(ShowTitleVar bool) { | ||
| 369 | - | core.LazyRegister(&xHeaderBarSetShowTitle, "ADW", "adw_header_bar_set_show_title", false) | |||
| 370 | - | ||||
| 371 | xHeaderBarSetShowTitle(x.GoPointer(), ShowTitleVar) | 338 | xHeaderBarSetShowTitle(x.GoPointer(), ShowTitleVar) | ||
| 372 | } | 339 | } | ||
| 373 | 340 | ||||
| @@ -392,8 +359,6 @@ var xHeaderBarSetTitleWidget func(uintptr, uintptr) | |||||
| 392 | // </object> | 359 | // </object> | ||
| 393 | // ``` | 360 | // ``` | ||
| 394 | func (x *HeaderBar) SetTitleWidget(TitleWidgetVar *gtk.Widget) { | 361 | func (x *HeaderBar) SetTitleWidget(TitleWidgetVar *gtk.Widget) { | ||
| 395 | - | core.LazyRegister(&xHeaderBarSetTitleWidget, "ADW", "adw_header_bar_set_title_widget", false) | |||
| 396 | - | ||||
| 397 | xHeaderBarSetTitleWidget(x.GoPointer(), TitleWidgetVar.GoPointer()) | 362 | xHeaderBarSetTitleWidget(x.GoPointer(), TitleWidgetVar.GoPointer()) | ||
| 398 | } | 363 | } | ||
| 399 | 364 | ||||
| @@ -812,4 +777,36 @@ func (x *HeaderBar) GetBuildableId() string { | |||||
| 812 | func init() { | 777 | func init() { | ||
| 813 | core.SetPackageName("ADW", "libadwaita-1") | 778 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 814 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 779 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | ||
| 780 | + | var libs []uintptr | |||
| 781 | + | for _, libPath := range core.GetPaths("ADW") { | |||
| 782 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 783 | + | if err != nil { | |||
| 784 | + | panic(err) | |||
| 785 | + | } | |||
| 786 | + | libs = append(libs, lib) | |||
| 787 | + | } | |||
| 788 | + | ||||
| 789 | + | core.PuregoSafeRegister(&xCenteringPolicyGLibType, libs, "adw_centering_policy_get_type") | |||
| 790 | + | ||||
| 791 | + | core.PuregoSafeRegister(&xHeaderBarGLibType, libs, "adw_header_bar_get_type") | |||
| 792 | + | ||||
| 793 | + | core.PuregoSafeRegister(&xNewHeaderBar, libs, "adw_header_bar_new") | |||
| 794 | + | ||||
| 795 | + | core.PuregoSafeRegister(&xHeaderBarGetCenteringPolicy, libs, "adw_header_bar_get_centering_policy") | |||
| 796 | + | core.PuregoSafeRegister(&xHeaderBarGetDecorationLayout, libs, "adw_header_bar_get_decoration_layout") | |||
| 797 | + | core.PuregoSafeRegister(&xHeaderBarGetShowBackButton, libs, "adw_header_bar_get_show_back_button") | |||
| 798 | + | core.PuregoSafeRegister(&xHeaderBarGetShowEndTitleButtons, libs, "adw_header_bar_get_show_end_title_buttons") | |||
| 799 | + | core.PuregoSafeRegister(&xHeaderBarGetShowStartTitleButtons, libs, "adw_header_bar_get_show_start_title_buttons") | |||
| 800 | + | core.PuregoSafeRegister(&xHeaderBarGetShowTitle, libs, "adw_header_bar_get_show_title") | |||
| 801 | + | core.PuregoSafeRegister(&xHeaderBarGetTitleWidget, libs, "adw_header_bar_get_title_widget") | |||
| 802 | + | core.PuregoSafeRegister(&xHeaderBarPackEnd, libs, "adw_header_bar_pack_end") | |||
| 803 | + | core.PuregoSafeRegister(&xHeaderBarPackStart, libs, "adw_header_bar_pack_start") | |||
| 804 | + | core.PuregoSafeRegister(&xHeaderBarRemove, libs, "adw_header_bar_remove") | |||
| 805 | + | core.PuregoSafeRegister(&xHeaderBarSetCenteringPolicy, libs, "adw_header_bar_set_centering_policy") | |||
| 806 | + | core.PuregoSafeRegister(&xHeaderBarSetDecorationLayout, libs, "adw_header_bar_set_decoration_layout") | |||
| 807 | + | core.PuregoSafeRegister(&xHeaderBarSetShowBackButton, libs, "adw_header_bar_set_show_back_button") | |||
| 808 | + | core.PuregoSafeRegister(&xHeaderBarSetShowEndTitleButtons, libs, "adw_header_bar_set_show_end_title_buttons") | |||
| 809 | + | core.PuregoSafeRegister(&xHeaderBarSetShowStartTitleButtons, libs, "adw_header_bar_set_show_start_title_buttons") | |||
| 810 | + | core.PuregoSafeRegister(&xHeaderBarSetShowTitle, libs, "adw_header_bar_set_show_title") | |||
| 811 | + | core.PuregoSafeRegister(&xHeaderBarSetTitleWidget, libs, "adw_header_bar_set_title_widget") | |||
| 815 | } | 812 | } | ||