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
| @@ -5,6 +5,7 @@ import ( | |||
| 5 | 5 | "structs" | |
| 6 | 6 | "unsafe" | |
| 7 | 7 | ||
| 8 | + | "github.com/bnema/purego" | |
| 8 | 9 | "github.com/bnema/puregotk/pkg/core" | |
| 9 | 10 | "github.com/bnema/puregotk/v4/gdk" | |
| 10 | 11 | "github.com/bnema/puregotk/v4/glib" | |
| @@ -112,7 +113,6 @@ type BottomSheet struct { | |||
| 112 | 113 | var xBottomSheetGLibType func() types.GType | |
| 113 | 114 | ||
| 114 | 115 | func BottomSheetGLibType() types.GType { | |
| 115 | - | core.LazyRegister(&xBottomSheetGLibType, "ADW", "adw_bottom_sheet_get_type", false) | |
| 116 | 116 | return xBottomSheetGLibType() | |
| 117 | 117 | } | |
| 118 | 118 | ||
| @@ -126,7 +126,6 @@ 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) | |
| 130 | 129 | var cls *BottomSheet | |
| 131 | 130 | ||
| 132 | 131 | cret := xNewBottomSheet() | |
| @@ -144,8 +143,6 @@ var xBottomSheetGetAlign func(uintptr) float32 | |||
| 144 | 143 | ||
| 145 | 144 | // Gets horizontal alignment of the bottom sheet. | |
| 146 | 145 | func (x *BottomSheet) GetAlign() float32 { | |
| 147 | - | core.LazyRegister(&xBottomSheetGetAlign, "ADW", "adw_bottom_sheet_get_align", false) | |
| 148 | - | ||
| 149 | 146 | cret := xBottomSheetGetAlign(x.GoPointer()) | |
| 150 | 147 | return cret | |
| 151 | 148 | } | |
| @@ -154,7 +151,6 @@ var xBottomSheetGetBottomBar func(uintptr) uintptr | |||
| 154 | 151 | ||
| 155 | 152 | // Gets the bottom bar widget for @self. | |
| 156 | 153 | func (x *BottomSheet) GetBottomBar() *gtk.Widget { | |
| 157 | - | core.LazyRegister(&xBottomSheetGetBottomBar, "ADW", "adw_bottom_sheet_get_bottom_bar", false) | |
| 158 | 154 | var cls *gtk.Widget | |
| 159 | 155 | ||
| 160 | 156 | cret := xBottomSheetGetBottomBar(x.GoPointer()) | |
| @@ -175,8 +171,6 @@ var xBottomSheetGetBottomBarHeight func(uintptr) int | |||
| 175 | 171 | // It can be used to shift the content upwards permanently to accommodate for | |
| 176 | 172 | // the bottom bar. | |
| 177 | 173 | func (x *BottomSheet) GetBottomBarHeight() int { | |
| 178 | - | core.LazyRegister(&xBottomSheetGetBottomBarHeight, "ADW", "adw_bottom_sheet_get_bottom_bar_height", false) | |
| 179 | - | ||
| 180 | 174 | cret := xBottomSheetGetBottomBarHeight(x.GoPointer()) | |
| 181 | 175 | return cret | |
| 182 | 176 | } | |
| @@ -185,8 +179,6 @@ var xBottomSheetGetCanClose func(uintptr) bool | |||
| 185 | 179 | ||
| 186 | 180 | // Gets whether the bottom sheet can be closed by user. | |
| 187 | 181 | func (x *BottomSheet) GetCanClose() bool { | |
| 188 | - | core.LazyRegister(&xBottomSheetGetCanClose, "ADW", "adw_bottom_sheet_get_can_close", false) | |
| 189 | - | ||
| 190 | 182 | cret := xBottomSheetGetCanClose(x.GoPointer()) | |
| 191 | 183 | return cret | |
| 192 | 184 | } | |
| @@ -195,8 +187,6 @@ var xBottomSheetGetCanOpen func(uintptr) bool | |||
| 195 | 187 | ||
| 196 | 188 | // Gets whether the bottom sheet can be opened by user. | |
| 197 | 189 | func (x *BottomSheet) GetCanOpen() bool { | |
| 198 | - | core.LazyRegister(&xBottomSheetGetCanOpen, "ADW", "adw_bottom_sheet_get_can_open", false) | |
| 199 | - | ||
| 200 | 190 | cret := xBottomSheetGetCanOpen(x.GoPointer()) | |
| 201 | 191 | return cret | |
| 202 | 192 | } | |
| @@ -205,7 +195,6 @@ var xBottomSheetGetContent func(uintptr) uintptr | |||
| 205 | 195 | ||
| 206 | 196 | // Gets the content widget for @self. | |
| 207 | 197 | func (x *BottomSheet) GetContent() *gtk.Widget { | |
| 208 | - | core.LazyRegister(&xBottomSheetGetContent, "ADW", "adw_bottom_sheet_get_content", false) | |
| 209 | 198 | var cls *gtk.Widget | |
| 210 | 199 | ||
| 211 | 200 | cret := xBottomSheetGetContent(x.GoPointer()) | |
| @@ -223,8 +212,6 @@ var xBottomSheetGetFullWidth func(uintptr) bool | |||
| 223 | 212 | ||
| 224 | 213 | // Gets whether the bottom sheet takes the full width. | |
| 225 | 214 | func (x *BottomSheet) GetFullWidth() bool { | |
| 226 | - | core.LazyRegister(&xBottomSheetGetFullWidth, "ADW", "adw_bottom_sheet_get_full_width", false) | |
| 227 | - | ||
| 228 | 215 | cret := xBottomSheetGetFullWidth(x.GoPointer()) | |
| 229 | 216 | return cret | |
| 230 | 217 | } | |
| @@ -233,8 +220,6 @@ var xBottomSheetGetModal func(uintptr) bool | |||
| 233 | 220 | ||
| 234 | 221 | // Gets whether the bottom sheet is modal. | |
| 235 | 222 | func (x *BottomSheet) GetModal() bool { | |
| 236 | - | core.LazyRegister(&xBottomSheetGetModal, "ADW", "adw_bottom_sheet_get_modal", false) | |
| 237 | - | ||
| 238 | 223 | cret := xBottomSheetGetModal(x.GoPointer()) | |
| 239 | 224 | return cret | |
| 240 | 225 | } | |
| @@ -243,8 +228,6 @@ var xBottomSheetGetOpen func(uintptr) bool | |||
| 243 | 228 | ||
| 244 | 229 | // Gets whether the bottom sheet is open. | |
| 245 | 230 | func (x *BottomSheet) GetOpen() bool { | |
| 246 | - | core.LazyRegister(&xBottomSheetGetOpen, "ADW", "adw_bottom_sheet_get_open", false) | |
| 247 | - | ||
| 248 | 231 | cret := xBottomSheetGetOpen(x.GoPointer()) | |
| 249 | 232 | return cret | |
| 250 | 233 | } | |
| @@ -253,8 +236,6 @@ var xBottomSheetGetRevealBottomBar func(uintptr) bool | |||
| 253 | 236 | ||
| 254 | 237 | // Gets whether the bottom bar is revealed. | |
| 255 | 238 | func (x *BottomSheet) GetRevealBottomBar() bool { | |
| 256 | - | core.LazyRegister(&xBottomSheetGetRevealBottomBar, "ADW", "adw_bottom_sheet_get_reveal_bottom_bar", false) | |
| 257 | - | ||
| 258 | 239 | cret := xBottomSheetGetRevealBottomBar(x.GoPointer()) | |
| 259 | 240 | return cret | |
| 260 | 241 | } | |
| @@ -263,7 +244,6 @@ var xBottomSheetGetSheet func(uintptr) uintptr | |||
| 263 | 244 | ||
| 264 | 245 | // Gets the bottom sheet widget for @self. | |
| 265 | 246 | func (x *BottomSheet) GetSheet() *gtk.Widget { | |
| 266 | - | core.LazyRegister(&xBottomSheetGetSheet, "ADW", "adw_bottom_sheet_get_sheet", false) | |
| 267 | 247 | var cls *gtk.Widget | |
| 268 | 248 | ||
| 269 | 249 | cret := xBottomSheetGetSheet(x.GoPointer()) | |
| @@ -283,8 +263,6 @@ var xBottomSheetGetSheetHeight func(uintptr) int | |||
| 283 | 263 | // | |
| 284 | 264 | // It can be used to shift the content upwards when the bottom sheet is open. | |
| 285 | 265 | func (x *BottomSheet) GetSheetHeight() int { | |
| 286 | - | core.LazyRegister(&xBottomSheetGetSheetHeight, "ADW", "adw_bottom_sheet_get_sheet_height", false) | |
| 287 | - | ||
| 288 | 266 | cret := xBottomSheetGetSheetHeight(x.GoPointer()) | |
| 289 | 267 | return cret | |
| 290 | 268 | } | |
| @@ -293,8 +271,6 @@ var xBottomSheetGetShowDragHandle func(uintptr) bool | |||
| 293 | 271 | ||
| 294 | 272 | // Gets whether to show a drag handle in the bottom sheet. | |
| 295 | 273 | func (x *BottomSheet) GetShowDragHandle() bool { | |
| 296 | - | core.LazyRegister(&xBottomSheetGetShowDragHandle, "ADW", "adw_bottom_sheet_get_show_drag_handle", false) | |
| 297 | - | ||
| 298 | 274 | cret := xBottomSheetGetShowDragHandle(x.GoPointer()) | |
| 299 | 275 | return cret | |
| 300 | 276 | } | |
| @@ -308,8 +284,6 @@ var xBottomSheetSetAlign func(uintptr, float32) | |||
| 308 | 284 | // | |
| 309 | 285 | // Only used when [property@BottomSheet:full-width] is set to `FALSE`. | |
| 310 | 286 | func (x *BottomSheet) SetAlign(AlignVar float32) { | |
| 311 | - | core.LazyRegister(&xBottomSheetSetAlign, "ADW", "adw_bottom_sheet_set_align", false) | |
| 312 | - | ||
| 313 | 287 | xBottomSheetSetAlign(x.GoPointer(), AlignVar) | |
| 314 | 288 | } | |
| 315 | 289 | ||
| @@ -323,8 +297,6 @@ var xBottomSheetSetBottomBar func(uintptr, uintptr) | |||
| 323 | 297 | // Bottom bar can be temporarily hidden using the | |
| 324 | 298 | // [property@BottomSheet:reveal-bottom-bar] property. | |
| 325 | 299 | func (x *BottomSheet) SetBottomBar(BottomBarVar *gtk.Widget) { | |
| 326 | - | core.LazyRegister(&xBottomSheetSetBottomBar, "ADW", "adw_bottom_sheet_set_bottom_bar", false) | |
| 327 | - | ||
| 328 | 300 | xBottomSheetSetBottomBar(x.GoPointer(), BottomBarVar.GoPointer()) | |
| 329 | 301 | } | |
| 330 | 302 | ||
| @@ -337,8 +309,6 @@ var xBottomSheetSetCanClose func(uintptr, bool) | |||
| 337 | 309 | // | |
| 338 | 310 | // Bottom sheet can still be closed using [property@BottomSheet:open]. | |
| 339 | 311 | func (x *BottomSheet) SetCanClose(CanCloseVar bool) { | |
| 340 | - | core.LazyRegister(&xBottomSheetSetCanClose, "ADW", "adw_bottom_sheet_set_can_close", false) | |
| 341 | - | ||
| 342 | 312 | xBottomSheetSetCanClose(x.GoPointer(), CanCloseVar) | |
| 343 | 313 | } | |
| 344 | 314 | ||
| @@ -352,8 +322,6 @@ var xBottomSheetSetCanOpen func(uintptr, bool) | |||
| 352 | 322 | // | |
| 353 | 323 | // Bottom sheet can still be opened using [property@BottomSheet:open]. | |
| 354 | 324 | func (x *BottomSheet) SetCanOpen(CanOpenVar bool) { | |
| 355 | - | core.LazyRegister(&xBottomSheetSetCanOpen, "ADW", "adw_bottom_sheet_set_can_open", false) | |
| 356 | - | ||
| 357 | 325 | xBottomSheetSetCanOpen(x.GoPointer(), CanOpenVar) | |
| 358 | 326 | } | |
| 359 | 327 | ||
| @@ -363,8 +331,6 @@ var xBottomSheetSetContent func(uintptr, uintptr) | |||
| 363 | 331 | // | |
| 364 | 332 | // It's always shown, and the bottom sheet is overlaid over it. | |
| 365 | 333 | func (x *BottomSheet) SetContent(ContentVar *gtk.Widget) { | |
| 366 | - | core.LazyRegister(&xBottomSheetSetContent, "ADW", "adw_bottom_sheet_set_content", false) | |
| 367 | - | ||
| 368 | 334 | xBottomSheetSetContent(x.GoPointer(), ContentVar.GoPointer()) | |
| 369 | 335 | } | |
| 370 | 336 | ||
| @@ -374,8 +340,6 @@ var xBottomSheetSetFullWidth func(uintptr, bool) | |||
| 374 | 340 | // | |
| 375 | 341 | // When full width, [property@BottomSheet:align] is ignored. | |
| 376 | 342 | func (x *BottomSheet) SetFullWidth(FullWidthVar bool) { | |
| 377 | - | core.LazyRegister(&xBottomSheetSetFullWidth, "ADW", "adw_bottom_sheet_set_full_width", false) | |
| 378 | - | ||
| 379 | 343 | xBottomSheetSetFullWidth(x.GoPointer(), FullWidthVar) | |
| 380 | 344 | } | |
| 381 | 345 | ||
| @@ -389,8 +353,6 @@ var xBottomSheetSetModal func(uintptr, bool) | |||
| 389 | 353 | // | |
| 390 | 354 | // Otherwise, the content is accessible even when the bottom sheet is open. | |
| 391 | 355 | func (x *BottomSheet) SetModal(ModalVar bool) { | |
| 392 | - | core.LazyRegister(&xBottomSheetSetModal, "ADW", "adw_bottom_sheet_set_modal", false) | |
| 393 | - | ||
| 394 | 356 | xBottomSheetSetModal(x.GoPointer(), ModalVar) | |
| 395 | 357 | } | |
| 396 | 358 | ||
| @@ -398,8 +360,6 @@ var xBottomSheetSetOpen func(uintptr, bool) | |||
| 398 | 360 | ||
| 399 | 361 | // Sets whether the bottom sheet is open. | |
| 400 | 362 | func (x *BottomSheet) SetOpen(OpenVar bool) { | |
| 401 | - | core.LazyRegister(&xBottomSheetSetOpen, "ADW", "adw_bottom_sheet_set_open", false) | |
| 402 | - | ||
| 403 | 363 | xBottomSheetSetOpen(x.GoPointer(), OpenVar) | |
| 404 | 364 | } | |
| 405 | 365 | ||
| @@ -412,8 +372,6 @@ var xBottomSheetSetRevealBottomBar func(uintptr, bool) | |||
| 412 | 372 | // See [property@BottomSheet:bottom-bar] and | |
| 413 | 373 | // [property@BottomSheet:bottom-bar-height]. | |
| 414 | 374 | func (x *BottomSheet) SetRevealBottomBar(RevealVar bool) { | |
| 415 | - | core.LazyRegister(&xBottomSheetSetRevealBottomBar, "ADW", "adw_bottom_sheet_set_reveal_bottom_bar", false) | |
| 416 | - | ||
| 417 | 375 | xBottomSheetSetRevealBottomBar(x.GoPointer(), RevealVar) | |
| 418 | 376 | } | |
| 419 | 377 | ||
| @@ -423,8 +381,6 @@ var xBottomSheetSetSheet func(uintptr, uintptr) | |||
| 423 | 381 | // | |
| 424 | 382 | // Only shown when [property@BottomSheet:open] is `TRUE`. | |
| 425 | 383 | func (x *BottomSheet) SetSheet(SheetVar *gtk.Widget) { | |
| 426 | - | core.LazyRegister(&xBottomSheetSetSheet, "ADW", "adw_bottom_sheet_set_sheet", false) | |
| 427 | - | ||
| 428 | 384 | xBottomSheetSetSheet(x.GoPointer(), SheetVar.GoPointer()) | |
| 429 | 385 | } | |
| 430 | 386 | ||
| @@ -440,8 +396,6 @@ var xBottomSheetSetShowDragHandle func(uintptr, bool) | |||
| 440 | 396 | // Showing drag handle also allows to swipe the bottom sheet down (and to swipe | |
| 441 | 397 | // the bottom bar up) with a pointer, instead of just touchscreen. | |
| 442 | 398 | func (x *BottomSheet) SetShowDragHandle(ShowDragHandleVar bool) { | |
| 443 | - | core.LazyRegister(&xBottomSheetSetShowDragHandle, "ADW", "adw_bottom_sheet_set_show_drag_handle", false) | |
| 444 | - | ||
| 445 | 399 | xBottomSheetSetShowDragHandle(x.GoPointer(), ShowDragHandleVar) | |
| 446 | 400 | } | |
| 447 | 401 | ||
| @@ -1016,4 +970,41 @@ func (x *BottomSheet) GetBuildableId() string { | |||
| 1016 | 970 | func init() { | |
| 1017 | 971 | core.SetPackageName("ADW", "libadwaita-1") | |
| 1018 | 972 | 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") | |
| 1019 | 1010 | } | |
| @@ -5,6 +5,7 @@ import ( | |||||
| 5 | "structs" | 5 | "structs" | ||
| 6 | "unsafe" | 6 | "unsafe" | ||
| 7 | 7 | ||||
| 8 | + | "github.com/bnema/purego" | |||
| 8 | "github.com/bnema/puregotk/pkg/core" | 9 | "github.com/bnema/puregotk/pkg/core" | ||
| 9 | "github.com/bnema/puregotk/v4/gdk" | 10 | "github.com/bnema/puregotk/v4/gdk" | ||
| 10 | "github.com/bnema/puregotk/v4/glib" | 11 | "github.com/bnema/puregotk/v4/glib" | ||
| @@ -112,7 +113,6 @@ type BottomSheet struct { | |||||
| 112 | var xBottomSheetGLibType func() types.GType | 113 | var xBottomSheetGLibType func() types.GType | ||
| 113 | 114 | ||||
| 114 | func BottomSheetGLibType() types.GType { | 115 | 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,7 +126,6 @@ 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) | |||
| 130 | var cls *BottomSheet | 129 | var cls *BottomSheet | ||
| 131 | 130 | ||||
| 132 | cret := xNewBottomSheet() | 131 | cret := xNewBottomSheet() | ||
| @@ -144,8 +143,6 @@ var xBottomSheetGetAlign func(uintptr) float32 | |||||
| 144 | 143 | ||||
| 145 | // Gets horizontal alignment of the bottom sheet. | 144 | // Gets horizontal alignment of the bottom sheet. | ||
| 146 | func (x *BottomSheet) GetAlign() float32 { | 145 | func (x *BottomSheet) GetAlign() float32 { | ||
| 147 | - | core.LazyRegister(&xBottomSheetGetAlign, "ADW", "adw_bottom_sheet_get_align", false) | |||
| 148 | - | ||||
| 149 | cret := xBottomSheetGetAlign(x.GoPointer()) | 146 | cret := xBottomSheetGetAlign(x.GoPointer()) | ||
| 150 | return cret | 147 | return cret | ||
| 151 | } | 148 | } | ||
| @@ -154,7 +151,6 @@ var xBottomSheetGetBottomBar func(uintptr) uintptr | |||||
| 154 | 151 | ||||
| 155 | // Gets the bottom bar widget for @self. | 152 | // Gets the bottom bar widget for @self. | ||
| 156 | func (x *BottomSheet) GetBottomBar() *gtk.Widget { | 153 | func (x *BottomSheet) GetBottomBar() *gtk.Widget { | ||
| 157 | - | core.LazyRegister(&xBottomSheetGetBottomBar, "ADW", "adw_bottom_sheet_get_bottom_bar", false) | |||
| 158 | var cls *gtk.Widget | 154 | var cls *gtk.Widget | ||
| 159 | 155 | ||||
| 160 | cret := xBottomSheetGetBottomBar(x.GoPointer()) | 156 | cret := xBottomSheetGetBottomBar(x.GoPointer()) | ||
| @@ -175,8 +171,6 @@ var xBottomSheetGetBottomBarHeight func(uintptr) int | |||||
| 175 | // It can be used to shift the content upwards permanently to accommodate for | 171 | // It can be used to shift the content upwards permanently to accommodate for | ||
| 176 | // the bottom bar. | 172 | // the bottom bar. | ||
| 177 | func (x *BottomSheet) GetBottomBarHeight() int { | 173 | func (x *BottomSheet) GetBottomBarHeight() int { | ||
| 178 | - | core.LazyRegister(&xBottomSheetGetBottomBarHeight, "ADW", "adw_bottom_sheet_get_bottom_bar_height", false) | |||
| 179 | - | ||||
| 180 | cret := xBottomSheetGetBottomBarHeight(x.GoPointer()) | 174 | cret := xBottomSheetGetBottomBarHeight(x.GoPointer()) | ||
| 181 | return cret | 175 | return cret | ||
| 182 | } | 176 | } | ||
| @@ -185,8 +179,6 @@ var xBottomSheetGetCanClose func(uintptr) bool | |||||
| 185 | 179 | ||||
| 186 | // Gets whether the bottom sheet can be closed by user. | 180 | // Gets whether the bottom sheet can be closed by user. | ||
| 187 | func (x *BottomSheet) GetCanClose() bool { | 181 | func (x *BottomSheet) GetCanClose() bool { | ||
| 188 | - | core.LazyRegister(&xBottomSheetGetCanClose, "ADW", "adw_bottom_sheet_get_can_close", false) | |||
| 189 | - | ||||
| 190 | cret := xBottomSheetGetCanClose(x.GoPointer()) | 182 | cret := xBottomSheetGetCanClose(x.GoPointer()) | ||
| 191 | return cret | 183 | return cret | ||
| 192 | } | 184 | } | ||
| @@ -195,8 +187,6 @@ var xBottomSheetGetCanOpen func(uintptr) bool | |||||
| 195 | 187 | ||||
| 196 | // Gets whether the bottom sheet can be opened by user. | 188 | // Gets whether the bottom sheet can be opened by user. | ||
| 197 | func (x *BottomSheet) GetCanOpen() bool { | 189 | func (x *BottomSheet) GetCanOpen() bool { | ||
| 198 | - | core.LazyRegister(&xBottomSheetGetCanOpen, "ADW", "adw_bottom_sheet_get_can_open", false) | |||
| 199 | - | ||||
| 200 | cret := xBottomSheetGetCanOpen(x.GoPointer()) | 190 | cret := xBottomSheetGetCanOpen(x.GoPointer()) | ||
| 201 | return cret | 191 | return cret | ||
| 202 | } | 192 | } | ||
| @@ -205,7 +195,6 @@ var xBottomSheetGetContent func(uintptr) uintptr | |||||
| 205 | 195 | ||||
| 206 | // Gets the content widget for @self. | 196 | // Gets the content widget for @self. | ||
| 207 | func (x *BottomSheet) GetContent() *gtk.Widget { | 197 | func (x *BottomSheet) GetContent() *gtk.Widget { | ||
| 208 | - | core.LazyRegister(&xBottomSheetGetContent, "ADW", "adw_bottom_sheet_get_content", false) | |||
| 209 | var cls *gtk.Widget | 198 | var cls *gtk.Widget | ||
| 210 | 199 | ||||
| 211 | cret := xBottomSheetGetContent(x.GoPointer()) | 200 | cret := xBottomSheetGetContent(x.GoPointer()) | ||
| @@ -223,8 +212,6 @@ var xBottomSheetGetFullWidth func(uintptr) bool | |||||
| 223 | 212 | ||||
| 224 | // Gets whether the bottom sheet takes the full width. | 213 | // Gets whether the bottom sheet takes the full width. | ||
| 225 | func (x *BottomSheet) GetFullWidth() bool { | 214 | func (x *BottomSheet) GetFullWidth() bool { | ||
| 226 | - | core.LazyRegister(&xBottomSheetGetFullWidth, "ADW", "adw_bottom_sheet_get_full_width", false) | |||
| 227 | - | ||||
| 228 | cret := xBottomSheetGetFullWidth(x.GoPointer()) | 215 | cret := xBottomSheetGetFullWidth(x.GoPointer()) | ||
| 229 | return cret | 216 | return cret | ||
| 230 | } | 217 | } | ||
| @@ -233,8 +220,6 @@ var xBottomSheetGetModal func(uintptr) bool | |||||
| 233 | 220 | ||||
| 234 | // Gets whether the bottom sheet is modal. | 221 | // Gets whether the bottom sheet is modal. | ||
| 235 | func (x *BottomSheet) GetModal() bool { | 222 | func (x *BottomSheet) GetModal() bool { | ||
| 236 | - | core.LazyRegister(&xBottomSheetGetModal, "ADW", "adw_bottom_sheet_get_modal", false) | |||
| 237 | - | ||||
| 238 | cret := xBottomSheetGetModal(x.GoPointer()) | 223 | cret := xBottomSheetGetModal(x.GoPointer()) | ||
| 239 | return cret | 224 | return cret | ||
| 240 | } | 225 | } | ||
| @@ -243,8 +228,6 @@ var xBottomSheetGetOpen func(uintptr) bool | |||||
| 243 | 228 | ||||
| 244 | // Gets whether the bottom sheet is open. | 229 | // Gets whether the bottom sheet is open. | ||
| 245 | func (x *BottomSheet) GetOpen() bool { | 230 | func (x *BottomSheet) GetOpen() bool { | ||
| 246 | - | core.LazyRegister(&xBottomSheetGetOpen, "ADW", "adw_bottom_sheet_get_open", false) | |||
| 247 | - | ||||
| 248 | cret := xBottomSheetGetOpen(x.GoPointer()) | 231 | cret := xBottomSheetGetOpen(x.GoPointer()) | ||
| 249 | return cret | 232 | return cret | ||
| 250 | } | 233 | } | ||
| @@ -253,8 +236,6 @@ var xBottomSheetGetRevealBottomBar func(uintptr) bool | |||||
| 253 | 236 | ||||
| 254 | // Gets whether the bottom bar is revealed. | 237 | // Gets whether the bottom bar is revealed. | ||
| 255 | func (x *BottomSheet) GetRevealBottomBar() bool { | 238 | func (x *BottomSheet) GetRevealBottomBar() bool { | ||
| 256 | - | core.LazyRegister(&xBottomSheetGetRevealBottomBar, "ADW", "adw_bottom_sheet_get_reveal_bottom_bar", false) | |||
| 257 | - | ||||
| 258 | cret := xBottomSheetGetRevealBottomBar(x.GoPointer()) | 239 | cret := xBottomSheetGetRevealBottomBar(x.GoPointer()) | ||
| 259 | return cret | 240 | return cret | ||
| 260 | } | 241 | } | ||
| @@ -263,7 +244,6 @@ var xBottomSheetGetSheet func(uintptr) uintptr | |||||
| 263 | 244 | ||||
| 264 | // Gets the bottom sheet widget for @self. | 245 | // Gets the bottom sheet widget for @self. | ||
| 265 | func (x *BottomSheet) GetSheet() *gtk.Widget { | 246 | func (x *BottomSheet) GetSheet() *gtk.Widget { | ||
| 266 | - | core.LazyRegister(&xBottomSheetGetSheet, "ADW", "adw_bottom_sheet_get_sheet", false) | |||
| 267 | var cls *gtk.Widget | 247 | var cls *gtk.Widget | ||
| 268 | 248 | ||||
| 269 | cret := xBottomSheetGetSheet(x.GoPointer()) | 249 | cret := xBottomSheetGetSheet(x.GoPointer()) | ||
| @@ -283,8 +263,6 @@ var xBottomSheetGetSheetHeight func(uintptr) int | |||||
| 283 | // | 263 | // | ||
| 284 | // It can be used to shift the content upwards when the bottom sheet is open. | 264 | // It can be used to shift the content upwards when the bottom sheet is open. | ||
| 285 | func (x *BottomSheet) GetSheetHeight() int { | 265 | func (x *BottomSheet) GetSheetHeight() int { | ||
| 286 | - | core.LazyRegister(&xBottomSheetGetSheetHeight, "ADW", "adw_bottom_sheet_get_sheet_height", false) | |||
| 287 | - | ||||
| 288 | cret := xBottomSheetGetSheetHeight(x.GoPointer()) | 266 | cret := xBottomSheetGetSheetHeight(x.GoPointer()) | ||
| 289 | return cret | 267 | return cret | ||
| 290 | } | 268 | } | ||
| @@ -293,8 +271,6 @@ var xBottomSheetGetShowDragHandle func(uintptr) bool | |||||
| 293 | 271 | ||||
| 294 | // Gets whether to show a drag handle in the bottom sheet. | 272 | // Gets whether to show a drag handle in the bottom sheet. | ||
| 295 | func (x *BottomSheet) GetShowDragHandle() bool { | 273 | func (x *BottomSheet) GetShowDragHandle() bool { | ||
| 296 | - | core.LazyRegister(&xBottomSheetGetShowDragHandle, "ADW", "adw_bottom_sheet_get_show_drag_handle", false) | |||
| 297 | - | ||||
| 298 | cret := xBottomSheetGetShowDragHandle(x.GoPointer()) | 274 | cret := xBottomSheetGetShowDragHandle(x.GoPointer()) | ||
| 299 | return cret | 275 | return cret | ||
| 300 | } | 276 | } | ||
| @@ -308,8 +284,6 @@ var xBottomSheetSetAlign func(uintptr, float32) | |||||
| 308 | // | 284 | // | ||
| 309 | // Only used when [property@BottomSheet:full-width] is set to `FALSE`. | 285 | // Only used when [property@BottomSheet:full-width] is set to `FALSE`. | ||
| 310 | func (x *BottomSheet) SetAlign(AlignVar float32) { | 286 | func (x *BottomSheet) SetAlign(AlignVar float32) { | ||
| 311 | - | core.LazyRegister(&xBottomSheetSetAlign, "ADW", "adw_bottom_sheet_set_align", false) | |||
| 312 | - | ||||
| 313 | xBottomSheetSetAlign(x.GoPointer(), AlignVar) | 287 | xBottomSheetSetAlign(x.GoPointer(), AlignVar) | ||
| 314 | } | 288 | } | ||
| 315 | 289 | ||||
| @@ -323,8 +297,6 @@ var xBottomSheetSetBottomBar func(uintptr, uintptr) | |||||
| 323 | // Bottom bar can be temporarily hidden using the | 297 | // Bottom bar can be temporarily hidden using the | ||
| 324 | // [property@BottomSheet:reveal-bottom-bar] property. | 298 | // [property@BottomSheet:reveal-bottom-bar] property. | ||
| 325 | func (x *BottomSheet) SetBottomBar(BottomBarVar *gtk.Widget) { | 299 | func (x *BottomSheet) SetBottomBar(BottomBarVar *gtk.Widget) { | ||
| 326 | - | core.LazyRegister(&xBottomSheetSetBottomBar, "ADW", "adw_bottom_sheet_set_bottom_bar", false) | |||
| 327 | - | ||||
| 328 | xBottomSheetSetBottomBar(x.GoPointer(), BottomBarVar.GoPointer()) | 300 | xBottomSheetSetBottomBar(x.GoPointer(), BottomBarVar.GoPointer()) | ||
| 329 | } | 301 | } | ||
| 330 | 302 | ||||
| @@ -337,8 +309,6 @@ var xBottomSheetSetCanClose func(uintptr, bool) | |||||
| 337 | // | 309 | // | ||
| 338 | // Bottom sheet can still be closed using [property@BottomSheet:open]. | 310 | // Bottom sheet can still be closed using [property@BottomSheet:open]. | ||
| 339 | func (x *BottomSheet) SetCanClose(CanCloseVar bool) { | 311 | func (x *BottomSheet) SetCanClose(CanCloseVar bool) { | ||
| 340 | - | core.LazyRegister(&xBottomSheetSetCanClose, "ADW", "adw_bottom_sheet_set_can_close", false) | |||
| 341 | - | ||||
| 342 | xBottomSheetSetCanClose(x.GoPointer(), CanCloseVar) | 312 | xBottomSheetSetCanClose(x.GoPointer(), CanCloseVar) | ||
| 343 | } | 313 | } | ||
| 344 | 314 | ||||
| @@ -352,8 +322,6 @@ var xBottomSheetSetCanOpen func(uintptr, bool) | |||||
| 352 | // | 322 | // | ||
| 353 | // Bottom sheet can still be opened using [property@BottomSheet:open]. | 323 | // Bottom sheet can still be opened using [property@BottomSheet:open]. | ||
| 354 | func (x *BottomSheet) SetCanOpen(CanOpenVar bool) { | 324 | func (x *BottomSheet) SetCanOpen(CanOpenVar bool) { | ||
| 355 | - | core.LazyRegister(&xBottomSheetSetCanOpen, "ADW", "adw_bottom_sheet_set_can_open", false) | |||
| 356 | - | ||||
| 357 | xBottomSheetSetCanOpen(x.GoPointer(), CanOpenVar) | 325 | xBottomSheetSetCanOpen(x.GoPointer(), CanOpenVar) | ||
| 358 | } | 326 | } | ||
| 359 | 327 | ||||
| @@ -363,8 +331,6 @@ var xBottomSheetSetContent func(uintptr, uintptr) | |||||
| 363 | // | 331 | // | ||
| 364 | // It's always shown, and the bottom sheet is overlaid over it. | 332 | // It's always shown, and the bottom sheet is overlaid over it. | ||
| 365 | func (x *BottomSheet) SetContent(ContentVar *gtk.Widget) { | 333 | func (x *BottomSheet) SetContent(ContentVar *gtk.Widget) { | ||
| 366 | - | core.LazyRegister(&xBottomSheetSetContent, "ADW", "adw_bottom_sheet_set_content", false) | |||
| 367 | - | ||||
| 368 | xBottomSheetSetContent(x.GoPointer(), ContentVar.GoPointer()) | 334 | xBottomSheetSetContent(x.GoPointer(), ContentVar.GoPointer()) | ||
| 369 | } | 335 | } | ||
| 370 | 336 | ||||
| @@ -374,8 +340,6 @@ var xBottomSheetSetFullWidth func(uintptr, bool) | |||||
| 374 | // | 340 | // | ||
| 375 | // When full width, [property@BottomSheet:align] is ignored. | 341 | // When full width, [property@BottomSheet:align] is ignored. | ||
| 376 | func (x *BottomSheet) SetFullWidth(FullWidthVar bool) { | 342 | func (x *BottomSheet) SetFullWidth(FullWidthVar bool) { | ||
| 377 | - | core.LazyRegister(&xBottomSheetSetFullWidth, "ADW", "adw_bottom_sheet_set_full_width", false) | |||
| 378 | - | ||||
| 379 | xBottomSheetSetFullWidth(x.GoPointer(), FullWidthVar) | 343 | xBottomSheetSetFullWidth(x.GoPointer(), FullWidthVar) | ||
| 380 | } | 344 | } | ||
| 381 | 345 | ||||
| @@ -389,8 +353,6 @@ var xBottomSheetSetModal func(uintptr, bool) | |||||
| 389 | // | 353 | // | ||
| 390 | // Otherwise, the content is accessible even when the bottom sheet is open. | 354 | // Otherwise, the content is accessible even when the bottom sheet is open. | ||
| 391 | func (x *BottomSheet) SetModal(ModalVar bool) { | 355 | func (x *BottomSheet) SetModal(ModalVar bool) { | ||
| 392 | - | core.LazyRegister(&xBottomSheetSetModal, "ADW", "adw_bottom_sheet_set_modal", false) | |||
| 393 | - | ||||
| 394 | xBottomSheetSetModal(x.GoPointer(), ModalVar) | 356 | xBottomSheetSetModal(x.GoPointer(), ModalVar) | ||
| 395 | } | 357 | } | ||
| 396 | 358 | ||||
| @@ -398,8 +360,6 @@ var xBottomSheetSetOpen func(uintptr, bool) | |||||
| 398 | 360 | ||||
| 399 | // Sets whether the bottom sheet is open. | 361 | // Sets whether the bottom sheet is open. | ||
| 400 | func (x *BottomSheet) SetOpen(OpenVar bool) { | 362 | func (x *BottomSheet) SetOpen(OpenVar bool) { | ||
| 401 | - | core.LazyRegister(&xBottomSheetSetOpen, "ADW", "adw_bottom_sheet_set_open", false) | |||
| 402 | - | ||||
| 403 | xBottomSheetSetOpen(x.GoPointer(), OpenVar) | 363 | xBottomSheetSetOpen(x.GoPointer(), OpenVar) | ||
| 404 | } | 364 | } | ||
| 405 | 365 | ||||
| @@ -412,8 +372,6 @@ var xBottomSheetSetRevealBottomBar func(uintptr, bool) | |||||
| 412 | // See [property@BottomSheet:bottom-bar] and | 372 | // See [property@BottomSheet:bottom-bar] and | ||
| 413 | // [property@BottomSheet:bottom-bar-height]. | 373 | // [property@BottomSheet:bottom-bar-height]. | ||
| 414 | func (x *BottomSheet) SetRevealBottomBar(RevealVar bool) { | 374 | func (x *BottomSheet) SetRevealBottomBar(RevealVar bool) { | ||
| 415 | - | core.LazyRegister(&xBottomSheetSetRevealBottomBar, "ADW", "adw_bottom_sheet_set_reveal_bottom_bar", false) | |||
| 416 | - | ||||
| 417 | xBottomSheetSetRevealBottomBar(x.GoPointer(), RevealVar) | 375 | xBottomSheetSetRevealBottomBar(x.GoPointer(), RevealVar) | ||
| 418 | } | 376 | } | ||
| 419 | 377 | ||||
| @@ -423,8 +381,6 @@ var xBottomSheetSetSheet func(uintptr, uintptr) | |||||
| 423 | // | 381 | // | ||
| 424 | // Only shown when [property@BottomSheet:open] is `TRUE`. | 382 | // Only shown when [property@BottomSheet:open] is `TRUE`. | ||
| 425 | func (x *BottomSheet) SetSheet(SheetVar *gtk.Widget) { | 383 | func (x *BottomSheet) SetSheet(SheetVar *gtk.Widget) { | ||
| 426 | - | core.LazyRegister(&xBottomSheetSetSheet, "ADW", "adw_bottom_sheet_set_sheet", false) | |||
| 427 | - | ||||
| 428 | xBottomSheetSetSheet(x.GoPointer(), SheetVar.GoPointer()) | 384 | xBottomSheetSetSheet(x.GoPointer(), SheetVar.GoPointer()) | ||
| 429 | } | 385 | } | ||
| 430 | 386 | ||||
| @@ -440,8 +396,6 @@ var xBottomSheetSetShowDragHandle func(uintptr, bool) | |||||
| 440 | // Showing drag handle also allows to swipe the bottom sheet down (and to swipe | 396 | // Showing drag handle also allows to swipe the bottom sheet down (and to swipe | ||
| 441 | // the bottom bar up) with a pointer, instead of just touchscreen. | 397 | // the bottom bar up) with a pointer, instead of just touchscreen. | ||
| 442 | func (x *BottomSheet) SetShowDragHandle(ShowDragHandleVar bool) { | 398 | func (x *BottomSheet) SetShowDragHandle(ShowDragHandleVar bool) { | ||
| 443 | - | core.LazyRegister(&xBottomSheetSetShowDragHandle, "ADW", "adw_bottom_sheet_set_show_drag_handle", false) | |||
| 444 | - | ||||
| 445 | xBottomSheetSetShowDragHandle(x.GoPointer(), ShowDragHandleVar) | 399 | xBottomSheetSetShowDragHandle(x.GoPointer(), ShowDragHandleVar) | ||
| 446 | } | 400 | } | ||
| 447 | 401 | ||||
| @@ -1016,4 +970,41 @@ func (x *BottomSheet) GetBuildableId() string { | |||||
| 1016 | func init() { | 970 | func init() { | ||
| 1017 | core.SetPackageName("ADW", "libadwaita-1") | 971 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 1018 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 972 | 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") | |||
| 1019 | } | 1010 | } | ||