github.com/primecitizens/pcz/std@v0.2.1/plat/js/web/apis44_js_wasm.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright 2023 The Prime Citizens 3 4 package web 5 6 import ( 7 "github.com/primecitizens/pcz/std/core/abi" 8 "github.com/primecitizens/pcz/std/ffi/js" 9 "github.com/primecitizens/pcz/std/plat/js/web/bindings" 10 ) 11 12 type NavigationInterceptHandlerFunc func(this js.Ref) js.Ref 13 14 func (fn NavigationInterceptHandlerFunc) Register() js.Func[func() js.Promise[js.Void]] { 15 return js.RegisterCallback[func() js.Promise[js.Void]]( 16 fn, abi.FuncPCABIInternal(fn), 17 ) 18 } 19 20 func (fn NavigationInterceptHandlerFunc) DispatchCallback( 21 targetPC uintptr, ctx *js.CallbackContext, 22 ) { 23 args := ctx.Args() 24 if len(args) != 0+1 /* js this */ || 25 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 26 js.ThrowInvalidCallbackInvocation() 27 } 28 29 if ctx.Return(fn( 30 args[0], 31 )) { 32 return 33 } 34 35 js.ThrowCallbackValueNotReturned() 36 } 37 38 type NavigationInterceptHandler[T any] struct { 39 Fn func(arg T, this js.Ref) js.Ref 40 Arg T 41 } 42 43 func (cb *NavigationInterceptHandler[T]) Register() js.Func[func() js.Promise[js.Void]] { 44 return js.RegisterCallback[func() js.Promise[js.Void]]( 45 cb, abi.FuncPCABIInternal(cb.Fn), 46 ) 47 } 48 49 func (cb *NavigationInterceptHandler[T]) DispatchCallback( 50 targetPC uintptr, ctx *js.CallbackContext, 51 ) { 52 args := ctx.Args() 53 if len(args) != 0+1 /* js this */ || 54 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 55 js.ThrowInvalidCallbackInvocation() 56 } 57 58 if ctx.Return(cb.Fn( 59 cb.Arg, 60 args[0], 61 )) { 62 return 63 } 64 65 js.ThrowCallbackValueNotReturned() 66 } 67 68 type NavigationFocusReset uint32 69 70 const ( 71 _ NavigationFocusReset = iota 72 73 NavigationFocusReset_AFTER_TRANSITION 74 NavigationFocusReset_MANUAL 75 ) 76 77 func (NavigationFocusReset) FromRef(str js.Ref) NavigationFocusReset { 78 return NavigationFocusReset(bindings.ConstOfNavigationFocusReset(str)) 79 } 80 81 func (x NavigationFocusReset) String() (string, bool) { 82 switch x { 83 case NavigationFocusReset_AFTER_TRANSITION: 84 return "after-transition", true 85 case NavigationFocusReset_MANUAL: 86 return "manual", true 87 default: 88 return "", false 89 } 90 } 91 92 type NavigationScrollBehavior uint32 93 94 const ( 95 _ NavigationScrollBehavior = iota 96 97 NavigationScrollBehavior_AFTER_TRANSITION 98 NavigationScrollBehavior_MANUAL 99 ) 100 101 func (NavigationScrollBehavior) FromRef(str js.Ref) NavigationScrollBehavior { 102 return NavigationScrollBehavior(bindings.ConstOfNavigationScrollBehavior(str)) 103 } 104 105 func (x NavigationScrollBehavior) String() (string, bool) { 106 switch x { 107 case NavigationScrollBehavior_AFTER_TRANSITION: 108 return "after-transition", true 109 case NavigationScrollBehavior_MANUAL: 110 return "manual", true 111 default: 112 return "", false 113 } 114 } 115 116 type NavigationInterceptOptions struct { 117 // Handler is "NavigationInterceptOptions.handler" 118 // 119 // Optional 120 Handler js.Func[func() js.Promise[js.Void]] 121 // FocusReset is "NavigationInterceptOptions.focusReset" 122 // 123 // Optional 124 FocusReset NavigationFocusReset 125 // Scroll is "NavigationInterceptOptions.scroll" 126 // 127 // Optional 128 Scroll NavigationScrollBehavior 129 130 FFI_USE bool 131 } 132 133 // FromRef calls UpdateFrom and returns a NavigationInterceptOptions with all fields set. 134 func (p NavigationInterceptOptions) FromRef(ref js.Ref) NavigationInterceptOptions { 135 p.UpdateFrom(ref) 136 return p 137 } 138 139 // New creates a new NavigationInterceptOptions in the application heap. 140 func (p NavigationInterceptOptions) New() js.Ref { 141 return bindings.NavigationInterceptOptionsJSLoad( 142 js.Pointer(&p), js.True, 0, 143 ) 144 } 145 146 // UpdateFrom copies value of all fields of the heap object to p. 147 func (p *NavigationInterceptOptions) UpdateFrom(ref js.Ref) { 148 bindings.NavigationInterceptOptionsJSStore( 149 js.Pointer(p), ref, 150 ) 151 } 152 153 // Update writes all fields of the p to the heap object referenced by ref. 154 func (p *NavigationInterceptOptions) Update(ref js.Ref) { 155 bindings.NavigationInterceptOptionsJSLoad( 156 js.Pointer(p), js.False, ref, 157 ) 158 } 159 160 // FreeMembers frees fields with heap reference, if recursive is true 161 // free all heap references reachable from p. 162 func (p *NavigationInterceptOptions) FreeMembers(recursive bool) { 163 js.Free( 164 p.Handler.Ref(), 165 ) 166 p.Handler = p.Handler.FromRef(js.Undefined) 167 } 168 169 func NewNavigateEvent(typ js.String, eventInitDict NavigateEventInit) (ret NavigateEvent) { 170 ret.ref = bindings.NewNavigateEventByNavigateEvent( 171 typ.Ref(), 172 js.Pointer(&eventInitDict)) 173 return 174 } 175 176 type NavigateEvent struct { 177 Event 178 } 179 180 func (this NavigateEvent) Once() NavigateEvent { 181 this.ref.Once() 182 return this 183 } 184 185 func (this NavigateEvent) Ref() js.Ref { 186 return this.Event.Ref() 187 } 188 189 func (this NavigateEvent) FromRef(ref js.Ref) NavigateEvent { 190 this.Event = this.Event.FromRef(ref) 191 return this 192 } 193 194 func (this NavigateEvent) Free() { 195 this.ref.Free() 196 } 197 198 // NavigationType returns the value of property "NavigateEvent.navigationType". 199 // 200 // It returns ok=false if there is no such property. 201 func (this NavigateEvent) NavigationType() (ret NavigationType, ok bool) { 202 ok = js.True == bindings.GetNavigateEventNavigationType( 203 this.ref, js.Pointer(&ret), 204 ) 205 return 206 } 207 208 // Destination returns the value of property "NavigateEvent.destination". 209 // 210 // It returns ok=false if there is no such property. 211 func (this NavigateEvent) Destination() (ret NavigationDestination, ok bool) { 212 ok = js.True == bindings.GetNavigateEventDestination( 213 this.ref, js.Pointer(&ret), 214 ) 215 return 216 } 217 218 // CanIntercept returns the value of property "NavigateEvent.canIntercept". 219 // 220 // It returns ok=false if there is no such property. 221 func (this NavigateEvent) CanIntercept() (ret bool, ok bool) { 222 ok = js.True == bindings.GetNavigateEventCanIntercept( 223 this.ref, js.Pointer(&ret), 224 ) 225 return 226 } 227 228 // UserInitiated returns the value of property "NavigateEvent.userInitiated". 229 // 230 // It returns ok=false if there is no such property. 231 func (this NavigateEvent) UserInitiated() (ret bool, ok bool) { 232 ok = js.True == bindings.GetNavigateEventUserInitiated( 233 this.ref, js.Pointer(&ret), 234 ) 235 return 236 } 237 238 // HashChange returns the value of property "NavigateEvent.hashChange". 239 // 240 // It returns ok=false if there is no such property. 241 func (this NavigateEvent) HashChange() (ret bool, ok bool) { 242 ok = js.True == bindings.GetNavigateEventHashChange( 243 this.ref, js.Pointer(&ret), 244 ) 245 return 246 } 247 248 // Signal returns the value of property "NavigateEvent.signal". 249 // 250 // It returns ok=false if there is no such property. 251 func (this NavigateEvent) Signal() (ret AbortSignal, ok bool) { 252 ok = js.True == bindings.GetNavigateEventSignal( 253 this.ref, js.Pointer(&ret), 254 ) 255 return 256 } 257 258 // FormData returns the value of property "NavigateEvent.formData". 259 // 260 // It returns ok=false if there is no such property. 261 func (this NavigateEvent) FormData() (ret FormData, ok bool) { 262 ok = js.True == bindings.GetNavigateEventFormData( 263 this.ref, js.Pointer(&ret), 264 ) 265 return 266 } 267 268 // DownloadRequest returns the value of property "NavigateEvent.downloadRequest". 269 // 270 // It returns ok=false if there is no such property. 271 func (this NavigateEvent) DownloadRequest() (ret js.String, ok bool) { 272 ok = js.True == bindings.GetNavigateEventDownloadRequest( 273 this.ref, js.Pointer(&ret), 274 ) 275 return 276 } 277 278 // Info returns the value of property "NavigateEvent.info". 279 // 280 // It returns ok=false if there is no such property. 281 func (this NavigateEvent) Info() (ret js.Any, ok bool) { 282 ok = js.True == bindings.GetNavigateEventInfo( 283 this.ref, js.Pointer(&ret), 284 ) 285 return 286 } 287 288 // HasUAVisualTransition returns the value of property "NavigateEvent.hasUAVisualTransition". 289 // 290 // It returns ok=false if there is no such property. 291 func (this NavigateEvent) HasUAVisualTransition() (ret bool, ok bool) { 292 ok = js.True == bindings.GetNavigateEventHasUAVisualTransition( 293 this.ref, js.Pointer(&ret), 294 ) 295 return 296 } 297 298 // HasFuncIntercept returns true if the method "NavigateEvent.intercept" exists. 299 func (this NavigateEvent) HasFuncIntercept() bool { 300 return js.True == bindings.HasFuncNavigateEventIntercept( 301 this.ref, 302 ) 303 } 304 305 // FuncIntercept returns the method "NavigateEvent.intercept". 306 func (this NavigateEvent) FuncIntercept() (fn js.Func[func(options NavigationInterceptOptions)]) { 307 bindings.FuncNavigateEventIntercept( 308 this.ref, js.Pointer(&fn), 309 ) 310 return 311 } 312 313 // Intercept calls the method "NavigateEvent.intercept". 314 func (this NavigateEvent) Intercept(options NavigationInterceptOptions) (ret js.Void) { 315 bindings.CallNavigateEventIntercept( 316 this.ref, js.Pointer(&ret), 317 js.Pointer(&options), 318 ) 319 320 return 321 } 322 323 // TryIntercept calls the method "NavigateEvent.intercept" 324 // in a try/catch block and returns (_, err, ok = false) when it went through 325 // the catch clause. 326 func (this NavigateEvent) TryIntercept(options NavigationInterceptOptions) (ret js.Void, exception js.Any, ok bool) { 327 ok = js.True == bindings.TryNavigateEventIntercept( 328 this.ref, js.Pointer(&ret), js.Pointer(&exception), 329 js.Pointer(&options), 330 ) 331 332 return 333 } 334 335 // HasFuncIntercept1 returns true if the method "NavigateEvent.intercept" exists. 336 func (this NavigateEvent) HasFuncIntercept1() bool { 337 return js.True == bindings.HasFuncNavigateEventIntercept1( 338 this.ref, 339 ) 340 } 341 342 // FuncIntercept1 returns the method "NavigateEvent.intercept". 343 func (this NavigateEvent) FuncIntercept1() (fn js.Func[func()]) { 344 bindings.FuncNavigateEventIntercept1( 345 this.ref, js.Pointer(&fn), 346 ) 347 return 348 } 349 350 // Intercept1 calls the method "NavigateEvent.intercept". 351 func (this NavigateEvent) Intercept1() (ret js.Void) { 352 bindings.CallNavigateEventIntercept1( 353 this.ref, js.Pointer(&ret), 354 ) 355 356 return 357 } 358 359 // TryIntercept1 calls the method "NavigateEvent.intercept" 360 // in a try/catch block and returns (_, err, ok = false) when it went through 361 // the catch clause. 362 func (this NavigateEvent) TryIntercept1() (ret js.Void, exception js.Any, ok bool) { 363 ok = js.True == bindings.TryNavigateEventIntercept1( 364 this.ref, js.Pointer(&ret), js.Pointer(&exception), 365 ) 366 367 return 368 } 369 370 // HasFuncScroll returns true if the method "NavigateEvent.scroll" exists. 371 func (this NavigateEvent) HasFuncScroll() bool { 372 return js.True == bindings.HasFuncNavigateEventScroll( 373 this.ref, 374 ) 375 } 376 377 // FuncScroll returns the method "NavigateEvent.scroll". 378 func (this NavigateEvent) FuncScroll() (fn js.Func[func()]) { 379 bindings.FuncNavigateEventScroll( 380 this.ref, js.Pointer(&fn), 381 ) 382 return 383 } 384 385 // Scroll calls the method "NavigateEvent.scroll". 386 func (this NavigateEvent) Scroll() (ret js.Void) { 387 bindings.CallNavigateEventScroll( 388 this.ref, js.Pointer(&ret), 389 ) 390 391 return 392 } 393 394 // TryScroll calls the method "NavigateEvent.scroll" 395 // in a try/catch block and returns (_, err, ok = false) when it went through 396 // the catch clause. 397 func (this NavigateEvent) TryScroll() (ret js.Void, exception js.Any, ok bool) { 398 ok = js.True == bindings.TryNavigateEventScroll( 399 this.ref, js.Pointer(&ret), js.Pointer(&exception), 400 ) 401 402 return 403 } 404 405 type NavigationCurrentEntryChangeEventInit struct { 406 // NavigationType is "NavigationCurrentEntryChangeEventInit.navigationType" 407 // 408 // Optional, defaults to null. 409 NavigationType NavigationType 410 // From is "NavigationCurrentEntryChangeEventInit.from" 411 // 412 // Required 413 From NavigationHistoryEntry 414 // Bubbles is "NavigationCurrentEntryChangeEventInit.bubbles" 415 // 416 // Optional, defaults to false. 417 // 418 // NOTE: FFI_USE_Bubbles MUST be set to true to make this field effective. 419 Bubbles bool 420 // Cancelable is "NavigationCurrentEntryChangeEventInit.cancelable" 421 // 422 // Optional, defaults to false. 423 // 424 // NOTE: FFI_USE_Cancelable MUST be set to true to make this field effective. 425 Cancelable bool 426 // Composed is "NavigationCurrentEntryChangeEventInit.composed" 427 // 428 // Optional, defaults to false. 429 // 430 // NOTE: FFI_USE_Composed MUST be set to true to make this field effective. 431 Composed bool 432 433 FFI_USE_Bubbles bool // for Bubbles. 434 FFI_USE_Cancelable bool // for Cancelable. 435 FFI_USE_Composed bool // for Composed. 436 437 FFI_USE bool 438 } 439 440 // FromRef calls UpdateFrom and returns a NavigationCurrentEntryChangeEventInit with all fields set. 441 func (p NavigationCurrentEntryChangeEventInit) FromRef(ref js.Ref) NavigationCurrentEntryChangeEventInit { 442 p.UpdateFrom(ref) 443 return p 444 } 445 446 // New creates a new NavigationCurrentEntryChangeEventInit in the application heap. 447 func (p NavigationCurrentEntryChangeEventInit) New() js.Ref { 448 return bindings.NavigationCurrentEntryChangeEventInitJSLoad( 449 js.Pointer(&p), js.True, 0, 450 ) 451 } 452 453 // UpdateFrom copies value of all fields of the heap object to p. 454 func (p *NavigationCurrentEntryChangeEventInit) UpdateFrom(ref js.Ref) { 455 bindings.NavigationCurrentEntryChangeEventInitJSStore( 456 js.Pointer(p), ref, 457 ) 458 } 459 460 // Update writes all fields of the p to the heap object referenced by ref. 461 func (p *NavigationCurrentEntryChangeEventInit) Update(ref js.Ref) { 462 bindings.NavigationCurrentEntryChangeEventInitJSLoad( 463 js.Pointer(p), js.False, ref, 464 ) 465 } 466 467 // FreeMembers frees fields with heap reference, if recursive is true 468 // free all heap references reachable from p. 469 func (p *NavigationCurrentEntryChangeEventInit) FreeMembers(recursive bool) { 470 js.Free( 471 p.From.Ref(), 472 ) 473 p.From = p.From.FromRef(js.Undefined) 474 } 475 476 func NewNavigationCurrentEntryChangeEvent(typ js.String, eventInitDict NavigationCurrentEntryChangeEventInit) (ret NavigationCurrentEntryChangeEvent) { 477 ret.ref = bindings.NewNavigationCurrentEntryChangeEventByNavigationCurrentEntryChangeEvent( 478 typ.Ref(), 479 js.Pointer(&eventInitDict)) 480 return 481 } 482 483 type NavigationCurrentEntryChangeEvent struct { 484 Event 485 } 486 487 func (this NavigationCurrentEntryChangeEvent) Once() NavigationCurrentEntryChangeEvent { 488 this.ref.Once() 489 return this 490 } 491 492 func (this NavigationCurrentEntryChangeEvent) Ref() js.Ref { 493 return this.Event.Ref() 494 } 495 496 func (this NavigationCurrentEntryChangeEvent) FromRef(ref js.Ref) NavigationCurrentEntryChangeEvent { 497 this.Event = this.Event.FromRef(ref) 498 return this 499 } 500 501 func (this NavigationCurrentEntryChangeEvent) Free() { 502 this.ref.Free() 503 } 504 505 // NavigationType returns the value of property "NavigationCurrentEntryChangeEvent.navigationType". 506 // 507 // It returns ok=false if there is no such property. 508 func (this NavigationCurrentEntryChangeEvent) NavigationType() (ret NavigationType, ok bool) { 509 ok = js.True == bindings.GetNavigationCurrentEntryChangeEventNavigationType( 510 this.ref, js.Pointer(&ret), 511 ) 512 return 513 } 514 515 // From returns the value of property "NavigationCurrentEntryChangeEvent.from". 516 // 517 // It returns ok=false if there is no such property. 518 func (this NavigationCurrentEntryChangeEvent) From() (ret NavigationHistoryEntry, ok bool) { 519 ok = js.True == bindings.GetNavigationCurrentEntryChangeEventFrom( 520 this.ref, js.Pointer(&ret), 521 ) 522 return 523 } 524 525 type NavigationEventInit struct { 526 // Dir is "NavigationEventInit.dir" 527 // 528 // Optional 529 Dir SpatialNavigationDirection 530 // RelatedTarget is "NavigationEventInit.relatedTarget" 531 // 532 // Optional, defaults to null. 533 RelatedTarget EventTarget 534 // View is "NavigationEventInit.view" 535 // 536 // Optional, defaults to null. 537 View Window 538 // Detail is "NavigationEventInit.detail" 539 // 540 // Optional, defaults to 0. 541 // 542 // NOTE: FFI_USE_Detail MUST be set to true to make this field effective. 543 Detail int32 544 // Bubbles is "NavigationEventInit.bubbles" 545 // 546 // Optional, defaults to false. 547 // 548 // NOTE: FFI_USE_Bubbles MUST be set to true to make this field effective. 549 Bubbles bool 550 // Cancelable is "NavigationEventInit.cancelable" 551 // 552 // Optional, defaults to false. 553 // 554 // NOTE: FFI_USE_Cancelable MUST be set to true to make this field effective. 555 Cancelable bool 556 // Composed is "NavigationEventInit.composed" 557 // 558 // Optional, defaults to false. 559 // 560 // NOTE: FFI_USE_Composed MUST be set to true to make this field effective. 561 Composed bool 562 563 FFI_USE_Detail bool // for Detail. 564 FFI_USE_Bubbles bool // for Bubbles. 565 FFI_USE_Cancelable bool // for Cancelable. 566 FFI_USE_Composed bool // for Composed. 567 568 FFI_USE bool 569 } 570 571 // FromRef calls UpdateFrom and returns a NavigationEventInit with all fields set. 572 func (p NavigationEventInit) FromRef(ref js.Ref) NavigationEventInit { 573 p.UpdateFrom(ref) 574 return p 575 } 576 577 // New creates a new NavigationEventInit in the application heap. 578 func (p NavigationEventInit) New() js.Ref { 579 return bindings.NavigationEventInitJSLoad( 580 js.Pointer(&p), js.True, 0, 581 ) 582 } 583 584 // UpdateFrom copies value of all fields of the heap object to p. 585 func (p *NavigationEventInit) UpdateFrom(ref js.Ref) { 586 bindings.NavigationEventInitJSStore( 587 js.Pointer(p), ref, 588 ) 589 } 590 591 // Update writes all fields of the p to the heap object referenced by ref. 592 func (p *NavigationEventInit) Update(ref js.Ref) { 593 bindings.NavigationEventInitJSLoad( 594 js.Pointer(p), js.False, ref, 595 ) 596 } 597 598 // FreeMembers frees fields with heap reference, if recursive is true 599 // free all heap references reachable from p. 600 func (p *NavigationEventInit) FreeMembers(recursive bool) { 601 js.Free( 602 p.RelatedTarget.Ref(), 603 p.View.Ref(), 604 ) 605 p.RelatedTarget = p.RelatedTarget.FromRef(js.Undefined) 606 p.View = p.View.FromRef(js.Undefined) 607 } 608 609 func NewNavigationEvent(typ js.String, eventInitDict NavigationEventInit) (ret NavigationEvent) { 610 ret.ref = bindings.NewNavigationEventByNavigationEvent( 611 typ.Ref(), 612 js.Pointer(&eventInitDict)) 613 return 614 } 615 616 func NewNavigationEventByNavigationEvent1(typ js.String) (ret NavigationEvent) { 617 ret.ref = bindings.NewNavigationEventByNavigationEvent1( 618 typ.Ref()) 619 return 620 } 621 622 type NavigationEvent struct { 623 UIEvent 624 } 625 626 func (this NavigationEvent) Once() NavigationEvent { 627 this.ref.Once() 628 return this 629 } 630 631 func (this NavigationEvent) Ref() js.Ref { 632 return this.UIEvent.Ref() 633 } 634 635 func (this NavigationEvent) FromRef(ref js.Ref) NavigationEvent { 636 this.UIEvent = this.UIEvent.FromRef(ref) 637 return this 638 } 639 640 func (this NavigationEvent) Free() { 641 this.ref.Free() 642 } 643 644 // Dir returns the value of property "NavigationEvent.dir". 645 // 646 // It returns ok=false if there is no such property. 647 func (this NavigationEvent) Dir() (ret SpatialNavigationDirection, ok bool) { 648 ok = js.True == bindings.GetNavigationEventDir( 649 this.ref, js.Pointer(&ret), 650 ) 651 return 652 } 653 654 // RelatedTarget returns the value of property "NavigationEvent.relatedTarget". 655 // 656 // It returns ok=false if there is no such property. 657 func (this NavigationEvent) RelatedTarget() (ret EventTarget, ok bool) { 658 ok = js.True == bindings.GetNavigationEventRelatedTarget( 659 this.ref, js.Pointer(&ret), 660 ) 661 return 662 } 663 664 type NavigationTimingType uint32 665 666 const ( 667 _ NavigationTimingType = iota 668 669 NavigationTimingType_NAVIGATE 670 NavigationTimingType_RELOAD 671 NavigationTimingType_BACK_FORWARD 672 NavigationTimingType_PRERENDER 673 ) 674 675 func (NavigationTimingType) FromRef(str js.Ref) NavigationTimingType { 676 return NavigationTimingType(bindings.ConstOfNavigationTimingType(str)) 677 } 678 679 func (x NavigationTimingType) String() (string, bool) { 680 switch x { 681 case NavigationTimingType_NAVIGATE: 682 return "navigate", true 683 case NavigationTimingType_RELOAD: 684 return "reload", true 685 case NavigationTimingType_BACK_FORWARD: 686 return "back_forward", true 687 case NavigationTimingType_PRERENDER: 688 return "prerender", true 689 default: 690 return "", false 691 } 692 } 693 694 type NotificationEventInit struct { 695 // Notification is "NotificationEventInit.notification" 696 // 697 // Required 698 Notification Notification 699 // Action is "NotificationEventInit.action" 700 // 701 // Optional, defaults to "". 702 Action js.String 703 // Bubbles is "NotificationEventInit.bubbles" 704 // 705 // Optional, defaults to false. 706 // 707 // NOTE: FFI_USE_Bubbles MUST be set to true to make this field effective. 708 Bubbles bool 709 // Cancelable is "NotificationEventInit.cancelable" 710 // 711 // Optional, defaults to false. 712 // 713 // NOTE: FFI_USE_Cancelable MUST be set to true to make this field effective. 714 Cancelable bool 715 // Composed is "NotificationEventInit.composed" 716 // 717 // Optional, defaults to false. 718 // 719 // NOTE: FFI_USE_Composed MUST be set to true to make this field effective. 720 Composed bool 721 722 FFI_USE_Bubbles bool // for Bubbles. 723 FFI_USE_Cancelable bool // for Cancelable. 724 FFI_USE_Composed bool // for Composed. 725 726 FFI_USE bool 727 } 728 729 // FromRef calls UpdateFrom and returns a NotificationEventInit with all fields set. 730 func (p NotificationEventInit) FromRef(ref js.Ref) NotificationEventInit { 731 p.UpdateFrom(ref) 732 return p 733 } 734 735 // New creates a new NotificationEventInit in the application heap. 736 func (p NotificationEventInit) New() js.Ref { 737 return bindings.NotificationEventInitJSLoad( 738 js.Pointer(&p), js.True, 0, 739 ) 740 } 741 742 // UpdateFrom copies value of all fields of the heap object to p. 743 func (p *NotificationEventInit) UpdateFrom(ref js.Ref) { 744 bindings.NotificationEventInitJSStore( 745 js.Pointer(p), ref, 746 ) 747 } 748 749 // Update writes all fields of the p to the heap object referenced by ref. 750 func (p *NotificationEventInit) Update(ref js.Ref) { 751 bindings.NotificationEventInitJSLoad( 752 js.Pointer(p), js.False, ref, 753 ) 754 } 755 756 // FreeMembers frees fields with heap reference, if recursive is true 757 // free all heap references reachable from p. 758 func (p *NotificationEventInit) FreeMembers(recursive bool) { 759 js.Free( 760 p.Notification.Ref(), 761 p.Action.Ref(), 762 ) 763 p.Notification = p.Notification.FromRef(js.Undefined) 764 p.Action = p.Action.FromRef(js.Undefined) 765 } 766 767 func NewNotificationEvent(typ js.String, eventInitDict NotificationEventInit) (ret NotificationEvent) { 768 ret.ref = bindings.NewNotificationEventByNotificationEvent( 769 typ.Ref(), 770 js.Pointer(&eventInitDict)) 771 return 772 } 773 774 type NotificationEvent struct { 775 ExtendableEvent 776 } 777 778 func (this NotificationEvent) Once() NotificationEvent { 779 this.ref.Once() 780 return this 781 } 782 783 func (this NotificationEvent) Ref() js.Ref { 784 return this.ExtendableEvent.Ref() 785 } 786 787 func (this NotificationEvent) FromRef(ref js.Ref) NotificationEvent { 788 this.ExtendableEvent = this.ExtendableEvent.FromRef(ref) 789 return this 790 } 791 792 func (this NotificationEvent) Free() { 793 this.ref.Free() 794 } 795 796 // Notification returns the value of property "NotificationEvent.notification". 797 // 798 // It returns ok=false if there is no such property. 799 func (this NotificationEvent) Notification() (ret Notification, ok bool) { 800 ok = js.True == bindings.GetNotificationEventNotification( 801 this.ref, js.Pointer(&ret), 802 ) 803 return 804 } 805 806 // Action returns the value of property "NotificationEvent.action". 807 // 808 // It returns ok=false if there is no such property. 809 func (this NotificationEvent) Action() (ret js.String, ok bool) { 810 ok = js.True == bindings.GetNotificationEventAction( 811 this.ref, js.Pointer(&ret), 812 ) 813 return 814 } 815 816 type OES_draw_buffers_indexed struct { 817 ref js.Ref 818 } 819 820 func (this OES_draw_buffers_indexed) Once() OES_draw_buffers_indexed { 821 this.ref.Once() 822 return this 823 } 824 825 func (this OES_draw_buffers_indexed) Ref() js.Ref { 826 return this.ref 827 } 828 829 func (this OES_draw_buffers_indexed) FromRef(ref js.Ref) OES_draw_buffers_indexed { 830 this.ref = ref 831 return this 832 } 833 834 func (this OES_draw_buffers_indexed) Free() { 835 this.ref.Free() 836 } 837 838 // HasFuncEnableiOES returns true if the method "OES_draw_buffers_indexed.enableiOES" exists. 839 func (this OES_draw_buffers_indexed) HasFuncEnableiOES() bool { 840 return js.True == bindings.HasFuncOES_draw_buffers_indexedEnableiOES( 841 this.ref, 842 ) 843 } 844 845 // FuncEnableiOES returns the method "OES_draw_buffers_indexed.enableiOES". 846 func (this OES_draw_buffers_indexed) FuncEnableiOES() (fn js.Func[func(target GLenum, index GLuint)]) { 847 bindings.FuncOES_draw_buffers_indexedEnableiOES( 848 this.ref, js.Pointer(&fn), 849 ) 850 return 851 } 852 853 // EnableiOES calls the method "OES_draw_buffers_indexed.enableiOES". 854 func (this OES_draw_buffers_indexed) EnableiOES(target GLenum, index GLuint) (ret js.Void) { 855 bindings.CallOES_draw_buffers_indexedEnableiOES( 856 this.ref, js.Pointer(&ret), 857 uint32(target), 858 uint32(index), 859 ) 860 861 return 862 } 863 864 // TryEnableiOES calls the method "OES_draw_buffers_indexed.enableiOES" 865 // in a try/catch block and returns (_, err, ok = false) when it went through 866 // the catch clause. 867 func (this OES_draw_buffers_indexed) TryEnableiOES(target GLenum, index GLuint) (ret js.Void, exception js.Any, ok bool) { 868 ok = js.True == bindings.TryOES_draw_buffers_indexedEnableiOES( 869 this.ref, js.Pointer(&ret), js.Pointer(&exception), 870 uint32(target), 871 uint32(index), 872 ) 873 874 return 875 } 876 877 // HasFuncDisableiOES returns true if the method "OES_draw_buffers_indexed.disableiOES" exists. 878 func (this OES_draw_buffers_indexed) HasFuncDisableiOES() bool { 879 return js.True == bindings.HasFuncOES_draw_buffers_indexedDisableiOES( 880 this.ref, 881 ) 882 } 883 884 // FuncDisableiOES returns the method "OES_draw_buffers_indexed.disableiOES". 885 func (this OES_draw_buffers_indexed) FuncDisableiOES() (fn js.Func[func(target GLenum, index GLuint)]) { 886 bindings.FuncOES_draw_buffers_indexedDisableiOES( 887 this.ref, js.Pointer(&fn), 888 ) 889 return 890 } 891 892 // DisableiOES calls the method "OES_draw_buffers_indexed.disableiOES". 893 func (this OES_draw_buffers_indexed) DisableiOES(target GLenum, index GLuint) (ret js.Void) { 894 bindings.CallOES_draw_buffers_indexedDisableiOES( 895 this.ref, js.Pointer(&ret), 896 uint32(target), 897 uint32(index), 898 ) 899 900 return 901 } 902 903 // TryDisableiOES calls the method "OES_draw_buffers_indexed.disableiOES" 904 // in a try/catch block and returns (_, err, ok = false) when it went through 905 // the catch clause. 906 func (this OES_draw_buffers_indexed) TryDisableiOES(target GLenum, index GLuint) (ret js.Void, exception js.Any, ok bool) { 907 ok = js.True == bindings.TryOES_draw_buffers_indexedDisableiOES( 908 this.ref, js.Pointer(&ret), js.Pointer(&exception), 909 uint32(target), 910 uint32(index), 911 ) 912 913 return 914 } 915 916 // HasFuncBlendEquationiOES returns true if the method "OES_draw_buffers_indexed.blendEquationiOES" exists. 917 func (this OES_draw_buffers_indexed) HasFuncBlendEquationiOES() bool { 918 return js.True == bindings.HasFuncOES_draw_buffers_indexedBlendEquationiOES( 919 this.ref, 920 ) 921 } 922 923 // FuncBlendEquationiOES returns the method "OES_draw_buffers_indexed.blendEquationiOES". 924 func (this OES_draw_buffers_indexed) FuncBlendEquationiOES() (fn js.Func[func(buf GLuint, mode GLenum)]) { 925 bindings.FuncOES_draw_buffers_indexedBlendEquationiOES( 926 this.ref, js.Pointer(&fn), 927 ) 928 return 929 } 930 931 // BlendEquationiOES calls the method "OES_draw_buffers_indexed.blendEquationiOES". 932 func (this OES_draw_buffers_indexed) BlendEquationiOES(buf GLuint, mode GLenum) (ret js.Void) { 933 bindings.CallOES_draw_buffers_indexedBlendEquationiOES( 934 this.ref, js.Pointer(&ret), 935 uint32(buf), 936 uint32(mode), 937 ) 938 939 return 940 } 941 942 // TryBlendEquationiOES calls the method "OES_draw_buffers_indexed.blendEquationiOES" 943 // in a try/catch block and returns (_, err, ok = false) when it went through 944 // the catch clause. 945 func (this OES_draw_buffers_indexed) TryBlendEquationiOES(buf GLuint, mode GLenum) (ret js.Void, exception js.Any, ok bool) { 946 ok = js.True == bindings.TryOES_draw_buffers_indexedBlendEquationiOES( 947 this.ref, js.Pointer(&ret), js.Pointer(&exception), 948 uint32(buf), 949 uint32(mode), 950 ) 951 952 return 953 } 954 955 // HasFuncBlendEquationSeparateiOES returns true if the method "OES_draw_buffers_indexed.blendEquationSeparateiOES" exists. 956 func (this OES_draw_buffers_indexed) HasFuncBlendEquationSeparateiOES() bool { 957 return js.True == bindings.HasFuncOES_draw_buffers_indexedBlendEquationSeparateiOES( 958 this.ref, 959 ) 960 } 961 962 // FuncBlendEquationSeparateiOES returns the method "OES_draw_buffers_indexed.blendEquationSeparateiOES". 963 func (this OES_draw_buffers_indexed) FuncBlendEquationSeparateiOES() (fn js.Func[func(buf GLuint, modeRGB GLenum, modeAlpha GLenum)]) { 964 bindings.FuncOES_draw_buffers_indexedBlendEquationSeparateiOES( 965 this.ref, js.Pointer(&fn), 966 ) 967 return 968 } 969 970 // BlendEquationSeparateiOES calls the method "OES_draw_buffers_indexed.blendEquationSeparateiOES". 971 func (this OES_draw_buffers_indexed) BlendEquationSeparateiOES(buf GLuint, modeRGB GLenum, modeAlpha GLenum) (ret js.Void) { 972 bindings.CallOES_draw_buffers_indexedBlendEquationSeparateiOES( 973 this.ref, js.Pointer(&ret), 974 uint32(buf), 975 uint32(modeRGB), 976 uint32(modeAlpha), 977 ) 978 979 return 980 } 981 982 // TryBlendEquationSeparateiOES calls the method "OES_draw_buffers_indexed.blendEquationSeparateiOES" 983 // in a try/catch block and returns (_, err, ok = false) when it went through 984 // the catch clause. 985 func (this OES_draw_buffers_indexed) TryBlendEquationSeparateiOES(buf GLuint, modeRGB GLenum, modeAlpha GLenum) (ret js.Void, exception js.Any, ok bool) { 986 ok = js.True == bindings.TryOES_draw_buffers_indexedBlendEquationSeparateiOES( 987 this.ref, js.Pointer(&ret), js.Pointer(&exception), 988 uint32(buf), 989 uint32(modeRGB), 990 uint32(modeAlpha), 991 ) 992 993 return 994 } 995 996 // HasFuncBlendFunciOES returns true if the method "OES_draw_buffers_indexed.blendFunciOES" exists. 997 func (this OES_draw_buffers_indexed) HasFuncBlendFunciOES() bool { 998 return js.True == bindings.HasFuncOES_draw_buffers_indexedBlendFunciOES( 999 this.ref, 1000 ) 1001 } 1002 1003 // FuncBlendFunciOES returns the method "OES_draw_buffers_indexed.blendFunciOES". 1004 func (this OES_draw_buffers_indexed) FuncBlendFunciOES() (fn js.Func[func(buf GLuint, src GLenum, dst GLenum)]) { 1005 bindings.FuncOES_draw_buffers_indexedBlendFunciOES( 1006 this.ref, js.Pointer(&fn), 1007 ) 1008 return 1009 } 1010 1011 // BlendFunciOES calls the method "OES_draw_buffers_indexed.blendFunciOES". 1012 func (this OES_draw_buffers_indexed) BlendFunciOES(buf GLuint, src GLenum, dst GLenum) (ret js.Void) { 1013 bindings.CallOES_draw_buffers_indexedBlendFunciOES( 1014 this.ref, js.Pointer(&ret), 1015 uint32(buf), 1016 uint32(src), 1017 uint32(dst), 1018 ) 1019 1020 return 1021 } 1022 1023 // TryBlendFunciOES calls the method "OES_draw_buffers_indexed.blendFunciOES" 1024 // in a try/catch block and returns (_, err, ok = false) when it went through 1025 // the catch clause. 1026 func (this OES_draw_buffers_indexed) TryBlendFunciOES(buf GLuint, src GLenum, dst GLenum) (ret js.Void, exception js.Any, ok bool) { 1027 ok = js.True == bindings.TryOES_draw_buffers_indexedBlendFunciOES( 1028 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1029 uint32(buf), 1030 uint32(src), 1031 uint32(dst), 1032 ) 1033 1034 return 1035 } 1036 1037 // HasFuncBlendFuncSeparateiOES returns true if the method "OES_draw_buffers_indexed.blendFuncSeparateiOES" exists. 1038 func (this OES_draw_buffers_indexed) HasFuncBlendFuncSeparateiOES() bool { 1039 return js.True == bindings.HasFuncOES_draw_buffers_indexedBlendFuncSeparateiOES( 1040 this.ref, 1041 ) 1042 } 1043 1044 // FuncBlendFuncSeparateiOES returns the method "OES_draw_buffers_indexed.blendFuncSeparateiOES". 1045 func (this OES_draw_buffers_indexed) FuncBlendFuncSeparateiOES() (fn js.Func[func(buf GLuint, srcRGB GLenum, dstRGB GLenum, srcAlpha GLenum, dstAlpha GLenum)]) { 1046 bindings.FuncOES_draw_buffers_indexedBlendFuncSeparateiOES( 1047 this.ref, js.Pointer(&fn), 1048 ) 1049 return 1050 } 1051 1052 // BlendFuncSeparateiOES calls the method "OES_draw_buffers_indexed.blendFuncSeparateiOES". 1053 func (this OES_draw_buffers_indexed) BlendFuncSeparateiOES(buf GLuint, srcRGB GLenum, dstRGB GLenum, srcAlpha GLenum, dstAlpha GLenum) (ret js.Void) { 1054 bindings.CallOES_draw_buffers_indexedBlendFuncSeparateiOES( 1055 this.ref, js.Pointer(&ret), 1056 uint32(buf), 1057 uint32(srcRGB), 1058 uint32(dstRGB), 1059 uint32(srcAlpha), 1060 uint32(dstAlpha), 1061 ) 1062 1063 return 1064 } 1065 1066 // TryBlendFuncSeparateiOES calls the method "OES_draw_buffers_indexed.blendFuncSeparateiOES" 1067 // in a try/catch block and returns (_, err, ok = false) when it went through 1068 // the catch clause. 1069 func (this OES_draw_buffers_indexed) TryBlendFuncSeparateiOES(buf GLuint, srcRGB GLenum, dstRGB GLenum, srcAlpha GLenum, dstAlpha GLenum) (ret js.Void, exception js.Any, ok bool) { 1070 ok = js.True == bindings.TryOES_draw_buffers_indexedBlendFuncSeparateiOES( 1071 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1072 uint32(buf), 1073 uint32(srcRGB), 1074 uint32(dstRGB), 1075 uint32(srcAlpha), 1076 uint32(dstAlpha), 1077 ) 1078 1079 return 1080 } 1081 1082 // HasFuncColorMaskiOES returns true if the method "OES_draw_buffers_indexed.colorMaskiOES" exists. 1083 func (this OES_draw_buffers_indexed) HasFuncColorMaskiOES() bool { 1084 return js.True == bindings.HasFuncOES_draw_buffers_indexedColorMaskiOES( 1085 this.ref, 1086 ) 1087 } 1088 1089 // FuncColorMaskiOES returns the method "OES_draw_buffers_indexed.colorMaskiOES". 1090 func (this OES_draw_buffers_indexed) FuncColorMaskiOES() (fn js.Func[func(buf GLuint, r GLboolean, g GLboolean, b GLboolean, a GLboolean)]) { 1091 bindings.FuncOES_draw_buffers_indexedColorMaskiOES( 1092 this.ref, js.Pointer(&fn), 1093 ) 1094 return 1095 } 1096 1097 // ColorMaskiOES calls the method "OES_draw_buffers_indexed.colorMaskiOES". 1098 func (this OES_draw_buffers_indexed) ColorMaskiOES(buf GLuint, r GLboolean, g GLboolean, b GLboolean, a GLboolean) (ret js.Void) { 1099 bindings.CallOES_draw_buffers_indexedColorMaskiOES( 1100 this.ref, js.Pointer(&ret), 1101 uint32(buf), 1102 js.Bool(bool(r)), 1103 js.Bool(bool(g)), 1104 js.Bool(bool(b)), 1105 js.Bool(bool(a)), 1106 ) 1107 1108 return 1109 } 1110 1111 // TryColorMaskiOES calls the method "OES_draw_buffers_indexed.colorMaskiOES" 1112 // in a try/catch block and returns (_, err, ok = false) when it went through 1113 // the catch clause. 1114 func (this OES_draw_buffers_indexed) TryColorMaskiOES(buf GLuint, r GLboolean, g GLboolean, b GLboolean, a GLboolean) (ret js.Void, exception js.Any, ok bool) { 1115 ok = js.True == bindings.TryOES_draw_buffers_indexedColorMaskiOES( 1116 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1117 uint32(buf), 1118 js.Bool(bool(r)), 1119 js.Bool(bool(g)), 1120 js.Bool(bool(b)), 1121 js.Bool(bool(a)), 1122 ) 1123 1124 return 1125 } 1126 1127 type OES_element_index_uint struct { 1128 ref js.Ref 1129 } 1130 1131 func (this OES_element_index_uint) Once() OES_element_index_uint { 1132 this.ref.Once() 1133 return this 1134 } 1135 1136 func (this OES_element_index_uint) Ref() js.Ref { 1137 return this.ref 1138 } 1139 1140 func (this OES_element_index_uint) FromRef(ref js.Ref) OES_element_index_uint { 1141 this.ref = ref 1142 return this 1143 } 1144 1145 func (this OES_element_index_uint) Free() { 1146 this.ref.Free() 1147 } 1148 1149 type OES_fbo_render_mipmap struct { 1150 ref js.Ref 1151 } 1152 1153 func (this OES_fbo_render_mipmap) Once() OES_fbo_render_mipmap { 1154 this.ref.Once() 1155 return this 1156 } 1157 1158 func (this OES_fbo_render_mipmap) Ref() js.Ref { 1159 return this.ref 1160 } 1161 1162 func (this OES_fbo_render_mipmap) FromRef(ref js.Ref) OES_fbo_render_mipmap { 1163 this.ref = ref 1164 return this 1165 } 1166 1167 func (this OES_fbo_render_mipmap) Free() { 1168 this.ref.Free() 1169 } 1170 1171 const ( 1172 OES_standard_derivatives_FRAGMENT_SHADER_DERIVATIVE_HINT_OES GLenum = 0x8B8B 1173 ) 1174 1175 type OES_standard_derivatives struct { 1176 ref js.Ref 1177 } 1178 1179 func (this OES_standard_derivatives) Once() OES_standard_derivatives { 1180 this.ref.Once() 1181 return this 1182 } 1183 1184 func (this OES_standard_derivatives) Ref() js.Ref { 1185 return this.ref 1186 } 1187 1188 func (this OES_standard_derivatives) FromRef(ref js.Ref) OES_standard_derivatives { 1189 this.ref = ref 1190 return this 1191 } 1192 1193 func (this OES_standard_derivatives) Free() { 1194 this.ref.Free() 1195 } 1196 1197 type OES_texture_float struct { 1198 ref js.Ref 1199 } 1200 1201 func (this OES_texture_float) Once() OES_texture_float { 1202 this.ref.Once() 1203 return this 1204 } 1205 1206 func (this OES_texture_float) Ref() js.Ref { 1207 return this.ref 1208 } 1209 1210 func (this OES_texture_float) FromRef(ref js.Ref) OES_texture_float { 1211 this.ref = ref 1212 return this 1213 } 1214 1215 func (this OES_texture_float) Free() { 1216 this.ref.Free() 1217 } 1218 1219 type OES_texture_float_linear struct { 1220 ref js.Ref 1221 } 1222 1223 func (this OES_texture_float_linear) Once() OES_texture_float_linear { 1224 this.ref.Once() 1225 return this 1226 } 1227 1228 func (this OES_texture_float_linear) Ref() js.Ref { 1229 return this.ref 1230 } 1231 1232 func (this OES_texture_float_linear) FromRef(ref js.Ref) OES_texture_float_linear { 1233 this.ref = ref 1234 return this 1235 } 1236 1237 func (this OES_texture_float_linear) Free() { 1238 this.ref.Free() 1239 } 1240 1241 const ( 1242 OES_texture_half_float_HALF_FLOAT_OES GLenum = 0x8D61 1243 ) 1244 1245 type OES_texture_half_float struct { 1246 ref js.Ref 1247 } 1248 1249 func (this OES_texture_half_float) Once() OES_texture_half_float { 1250 this.ref.Once() 1251 return this 1252 } 1253 1254 func (this OES_texture_half_float) Ref() js.Ref { 1255 return this.ref 1256 } 1257 1258 func (this OES_texture_half_float) FromRef(ref js.Ref) OES_texture_half_float { 1259 this.ref = ref 1260 return this 1261 } 1262 1263 func (this OES_texture_half_float) Free() { 1264 this.ref.Free() 1265 } 1266 1267 type OES_texture_half_float_linear struct { 1268 ref js.Ref 1269 } 1270 1271 func (this OES_texture_half_float_linear) Once() OES_texture_half_float_linear { 1272 this.ref.Once() 1273 return this 1274 } 1275 1276 func (this OES_texture_half_float_linear) Ref() js.Ref { 1277 return this.ref 1278 } 1279 1280 func (this OES_texture_half_float_linear) FromRef(ref js.Ref) OES_texture_half_float_linear { 1281 this.ref = ref 1282 return this 1283 } 1284 1285 func (this OES_texture_half_float_linear) Free() { 1286 this.ref.Free() 1287 } 1288 1289 const ( 1290 OES_vertex_array_object_VERTEX_ARRAY_BINDING_OES GLenum = 0x85B5 1291 ) 1292 1293 type WebGLVertexArrayObjectOES struct { 1294 WebGLObject 1295 } 1296 1297 func (this WebGLVertexArrayObjectOES) Once() WebGLVertexArrayObjectOES { 1298 this.ref.Once() 1299 return this 1300 } 1301 1302 func (this WebGLVertexArrayObjectOES) Ref() js.Ref { 1303 return this.WebGLObject.Ref() 1304 } 1305 1306 func (this WebGLVertexArrayObjectOES) FromRef(ref js.Ref) WebGLVertexArrayObjectOES { 1307 this.WebGLObject = this.WebGLObject.FromRef(ref) 1308 return this 1309 } 1310 1311 func (this WebGLVertexArrayObjectOES) Free() { 1312 this.ref.Free() 1313 } 1314 1315 type OES_vertex_array_object struct { 1316 ref js.Ref 1317 } 1318 1319 func (this OES_vertex_array_object) Once() OES_vertex_array_object { 1320 this.ref.Once() 1321 return this 1322 } 1323 1324 func (this OES_vertex_array_object) Ref() js.Ref { 1325 return this.ref 1326 } 1327 1328 func (this OES_vertex_array_object) FromRef(ref js.Ref) OES_vertex_array_object { 1329 this.ref = ref 1330 return this 1331 } 1332 1333 func (this OES_vertex_array_object) Free() { 1334 this.ref.Free() 1335 } 1336 1337 // HasFuncCreateVertexArrayOES returns true if the method "OES_vertex_array_object.createVertexArrayOES" exists. 1338 func (this OES_vertex_array_object) HasFuncCreateVertexArrayOES() bool { 1339 return js.True == bindings.HasFuncOES_vertex_array_objectCreateVertexArrayOES( 1340 this.ref, 1341 ) 1342 } 1343 1344 // FuncCreateVertexArrayOES returns the method "OES_vertex_array_object.createVertexArrayOES". 1345 func (this OES_vertex_array_object) FuncCreateVertexArrayOES() (fn js.Func[func() WebGLVertexArrayObjectOES]) { 1346 bindings.FuncOES_vertex_array_objectCreateVertexArrayOES( 1347 this.ref, js.Pointer(&fn), 1348 ) 1349 return 1350 } 1351 1352 // CreateVertexArrayOES calls the method "OES_vertex_array_object.createVertexArrayOES". 1353 func (this OES_vertex_array_object) CreateVertexArrayOES() (ret WebGLVertexArrayObjectOES) { 1354 bindings.CallOES_vertex_array_objectCreateVertexArrayOES( 1355 this.ref, js.Pointer(&ret), 1356 ) 1357 1358 return 1359 } 1360 1361 // TryCreateVertexArrayOES calls the method "OES_vertex_array_object.createVertexArrayOES" 1362 // in a try/catch block and returns (_, err, ok = false) when it went through 1363 // the catch clause. 1364 func (this OES_vertex_array_object) TryCreateVertexArrayOES() (ret WebGLVertexArrayObjectOES, exception js.Any, ok bool) { 1365 ok = js.True == bindings.TryOES_vertex_array_objectCreateVertexArrayOES( 1366 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1367 ) 1368 1369 return 1370 } 1371 1372 // HasFuncDeleteVertexArrayOES returns true if the method "OES_vertex_array_object.deleteVertexArrayOES" exists. 1373 func (this OES_vertex_array_object) HasFuncDeleteVertexArrayOES() bool { 1374 return js.True == bindings.HasFuncOES_vertex_array_objectDeleteVertexArrayOES( 1375 this.ref, 1376 ) 1377 } 1378 1379 // FuncDeleteVertexArrayOES returns the method "OES_vertex_array_object.deleteVertexArrayOES". 1380 func (this OES_vertex_array_object) FuncDeleteVertexArrayOES() (fn js.Func[func(arrayObject WebGLVertexArrayObjectOES)]) { 1381 bindings.FuncOES_vertex_array_objectDeleteVertexArrayOES( 1382 this.ref, js.Pointer(&fn), 1383 ) 1384 return 1385 } 1386 1387 // DeleteVertexArrayOES calls the method "OES_vertex_array_object.deleteVertexArrayOES". 1388 func (this OES_vertex_array_object) DeleteVertexArrayOES(arrayObject WebGLVertexArrayObjectOES) (ret js.Void) { 1389 bindings.CallOES_vertex_array_objectDeleteVertexArrayOES( 1390 this.ref, js.Pointer(&ret), 1391 arrayObject.Ref(), 1392 ) 1393 1394 return 1395 } 1396 1397 // TryDeleteVertexArrayOES calls the method "OES_vertex_array_object.deleteVertexArrayOES" 1398 // in a try/catch block and returns (_, err, ok = false) when it went through 1399 // the catch clause. 1400 func (this OES_vertex_array_object) TryDeleteVertexArrayOES(arrayObject WebGLVertexArrayObjectOES) (ret js.Void, exception js.Any, ok bool) { 1401 ok = js.True == bindings.TryOES_vertex_array_objectDeleteVertexArrayOES( 1402 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1403 arrayObject.Ref(), 1404 ) 1405 1406 return 1407 } 1408 1409 // HasFuncIsVertexArrayOES returns true if the method "OES_vertex_array_object.isVertexArrayOES" exists. 1410 func (this OES_vertex_array_object) HasFuncIsVertexArrayOES() bool { 1411 return js.True == bindings.HasFuncOES_vertex_array_objectIsVertexArrayOES( 1412 this.ref, 1413 ) 1414 } 1415 1416 // FuncIsVertexArrayOES returns the method "OES_vertex_array_object.isVertexArrayOES". 1417 func (this OES_vertex_array_object) FuncIsVertexArrayOES() (fn js.Func[func(arrayObject WebGLVertexArrayObjectOES) GLboolean]) { 1418 bindings.FuncOES_vertex_array_objectIsVertexArrayOES( 1419 this.ref, js.Pointer(&fn), 1420 ) 1421 return 1422 } 1423 1424 // IsVertexArrayOES calls the method "OES_vertex_array_object.isVertexArrayOES". 1425 func (this OES_vertex_array_object) IsVertexArrayOES(arrayObject WebGLVertexArrayObjectOES) (ret GLboolean) { 1426 bindings.CallOES_vertex_array_objectIsVertexArrayOES( 1427 this.ref, js.Pointer(&ret), 1428 arrayObject.Ref(), 1429 ) 1430 1431 return 1432 } 1433 1434 // TryIsVertexArrayOES calls the method "OES_vertex_array_object.isVertexArrayOES" 1435 // in a try/catch block and returns (_, err, ok = false) when it went through 1436 // the catch clause. 1437 func (this OES_vertex_array_object) TryIsVertexArrayOES(arrayObject WebGLVertexArrayObjectOES) (ret GLboolean, exception js.Any, ok bool) { 1438 ok = js.True == bindings.TryOES_vertex_array_objectIsVertexArrayOES( 1439 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1440 arrayObject.Ref(), 1441 ) 1442 1443 return 1444 } 1445 1446 // HasFuncBindVertexArrayOES returns true if the method "OES_vertex_array_object.bindVertexArrayOES" exists. 1447 func (this OES_vertex_array_object) HasFuncBindVertexArrayOES() bool { 1448 return js.True == bindings.HasFuncOES_vertex_array_objectBindVertexArrayOES( 1449 this.ref, 1450 ) 1451 } 1452 1453 // FuncBindVertexArrayOES returns the method "OES_vertex_array_object.bindVertexArrayOES". 1454 func (this OES_vertex_array_object) FuncBindVertexArrayOES() (fn js.Func[func(arrayObject WebGLVertexArrayObjectOES)]) { 1455 bindings.FuncOES_vertex_array_objectBindVertexArrayOES( 1456 this.ref, js.Pointer(&fn), 1457 ) 1458 return 1459 } 1460 1461 // BindVertexArrayOES calls the method "OES_vertex_array_object.bindVertexArrayOES". 1462 func (this OES_vertex_array_object) BindVertexArrayOES(arrayObject WebGLVertexArrayObjectOES) (ret js.Void) { 1463 bindings.CallOES_vertex_array_objectBindVertexArrayOES( 1464 this.ref, js.Pointer(&ret), 1465 arrayObject.Ref(), 1466 ) 1467 1468 return 1469 } 1470 1471 // TryBindVertexArrayOES calls the method "OES_vertex_array_object.bindVertexArrayOES" 1472 // in a try/catch block and returns (_, err, ok = false) when it went through 1473 // the catch clause. 1474 func (this OES_vertex_array_object) TryBindVertexArrayOES(arrayObject WebGLVertexArrayObjectOES) (ret js.Void, exception js.Any, ok bool) { 1475 ok = js.True == bindings.TryOES_vertex_array_objectBindVertexArrayOES( 1476 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1477 arrayObject.Ref(), 1478 ) 1479 1480 return 1481 } 1482 1483 type OTPCredential struct { 1484 Credential 1485 } 1486 1487 func (this OTPCredential) Once() OTPCredential { 1488 this.ref.Once() 1489 return this 1490 } 1491 1492 func (this OTPCredential) Ref() js.Ref { 1493 return this.Credential.Ref() 1494 } 1495 1496 func (this OTPCredential) FromRef(ref js.Ref) OTPCredential { 1497 this.Credential = this.Credential.FromRef(ref) 1498 return this 1499 } 1500 1501 func (this OTPCredential) Free() { 1502 this.ref.Free() 1503 } 1504 1505 // Code returns the value of property "OTPCredential.code". 1506 // 1507 // It returns ok=false if there is no such property. 1508 func (this OTPCredential) Code() (ret js.String, ok bool) { 1509 ok = js.True == bindings.GetOTPCredentialCode( 1510 this.ref, js.Pointer(&ret), 1511 ) 1512 return 1513 } 1514 1515 const ( 1516 OVR_multiview2_FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR GLenum = 0x9630 1517 OVR_multiview2_FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR GLenum = 0x9632 1518 OVR_multiview2_MAX_VIEWS_OVR GLenum = 0x9631 1519 OVR_multiview2_FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR GLenum = 0x9633 1520 ) 1521 1522 type OVR_multiview2 struct { 1523 ref js.Ref 1524 } 1525 1526 func (this OVR_multiview2) Once() OVR_multiview2 { 1527 this.ref.Once() 1528 return this 1529 } 1530 1531 func (this OVR_multiview2) Ref() js.Ref { 1532 return this.ref 1533 } 1534 1535 func (this OVR_multiview2) FromRef(ref js.Ref) OVR_multiview2 { 1536 this.ref = ref 1537 return this 1538 } 1539 1540 func (this OVR_multiview2) Free() { 1541 this.ref.Free() 1542 } 1543 1544 // HasFuncFramebufferTextureMultiviewOVR returns true if the method "OVR_multiview2.framebufferTextureMultiviewOVR" exists. 1545 func (this OVR_multiview2) HasFuncFramebufferTextureMultiviewOVR() bool { 1546 return js.True == bindings.HasFuncOVR_multiview2FramebufferTextureMultiviewOVR( 1547 this.ref, 1548 ) 1549 } 1550 1551 // FuncFramebufferTextureMultiviewOVR returns the method "OVR_multiview2.framebufferTextureMultiviewOVR". 1552 func (this OVR_multiview2) FuncFramebufferTextureMultiviewOVR() (fn js.Func[func(target GLenum, attachment GLenum, texture WebGLTexture, level GLint, baseViewIndex GLint, numViews GLsizei)]) { 1553 bindings.FuncOVR_multiview2FramebufferTextureMultiviewOVR( 1554 this.ref, js.Pointer(&fn), 1555 ) 1556 return 1557 } 1558 1559 // FramebufferTextureMultiviewOVR calls the method "OVR_multiview2.framebufferTextureMultiviewOVR". 1560 func (this OVR_multiview2) FramebufferTextureMultiviewOVR(target GLenum, attachment GLenum, texture WebGLTexture, level GLint, baseViewIndex GLint, numViews GLsizei) (ret js.Void) { 1561 bindings.CallOVR_multiview2FramebufferTextureMultiviewOVR( 1562 this.ref, js.Pointer(&ret), 1563 uint32(target), 1564 uint32(attachment), 1565 texture.Ref(), 1566 int32(level), 1567 int32(baseViewIndex), 1568 int32(numViews), 1569 ) 1570 1571 return 1572 } 1573 1574 // TryFramebufferTextureMultiviewOVR calls the method "OVR_multiview2.framebufferTextureMultiviewOVR" 1575 // in a try/catch block and returns (_, err, ok = false) when it went through 1576 // the catch clause. 1577 func (this OVR_multiview2) TryFramebufferTextureMultiviewOVR(target GLenum, attachment GLenum, texture WebGLTexture, level GLint, baseViewIndex GLint, numViews GLsizei) (ret js.Void, exception js.Any, ok bool) { 1578 ok = js.True == bindings.TryOVR_multiview2FramebufferTextureMultiviewOVR( 1579 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1580 uint32(target), 1581 uint32(attachment), 1582 texture.Ref(), 1583 int32(level), 1584 int32(baseViewIndex), 1585 int32(numViews), 1586 ) 1587 1588 return 1589 } 1590 1591 type OfflineAudioCompletionEventInit struct { 1592 // RenderedBuffer is "OfflineAudioCompletionEventInit.renderedBuffer" 1593 // 1594 // Required 1595 RenderedBuffer AudioBuffer 1596 // Bubbles is "OfflineAudioCompletionEventInit.bubbles" 1597 // 1598 // Optional, defaults to false. 1599 // 1600 // NOTE: FFI_USE_Bubbles MUST be set to true to make this field effective. 1601 Bubbles bool 1602 // Cancelable is "OfflineAudioCompletionEventInit.cancelable" 1603 // 1604 // Optional, defaults to false. 1605 // 1606 // NOTE: FFI_USE_Cancelable MUST be set to true to make this field effective. 1607 Cancelable bool 1608 // Composed is "OfflineAudioCompletionEventInit.composed" 1609 // 1610 // Optional, defaults to false. 1611 // 1612 // NOTE: FFI_USE_Composed MUST be set to true to make this field effective. 1613 Composed bool 1614 1615 FFI_USE_Bubbles bool // for Bubbles. 1616 FFI_USE_Cancelable bool // for Cancelable. 1617 FFI_USE_Composed bool // for Composed. 1618 1619 FFI_USE bool 1620 } 1621 1622 // FromRef calls UpdateFrom and returns a OfflineAudioCompletionEventInit with all fields set. 1623 func (p OfflineAudioCompletionEventInit) FromRef(ref js.Ref) OfflineAudioCompletionEventInit { 1624 p.UpdateFrom(ref) 1625 return p 1626 } 1627 1628 // New creates a new OfflineAudioCompletionEventInit in the application heap. 1629 func (p OfflineAudioCompletionEventInit) New() js.Ref { 1630 return bindings.OfflineAudioCompletionEventInitJSLoad( 1631 js.Pointer(&p), js.True, 0, 1632 ) 1633 } 1634 1635 // UpdateFrom copies value of all fields of the heap object to p. 1636 func (p *OfflineAudioCompletionEventInit) UpdateFrom(ref js.Ref) { 1637 bindings.OfflineAudioCompletionEventInitJSStore( 1638 js.Pointer(p), ref, 1639 ) 1640 } 1641 1642 // Update writes all fields of the p to the heap object referenced by ref. 1643 func (p *OfflineAudioCompletionEventInit) Update(ref js.Ref) { 1644 bindings.OfflineAudioCompletionEventInitJSLoad( 1645 js.Pointer(p), js.False, ref, 1646 ) 1647 } 1648 1649 // FreeMembers frees fields with heap reference, if recursive is true 1650 // free all heap references reachable from p. 1651 func (p *OfflineAudioCompletionEventInit) FreeMembers(recursive bool) { 1652 js.Free( 1653 p.RenderedBuffer.Ref(), 1654 ) 1655 p.RenderedBuffer = p.RenderedBuffer.FromRef(js.Undefined) 1656 } 1657 1658 func NewOfflineAudioCompletionEvent(typ js.String, eventInitDict OfflineAudioCompletionEventInit) (ret OfflineAudioCompletionEvent) { 1659 ret.ref = bindings.NewOfflineAudioCompletionEventByOfflineAudioCompletionEvent( 1660 typ.Ref(), 1661 js.Pointer(&eventInitDict)) 1662 return 1663 } 1664 1665 type OfflineAudioCompletionEvent struct { 1666 Event 1667 } 1668 1669 func (this OfflineAudioCompletionEvent) Once() OfflineAudioCompletionEvent { 1670 this.ref.Once() 1671 return this 1672 } 1673 1674 func (this OfflineAudioCompletionEvent) Ref() js.Ref { 1675 return this.Event.Ref() 1676 } 1677 1678 func (this OfflineAudioCompletionEvent) FromRef(ref js.Ref) OfflineAudioCompletionEvent { 1679 this.Event = this.Event.FromRef(ref) 1680 return this 1681 } 1682 1683 func (this OfflineAudioCompletionEvent) Free() { 1684 this.ref.Free() 1685 } 1686 1687 // RenderedBuffer returns the value of property "OfflineAudioCompletionEvent.renderedBuffer". 1688 // 1689 // It returns ok=false if there is no such property. 1690 func (this OfflineAudioCompletionEvent) RenderedBuffer() (ret AudioBuffer, ok bool) { 1691 ok = js.True == bindings.GetOfflineAudioCompletionEventRenderedBuffer( 1692 this.ref, js.Pointer(&ret), 1693 ) 1694 return 1695 } 1696 1697 type OfflineAudioContextOptions struct { 1698 // NumberOfChannels is "OfflineAudioContextOptions.numberOfChannels" 1699 // 1700 // Optional, defaults to 1. 1701 // 1702 // NOTE: FFI_USE_NumberOfChannels MUST be set to true to make this field effective. 1703 NumberOfChannels uint32 1704 // Length is "OfflineAudioContextOptions.length" 1705 // 1706 // Required 1707 Length uint32 1708 // SampleRate is "OfflineAudioContextOptions.sampleRate" 1709 // 1710 // Required 1711 SampleRate float32 1712 1713 FFI_USE_NumberOfChannels bool // for NumberOfChannels. 1714 1715 FFI_USE bool 1716 } 1717 1718 // FromRef calls UpdateFrom and returns a OfflineAudioContextOptions with all fields set. 1719 func (p OfflineAudioContextOptions) FromRef(ref js.Ref) OfflineAudioContextOptions { 1720 p.UpdateFrom(ref) 1721 return p 1722 } 1723 1724 // New creates a new OfflineAudioContextOptions in the application heap. 1725 func (p OfflineAudioContextOptions) New() js.Ref { 1726 return bindings.OfflineAudioContextOptionsJSLoad( 1727 js.Pointer(&p), js.True, 0, 1728 ) 1729 } 1730 1731 // UpdateFrom copies value of all fields of the heap object to p. 1732 func (p *OfflineAudioContextOptions) UpdateFrom(ref js.Ref) { 1733 bindings.OfflineAudioContextOptionsJSStore( 1734 js.Pointer(p), ref, 1735 ) 1736 } 1737 1738 // Update writes all fields of the p to the heap object referenced by ref. 1739 func (p *OfflineAudioContextOptions) Update(ref js.Ref) { 1740 bindings.OfflineAudioContextOptionsJSLoad( 1741 js.Pointer(p), js.False, ref, 1742 ) 1743 } 1744 1745 // FreeMembers frees fields with heap reference, if recursive is true 1746 // free all heap references reachable from p. 1747 func (p *OfflineAudioContextOptions) FreeMembers(recursive bool) { 1748 } 1749 1750 func NewOfflineAudioContext(contextOptions OfflineAudioContextOptions) (ret OfflineAudioContext) { 1751 ret.ref = bindings.NewOfflineAudioContextByOfflineAudioContext( 1752 js.Pointer(&contextOptions)) 1753 return 1754 } 1755 1756 func NewOfflineAudioContextByOfflineAudioContext1(numberOfChannels uint32, length uint32, sampleRate float32) (ret OfflineAudioContext) { 1757 ret.ref = bindings.NewOfflineAudioContextByOfflineAudioContext1( 1758 uint32(numberOfChannels), 1759 uint32(length), 1760 float32(sampleRate)) 1761 return 1762 } 1763 1764 type OfflineAudioContext struct { 1765 BaseAudioContext 1766 } 1767 1768 func (this OfflineAudioContext) Once() OfflineAudioContext { 1769 this.ref.Once() 1770 return this 1771 } 1772 1773 func (this OfflineAudioContext) Ref() js.Ref { 1774 return this.BaseAudioContext.Ref() 1775 } 1776 1777 func (this OfflineAudioContext) FromRef(ref js.Ref) OfflineAudioContext { 1778 this.BaseAudioContext = this.BaseAudioContext.FromRef(ref) 1779 return this 1780 } 1781 1782 func (this OfflineAudioContext) Free() { 1783 this.ref.Free() 1784 } 1785 1786 // Length returns the value of property "OfflineAudioContext.length". 1787 // 1788 // It returns ok=false if there is no such property. 1789 func (this OfflineAudioContext) Length() (ret uint32, ok bool) { 1790 ok = js.True == bindings.GetOfflineAudioContextLength( 1791 this.ref, js.Pointer(&ret), 1792 ) 1793 return 1794 } 1795 1796 // HasFuncStartRendering returns true if the method "OfflineAudioContext.startRendering" exists. 1797 func (this OfflineAudioContext) HasFuncStartRendering() bool { 1798 return js.True == bindings.HasFuncOfflineAudioContextStartRendering( 1799 this.ref, 1800 ) 1801 } 1802 1803 // FuncStartRendering returns the method "OfflineAudioContext.startRendering". 1804 func (this OfflineAudioContext) FuncStartRendering() (fn js.Func[func() js.Promise[AudioBuffer]]) { 1805 bindings.FuncOfflineAudioContextStartRendering( 1806 this.ref, js.Pointer(&fn), 1807 ) 1808 return 1809 } 1810 1811 // StartRendering calls the method "OfflineAudioContext.startRendering". 1812 func (this OfflineAudioContext) StartRendering() (ret js.Promise[AudioBuffer]) { 1813 bindings.CallOfflineAudioContextStartRendering( 1814 this.ref, js.Pointer(&ret), 1815 ) 1816 1817 return 1818 } 1819 1820 // TryStartRendering calls the method "OfflineAudioContext.startRendering" 1821 // in a try/catch block and returns (_, err, ok = false) when it went through 1822 // the catch clause. 1823 func (this OfflineAudioContext) TryStartRendering() (ret js.Promise[AudioBuffer], exception js.Any, ok bool) { 1824 ok = js.True == bindings.TryOfflineAudioContextStartRendering( 1825 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1826 ) 1827 1828 return 1829 } 1830 1831 // HasFuncResume returns true if the method "OfflineAudioContext.resume" exists. 1832 func (this OfflineAudioContext) HasFuncResume() bool { 1833 return js.True == bindings.HasFuncOfflineAudioContextResume( 1834 this.ref, 1835 ) 1836 } 1837 1838 // FuncResume returns the method "OfflineAudioContext.resume". 1839 func (this OfflineAudioContext) FuncResume() (fn js.Func[func() js.Promise[js.Void]]) { 1840 bindings.FuncOfflineAudioContextResume( 1841 this.ref, js.Pointer(&fn), 1842 ) 1843 return 1844 } 1845 1846 // Resume calls the method "OfflineAudioContext.resume". 1847 func (this OfflineAudioContext) Resume() (ret js.Promise[js.Void]) { 1848 bindings.CallOfflineAudioContextResume( 1849 this.ref, js.Pointer(&ret), 1850 ) 1851 1852 return 1853 } 1854 1855 // TryResume calls the method "OfflineAudioContext.resume" 1856 // in a try/catch block and returns (_, err, ok = false) when it went through 1857 // the catch clause. 1858 func (this OfflineAudioContext) TryResume() (ret js.Promise[js.Void], exception js.Any, ok bool) { 1859 ok = js.True == bindings.TryOfflineAudioContextResume( 1860 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1861 ) 1862 1863 return 1864 } 1865 1866 // HasFuncSuspend returns true if the method "OfflineAudioContext.suspend" exists. 1867 func (this OfflineAudioContext) HasFuncSuspend() bool { 1868 return js.True == bindings.HasFuncOfflineAudioContextSuspend( 1869 this.ref, 1870 ) 1871 } 1872 1873 // FuncSuspend returns the method "OfflineAudioContext.suspend". 1874 func (this OfflineAudioContext) FuncSuspend() (fn js.Func[func(suspendTime float64) js.Promise[js.Void]]) { 1875 bindings.FuncOfflineAudioContextSuspend( 1876 this.ref, js.Pointer(&fn), 1877 ) 1878 return 1879 } 1880 1881 // Suspend calls the method "OfflineAudioContext.suspend". 1882 func (this OfflineAudioContext) Suspend(suspendTime float64) (ret js.Promise[js.Void]) { 1883 bindings.CallOfflineAudioContextSuspend( 1884 this.ref, js.Pointer(&ret), 1885 float64(suspendTime), 1886 ) 1887 1888 return 1889 } 1890 1891 // TrySuspend calls the method "OfflineAudioContext.suspend" 1892 // in a try/catch block and returns (_, err, ok = false) when it went through 1893 // the catch clause. 1894 func (this OfflineAudioContext) TrySuspend(suspendTime float64) (ret js.Promise[js.Void], exception js.Any, ok bool) { 1895 ok = js.True == bindings.TryOfflineAudioContextSuspend( 1896 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1897 float64(suspendTime), 1898 ) 1899 1900 return 1901 } 1902 1903 type OneOf_TypedArrayFloat32_TypedArrayFloat64_DOMMatrix struct { 1904 ref js.Ref 1905 } 1906 1907 func (x OneOf_TypedArrayFloat32_TypedArrayFloat64_DOMMatrix) Ref() js.Ref { 1908 return x.ref 1909 } 1910 1911 func (x OneOf_TypedArrayFloat32_TypedArrayFloat64_DOMMatrix) Free() { 1912 x.ref.Free() 1913 } 1914 1915 func (x OneOf_TypedArrayFloat32_TypedArrayFloat64_DOMMatrix) FromRef(ref js.Ref) OneOf_TypedArrayFloat32_TypedArrayFloat64_DOMMatrix { 1916 return OneOf_TypedArrayFloat32_TypedArrayFloat64_DOMMatrix{ 1917 ref: ref, 1918 } 1919 } 1920 1921 func (x OneOf_TypedArrayFloat32_TypedArrayFloat64_DOMMatrix) TypedArrayFloat32() js.TypedArray[float32] { 1922 return js.TypedArray[float32]{}.FromRef(x.ref) 1923 } 1924 1925 func (x OneOf_TypedArrayFloat32_TypedArrayFloat64_DOMMatrix) TypedArrayFloat64() js.TypedArray[float64] { 1926 return js.TypedArray[float64]{}.FromRef(x.ref) 1927 } 1928 1929 func (x OneOf_TypedArrayFloat32_TypedArrayFloat64_DOMMatrix) DOMMatrix() DOMMatrix { 1930 return DOMMatrix{}.FromRef(x.ref) 1931 } 1932 1933 type RotationMatrixType = OneOf_TypedArrayFloat32_TypedArrayFloat64_DOMMatrix 1934 1935 type OrientationSensor struct { 1936 Sensor 1937 } 1938 1939 func (this OrientationSensor) Once() OrientationSensor { 1940 this.ref.Once() 1941 return this 1942 } 1943 1944 func (this OrientationSensor) Ref() js.Ref { 1945 return this.Sensor.Ref() 1946 } 1947 1948 func (this OrientationSensor) FromRef(ref js.Ref) OrientationSensor { 1949 this.Sensor = this.Sensor.FromRef(ref) 1950 return this 1951 } 1952 1953 func (this OrientationSensor) Free() { 1954 this.ref.Free() 1955 } 1956 1957 // Quaternion returns the value of property "OrientationSensor.quaternion". 1958 // 1959 // It returns ok=false if there is no such property. 1960 func (this OrientationSensor) Quaternion() (ret js.FrozenArray[float64], ok bool) { 1961 ok = js.True == bindings.GetOrientationSensorQuaternion( 1962 this.ref, js.Pointer(&ret), 1963 ) 1964 return 1965 } 1966 1967 // HasFuncPopulateMatrix returns true if the method "OrientationSensor.populateMatrix" exists. 1968 func (this OrientationSensor) HasFuncPopulateMatrix() bool { 1969 return js.True == bindings.HasFuncOrientationSensorPopulateMatrix( 1970 this.ref, 1971 ) 1972 } 1973 1974 // FuncPopulateMatrix returns the method "OrientationSensor.populateMatrix". 1975 func (this OrientationSensor) FuncPopulateMatrix() (fn js.Func[func(targetMatrix RotationMatrixType)]) { 1976 bindings.FuncOrientationSensorPopulateMatrix( 1977 this.ref, js.Pointer(&fn), 1978 ) 1979 return 1980 } 1981 1982 // PopulateMatrix calls the method "OrientationSensor.populateMatrix". 1983 func (this OrientationSensor) PopulateMatrix(targetMatrix RotationMatrixType) (ret js.Void) { 1984 bindings.CallOrientationSensorPopulateMatrix( 1985 this.ref, js.Pointer(&ret), 1986 targetMatrix.Ref(), 1987 ) 1988 1989 return 1990 } 1991 1992 // TryPopulateMatrix calls the method "OrientationSensor.populateMatrix" 1993 // in a try/catch block and returns (_, err, ok = false) when it went through 1994 // the catch clause. 1995 func (this OrientationSensor) TryPopulateMatrix(targetMatrix RotationMatrixType) (ret js.Void, exception js.Any, ok bool) { 1996 ok = js.True == bindings.TryOrientationSensorPopulateMatrix( 1997 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1998 targetMatrix.Ref(), 1999 ) 2000 2001 return 2002 } 2003 2004 func NewOverconstrainedError(constraint js.String, message js.String) (ret OverconstrainedError) { 2005 ret.ref = bindings.NewOverconstrainedErrorByOverconstrainedError( 2006 constraint.Ref(), 2007 message.Ref()) 2008 return 2009 } 2010 2011 func NewOverconstrainedErrorByOverconstrainedError1(constraint js.String) (ret OverconstrainedError) { 2012 ret.ref = bindings.NewOverconstrainedErrorByOverconstrainedError1( 2013 constraint.Ref()) 2014 return 2015 } 2016 2017 type OverconstrainedError struct { 2018 DOMException 2019 } 2020 2021 func (this OverconstrainedError) Once() OverconstrainedError { 2022 this.ref.Once() 2023 return this 2024 } 2025 2026 func (this OverconstrainedError) Ref() js.Ref { 2027 return this.DOMException.Ref() 2028 } 2029 2030 func (this OverconstrainedError) FromRef(ref js.Ref) OverconstrainedError { 2031 this.DOMException = this.DOMException.FromRef(ref) 2032 return this 2033 } 2034 2035 func (this OverconstrainedError) Free() { 2036 this.ref.Free() 2037 } 2038 2039 // Constraint returns the value of property "OverconstrainedError.constraint". 2040 // 2041 // It returns ok=false if there is no such property. 2042 func (this OverconstrainedError) Constraint() (ret js.String, ok bool) { 2043 ok = js.True == bindings.GetOverconstrainedErrorConstraint( 2044 this.ref, js.Pointer(&ret), 2045 ) 2046 return 2047 } 2048 2049 type PageTransitionEventInit struct { 2050 // Persisted is "PageTransitionEventInit.persisted" 2051 // 2052 // Optional, defaults to false. 2053 // 2054 // NOTE: FFI_USE_Persisted MUST be set to true to make this field effective. 2055 Persisted bool 2056 // Bubbles is "PageTransitionEventInit.bubbles" 2057 // 2058 // Optional, defaults to false. 2059 // 2060 // NOTE: FFI_USE_Bubbles MUST be set to true to make this field effective. 2061 Bubbles bool 2062 // Cancelable is "PageTransitionEventInit.cancelable" 2063 // 2064 // Optional, defaults to false. 2065 // 2066 // NOTE: FFI_USE_Cancelable MUST be set to true to make this field effective. 2067 Cancelable bool 2068 // Composed is "PageTransitionEventInit.composed" 2069 // 2070 // Optional, defaults to false. 2071 // 2072 // NOTE: FFI_USE_Composed MUST be set to true to make this field effective. 2073 Composed bool 2074 2075 FFI_USE_Persisted bool // for Persisted. 2076 FFI_USE_Bubbles bool // for Bubbles. 2077 FFI_USE_Cancelable bool // for Cancelable. 2078 FFI_USE_Composed bool // for Composed. 2079 2080 FFI_USE bool 2081 } 2082 2083 // FromRef calls UpdateFrom and returns a PageTransitionEventInit with all fields set. 2084 func (p PageTransitionEventInit) FromRef(ref js.Ref) PageTransitionEventInit { 2085 p.UpdateFrom(ref) 2086 return p 2087 } 2088 2089 // New creates a new PageTransitionEventInit in the application heap. 2090 func (p PageTransitionEventInit) New() js.Ref { 2091 return bindings.PageTransitionEventInitJSLoad( 2092 js.Pointer(&p), js.True, 0, 2093 ) 2094 } 2095 2096 // UpdateFrom copies value of all fields of the heap object to p. 2097 func (p *PageTransitionEventInit) UpdateFrom(ref js.Ref) { 2098 bindings.PageTransitionEventInitJSStore( 2099 js.Pointer(p), ref, 2100 ) 2101 } 2102 2103 // Update writes all fields of the p to the heap object referenced by ref. 2104 func (p *PageTransitionEventInit) Update(ref js.Ref) { 2105 bindings.PageTransitionEventInitJSLoad( 2106 js.Pointer(p), js.False, ref, 2107 ) 2108 } 2109 2110 // FreeMembers frees fields with heap reference, if recursive is true 2111 // free all heap references reachable from p. 2112 func (p *PageTransitionEventInit) FreeMembers(recursive bool) { 2113 } 2114 2115 func NewPageTransitionEvent(typ js.String, eventInitDict PageTransitionEventInit) (ret PageTransitionEvent) { 2116 ret.ref = bindings.NewPageTransitionEventByPageTransitionEvent( 2117 typ.Ref(), 2118 js.Pointer(&eventInitDict)) 2119 return 2120 } 2121 2122 func NewPageTransitionEventByPageTransitionEvent1(typ js.String) (ret PageTransitionEvent) { 2123 ret.ref = bindings.NewPageTransitionEventByPageTransitionEvent1( 2124 typ.Ref()) 2125 return 2126 } 2127 2128 type PageTransitionEvent struct { 2129 Event 2130 } 2131 2132 func (this PageTransitionEvent) Once() PageTransitionEvent { 2133 this.ref.Once() 2134 return this 2135 } 2136 2137 func (this PageTransitionEvent) Ref() js.Ref { 2138 return this.Event.Ref() 2139 } 2140 2141 func (this PageTransitionEvent) FromRef(ref js.Ref) PageTransitionEvent { 2142 this.Event = this.Event.FromRef(ref) 2143 return this 2144 } 2145 2146 func (this PageTransitionEvent) Free() { 2147 this.ref.Free() 2148 } 2149 2150 // Persisted returns the value of property "PageTransitionEvent.persisted". 2151 // 2152 // It returns ok=false if there is no such property. 2153 func (this PageTransitionEvent) Persisted() (ret bool, ok bool) { 2154 ok = js.True == bindings.GetPageTransitionEventPersisted( 2155 this.ref, js.Pointer(&ret), 2156 ) 2157 return 2158 } 2159 2160 type PaintRenderingContext2D struct { 2161 ref js.Ref 2162 } 2163 2164 func (this PaintRenderingContext2D) Once() PaintRenderingContext2D { 2165 this.ref.Once() 2166 return this 2167 } 2168 2169 func (this PaintRenderingContext2D) Ref() js.Ref { 2170 return this.ref 2171 } 2172 2173 func (this PaintRenderingContext2D) FromRef(ref js.Ref) PaintRenderingContext2D { 2174 this.ref = ref 2175 return this 2176 } 2177 2178 func (this PaintRenderingContext2D) Free() { 2179 this.ref.Free() 2180 } 2181 2182 // LineWidth returns the value of property "PaintRenderingContext2D.lineWidth". 2183 // 2184 // It returns ok=false if there is no such property. 2185 func (this PaintRenderingContext2D) LineWidth() (ret float64, ok bool) { 2186 ok = js.True == bindings.GetPaintRenderingContext2DLineWidth( 2187 this.ref, js.Pointer(&ret), 2188 ) 2189 return 2190 } 2191 2192 // SetLineWidth sets the value of property "PaintRenderingContext2D.lineWidth" to val. 2193 // 2194 // It returns false if the property cannot be set. 2195 func (this PaintRenderingContext2D) SetLineWidth(val float64) bool { 2196 return js.True == bindings.SetPaintRenderingContext2DLineWidth( 2197 this.ref, 2198 float64(val), 2199 ) 2200 } 2201 2202 // LineCap returns the value of property "PaintRenderingContext2D.lineCap". 2203 // 2204 // It returns ok=false if there is no such property. 2205 func (this PaintRenderingContext2D) LineCap() (ret CanvasLineCap, ok bool) { 2206 ok = js.True == bindings.GetPaintRenderingContext2DLineCap( 2207 this.ref, js.Pointer(&ret), 2208 ) 2209 return 2210 } 2211 2212 // SetLineCap sets the value of property "PaintRenderingContext2D.lineCap" to val. 2213 // 2214 // It returns false if the property cannot be set. 2215 func (this PaintRenderingContext2D) SetLineCap(val CanvasLineCap) bool { 2216 return js.True == bindings.SetPaintRenderingContext2DLineCap( 2217 this.ref, 2218 uint32(val), 2219 ) 2220 } 2221 2222 // LineJoin returns the value of property "PaintRenderingContext2D.lineJoin". 2223 // 2224 // It returns ok=false if there is no such property. 2225 func (this PaintRenderingContext2D) LineJoin() (ret CanvasLineJoin, ok bool) { 2226 ok = js.True == bindings.GetPaintRenderingContext2DLineJoin( 2227 this.ref, js.Pointer(&ret), 2228 ) 2229 return 2230 } 2231 2232 // SetLineJoin sets the value of property "PaintRenderingContext2D.lineJoin" to val. 2233 // 2234 // It returns false if the property cannot be set. 2235 func (this PaintRenderingContext2D) SetLineJoin(val CanvasLineJoin) bool { 2236 return js.True == bindings.SetPaintRenderingContext2DLineJoin( 2237 this.ref, 2238 uint32(val), 2239 ) 2240 } 2241 2242 // MiterLimit returns the value of property "PaintRenderingContext2D.miterLimit". 2243 // 2244 // It returns ok=false if there is no such property. 2245 func (this PaintRenderingContext2D) MiterLimit() (ret float64, ok bool) { 2246 ok = js.True == bindings.GetPaintRenderingContext2DMiterLimit( 2247 this.ref, js.Pointer(&ret), 2248 ) 2249 return 2250 } 2251 2252 // SetMiterLimit sets the value of property "PaintRenderingContext2D.miterLimit" to val. 2253 // 2254 // It returns false if the property cannot be set. 2255 func (this PaintRenderingContext2D) SetMiterLimit(val float64) bool { 2256 return js.True == bindings.SetPaintRenderingContext2DMiterLimit( 2257 this.ref, 2258 float64(val), 2259 ) 2260 } 2261 2262 // LineDashOffset returns the value of property "PaintRenderingContext2D.lineDashOffset". 2263 // 2264 // It returns ok=false if there is no such property. 2265 func (this PaintRenderingContext2D) LineDashOffset() (ret float64, ok bool) { 2266 ok = js.True == bindings.GetPaintRenderingContext2DLineDashOffset( 2267 this.ref, js.Pointer(&ret), 2268 ) 2269 return 2270 } 2271 2272 // SetLineDashOffset sets the value of property "PaintRenderingContext2D.lineDashOffset" to val. 2273 // 2274 // It returns false if the property cannot be set. 2275 func (this PaintRenderingContext2D) SetLineDashOffset(val float64) bool { 2276 return js.True == bindings.SetPaintRenderingContext2DLineDashOffset( 2277 this.ref, 2278 float64(val), 2279 ) 2280 } 2281 2282 // ShadowOffsetX returns the value of property "PaintRenderingContext2D.shadowOffsetX". 2283 // 2284 // It returns ok=false if there is no such property. 2285 func (this PaintRenderingContext2D) ShadowOffsetX() (ret float64, ok bool) { 2286 ok = js.True == bindings.GetPaintRenderingContext2DShadowOffsetX( 2287 this.ref, js.Pointer(&ret), 2288 ) 2289 return 2290 } 2291 2292 // SetShadowOffsetX sets the value of property "PaintRenderingContext2D.shadowOffsetX" to val. 2293 // 2294 // It returns false if the property cannot be set. 2295 func (this PaintRenderingContext2D) SetShadowOffsetX(val float64) bool { 2296 return js.True == bindings.SetPaintRenderingContext2DShadowOffsetX( 2297 this.ref, 2298 float64(val), 2299 ) 2300 } 2301 2302 // ShadowOffsetY returns the value of property "PaintRenderingContext2D.shadowOffsetY". 2303 // 2304 // It returns ok=false if there is no such property. 2305 func (this PaintRenderingContext2D) ShadowOffsetY() (ret float64, ok bool) { 2306 ok = js.True == bindings.GetPaintRenderingContext2DShadowOffsetY( 2307 this.ref, js.Pointer(&ret), 2308 ) 2309 return 2310 } 2311 2312 // SetShadowOffsetY sets the value of property "PaintRenderingContext2D.shadowOffsetY" to val. 2313 // 2314 // It returns false if the property cannot be set. 2315 func (this PaintRenderingContext2D) SetShadowOffsetY(val float64) bool { 2316 return js.True == bindings.SetPaintRenderingContext2DShadowOffsetY( 2317 this.ref, 2318 float64(val), 2319 ) 2320 } 2321 2322 // ShadowBlur returns the value of property "PaintRenderingContext2D.shadowBlur". 2323 // 2324 // It returns ok=false if there is no such property. 2325 func (this PaintRenderingContext2D) ShadowBlur() (ret float64, ok bool) { 2326 ok = js.True == bindings.GetPaintRenderingContext2DShadowBlur( 2327 this.ref, js.Pointer(&ret), 2328 ) 2329 return 2330 } 2331 2332 // SetShadowBlur sets the value of property "PaintRenderingContext2D.shadowBlur" to val. 2333 // 2334 // It returns false if the property cannot be set. 2335 func (this PaintRenderingContext2D) SetShadowBlur(val float64) bool { 2336 return js.True == bindings.SetPaintRenderingContext2DShadowBlur( 2337 this.ref, 2338 float64(val), 2339 ) 2340 } 2341 2342 // ShadowColor returns the value of property "PaintRenderingContext2D.shadowColor". 2343 // 2344 // It returns ok=false if there is no such property. 2345 func (this PaintRenderingContext2D) ShadowColor() (ret js.String, ok bool) { 2346 ok = js.True == bindings.GetPaintRenderingContext2DShadowColor( 2347 this.ref, js.Pointer(&ret), 2348 ) 2349 return 2350 } 2351 2352 // SetShadowColor sets the value of property "PaintRenderingContext2D.shadowColor" to val. 2353 // 2354 // It returns false if the property cannot be set. 2355 func (this PaintRenderingContext2D) SetShadowColor(val js.String) bool { 2356 return js.True == bindings.SetPaintRenderingContext2DShadowColor( 2357 this.ref, 2358 val.Ref(), 2359 ) 2360 } 2361 2362 // StrokeStyle returns the value of property "PaintRenderingContext2D.strokeStyle". 2363 // 2364 // It returns ok=false if there is no such property. 2365 func (this PaintRenderingContext2D) StrokeStyle() (ret OneOf_String_CanvasGradient_CanvasPattern, ok bool) { 2366 ok = js.True == bindings.GetPaintRenderingContext2DStrokeStyle( 2367 this.ref, js.Pointer(&ret), 2368 ) 2369 return 2370 } 2371 2372 // SetStrokeStyle sets the value of property "PaintRenderingContext2D.strokeStyle" to val. 2373 // 2374 // It returns false if the property cannot be set. 2375 func (this PaintRenderingContext2D) SetStrokeStyle(val OneOf_String_CanvasGradient_CanvasPattern) bool { 2376 return js.True == bindings.SetPaintRenderingContext2DStrokeStyle( 2377 this.ref, 2378 val.Ref(), 2379 ) 2380 } 2381 2382 // FillStyle returns the value of property "PaintRenderingContext2D.fillStyle". 2383 // 2384 // It returns ok=false if there is no such property. 2385 func (this PaintRenderingContext2D) FillStyle() (ret OneOf_String_CanvasGradient_CanvasPattern, ok bool) { 2386 ok = js.True == bindings.GetPaintRenderingContext2DFillStyle( 2387 this.ref, js.Pointer(&ret), 2388 ) 2389 return 2390 } 2391 2392 // SetFillStyle sets the value of property "PaintRenderingContext2D.fillStyle" to val. 2393 // 2394 // It returns false if the property cannot be set. 2395 func (this PaintRenderingContext2D) SetFillStyle(val OneOf_String_CanvasGradient_CanvasPattern) bool { 2396 return js.True == bindings.SetPaintRenderingContext2DFillStyle( 2397 this.ref, 2398 val.Ref(), 2399 ) 2400 } 2401 2402 // ImageSmoothingEnabled returns the value of property "PaintRenderingContext2D.imageSmoothingEnabled". 2403 // 2404 // It returns ok=false if there is no such property. 2405 func (this PaintRenderingContext2D) ImageSmoothingEnabled() (ret bool, ok bool) { 2406 ok = js.True == bindings.GetPaintRenderingContext2DImageSmoothingEnabled( 2407 this.ref, js.Pointer(&ret), 2408 ) 2409 return 2410 } 2411 2412 // SetImageSmoothingEnabled sets the value of property "PaintRenderingContext2D.imageSmoothingEnabled" to val. 2413 // 2414 // It returns false if the property cannot be set. 2415 func (this PaintRenderingContext2D) SetImageSmoothingEnabled(val bool) bool { 2416 return js.True == bindings.SetPaintRenderingContext2DImageSmoothingEnabled( 2417 this.ref, 2418 js.Bool(bool(val)), 2419 ) 2420 } 2421 2422 // ImageSmoothingQuality returns the value of property "PaintRenderingContext2D.imageSmoothingQuality". 2423 // 2424 // It returns ok=false if there is no such property. 2425 func (this PaintRenderingContext2D) ImageSmoothingQuality() (ret ImageSmoothingQuality, ok bool) { 2426 ok = js.True == bindings.GetPaintRenderingContext2DImageSmoothingQuality( 2427 this.ref, js.Pointer(&ret), 2428 ) 2429 return 2430 } 2431 2432 // SetImageSmoothingQuality sets the value of property "PaintRenderingContext2D.imageSmoothingQuality" to val. 2433 // 2434 // It returns false if the property cannot be set. 2435 func (this PaintRenderingContext2D) SetImageSmoothingQuality(val ImageSmoothingQuality) bool { 2436 return js.True == bindings.SetPaintRenderingContext2DImageSmoothingQuality( 2437 this.ref, 2438 uint32(val), 2439 ) 2440 } 2441 2442 // GlobalAlpha returns the value of property "PaintRenderingContext2D.globalAlpha". 2443 // 2444 // It returns ok=false if there is no such property. 2445 func (this PaintRenderingContext2D) GlobalAlpha() (ret float64, ok bool) { 2446 ok = js.True == bindings.GetPaintRenderingContext2DGlobalAlpha( 2447 this.ref, js.Pointer(&ret), 2448 ) 2449 return 2450 } 2451 2452 // SetGlobalAlpha sets the value of property "PaintRenderingContext2D.globalAlpha" to val. 2453 // 2454 // It returns false if the property cannot be set. 2455 func (this PaintRenderingContext2D) SetGlobalAlpha(val float64) bool { 2456 return js.True == bindings.SetPaintRenderingContext2DGlobalAlpha( 2457 this.ref, 2458 float64(val), 2459 ) 2460 } 2461 2462 // GlobalCompositeOperation returns the value of property "PaintRenderingContext2D.globalCompositeOperation". 2463 // 2464 // It returns ok=false if there is no such property. 2465 func (this PaintRenderingContext2D) GlobalCompositeOperation() (ret js.String, ok bool) { 2466 ok = js.True == bindings.GetPaintRenderingContext2DGlobalCompositeOperation( 2467 this.ref, js.Pointer(&ret), 2468 ) 2469 return 2470 } 2471 2472 // SetGlobalCompositeOperation sets the value of property "PaintRenderingContext2D.globalCompositeOperation" to val. 2473 // 2474 // It returns false if the property cannot be set. 2475 func (this PaintRenderingContext2D) SetGlobalCompositeOperation(val js.String) bool { 2476 return js.True == bindings.SetPaintRenderingContext2DGlobalCompositeOperation( 2477 this.ref, 2478 val.Ref(), 2479 ) 2480 } 2481 2482 // HasFuncClosePath returns true if the method "PaintRenderingContext2D.closePath" exists. 2483 func (this PaintRenderingContext2D) HasFuncClosePath() bool { 2484 return js.True == bindings.HasFuncPaintRenderingContext2DClosePath( 2485 this.ref, 2486 ) 2487 } 2488 2489 // FuncClosePath returns the method "PaintRenderingContext2D.closePath". 2490 func (this PaintRenderingContext2D) FuncClosePath() (fn js.Func[func()]) { 2491 bindings.FuncPaintRenderingContext2DClosePath( 2492 this.ref, js.Pointer(&fn), 2493 ) 2494 return 2495 } 2496 2497 // ClosePath calls the method "PaintRenderingContext2D.closePath". 2498 func (this PaintRenderingContext2D) ClosePath() (ret js.Void) { 2499 bindings.CallPaintRenderingContext2DClosePath( 2500 this.ref, js.Pointer(&ret), 2501 ) 2502 2503 return 2504 } 2505 2506 // TryClosePath calls the method "PaintRenderingContext2D.closePath" 2507 // in a try/catch block and returns (_, err, ok = false) when it went through 2508 // the catch clause. 2509 func (this PaintRenderingContext2D) TryClosePath() (ret js.Void, exception js.Any, ok bool) { 2510 ok = js.True == bindings.TryPaintRenderingContext2DClosePath( 2511 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2512 ) 2513 2514 return 2515 } 2516 2517 // HasFuncMoveTo returns true if the method "PaintRenderingContext2D.moveTo" exists. 2518 func (this PaintRenderingContext2D) HasFuncMoveTo() bool { 2519 return js.True == bindings.HasFuncPaintRenderingContext2DMoveTo( 2520 this.ref, 2521 ) 2522 } 2523 2524 // FuncMoveTo returns the method "PaintRenderingContext2D.moveTo". 2525 func (this PaintRenderingContext2D) FuncMoveTo() (fn js.Func[func(x float64, y float64)]) { 2526 bindings.FuncPaintRenderingContext2DMoveTo( 2527 this.ref, js.Pointer(&fn), 2528 ) 2529 return 2530 } 2531 2532 // MoveTo calls the method "PaintRenderingContext2D.moveTo". 2533 func (this PaintRenderingContext2D) MoveTo(x float64, y float64) (ret js.Void) { 2534 bindings.CallPaintRenderingContext2DMoveTo( 2535 this.ref, js.Pointer(&ret), 2536 float64(x), 2537 float64(y), 2538 ) 2539 2540 return 2541 } 2542 2543 // TryMoveTo calls the method "PaintRenderingContext2D.moveTo" 2544 // in a try/catch block and returns (_, err, ok = false) when it went through 2545 // the catch clause. 2546 func (this PaintRenderingContext2D) TryMoveTo(x float64, y float64) (ret js.Void, exception js.Any, ok bool) { 2547 ok = js.True == bindings.TryPaintRenderingContext2DMoveTo( 2548 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2549 float64(x), 2550 float64(y), 2551 ) 2552 2553 return 2554 } 2555 2556 // HasFuncLineTo returns true if the method "PaintRenderingContext2D.lineTo" exists. 2557 func (this PaintRenderingContext2D) HasFuncLineTo() bool { 2558 return js.True == bindings.HasFuncPaintRenderingContext2DLineTo( 2559 this.ref, 2560 ) 2561 } 2562 2563 // FuncLineTo returns the method "PaintRenderingContext2D.lineTo". 2564 func (this PaintRenderingContext2D) FuncLineTo() (fn js.Func[func(x float64, y float64)]) { 2565 bindings.FuncPaintRenderingContext2DLineTo( 2566 this.ref, js.Pointer(&fn), 2567 ) 2568 return 2569 } 2570 2571 // LineTo calls the method "PaintRenderingContext2D.lineTo". 2572 func (this PaintRenderingContext2D) LineTo(x float64, y float64) (ret js.Void) { 2573 bindings.CallPaintRenderingContext2DLineTo( 2574 this.ref, js.Pointer(&ret), 2575 float64(x), 2576 float64(y), 2577 ) 2578 2579 return 2580 } 2581 2582 // TryLineTo calls the method "PaintRenderingContext2D.lineTo" 2583 // in a try/catch block and returns (_, err, ok = false) when it went through 2584 // the catch clause. 2585 func (this PaintRenderingContext2D) TryLineTo(x float64, y float64) (ret js.Void, exception js.Any, ok bool) { 2586 ok = js.True == bindings.TryPaintRenderingContext2DLineTo( 2587 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2588 float64(x), 2589 float64(y), 2590 ) 2591 2592 return 2593 } 2594 2595 // HasFuncQuadraticCurveTo returns true if the method "PaintRenderingContext2D.quadraticCurveTo" exists. 2596 func (this PaintRenderingContext2D) HasFuncQuadraticCurveTo() bool { 2597 return js.True == bindings.HasFuncPaintRenderingContext2DQuadraticCurveTo( 2598 this.ref, 2599 ) 2600 } 2601 2602 // FuncQuadraticCurveTo returns the method "PaintRenderingContext2D.quadraticCurveTo". 2603 func (this PaintRenderingContext2D) FuncQuadraticCurveTo() (fn js.Func[func(cpx float64, cpy float64, x float64, y float64)]) { 2604 bindings.FuncPaintRenderingContext2DQuadraticCurveTo( 2605 this.ref, js.Pointer(&fn), 2606 ) 2607 return 2608 } 2609 2610 // QuadraticCurveTo calls the method "PaintRenderingContext2D.quadraticCurveTo". 2611 func (this PaintRenderingContext2D) QuadraticCurveTo(cpx float64, cpy float64, x float64, y float64) (ret js.Void) { 2612 bindings.CallPaintRenderingContext2DQuadraticCurveTo( 2613 this.ref, js.Pointer(&ret), 2614 float64(cpx), 2615 float64(cpy), 2616 float64(x), 2617 float64(y), 2618 ) 2619 2620 return 2621 } 2622 2623 // TryQuadraticCurveTo calls the method "PaintRenderingContext2D.quadraticCurveTo" 2624 // in a try/catch block and returns (_, err, ok = false) when it went through 2625 // the catch clause. 2626 func (this PaintRenderingContext2D) TryQuadraticCurveTo(cpx float64, cpy float64, x float64, y float64) (ret js.Void, exception js.Any, ok bool) { 2627 ok = js.True == bindings.TryPaintRenderingContext2DQuadraticCurveTo( 2628 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2629 float64(cpx), 2630 float64(cpy), 2631 float64(x), 2632 float64(y), 2633 ) 2634 2635 return 2636 } 2637 2638 // HasFuncBezierCurveTo returns true if the method "PaintRenderingContext2D.bezierCurveTo" exists. 2639 func (this PaintRenderingContext2D) HasFuncBezierCurveTo() bool { 2640 return js.True == bindings.HasFuncPaintRenderingContext2DBezierCurveTo( 2641 this.ref, 2642 ) 2643 } 2644 2645 // FuncBezierCurveTo returns the method "PaintRenderingContext2D.bezierCurveTo". 2646 func (this PaintRenderingContext2D) FuncBezierCurveTo() (fn js.Func[func(cp1x float64, cp1y float64, cp2x float64, cp2y float64, x float64, y float64)]) { 2647 bindings.FuncPaintRenderingContext2DBezierCurveTo( 2648 this.ref, js.Pointer(&fn), 2649 ) 2650 return 2651 } 2652 2653 // BezierCurveTo calls the method "PaintRenderingContext2D.bezierCurveTo". 2654 func (this PaintRenderingContext2D) BezierCurveTo(cp1x float64, cp1y float64, cp2x float64, cp2y float64, x float64, y float64) (ret js.Void) { 2655 bindings.CallPaintRenderingContext2DBezierCurveTo( 2656 this.ref, js.Pointer(&ret), 2657 float64(cp1x), 2658 float64(cp1y), 2659 float64(cp2x), 2660 float64(cp2y), 2661 float64(x), 2662 float64(y), 2663 ) 2664 2665 return 2666 } 2667 2668 // TryBezierCurveTo calls the method "PaintRenderingContext2D.bezierCurveTo" 2669 // in a try/catch block and returns (_, err, ok = false) when it went through 2670 // the catch clause. 2671 func (this PaintRenderingContext2D) TryBezierCurveTo(cp1x float64, cp1y float64, cp2x float64, cp2y float64, x float64, y float64) (ret js.Void, exception js.Any, ok bool) { 2672 ok = js.True == bindings.TryPaintRenderingContext2DBezierCurveTo( 2673 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2674 float64(cp1x), 2675 float64(cp1y), 2676 float64(cp2x), 2677 float64(cp2y), 2678 float64(x), 2679 float64(y), 2680 ) 2681 2682 return 2683 } 2684 2685 // HasFuncArcTo returns true if the method "PaintRenderingContext2D.arcTo" exists. 2686 func (this PaintRenderingContext2D) HasFuncArcTo() bool { 2687 return js.True == bindings.HasFuncPaintRenderingContext2DArcTo( 2688 this.ref, 2689 ) 2690 } 2691 2692 // FuncArcTo returns the method "PaintRenderingContext2D.arcTo". 2693 func (this PaintRenderingContext2D) FuncArcTo() (fn js.Func[func(x1 float64, y1 float64, x2 float64, y2 float64, radius float64)]) { 2694 bindings.FuncPaintRenderingContext2DArcTo( 2695 this.ref, js.Pointer(&fn), 2696 ) 2697 return 2698 } 2699 2700 // ArcTo calls the method "PaintRenderingContext2D.arcTo". 2701 func (this PaintRenderingContext2D) ArcTo(x1 float64, y1 float64, x2 float64, y2 float64, radius float64) (ret js.Void) { 2702 bindings.CallPaintRenderingContext2DArcTo( 2703 this.ref, js.Pointer(&ret), 2704 float64(x1), 2705 float64(y1), 2706 float64(x2), 2707 float64(y2), 2708 float64(radius), 2709 ) 2710 2711 return 2712 } 2713 2714 // TryArcTo calls the method "PaintRenderingContext2D.arcTo" 2715 // in a try/catch block and returns (_, err, ok = false) when it went through 2716 // the catch clause. 2717 func (this PaintRenderingContext2D) TryArcTo(x1 float64, y1 float64, x2 float64, y2 float64, radius float64) (ret js.Void, exception js.Any, ok bool) { 2718 ok = js.True == bindings.TryPaintRenderingContext2DArcTo( 2719 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2720 float64(x1), 2721 float64(y1), 2722 float64(x2), 2723 float64(y2), 2724 float64(radius), 2725 ) 2726 2727 return 2728 } 2729 2730 // HasFuncRect returns true if the method "PaintRenderingContext2D.rect" exists. 2731 func (this PaintRenderingContext2D) HasFuncRect() bool { 2732 return js.True == bindings.HasFuncPaintRenderingContext2DRect( 2733 this.ref, 2734 ) 2735 } 2736 2737 // FuncRect returns the method "PaintRenderingContext2D.rect". 2738 func (this PaintRenderingContext2D) FuncRect() (fn js.Func[func(x float64, y float64, w float64, h float64)]) { 2739 bindings.FuncPaintRenderingContext2DRect( 2740 this.ref, js.Pointer(&fn), 2741 ) 2742 return 2743 } 2744 2745 // Rect calls the method "PaintRenderingContext2D.rect". 2746 func (this PaintRenderingContext2D) Rect(x float64, y float64, w float64, h float64) (ret js.Void) { 2747 bindings.CallPaintRenderingContext2DRect( 2748 this.ref, js.Pointer(&ret), 2749 float64(x), 2750 float64(y), 2751 float64(w), 2752 float64(h), 2753 ) 2754 2755 return 2756 } 2757 2758 // TryRect calls the method "PaintRenderingContext2D.rect" 2759 // in a try/catch block and returns (_, err, ok = false) when it went through 2760 // the catch clause. 2761 func (this PaintRenderingContext2D) TryRect(x float64, y float64, w float64, h float64) (ret js.Void, exception js.Any, ok bool) { 2762 ok = js.True == bindings.TryPaintRenderingContext2DRect( 2763 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2764 float64(x), 2765 float64(y), 2766 float64(w), 2767 float64(h), 2768 ) 2769 2770 return 2771 } 2772 2773 // HasFuncRoundRect returns true if the method "PaintRenderingContext2D.roundRect" exists. 2774 func (this PaintRenderingContext2D) HasFuncRoundRect() bool { 2775 return js.True == bindings.HasFuncPaintRenderingContext2DRoundRect( 2776 this.ref, 2777 ) 2778 } 2779 2780 // FuncRoundRect returns the method "PaintRenderingContext2D.roundRect". 2781 func (this PaintRenderingContext2D) FuncRoundRect() (fn js.Func[func(x float64, y float64, w float64, h float64, radii OneOf_Float64_DOMPointInit_ArrayOneOf_Float64_DOMPointInit)]) { 2782 bindings.FuncPaintRenderingContext2DRoundRect( 2783 this.ref, js.Pointer(&fn), 2784 ) 2785 return 2786 } 2787 2788 // RoundRect calls the method "PaintRenderingContext2D.roundRect". 2789 func (this PaintRenderingContext2D) RoundRect(x float64, y float64, w float64, h float64, radii OneOf_Float64_DOMPointInit_ArrayOneOf_Float64_DOMPointInit) (ret js.Void) { 2790 bindings.CallPaintRenderingContext2DRoundRect( 2791 this.ref, js.Pointer(&ret), 2792 float64(x), 2793 float64(y), 2794 float64(w), 2795 float64(h), 2796 radii.Ref(), 2797 ) 2798 2799 return 2800 } 2801 2802 // TryRoundRect calls the method "PaintRenderingContext2D.roundRect" 2803 // in a try/catch block and returns (_, err, ok = false) when it went through 2804 // the catch clause. 2805 func (this PaintRenderingContext2D) TryRoundRect(x float64, y float64, w float64, h float64, radii OneOf_Float64_DOMPointInit_ArrayOneOf_Float64_DOMPointInit) (ret js.Void, exception js.Any, ok bool) { 2806 ok = js.True == bindings.TryPaintRenderingContext2DRoundRect( 2807 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2808 float64(x), 2809 float64(y), 2810 float64(w), 2811 float64(h), 2812 radii.Ref(), 2813 ) 2814 2815 return 2816 } 2817 2818 // HasFuncRoundRect1 returns true if the method "PaintRenderingContext2D.roundRect" exists. 2819 func (this PaintRenderingContext2D) HasFuncRoundRect1() bool { 2820 return js.True == bindings.HasFuncPaintRenderingContext2DRoundRect1( 2821 this.ref, 2822 ) 2823 } 2824 2825 // FuncRoundRect1 returns the method "PaintRenderingContext2D.roundRect". 2826 func (this PaintRenderingContext2D) FuncRoundRect1() (fn js.Func[func(x float64, y float64, w float64, h float64)]) { 2827 bindings.FuncPaintRenderingContext2DRoundRect1( 2828 this.ref, js.Pointer(&fn), 2829 ) 2830 return 2831 } 2832 2833 // RoundRect1 calls the method "PaintRenderingContext2D.roundRect". 2834 func (this PaintRenderingContext2D) RoundRect1(x float64, y float64, w float64, h float64) (ret js.Void) { 2835 bindings.CallPaintRenderingContext2DRoundRect1( 2836 this.ref, js.Pointer(&ret), 2837 float64(x), 2838 float64(y), 2839 float64(w), 2840 float64(h), 2841 ) 2842 2843 return 2844 } 2845 2846 // TryRoundRect1 calls the method "PaintRenderingContext2D.roundRect" 2847 // in a try/catch block and returns (_, err, ok = false) when it went through 2848 // the catch clause. 2849 func (this PaintRenderingContext2D) TryRoundRect1(x float64, y float64, w float64, h float64) (ret js.Void, exception js.Any, ok bool) { 2850 ok = js.True == bindings.TryPaintRenderingContext2DRoundRect1( 2851 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2852 float64(x), 2853 float64(y), 2854 float64(w), 2855 float64(h), 2856 ) 2857 2858 return 2859 } 2860 2861 // HasFuncArc returns true if the method "PaintRenderingContext2D.arc" exists. 2862 func (this PaintRenderingContext2D) HasFuncArc() bool { 2863 return js.True == bindings.HasFuncPaintRenderingContext2DArc( 2864 this.ref, 2865 ) 2866 } 2867 2868 // FuncArc returns the method "PaintRenderingContext2D.arc". 2869 func (this PaintRenderingContext2D) FuncArc() (fn js.Func[func(x float64, y float64, radius float64, startAngle float64, endAngle float64, counterclockwise bool)]) { 2870 bindings.FuncPaintRenderingContext2DArc( 2871 this.ref, js.Pointer(&fn), 2872 ) 2873 return 2874 } 2875 2876 // Arc calls the method "PaintRenderingContext2D.arc". 2877 func (this PaintRenderingContext2D) Arc(x float64, y float64, radius float64, startAngle float64, endAngle float64, counterclockwise bool) (ret js.Void) { 2878 bindings.CallPaintRenderingContext2DArc( 2879 this.ref, js.Pointer(&ret), 2880 float64(x), 2881 float64(y), 2882 float64(radius), 2883 float64(startAngle), 2884 float64(endAngle), 2885 js.Bool(bool(counterclockwise)), 2886 ) 2887 2888 return 2889 } 2890 2891 // TryArc calls the method "PaintRenderingContext2D.arc" 2892 // in a try/catch block and returns (_, err, ok = false) when it went through 2893 // the catch clause. 2894 func (this PaintRenderingContext2D) TryArc(x float64, y float64, radius float64, startAngle float64, endAngle float64, counterclockwise bool) (ret js.Void, exception js.Any, ok bool) { 2895 ok = js.True == bindings.TryPaintRenderingContext2DArc( 2896 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2897 float64(x), 2898 float64(y), 2899 float64(radius), 2900 float64(startAngle), 2901 float64(endAngle), 2902 js.Bool(bool(counterclockwise)), 2903 ) 2904 2905 return 2906 } 2907 2908 // HasFuncArc1 returns true if the method "PaintRenderingContext2D.arc" exists. 2909 func (this PaintRenderingContext2D) HasFuncArc1() bool { 2910 return js.True == bindings.HasFuncPaintRenderingContext2DArc1( 2911 this.ref, 2912 ) 2913 } 2914 2915 // FuncArc1 returns the method "PaintRenderingContext2D.arc". 2916 func (this PaintRenderingContext2D) FuncArc1() (fn js.Func[func(x float64, y float64, radius float64, startAngle float64, endAngle float64)]) { 2917 bindings.FuncPaintRenderingContext2DArc1( 2918 this.ref, js.Pointer(&fn), 2919 ) 2920 return 2921 } 2922 2923 // Arc1 calls the method "PaintRenderingContext2D.arc". 2924 func (this PaintRenderingContext2D) Arc1(x float64, y float64, radius float64, startAngle float64, endAngle float64) (ret js.Void) { 2925 bindings.CallPaintRenderingContext2DArc1( 2926 this.ref, js.Pointer(&ret), 2927 float64(x), 2928 float64(y), 2929 float64(radius), 2930 float64(startAngle), 2931 float64(endAngle), 2932 ) 2933 2934 return 2935 } 2936 2937 // TryArc1 calls the method "PaintRenderingContext2D.arc" 2938 // in a try/catch block and returns (_, err, ok = false) when it went through 2939 // the catch clause. 2940 func (this PaintRenderingContext2D) TryArc1(x float64, y float64, radius float64, startAngle float64, endAngle float64) (ret js.Void, exception js.Any, ok bool) { 2941 ok = js.True == bindings.TryPaintRenderingContext2DArc1( 2942 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2943 float64(x), 2944 float64(y), 2945 float64(radius), 2946 float64(startAngle), 2947 float64(endAngle), 2948 ) 2949 2950 return 2951 } 2952 2953 // HasFuncEllipse returns true if the method "PaintRenderingContext2D.ellipse" exists. 2954 func (this PaintRenderingContext2D) HasFuncEllipse() bool { 2955 return js.True == bindings.HasFuncPaintRenderingContext2DEllipse( 2956 this.ref, 2957 ) 2958 } 2959 2960 // FuncEllipse returns the method "PaintRenderingContext2D.ellipse". 2961 func (this PaintRenderingContext2D) FuncEllipse() (fn js.Func[func(x float64, y float64, radiusX float64, radiusY float64, rotation float64, startAngle float64, endAngle float64, counterclockwise bool)]) { 2962 bindings.FuncPaintRenderingContext2DEllipse( 2963 this.ref, js.Pointer(&fn), 2964 ) 2965 return 2966 } 2967 2968 // Ellipse calls the method "PaintRenderingContext2D.ellipse". 2969 func (this PaintRenderingContext2D) Ellipse(x float64, y float64, radiusX float64, radiusY float64, rotation float64, startAngle float64, endAngle float64, counterclockwise bool) (ret js.Void) { 2970 bindings.CallPaintRenderingContext2DEllipse( 2971 this.ref, js.Pointer(&ret), 2972 float64(x), 2973 float64(y), 2974 float64(radiusX), 2975 float64(radiusY), 2976 float64(rotation), 2977 float64(startAngle), 2978 float64(endAngle), 2979 js.Bool(bool(counterclockwise)), 2980 ) 2981 2982 return 2983 } 2984 2985 // TryEllipse calls the method "PaintRenderingContext2D.ellipse" 2986 // in a try/catch block and returns (_, err, ok = false) when it went through 2987 // the catch clause. 2988 func (this PaintRenderingContext2D) TryEllipse(x float64, y float64, radiusX float64, radiusY float64, rotation float64, startAngle float64, endAngle float64, counterclockwise bool) (ret js.Void, exception js.Any, ok bool) { 2989 ok = js.True == bindings.TryPaintRenderingContext2DEllipse( 2990 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2991 float64(x), 2992 float64(y), 2993 float64(radiusX), 2994 float64(radiusY), 2995 float64(rotation), 2996 float64(startAngle), 2997 float64(endAngle), 2998 js.Bool(bool(counterclockwise)), 2999 ) 3000 3001 return 3002 } 3003 3004 // HasFuncEllipse1 returns true if the method "PaintRenderingContext2D.ellipse" exists. 3005 func (this PaintRenderingContext2D) HasFuncEllipse1() bool { 3006 return js.True == bindings.HasFuncPaintRenderingContext2DEllipse1( 3007 this.ref, 3008 ) 3009 } 3010 3011 // FuncEllipse1 returns the method "PaintRenderingContext2D.ellipse". 3012 func (this PaintRenderingContext2D) FuncEllipse1() (fn js.Func[func(x float64, y float64, radiusX float64, radiusY float64, rotation float64, startAngle float64, endAngle float64)]) { 3013 bindings.FuncPaintRenderingContext2DEllipse1( 3014 this.ref, js.Pointer(&fn), 3015 ) 3016 return 3017 } 3018 3019 // Ellipse1 calls the method "PaintRenderingContext2D.ellipse". 3020 func (this PaintRenderingContext2D) Ellipse1(x float64, y float64, radiusX float64, radiusY float64, rotation float64, startAngle float64, endAngle float64) (ret js.Void) { 3021 bindings.CallPaintRenderingContext2DEllipse1( 3022 this.ref, js.Pointer(&ret), 3023 float64(x), 3024 float64(y), 3025 float64(radiusX), 3026 float64(radiusY), 3027 float64(rotation), 3028 float64(startAngle), 3029 float64(endAngle), 3030 ) 3031 3032 return 3033 } 3034 3035 // TryEllipse1 calls the method "PaintRenderingContext2D.ellipse" 3036 // in a try/catch block and returns (_, err, ok = false) when it went through 3037 // the catch clause. 3038 func (this PaintRenderingContext2D) TryEllipse1(x float64, y float64, radiusX float64, radiusY float64, rotation float64, startAngle float64, endAngle float64) (ret js.Void, exception js.Any, ok bool) { 3039 ok = js.True == bindings.TryPaintRenderingContext2DEllipse1( 3040 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3041 float64(x), 3042 float64(y), 3043 float64(radiusX), 3044 float64(radiusY), 3045 float64(rotation), 3046 float64(startAngle), 3047 float64(endAngle), 3048 ) 3049 3050 return 3051 } 3052 3053 // HasFuncSetLineDash returns true if the method "PaintRenderingContext2D.setLineDash" exists. 3054 func (this PaintRenderingContext2D) HasFuncSetLineDash() bool { 3055 return js.True == bindings.HasFuncPaintRenderingContext2DSetLineDash( 3056 this.ref, 3057 ) 3058 } 3059 3060 // FuncSetLineDash returns the method "PaintRenderingContext2D.setLineDash". 3061 func (this PaintRenderingContext2D) FuncSetLineDash() (fn js.Func[func(segments js.Array[float64])]) { 3062 bindings.FuncPaintRenderingContext2DSetLineDash( 3063 this.ref, js.Pointer(&fn), 3064 ) 3065 return 3066 } 3067 3068 // SetLineDash calls the method "PaintRenderingContext2D.setLineDash". 3069 func (this PaintRenderingContext2D) SetLineDash(segments js.Array[float64]) (ret js.Void) { 3070 bindings.CallPaintRenderingContext2DSetLineDash( 3071 this.ref, js.Pointer(&ret), 3072 segments.Ref(), 3073 ) 3074 3075 return 3076 } 3077 3078 // TrySetLineDash calls the method "PaintRenderingContext2D.setLineDash" 3079 // in a try/catch block and returns (_, err, ok = false) when it went through 3080 // the catch clause. 3081 func (this PaintRenderingContext2D) TrySetLineDash(segments js.Array[float64]) (ret js.Void, exception js.Any, ok bool) { 3082 ok = js.True == bindings.TryPaintRenderingContext2DSetLineDash( 3083 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3084 segments.Ref(), 3085 ) 3086 3087 return 3088 } 3089 3090 // HasFuncGetLineDash returns true if the method "PaintRenderingContext2D.getLineDash" exists. 3091 func (this PaintRenderingContext2D) HasFuncGetLineDash() bool { 3092 return js.True == bindings.HasFuncPaintRenderingContext2DGetLineDash( 3093 this.ref, 3094 ) 3095 } 3096 3097 // FuncGetLineDash returns the method "PaintRenderingContext2D.getLineDash". 3098 func (this PaintRenderingContext2D) FuncGetLineDash() (fn js.Func[func() js.Array[float64]]) { 3099 bindings.FuncPaintRenderingContext2DGetLineDash( 3100 this.ref, js.Pointer(&fn), 3101 ) 3102 return 3103 } 3104 3105 // GetLineDash calls the method "PaintRenderingContext2D.getLineDash". 3106 func (this PaintRenderingContext2D) GetLineDash() (ret js.Array[float64]) { 3107 bindings.CallPaintRenderingContext2DGetLineDash( 3108 this.ref, js.Pointer(&ret), 3109 ) 3110 3111 return 3112 } 3113 3114 // TryGetLineDash calls the method "PaintRenderingContext2D.getLineDash" 3115 // in a try/catch block and returns (_, err, ok = false) when it went through 3116 // the catch clause. 3117 func (this PaintRenderingContext2D) TryGetLineDash() (ret js.Array[float64], exception js.Any, ok bool) { 3118 ok = js.True == bindings.TryPaintRenderingContext2DGetLineDash( 3119 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3120 ) 3121 3122 return 3123 } 3124 3125 // HasFuncDrawImage returns true if the method "PaintRenderingContext2D.drawImage" exists. 3126 func (this PaintRenderingContext2D) HasFuncDrawImage() bool { 3127 return js.True == bindings.HasFuncPaintRenderingContext2DDrawImage( 3128 this.ref, 3129 ) 3130 } 3131 3132 // FuncDrawImage returns the method "PaintRenderingContext2D.drawImage". 3133 func (this PaintRenderingContext2D) FuncDrawImage() (fn js.Func[func(image CanvasImageSource, dx float64, dy float64)]) { 3134 bindings.FuncPaintRenderingContext2DDrawImage( 3135 this.ref, js.Pointer(&fn), 3136 ) 3137 return 3138 } 3139 3140 // DrawImage calls the method "PaintRenderingContext2D.drawImage". 3141 func (this PaintRenderingContext2D) DrawImage(image CanvasImageSource, dx float64, dy float64) (ret js.Void) { 3142 bindings.CallPaintRenderingContext2DDrawImage( 3143 this.ref, js.Pointer(&ret), 3144 image.Ref(), 3145 float64(dx), 3146 float64(dy), 3147 ) 3148 3149 return 3150 } 3151 3152 // TryDrawImage calls the method "PaintRenderingContext2D.drawImage" 3153 // in a try/catch block and returns (_, err, ok = false) when it went through 3154 // the catch clause. 3155 func (this PaintRenderingContext2D) TryDrawImage(image CanvasImageSource, dx float64, dy float64) (ret js.Void, exception js.Any, ok bool) { 3156 ok = js.True == bindings.TryPaintRenderingContext2DDrawImage( 3157 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3158 image.Ref(), 3159 float64(dx), 3160 float64(dy), 3161 ) 3162 3163 return 3164 } 3165 3166 // HasFuncDrawImage1 returns true if the method "PaintRenderingContext2D.drawImage" exists. 3167 func (this PaintRenderingContext2D) HasFuncDrawImage1() bool { 3168 return js.True == bindings.HasFuncPaintRenderingContext2DDrawImage1( 3169 this.ref, 3170 ) 3171 } 3172 3173 // FuncDrawImage1 returns the method "PaintRenderingContext2D.drawImage". 3174 func (this PaintRenderingContext2D) FuncDrawImage1() (fn js.Func[func(image CanvasImageSource, dx float64, dy float64, dw float64, dh float64)]) { 3175 bindings.FuncPaintRenderingContext2DDrawImage1( 3176 this.ref, js.Pointer(&fn), 3177 ) 3178 return 3179 } 3180 3181 // DrawImage1 calls the method "PaintRenderingContext2D.drawImage". 3182 func (this PaintRenderingContext2D) DrawImage1(image CanvasImageSource, dx float64, dy float64, dw float64, dh float64) (ret js.Void) { 3183 bindings.CallPaintRenderingContext2DDrawImage1( 3184 this.ref, js.Pointer(&ret), 3185 image.Ref(), 3186 float64(dx), 3187 float64(dy), 3188 float64(dw), 3189 float64(dh), 3190 ) 3191 3192 return 3193 } 3194 3195 // TryDrawImage1 calls the method "PaintRenderingContext2D.drawImage" 3196 // in a try/catch block and returns (_, err, ok = false) when it went through 3197 // the catch clause. 3198 func (this PaintRenderingContext2D) TryDrawImage1(image CanvasImageSource, dx float64, dy float64, dw float64, dh float64) (ret js.Void, exception js.Any, ok bool) { 3199 ok = js.True == bindings.TryPaintRenderingContext2DDrawImage1( 3200 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3201 image.Ref(), 3202 float64(dx), 3203 float64(dy), 3204 float64(dw), 3205 float64(dh), 3206 ) 3207 3208 return 3209 } 3210 3211 // HasFuncDrawImage2 returns true if the method "PaintRenderingContext2D.drawImage" exists. 3212 func (this PaintRenderingContext2D) HasFuncDrawImage2() bool { 3213 return js.True == bindings.HasFuncPaintRenderingContext2DDrawImage2( 3214 this.ref, 3215 ) 3216 } 3217 3218 // FuncDrawImage2 returns the method "PaintRenderingContext2D.drawImage". 3219 func (this PaintRenderingContext2D) FuncDrawImage2() (fn js.Func[func(image CanvasImageSource, sx float64, sy float64, sw float64, sh float64, dx float64, dy float64, dw float64, dh float64)]) { 3220 bindings.FuncPaintRenderingContext2DDrawImage2( 3221 this.ref, js.Pointer(&fn), 3222 ) 3223 return 3224 } 3225 3226 // DrawImage2 calls the method "PaintRenderingContext2D.drawImage". 3227 func (this PaintRenderingContext2D) DrawImage2(image CanvasImageSource, sx float64, sy float64, sw float64, sh float64, dx float64, dy float64, dw float64, dh float64) (ret js.Void) { 3228 bindings.CallPaintRenderingContext2DDrawImage2( 3229 this.ref, js.Pointer(&ret), 3230 image.Ref(), 3231 float64(sx), 3232 float64(sy), 3233 float64(sw), 3234 float64(sh), 3235 float64(dx), 3236 float64(dy), 3237 float64(dw), 3238 float64(dh), 3239 ) 3240 3241 return 3242 } 3243 3244 // TryDrawImage2 calls the method "PaintRenderingContext2D.drawImage" 3245 // in a try/catch block and returns (_, err, ok = false) when it went through 3246 // the catch clause. 3247 func (this PaintRenderingContext2D) TryDrawImage2(image CanvasImageSource, sx float64, sy float64, sw float64, sh float64, dx float64, dy float64, dw float64, dh float64) (ret js.Void, exception js.Any, ok bool) { 3248 ok = js.True == bindings.TryPaintRenderingContext2DDrawImage2( 3249 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3250 image.Ref(), 3251 float64(sx), 3252 float64(sy), 3253 float64(sw), 3254 float64(sh), 3255 float64(dx), 3256 float64(dy), 3257 float64(dw), 3258 float64(dh), 3259 ) 3260 3261 return 3262 } 3263 3264 // HasFuncBeginPath returns true if the method "PaintRenderingContext2D.beginPath" exists. 3265 func (this PaintRenderingContext2D) HasFuncBeginPath() bool { 3266 return js.True == bindings.HasFuncPaintRenderingContext2DBeginPath( 3267 this.ref, 3268 ) 3269 } 3270 3271 // FuncBeginPath returns the method "PaintRenderingContext2D.beginPath". 3272 func (this PaintRenderingContext2D) FuncBeginPath() (fn js.Func[func()]) { 3273 bindings.FuncPaintRenderingContext2DBeginPath( 3274 this.ref, js.Pointer(&fn), 3275 ) 3276 return 3277 } 3278 3279 // BeginPath calls the method "PaintRenderingContext2D.beginPath". 3280 func (this PaintRenderingContext2D) BeginPath() (ret js.Void) { 3281 bindings.CallPaintRenderingContext2DBeginPath( 3282 this.ref, js.Pointer(&ret), 3283 ) 3284 3285 return 3286 } 3287 3288 // TryBeginPath calls the method "PaintRenderingContext2D.beginPath" 3289 // in a try/catch block and returns (_, err, ok = false) when it went through 3290 // the catch clause. 3291 func (this PaintRenderingContext2D) TryBeginPath() (ret js.Void, exception js.Any, ok bool) { 3292 ok = js.True == bindings.TryPaintRenderingContext2DBeginPath( 3293 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3294 ) 3295 3296 return 3297 } 3298 3299 // HasFuncFill returns true if the method "PaintRenderingContext2D.fill" exists. 3300 func (this PaintRenderingContext2D) HasFuncFill() bool { 3301 return js.True == bindings.HasFuncPaintRenderingContext2DFill( 3302 this.ref, 3303 ) 3304 } 3305 3306 // FuncFill returns the method "PaintRenderingContext2D.fill". 3307 func (this PaintRenderingContext2D) FuncFill() (fn js.Func[func(fillRule CanvasFillRule)]) { 3308 bindings.FuncPaintRenderingContext2DFill( 3309 this.ref, js.Pointer(&fn), 3310 ) 3311 return 3312 } 3313 3314 // Fill calls the method "PaintRenderingContext2D.fill". 3315 func (this PaintRenderingContext2D) Fill(fillRule CanvasFillRule) (ret js.Void) { 3316 bindings.CallPaintRenderingContext2DFill( 3317 this.ref, js.Pointer(&ret), 3318 uint32(fillRule), 3319 ) 3320 3321 return 3322 } 3323 3324 // TryFill calls the method "PaintRenderingContext2D.fill" 3325 // in a try/catch block and returns (_, err, ok = false) when it went through 3326 // the catch clause. 3327 func (this PaintRenderingContext2D) TryFill(fillRule CanvasFillRule) (ret js.Void, exception js.Any, ok bool) { 3328 ok = js.True == bindings.TryPaintRenderingContext2DFill( 3329 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3330 uint32(fillRule), 3331 ) 3332 3333 return 3334 } 3335 3336 // HasFuncFill1 returns true if the method "PaintRenderingContext2D.fill" exists. 3337 func (this PaintRenderingContext2D) HasFuncFill1() bool { 3338 return js.True == bindings.HasFuncPaintRenderingContext2DFill1( 3339 this.ref, 3340 ) 3341 } 3342 3343 // FuncFill1 returns the method "PaintRenderingContext2D.fill". 3344 func (this PaintRenderingContext2D) FuncFill1() (fn js.Func[func()]) { 3345 bindings.FuncPaintRenderingContext2DFill1( 3346 this.ref, js.Pointer(&fn), 3347 ) 3348 return 3349 } 3350 3351 // Fill1 calls the method "PaintRenderingContext2D.fill". 3352 func (this PaintRenderingContext2D) Fill1() (ret js.Void) { 3353 bindings.CallPaintRenderingContext2DFill1( 3354 this.ref, js.Pointer(&ret), 3355 ) 3356 3357 return 3358 } 3359 3360 // TryFill1 calls the method "PaintRenderingContext2D.fill" 3361 // in a try/catch block and returns (_, err, ok = false) when it went through 3362 // the catch clause. 3363 func (this PaintRenderingContext2D) TryFill1() (ret js.Void, exception js.Any, ok bool) { 3364 ok = js.True == bindings.TryPaintRenderingContext2DFill1( 3365 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3366 ) 3367 3368 return 3369 } 3370 3371 // HasFuncFill2 returns true if the method "PaintRenderingContext2D.fill" exists. 3372 func (this PaintRenderingContext2D) HasFuncFill2() bool { 3373 return js.True == bindings.HasFuncPaintRenderingContext2DFill2( 3374 this.ref, 3375 ) 3376 } 3377 3378 // FuncFill2 returns the method "PaintRenderingContext2D.fill". 3379 func (this PaintRenderingContext2D) FuncFill2() (fn js.Func[func(path Path2D, fillRule CanvasFillRule)]) { 3380 bindings.FuncPaintRenderingContext2DFill2( 3381 this.ref, js.Pointer(&fn), 3382 ) 3383 return 3384 } 3385 3386 // Fill2 calls the method "PaintRenderingContext2D.fill". 3387 func (this PaintRenderingContext2D) Fill2(path Path2D, fillRule CanvasFillRule) (ret js.Void) { 3388 bindings.CallPaintRenderingContext2DFill2( 3389 this.ref, js.Pointer(&ret), 3390 path.Ref(), 3391 uint32(fillRule), 3392 ) 3393 3394 return 3395 } 3396 3397 // TryFill2 calls the method "PaintRenderingContext2D.fill" 3398 // in a try/catch block and returns (_, err, ok = false) when it went through 3399 // the catch clause. 3400 func (this PaintRenderingContext2D) TryFill2(path Path2D, fillRule CanvasFillRule) (ret js.Void, exception js.Any, ok bool) { 3401 ok = js.True == bindings.TryPaintRenderingContext2DFill2( 3402 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3403 path.Ref(), 3404 uint32(fillRule), 3405 ) 3406 3407 return 3408 } 3409 3410 // HasFuncFill3 returns true if the method "PaintRenderingContext2D.fill" exists. 3411 func (this PaintRenderingContext2D) HasFuncFill3() bool { 3412 return js.True == bindings.HasFuncPaintRenderingContext2DFill3( 3413 this.ref, 3414 ) 3415 } 3416 3417 // FuncFill3 returns the method "PaintRenderingContext2D.fill". 3418 func (this PaintRenderingContext2D) FuncFill3() (fn js.Func[func(path Path2D)]) { 3419 bindings.FuncPaintRenderingContext2DFill3( 3420 this.ref, js.Pointer(&fn), 3421 ) 3422 return 3423 } 3424 3425 // Fill3 calls the method "PaintRenderingContext2D.fill". 3426 func (this PaintRenderingContext2D) Fill3(path Path2D) (ret js.Void) { 3427 bindings.CallPaintRenderingContext2DFill3( 3428 this.ref, js.Pointer(&ret), 3429 path.Ref(), 3430 ) 3431 3432 return 3433 } 3434 3435 // TryFill3 calls the method "PaintRenderingContext2D.fill" 3436 // in a try/catch block and returns (_, err, ok = false) when it went through 3437 // the catch clause. 3438 func (this PaintRenderingContext2D) TryFill3(path Path2D) (ret js.Void, exception js.Any, ok bool) { 3439 ok = js.True == bindings.TryPaintRenderingContext2DFill3( 3440 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3441 path.Ref(), 3442 ) 3443 3444 return 3445 } 3446 3447 // HasFuncStroke returns true if the method "PaintRenderingContext2D.stroke" exists. 3448 func (this PaintRenderingContext2D) HasFuncStroke() bool { 3449 return js.True == bindings.HasFuncPaintRenderingContext2DStroke( 3450 this.ref, 3451 ) 3452 } 3453 3454 // FuncStroke returns the method "PaintRenderingContext2D.stroke". 3455 func (this PaintRenderingContext2D) FuncStroke() (fn js.Func[func()]) { 3456 bindings.FuncPaintRenderingContext2DStroke( 3457 this.ref, js.Pointer(&fn), 3458 ) 3459 return 3460 } 3461 3462 // Stroke calls the method "PaintRenderingContext2D.stroke". 3463 func (this PaintRenderingContext2D) Stroke() (ret js.Void) { 3464 bindings.CallPaintRenderingContext2DStroke( 3465 this.ref, js.Pointer(&ret), 3466 ) 3467 3468 return 3469 } 3470 3471 // TryStroke calls the method "PaintRenderingContext2D.stroke" 3472 // in a try/catch block and returns (_, err, ok = false) when it went through 3473 // the catch clause. 3474 func (this PaintRenderingContext2D) TryStroke() (ret js.Void, exception js.Any, ok bool) { 3475 ok = js.True == bindings.TryPaintRenderingContext2DStroke( 3476 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3477 ) 3478 3479 return 3480 } 3481 3482 // HasFuncStroke1 returns true if the method "PaintRenderingContext2D.stroke" exists. 3483 func (this PaintRenderingContext2D) HasFuncStroke1() bool { 3484 return js.True == bindings.HasFuncPaintRenderingContext2DStroke1( 3485 this.ref, 3486 ) 3487 } 3488 3489 // FuncStroke1 returns the method "PaintRenderingContext2D.stroke". 3490 func (this PaintRenderingContext2D) FuncStroke1() (fn js.Func[func(path Path2D)]) { 3491 bindings.FuncPaintRenderingContext2DStroke1( 3492 this.ref, js.Pointer(&fn), 3493 ) 3494 return 3495 } 3496 3497 // Stroke1 calls the method "PaintRenderingContext2D.stroke". 3498 func (this PaintRenderingContext2D) Stroke1(path Path2D) (ret js.Void) { 3499 bindings.CallPaintRenderingContext2DStroke1( 3500 this.ref, js.Pointer(&ret), 3501 path.Ref(), 3502 ) 3503 3504 return 3505 } 3506 3507 // TryStroke1 calls the method "PaintRenderingContext2D.stroke" 3508 // in a try/catch block and returns (_, err, ok = false) when it went through 3509 // the catch clause. 3510 func (this PaintRenderingContext2D) TryStroke1(path Path2D) (ret js.Void, exception js.Any, ok bool) { 3511 ok = js.True == bindings.TryPaintRenderingContext2DStroke1( 3512 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3513 path.Ref(), 3514 ) 3515 3516 return 3517 } 3518 3519 // HasFuncClip returns true if the method "PaintRenderingContext2D.clip" exists. 3520 func (this PaintRenderingContext2D) HasFuncClip() bool { 3521 return js.True == bindings.HasFuncPaintRenderingContext2DClip( 3522 this.ref, 3523 ) 3524 } 3525 3526 // FuncClip returns the method "PaintRenderingContext2D.clip". 3527 func (this PaintRenderingContext2D) FuncClip() (fn js.Func[func(fillRule CanvasFillRule)]) { 3528 bindings.FuncPaintRenderingContext2DClip( 3529 this.ref, js.Pointer(&fn), 3530 ) 3531 return 3532 } 3533 3534 // Clip calls the method "PaintRenderingContext2D.clip". 3535 func (this PaintRenderingContext2D) Clip(fillRule CanvasFillRule) (ret js.Void) { 3536 bindings.CallPaintRenderingContext2DClip( 3537 this.ref, js.Pointer(&ret), 3538 uint32(fillRule), 3539 ) 3540 3541 return 3542 } 3543 3544 // TryClip calls the method "PaintRenderingContext2D.clip" 3545 // in a try/catch block and returns (_, err, ok = false) when it went through 3546 // the catch clause. 3547 func (this PaintRenderingContext2D) TryClip(fillRule CanvasFillRule) (ret js.Void, exception js.Any, ok bool) { 3548 ok = js.True == bindings.TryPaintRenderingContext2DClip( 3549 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3550 uint32(fillRule), 3551 ) 3552 3553 return 3554 } 3555 3556 // HasFuncClip1 returns true if the method "PaintRenderingContext2D.clip" exists. 3557 func (this PaintRenderingContext2D) HasFuncClip1() bool { 3558 return js.True == bindings.HasFuncPaintRenderingContext2DClip1( 3559 this.ref, 3560 ) 3561 } 3562 3563 // FuncClip1 returns the method "PaintRenderingContext2D.clip". 3564 func (this PaintRenderingContext2D) FuncClip1() (fn js.Func[func()]) { 3565 bindings.FuncPaintRenderingContext2DClip1( 3566 this.ref, js.Pointer(&fn), 3567 ) 3568 return 3569 } 3570 3571 // Clip1 calls the method "PaintRenderingContext2D.clip". 3572 func (this PaintRenderingContext2D) Clip1() (ret js.Void) { 3573 bindings.CallPaintRenderingContext2DClip1( 3574 this.ref, js.Pointer(&ret), 3575 ) 3576 3577 return 3578 } 3579 3580 // TryClip1 calls the method "PaintRenderingContext2D.clip" 3581 // in a try/catch block and returns (_, err, ok = false) when it went through 3582 // the catch clause. 3583 func (this PaintRenderingContext2D) TryClip1() (ret js.Void, exception js.Any, ok bool) { 3584 ok = js.True == bindings.TryPaintRenderingContext2DClip1( 3585 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3586 ) 3587 3588 return 3589 } 3590 3591 // HasFuncClip2 returns true if the method "PaintRenderingContext2D.clip" exists. 3592 func (this PaintRenderingContext2D) HasFuncClip2() bool { 3593 return js.True == bindings.HasFuncPaintRenderingContext2DClip2( 3594 this.ref, 3595 ) 3596 } 3597 3598 // FuncClip2 returns the method "PaintRenderingContext2D.clip". 3599 func (this PaintRenderingContext2D) FuncClip2() (fn js.Func[func(path Path2D, fillRule CanvasFillRule)]) { 3600 bindings.FuncPaintRenderingContext2DClip2( 3601 this.ref, js.Pointer(&fn), 3602 ) 3603 return 3604 } 3605 3606 // Clip2 calls the method "PaintRenderingContext2D.clip". 3607 func (this PaintRenderingContext2D) Clip2(path Path2D, fillRule CanvasFillRule) (ret js.Void) { 3608 bindings.CallPaintRenderingContext2DClip2( 3609 this.ref, js.Pointer(&ret), 3610 path.Ref(), 3611 uint32(fillRule), 3612 ) 3613 3614 return 3615 } 3616 3617 // TryClip2 calls the method "PaintRenderingContext2D.clip" 3618 // in a try/catch block and returns (_, err, ok = false) when it went through 3619 // the catch clause. 3620 func (this PaintRenderingContext2D) TryClip2(path Path2D, fillRule CanvasFillRule) (ret js.Void, exception js.Any, ok bool) { 3621 ok = js.True == bindings.TryPaintRenderingContext2DClip2( 3622 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3623 path.Ref(), 3624 uint32(fillRule), 3625 ) 3626 3627 return 3628 } 3629 3630 // HasFuncClip3 returns true if the method "PaintRenderingContext2D.clip" exists. 3631 func (this PaintRenderingContext2D) HasFuncClip3() bool { 3632 return js.True == bindings.HasFuncPaintRenderingContext2DClip3( 3633 this.ref, 3634 ) 3635 } 3636 3637 // FuncClip3 returns the method "PaintRenderingContext2D.clip". 3638 func (this PaintRenderingContext2D) FuncClip3() (fn js.Func[func(path Path2D)]) { 3639 bindings.FuncPaintRenderingContext2DClip3( 3640 this.ref, js.Pointer(&fn), 3641 ) 3642 return 3643 } 3644 3645 // Clip3 calls the method "PaintRenderingContext2D.clip". 3646 func (this PaintRenderingContext2D) Clip3(path Path2D) (ret js.Void) { 3647 bindings.CallPaintRenderingContext2DClip3( 3648 this.ref, js.Pointer(&ret), 3649 path.Ref(), 3650 ) 3651 3652 return 3653 } 3654 3655 // TryClip3 calls the method "PaintRenderingContext2D.clip" 3656 // in a try/catch block and returns (_, err, ok = false) when it went through 3657 // the catch clause. 3658 func (this PaintRenderingContext2D) TryClip3(path Path2D) (ret js.Void, exception js.Any, ok bool) { 3659 ok = js.True == bindings.TryPaintRenderingContext2DClip3( 3660 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3661 path.Ref(), 3662 ) 3663 3664 return 3665 } 3666 3667 // HasFuncIsPointInPath returns true if the method "PaintRenderingContext2D.isPointInPath" exists. 3668 func (this PaintRenderingContext2D) HasFuncIsPointInPath() bool { 3669 return js.True == bindings.HasFuncPaintRenderingContext2DIsPointInPath( 3670 this.ref, 3671 ) 3672 } 3673 3674 // FuncIsPointInPath returns the method "PaintRenderingContext2D.isPointInPath". 3675 func (this PaintRenderingContext2D) FuncIsPointInPath() (fn js.Func[func(x float64, y float64, fillRule CanvasFillRule) bool]) { 3676 bindings.FuncPaintRenderingContext2DIsPointInPath( 3677 this.ref, js.Pointer(&fn), 3678 ) 3679 return 3680 } 3681 3682 // IsPointInPath calls the method "PaintRenderingContext2D.isPointInPath". 3683 func (this PaintRenderingContext2D) IsPointInPath(x float64, y float64, fillRule CanvasFillRule) (ret bool) { 3684 bindings.CallPaintRenderingContext2DIsPointInPath( 3685 this.ref, js.Pointer(&ret), 3686 float64(x), 3687 float64(y), 3688 uint32(fillRule), 3689 ) 3690 3691 return 3692 } 3693 3694 // TryIsPointInPath calls the method "PaintRenderingContext2D.isPointInPath" 3695 // in a try/catch block and returns (_, err, ok = false) when it went through 3696 // the catch clause. 3697 func (this PaintRenderingContext2D) TryIsPointInPath(x float64, y float64, fillRule CanvasFillRule) (ret bool, exception js.Any, ok bool) { 3698 ok = js.True == bindings.TryPaintRenderingContext2DIsPointInPath( 3699 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3700 float64(x), 3701 float64(y), 3702 uint32(fillRule), 3703 ) 3704 3705 return 3706 } 3707 3708 // HasFuncIsPointInPath1 returns true if the method "PaintRenderingContext2D.isPointInPath" exists. 3709 func (this PaintRenderingContext2D) HasFuncIsPointInPath1() bool { 3710 return js.True == bindings.HasFuncPaintRenderingContext2DIsPointInPath1( 3711 this.ref, 3712 ) 3713 } 3714 3715 // FuncIsPointInPath1 returns the method "PaintRenderingContext2D.isPointInPath". 3716 func (this PaintRenderingContext2D) FuncIsPointInPath1() (fn js.Func[func(x float64, y float64) bool]) { 3717 bindings.FuncPaintRenderingContext2DIsPointInPath1( 3718 this.ref, js.Pointer(&fn), 3719 ) 3720 return 3721 } 3722 3723 // IsPointInPath1 calls the method "PaintRenderingContext2D.isPointInPath". 3724 func (this PaintRenderingContext2D) IsPointInPath1(x float64, y float64) (ret bool) { 3725 bindings.CallPaintRenderingContext2DIsPointInPath1( 3726 this.ref, js.Pointer(&ret), 3727 float64(x), 3728 float64(y), 3729 ) 3730 3731 return 3732 } 3733 3734 // TryIsPointInPath1 calls the method "PaintRenderingContext2D.isPointInPath" 3735 // in a try/catch block and returns (_, err, ok = false) when it went through 3736 // the catch clause. 3737 func (this PaintRenderingContext2D) TryIsPointInPath1(x float64, y float64) (ret bool, exception js.Any, ok bool) { 3738 ok = js.True == bindings.TryPaintRenderingContext2DIsPointInPath1( 3739 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3740 float64(x), 3741 float64(y), 3742 ) 3743 3744 return 3745 } 3746 3747 // HasFuncIsPointInPath2 returns true if the method "PaintRenderingContext2D.isPointInPath" exists. 3748 func (this PaintRenderingContext2D) HasFuncIsPointInPath2() bool { 3749 return js.True == bindings.HasFuncPaintRenderingContext2DIsPointInPath2( 3750 this.ref, 3751 ) 3752 } 3753 3754 // FuncIsPointInPath2 returns the method "PaintRenderingContext2D.isPointInPath". 3755 func (this PaintRenderingContext2D) FuncIsPointInPath2() (fn js.Func[func(path Path2D, x float64, y float64, fillRule CanvasFillRule) bool]) { 3756 bindings.FuncPaintRenderingContext2DIsPointInPath2( 3757 this.ref, js.Pointer(&fn), 3758 ) 3759 return 3760 } 3761 3762 // IsPointInPath2 calls the method "PaintRenderingContext2D.isPointInPath". 3763 func (this PaintRenderingContext2D) IsPointInPath2(path Path2D, x float64, y float64, fillRule CanvasFillRule) (ret bool) { 3764 bindings.CallPaintRenderingContext2DIsPointInPath2( 3765 this.ref, js.Pointer(&ret), 3766 path.Ref(), 3767 float64(x), 3768 float64(y), 3769 uint32(fillRule), 3770 ) 3771 3772 return 3773 } 3774 3775 // TryIsPointInPath2 calls the method "PaintRenderingContext2D.isPointInPath" 3776 // in a try/catch block and returns (_, err, ok = false) when it went through 3777 // the catch clause. 3778 func (this PaintRenderingContext2D) TryIsPointInPath2(path Path2D, x float64, y float64, fillRule CanvasFillRule) (ret bool, exception js.Any, ok bool) { 3779 ok = js.True == bindings.TryPaintRenderingContext2DIsPointInPath2( 3780 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3781 path.Ref(), 3782 float64(x), 3783 float64(y), 3784 uint32(fillRule), 3785 ) 3786 3787 return 3788 } 3789 3790 // HasFuncIsPointInPath3 returns true if the method "PaintRenderingContext2D.isPointInPath" exists. 3791 func (this PaintRenderingContext2D) HasFuncIsPointInPath3() bool { 3792 return js.True == bindings.HasFuncPaintRenderingContext2DIsPointInPath3( 3793 this.ref, 3794 ) 3795 } 3796 3797 // FuncIsPointInPath3 returns the method "PaintRenderingContext2D.isPointInPath". 3798 func (this PaintRenderingContext2D) FuncIsPointInPath3() (fn js.Func[func(path Path2D, x float64, y float64) bool]) { 3799 bindings.FuncPaintRenderingContext2DIsPointInPath3( 3800 this.ref, js.Pointer(&fn), 3801 ) 3802 return 3803 } 3804 3805 // IsPointInPath3 calls the method "PaintRenderingContext2D.isPointInPath". 3806 func (this PaintRenderingContext2D) IsPointInPath3(path Path2D, x float64, y float64) (ret bool) { 3807 bindings.CallPaintRenderingContext2DIsPointInPath3( 3808 this.ref, js.Pointer(&ret), 3809 path.Ref(), 3810 float64(x), 3811 float64(y), 3812 ) 3813 3814 return 3815 } 3816 3817 // TryIsPointInPath3 calls the method "PaintRenderingContext2D.isPointInPath" 3818 // in a try/catch block and returns (_, err, ok = false) when it went through 3819 // the catch clause. 3820 func (this PaintRenderingContext2D) TryIsPointInPath3(path Path2D, x float64, y float64) (ret bool, exception js.Any, ok bool) { 3821 ok = js.True == bindings.TryPaintRenderingContext2DIsPointInPath3( 3822 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3823 path.Ref(), 3824 float64(x), 3825 float64(y), 3826 ) 3827 3828 return 3829 } 3830 3831 // HasFuncIsPointInStroke returns true if the method "PaintRenderingContext2D.isPointInStroke" exists. 3832 func (this PaintRenderingContext2D) HasFuncIsPointInStroke() bool { 3833 return js.True == bindings.HasFuncPaintRenderingContext2DIsPointInStroke( 3834 this.ref, 3835 ) 3836 } 3837 3838 // FuncIsPointInStroke returns the method "PaintRenderingContext2D.isPointInStroke". 3839 func (this PaintRenderingContext2D) FuncIsPointInStroke() (fn js.Func[func(x float64, y float64) bool]) { 3840 bindings.FuncPaintRenderingContext2DIsPointInStroke( 3841 this.ref, js.Pointer(&fn), 3842 ) 3843 return 3844 } 3845 3846 // IsPointInStroke calls the method "PaintRenderingContext2D.isPointInStroke". 3847 func (this PaintRenderingContext2D) IsPointInStroke(x float64, y float64) (ret bool) { 3848 bindings.CallPaintRenderingContext2DIsPointInStroke( 3849 this.ref, js.Pointer(&ret), 3850 float64(x), 3851 float64(y), 3852 ) 3853 3854 return 3855 } 3856 3857 // TryIsPointInStroke calls the method "PaintRenderingContext2D.isPointInStroke" 3858 // in a try/catch block and returns (_, err, ok = false) when it went through 3859 // the catch clause. 3860 func (this PaintRenderingContext2D) TryIsPointInStroke(x float64, y float64) (ret bool, exception js.Any, ok bool) { 3861 ok = js.True == bindings.TryPaintRenderingContext2DIsPointInStroke( 3862 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3863 float64(x), 3864 float64(y), 3865 ) 3866 3867 return 3868 } 3869 3870 // HasFuncIsPointInStroke1 returns true if the method "PaintRenderingContext2D.isPointInStroke" exists. 3871 func (this PaintRenderingContext2D) HasFuncIsPointInStroke1() bool { 3872 return js.True == bindings.HasFuncPaintRenderingContext2DIsPointInStroke1( 3873 this.ref, 3874 ) 3875 } 3876 3877 // FuncIsPointInStroke1 returns the method "PaintRenderingContext2D.isPointInStroke". 3878 func (this PaintRenderingContext2D) FuncIsPointInStroke1() (fn js.Func[func(path Path2D, x float64, y float64) bool]) { 3879 bindings.FuncPaintRenderingContext2DIsPointInStroke1( 3880 this.ref, js.Pointer(&fn), 3881 ) 3882 return 3883 } 3884 3885 // IsPointInStroke1 calls the method "PaintRenderingContext2D.isPointInStroke". 3886 func (this PaintRenderingContext2D) IsPointInStroke1(path Path2D, x float64, y float64) (ret bool) { 3887 bindings.CallPaintRenderingContext2DIsPointInStroke1( 3888 this.ref, js.Pointer(&ret), 3889 path.Ref(), 3890 float64(x), 3891 float64(y), 3892 ) 3893 3894 return 3895 } 3896 3897 // TryIsPointInStroke1 calls the method "PaintRenderingContext2D.isPointInStroke" 3898 // in a try/catch block and returns (_, err, ok = false) when it went through 3899 // the catch clause. 3900 func (this PaintRenderingContext2D) TryIsPointInStroke1(path Path2D, x float64, y float64) (ret bool, exception js.Any, ok bool) { 3901 ok = js.True == bindings.TryPaintRenderingContext2DIsPointInStroke1( 3902 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3903 path.Ref(), 3904 float64(x), 3905 float64(y), 3906 ) 3907 3908 return 3909 } 3910 3911 // HasFuncClearRect returns true if the method "PaintRenderingContext2D.clearRect" exists. 3912 func (this PaintRenderingContext2D) HasFuncClearRect() bool { 3913 return js.True == bindings.HasFuncPaintRenderingContext2DClearRect( 3914 this.ref, 3915 ) 3916 } 3917 3918 // FuncClearRect returns the method "PaintRenderingContext2D.clearRect". 3919 func (this PaintRenderingContext2D) FuncClearRect() (fn js.Func[func(x float64, y float64, w float64, h float64)]) { 3920 bindings.FuncPaintRenderingContext2DClearRect( 3921 this.ref, js.Pointer(&fn), 3922 ) 3923 return 3924 } 3925 3926 // ClearRect calls the method "PaintRenderingContext2D.clearRect". 3927 func (this PaintRenderingContext2D) ClearRect(x float64, y float64, w float64, h float64) (ret js.Void) { 3928 bindings.CallPaintRenderingContext2DClearRect( 3929 this.ref, js.Pointer(&ret), 3930 float64(x), 3931 float64(y), 3932 float64(w), 3933 float64(h), 3934 ) 3935 3936 return 3937 } 3938 3939 // TryClearRect calls the method "PaintRenderingContext2D.clearRect" 3940 // in a try/catch block and returns (_, err, ok = false) when it went through 3941 // the catch clause. 3942 func (this PaintRenderingContext2D) TryClearRect(x float64, y float64, w float64, h float64) (ret js.Void, exception js.Any, ok bool) { 3943 ok = js.True == bindings.TryPaintRenderingContext2DClearRect( 3944 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3945 float64(x), 3946 float64(y), 3947 float64(w), 3948 float64(h), 3949 ) 3950 3951 return 3952 } 3953 3954 // HasFuncFillRect returns true if the method "PaintRenderingContext2D.fillRect" exists. 3955 func (this PaintRenderingContext2D) HasFuncFillRect() bool { 3956 return js.True == bindings.HasFuncPaintRenderingContext2DFillRect( 3957 this.ref, 3958 ) 3959 } 3960 3961 // FuncFillRect returns the method "PaintRenderingContext2D.fillRect". 3962 func (this PaintRenderingContext2D) FuncFillRect() (fn js.Func[func(x float64, y float64, w float64, h float64)]) { 3963 bindings.FuncPaintRenderingContext2DFillRect( 3964 this.ref, js.Pointer(&fn), 3965 ) 3966 return 3967 } 3968 3969 // FillRect calls the method "PaintRenderingContext2D.fillRect". 3970 func (this PaintRenderingContext2D) FillRect(x float64, y float64, w float64, h float64) (ret js.Void) { 3971 bindings.CallPaintRenderingContext2DFillRect( 3972 this.ref, js.Pointer(&ret), 3973 float64(x), 3974 float64(y), 3975 float64(w), 3976 float64(h), 3977 ) 3978 3979 return 3980 } 3981 3982 // TryFillRect calls the method "PaintRenderingContext2D.fillRect" 3983 // in a try/catch block and returns (_, err, ok = false) when it went through 3984 // the catch clause. 3985 func (this PaintRenderingContext2D) TryFillRect(x float64, y float64, w float64, h float64) (ret js.Void, exception js.Any, ok bool) { 3986 ok = js.True == bindings.TryPaintRenderingContext2DFillRect( 3987 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3988 float64(x), 3989 float64(y), 3990 float64(w), 3991 float64(h), 3992 ) 3993 3994 return 3995 } 3996 3997 // HasFuncStrokeRect returns true if the method "PaintRenderingContext2D.strokeRect" exists. 3998 func (this PaintRenderingContext2D) HasFuncStrokeRect() bool { 3999 return js.True == bindings.HasFuncPaintRenderingContext2DStrokeRect( 4000 this.ref, 4001 ) 4002 } 4003 4004 // FuncStrokeRect returns the method "PaintRenderingContext2D.strokeRect". 4005 func (this PaintRenderingContext2D) FuncStrokeRect() (fn js.Func[func(x float64, y float64, w float64, h float64)]) { 4006 bindings.FuncPaintRenderingContext2DStrokeRect( 4007 this.ref, js.Pointer(&fn), 4008 ) 4009 return 4010 } 4011 4012 // StrokeRect calls the method "PaintRenderingContext2D.strokeRect". 4013 func (this PaintRenderingContext2D) StrokeRect(x float64, y float64, w float64, h float64) (ret js.Void) { 4014 bindings.CallPaintRenderingContext2DStrokeRect( 4015 this.ref, js.Pointer(&ret), 4016 float64(x), 4017 float64(y), 4018 float64(w), 4019 float64(h), 4020 ) 4021 4022 return 4023 } 4024 4025 // TryStrokeRect calls the method "PaintRenderingContext2D.strokeRect" 4026 // in a try/catch block and returns (_, err, ok = false) when it went through 4027 // the catch clause. 4028 func (this PaintRenderingContext2D) TryStrokeRect(x float64, y float64, w float64, h float64) (ret js.Void, exception js.Any, ok bool) { 4029 ok = js.True == bindings.TryPaintRenderingContext2DStrokeRect( 4030 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4031 float64(x), 4032 float64(y), 4033 float64(w), 4034 float64(h), 4035 ) 4036 4037 return 4038 } 4039 4040 // HasFuncCreateLinearGradient returns true if the method "PaintRenderingContext2D.createLinearGradient" exists. 4041 func (this PaintRenderingContext2D) HasFuncCreateLinearGradient() bool { 4042 return js.True == bindings.HasFuncPaintRenderingContext2DCreateLinearGradient( 4043 this.ref, 4044 ) 4045 } 4046 4047 // FuncCreateLinearGradient returns the method "PaintRenderingContext2D.createLinearGradient". 4048 func (this PaintRenderingContext2D) FuncCreateLinearGradient() (fn js.Func[func(x0 float64, y0 float64, x1 float64, y1 float64) CanvasGradient]) { 4049 bindings.FuncPaintRenderingContext2DCreateLinearGradient( 4050 this.ref, js.Pointer(&fn), 4051 ) 4052 return 4053 } 4054 4055 // CreateLinearGradient calls the method "PaintRenderingContext2D.createLinearGradient". 4056 func (this PaintRenderingContext2D) CreateLinearGradient(x0 float64, y0 float64, x1 float64, y1 float64) (ret CanvasGradient) { 4057 bindings.CallPaintRenderingContext2DCreateLinearGradient( 4058 this.ref, js.Pointer(&ret), 4059 float64(x0), 4060 float64(y0), 4061 float64(x1), 4062 float64(y1), 4063 ) 4064 4065 return 4066 } 4067 4068 // TryCreateLinearGradient calls the method "PaintRenderingContext2D.createLinearGradient" 4069 // in a try/catch block and returns (_, err, ok = false) when it went through 4070 // the catch clause. 4071 func (this PaintRenderingContext2D) TryCreateLinearGradient(x0 float64, y0 float64, x1 float64, y1 float64) (ret CanvasGradient, exception js.Any, ok bool) { 4072 ok = js.True == bindings.TryPaintRenderingContext2DCreateLinearGradient( 4073 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4074 float64(x0), 4075 float64(y0), 4076 float64(x1), 4077 float64(y1), 4078 ) 4079 4080 return 4081 } 4082 4083 // HasFuncCreateRadialGradient returns true if the method "PaintRenderingContext2D.createRadialGradient" exists. 4084 func (this PaintRenderingContext2D) HasFuncCreateRadialGradient() bool { 4085 return js.True == bindings.HasFuncPaintRenderingContext2DCreateRadialGradient( 4086 this.ref, 4087 ) 4088 } 4089 4090 // FuncCreateRadialGradient returns the method "PaintRenderingContext2D.createRadialGradient". 4091 func (this PaintRenderingContext2D) FuncCreateRadialGradient() (fn js.Func[func(x0 float64, y0 float64, r0 float64, x1 float64, y1 float64, r1 float64) CanvasGradient]) { 4092 bindings.FuncPaintRenderingContext2DCreateRadialGradient( 4093 this.ref, js.Pointer(&fn), 4094 ) 4095 return 4096 } 4097 4098 // CreateRadialGradient calls the method "PaintRenderingContext2D.createRadialGradient". 4099 func (this PaintRenderingContext2D) CreateRadialGradient(x0 float64, y0 float64, r0 float64, x1 float64, y1 float64, r1 float64) (ret CanvasGradient) { 4100 bindings.CallPaintRenderingContext2DCreateRadialGradient( 4101 this.ref, js.Pointer(&ret), 4102 float64(x0), 4103 float64(y0), 4104 float64(r0), 4105 float64(x1), 4106 float64(y1), 4107 float64(r1), 4108 ) 4109 4110 return 4111 } 4112 4113 // TryCreateRadialGradient calls the method "PaintRenderingContext2D.createRadialGradient" 4114 // in a try/catch block and returns (_, err, ok = false) when it went through 4115 // the catch clause. 4116 func (this PaintRenderingContext2D) TryCreateRadialGradient(x0 float64, y0 float64, r0 float64, x1 float64, y1 float64, r1 float64) (ret CanvasGradient, exception js.Any, ok bool) { 4117 ok = js.True == bindings.TryPaintRenderingContext2DCreateRadialGradient( 4118 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4119 float64(x0), 4120 float64(y0), 4121 float64(r0), 4122 float64(x1), 4123 float64(y1), 4124 float64(r1), 4125 ) 4126 4127 return 4128 } 4129 4130 // HasFuncCreateConicGradient returns true if the method "PaintRenderingContext2D.createConicGradient" exists. 4131 func (this PaintRenderingContext2D) HasFuncCreateConicGradient() bool { 4132 return js.True == bindings.HasFuncPaintRenderingContext2DCreateConicGradient( 4133 this.ref, 4134 ) 4135 } 4136 4137 // FuncCreateConicGradient returns the method "PaintRenderingContext2D.createConicGradient". 4138 func (this PaintRenderingContext2D) FuncCreateConicGradient() (fn js.Func[func(startAngle float64, x float64, y float64) CanvasGradient]) { 4139 bindings.FuncPaintRenderingContext2DCreateConicGradient( 4140 this.ref, js.Pointer(&fn), 4141 ) 4142 return 4143 } 4144 4145 // CreateConicGradient calls the method "PaintRenderingContext2D.createConicGradient". 4146 func (this PaintRenderingContext2D) CreateConicGradient(startAngle float64, x float64, y float64) (ret CanvasGradient) { 4147 bindings.CallPaintRenderingContext2DCreateConicGradient( 4148 this.ref, js.Pointer(&ret), 4149 float64(startAngle), 4150 float64(x), 4151 float64(y), 4152 ) 4153 4154 return 4155 } 4156 4157 // TryCreateConicGradient calls the method "PaintRenderingContext2D.createConicGradient" 4158 // in a try/catch block and returns (_, err, ok = false) when it went through 4159 // the catch clause. 4160 func (this PaintRenderingContext2D) TryCreateConicGradient(startAngle float64, x float64, y float64) (ret CanvasGradient, exception js.Any, ok bool) { 4161 ok = js.True == bindings.TryPaintRenderingContext2DCreateConicGradient( 4162 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4163 float64(startAngle), 4164 float64(x), 4165 float64(y), 4166 ) 4167 4168 return 4169 } 4170 4171 // HasFuncCreatePattern returns true if the method "PaintRenderingContext2D.createPattern" exists. 4172 func (this PaintRenderingContext2D) HasFuncCreatePattern() bool { 4173 return js.True == bindings.HasFuncPaintRenderingContext2DCreatePattern( 4174 this.ref, 4175 ) 4176 } 4177 4178 // FuncCreatePattern returns the method "PaintRenderingContext2D.createPattern". 4179 func (this PaintRenderingContext2D) FuncCreatePattern() (fn js.Func[func(image CanvasImageSource, repetition js.String) CanvasPattern]) { 4180 bindings.FuncPaintRenderingContext2DCreatePattern( 4181 this.ref, js.Pointer(&fn), 4182 ) 4183 return 4184 } 4185 4186 // CreatePattern calls the method "PaintRenderingContext2D.createPattern". 4187 func (this PaintRenderingContext2D) CreatePattern(image CanvasImageSource, repetition js.String) (ret CanvasPattern) { 4188 bindings.CallPaintRenderingContext2DCreatePattern( 4189 this.ref, js.Pointer(&ret), 4190 image.Ref(), 4191 repetition.Ref(), 4192 ) 4193 4194 return 4195 } 4196 4197 // TryCreatePattern calls the method "PaintRenderingContext2D.createPattern" 4198 // in a try/catch block and returns (_, err, ok = false) when it went through 4199 // the catch clause. 4200 func (this PaintRenderingContext2D) TryCreatePattern(image CanvasImageSource, repetition js.String) (ret CanvasPattern, exception js.Any, ok bool) { 4201 ok = js.True == bindings.TryPaintRenderingContext2DCreatePattern( 4202 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4203 image.Ref(), 4204 repetition.Ref(), 4205 ) 4206 4207 return 4208 } 4209 4210 // HasFuncScale returns true if the method "PaintRenderingContext2D.scale" exists. 4211 func (this PaintRenderingContext2D) HasFuncScale() bool { 4212 return js.True == bindings.HasFuncPaintRenderingContext2DScale( 4213 this.ref, 4214 ) 4215 } 4216 4217 // FuncScale returns the method "PaintRenderingContext2D.scale". 4218 func (this PaintRenderingContext2D) FuncScale() (fn js.Func[func(x float64, y float64)]) { 4219 bindings.FuncPaintRenderingContext2DScale( 4220 this.ref, js.Pointer(&fn), 4221 ) 4222 return 4223 } 4224 4225 // Scale calls the method "PaintRenderingContext2D.scale". 4226 func (this PaintRenderingContext2D) Scale(x float64, y float64) (ret js.Void) { 4227 bindings.CallPaintRenderingContext2DScale( 4228 this.ref, js.Pointer(&ret), 4229 float64(x), 4230 float64(y), 4231 ) 4232 4233 return 4234 } 4235 4236 // TryScale calls the method "PaintRenderingContext2D.scale" 4237 // in a try/catch block and returns (_, err, ok = false) when it went through 4238 // the catch clause. 4239 func (this PaintRenderingContext2D) TryScale(x float64, y float64) (ret js.Void, exception js.Any, ok bool) { 4240 ok = js.True == bindings.TryPaintRenderingContext2DScale( 4241 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4242 float64(x), 4243 float64(y), 4244 ) 4245 4246 return 4247 } 4248 4249 // HasFuncRotate returns true if the method "PaintRenderingContext2D.rotate" exists. 4250 func (this PaintRenderingContext2D) HasFuncRotate() bool { 4251 return js.True == bindings.HasFuncPaintRenderingContext2DRotate( 4252 this.ref, 4253 ) 4254 } 4255 4256 // FuncRotate returns the method "PaintRenderingContext2D.rotate". 4257 func (this PaintRenderingContext2D) FuncRotate() (fn js.Func[func(angle float64)]) { 4258 bindings.FuncPaintRenderingContext2DRotate( 4259 this.ref, js.Pointer(&fn), 4260 ) 4261 return 4262 } 4263 4264 // Rotate calls the method "PaintRenderingContext2D.rotate". 4265 func (this PaintRenderingContext2D) Rotate(angle float64) (ret js.Void) { 4266 bindings.CallPaintRenderingContext2DRotate( 4267 this.ref, js.Pointer(&ret), 4268 float64(angle), 4269 ) 4270 4271 return 4272 } 4273 4274 // TryRotate calls the method "PaintRenderingContext2D.rotate" 4275 // in a try/catch block and returns (_, err, ok = false) when it went through 4276 // the catch clause. 4277 func (this PaintRenderingContext2D) TryRotate(angle float64) (ret js.Void, exception js.Any, ok bool) { 4278 ok = js.True == bindings.TryPaintRenderingContext2DRotate( 4279 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4280 float64(angle), 4281 ) 4282 4283 return 4284 } 4285 4286 // HasFuncTranslate returns true if the method "PaintRenderingContext2D.translate" exists. 4287 func (this PaintRenderingContext2D) HasFuncTranslate() bool { 4288 return js.True == bindings.HasFuncPaintRenderingContext2DTranslate( 4289 this.ref, 4290 ) 4291 } 4292 4293 // FuncTranslate returns the method "PaintRenderingContext2D.translate". 4294 func (this PaintRenderingContext2D) FuncTranslate() (fn js.Func[func(x float64, y float64)]) { 4295 bindings.FuncPaintRenderingContext2DTranslate( 4296 this.ref, js.Pointer(&fn), 4297 ) 4298 return 4299 } 4300 4301 // Translate calls the method "PaintRenderingContext2D.translate". 4302 func (this PaintRenderingContext2D) Translate(x float64, y float64) (ret js.Void) { 4303 bindings.CallPaintRenderingContext2DTranslate( 4304 this.ref, js.Pointer(&ret), 4305 float64(x), 4306 float64(y), 4307 ) 4308 4309 return 4310 } 4311 4312 // TryTranslate calls the method "PaintRenderingContext2D.translate" 4313 // in a try/catch block and returns (_, err, ok = false) when it went through 4314 // the catch clause. 4315 func (this PaintRenderingContext2D) TryTranslate(x float64, y float64) (ret js.Void, exception js.Any, ok bool) { 4316 ok = js.True == bindings.TryPaintRenderingContext2DTranslate( 4317 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4318 float64(x), 4319 float64(y), 4320 ) 4321 4322 return 4323 } 4324 4325 // HasFuncTransform returns true if the method "PaintRenderingContext2D.transform" exists. 4326 func (this PaintRenderingContext2D) HasFuncTransform() bool { 4327 return js.True == bindings.HasFuncPaintRenderingContext2DTransform( 4328 this.ref, 4329 ) 4330 } 4331 4332 // FuncTransform returns the method "PaintRenderingContext2D.transform". 4333 func (this PaintRenderingContext2D) FuncTransform() (fn js.Func[func(a float64, b float64, c float64, d float64, e float64, f float64)]) { 4334 bindings.FuncPaintRenderingContext2DTransform( 4335 this.ref, js.Pointer(&fn), 4336 ) 4337 return 4338 } 4339 4340 // Transform calls the method "PaintRenderingContext2D.transform". 4341 func (this PaintRenderingContext2D) Transform(a float64, b float64, c float64, d float64, e float64, f float64) (ret js.Void) { 4342 bindings.CallPaintRenderingContext2DTransform( 4343 this.ref, js.Pointer(&ret), 4344 float64(a), 4345 float64(b), 4346 float64(c), 4347 float64(d), 4348 float64(e), 4349 float64(f), 4350 ) 4351 4352 return 4353 } 4354 4355 // TryTransform calls the method "PaintRenderingContext2D.transform" 4356 // in a try/catch block and returns (_, err, ok = false) when it went through 4357 // the catch clause. 4358 func (this PaintRenderingContext2D) TryTransform(a float64, b float64, c float64, d float64, e float64, f float64) (ret js.Void, exception js.Any, ok bool) { 4359 ok = js.True == bindings.TryPaintRenderingContext2DTransform( 4360 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4361 float64(a), 4362 float64(b), 4363 float64(c), 4364 float64(d), 4365 float64(e), 4366 float64(f), 4367 ) 4368 4369 return 4370 } 4371 4372 // HasFuncGetTransform returns true if the method "PaintRenderingContext2D.getTransform" exists. 4373 func (this PaintRenderingContext2D) HasFuncGetTransform() bool { 4374 return js.True == bindings.HasFuncPaintRenderingContext2DGetTransform( 4375 this.ref, 4376 ) 4377 } 4378 4379 // FuncGetTransform returns the method "PaintRenderingContext2D.getTransform". 4380 func (this PaintRenderingContext2D) FuncGetTransform() (fn js.Func[func() DOMMatrix]) { 4381 bindings.FuncPaintRenderingContext2DGetTransform( 4382 this.ref, js.Pointer(&fn), 4383 ) 4384 return 4385 } 4386 4387 // GetTransform calls the method "PaintRenderingContext2D.getTransform". 4388 func (this PaintRenderingContext2D) GetTransform() (ret DOMMatrix) { 4389 bindings.CallPaintRenderingContext2DGetTransform( 4390 this.ref, js.Pointer(&ret), 4391 ) 4392 4393 return 4394 } 4395 4396 // TryGetTransform calls the method "PaintRenderingContext2D.getTransform" 4397 // in a try/catch block and returns (_, err, ok = false) when it went through 4398 // the catch clause. 4399 func (this PaintRenderingContext2D) TryGetTransform() (ret DOMMatrix, exception js.Any, ok bool) { 4400 ok = js.True == bindings.TryPaintRenderingContext2DGetTransform( 4401 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4402 ) 4403 4404 return 4405 } 4406 4407 // HasFuncSetTransform returns true if the method "PaintRenderingContext2D.setTransform" exists. 4408 func (this PaintRenderingContext2D) HasFuncSetTransform() bool { 4409 return js.True == bindings.HasFuncPaintRenderingContext2DSetTransform( 4410 this.ref, 4411 ) 4412 } 4413 4414 // FuncSetTransform returns the method "PaintRenderingContext2D.setTransform". 4415 func (this PaintRenderingContext2D) FuncSetTransform() (fn js.Func[func(a float64, b float64, c float64, d float64, e float64, f float64)]) { 4416 bindings.FuncPaintRenderingContext2DSetTransform( 4417 this.ref, js.Pointer(&fn), 4418 ) 4419 return 4420 } 4421 4422 // SetTransform calls the method "PaintRenderingContext2D.setTransform". 4423 func (this PaintRenderingContext2D) SetTransform(a float64, b float64, c float64, d float64, e float64, f float64) (ret js.Void) { 4424 bindings.CallPaintRenderingContext2DSetTransform( 4425 this.ref, js.Pointer(&ret), 4426 float64(a), 4427 float64(b), 4428 float64(c), 4429 float64(d), 4430 float64(e), 4431 float64(f), 4432 ) 4433 4434 return 4435 } 4436 4437 // TrySetTransform calls the method "PaintRenderingContext2D.setTransform" 4438 // in a try/catch block and returns (_, err, ok = false) when it went through 4439 // the catch clause. 4440 func (this PaintRenderingContext2D) TrySetTransform(a float64, b float64, c float64, d float64, e float64, f float64) (ret js.Void, exception js.Any, ok bool) { 4441 ok = js.True == bindings.TryPaintRenderingContext2DSetTransform( 4442 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4443 float64(a), 4444 float64(b), 4445 float64(c), 4446 float64(d), 4447 float64(e), 4448 float64(f), 4449 ) 4450 4451 return 4452 } 4453 4454 // HasFuncSetTransform1 returns true if the method "PaintRenderingContext2D.setTransform" exists. 4455 func (this PaintRenderingContext2D) HasFuncSetTransform1() bool { 4456 return js.True == bindings.HasFuncPaintRenderingContext2DSetTransform1( 4457 this.ref, 4458 ) 4459 } 4460 4461 // FuncSetTransform1 returns the method "PaintRenderingContext2D.setTransform". 4462 func (this PaintRenderingContext2D) FuncSetTransform1() (fn js.Func[func(transform DOMMatrix2DInit)]) { 4463 bindings.FuncPaintRenderingContext2DSetTransform1( 4464 this.ref, js.Pointer(&fn), 4465 ) 4466 return 4467 } 4468 4469 // SetTransform1 calls the method "PaintRenderingContext2D.setTransform". 4470 func (this PaintRenderingContext2D) SetTransform1(transform DOMMatrix2DInit) (ret js.Void) { 4471 bindings.CallPaintRenderingContext2DSetTransform1( 4472 this.ref, js.Pointer(&ret), 4473 js.Pointer(&transform), 4474 ) 4475 4476 return 4477 } 4478 4479 // TrySetTransform1 calls the method "PaintRenderingContext2D.setTransform" 4480 // in a try/catch block and returns (_, err, ok = false) when it went through 4481 // the catch clause. 4482 func (this PaintRenderingContext2D) TrySetTransform1(transform DOMMatrix2DInit) (ret js.Void, exception js.Any, ok bool) { 4483 ok = js.True == bindings.TryPaintRenderingContext2DSetTransform1( 4484 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4485 js.Pointer(&transform), 4486 ) 4487 4488 return 4489 } 4490 4491 // HasFuncSetTransform2 returns true if the method "PaintRenderingContext2D.setTransform" exists. 4492 func (this PaintRenderingContext2D) HasFuncSetTransform2() bool { 4493 return js.True == bindings.HasFuncPaintRenderingContext2DSetTransform2( 4494 this.ref, 4495 ) 4496 } 4497 4498 // FuncSetTransform2 returns the method "PaintRenderingContext2D.setTransform". 4499 func (this PaintRenderingContext2D) FuncSetTransform2() (fn js.Func[func()]) { 4500 bindings.FuncPaintRenderingContext2DSetTransform2( 4501 this.ref, js.Pointer(&fn), 4502 ) 4503 return 4504 } 4505 4506 // SetTransform2 calls the method "PaintRenderingContext2D.setTransform". 4507 func (this PaintRenderingContext2D) SetTransform2() (ret js.Void) { 4508 bindings.CallPaintRenderingContext2DSetTransform2( 4509 this.ref, js.Pointer(&ret), 4510 ) 4511 4512 return 4513 } 4514 4515 // TrySetTransform2 calls the method "PaintRenderingContext2D.setTransform" 4516 // in a try/catch block and returns (_, err, ok = false) when it went through 4517 // the catch clause. 4518 func (this PaintRenderingContext2D) TrySetTransform2() (ret js.Void, exception js.Any, ok bool) { 4519 ok = js.True == bindings.TryPaintRenderingContext2DSetTransform2( 4520 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4521 ) 4522 4523 return 4524 } 4525 4526 // HasFuncResetTransform returns true if the method "PaintRenderingContext2D.resetTransform" exists. 4527 func (this PaintRenderingContext2D) HasFuncResetTransform() bool { 4528 return js.True == bindings.HasFuncPaintRenderingContext2DResetTransform( 4529 this.ref, 4530 ) 4531 } 4532 4533 // FuncResetTransform returns the method "PaintRenderingContext2D.resetTransform". 4534 func (this PaintRenderingContext2D) FuncResetTransform() (fn js.Func[func()]) { 4535 bindings.FuncPaintRenderingContext2DResetTransform( 4536 this.ref, js.Pointer(&fn), 4537 ) 4538 return 4539 } 4540 4541 // ResetTransform calls the method "PaintRenderingContext2D.resetTransform". 4542 func (this PaintRenderingContext2D) ResetTransform() (ret js.Void) { 4543 bindings.CallPaintRenderingContext2DResetTransform( 4544 this.ref, js.Pointer(&ret), 4545 ) 4546 4547 return 4548 } 4549 4550 // TryResetTransform calls the method "PaintRenderingContext2D.resetTransform" 4551 // in a try/catch block and returns (_, err, ok = false) when it went through 4552 // the catch clause. 4553 func (this PaintRenderingContext2D) TryResetTransform() (ret js.Void, exception js.Any, ok bool) { 4554 ok = js.True == bindings.TryPaintRenderingContext2DResetTransform( 4555 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4556 ) 4557 4558 return 4559 } 4560 4561 // HasFuncSave returns true if the method "PaintRenderingContext2D.save" exists. 4562 func (this PaintRenderingContext2D) HasFuncSave() bool { 4563 return js.True == bindings.HasFuncPaintRenderingContext2DSave( 4564 this.ref, 4565 ) 4566 } 4567 4568 // FuncSave returns the method "PaintRenderingContext2D.save". 4569 func (this PaintRenderingContext2D) FuncSave() (fn js.Func[func()]) { 4570 bindings.FuncPaintRenderingContext2DSave( 4571 this.ref, js.Pointer(&fn), 4572 ) 4573 return 4574 } 4575 4576 // Save calls the method "PaintRenderingContext2D.save". 4577 func (this PaintRenderingContext2D) Save() (ret js.Void) { 4578 bindings.CallPaintRenderingContext2DSave( 4579 this.ref, js.Pointer(&ret), 4580 ) 4581 4582 return 4583 } 4584 4585 // TrySave calls the method "PaintRenderingContext2D.save" 4586 // in a try/catch block and returns (_, err, ok = false) when it went through 4587 // the catch clause. 4588 func (this PaintRenderingContext2D) TrySave() (ret js.Void, exception js.Any, ok bool) { 4589 ok = js.True == bindings.TryPaintRenderingContext2DSave( 4590 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4591 ) 4592 4593 return 4594 } 4595 4596 // HasFuncRestore returns true if the method "PaintRenderingContext2D.restore" exists. 4597 func (this PaintRenderingContext2D) HasFuncRestore() bool { 4598 return js.True == bindings.HasFuncPaintRenderingContext2DRestore( 4599 this.ref, 4600 ) 4601 } 4602 4603 // FuncRestore returns the method "PaintRenderingContext2D.restore". 4604 func (this PaintRenderingContext2D) FuncRestore() (fn js.Func[func()]) { 4605 bindings.FuncPaintRenderingContext2DRestore( 4606 this.ref, js.Pointer(&fn), 4607 ) 4608 return 4609 } 4610 4611 // Restore calls the method "PaintRenderingContext2D.restore". 4612 func (this PaintRenderingContext2D) Restore() (ret js.Void) { 4613 bindings.CallPaintRenderingContext2DRestore( 4614 this.ref, js.Pointer(&ret), 4615 ) 4616 4617 return 4618 } 4619 4620 // TryRestore calls the method "PaintRenderingContext2D.restore" 4621 // in a try/catch block and returns (_, err, ok = false) when it went through 4622 // the catch clause. 4623 func (this PaintRenderingContext2D) TryRestore() (ret js.Void, exception js.Any, ok bool) { 4624 ok = js.True == bindings.TryPaintRenderingContext2DRestore( 4625 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4626 ) 4627 4628 return 4629 } 4630 4631 // HasFuncReset returns true if the method "PaintRenderingContext2D.reset" exists. 4632 func (this PaintRenderingContext2D) HasFuncReset() bool { 4633 return js.True == bindings.HasFuncPaintRenderingContext2DReset( 4634 this.ref, 4635 ) 4636 } 4637 4638 // FuncReset returns the method "PaintRenderingContext2D.reset". 4639 func (this PaintRenderingContext2D) FuncReset() (fn js.Func[func()]) { 4640 bindings.FuncPaintRenderingContext2DReset( 4641 this.ref, js.Pointer(&fn), 4642 ) 4643 return 4644 } 4645 4646 // Reset calls the method "PaintRenderingContext2D.reset". 4647 func (this PaintRenderingContext2D) Reset() (ret js.Void) { 4648 bindings.CallPaintRenderingContext2DReset( 4649 this.ref, js.Pointer(&ret), 4650 ) 4651 4652 return 4653 } 4654 4655 // TryReset calls the method "PaintRenderingContext2D.reset" 4656 // in a try/catch block and returns (_, err, ok = false) when it went through 4657 // the catch clause. 4658 func (this PaintRenderingContext2D) TryReset() (ret js.Void, exception js.Any, ok bool) { 4659 ok = js.True == bindings.TryPaintRenderingContext2DReset( 4660 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4661 ) 4662 4663 return 4664 } 4665 4666 // HasFuncIsContextLost returns true if the method "PaintRenderingContext2D.isContextLost" exists. 4667 func (this PaintRenderingContext2D) HasFuncIsContextLost() bool { 4668 return js.True == bindings.HasFuncPaintRenderingContext2DIsContextLost( 4669 this.ref, 4670 ) 4671 } 4672 4673 // FuncIsContextLost returns the method "PaintRenderingContext2D.isContextLost". 4674 func (this PaintRenderingContext2D) FuncIsContextLost() (fn js.Func[func() bool]) { 4675 bindings.FuncPaintRenderingContext2DIsContextLost( 4676 this.ref, js.Pointer(&fn), 4677 ) 4678 return 4679 } 4680 4681 // IsContextLost calls the method "PaintRenderingContext2D.isContextLost". 4682 func (this PaintRenderingContext2D) IsContextLost() (ret bool) { 4683 bindings.CallPaintRenderingContext2DIsContextLost( 4684 this.ref, js.Pointer(&ret), 4685 ) 4686 4687 return 4688 } 4689 4690 // TryIsContextLost calls the method "PaintRenderingContext2D.isContextLost" 4691 // in a try/catch block and returns (_, err, ok = false) when it went through 4692 // the catch clause. 4693 func (this PaintRenderingContext2D) TryIsContextLost() (ret bool, exception js.Any, ok bool) { 4694 ok = js.True == bindings.TryPaintRenderingContext2DIsContextLost( 4695 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4696 ) 4697 4698 return 4699 } 4700 4701 type PaintRenderingContext2DSettings struct { 4702 // Alpha is "PaintRenderingContext2DSettings.alpha" 4703 // 4704 // Optional, defaults to true. 4705 // 4706 // NOTE: FFI_USE_Alpha MUST be set to true to make this field effective. 4707 Alpha bool 4708 4709 FFI_USE_Alpha bool // for Alpha. 4710 4711 FFI_USE bool 4712 } 4713 4714 // FromRef calls UpdateFrom and returns a PaintRenderingContext2DSettings with all fields set. 4715 func (p PaintRenderingContext2DSettings) FromRef(ref js.Ref) PaintRenderingContext2DSettings { 4716 p.UpdateFrom(ref) 4717 return p 4718 } 4719 4720 // New creates a new PaintRenderingContext2DSettings in the application heap. 4721 func (p PaintRenderingContext2DSettings) New() js.Ref { 4722 return bindings.PaintRenderingContext2DSettingsJSLoad( 4723 js.Pointer(&p), js.True, 0, 4724 ) 4725 } 4726 4727 // UpdateFrom copies value of all fields of the heap object to p. 4728 func (p *PaintRenderingContext2DSettings) UpdateFrom(ref js.Ref) { 4729 bindings.PaintRenderingContext2DSettingsJSStore( 4730 js.Pointer(p), ref, 4731 ) 4732 } 4733 4734 // Update writes all fields of the p to the heap object referenced by ref. 4735 func (p *PaintRenderingContext2DSettings) Update(ref js.Ref) { 4736 bindings.PaintRenderingContext2DSettingsJSLoad( 4737 js.Pointer(p), js.False, ref, 4738 ) 4739 } 4740 4741 // FreeMembers frees fields with heap reference, if recursive is true 4742 // free all heap references reachable from p. 4743 func (p *PaintRenderingContext2DSettings) FreeMembers(recursive bool) { 4744 } 4745 4746 type PaintSize struct { 4747 ref js.Ref 4748 } 4749 4750 func (this PaintSize) Once() PaintSize { 4751 this.ref.Once() 4752 return this 4753 } 4754 4755 func (this PaintSize) Ref() js.Ref { 4756 return this.ref 4757 } 4758 4759 func (this PaintSize) FromRef(ref js.Ref) PaintSize { 4760 this.ref = ref 4761 return this 4762 } 4763 4764 func (this PaintSize) Free() { 4765 this.ref.Free() 4766 } 4767 4768 // Width returns the value of property "PaintSize.width". 4769 // 4770 // It returns ok=false if there is no such property. 4771 func (this PaintSize) Width() (ret float64, ok bool) { 4772 ok = js.True == bindings.GetPaintSizeWidth( 4773 this.ref, js.Pointer(&ret), 4774 ) 4775 return 4776 } 4777 4778 // Height returns the value of property "PaintSize.height". 4779 // 4780 // It returns ok=false if there is no such property. 4781 func (this PaintSize) Height() (ret float64, ok bool) { 4782 ok = js.True == bindings.GetPaintSizeHeight( 4783 this.ref, js.Pointer(&ret), 4784 ) 4785 return 4786 } 4787 4788 type PaintWorkletGlobalScope struct { 4789 WorkletGlobalScope 4790 } 4791 4792 func (this PaintWorkletGlobalScope) Once() PaintWorkletGlobalScope { 4793 this.ref.Once() 4794 return this 4795 } 4796 4797 func (this PaintWorkletGlobalScope) Ref() js.Ref { 4798 return this.WorkletGlobalScope.Ref() 4799 } 4800 4801 func (this PaintWorkletGlobalScope) FromRef(ref js.Ref) PaintWorkletGlobalScope { 4802 this.WorkletGlobalScope = this.WorkletGlobalScope.FromRef(ref) 4803 return this 4804 } 4805 4806 func (this PaintWorkletGlobalScope) Free() { 4807 this.ref.Free() 4808 } 4809 4810 // DevicePixelRatio returns the value of property "PaintWorkletGlobalScope.devicePixelRatio". 4811 // 4812 // It returns ok=false if there is no such property. 4813 func (this PaintWorkletGlobalScope) DevicePixelRatio() (ret float64, ok bool) { 4814 ok = js.True == bindings.GetPaintWorkletGlobalScopeDevicePixelRatio( 4815 this.ref, js.Pointer(&ret), 4816 ) 4817 return 4818 } 4819 4820 // HasFuncRegisterPaint returns true if the method "PaintWorkletGlobalScope.registerPaint" exists. 4821 func (this PaintWorkletGlobalScope) HasFuncRegisterPaint() bool { 4822 return js.True == bindings.HasFuncPaintWorkletGlobalScopeRegisterPaint( 4823 this.ref, 4824 ) 4825 } 4826 4827 // FuncRegisterPaint returns the method "PaintWorkletGlobalScope.registerPaint". 4828 func (this PaintWorkletGlobalScope) FuncRegisterPaint() (fn js.Func[func(name js.String, paintCtor js.Func[func()])]) { 4829 bindings.FuncPaintWorkletGlobalScopeRegisterPaint( 4830 this.ref, js.Pointer(&fn), 4831 ) 4832 return 4833 } 4834 4835 // RegisterPaint calls the method "PaintWorkletGlobalScope.registerPaint". 4836 func (this PaintWorkletGlobalScope) RegisterPaint(name js.String, paintCtor js.Func[func()]) (ret js.Void) { 4837 bindings.CallPaintWorkletGlobalScopeRegisterPaint( 4838 this.ref, js.Pointer(&ret), 4839 name.Ref(), 4840 paintCtor.Ref(), 4841 ) 4842 4843 return 4844 } 4845 4846 // TryRegisterPaint calls the method "PaintWorkletGlobalScope.registerPaint" 4847 // in a try/catch block and returns (_, err, ok = false) when it went through 4848 // the catch clause. 4849 func (this PaintWorkletGlobalScope) TryRegisterPaint(name js.String, paintCtor js.Func[func()]) (ret js.Void, exception js.Any, ok bool) { 4850 ok = js.True == bindings.TryPaintWorkletGlobalScopeRegisterPaint( 4851 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4852 name.Ref(), 4853 paintCtor.Ref(), 4854 ) 4855 4856 return 4857 } 4858 4859 func NewPasswordCredential(form HTMLFormElement) (ret PasswordCredential) { 4860 ret.ref = bindings.NewPasswordCredentialByPasswordCredential( 4861 form.Ref()) 4862 return 4863 } 4864 4865 func NewPasswordCredentialByPasswordCredential1(data PasswordCredentialData) (ret PasswordCredential) { 4866 ret.ref = bindings.NewPasswordCredentialByPasswordCredential1( 4867 js.Pointer(&data)) 4868 return 4869 } 4870 4871 type PasswordCredential struct { 4872 Credential 4873 } 4874 4875 func (this PasswordCredential) Once() PasswordCredential { 4876 this.ref.Once() 4877 return this 4878 } 4879 4880 func (this PasswordCredential) Ref() js.Ref { 4881 return this.Credential.Ref() 4882 } 4883 4884 func (this PasswordCredential) FromRef(ref js.Ref) PasswordCredential { 4885 this.Credential = this.Credential.FromRef(ref) 4886 return this 4887 } 4888 4889 func (this PasswordCredential) Free() { 4890 this.ref.Free() 4891 } 4892 4893 // Password returns the value of property "PasswordCredential.password". 4894 // 4895 // It returns ok=false if there is no such property. 4896 func (this PasswordCredential) Password() (ret js.String, ok bool) { 4897 ok = js.True == bindings.GetPasswordCredentialPassword( 4898 this.ref, js.Pointer(&ret), 4899 ) 4900 return 4901 } 4902 4903 // Name returns the value of property "PasswordCredential.name". 4904 // 4905 // It returns ok=false if there is no such property. 4906 func (this PasswordCredential) Name() (ret js.String, ok bool) { 4907 ok = js.True == bindings.GetPasswordCredentialName( 4908 this.ref, js.Pointer(&ret), 4909 ) 4910 return 4911 } 4912 4913 // IconURL returns the value of property "PasswordCredential.iconURL". 4914 // 4915 // It returns ok=false if there is no such property. 4916 func (this PasswordCredential) IconURL() (ret js.String, ok bool) { 4917 ok = js.True == bindings.GetPasswordCredentialIconURL( 4918 this.ref, js.Pointer(&ret), 4919 ) 4920 return 4921 } 4922 4923 type PaymentComplete uint32 4924 4925 const ( 4926 _ PaymentComplete = iota 4927 4928 PaymentComplete_FAIL 4929 PaymentComplete_SUCCESS 4930 PaymentComplete_UNKNOWN 4931 ) 4932 4933 func (PaymentComplete) FromRef(str js.Ref) PaymentComplete { 4934 return PaymentComplete(bindings.ConstOfPaymentComplete(str)) 4935 } 4936 4937 func (x PaymentComplete) String() (string, bool) { 4938 switch x { 4939 case PaymentComplete_FAIL: 4940 return "fail", true 4941 case PaymentComplete_SUCCESS: 4942 return "success", true 4943 case PaymentComplete_UNKNOWN: 4944 return "unknown", true 4945 default: 4946 return "", false 4947 } 4948 } 4949 4950 type PaymentCompleteDetails struct { 4951 // Data is "PaymentCompleteDetails.data" 4952 // 4953 // Optional, defaults to null. 4954 Data js.Object 4955 4956 FFI_USE bool 4957 } 4958 4959 // FromRef calls UpdateFrom and returns a PaymentCompleteDetails with all fields set. 4960 func (p PaymentCompleteDetails) FromRef(ref js.Ref) PaymentCompleteDetails { 4961 p.UpdateFrom(ref) 4962 return p 4963 } 4964 4965 // New creates a new PaymentCompleteDetails in the application heap. 4966 func (p PaymentCompleteDetails) New() js.Ref { 4967 return bindings.PaymentCompleteDetailsJSLoad( 4968 js.Pointer(&p), js.True, 0, 4969 ) 4970 } 4971 4972 // UpdateFrom copies value of all fields of the heap object to p. 4973 func (p *PaymentCompleteDetails) UpdateFrom(ref js.Ref) { 4974 bindings.PaymentCompleteDetailsJSStore( 4975 js.Pointer(p), ref, 4976 ) 4977 } 4978 4979 // Update writes all fields of the p to the heap object referenced by ref. 4980 func (p *PaymentCompleteDetails) Update(ref js.Ref) { 4981 bindings.PaymentCompleteDetailsJSLoad( 4982 js.Pointer(p), js.False, ref, 4983 ) 4984 } 4985 4986 // FreeMembers frees fields with heap reference, if recursive is true 4987 // free all heap references reachable from p. 4988 func (p *PaymentCompleteDetails) FreeMembers(recursive bool) { 4989 js.Free( 4990 p.Data.Ref(), 4991 ) 4992 p.Data = p.Data.FromRef(js.Undefined) 4993 } 4994 4995 type PaymentItem struct { 4996 // Label is "PaymentItem.label" 4997 // 4998 // Required 4999 Label js.String 5000 // Amount is "PaymentItem.amount" 5001 // 5002 // Required 5003 // 5004 // NOTE: Amount.FFI_USE MUST be set to true to get Amount used. 5005 Amount PaymentCurrencyAmount 5006 // Pending is "PaymentItem.pending" 5007 // 5008 // Optional, defaults to false. 5009 // 5010 // NOTE: FFI_USE_Pending MUST be set to true to make this field effective. 5011 Pending bool 5012 5013 FFI_USE_Pending bool // for Pending. 5014 5015 FFI_USE bool 5016 } 5017 5018 // FromRef calls UpdateFrom and returns a PaymentItem with all fields set. 5019 func (p PaymentItem) FromRef(ref js.Ref) PaymentItem { 5020 p.UpdateFrom(ref) 5021 return p 5022 } 5023 5024 // New creates a new PaymentItem in the application heap. 5025 func (p PaymentItem) New() js.Ref { 5026 return bindings.PaymentItemJSLoad( 5027 js.Pointer(&p), js.True, 0, 5028 ) 5029 } 5030 5031 // UpdateFrom copies value of all fields of the heap object to p. 5032 func (p *PaymentItem) UpdateFrom(ref js.Ref) { 5033 bindings.PaymentItemJSStore( 5034 js.Pointer(p), ref, 5035 ) 5036 } 5037 5038 // Update writes all fields of the p to the heap object referenced by ref. 5039 func (p *PaymentItem) Update(ref js.Ref) { 5040 bindings.PaymentItemJSLoad( 5041 js.Pointer(p), js.False, ref, 5042 ) 5043 } 5044 5045 // FreeMembers frees fields with heap reference, if recursive is true 5046 // free all heap references reachable from p. 5047 func (p *PaymentItem) FreeMembers(recursive bool) { 5048 js.Free( 5049 p.Label.Ref(), 5050 ) 5051 p.Label = p.Label.FromRef(js.Undefined) 5052 if recursive { 5053 p.Amount.FreeMembers(true) 5054 } 5055 }