Merge pull request #350 from bnema/fix/repin-fixed-puregotk
fix(deps): validate puregotk lazy registration fix
907 files · +27874 -25296
M go.mod +3 -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.0 | |
| 14 | + | github.com/bnema/puregotk v0.7.1-0.20260714200603-7370c78950ef | |
| 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 | |
| @@ -47,6 +47,7 @@ require ( | |||
| 47 | 47 | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect | |
| 48 | 48 | github.com/fatih/color v1.19.0 // indirect | |
| 49 | 49 | github.com/go-viper/mapstructure/v2 v2.5.0 // indirect | |
| 50 | + | github.com/google/go-cmp v0.7.0 // indirect | |
| 50 | 51 | github.com/inconshreveable/mousetrap v1.1.0 // indirect | |
| 51 | 52 | github.com/lucasb-eyer/go-colorful v1.4.0 // indirect | |
| 52 | 53 | github.com/mattn/go-colorable v0.1.14 // indirect | |
| @@ -80,6 +81,7 @@ require ( | |||
| 80 | 81 | golang.org/x/text v0.40.0 // indirect | |
| 81 | 82 | golang.org/x/tools v0.47.0 // indirect | |
| 82 | 83 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | |
| 84 | + | mvdan.cc/gofumpt v0.9.2 // indirect | |
| 83 | 85 | ) | |
| 84 | 86 | ||
| 85 | 87 | tool github.com/a-h/templ/cmd/templ | |
| @@ -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.0 | 14 | + | github.com/bnema/puregotk v0.7.1-0.20260714200603-7370c78950ef |
| 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 | ||
| @@ -47,6 +47,7 @@ require ( | |||||
| 47 | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect | 47 | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect | ||
| 48 | github.com/fatih/color v1.19.0 // indirect | 48 | github.com/fatih/color v1.19.0 // indirect | ||
| 49 | github.com/go-viper/mapstructure/v2 v2.5.0 // indirect | 49 | github.com/go-viper/mapstructure/v2 v2.5.0 // indirect | ||
| 50 | + | github.com/google/go-cmp v0.7.0 // indirect | |||
| 50 | github.com/inconshreveable/mousetrap v1.1.0 // indirect | 51 | github.com/inconshreveable/mousetrap v1.1.0 // indirect | ||
| 51 | github.com/lucasb-eyer/go-colorful v1.4.0 // indirect | 52 | github.com/lucasb-eyer/go-colorful v1.4.0 // indirect | ||
| 52 | github.com/mattn/go-colorable v0.1.14 // indirect | 53 | github.com/mattn/go-colorable v0.1.14 // indirect | ||
| @@ -80,6 +81,7 @@ require ( | |||||
| 80 | golang.org/x/text v0.40.0 // indirect | 81 | golang.org/x/text v0.40.0 // indirect | ||
| 81 | golang.org/x/tools v0.47.0 // indirect | 82 | golang.org/x/tools v0.47.0 // indirect | ||
| 82 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | 83 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | ||
| 84 | + | mvdan.cc/gofumpt v0.9.2 // indirect | |||
| 83 | ) | 85 | ) | ||
| 84 | 86 | ||||
| 85 | tool github.com/a-h/templ/cmd/templ | 87 | tool github.com/a-h/templ/cmd/templ | ||
M go.sum +4 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/internal/core/core.go +197 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/pkg/core/core.go +10 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-dialog.go +99 -64 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-window.go +95 -62 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-accent-color.go +7 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-action-row.go +33 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-alert-dialog.go +66 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-target.go +10 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-util.go +4 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation.go +24 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application-window.go +14 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application.go +3 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-avatar.go +22 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-banner.go +23 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bin.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bottom-sheet.go +47 -38
| @@ -5,7 +5,6 @@ import ( | |||
| 5 | 5 | "structs" | |
| 6 | 6 | "unsafe" | |
| 7 | 7 | ||
| 8 | - | "github.com/bnema/purego" | |
| 9 | 8 | "github.com/bnema/puregotk/pkg/core" | |
| 10 | 9 | "github.com/bnema/puregotk/v4/gdk" | |
| 11 | 10 | "github.com/bnema/puregotk/v4/glib" | |
| @@ -113,6 +112,7 @@ type BottomSheet struct { | |||
| 113 | 112 | var xBottomSheetGLibType func() types.GType | |
| 114 | 113 | ||
| 115 | 114 | func BottomSheetGLibType() types.GType { | |
| 115 | + | core.LazyRegister(&xBottomSheetGLibType, "ADW", "adw_bottom_sheet_get_type", false) | |
| 116 | 116 | return xBottomSheetGLibType() | |
| 117 | 117 | } | |
| 118 | 118 | ||
| @@ -126,6 +126,7 @@ var xNewBottomSheet func() uintptr | |||
| 126 | 126 | ||
| 127 | 127 | // Creates a new `AdwBottomSheet`. | |
| 128 | 128 | func NewBottomSheet() *BottomSheet { | |
| 129 | + | core.LazyRegister(&xNewBottomSheet, "ADW", "adw_bottom_sheet_new", false) | |
| 129 | 130 | var cls *BottomSheet | |
| 130 | 131 | ||
| 131 | 132 | cret := xNewBottomSheet() | |
| @@ -143,6 +144,8 @@ var xBottomSheetGetAlign func(uintptr) float32 | |||
| 143 | 144 | ||
| 144 | 145 | // Gets horizontal alignment of the bottom sheet. | |
| 145 | 146 | func (x *BottomSheet) GetAlign() float32 { | |
| 147 | + | core.LazyRegister(&xBottomSheetGetAlign, "ADW", "adw_bottom_sheet_get_align", false) | |
| 148 | + | ||
| 146 | 149 | cret := xBottomSheetGetAlign(x.GoPointer()) | |
| 147 | 150 | return cret | |
| 148 | 151 | } | |
| @@ -151,6 +154,7 @@ var xBottomSheetGetBottomBar func(uintptr) uintptr | |||
| 151 | 154 | ||
| 152 | 155 | // Gets the bottom bar widget for @self. | |
| 153 | 156 | func (x *BottomSheet) GetBottomBar() *gtk.Widget { | |
| 157 | + | core.LazyRegister(&xBottomSheetGetBottomBar, "ADW", "adw_bottom_sheet_get_bottom_bar", false) | |
| 154 | 158 | var cls *gtk.Widget | |
| 155 | 159 | ||
| 156 | 160 | cret := xBottomSheetGetBottomBar(x.GoPointer()) | |
| @@ -171,6 +175,8 @@ var xBottomSheetGetBottomBarHeight func(uintptr) int | |||
| 171 | 175 | // It can be used to shift the content upwards permanently to accommodate for | |
| 172 | 176 | // the bottom bar. | |
| 173 | 177 | func (x *BottomSheet) GetBottomBarHeight() int { | |
| 178 | + | core.LazyRegister(&xBottomSheetGetBottomBarHeight, "ADW", "adw_bottom_sheet_get_bottom_bar_height", false) | |
| 179 | + | ||
| 174 | 180 | cret := xBottomSheetGetBottomBarHeight(x.GoPointer()) | |
| 175 | 181 | return cret | |
| 176 | 182 | } | |
| @@ -179,6 +185,8 @@ var xBottomSheetGetCanClose func(uintptr) bool | |||
| 179 | 185 | ||
| 180 | 186 | // Gets whether the bottom sheet can be closed by user. | |
| 181 | 187 | func (x *BottomSheet) GetCanClose() bool { | |
| 188 | + | core.LazyRegister(&xBottomSheetGetCanClose, "ADW", "adw_bottom_sheet_get_can_close", false) | |
| 189 | + | ||
| 182 | 190 | cret := xBottomSheetGetCanClose(x.GoPointer()) | |
| 183 | 191 | return cret | |
| 184 | 192 | } | |
| @@ -187,6 +195,8 @@ var xBottomSheetGetCanOpen func(uintptr) bool | |||
| 187 | 195 | ||
| 188 | 196 | // Gets whether the bottom sheet can be opened by user. | |
| 189 | 197 | func (x *BottomSheet) GetCanOpen() bool { | |
| 198 | + | core.LazyRegister(&xBottomSheetGetCanOpen, "ADW", "adw_bottom_sheet_get_can_open", false) | |
| 199 | + | ||
| 190 | 200 | cret := xBottomSheetGetCanOpen(x.GoPointer()) | |
| 191 | 201 | return cret | |
| 192 | 202 | } | |
| @@ -195,6 +205,7 @@ var xBottomSheetGetContent func(uintptr) uintptr | |||
| 195 | 205 | ||
| 196 | 206 | // Gets the content widget for @self. | |
| 197 | 207 | func (x *BottomSheet) GetContent() *gtk.Widget { | |
| 208 | + | core.LazyRegister(&xBottomSheetGetContent, "ADW", "adw_bottom_sheet_get_content", false) | |
| 198 | 209 | var cls *gtk.Widget | |
| 199 | 210 | ||
| 200 | 211 | cret := xBottomSheetGetContent(x.GoPointer()) | |
| @@ -212,6 +223,8 @@ var xBottomSheetGetFullWidth func(uintptr) bool | |||
| 212 | 223 | ||
| 213 | 224 | // Gets whether the bottom sheet takes the full width. | |
| 214 | 225 | func (x *BottomSheet) GetFullWidth() bool { | |
| 226 | + | core.LazyRegister(&xBottomSheetGetFullWidth, "ADW", "adw_bottom_sheet_get_full_width", false) | |
| 227 | + | ||
| 215 | 228 | cret := xBottomSheetGetFullWidth(x.GoPointer()) | |
| 216 | 229 | return cret | |
| 217 | 230 | } | |
| @@ -220,6 +233,8 @@ var xBottomSheetGetModal func(uintptr) bool | |||
| 220 | 233 | ||
| 221 | 234 | // Gets whether the bottom sheet is modal. | |
| 222 | 235 | func (x *BottomSheet) GetModal() bool { | |
| 236 | + | core.LazyRegister(&xBottomSheetGetModal, "ADW", "adw_bottom_sheet_get_modal", false) | |
| 237 | + | ||
| 223 | 238 | cret := xBottomSheetGetModal(x.GoPointer()) | |
| 224 | 239 | return cret | |
| 225 | 240 | } | |
| @@ -228,6 +243,8 @@ var xBottomSheetGetOpen func(uintptr) bool | |||
| 228 | 243 | ||
| 229 | 244 | // Gets whether the bottom sheet is open. | |
| 230 | 245 | func (x *BottomSheet) GetOpen() bool { | |
| 246 | + | core.LazyRegister(&xBottomSheetGetOpen, "ADW", "adw_bottom_sheet_get_open", false) | |
| 247 | + | ||
| 231 | 248 | cret := xBottomSheetGetOpen(x.GoPointer()) | |
| 232 | 249 | return cret | |
| 233 | 250 | } | |
| @@ -236,6 +253,8 @@ var xBottomSheetGetRevealBottomBar func(uintptr) bool | |||
| 236 | 253 | ||
| 237 | 254 | // Gets whether the bottom bar is revealed. | |
| 238 | 255 | func (x *BottomSheet) GetRevealBottomBar() bool { | |
| 256 | + | core.LazyRegister(&xBottomSheetGetRevealBottomBar, "ADW", "adw_bottom_sheet_get_reveal_bottom_bar", false) | |
| 257 | + | ||
| 239 | 258 | cret := xBottomSheetGetRevealBottomBar(x.GoPointer()) | |
| 240 | 259 | return cret | |
| 241 | 260 | } | |
| @@ -244,6 +263,7 @@ var xBottomSheetGetSheet func(uintptr) uintptr | |||
| 244 | 263 | ||
| 245 | 264 | // Gets the bottom sheet widget for @self. | |
| 246 | 265 | func (x *BottomSheet) GetSheet() *gtk.Widget { | |
| 266 | + | core.LazyRegister(&xBottomSheetGetSheet, "ADW", "adw_bottom_sheet_get_sheet", false) | |
| 247 | 267 | var cls *gtk.Widget | |
| 248 | 268 | ||
| 249 | 269 | cret := xBottomSheetGetSheet(x.GoPointer()) | |
| @@ -263,6 +283,8 @@ var xBottomSheetGetSheetHeight func(uintptr) int | |||
| 263 | 283 | // | |
| 264 | 284 | // It can be used to shift the content upwards when the bottom sheet is open. | |
| 265 | 285 | func (x *BottomSheet) GetSheetHeight() int { | |
| 286 | + | core.LazyRegister(&xBottomSheetGetSheetHeight, "ADW", "adw_bottom_sheet_get_sheet_height", false) | |
| 287 | + | ||
| 266 | 288 | cret := xBottomSheetGetSheetHeight(x.GoPointer()) | |
| 267 | 289 | return cret | |
| 268 | 290 | } | |
| @@ -271,6 +293,8 @@ var xBottomSheetGetShowDragHandle func(uintptr) bool | |||
| 271 | 293 | ||
| 272 | 294 | // Gets whether to show a drag handle in the bottom sheet. | |
| 273 | 295 | func (x *BottomSheet) GetShowDragHandle() bool { | |
| 296 | + | core.LazyRegister(&xBottomSheetGetShowDragHandle, "ADW", "adw_bottom_sheet_get_show_drag_handle", false) | |
| 297 | + | ||
| 274 | 298 | cret := xBottomSheetGetShowDragHandle(x.GoPointer()) | |
| 275 | 299 | return cret | |
| 276 | 300 | } | |
| @@ -284,6 +308,8 @@ var xBottomSheetSetAlign func(uintptr, float32) | |||
| 284 | 308 | // | |
| 285 | 309 | // Only used when [property@BottomSheet:full-width] is set to `FALSE`. | |
| 286 | 310 | func (x *BottomSheet) SetAlign(AlignVar float32) { | |
| 311 | + | core.LazyRegister(&xBottomSheetSetAlign, "ADW", "adw_bottom_sheet_set_align", false) | |
| 312 | + | ||
| 287 | 313 | xBottomSheetSetAlign(x.GoPointer(), AlignVar) | |
| 288 | 314 | } | |
| 289 | 315 | ||
| @@ -297,6 +323,8 @@ var xBottomSheetSetBottomBar func(uintptr, uintptr) | |||
| 297 | 323 | // Bottom bar can be temporarily hidden using the | |
| 298 | 324 | // [property@BottomSheet:reveal-bottom-bar] property. | |
| 299 | 325 | func (x *BottomSheet) SetBottomBar(BottomBarVar *gtk.Widget) { | |
| 326 | + | core.LazyRegister(&xBottomSheetSetBottomBar, "ADW", "adw_bottom_sheet_set_bottom_bar", false) | |
| 327 | + | ||
| 300 | 328 | xBottomSheetSetBottomBar(x.GoPointer(), BottomBarVar.GoPointer()) | |
| 301 | 329 | } | |
| 302 | 330 | ||
| @@ -309,6 +337,8 @@ var xBottomSheetSetCanClose func(uintptr, bool) | |||
| 309 | 337 | // | |
| 310 | 338 | // Bottom sheet can still be closed using [property@BottomSheet:open]. | |
| 311 | 339 | func (x *BottomSheet) SetCanClose(CanCloseVar bool) { | |
| 340 | + | core.LazyRegister(&xBottomSheetSetCanClose, "ADW", "adw_bottom_sheet_set_can_close", false) | |
| 341 | + | ||
| 312 | 342 | xBottomSheetSetCanClose(x.GoPointer(), CanCloseVar) | |
| 313 | 343 | } | |
| 314 | 344 | ||
| @@ -322,6 +352,8 @@ var xBottomSheetSetCanOpen func(uintptr, bool) | |||
| 322 | 352 | // | |
| 323 | 353 | // Bottom sheet can still be opened using [property@BottomSheet:open]. | |
| 324 | 354 | func (x *BottomSheet) SetCanOpen(CanOpenVar bool) { | |
| 355 | + | core.LazyRegister(&xBottomSheetSetCanOpen, "ADW", "adw_bottom_sheet_set_can_open", false) | |
| 356 | + | ||
| 325 | 357 | xBottomSheetSetCanOpen(x.GoPointer(), CanOpenVar) | |
| 326 | 358 | } | |
| 327 | 359 | ||
| @@ -331,6 +363,8 @@ var xBottomSheetSetContent func(uintptr, uintptr) | |||
| 331 | 363 | // | |
| 332 | 364 | // It's always shown, and the bottom sheet is overlaid over it. | |
| 333 | 365 | func (x *BottomSheet) SetContent(ContentVar *gtk.Widget) { | |
| 366 | + | core.LazyRegister(&xBottomSheetSetContent, "ADW", "adw_bottom_sheet_set_content", false) | |
| 367 | + | ||
| 334 | 368 | xBottomSheetSetContent(x.GoPointer(), ContentVar.GoPointer()) | |
| 335 | 369 | } | |
| 336 | 370 | ||
| @@ -340,6 +374,8 @@ var xBottomSheetSetFullWidth func(uintptr, bool) | |||
| 340 | 374 | // | |
| 341 | 375 | // When full width, [property@BottomSheet:align] is ignored. | |
| 342 | 376 | func (x *BottomSheet) SetFullWidth(FullWidthVar bool) { | |
| 377 | + | core.LazyRegister(&xBottomSheetSetFullWidth, "ADW", "adw_bottom_sheet_set_full_width", false) | |
| 378 | + | ||
| 343 | 379 | xBottomSheetSetFullWidth(x.GoPointer(), FullWidthVar) | |
| 344 | 380 | } | |
| 345 | 381 | ||
| @@ -353,6 +389,8 @@ var xBottomSheetSetModal func(uintptr, bool) | |||
| 353 | 389 | // | |
| 354 | 390 | // Otherwise, the content is accessible even when the bottom sheet is open. | |
| 355 | 391 | func (x *BottomSheet) SetModal(ModalVar bool) { | |
| 392 | + | core.LazyRegister(&xBottomSheetSetModal, "ADW", "adw_bottom_sheet_set_modal", false) | |
| 393 | + | ||
| 356 | 394 | xBottomSheetSetModal(x.GoPointer(), ModalVar) | |
| 357 | 395 | } | |
| 358 | 396 | ||
| @@ -360,6 +398,8 @@ var xBottomSheetSetOpen func(uintptr, bool) | |||
| 360 | 398 | ||
| 361 | 399 | // Sets whether the bottom sheet is open. | |
| 362 | 400 | func (x *BottomSheet) SetOpen(OpenVar bool) { | |
| 401 | + | core.LazyRegister(&xBottomSheetSetOpen, "ADW", "adw_bottom_sheet_set_open", false) | |
| 402 | + | ||
| 363 | 403 | xBottomSheetSetOpen(x.GoPointer(), OpenVar) | |
| 364 | 404 | } | |
| 365 | 405 | ||
| @@ -372,6 +412,8 @@ var xBottomSheetSetRevealBottomBar func(uintptr, bool) | |||
| 372 | 412 | // See [property@BottomSheet:bottom-bar] and | |
| 373 | 413 | // [property@BottomSheet:bottom-bar-height]. | |
| 374 | 414 | func (x *BottomSheet) SetRevealBottomBar(RevealVar bool) { | |
| 415 | + | core.LazyRegister(&xBottomSheetSetRevealBottomBar, "ADW", "adw_bottom_sheet_set_reveal_bottom_bar", false) | |
| 416 | + | ||
| 375 | 417 | xBottomSheetSetRevealBottomBar(x.GoPointer(), RevealVar) | |
| 376 | 418 | } | |
| 377 | 419 | ||
| @@ -381,6 +423,8 @@ var xBottomSheetSetSheet func(uintptr, uintptr) | |||
| 381 | 423 | // | |
| 382 | 424 | // Only shown when [property@BottomSheet:open] is `TRUE`. | |
| 383 | 425 | func (x *BottomSheet) SetSheet(SheetVar *gtk.Widget) { | |
| 426 | + | core.LazyRegister(&xBottomSheetSetSheet, "ADW", "adw_bottom_sheet_set_sheet", false) | |
| 427 | + | ||
| 384 | 428 | xBottomSheetSetSheet(x.GoPointer(), SheetVar.GoPointer()) | |
| 385 | 429 | } | |
| 386 | 430 | ||
| @@ -396,6 +440,8 @@ var xBottomSheetSetShowDragHandle func(uintptr, bool) | |||
| 396 | 440 | // Showing drag handle also allows to swipe the bottom sheet down (and to swipe | |
| 397 | 441 | // the bottom bar up) with a pointer, instead of just touchscreen. | |
| 398 | 442 | func (x *BottomSheet) SetShowDragHandle(ShowDragHandleVar bool) { | |
| 443 | + | core.LazyRegister(&xBottomSheetSetShowDragHandle, "ADW", "adw_bottom_sheet_set_show_drag_handle", false) | |
| 444 | + | ||
| 399 | 445 | xBottomSheetSetShowDragHandle(x.GoPointer(), ShowDragHandleVar) | |
| 400 | 446 | } | |
| 401 | 447 | ||
| @@ -970,41 +1016,4 @@ func (x *BottomSheet) GetBuildableId() string { | |||
| 970 | 1016 | func init() { | |
| 971 | 1017 | core.SetPackageName("ADW", "libadwaita-1") | |
| 972 | 1018 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | |
| 973 | - | var libs []uintptr | |
| 974 | - | for _, libPath := range core.GetPaths("ADW") { | |
| 975 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 976 | - | if err != nil { | |
| 977 | - | panic(err) | |
| 978 | - | } | |
| 979 | - | libs = append(libs, lib) | |
| 980 | - | } | |
| 981 | - | ||
| 982 | - | core.PuregoSafeRegister(&xBottomSheetGLibType, libs, "adw_bottom_sheet_get_type") | |
| 983 | - | ||
| 984 | - | core.PuregoSafeRegister(&xNewBottomSheet, libs, "adw_bottom_sheet_new") | |
| 985 | - | ||
| 986 | - | core.PuregoSafeRegister(&xBottomSheetGetAlign, libs, "adw_bottom_sheet_get_align") | |
| 987 | - | core.PuregoSafeRegister(&xBottomSheetGetBottomBar, libs, "adw_bottom_sheet_get_bottom_bar") | |
| 988 | - | core.PuregoSafeRegister(&xBottomSheetGetBottomBarHeight, libs, "adw_bottom_sheet_get_bottom_bar_height") | |
| 989 | - | core.PuregoSafeRegister(&xBottomSheetGetCanClose, libs, "adw_bottom_sheet_get_can_close") | |
| 990 | - | core.PuregoSafeRegister(&xBottomSheetGetCanOpen, libs, "adw_bottom_sheet_get_can_open") | |
| 991 | - | core.PuregoSafeRegister(&xBottomSheetGetContent, libs, "adw_bottom_sheet_get_content") | |
| 992 | - | core.PuregoSafeRegister(&xBottomSheetGetFullWidth, libs, "adw_bottom_sheet_get_full_width") | |
| 993 | - | core.PuregoSafeRegister(&xBottomSheetGetModal, libs, "adw_bottom_sheet_get_modal") | |
| 994 | - | core.PuregoSafeRegister(&xBottomSheetGetOpen, libs, "adw_bottom_sheet_get_open") | |
| 995 | - | core.PuregoSafeRegister(&xBottomSheetGetRevealBottomBar, libs, "adw_bottom_sheet_get_reveal_bottom_bar") | |
| 996 | - | core.PuregoSafeRegister(&xBottomSheetGetSheet, libs, "adw_bottom_sheet_get_sheet") | |
| 997 | - | core.PuregoSafeRegister(&xBottomSheetGetSheetHeight, libs, "adw_bottom_sheet_get_sheet_height") | |
| 998 | - | core.PuregoSafeRegister(&xBottomSheetGetShowDragHandle, libs, "adw_bottom_sheet_get_show_drag_handle") | |
| 999 | - | core.PuregoSafeRegister(&xBottomSheetSetAlign, libs, "adw_bottom_sheet_set_align") | |
| 1000 | - | core.PuregoSafeRegister(&xBottomSheetSetBottomBar, libs, "adw_bottom_sheet_set_bottom_bar") | |
| 1001 | - | core.PuregoSafeRegister(&xBottomSheetSetCanClose, libs, "adw_bottom_sheet_set_can_close") | |
| 1002 | - | core.PuregoSafeRegister(&xBottomSheetSetCanOpen, libs, "adw_bottom_sheet_set_can_open") | |
| 1003 | - | core.PuregoSafeRegister(&xBottomSheetSetContent, libs, "adw_bottom_sheet_set_content") | |
| 1004 | - | core.PuregoSafeRegister(&xBottomSheetSetFullWidth, libs, "adw_bottom_sheet_set_full_width") | |
| 1005 | - | core.PuregoSafeRegister(&xBottomSheetSetModal, libs, "adw_bottom_sheet_set_modal") | |
| 1006 | - | core.PuregoSafeRegister(&xBottomSheetSetOpen, libs, "adw_bottom_sheet_set_open") | |
| 1007 | - | core.PuregoSafeRegister(&xBottomSheetSetRevealBottomBar, libs, "adw_bottom_sheet_set_reveal_bottom_bar") | |
| 1008 | - | core.PuregoSafeRegister(&xBottomSheetSetSheet, libs, "adw_bottom_sheet_set_sheet") | |
| 1009 | - | core.PuregoSafeRegister(&xBottomSheetSetShowDragHandle, libs, "adw_bottom_sheet_set_show_drag_handle") | |
| 1010 | 1019 | } | |
| @@ -5,7 +5,6 @@ import ( | |||||
| 5 | "structs" | 5 | "structs" | ||
| 6 | "unsafe" | 6 | "unsafe" | ||
| 7 | 7 | ||||
| 8 | - | "github.com/bnema/purego" | |||
| 9 | "github.com/bnema/puregotk/pkg/core" | 8 | "github.com/bnema/puregotk/pkg/core" | ||
| 10 | "github.com/bnema/puregotk/v4/gdk" | 9 | "github.com/bnema/puregotk/v4/gdk" | ||
| 11 | "github.com/bnema/puregotk/v4/glib" | 10 | "github.com/bnema/puregotk/v4/glib" | ||
| @@ -113,6 +112,7 @@ type BottomSheet struct { | |||||
| 113 | var xBottomSheetGLibType func() types.GType | 112 | var xBottomSheetGLibType func() types.GType | ||
| 114 | 113 | ||||
| 115 | func BottomSheetGLibType() types.GType { | 114 | func BottomSheetGLibType() types.GType { | ||
| 115 | + | core.LazyRegister(&xBottomSheetGLibType, "ADW", "adw_bottom_sheet_get_type", false) | |||
| 116 | return xBottomSheetGLibType() | 116 | return xBottomSheetGLibType() | ||
| 117 | } | 117 | } | ||
| 118 | 118 | ||||
| @@ -126,6 +126,7 @@ var xNewBottomSheet func() uintptr | |||||
| 126 | 126 | ||||
| 127 | // Creates a new `AdwBottomSheet`. | 127 | // Creates a new `AdwBottomSheet`. | ||
| 128 | func NewBottomSheet() *BottomSheet { | 128 | func NewBottomSheet() *BottomSheet { | ||
| 129 | + | core.LazyRegister(&xNewBottomSheet, "ADW", "adw_bottom_sheet_new", false) | |||
| 129 | var cls *BottomSheet | 130 | var cls *BottomSheet | ||
| 130 | 131 | ||||
| 131 | cret := xNewBottomSheet() | 132 | cret := xNewBottomSheet() | ||
| @@ -143,6 +144,8 @@ var xBottomSheetGetAlign func(uintptr) float32 | |||||
| 143 | 144 | ||||
| 144 | // Gets horizontal alignment of the bottom sheet. | 145 | // Gets horizontal alignment of the bottom sheet. | ||
| 145 | func (x *BottomSheet) GetAlign() float32 { | 146 | func (x *BottomSheet) GetAlign() float32 { | ||
| 147 | + | core.LazyRegister(&xBottomSheetGetAlign, "ADW", "adw_bottom_sheet_get_align", false) | |||
| 148 | + | ||||
| 146 | cret := xBottomSheetGetAlign(x.GoPointer()) | 149 | cret := xBottomSheetGetAlign(x.GoPointer()) | ||
| 147 | return cret | 150 | return cret | ||
| 148 | } | 151 | } | ||
| @@ -151,6 +154,7 @@ var xBottomSheetGetBottomBar func(uintptr) uintptr | |||||
| 151 | 154 | ||||
| 152 | // Gets the bottom bar widget for @self. | 155 | // Gets the bottom bar widget for @self. | ||
| 153 | func (x *BottomSheet) GetBottomBar() *gtk.Widget { | 156 | func (x *BottomSheet) GetBottomBar() *gtk.Widget { | ||
| 157 | + | core.LazyRegister(&xBottomSheetGetBottomBar, "ADW", "adw_bottom_sheet_get_bottom_bar", false) | |||
| 154 | var cls *gtk.Widget | 158 | var cls *gtk.Widget | ||
| 155 | 159 | ||||
| 156 | cret := xBottomSheetGetBottomBar(x.GoPointer()) | 160 | cret := xBottomSheetGetBottomBar(x.GoPointer()) | ||
| @@ -171,6 +175,8 @@ var xBottomSheetGetBottomBarHeight func(uintptr) int | |||||
| 171 | // It can be used to shift the content upwards permanently to accommodate for | 175 | // It can be used to shift the content upwards permanently to accommodate for | ||
| 172 | // the bottom bar. | 176 | // the bottom bar. | ||
| 173 | func (x *BottomSheet) GetBottomBarHeight() int { | 177 | func (x *BottomSheet) GetBottomBarHeight() int { | ||
| 178 | + | core.LazyRegister(&xBottomSheetGetBottomBarHeight, "ADW", "adw_bottom_sheet_get_bottom_bar_height", false) | |||
| 179 | + | ||||
| 174 | cret := xBottomSheetGetBottomBarHeight(x.GoPointer()) | 180 | cret := xBottomSheetGetBottomBarHeight(x.GoPointer()) | ||
| 175 | return cret | 181 | return cret | ||
| 176 | } | 182 | } | ||
| @@ -179,6 +185,8 @@ var xBottomSheetGetCanClose func(uintptr) bool | |||||
| 179 | 185 | ||||
| 180 | // Gets whether the bottom sheet can be closed by user. | 186 | // Gets whether the bottom sheet can be closed by user. | ||
| 181 | func (x *BottomSheet) GetCanClose() bool { | 187 | func (x *BottomSheet) GetCanClose() bool { | ||
| 188 | + | core.LazyRegister(&xBottomSheetGetCanClose, "ADW", "adw_bottom_sheet_get_can_close", false) | |||
| 189 | + | ||||
| 182 | cret := xBottomSheetGetCanClose(x.GoPointer()) | 190 | cret := xBottomSheetGetCanClose(x.GoPointer()) | ||
| 183 | return cret | 191 | return cret | ||
| 184 | } | 192 | } | ||
| @@ -187,6 +195,8 @@ var xBottomSheetGetCanOpen func(uintptr) bool | |||||
| 187 | 195 | ||||
| 188 | // Gets whether the bottom sheet can be opened by user. | 196 | // Gets whether the bottom sheet can be opened by user. | ||
| 189 | func (x *BottomSheet) GetCanOpen() bool { | 197 | func (x *BottomSheet) GetCanOpen() bool { | ||
| 198 | + | core.LazyRegister(&xBottomSheetGetCanOpen, "ADW", "adw_bottom_sheet_get_can_open", false) | |||
| 199 | + | ||||
| 190 | cret := xBottomSheetGetCanOpen(x.GoPointer()) | 200 | cret := xBottomSheetGetCanOpen(x.GoPointer()) | ||
| 191 | return cret | 201 | return cret | ||
| 192 | } | 202 | } | ||
| @@ -195,6 +205,7 @@ var xBottomSheetGetContent func(uintptr) uintptr | |||||
| 195 | 205 | ||||
| 196 | // Gets the content widget for @self. | 206 | // Gets the content widget for @self. | ||
| 197 | func (x *BottomSheet) GetContent() *gtk.Widget { | 207 | func (x *BottomSheet) GetContent() *gtk.Widget { | ||
| 208 | + | core.LazyRegister(&xBottomSheetGetContent, "ADW", "adw_bottom_sheet_get_content", false) | |||
| 198 | var cls *gtk.Widget | 209 | var cls *gtk.Widget | ||
| 199 | 210 | ||||
| 200 | cret := xBottomSheetGetContent(x.GoPointer()) | 211 | cret := xBottomSheetGetContent(x.GoPointer()) | ||
| @@ -212,6 +223,8 @@ var xBottomSheetGetFullWidth func(uintptr) bool | |||||
| 212 | 223 | ||||
| 213 | // Gets whether the bottom sheet takes the full width. | 224 | // Gets whether the bottom sheet takes the full width. | ||
| 214 | func (x *BottomSheet) GetFullWidth() bool { | 225 | func (x *BottomSheet) GetFullWidth() bool { | ||
| 226 | + | core.LazyRegister(&xBottomSheetGetFullWidth, "ADW", "adw_bottom_sheet_get_full_width", false) | |||
| 227 | + | ||||
| 215 | cret := xBottomSheetGetFullWidth(x.GoPointer()) | 228 | cret := xBottomSheetGetFullWidth(x.GoPointer()) | ||
| 216 | return cret | 229 | return cret | ||
| 217 | } | 230 | } | ||
| @@ -220,6 +233,8 @@ var xBottomSheetGetModal func(uintptr) bool | |||||
| 220 | 233 | ||||
| 221 | // Gets whether the bottom sheet is modal. | 234 | // Gets whether the bottom sheet is modal. | ||
| 222 | func (x *BottomSheet) GetModal() bool { | 235 | func (x *BottomSheet) GetModal() bool { | ||
| 236 | + | core.LazyRegister(&xBottomSheetGetModal, "ADW", "adw_bottom_sheet_get_modal", false) | |||
| 237 | + | ||||
| 223 | cret := xBottomSheetGetModal(x.GoPointer()) | 238 | cret := xBottomSheetGetModal(x.GoPointer()) | ||
| 224 | return cret | 239 | return cret | ||
| 225 | } | 240 | } | ||
| @@ -228,6 +243,8 @@ var xBottomSheetGetOpen func(uintptr) bool | |||||
| 228 | 243 | ||||
| 229 | // Gets whether the bottom sheet is open. | 244 | // Gets whether the bottom sheet is open. | ||
| 230 | func (x *BottomSheet) GetOpen() bool { | 245 | func (x *BottomSheet) GetOpen() bool { | ||
| 246 | + | core.LazyRegister(&xBottomSheetGetOpen, "ADW", "adw_bottom_sheet_get_open", false) | |||
| 247 | + | ||||
| 231 | cret := xBottomSheetGetOpen(x.GoPointer()) | 248 | cret := xBottomSheetGetOpen(x.GoPointer()) | ||
| 232 | return cret | 249 | return cret | ||
| 233 | } | 250 | } | ||
| @@ -236,6 +253,8 @@ var xBottomSheetGetRevealBottomBar func(uintptr) bool | |||||
| 236 | 253 | ||||
| 237 | // Gets whether the bottom bar is revealed. | 254 | // Gets whether the bottom bar is revealed. | ||
| 238 | func (x *BottomSheet) GetRevealBottomBar() bool { | 255 | func (x *BottomSheet) GetRevealBottomBar() bool { | ||
| 256 | + | core.LazyRegister(&xBottomSheetGetRevealBottomBar, "ADW", "adw_bottom_sheet_get_reveal_bottom_bar", false) | |||
| 257 | + | ||||
| 239 | cret := xBottomSheetGetRevealBottomBar(x.GoPointer()) | 258 | cret := xBottomSheetGetRevealBottomBar(x.GoPointer()) | ||
| 240 | return cret | 259 | return cret | ||
| 241 | } | 260 | } | ||
| @@ -244,6 +263,7 @@ var xBottomSheetGetSheet func(uintptr) uintptr | |||||
| 244 | 263 | ||||
| 245 | // Gets the bottom sheet widget for @self. | 264 | // Gets the bottom sheet widget for @self. | ||
| 246 | func (x *BottomSheet) GetSheet() *gtk.Widget { | 265 | func (x *BottomSheet) GetSheet() *gtk.Widget { | ||
| 266 | + | core.LazyRegister(&xBottomSheetGetSheet, "ADW", "adw_bottom_sheet_get_sheet", false) | |||
| 247 | var cls *gtk.Widget | 267 | var cls *gtk.Widget | ||
| 248 | 268 | ||||
| 249 | cret := xBottomSheetGetSheet(x.GoPointer()) | 269 | cret := xBottomSheetGetSheet(x.GoPointer()) | ||
| @@ -263,6 +283,8 @@ var xBottomSheetGetSheetHeight func(uintptr) int | |||||
| 263 | // | 283 | // | ||
| 264 | // It can be used to shift the content upwards when the bottom sheet is open. | 284 | // It can be used to shift the content upwards when the bottom sheet is open. | ||
| 265 | func (x *BottomSheet) GetSheetHeight() int { | 285 | func (x *BottomSheet) GetSheetHeight() int { | ||
| 286 | + | core.LazyRegister(&xBottomSheetGetSheetHeight, "ADW", "adw_bottom_sheet_get_sheet_height", false) | |||
| 287 | + | ||||
| 266 | cret := xBottomSheetGetSheetHeight(x.GoPointer()) | 288 | cret := xBottomSheetGetSheetHeight(x.GoPointer()) | ||
| 267 | return cret | 289 | return cret | ||
| 268 | } | 290 | } | ||
| @@ -271,6 +293,8 @@ var xBottomSheetGetShowDragHandle func(uintptr) bool | |||||
| 271 | 293 | ||||
| 272 | // Gets whether to show a drag handle in the bottom sheet. | 294 | // Gets whether to show a drag handle in the bottom sheet. | ||
| 273 | func (x *BottomSheet) GetShowDragHandle() bool { | 295 | func (x *BottomSheet) GetShowDragHandle() bool { | ||
| 296 | + | core.LazyRegister(&xBottomSheetGetShowDragHandle, "ADW", "adw_bottom_sheet_get_show_drag_handle", false) | |||
| 297 | + | ||||
| 274 | cret := xBottomSheetGetShowDragHandle(x.GoPointer()) | 298 | cret := xBottomSheetGetShowDragHandle(x.GoPointer()) | ||
| 275 | return cret | 299 | return cret | ||
| 276 | } | 300 | } | ||
| @@ -284,6 +308,8 @@ var xBottomSheetSetAlign func(uintptr, float32) | |||||
| 284 | // | 308 | // | ||
| 285 | // Only used when [property@BottomSheet:full-width] is set to `FALSE`. | 309 | // Only used when [property@BottomSheet:full-width] is set to `FALSE`. | ||
| 286 | func (x *BottomSheet) SetAlign(AlignVar float32) { | 310 | func (x *BottomSheet) SetAlign(AlignVar float32) { | ||
| 311 | + | core.LazyRegister(&xBottomSheetSetAlign, "ADW", "adw_bottom_sheet_set_align", false) | |||
| 312 | + | ||||
| 287 | xBottomSheetSetAlign(x.GoPointer(), AlignVar) | 313 | xBottomSheetSetAlign(x.GoPointer(), AlignVar) | ||
| 288 | } | 314 | } | ||
| 289 | 315 | ||||
| @@ -297,6 +323,8 @@ var xBottomSheetSetBottomBar func(uintptr, uintptr) | |||||
| 297 | // Bottom bar can be temporarily hidden using the | 323 | // Bottom bar can be temporarily hidden using the | ||
| 298 | // [property@BottomSheet:reveal-bottom-bar] property. | 324 | // [property@BottomSheet:reveal-bottom-bar] property. | ||
| 299 | func (x *BottomSheet) SetBottomBar(BottomBarVar *gtk.Widget) { | 325 | func (x *BottomSheet) SetBottomBar(BottomBarVar *gtk.Widget) { | ||
| 326 | + | core.LazyRegister(&xBottomSheetSetBottomBar, "ADW", "adw_bottom_sheet_set_bottom_bar", false) | |||
| 327 | + | ||||
| 300 | xBottomSheetSetBottomBar(x.GoPointer(), BottomBarVar.GoPointer()) | 328 | xBottomSheetSetBottomBar(x.GoPointer(), BottomBarVar.GoPointer()) | ||
| 301 | } | 329 | } | ||
| 302 | 330 | ||||
| @@ -309,6 +337,8 @@ var xBottomSheetSetCanClose func(uintptr, bool) | |||||
| 309 | // | 337 | // | ||
| 310 | // Bottom sheet can still be closed using [property@BottomSheet:open]. | 338 | // Bottom sheet can still be closed using [property@BottomSheet:open]. | ||
| 311 | func (x *BottomSheet) SetCanClose(CanCloseVar bool) { | 339 | func (x *BottomSheet) SetCanClose(CanCloseVar bool) { | ||
| 340 | + | core.LazyRegister(&xBottomSheetSetCanClose, "ADW", "adw_bottom_sheet_set_can_close", false) | |||
| 341 | + | ||||
| 312 | xBottomSheetSetCanClose(x.GoPointer(), CanCloseVar) | 342 | xBottomSheetSetCanClose(x.GoPointer(), CanCloseVar) | ||
| 313 | } | 343 | } | ||
| 314 | 344 | ||||
| @@ -322,6 +352,8 @@ var xBottomSheetSetCanOpen func(uintptr, bool) | |||||
| 322 | // | 352 | // | ||
| 323 | // Bottom sheet can still be opened using [property@BottomSheet:open]. | 353 | // Bottom sheet can still be opened using [property@BottomSheet:open]. | ||
| 324 | func (x *BottomSheet) SetCanOpen(CanOpenVar bool) { | 354 | func (x *BottomSheet) SetCanOpen(CanOpenVar bool) { | ||
| 355 | + | core.LazyRegister(&xBottomSheetSetCanOpen, "ADW", "adw_bottom_sheet_set_can_open", false) | |||
| 356 | + | ||||
| 325 | xBottomSheetSetCanOpen(x.GoPointer(), CanOpenVar) | 357 | xBottomSheetSetCanOpen(x.GoPointer(), CanOpenVar) | ||
| 326 | } | 358 | } | ||
| 327 | 359 | ||||
| @@ -331,6 +363,8 @@ var xBottomSheetSetContent func(uintptr, uintptr) | |||||
| 331 | // | 363 | // | ||
| 332 | // It's always shown, and the bottom sheet is overlaid over it. | 364 | // It's always shown, and the bottom sheet is overlaid over it. | ||
| 333 | func (x *BottomSheet) SetContent(ContentVar *gtk.Widget) { | 365 | func (x *BottomSheet) SetContent(ContentVar *gtk.Widget) { | ||
| 366 | + | core.LazyRegister(&xBottomSheetSetContent, "ADW", "adw_bottom_sheet_set_content", false) | |||
| 367 | + | ||||
| 334 | xBottomSheetSetContent(x.GoPointer(), ContentVar.GoPointer()) | 368 | xBottomSheetSetContent(x.GoPointer(), ContentVar.GoPointer()) | ||
| 335 | } | 369 | } | ||
| 336 | 370 | ||||
| @@ -340,6 +374,8 @@ var xBottomSheetSetFullWidth func(uintptr, bool) | |||||
| 340 | // | 374 | // | ||
| 341 | // When full width, [property@BottomSheet:align] is ignored. | 375 | // When full width, [property@BottomSheet:align] is ignored. | ||
| 342 | func (x *BottomSheet) SetFullWidth(FullWidthVar bool) { | 376 | func (x *BottomSheet) SetFullWidth(FullWidthVar bool) { | ||
| 377 | + | core.LazyRegister(&xBottomSheetSetFullWidth, "ADW", "adw_bottom_sheet_set_full_width", false) | |||
| 378 | + | ||||
| 343 | xBottomSheetSetFullWidth(x.GoPointer(), FullWidthVar) | 379 | xBottomSheetSetFullWidth(x.GoPointer(), FullWidthVar) | ||
| 344 | } | 380 | } | ||
| 345 | 381 | ||||
| @@ -353,6 +389,8 @@ var xBottomSheetSetModal func(uintptr, bool) | |||||
| 353 | // | 389 | // | ||
| 354 | // Otherwise, the content is accessible even when the bottom sheet is open. | 390 | // Otherwise, the content is accessible even when the bottom sheet is open. | ||
| 355 | func (x *BottomSheet) SetModal(ModalVar bool) { | 391 | func (x *BottomSheet) SetModal(ModalVar bool) { | ||
| 392 | + | core.LazyRegister(&xBottomSheetSetModal, "ADW", "adw_bottom_sheet_set_modal", false) | |||
| 393 | + | ||||
| 356 | xBottomSheetSetModal(x.GoPointer(), ModalVar) | 394 | xBottomSheetSetModal(x.GoPointer(), ModalVar) | ||
| 357 | } | 395 | } | ||
| 358 | 396 | ||||
| @@ -360,6 +398,8 @@ var xBottomSheetSetOpen func(uintptr, bool) | |||||
| 360 | 398 | ||||
| 361 | // Sets whether the bottom sheet is open. | 399 | // Sets whether the bottom sheet is open. | ||
| 362 | func (x *BottomSheet) SetOpen(OpenVar bool) { | 400 | func (x *BottomSheet) SetOpen(OpenVar bool) { | ||
| 401 | + | core.LazyRegister(&xBottomSheetSetOpen, "ADW", "adw_bottom_sheet_set_open", false) | |||
| 402 | + | ||||
| 363 | xBottomSheetSetOpen(x.GoPointer(), OpenVar) | 403 | xBottomSheetSetOpen(x.GoPointer(), OpenVar) | ||
| 364 | } | 404 | } | ||
| 365 | 405 | ||||
| @@ -372,6 +412,8 @@ var xBottomSheetSetRevealBottomBar func(uintptr, bool) | |||||
| 372 | // See [property@BottomSheet:bottom-bar] and | 412 | // See [property@BottomSheet:bottom-bar] and | ||
| 373 | // [property@BottomSheet:bottom-bar-height]. | 413 | // [property@BottomSheet:bottom-bar-height]. | ||
| 374 | func (x *BottomSheet) SetRevealBottomBar(RevealVar bool) { | 414 | func (x *BottomSheet) SetRevealBottomBar(RevealVar bool) { | ||
| 415 | + | core.LazyRegister(&xBottomSheetSetRevealBottomBar, "ADW", "adw_bottom_sheet_set_reveal_bottom_bar", false) | |||
| 416 | + | ||||
| 375 | xBottomSheetSetRevealBottomBar(x.GoPointer(), RevealVar) | 417 | xBottomSheetSetRevealBottomBar(x.GoPointer(), RevealVar) | ||
| 376 | } | 418 | } | ||
| 377 | 419 | ||||
| @@ -381,6 +423,8 @@ var xBottomSheetSetSheet func(uintptr, uintptr) | |||||
| 381 | // | 423 | // | ||
| 382 | // Only shown when [property@BottomSheet:open] is `TRUE`. | 424 | // Only shown when [property@BottomSheet:open] is `TRUE`. | ||
| 383 | func (x *BottomSheet) SetSheet(SheetVar *gtk.Widget) { | 425 | func (x *BottomSheet) SetSheet(SheetVar *gtk.Widget) { | ||
| 426 | + | core.LazyRegister(&xBottomSheetSetSheet, "ADW", "adw_bottom_sheet_set_sheet", false) | |||
| 427 | + | ||||
| 384 | xBottomSheetSetSheet(x.GoPointer(), SheetVar.GoPointer()) | 428 | xBottomSheetSetSheet(x.GoPointer(), SheetVar.GoPointer()) | ||
| 385 | } | 429 | } | ||
| 386 | 430 | ||||
| @@ -396,6 +440,8 @@ var xBottomSheetSetShowDragHandle func(uintptr, bool) | |||||
| 396 | // Showing drag handle also allows to swipe the bottom sheet down (and to swipe | 440 | // Showing drag handle also allows to swipe the bottom sheet down (and to swipe | ||
| 397 | // the bottom bar up) with a pointer, instead of just touchscreen. | 441 | // the bottom bar up) with a pointer, instead of just touchscreen. | ||
| 398 | func (x *BottomSheet) SetShowDragHandle(ShowDragHandleVar bool) { | 442 | func (x *BottomSheet) SetShowDragHandle(ShowDragHandleVar bool) { | ||
| 443 | + | core.LazyRegister(&xBottomSheetSetShowDragHandle, "ADW", "adw_bottom_sheet_set_show_drag_handle", false) | |||
| 444 | + | ||||
| 399 | xBottomSheetSetShowDragHandle(x.GoPointer(), ShowDragHandleVar) | 445 | xBottomSheetSetShowDragHandle(x.GoPointer(), ShowDragHandleVar) | ||
| 400 | } | 446 | } | ||
| 401 | 447 | ||||
| @@ -970,41 +1016,4 @@ func (x *BottomSheet) GetBuildableId() string { | |||||
| 970 | func init() { | 1016 | func init() { | ||
| 971 | core.SetPackageName("ADW", "libadwaita-1") | 1017 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 972 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 1018 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | ||
| 973 | - | var libs []uintptr | |||
| 974 | - | for _, libPath := range core.GetPaths("ADW") { | |||
| 975 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 976 | - | if err != nil { | |||
| 977 | - | panic(err) | |||
| 978 | - | } | |||
| 979 | - | libs = append(libs, lib) | |||
| 980 | - | } | |||
| 981 | - | ||||
| 982 | - | core.PuregoSafeRegister(&xBottomSheetGLibType, libs, "adw_bottom_sheet_get_type") | |||
| 983 | - | ||||
| 984 | - | core.PuregoSafeRegister(&xNewBottomSheet, libs, "adw_bottom_sheet_new") | |||
| 985 | - | ||||
| 986 | - | core.PuregoSafeRegister(&xBottomSheetGetAlign, libs, "adw_bottom_sheet_get_align") | |||
| 987 | - | core.PuregoSafeRegister(&xBottomSheetGetBottomBar, libs, "adw_bottom_sheet_get_bottom_bar") | |||
| 988 | - | core.PuregoSafeRegister(&xBottomSheetGetBottomBarHeight, libs, "adw_bottom_sheet_get_bottom_bar_height") | |||
| 989 | - | core.PuregoSafeRegister(&xBottomSheetGetCanClose, libs, "adw_bottom_sheet_get_can_close") | |||
| 990 | - | core.PuregoSafeRegister(&xBottomSheetGetCanOpen, libs, "adw_bottom_sheet_get_can_open") | |||
| 991 | - | core.PuregoSafeRegister(&xBottomSheetGetContent, libs, "adw_bottom_sheet_get_content") | |||
| 992 | - | core.PuregoSafeRegister(&xBottomSheetGetFullWidth, libs, "adw_bottom_sheet_get_full_width") | |||
| 993 | - | core.PuregoSafeRegister(&xBottomSheetGetModal, libs, "adw_bottom_sheet_get_modal") | |||
| 994 | - | core.PuregoSafeRegister(&xBottomSheetGetOpen, libs, "adw_bottom_sheet_get_open") | |||
| 995 | - | core.PuregoSafeRegister(&xBottomSheetGetRevealBottomBar, libs, "adw_bottom_sheet_get_reveal_bottom_bar") | |||
| 996 | - | core.PuregoSafeRegister(&xBottomSheetGetSheet, libs, "adw_bottom_sheet_get_sheet") | |||
| 997 | - | core.PuregoSafeRegister(&xBottomSheetGetSheetHeight, libs, "adw_bottom_sheet_get_sheet_height") | |||
| 998 | - | core.PuregoSafeRegister(&xBottomSheetGetShowDragHandle, libs, "adw_bottom_sheet_get_show_drag_handle") | |||
| 999 | - | core.PuregoSafeRegister(&xBottomSheetSetAlign, libs, "adw_bottom_sheet_set_align") | |||
| 1000 | - | core.PuregoSafeRegister(&xBottomSheetSetBottomBar, libs, "adw_bottom_sheet_set_bottom_bar") | |||
| 1001 | - | core.PuregoSafeRegister(&xBottomSheetSetCanClose, libs, "adw_bottom_sheet_set_can_close") | |||
| 1002 | - | core.PuregoSafeRegister(&xBottomSheetSetCanOpen, libs, "adw_bottom_sheet_set_can_open") | |||
| 1003 | - | core.PuregoSafeRegister(&xBottomSheetSetContent, libs, "adw_bottom_sheet_set_content") | |||
| 1004 | - | core.PuregoSafeRegister(&xBottomSheetSetFullWidth, libs, "adw_bottom_sheet_set_full_width") | |||
| 1005 | - | core.PuregoSafeRegister(&xBottomSheetSetModal, libs, "adw_bottom_sheet_set_modal") | |||
| 1006 | - | core.PuregoSafeRegister(&xBottomSheetSetOpen, libs, "adw_bottom_sheet_set_open") | |||
| 1007 | - | core.PuregoSafeRegister(&xBottomSheetSetRevealBottomBar, libs, "adw_bottom_sheet_set_reveal_bottom_bar") | |||
| 1008 | - | core.PuregoSafeRegister(&xBottomSheetSetSheet, libs, "adw_bottom_sheet_set_sheet") | |||
| 1009 | - | core.PuregoSafeRegister(&xBottomSheetSetShowDragHandle, libs, "adw_bottom_sheet_set_show_drag_handle") | |||
| 1010 | } | 1019 | } | ||