github.com/primecitizens/pcz/std@v0.2.1/plat/js/web/apis56_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/ffi/js" 8 "github.com/primecitizens/pcz/std/plat/js/web/bindings" 9 ) 10 11 type VideoEncoderEncodeOptionsForAv1 struct { 12 // Quantizer is "VideoEncoderEncodeOptionsForAv1.quantizer" 13 // 14 // Optional 15 // 16 // NOTE: FFI_USE_Quantizer MUST be set to true to make this field effective. 17 Quantizer uint16 18 19 FFI_USE_Quantizer bool // for Quantizer. 20 21 FFI_USE bool 22 } 23 24 // FromRef calls UpdateFrom and returns a VideoEncoderEncodeOptionsForAv1 with all fields set. 25 func (p VideoEncoderEncodeOptionsForAv1) FromRef(ref js.Ref) VideoEncoderEncodeOptionsForAv1 { 26 p.UpdateFrom(ref) 27 return p 28 } 29 30 // New creates a new VideoEncoderEncodeOptionsForAv1 in the application heap. 31 func (p VideoEncoderEncodeOptionsForAv1) New() js.Ref { 32 return bindings.VideoEncoderEncodeOptionsForAv1JSLoad( 33 js.Pointer(&p), js.True, 0, 34 ) 35 } 36 37 // UpdateFrom copies value of all fields of the heap object to p. 38 func (p *VideoEncoderEncodeOptionsForAv1) UpdateFrom(ref js.Ref) { 39 bindings.VideoEncoderEncodeOptionsForAv1JSStore( 40 js.Pointer(p), ref, 41 ) 42 } 43 44 // Update writes all fields of the p to the heap object referenced by ref. 45 func (p *VideoEncoderEncodeOptionsForAv1) Update(ref js.Ref) { 46 bindings.VideoEncoderEncodeOptionsForAv1JSLoad( 47 js.Pointer(p), js.False, ref, 48 ) 49 } 50 51 // FreeMembers frees fields with heap reference, if recursive is true 52 // free all heap references reachable from p. 53 func (p *VideoEncoderEncodeOptionsForAv1) FreeMembers(recursive bool) { 54 } 55 56 type VideoEncoderEncodeOptionsForAvc struct { 57 // Quantizer is "VideoEncoderEncodeOptionsForAvc.quantizer" 58 // 59 // Optional 60 // 61 // NOTE: FFI_USE_Quantizer MUST be set to true to make this field effective. 62 Quantizer uint16 63 64 FFI_USE_Quantizer bool // for Quantizer. 65 66 FFI_USE bool 67 } 68 69 // FromRef calls UpdateFrom and returns a VideoEncoderEncodeOptionsForAvc with all fields set. 70 func (p VideoEncoderEncodeOptionsForAvc) FromRef(ref js.Ref) VideoEncoderEncodeOptionsForAvc { 71 p.UpdateFrom(ref) 72 return p 73 } 74 75 // New creates a new VideoEncoderEncodeOptionsForAvc in the application heap. 76 func (p VideoEncoderEncodeOptionsForAvc) New() js.Ref { 77 return bindings.VideoEncoderEncodeOptionsForAvcJSLoad( 78 js.Pointer(&p), js.True, 0, 79 ) 80 } 81 82 // UpdateFrom copies value of all fields of the heap object to p. 83 func (p *VideoEncoderEncodeOptionsForAvc) UpdateFrom(ref js.Ref) { 84 bindings.VideoEncoderEncodeOptionsForAvcJSStore( 85 js.Pointer(p), ref, 86 ) 87 } 88 89 // Update writes all fields of the p to the heap object referenced by ref. 90 func (p *VideoEncoderEncodeOptionsForAvc) Update(ref js.Ref) { 91 bindings.VideoEncoderEncodeOptionsForAvcJSLoad( 92 js.Pointer(p), js.False, ref, 93 ) 94 } 95 96 // FreeMembers frees fields with heap reference, if recursive is true 97 // free all heap references reachable from p. 98 func (p *VideoEncoderEncodeOptionsForAvc) FreeMembers(recursive bool) { 99 } 100 101 type VideoEncoderEncodeOptions struct { 102 // KeyFrame is "VideoEncoderEncodeOptions.keyFrame" 103 // 104 // Optional, defaults to false. 105 // 106 // NOTE: FFI_USE_KeyFrame MUST be set to true to make this field effective. 107 KeyFrame bool 108 // Hevc is "VideoEncoderEncodeOptions.hevc" 109 // 110 // Optional 111 // 112 // NOTE: Hevc.FFI_USE MUST be set to true to get Hevc used. 113 Hevc VideoEncoderEncodeOptionsForHevc 114 // Vp9 is "VideoEncoderEncodeOptions.vp9" 115 // 116 // Optional 117 // 118 // NOTE: Vp9.FFI_USE MUST be set to true to get Vp9 used. 119 Vp9 VideoEncoderEncodeOptionsForVp9 120 // Av1 is "VideoEncoderEncodeOptions.av1" 121 // 122 // Optional 123 // 124 // NOTE: Av1.FFI_USE MUST be set to true to get Av1 used. 125 Av1 VideoEncoderEncodeOptionsForAv1 126 // Avc is "VideoEncoderEncodeOptions.avc" 127 // 128 // Optional 129 // 130 // NOTE: Avc.FFI_USE MUST be set to true to get Avc used. 131 Avc VideoEncoderEncodeOptionsForAvc 132 133 FFI_USE_KeyFrame bool // for KeyFrame. 134 135 FFI_USE bool 136 } 137 138 // FromRef calls UpdateFrom and returns a VideoEncoderEncodeOptions with all fields set. 139 func (p VideoEncoderEncodeOptions) FromRef(ref js.Ref) VideoEncoderEncodeOptions { 140 p.UpdateFrom(ref) 141 return p 142 } 143 144 // New creates a new VideoEncoderEncodeOptions in the application heap. 145 func (p VideoEncoderEncodeOptions) New() js.Ref { 146 return bindings.VideoEncoderEncodeOptionsJSLoad( 147 js.Pointer(&p), js.True, 0, 148 ) 149 } 150 151 // UpdateFrom copies value of all fields of the heap object to p. 152 func (p *VideoEncoderEncodeOptions) UpdateFrom(ref js.Ref) { 153 bindings.VideoEncoderEncodeOptionsJSStore( 154 js.Pointer(p), ref, 155 ) 156 } 157 158 // Update writes all fields of the p to the heap object referenced by ref. 159 func (p *VideoEncoderEncodeOptions) Update(ref js.Ref) { 160 bindings.VideoEncoderEncodeOptionsJSLoad( 161 js.Pointer(p), js.False, ref, 162 ) 163 } 164 165 // FreeMembers frees fields with heap reference, if recursive is true 166 // free all heap references reachable from p. 167 func (p *VideoEncoderEncodeOptions) FreeMembers(recursive bool) { 168 if recursive { 169 p.Hevc.FreeMembers(true) 170 p.Vp9.FreeMembers(true) 171 p.Av1.FreeMembers(true) 172 p.Avc.FreeMembers(true) 173 } 174 } 175 176 type VideoEncoderSupport struct { 177 // Supported is "VideoEncoderSupport.supported" 178 // 179 // Optional 180 // 181 // NOTE: FFI_USE_Supported MUST be set to true to make this field effective. 182 Supported bool 183 // Config is "VideoEncoderSupport.config" 184 // 185 // Optional 186 // 187 // NOTE: Config.FFI_USE MUST be set to true to get Config used. 188 Config VideoEncoderConfig 189 190 FFI_USE_Supported bool // for Supported. 191 192 FFI_USE bool 193 } 194 195 // FromRef calls UpdateFrom and returns a VideoEncoderSupport with all fields set. 196 func (p VideoEncoderSupport) FromRef(ref js.Ref) VideoEncoderSupport { 197 p.UpdateFrom(ref) 198 return p 199 } 200 201 // New creates a new VideoEncoderSupport in the application heap. 202 func (p VideoEncoderSupport) New() js.Ref { 203 return bindings.VideoEncoderSupportJSLoad( 204 js.Pointer(&p), js.True, 0, 205 ) 206 } 207 208 // UpdateFrom copies value of all fields of the heap object to p. 209 func (p *VideoEncoderSupport) UpdateFrom(ref js.Ref) { 210 bindings.VideoEncoderSupportJSStore( 211 js.Pointer(p), ref, 212 ) 213 } 214 215 // Update writes all fields of the p to the heap object referenced by ref. 216 func (p *VideoEncoderSupport) Update(ref js.Ref) { 217 bindings.VideoEncoderSupportJSLoad( 218 js.Pointer(p), js.False, ref, 219 ) 220 } 221 222 // FreeMembers frees fields with heap reference, if recursive is true 223 // free all heap references reachable from p. 224 func (p *VideoEncoderSupport) FreeMembers(recursive bool) { 225 if recursive { 226 p.Config.FreeMembers(true) 227 } 228 } 229 230 func NewVideoEncoder(init VideoEncoderInit) (ret VideoEncoder) { 231 ret.ref = bindings.NewVideoEncoderByVideoEncoder( 232 js.Pointer(&init)) 233 return 234 } 235 236 type VideoEncoder struct { 237 EventTarget 238 } 239 240 func (this VideoEncoder) Once() VideoEncoder { 241 this.ref.Once() 242 return this 243 } 244 245 func (this VideoEncoder) Ref() js.Ref { 246 return this.EventTarget.Ref() 247 } 248 249 func (this VideoEncoder) FromRef(ref js.Ref) VideoEncoder { 250 this.EventTarget = this.EventTarget.FromRef(ref) 251 return this 252 } 253 254 func (this VideoEncoder) Free() { 255 this.ref.Free() 256 } 257 258 // State returns the value of property "VideoEncoder.state". 259 // 260 // It returns ok=false if there is no such property. 261 func (this VideoEncoder) State() (ret CodecState, ok bool) { 262 ok = js.True == bindings.GetVideoEncoderState( 263 this.ref, js.Pointer(&ret), 264 ) 265 return 266 } 267 268 // EncodeQueueSize returns the value of property "VideoEncoder.encodeQueueSize". 269 // 270 // It returns ok=false if there is no such property. 271 func (this VideoEncoder) EncodeQueueSize() (ret uint32, ok bool) { 272 ok = js.True == bindings.GetVideoEncoderEncodeQueueSize( 273 this.ref, js.Pointer(&ret), 274 ) 275 return 276 } 277 278 // HasFuncConfigure returns true if the method "VideoEncoder.configure" exists. 279 func (this VideoEncoder) HasFuncConfigure() bool { 280 return js.True == bindings.HasFuncVideoEncoderConfigure( 281 this.ref, 282 ) 283 } 284 285 // FuncConfigure returns the method "VideoEncoder.configure". 286 func (this VideoEncoder) FuncConfigure() (fn js.Func[func(config VideoEncoderConfig)]) { 287 bindings.FuncVideoEncoderConfigure( 288 this.ref, js.Pointer(&fn), 289 ) 290 return 291 } 292 293 // Configure calls the method "VideoEncoder.configure". 294 func (this VideoEncoder) Configure(config VideoEncoderConfig) (ret js.Void) { 295 bindings.CallVideoEncoderConfigure( 296 this.ref, js.Pointer(&ret), 297 js.Pointer(&config), 298 ) 299 300 return 301 } 302 303 // TryConfigure calls the method "VideoEncoder.configure" 304 // in a try/catch block and returns (_, err, ok = false) when it went through 305 // the catch clause. 306 func (this VideoEncoder) TryConfigure(config VideoEncoderConfig) (ret js.Void, exception js.Any, ok bool) { 307 ok = js.True == bindings.TryVideoEncoderConfigure( 308 this.ref, js.Pointer(&ret), js.Pointer(&exception), 309 js.Pointer(&config), 310 ) 311 312 return 313 } 314 315 // HasFuncEncode returns true if the method "VideoEncoder.encode" exists. 316 func (this VideoEncoder) HasFuncEncode() bool { 317 return js.True == bindings.HasFuncVideoEncoderEncode( 318 this.ref, 319 ) 320 } 321 322 // FuncEncode returns the method "VideoEncoder.encode". 323 func (this VideoEncoder) FuncEncode() (fn js.Func[func(frame VideoFrame, options VideoEncoderEncodeOptions)]) { 324 bindings.FuncVideoEncoderEncode( 325 this.ref, js.Pointer(&fn), 326 ) 327 return 328 } 329 330 // Encode calls the method "VideoEncoder.encode". 331 func (this VideoEncoder) Encode(frame VideoFrame, options VideoEncoderEncodeOptions) (ret js.Void) { 332 bindings.CallVideoEncoderEncode( 333 this.ref, js.Pointer(&ret), 334 frame.Ref(), 335 js.Pointer(&options), 336 ) 337 338 return 339 } 340 341 // TryEncode calls the method "VideoEncoder.encode" 342 // in a try/catch block and returns (_, err, ok = false) when it went through 343 // the catch clause. 344 func (this VideoEncoder) TryEncode(frame VideoFrame, options VideoEncoderEncodeOptions) (ret js.Void, exception js.Any, ok bool) { 345 ok = js.True == bindings.TryVideoEncoderEncode( 346 this.ref, js.Pointer(&ret), js.Pointer(&exception), 347 frame.Ref(), 348 js.Pointer(&options), 349 ) 350 351 return 352 } 353 354 // HasFuncEncode1 returns true if the method "VideoEncoder.encode" exists. 355 func (this VideoEncoder) HasFuncEncode1() bool { 356 return js.True == bindings.HasFuncVideoEncoderEncode1( 357 this.ref, 358 ) 359 } 360 361 // FuncEncode1 returns the method "VideoEncoder.encode". 362 func (this VideoEncoder) FuncEncode1() (fn js.Func[func(frame VideoFrame)]) { 363 bindings.FuncVideoEncoderEncode1( 364 this.ref, js.Pointer(&fn), 365 ) 366 return 367 } 368 369 // Encode1 calls the method "VideoEncoder.encode". 370 func (this VideoEncoder) Encode1(frame VideoFrame) (ret js.Void) { 371 bindings.CallVideoEncoderEncode1( 372 this.ref, js.Pointer(&ret), 373 frame.Ref(), 374 ) 375 376 return 377 } 378 379 // TryEncode1 calls the method "VideoEncoder.encode" 380 // in a try/catch block and returns (_, err, ok = false) when it went through 381 // the catch clause. 382 func (this VideoEncoder) TryEncode1(frame VideoFrame) (ret js.Void, exception js.Any, ok bool) { 383 ok = js.True == bindings.TryVideoEncoderEncode1( 384 this.ref, js.Pointer(&ret), js.Pointer(&exception), 385 frame.Ref(), 386 ) 387 388 return 389 } 390 391 // HasFuncFlush returns true if the method "VideoEncoder.flush" exists. 392 func (this VideoEncoder) HasFuncFlush() bool { 393 return js.True == bindings.HasFuncVideoEncoderFlush( 394 this.ref, 395 ) 396 } 397 398 // FuncFlush returns the method "VideoEncoder.flush". 399 func (this VideoEncoder) FuncFlush() (fn js.Func[func() js.Promise[js.Void]]) { 400 bindings.FuncVideoEncoderFlush( 401 this.ref, js.Pointer(&fn), 402 ) 403 return 404 } 405 406 // Flush calls the method "VideoEncoder.flush". 407 func (this VideoEncoder) Flush() (ret js.Promise[js.Void]) { 408 bindings.CallVideoEncoderFlush( 409 this.ref, js.Pointer(&ret), 410 ) 411 412 return 413 } 414 415 // TryFlush calls the method "VideoEncoder.flush" 416 // in a try/catch block and returns (_, err, ok = false) when it went through 417 // the catch clause. 418 func (this VideoEncoder) TryFlush() (ret js.Promise[js.Void], exception js.Any, ok bool) { 419 ok = js.True == bindings.TryVideoEncoderFlush( 420 this.ref, js.Pointer(&ret), js.Pointer(&exception), 421 ) 422 423 return 424 } 425 426 // HasFuncReset returns true if the method "VideoEncoder.reset" exists. 427 func (this VideoEncoder) HasFuncReset() bool { 428 return js.True == bindings.HasFuncVideoEncoderReset( 429 this.ref, 430 ) 431 } 432 433 // FuncReset returns the method "VideoEncoder.reset". 434 func (this VideoEncoder) FuncReset() (fn js.Func[func()]) { 435 bindings.FuncVideoEncoderReset( 436 this.ref, js.Pointer(&fn), 437 ) 438 return 439 } 440 441 // Reset calls the method "VideoEncoder.reset". 442 func (this VideoEncoder) Reset() (ret js.Void) { 443 bindings.CallVideoEncoderReset( 444 this.ref, js.Pointer(&ret), 445 ) 446 447 return 448 } 449 450 // TryReset calls the method "VideoEncoder.reset" 451 // in a try/catch block and returns (_, err, ok = false) when it went through 452 // the catch clause. 453 func (this VideoEncoder) TryReset() (ret js.Void, exception js.Any, ok bool) { 454 ok = js.True == bindings.TryVideoEncoderReset( 455 this.ref, js.Pointer(&ret), js.Pointer(&exception), 456 ) 457 458 return 459 } 460 461 // HasFuncClose returns true if the method "VideoEncoder.close" exists. 462 func (this VideoEncoder) HasFuncClose() bool { 463 return js.True == bindings.HasFuncVideoEncoderClose( 464 this.ref, 465 ) 466 } 467 468 // FuncClose returns the method "VideoEncoder.close". 469 func (this VideoEncoder) FuncClose() (fn js.Func[func()]) { 470 bindings.FuncVideoEncoderClose( 471 this.ref, js.Pointer(&fn), 472 ) 473 return 474 } 475 476 // Close calls the method "VideoEncoder.close". 477 func (this VideoEncoder) Close() (ret js.Void) { 478 bindings.CallVideoEncoderClose( 479 this.ref, js.Pointer(&ret), 480 ) 481 482 return 483 } 484 485 // TryClose calls the method "VideoEncoder.close" 486 // in a try/catch block and returns (_, err, ok = false) when it went through 487 // the catch clause. 488 func (this VideoEncoder) TryClose() (ret js.Void, exception js.Any, ok bool) { 489 ok = js.True == bindings.TryVideoEncoderClose( 490 this.ref, js.Pointer(&ret), js.Pointer(&exception), 491 ) 492 493 return 494 } 495 496 // HasFuncIsConfigSupported returns true if the static method "VideoEncoder.isConfigSupported" exists. 497 func (this VideoEncoder) HasFuncIsConfigSupported() bool { 498 return js.True == bindings.HasFuncVideoEncoderIsConfigSupported( 499 this.ref, 500 ) 501 } 502 503 // FuncIsConfigSupported returns the static method "VideoEncoder.isConfigSupported". 504 func (this VideoEncoder) FuncIsConfigSupported() (fn js.Func[func(config VideoEncoderConfig) js.Promise[VideoEncoderSupport]]) { 505 bindings.FuncVideoEncoderIsConfigSupported( 506 this.ref, js.Pointer(&fn), 507 ) 508 return 509 } 510 511 // IsConfigSupported calls the static method "VideoEncoder.isConfigSupported". 512 func (this VideoEncoder) IsConfigSupported(config VideoEncoderConfig) (ret js.Promise[VideoEncoderSupport]) { 513 bindings.CallVideoEncoderIsConfigSupported( 514 this.ref, js.Pointer(&ret), 515 js.Pointer(&config), 516 ) 517 518 return 519 } 520 521 // TryIsConfigSupported calls the static method "VideoEncoder.isConfigSupported" 522 // in a try/catch block and returns (_, err, ok = false) when it went through 523 // the catch clause. 524 func (this VideoEncoder) TryIsConfigSupported(config VideoEncoderConfig) (ret js.Promise[VideoEncoderSupport], exception js.Any, ok bool) { 525 ok = js.True == bindings.TryVideoEncoderIsConfigSupported( 526 this.ref, js.Pointer(&ret), js.Pointer(&exception), 527 js.Pointer(&config), 528 ) 529 530 return 531 } 532 533 type VideoFacingModeEnum uint32 534 535 const ( 536 _ VideoFacingModeEnum = iota 537 538 VideoFacingModeEnum_USER 539 VideoFacingModeEnum_ENVIRONMENT 540 VideoFacingModeEnum_LEFT 541 VideoFacingModeEnum_RIGHT 542 ) 543 544 func (VideoFacingModeEnum) FromRef(str js.Ref) VideoFacingModeEnum { 545 return VideoFacingModeEnum(bindings.ConstOfVideoFacingModeEnum(str)) 546 } 547 548 func (x VideoFacingModeEnum) String() (string, bool) { 549 switch x { 550 case VideoFacingModeEnum_USER: 551 return "user", true 552 case VideoFacingModeEnum_ENVIRONMENT: 553 return "environment", true 554 case VideoFacingModeEnum_LEFT: 555 return "left", true 556 case VideoFacingModeEnum_RIGHT: 557 return "right", true 558 default: 559 return "", false 560 } 561 } 562 563 type VideoResizeModeEnum uint32 564 565 const ( 566 _ VideoResizeModeEnum = iota 567 568 VideoResizeModeEnum_NONE 569 VideoResizeModeEnum_CROP_AND_SCALE 570 ) 571 572 func (VideoResizeModeEnum) FromRef(str js.Ref) VideoResizeModeEnum { 573 return VideoResizeModeEnum(bindings.ConstOfVideoResizeModeEnum(str)) 574 } 575 576 func (x VideoResizeModeEnum) String() (string, bool) { 577 switch x { 578 case VideoResizeModeEnum_NONE: 579 return "none", true 580 case VideoResizeModeEnum_CROP_AND_SCALE: 581 return "crop-and-scale", true 582 default: 583 return "", false 584 } 585 } 586 587 type VideoTrackGenerator struct { 588 ref js.Ref 589 } 590 591 func (this VideoTrackGenerator) Once() VideoTrackGenerator { 592 this.ref.Once() 593 return this 594 } 595 596 func (this VideoTrackGenerator) Ref() js.Ref { 597 return this.ref 598 } 599 600 func (this VideoTrackGenerator) FromRef(ref js.Ref) VideoTrackGenerator { 601 this.ref = ref 602 return this 603 } 604 605 func (this VideoTrackGenerator) Free() { 606 this.ref.Free() 607 } 608 609 // Writable returns the value of property "VideoTrackGenerator.writable". 610 // 611 // It returns ok=false if there is no such property. 612 func (this VideoTrackGenerator) Writable() (ret WritableStream, ok bool) { 613 ok = js.True == bindings.GetVideoTrackGeneratorWritable( 614 this.ref, js.Pointer(&ret), 615 ) 616 return 617 } 618 619 // Muted returns the value of property "VideoTrackGenerator.muted". 620 // 621 // It returns ok=false if there is no such property. 622 func (this VideoTrackGenerator) Muted() (ret bool, ok bool) { 623 ok = js.True == bindings.GetVideoTrackGeneratorMuted( 624 this.ref, js.Pointer(&ret), 625 ) 626 return 627 } 628 629 // SetMuted sets the value of property "VideoTrackGenerator.muted" to val. 630 // 631 // It returns false if the property cannot be set. 632 func (this VideoTrackGenerator) SetMuted(val bool) bool { 633 return js.True == bindings.SetVideoTrackGeneratorMuted( 634 this.ref, 635 js.Bool(bool(val)), 636 ) 637 } 638 639 // Track returns the value of property "VideoTrackGenerator.track". 640 // 641 // It returns ok=false if there is no such property. 642 func (this VideoTrackGenerator) Track() (ret MediaStreamTrack, ok bool) { 643 ok = js.True == bindings.GetVideoTrackGeneratorTrack( 644 this.ref, js.Pointer(&ret), 645 ) 646 return 647 } 648 649 type OneOf_CSSNumericValue_CSSKeywordValue struct { 650 ref js.Ref 651 } 652 653 func (x OneOf_CSSNumericValue_CSSKeywordValue) Ref() js.Ref { 654 return x.ref 655 } 656 657 func (x OneOf_CSSNumericValue_CSSKeywordValue) Free() { 658 x.ref.Free() 659 } 660 661 func (x OneOf_CSSNumericValue_CSSKeywordValue) FromRef(ref js.Ref) OneOf_CSSNumericValue_CSSKeywordValue { 662 return OneOf_CSSNumericValue_CSSKeywordValue{ 663 ref: ref, 664 } 665 } 666 667 func (x OneOf_CSSNumericValue_CSSKeywordValue) CSSNumericValue() CSSNumericValue { 668 return CSSNumericValue{}.FromRef(x.ref) 669 } 670 671 func (x OneOf_CSSNumericValue_CSSKeywordValue) CSSKeywordValue() CSSKeywordValue { 672 return CSSKeywordValue{}.FromRef(x.ref) 673 } 674 675 type OneOf_String_ArrayOneOf_CSSNumericValue_CSSKeywordValue struct { 676 ref js.Ref 677 } 678 679 func (x OneOf_String_ArrayOneOf_CSSNumericValue_CSSKeywordValue) Ref() js.Ref { 680 return x.ref 681 } 682 683 func (x OneOf_String_ArrayOneOf_CSSNumericValue_CSSKeywordValue) Free() { 684 x.ref.Free() 685 } 686 687 func (x OneOf_String_ArrayOneOf_CSSNumericValue_CSSKeywordValue) FromRef(ref js.Ref) OneOf_String_ArrayOneOf_CSSNumericValue_CSSKeywordValue { 688 return OneOf_String_ArrayOneOf_CSSNumericValue_CSSKeywordValue{ 689 ref: ref, 690 } 691 } 692 693 func (x OneOf_String_ArrayOneOf_CSSNumericValue_CSSKeywordValue) String() js.String { 694 return js.String{}.FromRef(x.ref) 695 } 696 697 func (x OneOf_String_ArrayOneOf_CSSNumericValue_CSSKeywordValue) ArrayOneOf_CSSNumericValue_CSSKeywordValue() js.Array[OneOf_CSSNumericValue_CSSKeywordValue] { 698 return js.Array[OneOf_CSSNumericValue_CSSKeywordValue]{}.FromRef(x.ref) 699 } 700 701 type ViewTimelineOptions struct { 702 // Subject is "ViewTimelineOptions.subject" 703 // 704 // Optional 705 Subject Element 706 // Axis is "ViewTimelineOptions.axis" 707 // 708 // Optional, defaults to "block". 709 Axis ScrollAxis 710 // Inset is "ViewTimelineOptions.inset" 711 // 712 // Optional, defaults to "auto". 713 Inset OneOf_String_ArrayOneOf_CSSNumericValue_CSSKeywordValue 714 715 FFI_USE bool 716 } 717 718 // FromRef calls UpdateFrom and returns a ViewTimelineOptions with all fields set. 719 func (p ViewTimelineOptions) FromRef(ref js.Ref) ViewTimelineOptions { 720 p.UpdateFrom(ref) 721 return p 722 } 723 724 // New creates a new ViewTimelineOptions in the application heap. 725 func (p ViewTimelineOptions) New() js.Ref { 726 return bindings.ViewTimelineOptionsJSLoad( 727 js.Pointer(&p), js.True, 0, 728 ) 729 } 730 731 // UpdateFrom copies value of all fields of the heap object to p. 732 func (p *ViewTimelineOptions) UpdateFrom(ref js.Ref) { 733 bindings.ViewTimelineOptionsJSStore( 734 js.Pointer(p), ref, 735 ) 736 } 737 738 // Update writes all fields of the p to the heap object referenced by ref. 739 func (p *ViewTimelineOptions) Update(ref js.Ref) { 740 bindings.ViewTimelineOptionsJSLoad( 741 js.Pointer(p), js.False, ref, 742 ) 743 } 744 745 // FreeMembers frees fields with heap reference, if recursive is true 746 // free all heap references reachable from p. 747 func (p *ViewTimelineOptions) FreeMembers(recursive bool) { 748 js.Free( 749 p.Subject.Ref(), 750 p.Inset.Ref(), 751 ) 752 p.Subject = p.Subject.FromRef(js.Undefined) 753 p.Inset = p.Inset.FromRef(js.Undefined) 754 } 755 756 func NewViewTimeline(options ViewTimelineOptions) (ret ViewTimeline) { 757 ret.ref = bindings.NewViewTimelineByViewTimeline( 758 js.Pointer(&options)) 759 return 760 } 761 762 func NewViewTimelineByViewTimeline1() (ret ViewTimeline) { 763 ret.ref = bindings.NewViewTimelineByViewTimeline1() 764 return 765 } 766 767 type ViewTimeline struct { 768 ScrollTimeline 769 } 770 771 func (this ViewTimeline) Once() ViewTimeline { 772 this.ref.Once() 773 return this 774 } 775 776 func (this ViewTimeline) Ref() js.Ref { 777 return this.ScrollTimeline.Ref() 778 } 779 780 func (this ViewTimeline) FromRef(ref js.Ref) ViewTimeline { 781 this.ScrollTimeline = this.ScrollTimeline.FromRef(ref) 782 return this 783 } 784 785 func (this ViewTimeline) Free() { 786 this.ref.Free() 787 } 788 789 // Subject returns the value of property "ViewTimeline.subject". 790 // 791 // It returns ok=false if there is no such property. 792 func (this ViewTimeline) Subject() (ret Element, ok bool) { 793 ok = js.True == bindings.GetViewTimelineSubject( 794 this.ref, js.Pointer(&ret), 795 ) 796 return 797 } 798 799 // StartOffset returns the value of property "ViewTimeline.startOffset". 800 // 801 // It returns ok=false if there is no such property. 802 func (this ViewTimeline) StartOffset() (ret CSSNumericValue, ok bool) { 803 ok = js.True == bindings.GetViewTimelineStartOffset( 804 this.ref, js.Pointer(&ret), 805 ) 806 return 807 } 808 809 // EndOffset returns the value of property "ViewTimeline.endOffset". 810 // 811 // It returns ok=false if there is no such property. 812 func (this ViewTimeline) EndOffset() (ret CSSNumericValue, ok bool) { 813 ok = js.True == bindings.GetViewTimelineEndOffset( 814 this.ref, js.Pointer(&ret), 815 ) 816 return 817 } 818 819 type VisibilityStateEntry struct { 820 PerformanceEntry 821 } 822 823 func (this VisibilityStateEntry) Once() VisibilityStateEntry { 824 this.ref.Once() 825 return this 826 } 827 828 func (this VisibilityStateEntry) Ref() js.Ref { 829 return this.PerformanceEntry.Ref() 830 } 831 832 func (this VisibilityStateEntry) FromRef(ref js.Ref) VisibilityStateEntry { 833 this.PerformanceEntry = this.PerformanceEntry.FromRef(ref) 834 return this 835 } 836 837 func (this VisibilityStateEntry) Free() { 838 this.ref.Free() 839 } 840 841 // Name returns the value of property "VisibilityStateEntry.name". 842 // 843 // It returns ok=false if there is no such property. 844 func (this VisibilityStateEntry) Name() (ret js.String, ok bool) { 845 ok = js.True == bindings.GetVisibilityStateEntryName( 846 this.ref, js.Pointer(&ret), 847 ) 848 return 849 } 850 851 // EntryType returns the value of property "VisibilityStateEntry.entryType". 852 // 853 // It returns ok=false if there is no such property. 854 func (this VisibilityStateEntry) EntryType() (ret js.String, ok bool) { 855 ok = js.True == bindings.GetVisibilityStateEntryEntryType( 856 this.ref, js.Pointer(&ret), 857 ) 858 return 859 } 860 861 // StartTime returns the value of property "VisibilityStateEntry.startTime". 862 // 863 // It returns ok=false if there is no such property. 864 func (this VisibilityStateEntry) StartTime() (ret DOMHighResTimeStamp, ok bool) { 865 ok = js.True == bindings.GetVisibilityStateEntryStartTime( 866 this.ref, js.Pointer(&ret), 867 ) 868 return 869 } 870 871 // Duration returns the value of property "VisibilityStateEntry.duration". 872 // 873 // It returns ok=false if there is no such property. 874 func (this VisibilityStateEntry) Duration() (ret uint32, ok bool) { 875 ok = js.True == bindings.GetVisibilityStateEntryDuration( 876 this.ref, js.Pointer(&ret), 877 ) 878 return 879 } 880 881 const ( 882 WEBGL_blend_equation_advanced_coherent_MULTIPLY GLenum = 0x9294 883 WEBGL_blend_equation_advanced_coherent_SCREEN GLenum = 0x9295 884 WEBGL_blend_equation_advanced_coherent_OVERLAY GLenum = 0x9296 885 WEBGL_blend_equation_advanced_coherent_DARKEN GLenum = 0x9297 886 WEBGL_blend_equation_advanced_coherent_LIGHTEN GLenum = 0x9298 887 WEBGL_blend_equation_advanced_coherent_COLORDODGE GLenum = 0x9299 888 WEBGL_blend_equation_advanced_coherent_COLORBURN GLenum = 0x929A 889 WEBGL_blend_equation_advanced_coherent_HARDLIGHT GLenum = 0x929B 890 WEBGL_blend_equation_advanced_coherent_SOFTLIGHT GLenum = 0x929C 891 WEBGL_blend_equation_advanced_coherent_DIFFERENCE GLenum = 0x929E 892 WEBGL_blend_equation_advanced_coherent_EXCLUSION GLenum = 0x92A0 893 WEBGL_blend_equation_advanced_coherent_HSL_HUE GLenum = 0x92AD 894 WEBGL_blend_equation_advanced_coherent_HSL_SATURATION GLenum = 0x92AE 895 WEBGL_blend_equation_advanced_coherent_HSL_COLOR GLenum = 0x92AF 896 WEBGL_blend_equation_advanced_coherent_HSL_LUMINOSITY GLenum = 0x92B0 897 ) 898 899 type WEBGL_blend_equation_advanced_coherent struct { 900 ref js.Ref 901 } 902 903 func (this WEBGL_blend_equation_advanced_coherent) Once() WEBGL_blend_equation_advanced_coherent { 904 this.ref.Once() 905 return this 906 } 907 908 func (this WEBGL_blend_equation_advanced_coherent) Ref() js.Ref { 909 return this.ref 910 } 911 912 func (this WEBGL_blend_equation_advanced_coherent) FromRef(ref js.Ref) WEBGL_blend_equation_advanced_coherent { 913 this.ref = ref 914 return this 915 } 916 917 func (this WEBGL_blend_equation_advanced_coherent) Free() { 918 this.ref.Free() 919 } 920 921 const ( 922 WEBGL_clip_cull_distance_MAX_CLIP_DISTANCES_WEBGL GLenum = 0x0D32 923 WEBGL_clip_cull_distance_MAX_CULL_DISTANCES_WEBGL GLenum = 0x82F9 924 WEBGL_clip_cull_distance_MAX_COMBINED_CLIP_AND_CULL_DISTANCES_WEBGL GLenum = 0x82FA 925 WEBGL_clip_cull_distance_CLIP_DISTANCE0_WEBGL GLenum = 0x3000 926 WEBGL_clip_cull_distance_CLIP_DISTANCE1_WEBGL GLenum = 0x3001 927 WEBGL_clip_cull_distance_CLIP_DISTANCE2_WEBGL GLenum = 0x3002 928 WEBGL_clip_cull_distance_CLIP_DISTANCE3_WEBGL GLenum = 0x3003 929 WEBGL_clip_cull_distance_CLIP_DISTANCE4_WEBGL GLenum = 0x3004 930 WEBGL_clip_cull_distance_CLIP_DISTANCE5_WEBGL GLenum = 0x3005 931 WEBGL_clip_cull_distance_CLIP_DISTANCE6_WEBGL GLenum = 0x3006 932 WEBGL_clip_cull_distance_CLIP_DISTANCE7_WEBGL GLenum = 0x3007 933 ) 934 935 type WEBGL_clip_cull_distance struct { 936 ref js.Ref 937 } 938 939 func (this WEBGL_clip_cull_distance) Once() WEBGL_clip_cull_distance { 940 this.ref.Once() 941 return this 942 } 943 944 func (this WEBGL_clip_cull_distance) Ref() js.Ref { 945 return this.ref 946 } 947 948 func (this WEBGL_clip_cull_distance) FromRef(ref js.Ref) WEBGL_clip_cull_distance { 949 this.ref = ref 950 return this 951 } 952 953 func (this WEBGL_clip_cull_distance) Free() { 954 this.ref.Free() 955 } 956 957 const ( 958 WEBGL_color_buffer_float_RGBA32F_EXT GLenum = 0x8814 959 WEBGL_color_buffer_float_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT GLenum = 0x8211 960 WEBGL_color_buffer_float_UNSIGNED_NORMALIZED_EXT GLenum = 0x8C17 961 ) 962 963 type WEBGL_color_buffer_float struct { 964 ref js.Ref 965 } 966 967 func (this WEBGL_color_buffer_float) Once() WEBGL_color_buffer_float { 968 this.ref.Once() 969 return this 970 } 971 972 func (this WEBGL_color_buffer_float) Ref() js.Ref { 973 return this.ref 974 } 975 976 func (this WEBGL_color_buffer_float) FromRef(ref js.Ref) WEBGL_color_buffer_float { 977 this.ref = ref 978 return this 979 } 980 981 func (this WEBGL_color_buffer_float) Free() { 982 this.ref.Free() 983 } 984 985 const ( 986 WEBGL_compressed_texture_astc_COMPRESSED_RGBA_ASTC_4x4_KHR GLenum = 0x93B0 987 WEBGL_compressed_texture_astc_COMPRESSED_RGBA_ASTC_5x4_KHR GLenum = 0x93B1 988 WEBGL_compressed_texture_astc_COMPRESSED_RGBA_ASTC_5x5_KHR GLenum = 0x93B2 989 WEBGL_compressed_texture_astc_COMPRESSED_RGBA_ASTC_6x5_KHR GLenum = 0x93B3 990 WEBGL_compressed_texture_astc_COMPRESSED_RGBA_ASTC_6x6_KHR GLenum = 0x93B4 991 WEBGL_compressed_texture_astc_COMPRESSED_RGBA_ASTC_8x5_KHR GLenum = 0x93B5 992 WEBGL_compressed_texture_astc_COMPRESSED_RGBA_ASTC_8x6_KHR GLenum = 0x93B6 993 WEBGL_compressed_texture_astc_COMPRESSED_RGBA_ASTC_8x8_KHR GLenum = 0x93B7 994 WEBGL_compressed_texture_astc_COMPRESSED_RGBA_ASTC_10x5_KHR GLenum = 0x93B8 995 WEBGL_compressed_texture_astc_COMPRESSED_RGBA_ASTC_10x6_KHR GLenum = 0x93B9 996 WEBGL_compressed_texture_astc_COMPRESSED_RGBA_ASTC_10x8_KHR GLenum = 0x93BA 997 WEBGL_compressed_texture_astc_COMPRESSED_RGBA_ASTC_10x10_KHR GLenum = 0x93BB 998 WEBGL_compressed_texture_astc_COMPRESSED_RGBA_ASTC_12x10_KHR GLenum = 0x93BC 999 WEBGL_compressed_texture_astc_COMPRESSED_RGBA_ASTC_12x12_KHR GLenum = 0x93BD 1000 WEBGL_compressed_texture_astc_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR GLenum = 0x93D0 1001 WEBGL_compressed_texture_astc_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR GLenum = 0x93D1 1002 WEBGL_compressed_texture_astc_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR GLenum = 0x93D2 1003 WEBGL_compressed_texture_astc_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR GLenum = 0x93D3 1004 WEBGL_compressed_texture_astc_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR GLenum = 0x93D4 1005 WEBGL_compressed_texture_astc_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR GLenum = 0x93D5 1006 WEBGL_compressed_texture_astc_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR GLenum = 0x93D6 1007 WEBGL_compressed_texture_astc_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR GLenum = 0x93D7 1008 WEBGL_compressed_texture_astc_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR GLenum = 0x93D8 1009 WEBGL_compressed_texture_astc_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR GLenum = 0x93D9 1010 WEBGL_compressed_texture_astc_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR GLenum = 0x93DA 1011 WEBGL_compressed_texture_astc_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR GLenum = 0x93DB 1012 WEBGL_compressed_texture_astc_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR GLenum = 0x93DC 1013 WEBGL_compressed_texture_astc_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR GLenum = 0x93DD 1014 ) 1015 1016 type WEBGL_compressed_texture_astc struct { 1017 ref js.Ref 1018 } 1019 1020 func (this WEBGL_compressed_texture_astc) Once() WEBGL_compressed_texture_astc { 1021 this.ref.Once() 1022 return this 1023 } 1024 1025 func (this WEBGL_compressed_texture_astc) Ref() js.Ref { 1026 return this.ref 1027 } 1028 1029 func (this WEBGL_compressed_texture_astc) FromRef(ref js.Ref) WEBGL_compressed_texture_astc { 1030 this.ref = ref 1031 return this 1032 } 1033 1034 func (this WEBGL_compressed_texture_astc) Free() { 1035 this.ref.Free() 1036 } 1037 1038 // HasFuncGetSupportedProfiles returns true if the method "WEBGL_compressed_texture_astc.getSupportedProfiles" exists. 1039 func (this WEBGL_compressed_texture_astc) HasFuncGetSupportedProfiles() bool { 1040 return js.True == bindings.HasFuncWEBGL_compressed_texture_astcGetSupportedProfiles( 1041 this.ref, 1042 ) 1043 } 1044 1045 // FuncGetSupportedProfiles returns the method "WEBGL_compressed_texture_astc.getSupportedProfiles". 1046 func (this WEBGL_compressed_texture_astc) FuncGetSupportedProfiles() (fn js.Func[func() js.Array[js.String]]) { 1047 bindings.FuncWEBGL_compressed_texture_astcGetSupportedProfiles( 1048 this.ref, js.Pointer(&fn), 1049 ) 1050 return 1051 } 1052 1053 // GetSupportedProfiles calls the method "WEBGL_compressed_texture_astc.getSupportedProfiles". 1054 func (this WEBGL_compressed_texture_astc) GetSupportedProfiles() (ret js.Array[js.String]) { 1055 bindings.CallWEBGL_compressed_texture_astcGetSupportedProfiles( 1056 this.ref, js.Pointer(&ret), 1057 ) 1058 1059 return 1060 } 1061 1062 // TryGetSupportedProfiles calls the method "WEBGL_compressed_texture_astc.getSupportedProfiles" 1063 // in a try/catch block and returns (_, err, ok = false) when it went through 1064 // the catch clause. 1065 func (this WEBGL_compressed_texture_astc) TryGetSupportedProfiles() (ret js.Array[js.String], exception js.Any, ok bool) { 1066 ok = js.True == bindings.TryWEBGL_compressed_texture_astcGetSupportedProfiles( 1067 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1068 ) 1069 1070 return 1071 } 1072 1073 const ( 1074 WEBGL_compressed_texture_etc_COMPRESSED_R11_EAC GLenum = 0x9270 1075 WEBGL_compressed_texture_etc_COMPRESSED_SIGNED_R11_EAC GLenum = 0x9271 1076 WEBGL_compressed_texture_etc_COMPRESSED_RG11_EAC GLenum = 0x9272 1077 WEBGL_compressed_texture_etc_COMPRESSED_SIGNED_RG11_EAC GLenum = 0x9273 1078 WEBGL_compressed_texture_etc_COMPRESSED_RGB8_ETC2 GLenum = 0x9274 1079 WEBGL_compressed_texture_etc_COMPRESSED_SRGB8_ETC2 GLenum = 0x9275 1080 WEBGL_compressed_texture_etc_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 GLenum = 0x9276 1081 WEBGL_compressed_texture_etc_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 GLenum = 0x9277 1082 WEBGL_compressed_texture_etc_COMPRESSED_RGBA8_ETC2_EAC GLenum = 0x9278 1083 WEBGL_compressed_texture_etc_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC GLenum = 0x9279 1084 ) 1085 1086 type WEBGL_compressed_texture_etc struct { 1087 ref js.Ref 1088 } 1089 1090 func (this WEBGL_compressed_texture_etc) Once() WEBGL_compressed_texture_etc { 1091 this.ref.Once() 1092 return this 1093 } 1094 1095 func (this WEBGL_compressed_texture_etc) Ref() js.Ref { 1096 return this.ref 1097 } 1098 1099 func (this WEBGL_compressed_texture_etc) FromRef(ref js.Ref) WEBGL_compressed_texture_etc { 1100 this.ref = ref 1101 return this 1102 } 1103 1104 func (this WEBGL_compressed_texture_etc) Free() { 1105 this.ref.Free() 1106 } 1107 1108 const ( 1109 WEBGL_compressed_texture_etc1_COMPRESSED_RGB_ETC1_WEBGL GLenum = 0x8D64 1110 ) 1111 1112 type WEBGL_compressed_texture_etc1 struct { 1113 ref js.Ref 1114 } 1115 1116 func (this WEBGL_compressed_texture_etc1) Once() WEBGL_compressed_texture_etc1 { 1117 this.ref.Once() 1118 return this 1119 } 1120 1121 func (this WEBGL_compressed_texture_etc1) Ref() js.Ref { 1122 return this.ref 1123 } 1124 1125 func (this WEBGL_compressed_texture_etc1) FromRef(ref js.Ref) WEBGL_compressed_texture_etc1 { 1126 this.ref = ref 1127 return this 1128 } 1129 1130 func (this WEBGL_compressed_texture_etc1) Free() { 1131 this.ref.Free() 1132 } 1133 1134 const ( 1135 WEBGL_compressed_texture_pvrtc_COMPRESSED_RGB_PVRTC_4BPPV1_IMG GLenum = 0x8C00 1136 WEBGL_compressed_texture_pvrtc_COMPRESSED_RGB_PVRTC_2BPPV1_IMG GLenum = 0x8C01 1137 WEBGL_compressed_texture_pvrtc_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG GLenum = 0x8C02 1138 WEBGL_compressed_texture_pvrtc_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG GLenum = 0x8C03 1139 ) 1140 1141 type WEBGL_compressed_texture_pvrtc struct { 1142 ref js.Ref 1143 } 1144 1145 func (this WEBGL_compressed_texture_pvrtc) Once() WEBGL_compressed_texture_pvrtc { 1146 this.ref.Once() 1147 return this 1148 } 1149 1150 func (this WEBGL_compressed_texture_pvrtc) Ref() js.Ref { 1151 return this.ref 1152 } 1153 1154 func (this WEBGL_compressed_texture_pvrtc) FromRef(ref js.Ref) WEBGL_compressed_texture_pvrtc { 1155 this.ref = ref 1156 return this 1157 } 1158 1159 func (this WEBGL_compressed_texture_pvrtc) Free() { 1160 this.ref.Free() 1161 } 1162 1163 const ( 1164 WEBGL_compressed_texture_s3tc_COMPRESSED_RGB_S3TC_DXT1_EXT GLenum = 0x83F0 1165 WEBGL_compressed_texture_s3tc_COMPRESSED_RGBA_S3TC_DXT1_EXT GLenum = 0x83F1 1166 WEBGL_compressed_texture_s3tc_COMPRESSED_RGBA_S3TC_DXT3_EXT GLenum = 0x83F2 1167 WEBGL_compressed_texture_s3tc_COMPRESSED_RGBA_S3TC_DXT5_EXT GLenum = 0x83F3 1168 ) 1169 1170 type WEBGL_compressed_texture_s3tc struct { 1171 ref js.Ref 1172 } 1173 1174 func (this WEBGL_compressed_texture_s3tc) Once() WEBGL_compressed_texture_s3tc { 1175 this.ref.Once() 1176 return this 1177 } 1178 1179 func (this WEBGL_compressed_texture_s3tc) Ref() js.Ref { 1180 return this.ref 1181 } 1182 1183 func (this WEBGL_compressed_texture_s3tc) FromRef(ref js.Ref) WEBGL_compressed_texture_s3tc { 1184 this.ref = ref 1185 return this 1186 } 1187 1188 func (this WEBGL_compressed_texture_s3tc) Free() { 1189 this.ref.Free() 1190 } 1191 1192 const ( 1193 WEBGL_compressed_texture_s3tc_srgb_COMPRESSED_SRGB_S3TC_DXT1_EXT GLenum = 0x8C4C 1194 WEBGL_compressed_texture_s3tc_srgb_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT GLenum = 0x8C4D 1195 WEBGL_compressed_texture_s3tc_srgb_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT GLenum = 0x8C4E 1196 WEBGL_compressed_texture_s3tc_srgb_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT GLenum = 0x8C4F 1197 ) 1198 1199 type WEBGL_compressed_texture_s3tc_srgb struct { 1200 ref js.Ref 1201 } 1202 1203 func (this WEBGL_compressed_texture_s3tc_srgb) Once() WEBGL_compressed_texture_s3tc_srgb { 1204 this.ref.Once() 1205 return this 1206 } 1207 1208 func (this WEBGL_compressed_texture_s3tc_srgb) Ref() js.Ref { 1209 return this.ref 1210 } 1211 1212 func (this WEBGL_compressed_texture_s3tc_srgb) FromRef(ref js.Ref) WEBGL_compressed_texture_s3tc_srgb { 1213 this.ref = ref 1214 return this 1215 } 1216 1217 func (this WEBGL_compressed_texture_s3tc_srgb) Free() { 1218 this.ref.Free() 1219 } 1220 1221 const ( 1222 WEBGL_debug_renderer_info_UNMASKED_VENDOR_WEBGL GLenum = 0x9245 1223 WEBGL_debug_renderer_info_UNMASKED_RENDERER_WEBGL GLenum = 0x9246 1224 ) 1225 1226 type WEBGL_debug_renderer_info struct { 1227 ref js.Ref 1228 } 1229 1230 func (this WEBGL_debug_renderer_info) Once() WEBGL_debug_renderer_info { 1231 this.ref.Once() 1232 return this 1233 } 1234 1235 func (this WEBGL_debug_renderer_info) Ref() js.Ref { 1236 return this.ref 1237 } 1238 1239 func (this WEBGL_debug_renderer_info) FromRef(ref js.Ref) WEBGL_debug_renderer_info { 1240 this.ref = ref 1241 return this 1242 } 1243 1244 func (this WEBGL_debug_renderer_info) Free() { 1245 this.ref.Free() 1246 } 1247 1248 type WEBGL_debug_shaders struct { 1249 ref js.Ref 1250 } 1251 1252 func (this WEBGL_debug_shaders) Once() WEBGL_debug_shaders { 1253 this.ref.Once() 1254 return this 1255 } 1256 1257 func (this WEBGL_debug_shaders) Ref() js.Ref { 1258 return this.ref 1259 } 1260 1261 func (this WEBGL_debug_shaders) FromRef(ref js.Ref) WEBGL_debug_shaders { 1262 this.ref = ref 1263 return this 1264 } 1265 1266 func (this WEBGL_debug_shaders) Free() { 1267 this.ref.Free() 1268 } 1269 1270 // HasFuncGetTranslatedShaderSource returns true if the method "WEBGL_debug_shaders.getTranslatedShaderSource" exists. 1271 func (this WEBGL_debug_shaders) HasFuncGetTranslatedShaderSource() bool { 1272 return js.True == bindings.HasFuncWEBGL_debug_shadersGetTranslatedShaderSource( 1273 this.ref, 1274 ) 1275 } 1276 1277 // FuncGetTranslatedShaderSource returns the method "WEBGL_debug_shaders.getTranslatedShaderSource". 1278 func (this WEBGL_debug_shaders) FuncGetTranslatedShaderSource() (fn js.Func[func(shader WebGLShader) js.String]) { 1279 bindings.FuncWEBGL_debug_shadersGetTranslatedShaderSource( 1280 this.ref, js.Pointer(&fn), 1281 ) 1282 return 1283 } 1284 1285 // GetTranslatedShaderSource calls the method "WEBGL_debug_shaders.getTranslatedShaderSource". 1286 func (this WEBGL_debug_shaders) GetTranslatedShaderSource(shader WebGLShader) (ret js.String) { 1287 bindings.CallWEBGL_debug_shadersGetTranslatedShaderSource( 1288 this.ref, js.Pointer(&ret), 1289 shader.Ref(), 1290 ) 1291 1292 return 1293 } 1294 1295 // TryGetTranslatedShaderSource calls the method "WEBGL_debug_shaders.getTranslatedShaderSource" 1296 // in a try/catch block and returns (_, err, ok = false) when it went through 1297 // the catch clause. 1298 func (this WEBGL_debug_shaders) TryGetTranslatedShaderSource(shader WebGLShader) (ret js.String, exception js.Any, ok bool) { 1299 ok = js.True == bindings.TryWEBGL_debug_shadersGetTranslatedShaderSource( 1300 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1301 shader.Ref(), 1302 ) 1303 1304 return 1305 } 1306 1307 const ( 1308 WEBGL_depth_texture_UNSIGNED_INT_24_8_WEBGL GLenum = 0x84FA 1309 ) 1310 1311 type WEBGL_depth_texture struct { 1312 ref js.Ref 1313 } 1314 1315 func (this WEBGL_depth_texture) Once() WEBGL_depth_texture { 1316 this.ref.Once() 1317 return this 1318 } 1319 1320 func (this WEBGL_depth_texture) Ref() js.Ref { 1321 return this.ref 1322 } 1323 1324 func (this WEBGL_depth_texture) FromRef(ref js.Ref) WEBGL_depth_texture { 1325 this.ref = ref 1326 return this 1327 } 1328 1329 func (this WEBGL_depth_texture) Free() { 1330 this.ref.Free() 1331 } 1332 1333 const ( 1334 WEBGL_draw_buffers_COLOR_ATTACHMENT0_WEBGL GLenum = 0x8CE0 1335 WEBGL_draw_buffers_COLOR_ATTACHMENT1_WEBGL GLenum = 0x8CE1 1336 WEBGL_draw_buffers_COLOR_ATTACHMENT2_WEBGL GLenum = 0x8CE2 1337 WEBGL_draw_buffers_COLOR_ATTACHMENT3_WEBGL GLenum = 0x8CE3 1338 WEBGL_draw_buffers_COLOR_ATTACHMENT4_WEBGL GLenum = 0x8CE4 1339 WEBGL_draw_buffers_COLOR_ATTACHMENT5_WEBGL GLenum = 0x8CE5 1340 WEBGL_draw_buffers_COLOR_ATTACHMENT6_WEBGL GLenum = 0x8CE6 1341 WEBGL_draw_buffers_COLOR_ATTACHMENT7_WEBGL GLenum = 0x8CE7 1342 WEBGL_draw_buffers_COLOR_ATTACHMENT8_WEBGL GLenum = 0x8CE8 1343 WEBGL_draw_buffers_COLOR_ATTACHMENT9_WEBGL GLenum = 0x8CE9 1344 WEBGL_draw_buffers_COLOR_ATTACHMENT10_WEBGL GLenum = 0x8CEA 1345 WEBGL_draw_buffers_COLOR_ATTACHMENT11_WEBGL GLenum = 0x8CEB 1346 WEBGL_draw_buffers_COLOR_ATTACHMENT12_WEBGL GLenum = 0x8CEC 1347 WEBGL_draw_buffers_COLOR_ATTACHMENT13_WEBGL GLenum = 0x8CED 1348 WEBGL_draw_buffers_COLOR_ATTACHMENT14_WEBGL GLenum = 0x8CEE 1349 WEBGL_draw_buffers_COLOR_ATTACHMENT15_WEBGL GLenum = 0x8CEF 1350 WEBGL_draw_buffers_DRAW_BUFFER0_WEBGL GLenum = 0x8825 1351 WEBGL_draw_buffers_DRAW_BUFFER1_WEBGL GLenum = 0x8826 1352 WEBGL_draw_buffers_DRAW_BUFFER2_WEBGL GLenum = 0x8827 1353 WEBGL_draw_buffers_DRAW_BUFFER3_WEBGL GLenum = 0x8828 1354 WEBGL_draw_buffers_DRAW_BUFFER4_WEBGL GLenum = 0x8829 1355 WEBGL_draw_buffers_DRAW_BUFFER5_WEBGL GLenum = 0x882A 1356 WEBGL_draw_buffers_DRAW_BUFFER6_WEBGL GLenum = 0x882B 1357 WEBGL_draw_buffers_DRAW_BUFFER7_WEBGL GLenum = 0x882C 1358 WEBGL_draw_buffers_DRAW_BUFFER8_WEBGL GLenum = 0x882D 1359 WEBGL_draw_buffers_DRAW_BUFFER9_WEBGL GLenum = 0x882E 1360 WEBGL_draw_buffers_DRAW_BUFFER10_WEBGL GLenum = 0x882F 1361 WEBGL_draw_buffers_DRAW_BUFFER11_WEBGL GLenum = 0x8830 1362 WEBGL_draw_buffers_DRAW_BUFFER12_WEBGL GLenum = 0x8831 1363 WEBGL_draw_buffers_DRAW_BUFFER13_WEBGL GLenum = 0x8832 1364 WEBGL_draw_buffers_DRAW_BUFFER14_WEBGL GLenum = 0x8833 1365 WEBGL_draw_buffers_DRAW_BUFFER15_WEBGL GLenum = 0x8834 1366 WEBGL_draw_buffers_MAX_COLOR_ATTACHMENTS_WEBGL GLenum = 0x8CDF 1367 WEBGL_draw_buffers_MAX_DRAW_BUFFERS_WEBGL GLenum = 0x8824 1368 ) 1369 1370 type WEBGL_draw_buffers struct { 1371 ref js.Ref 1372 } 1373 1374 func (this WEBGL_draw_buffers) Once() WEBGL_draw_buffers { 1375 this.ref.Once() 1376 return this 1377 } 1378 1379 func (this WEBGL_draw_buffers) Ref() js.Ref { 1380 return this.ref 1381 } 1382 1383 func (this WEBGL_draw_buffers) FromRef(ref js.Ref) WEBGL_draw_buffers { 1384 this.ref = ref 1385 return this 1386 } 1387 1388 func (this WEBGL_draw_buffers) Free() { 1389 this.ref.Free() 1390 } 1391 1392 // HasFuncDrawBuffersWEBGL returns true if the method "WEBGL_draw_buffers.drawBuffersWEBGL" exists. 1393 func (this WEBGL_draw_buffers) HasFuncDrawBuffersWEBGL() bool { 1394 return js.True == bindings.HasFuncWEBGL_draw_buffersDrawBuffersWEBGL( 1395 this.ref, 1396 ) 1397 } 1398 1399 // FuncDrawBuffersWEBGL returns the method "WEBGL_draw_buffers.drawBuffersWEBGL". 1400 func (this WEBGL_draw_buffers) FuncDrawBuffersWEBGL() (fn js.Func[func(buffers js.Array[GLenum])]) { 1401 bindings.FuncWEBGL_draw_buffersDrawBuffersWEBGL( 1402 this.ref, js.Pointer(&fn), 1403 ) 1404 return 1405 } 1406 1407 // DrawBuffersWEBGL calls the method "WEBGL_draw_buffers.drawBuffersWEBGL". 1408 func (this WEBGL_draw_buffers) DrawBuffersWEBGL(buffers js.Array[GLenum]) (ret js.Void) { 1409 bindings.CallWEBGL_draw_buffersDrawBuffersWEBGL( 1410 this.ref, js.Pointer(&ret), 1411 buffers.Ref(), 1412 ) 1413 1414 return 1415 } 1416 1417 // TryDrawBuffersWEBGL calls the method "WEBGL_draw_buffers.drawBuffersWEBGL" 1418 // in a try/catch block and returns (_, err, ok = false) when it went through 1419 // the catch clause. 1420 func (this WEBGL_draw_buffers) TryDrawBuffersWEBGL(buffers js.Array[GLenum]) (ret js.Void, exception js.Any, ok bool) { 1421 ok = js.True == bindings.TryWEBGL_draw_buffersDrawBuffersWEBGL( 1422 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1423 buffers.Ref(), 1424 ) 1425 1426 return 1427 } 1428 1429 type WEBGL_draw_instanced_base_vertex_base_instance struct { 1430 ref js.Ref 1431 } 1432 1433 func (this WEBGL_draw_instanced_base_vertex_base_instance) Once() WEBGL_draw_instanced_base_vertex_base_instance { 1434 this.ref.Once() 1435 return this 1436 } 1437 1438 func (this WEBGL_draw_instanced_base_vertex_base_instance) Ref() js.Ref { 1439 return this.ref 1440 } 1441 1442 func (this WEBGL_draw_instanced_base_vertex_base_instance) FromRef(ref js.Ref) WEBGL_draw_instanced_base_vertex_base_instance { 1443 this.ref = ref 1444 return this 1445 } 1446 1447 func (this WEBGL_draw_instanced_base_vertex_base_instance) Free() { 1448 this.ref.Free() 1449 } 1450 1451 // HasFuncDrawArraysInstancedBaseInstanceWEBGL returns true if the method "WEBGL_draw_instanced_base_vertex_base_instance.drawArraysInstancedBaseInstanceWEBGL" exists. 1452 func (this WEBGL_draw_instanced_base_vertex_base_instance) HasFuncDrawArraysInstancedBaseInstanceWEBGL() bool { 1453 return js.True == bindings.HasFuncWEBGL_draw_instanced_base_vertex_base_instanceDrawArraysInstancedBaseInstanceWEBGL( 1454 this.ref, 1455 ) 1456 } 1457 1458 // FuncDrawArraysInstancedBaseInstanceWEBGL returns the method "WEBGL_draw_instanced_base_vertex_base_instance.drawArraysInstancedBaseInstanceWEBGL". 1459 func (this WEBGL_draw_instanced_base_vertex_base_instance) FuncDrawArraysInstancedBaseInstanceWEBGL() (fn js.Func[func(mode GLenum, first GLint, count GLsizei, instanceCount GLsizei, baseInstance GLuint)]) { 1460 bindings.FuncWEBGL_draw_instanced_base_vertex_base_instanceDrawArraysInstancedBaseInstanceWEBGL( 1461 this.ref, js.Pointer(&fn), 1462 ) 1463 return 1464 } 1465 1466 // DrawArraysInstancedBaseInstanceWEBGL calls the method "WEBGL_draw_instanced_base_vertex_base_instance.drawArraysInstancedBaseInstanceWEBGL". 1467 func (this WEBGL_draw_instanced_base_vertex_base_instance) DrawArraysInstancedBaseInstanceWEBGL(mode GLenum, first GLint, count GLsizei, instanceCount GLsizei, baseInstance GLuint) (ret js.Void) { 1468 bindings.CallWEBGL_draw_instanced_base_vertex_base_instanceDrawArraysInstancedBaseInstanceWEBGL( 1469 this.ref, js.Pointer(&ret), 1470 uint32(mode), 1471 int32(first), 1472 int32(count), 1473 int32(instanceCount), 1474 uint32(baseInstance), 1475 ) 1476 1477 return 1478 } 1479 1480 // TryDrawArraysInstancedBaseInstanceWEBGL calls the method "WEBGL_draw_instanced_base_vertex_base_instance.drawArraysInstancedBaseInstanceWEBGL" 1481 // in a try/catch block and returns (_, err, ok = false) when it went through 1482 // the catch clause. 1483 func (this WEBGL_draw_instanced_base_vertex_base_instance) TryDrawArraysInstancedBaseInstanceWEBGL(mode GLenum, first GLint, count GLsizei, instanceCount GLsizei, baseInstance GLuint) (ret js.Void, exception js.Any, ok bool) { 1484 ok = js.True == bindings.TryWEBGL_draw_instanced_base_vertex_base_instanceDrawArraysInstancedBaseInstanceWEBGL( 1485 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1486 uint32(mode), 1487 int32(first), 1488 int32(count), 1489 int32(instanceCount), 1490 uint32(baseInstance), 1491 ) 1492 1493 return 1494 } 1495 1496 // HasFuncDrawElementsInstancedBaseVertexBaseInstanceWEBGL returns true if the method "WEBGL_draw_instanced_base_vertex_base_instance.drawElementsInstancedBaseVertexBaseInstanceWEBGL" exists. 1497 func (this WEBGL_draw_instanced_base_vertex_base_instance) HasFuncDrawElementsInstancedBaseVertexBaseInstanceWEBGL() bool { 1498 return js.True == bindings.HasFuncWEBGL_draw_instanced_base_vertex_base_instanceDrawElementsInstancedBaseVertexBaseInstanceWEBGL( 1499 this.ref, 1500 ) 1501 } 1502 1503 // FuncDrawElementsInstancedBaseVertexBaseInstanceWEBGL returns the method "WEBGL_draw_instanced_base_vertex_base_instance.drawElementsInstancedBaseVertexBaseInstanceWEBGL". 1504 func (this WEBGL_draw_instanced_base_vertex_base_instance) FuncDrawElementsInstancedBaseVertexBaseInstanceWEBGL() (fn js.Func[func(mode GLenum, count GLsizei, typ GLenum, offset GLintptr, instanceCount GLsizei, baseVertex GLint, baseInstance GLuint)]) { 1505 bindings.FuncWEBGL_draw_instanced_base_vertex_base_instanceDrawElementsInstancedBaseVertexBaseInstanceWEBGL( 1506 this.ref, js.Pointer(&fn), 1507 ) 1508 return 1509 } 1510 1511 // DrawElementsInstancedBaseVertexBaseInstanceWEBGL calls the method "WEBGL_draw_instanced_base_vertex_base_instance.drawElementsInstancedBaseVertexBaseInstanceWEBGL". 1512 func (this WEBGL_draw_instanced_base_vertex_base_instance) DrawElementsInstancedBaseVertexBaseInstanceWEBGL(mode GLenum, count GLsizei, typ GLenum, offset GLintptr, instanceCount GLsizei, baseVertex GLint, baseInstance GLuint) (ret js.Void) { 1513 bindings.CallWEBGL_draw_instanced_base_vertex_base_instanceDrawElementsInstancedBaseVertexBaseInstanceWEBGL( 1514 this.ref, js.Pointer(&ret), 1515 uint32(mode), 1516 int32(count), 1517 uint32(typ), 1518 float64(offset), 1519 int32(instanceCount), 1520 int32(baseVertex), 1521 uint32(baseInstance), 1522 ) 1523 1524 return 1525 } 1526 1527 // TryDrawElementsInstancedBaseVertexBaseInstanceWEBGL calls the method "WEBGL_draw_instanced_base_vertex_base_instance.drawElementsInstancedBaseVertexBaseInstanceWEBGL" 1528 // in a try/catch block and returns (_, err, ok = false) when it went through 1529 // the catch clause. 1530 func (this WEBGL_draw_instanced_base_vertex_base_instance) TryDrawElementsInstancedBaseVertexBaseInstanceWEBGL(mode GLenum, count GLsizei, typ GLenum, offset GLintptr, instanceCount GLsizei, baseVertex GLint, baseInstance GLuint) (ret js.Void, exception js.Any, ok bool) { 1531 ok = js.True == bindings.TryWEBGL_draw_instanced_base_vertex_base_instanceDrawElementsInstancedBaseVertexBaseInstanceWEBGL( 1532 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1533 uint32(mode), 1534 int32(count), 1535 uint32(typ), 1536 float64(offset), 1537 int32(instanceCount), 1538 int32(baseVertex), 1539 uint32(baseInstance), 1540 ) 1541 1542 return 1543 } 1544 1545 type WEBGL_lose_context struct { 1546 ref js.Ref 1547 } 1548 1549 func (this WEBGL_lose_context) Once() WEBGL_lose_context { 1550 this.ref.Once() 1551 return this 1552 } 1553 1554 func (this WEBGL_lose_context) Ref() js.Ref { 1555 return this.ref 1556 } 1557 1558 func (this WEBGL_lose_context) FromRef(ref js.Ref) WEBGL_lose_context { 1559 this.ref = ref 1560 return this 1561 } 1562 1563 func (this WEBGL_lose_context) Free() { 1564 this.ref.Free() 1565 } 1566 1567 // HasFuncLoseContext returns true if the method "WEBGL_lose_context.loseContext" exists. 1568 func (this WEBGL_lose_context) HasFuncLoseContext() bool { 1569 return js.True == bindings.HasFuncWEBGL_lose_contextLoseContext( 1570 this.ref, 1571 ) 1572 } 1573 1574 // FuncLoseContext returns the method "WEBGL_lose_context.loseContext". 1575 func (this WEBGL_lose_context) FuncLoseContext() (fn js.Func[func()]) { 1576 bindings.FuncWEBGL_lose_contextLoseContext( 1577 this.ref, js.Pointer(&fn), 1578 ) 1579 return 1580 } 1581 1582 // LoseContext calls the method "WEBGL_lose_context.loseContext". 1583 func (this WEBGL_lose_context) LoseContext() (ret js.Void) { 1584 bindings.CallWEBGL_lose_contextLoseContext( 1585 this.ref, js.Pointer(&ret), 1586 ) 1587 1588 return 1589 } 1590 1591 // TryLoseContext calls the method "WEBGL_lose_context.loseContext" 1592 // in a try/catch block and returns (_, err, ok = false) when it went through 1593 // the catch clause. 1594 func (this WEBGL_lose_context) TryLoseContext() (ret js.Void, exception js.Any, ok bool) { 1595 ok = js.True == bindings.TryWEBGL_lose_contextLoseContext( 1596 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1597 ) 1598 1599 return 1600 } 1601 1602 // HasFuncRestoreContext returns true if the method "WEBGL_lose_context.restoreContext" exists. 1603 func (this WEBGL_lose_context) HasFuncRestoreContext() bool { 1604 return js.True == bindings.HasFuncWEBGL_lose_contextRestoreContext( 1605 this.ref, 1606 ) 1607 } 1608 1609 // FuncRestoreContext returns the method "WEBGL_lose_context.restoreContext". 1610 func (this WEBGL_lose_context) FuncRestoreContext() (fn js.Func[func()]) { 1611 bindings.FuncWEBGL_lose_contextRestoreContext( 1612 this.ref, js.Pointer(&fn), 1613 ) 1614 return 1615 } 1616 1617 // RestoreContext calls the method "WEBGL_lose_context.restoreContext". 1618 func (this WEBGL_lose_context) RestoreContext() (ret js.Void) { 1619 bindings.CallWEBGL_lose_contextRestoreContext( 1620 this.ref, js.Pointer(&ret), 1621 ) 1622 1623 return 1624 } 1625 1626 // TryRestoreContext calls the method "WEBGL_lose_context.restoreContext" 1627 // in a try/catch block and returns (_, err, ok = false) when it went through 1628 // the catch clause. 1629 func (this WEBGL_lose_context) TryRestoreContext() (ret js.Void, exception js.Any, ok bool) { 1630 ok = js.True == bindings.TryWEBGL_lose_contextRestoreContext( 1631 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1632 ) 1633 1634 return 1635 } 1636 1637 type OneOf_TypedArrayInt32_ArrayGLsizei struct { 1638 ref js.Ref 1639 } 1640 1641 func (x OneOf_TypedArrayInt32_ArrayGLsizei) Ref() js.Ref { 1642 return x.ref 1643 } 1644 1645 func (x OneOf_TypedArrayInt32_ArrayGLsizei) Free() { 1646 x.ref.Free() 1647 } 1648 1649 func (x OneOf_TypedArrayInt32_ArrayGLsizei) FromRef(ref js.Ref) OneOf_TypedArrayInt32_ArrayGLsizei { 1650 return OneOf_TypedArrayInt32_ArrayGLsizei{ 1651 ref: ref, 1652 } 1653 } 1654 1655 func (x OneOf_TypedArrayInt32_ArrayGLsizei) TypedArrayInt32() js.TypedArray[int32] { 1656 return js.TypedArray[int32]{}.FromRef(x.ref) 1657 } 1658 1659 func (x OneOf_TypedArrayInt32_ArrayGLsizei) ArrayGLsizei() js.Array[GLsizei] { 1660 return js.Array[GLsizei]{}.FromRef(x.ref) 1661 } 1662 1663 type WEBGL_multi_draw struct { 1664 ref js.Ref 1665 } 1666 1667 func (this WEBGL_multi_draw) Once() WEBGL_multi_draw { 1668 this.ref.Once() 1669 return this 1670 } 1671 1672 func (this WEBGL_multi_draw) Ref() js.Ref { 1673 return this.ref 1674 } 1675 1676 func (this WEBGL_multi_draw) FromRef(ref js.Ref) WEBGL_multi_draw { 1677 this.ref = ref 1678 return this 1679 } 1680 1681 func (this WEBGL_multi_draw) Free() { 1682 this.ref.Free() 1683 } 1684 1685 // HasFuncMultiDrawArraysWEBGL returns true if the method "WEBGL_multi_draw.multiDrawArraysWEBGL" exists. 1686 func (this WEBGL_multi_draw) HasFuncMultiDrawArraysWEBGL() bool { 1687 return js.True == bindings.HasFuncWEBGL_multi_drawMultiDrawArraysWEBGL( 1688 this.ref, 1689 ) 1690 } 1691 1692 // FuncMultiDrawArraysWEBGL returns the method "WEBGL_multi_draw.multiDrawArraysWEBGL". 1693 func (this WEBGL_multi_draw) FuncMultiDrawArraysWEBGL() (fn js.Func[func(mode GLenum, firstsList OneOf_TypedArrayInt32_ArrayGLint, firstsOffset GLuint, countsList OneOf_TypedArrayInt32_ArrayGLsizei, countsOffset GLuint, drawcount GLsizei)]) { 1694 bindings.FuncWEBGL_multi_drawMultiDrawArraysWEBGL( 1695 this.ref, js.Pointer(&fn), 1696 ) 1697 return 1698 } 1699 1700 // MultiDrawArraysWEBGL calls the method "WEBGL_multi_draw.multiDrawArraysWEBGL". 1701 func (this WEBGL_multi_draw) MultiDrawArraysWEBGL(mode GLenum, firstsList OneOf_TypedArrayInt32_ArrayGLint, firstsOffset GLuint, countsList OneOf_TypedArrayInt32_ArrayGLsizei, countsOffset GLuint, drawcount GLsizei) (ret js.Void) { 1702 bindings.CallWEBGL_multi_drawMultiDrawArraysWEBGL( 1703 this.ref, js.Pointer(&ret), 1704 uint32(mode), 1705 firstsList.Ref(), 1706 uint32(firstsOffset), 1707 countsList.Ref(), 1708 uint32(countsOffset), 1709 int32(drawcount), 1710 ) 1711 1712 return 1713 } 1714 1715 // TryMultiDrawArraysWEBGL calls the method "WEBGL_multi_draw.multiDrawArraysWEBGL" 1716 // in a try/catch block and returns (_, err, ok = false) when it went through 1717 // the catch clause. 1718 func (this WEBGL_multi_draw) TryMultiDrawArraysWEBGL(mode GLenum, firstsList OneOf_TypedArrayInt32_ArrayGLint, firstsOffset GLuint, countsList OneOf_TypedArrayInt32_ArrayGLsizei, countsOffset GLuint, drawcount GLsizei) (ret js.Void, exception js.Any, ok bool) { 1719 ok = js.True == bindings.TryWEBGL_multi_drawMultiDrawArraysWEBGL( 1720 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1721 uint32(mode), 1722 firstsList.Ref(), 1723 uint32(firstsOffset), 1724 countsList.Ref(), 1725 uint32(countsOffset), 1726 int32(drawcount), 1727 ) 1728 1729 return 1730 } 1731 1732 // HasFuncMultiDrawElementsWEBGL returns true if the method "WEBGL_multi_draw.multiDrawElementsWEBGL" exists. 1733 func (this WEBGL_multi_draw) HasFuncMultiDrawElementsWEBGL() bool { 1734 return js.True == bindings.HasFuncWEBGL_multi_drawMultiDrawElementsWEBGL( 1735 this.ref, 1736 ) 1737 } 1738 1739 // FuncMultiDrawElementsWEBGL returns the method "WEBGL_multi_draw.multiDrawElementsWEBGL". 1740 func (this WEBGL_multi_draw) FuncMultiDrawElementsWEBGL() (fn js.Func[func(mode GLenum, countsList OneOf_TypedArrayInt32_ArrayGLsizei, countsOffset GLuint, typ GLenum, offsetsList OneOf_TypedArrayInt32_ArrayGLsizei, offsetsOffset GLuint, drawcount GLsizei)]) { 1741 bindings.FuncWEBGL_multi_drawMultiDrawElementsWEBGL( 1742 this.ref, js.Pointer(&fn), 1743 ) 1744 return 1745 } 1746 1747 // MultiDrawElementsWEBGL calls the method "WEBGL_multi_draw.multiDrawElementsWEBGL". 1748 func (this WEBGL_multi_draw) MultiDrawElementsWEBGL(mode GLenum, countsList OneOf_TypedArrayInt32_ArrayGLsizei, countsOffset GLuint, typ GLenum, offsetsList OneOf_TypedArrayInt32_ArrayGLsizei, offsetsOffset GLuint, drawcount GLsizei) (ret js.Void) { 1749 bindings.CallWEBGL_multi_drawMultiDrawElementsWEBGL( 1750 this.ref, js.Pointer(&ret), 1751 uint32(mode), 1752 countsList.Ref(), 1753 uint32(countsOffset), 1754 uint32(typ), 1755 offsetsList.Ref(), 1756 uint32(offsetsOffset), 1757 int32(drawcount), 1758 ) 1759 1760 return 1761 } 1762 1763 // TryMultiDrawElementsWEBGL calls the method "WEBGL_multi_draw.multiDrawElementsWEBGL" 1764 // in a try/catch block and returns (_, err, ok = false) when it went through 1765 // the catch clause. 1766 func (this WEBGL_multi_draw) TryMultiDrawElementsWEBGL(mode GLenum, countsList OneOf_TypedArrayInt32_ArrayGLsizei, countsOffset GLuint, typ GLenum, offsetsList OneOf_TypedArrayInt32_ArrayGLsizei, offsetsOffset GLuint, drawcount GLsizei) (ret js.Void, exception js.Any, ok bool) { 1767 ok = js.True == bindings.TryWEBGL_multi_drawMultiDrawElementsWEBGL( 1768 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1769 uint32(mode), 1770 countsList.Ref(), 1771 uint32(countsOffset), 1772 uint32(typ), 1773 offsetsList.Ref(), 1774 uint32(offsetsOffset), 1775 int32(drawcount), 1776 ) 1777 1778 return 1779 } 1780 1781 // HasFuncMultiDrawArraysInstancedWEBGL returns true if the method "WEBGL_multi_draw.multiDrawArraysInstancedWEBGL" exists. 1782 func (this WEBGL_multi_draw) HasFuncMultiDrawArraysInstancedWEBGL() bool { 1783 return js.True == bindings.HasFuncWEBGL_multi_drawMultiDrawArraysInstancedWEBGL( 1784 this.ref, 1785 ) 1786 } 1787 1788 // FuncMultiDrawArraysInstancedWEBGL returns the method "WEBGL_multi_draw.multiDrawArraysInstancedWEBGL". 1789 func (this WEBGL_multi_draw) FuncMultiDrawArraysInstancedWEBGL() (fn js.Func[func(mode GLenum, firstsList OneOf_TypedArrayInt32_ArrayGLint, firstsOffset GLuint, countsList OneOf_TypedArrayInt32_ArrayGLsizei, countsOffset GLuint, instanceCountsList OneOf_TypedArrayInt32_ArrayGLsizei, instanceCountsOffset GLuint, drawcount GLsizei)]) { 1790 bindings.FuncWEBGL_multi_drawMultiDrawArraysInstancedWEBGL( 1791 this.ref, js.Pointer(&fn), 1792 ) 1793 return 1794 } 1795 1796 // MultiDrawArraysInstancedWEBGL calls the method "WEBGL_multi_draw.multiDrawArraysInstancedWEBGL". 1797 func (this WEBGL_multi_draw) MultiDrawArraysInstancedWEBGL(mode GLenum, firstsList OneOf_TypedArrayInt32_ArrayGLint, firstsOffset GLuint, countsList OneOf_TypedArrayInt32_ArrayGLsizei, countsOffset GLuint, instanceCountsList OneOf_TypedArrayInt32_ArrayGLsizei, instanceCountsOffset GLuint, drawcount GLsizei) (ret js.Void) { 1798 bindings.CallWEBGL_multi_drawMultiDrawArraysInstancedWEBGL( 1799 this.ref, js.Pointer(&ret), 1800 uint32(mode), 1801 firstsList.Ref(), 1802 uint32(firstsOffset), 1803 countsList.Ref(), 1804 uint32(countsOffset), 1805 instanceCountsList.Ref(), 1806 uint32(instanceCountsOffset), 1807 int32(drawcount), 1808 ) 1809 1810 return 1811 } 1812 1813 // TryMultiDrawArraysInstancedWEBGL calls the method "WEBGL_multi_draw.multiDrawArraysInstancedWEBGL" 1814 // in a try/catch block and returns (_, err, ok = false) when it went through 1815 // the catch clause. 1816 func (this WEBGL_multi_draw) TryMultiDrawArraysInstancedWEBGL(mode GLenum, firstsList OneOf_TypedArrayInt32_ArrayGLint, firstsOffset GLuint, countsList OneOf_TypedArrayInt32_ArrayGLsizei, countsOffset GLuint, instanceCountsList OneOf_TypedArrayInt32_ArrayGLsizei, instanceCountsOffset GLuint, drawcount GLsizei) (ret js.Void, exception js.Any, ok bool) { 1817 ok = js.True == bindings.TryWEBGL_multi_drawMultiDrawArraysInstancedWEBGL( 1818 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1819 uint32(mode), 1820 firstsList.Ref(), 1821 uint32(firstsOffset), 1822 countsList.Ref(), 1823 uint32(countsOffset), 1824 instanceCountsList.Ref(), 1825 uint32(instanceCountsOffset), 1826 int32(drawcount), 1827 ) 1828 1829 return 1830 } 1831 1832 // HasFuncMultiDrawElementsInstancedWEBGL returns true if the method "WEBGL_multi_draw.multiDrawElementsInstancedWEBGL" exists. 1833 func (this WEBGL_multi_draw) HasFuncMultiDrawElementsInstancedWEBGL() bool { 1834 return js.True == bindings.HasFuncWEBGL_multi_drawMultiDrawElementsInstancedWEBGL( 1835 this.ref, 1836 ) 1837 } 1838 1839 // FuncMultiDrawElementsInstancedWEBGL returns the method "WEBGL_multi_draw.multiDrawElementsInstancedWEBGL". 1840 func (this WEBGL_multi_draw) FuncMultiDrawElementsInstancedWEBGL() (fn js.Func[func(mode GLenum, countsList OneOf_TypedArrayInt32_ArrayGLsizei, countsOffset GLuint, typ GLenum, offsetsList OneOf_TypedArrayInt32_ArrayGLsizei, offsetsOffset GLuint, instanceCountsList OneOf_TypedArrayInt32_ArrayGLsizei, instanceCountsOffset GLuint, drawcount GLsizei)]) { 1841 bindings.FuncWEBGL_multi_drawMultiDrawElementsInstancedWEBGL( 1842 this.ref, js.Pointer(&fn), 1843 ) 1844 return 1845 } 1846 1847 // MultiDrawElementsInstancedWEBGL calls the method "WEBGL_multi_draw.multiDrawElementsInstancedWEBGL". 1848 func (this WEBGL_multi_draw) MultiDrawElementsInstancedWEBGL(mode GLenum, countsList OneOf_TypedArrayInt32_ArrayGLsizei, countsOffset GLuint, typ GLenum, offsetsList OneOf_TypedArrayInt32_ArrayGLsizei, offsetsOffset GLuint, instanceCountsList OneOf_TypedArrayInt32_ArrayGLsizei, instanceCountsOffset GLuint, drawcount GLsizei) (ret js.Void) { 1849 bindings.CallWEBGL_multi_drawMultiDrawElementsInstancedWEBGL( 1850 this.ref, js.Pointer(&ret), 1851 uint32(mode), 1852 countsList.Ref(), 1853 uint32(countsOffset), 1854 uint32(typ), 1855 offsetsList.Ref(), 1856 uint32(offsetsOffset), 1857 instanceCountsList.Ref(), 1858 uint32(instanceCountsOffset), 1859 int32(drawcount), 1860 ) 1861 1862 return 1863 } 1864 1865 // TryMultiDrawElementsInstancedWEBGL calls the method "WEBGL_multi_draw.multiDrawElementsInstancedWEBGL" 1866 // in a try/catch block and returns (_, err, ok = false) when it went through 1867 // the catch clause. 1868 func (this WEBGL_multi_draw) TryMultiDrawElementsInstancedWEBGL(mode GLenum, countsList OneOf_TypedArrayInt32_ArrayGLsizei, countsOffset GLuint, typ GLenum, offsetsList OneOf_TypedArrayInt32_ArrayGLsizei, offsetsOffset GLuint, instanceCountsList OneOf_TypedArrayInt32_ArrayGLsizei, instanceCountsOffset GLuint, drawcount GLsizei) (ret js.Void, exception js.Any, ok bool) { 1869 ok = js.True == bindings.TryWEBGL_multi_drawMultiDrawElementsInstancedWEBGL( 1870 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1871 uint32(mode), 1872 countsList.Ref(), 1873 uint32(countsOffset), 1874 uint32(typ), 1875 offsetsList.Ref(), 1876 uint32(offsetsOffset), 1877 instanceCountsList.Ref(), 1878 uint32(instanceCountsOffset), 1879 int32(drawcount), 1880 ) 1881 1882 return 1883 } 1884 1885 type WEBGL_multi_draw_instanced_base_vertex_base_instance struct { 1886 ref js.Ref 1887 } 1888 1889 func (this WEBGL_multi_draw_instanced_base_vertex_base_instance) Once() WEBGL_multi_draw_instanced_base_vertex_base_instance { 1890 this.ref.Once() 1891 return this 1892 } 1893 1894 func (this WEBGL_multi_draw_instanced_base_vertex_base_instance) Ref() js.Ref { 1895 return this.ref 1896 } 1897 1898 func (this WEBGL_multi_draw_instanced_base_vertex_base_instance) FromRef(ref js.Ref) WEBGL_multi_draw_instanced_base_vertex_base_instance { 1899 this.ref = ref 1900 return this 1901 } 1902 1903 func (this WEBGL_multi_draw_instanced_base_vertex_base_instance) Free() { 1904 this.ref.Free() 1905 } 1906 1907 // HasFuncMultiDrawArraysInstancedBaseInstanceWEBGL returns true if the method "WEBGL_multi_draw_instanced_base_vertex_base_instance.multiDrawArraysInstancedBaseInstanceWEBGL" exists. 1908 func (this WEBGL_multi_draw_instanced_base_vertex_base_instance) HasFuncMultiDrawArraysInstancedBaseInstanceWEBGL() bool { 1909 return js.True == bindings.HasFuncWEBGL_multi_draw_instanced_base_vertex_base_instanceMultiDrawArraysInstancedBaseInstanceWEBGL( 1910 this.ref, 1911 ) 1912 } 1913 1914 // FuncMultiDrawArraysInstancedBaseInstanceWEBGL returns the method "WEBGL_multi_draw_instanced_base_vertex_base_instance.multiDrawArraysInstancedBaseInstanceWEBGL". 1915 func (this WEBGL_multi_draw_instanced_base_vertex_base_instance) FuncMultiDrawArraysInstancedBaseInstanceWEBGL() (fn js.Func[func(mode GLenum, firstsList OneOf_TypedArrayInt32_ArrayGLint, firstsOffset GLuint, countsList OneOf_TypedArrayInt32_ArrayGLsizei, countsOffset GLuint, instanceCountsList OneOf_TypedArrayInt32_ArrayGLsizei, instanceCountsOffset GLuint, baseInstancesList OneOf_TypedArrayUint32_ArrayGLuint, baseInstancesOffset GLuint, drawcount GLsizei)]) { 1916 bindings.FuncWEBGL_multi_draw_instanced_base_vertex_base_instanceMultiDrawArraysInstancedBaseInstanceWEBGL( 1917 this.ref, js.Pointer(&fn), 1918 ) 1919 return 1920 } 1921 1922 // MultiDrawArraysInstancedBaseInstanceWEBGL calls the method "WEBGL_multi_draw_instanced_base_vertex_base_instance.multiDrawArraysInstancedBaseInstanceWEBGL". 1923 func (this WEBGL_multi_draw_instanced_base_vertex_base_instance) MultiDrawArraysInstancedBaseInstanceWEBGL(mode GLenum, firstsList OneOf_TypedArrayInt32_ArrayGLint, firstsOffset GLuint, countsList OneOf_TypedArrayInt32_ArrayGLsizei, countsOffset GLuint, instanceCountsList OneOf_TypedArrayInt32_ArrayGLsizei, instanceCountsOffset GLuint, baseInstancesList OneOf_TypedArrayUint32_ArrayGLuint, baseInstancesOffset GLuint, drawcount GLsizei) (ret js.Void) { 1924 bindings.CallWEBGL_multi_draw_instanced_base_vertex_base_instanceMultiDrawArraysInstancedBaseInstanceWEBGL( 1925 this.ref, js.Pointer(&ret), 1926 uint32(mode), 1927 firstsList.Ref(), 1928 uint32(firstsOffset), 1929 countsList.Ref(), 1930 uint32(countsOffset), 1931 instanceCountsList.Ref(), 1932 uint32(instanceCountsOffset), 1933 baseInstancesList.Ref(), 1934 uint32(baseInstancesOffset), 1935 int32(drawcount), 1936 ) 1937 1938 return 1939 } 1940 1941 // TryMultiDrawArraysInstancedBaseInstanceWEBGL calls the method "WEBGL_multi_draw_instanced_base_vertex_base_instance.multiDrawArraysInstancedBaseInstanceWEBGL" 1942 // in a try/catch block and returns (_, err, ok = false) when it went through 1943 // the catch clause. 1944 func (this WEBGL_multi_draw_instanced_base_vertex_base_instance) TryMultiDrawArraysInstancedBaseInstanceWEBGL(mode GLenum, firstsList OneOf_TypedArrayInt32_ArrayGLint, firstsOffset GLuint, countsList OneOf_TypedArrayInt32_ArrayGLsizei, countsOffset GLuint, instanceCountsList OneOf_TypedArrayInt32_ArrayGLsizei, instanceCountsOffset GLuint, baseInstancesList OneOf_TypedArrayUint32_ArrayGLuint, baseInstancesOffset GLuint, drawcount GLsizei) (ret js.Void, exception js.Any, ok bool) { 1945 ok = js.True == bindings.TryWEBGL_multi_draw_instanced_base_vertex_base_instanceMultiDrawArraysInstancedBaseInstanceWEBGL( 1946 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1947 uint32(mode), 1948 firstsList.Ref(), 1949 uint32(firstsOffset), 1950 countsList.Ref(), 1951 uint32(countsOffset), 1952 instanceCountsList.Ref(), 1953 uint32(instanceCountsOffset), 1954 baseInstancesList.Ref(), 1955 uint32(baseInstancesOffset), 1956 int32(drawcount), 1957 ) 1958 1959 return 1960 } 1961 1962 // HasFuncMultiDrawElementsInstancedBaseVertexBaseInstanceWEBGL returns true if the method "WEBGL_multi_draw_instanced_base_vertex_base_instance.multiDrawElementsInstancedBaseVertexBaseInstanceWEBGL" exists. 1963 func (this WEBGL_multi_draw_instanced_base_vertex_base_instance) HasFuncMultiDrawElementsInstancedBaseVertexBaseInstanceWEBGL() bool { 1964 return js.True == bindings.HasFuncWEBGL_multi_draw_instanced_base_vertex_base_instanceMultiDrawElementsInstancedBaseVertexBaseInstanceWEBGL( 1965 this.ref, 1966 ) 1967 } 1968 1969 // FuncMultiDrawElementsInstancedBaseVertexBaseInstanceWEBGL returns the method "WEBGL_multi_draw_instanced_base_vertex_base_instance.multiDrawElementsInstancedBaseVertexBaseInstanceWEBGL". 1970 func (this WEBGL_multi_draw_instanced_base_vertex_base_instance) FuncMultiDrawElementsInstancedBaseVertexBaseInstanceWEBGL() (fn js.Func[func(mode GLenum, countsList OneOf_TypedArrayInt32_ArrayGLsizei, countsOffset GLuint, typ GLenum, offsetsList OneOf_TypedArrayInt32_ArrayGLsizei, offsetsOffset GLuint, instanceCountsList OneOf_TypedArrayInt32_ArrayGLsizei, instanceCountsOffset GLuint, baseVerticesList OneOf_TypedArrayInt32_ArrayGLint, baseVerticesOffset GLuint, baseInstancesList OneOf_TypedArrayUint32_ArrayGLuint, baseInstancesOffset GLuint, drawcount GLsizei)]) { 1971 bindings.FuncWEBGL_multi_draw_instanced_base_vertex_base_instanceMultiDrawElementsInstancedBaseVertexBaseInstanceWEBGL( 1972 this.ref, js.Pointer(&fn), 1973 ) 1974 return 1975 } 1976 1977 // MultiDrawElementsInstancedBaseVertexBaseInstanceWEBGL calls the method "WEBGL_multi_draw_instanced_base_vertex_base_instance.multiDrawElementsInstancedBaseVertexBaseInstanceWEBGL". 1978 func (this WEBGL_multi_draw_instanced_base_vertex_base_instance) MultiDrawElementsInstancedBaseVertexBaseInstanceWEBGL(mode GLenum, countsList OneOf_TypedArrayInt32_ArrayGLsizei, countsOffset GLuint, typ GLenum, offsetsList OneOf_TypedArrayInt32_ArrayGLsizei, offsetsOffset GLuint, instanceCountsList OneOf_TypedArrayInt32_ArrayGLsizei, instanceCountsOffset GLuint, baseVerticesList OneOf_TypedArrayInt32_ArrayGLint, baseVerticesOffset GLuint, baseInstancesList OneOf_TypedArrayUint32_ArrayGLuint, baseInstancesOffset GLuint, drawcount GLsizei) (ret js.Void) { 1979 bindings.CallWEBGL_multi_draw_instanced_base_vertex_base_instanceMultiDrawElementsInstancedBaseVertexBaseInstanceWEBGL( 1980 this.ref, js.Pointer(&ret), 1981 uint32(mode), 1982 countsList.Ref(), 1983 uint32(countsOffset), 1984 uint32(typ), 1985 offsetsList.Ref(), 1986 uint32(offsetsOffset), 1987 instanceCountsList.Ref(), 1988 uint32(instanceCountsOffset), 1989 baseVerticesList.Ref(), 1990 uint32(baseVerticesOffset), 1991 baseInstancesList.Ref(), 1992 uint32(baseInstancesOffset), 1993 int32(drawcount), 1994 ) 1995 1996 return 1997 } 1998 1999 // TryMultiDrawElementsInstancedBaseVertexBaseInstanceWEBGL calls the method "WEBGL_multi_draw_instanced_base_vertex_base_instance.multiDrawElementsInstancedBaseVertexBaseInstanceWEBGL" 2000 // in a try/catch block and returns (_, err, ok = false) when it went through 2001 // the catch clause. 2002 func (this WEBGL_multi_draw_instanced_base_vertex_base_instance) TryMultiDrawElementsInstancedBaseVertexBaseInstanceWEBGL(mode GLenum, countsList OneOf_TypedArrayInt32_ArrayGLsizei, countsOffset GLuint, typ GLenum, offsetsList OneOf_TypedArrayInt32_ArrayGLsizei, offsetsOffset GLuint, instanceCountsList OneOf_TypedArrayInt32_ArrayGLsizei, instanceCountsOffset GLuint, baseVerticesList OneOf_TypedArrayInt32_ArrayGLint, baseVerticesOffset GLuint, baseInstancesList OneOf_TypedArrayUint32_ArrayGLuint, baseInstancesOffset GLuint, drawcount GLsizei) (ret js.Void, exception js.Any, ok bool) { 2003 ok = js.True == bindings.TryWEBGL_multi_draw_instanced_base_vertex_base_instanceMultiDrawElementsInstancedBaseVertexBaseInstanceWEBGL( 2004 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2005 uint32(mode), 2006 countsList.Ref(), 2007 uint32(countsOffset), 2008 uint32(typ), 2009 offsetsList.Ref(), 2010 uint32(offsetsOffset), 2011 instanceCountsList.Ref(), 2012 uint32(instanceCountsOffset), 2013 baseVerticesList.Ref(), 2014 uint32(baseVerticesOffset), 2015 baseInstancesList.Ref(), 2016 uint32(baseInstancesOffset), 2017 int32(drawcount), 2018 ) 2019 2020 return 2021 } 2022 2023 const ( 2024 WEBGL_provoking_vertex_FIRST_VERTEX_CONVENTION_WEBGL GLenum = 0x8E4D 2025 WEBGL_provoking_vertex_LAST_VERTEX_CONVENTION_WEBGL GLenum = 0x8E4E 2026 WEBGL_provoking_vertex_PROVOKING_VERTEX_WEBGL GLenum = 0x8E4F 2027 ) 2028 2029 type WEBGL_provoking_vertex struct { 2030 ref js.Ref 2031 } 2032 2033 func (this WEBGL_provoking_vertex) Once() WEBGL_provoking_vertex { 2034 this.ref.Once() 2035 return this 2036 } 2037 2038 func (this WEBGL_provoking_vertex) Ref() js.Ref { 2039 return this.ref 2040 } 2041 2042 func (this WEBGL_provoking_vertex) FromRef(ref js.Ref) WEBGL_provoking_vertex { 2043 this.ref = ref 2044 return this 2045 } 2046 2047 func (this WEBGL_provoking_vertex) Free() { 2048 this.ref.Free() 2049 } 2050 2051 // HasFuncProvokingVertexWEBGL returns true if the method "WEBGL_provoking_vertex.provokingVertexWEBGL" exists. 2052 func (this WEBGL_provoking_vertex) HasFuncProvokingVertexWEBGL() bool { 2053 return js.True == bindings.HasFuncWEBGL_provoking_vertexProvokingVertexWEBGL( 2054 this.ref, 2055 ) 2056 } 2057 2058 // FuncProvokingVertexWEBGL returns the method "WEBGL_provoking_vertex.provokingVertexWEBGL". 2059 func (this WEBGL_provoking_vertex) FuncProvokingVertexWEBGL() (fn js.Func[func(provokeMode GLenum)]) { 2060 bindings.FuncWEBGL_provoking_vertexProvokingVertexWEBGL( 2061 this.ref, js.Pointer(&fn), 2062 ) 2063 return 2064 } 2065 2066 // ProvokingVertexWEBGL calls the method "WEBGL_provoking_vertex.provokingVertexWEBGL". 2067 func (this WEBGL_provoking_vertex) ProvokingVertexWEBGL(provokeMode GLenum) (ret js.Void) { 2068 bindings.CallWEBGL_provoking_vertexProvokingVertexWEBGL( 2069 this.ref, js.Pointer(&ret), 2070 uint32(provokeMode), 2071 ) 2072 2073 return 2074 } 2075 2076 // TryProvokingVertexWEBGL calls the method "WEBGL_provoking_vertex.provokingVertexWEBGL" 2077 // in a try/catch block and returns (_, err, ok = false) when it went through 2078 // the catch clause. 2079 func (this WEBGL_provoking_vertex) TryProvokingVertexWEBGL(provokeMode GLenum) (ret js.Void, exception js.Any, ok bool) { 2080 ok = js.True == bindings.TryWEBGL_provoking_vertexProvokingVertexWEBGL( 2081 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2082 uint32(provokeMode), 2083 ) 2084 2085 return 2086 } 2087 2088 type WebAssemblyInstantiatedSource struct { 2089 // Module is "WebAssemblyInstantiatedSource.module" 2090 // 2091 // Required 2092 Module Module 2093 // Instance is "WebAssemblyInstantiatedSource.instance" 2094 // 2095 // Required 2096 Instance Instance 2097 2098 FFI_USE bool 2099 } 2100 2101 // FromRef calls UpdateFrom and returns a WebAssemblyInstantiatedSource with all fields set. 2102 func (p WebAssemblyInstantiatedSource) FromRef(ref js.Ref) WebAssemblyInstantiatedSource { 2103 p.UpdateFrom(ref) 2104 return p 2105 } 2106 2107 // New creates a new WebAssemblyInstantiatedSource in the application heap. 2108 func (p WebAssemblyInstantiatedSource) New() js.Ref { 2109 return bindings.WebAssemblyInstantiatedSourceJSLoad( 2110 js.Pointer(&p), js.True, 0, 2111 ) 2112 } 2113 2114 // UpdateFrom copies value of all fields of the heap object to p. 2115 func (p *WebAssemblyInstantiatedSource) UpdateFrom(ref js.Ref) { 2116 bindings.WebAssemblyInstantiatedSourceJSStore( 2117 js.Pointer(p), ref, 2118 ) 2119 } 2120 2121 // Update writes all fields of the p to the heap object referenced by ref. 2122 func (p *WebAssemblyInstantiatedSource) Update(ref js.Ref) { 2123 bindings.WebAssemblyInstantiatedSourceJSLoad( 2124 js.Pointer(p), js.False, ref, 2125 ) 2126 } 2127 2128 // FreeMembers frees fields with heap reference, if recursive is true 2129 // free all heap references reachable from p. 2130 func (p *WebAssemblyInstantiatedSource) FreeMembers(recursive bool) { 2131 js.Free( 2132 p.Module.Ref(), 2133 p.Instance.Ref(), 2134 ) 2135 p.Module = p.Module.FromRef(js.Undefined) 2136 p.Instance = p.Instance.FromRef(js.Undefined) 2137 } 2138 2139 type WebAssembly struct{} 2140 2141 // HasFuncValidate returns ture if the function "WebAssembly.validate" exists. 2142 func (WebAssembly) HasFuncValidate() bool { 2143 return js.True == bindings.HasFuncWebAssemblyValidate() 2144 } 2145 2146 // FuncValidate returns the function "WebAssembly.validate". 2147 func (WebAssembly) FuncValidate() (fn js.Func[func(bytes BufferSource) bool]) { 2148 bindings.FuncWebAssemblyValidate( 2149 js.Pointer(&fn), 2150 ) 2151 return 2152 } 2153 2154 // Validate calls the function "WebAssembly.validate". 2155 func (WebAssembly) Validate(bytes BufferSource) (ret bool) { 2156 bindings.CallWebAssemblyValidate( 2157 js.Pointer(&ret), 2158 bytes.Ref(), 2159 ) 2160 return 2161 } 2162 2163 // TryValidate calls the function "WebAssembly.validate" 2164 // in a try/catch block and returns (_, err, ok = true) when it went through 2165 // the catch clause. 2166 func (WebAssembly) TryValidate(bytes BufferSource) (ret bool, exception js.Any, ok bool) { 2167 ok = js.True == bindings.TryWebAssemblyValidate( 2168 js.Pointer(&ret), js.Pointer(&exception), 2169 bytes.Ref(), 2170 ) 2171 return 2172 } 2173 2174 // HasFuncCompile returns ture if the function "WebAssembly.compile" exists. 2175 func (WebAssembly) HasFuncCompile() bool { 2176 return js.True == bindings.HasFuncWebAssemblyCompile() 2177 } 2178 2179 // FuncCompile returns the function "WebAssembly.compile". 2180 func (WebAssembly) FuncCompile() (fn js.Func[func(bytes BufferSource) js.Promise[Module]]) { 2181 bindings.FuncWebAssemblyCompile( 2182 js.Pointer(&fn), 2183 ) 2184 return 2185 } 2186 2187 // Compile calls the function "WebAssembly.compile". 2188 func (WebAssembly) Compile(bytes BufferSource) (ret js.Promise[Module]) { 2189 bindings.CallWebAssemblyCompile( 2190 js.Pointer(&ret), 2191 bytes.Ref(), 2192 ) 2193 return 2194 } 2195 2196 // TryCompile calls the function "WebAssembly.compile" 2197 // in a try/catch block and returns (_, err, ok = true) when it went through 2198 // the catch clause. 2199 func (WebAssembly) TryCompile(bytes BufferSource) (ret js.Promise[Module], exception js.Any, ok bool) { 2200 ok = js.True == bindings.TryWebAssemblyCompile( 2201 js.Pointer(&ret), js.Pointer(&exception), 2202 bytes.Ref(), 2203 ) 2204 return 2205 } 2206 2207 // HasFuncInstantiate returns ture if the function "WebAssembly.instantiate" exists. 2208 func (WebAssembly) HasFuncInstantiate() bool { 2209 return js.True == bindings.HasFuncWebAssemblyInstantiate() 2210 } 2211 2212 // FuncInstantiate returns the function "WebAssembly.instantiate". 2213 func (WebAssembly) FuncInstantiate() (fn js.Func[func(bytes BufferSource, importObject js.Object) js.Promise[WebAssemblyInstantiatedSource]]) { 2214 bindings.FuncWebAssemblyInstantiate( 2215 js.Pointer(&fn), 2216 ) 2217 return 2218 } 2219 2220 // Instantiate calls the function "WebAssembly.instantiate". 2221 func (WebAssembly) Instantiate(bytes BufferSource, importObject js.Object) (ret js.Promise[WebAssemblyInstantiatedSource]) { 2222 bindings.CallWebAssemblyInstantiate( 2223 js.Pointer(&ret), 2224 bytes.Ref(), 2225 importObject.Ref(), 2226 ) 2227 return 2228 } 2229 2230 // TryInstantiate calls the function "WebAssembly.instantiate" 2231 // in a try/catch block and returns (_, err, ok = true) when it went through 2232 // the catch clause. 2233 func (WebAssembly) TryInstantiate(bytes BufferSource, importObject js.Object) (ret js.Promise[WebAssemblyInstantiatedSource], exception js.Any, ok bool) { 2234 ok = js.True == bindings.TryWebAssemblyInstantiate( 2235 js.Pointer(&ret), js.Pointer(&exception), 2236 bytes.Ref(), 2237 importObject.Ref(), 2238 ) 2239 return 2240 } 2241 2242 // HasFuncInstantiate1 returns ture if the function "WebAssembly.instantiate" exists. 2243 func (WebAssembly) HasFuncInstantiate1() bool { 2244 return js.True == bindings.HasFuncWebAssemblyInstantiate1() 2245 } 2246 2247 // FuncInstantiate1 returns the function "WebAssembly.instantiate". 2248 func (WebAssembly) FuncInstantiate1() (fn js.Func[func(bytes BufferSource) js.Promise[WebAssemblyInstantiatedSource]]) { 2249 bindings.FuncWebAssemblyInstantiate1( 2250 js.Pointer(&fn), 2251 ) 2252 return 2253 } 2254 2255 // Instantiate1 calls the function "WebAssembly.instantiate". 2256 func (WebAssembly) Instantiate1(bytes BufferSource) (ret js.Promise[WebAssemblyInstantiatedSource]) { 2257 bindings.CallWebAssemblyInstantiate1( 2258 js.Pointer(&ret), 2259 bytes.Ref(), 2260 ) 2261 return 2262 } 2263 2264 // TryInstantiate1 calls the function "WebAssembly.instantiate" 2265 // in a try/catch block and returns (_, err, ok = true) when it went through 2266 // the catch clause. 2267 func (WebAssembly) TryInstantiate1(bytes BufferSource) (ret js.Promise[WebAssemblyInstantiatedSource], exception js.Any, ok bool) { 2268 ok = js.True == bindings.TryWebAssemblyInstantiate1( 2269 js.Pointer(&ret), js.Pointer(&exception), 2270 bytes.Ref(), 2271 ) 2272 return 2273 } 2274 2275 // HasFuncInstantiate2 returns ture if the function "WebAssembly.instantiate" exists. 2276 func (WebAssembly) HasFuncInstantiate2() bool { 2277 return js.True == bindings.HasFuncWebAssemblyInstantiate2() 2278 } 2279 2280 // FuncInstantiate2 returns the function "WebAssembly.instantiate". 2281 func (WebAssembly) FuncInstantiate2() (fn js.Func[func(moduleObject Module, importObject js.Object) js.Promise[Instance]]) { 2282 bindings.FuncWebAssemblyInstantiate2( 2283 js.Pointer(&fn), 2284 ) 2285 return 2286 } 2287 2288 // Instantiate2 calls the function "WebAssembly.instantiate". 2289 func (WebAssembly) Instantiate2(moduleObject Module, importObject js.Object) (ret js.Promise[Instance]) { 2290 bindings.CallWebAssemblyInstantiate2( 2291 js.Pointer(&ret), 2292 moduleObject.Ref(), 2293 importObject.Ref(), 2294 ) 2295 return 2296 } 2297 2298 // TryInstantiate2 calls the function "WebAssembly.instantiate" 2299 // in a try/catch block and returns (_, err, ok = true) when it went through 2300 // the catch clause. 2301 func (WebAssembly) TryInstantiate2(moduleObject Module, importObject js.Object) (ret js.Promise[Instance], exception js.Any, ok bool) { 2302 ok = js.True == bindings.TryWebAssemblyInstantiate2( 2303 js.Pointer(&ret), js.Pointer(&exception), 2304 moduleObject.Ref(), 2305 importObject.Ref(), 2306 ) 2307 return 2308 } 2309 2310 // HasFuncInstantiate3 returns ture if the function "WebAssembly.instantiate" exists. 2311 func (WebAssembly) HasFuncInstantiate3() bool { 2312 return js.True == bindings.HasFuncWebAssemblyInstantiate3() 2313 } 2314 2315 // FuncInstantiate3 returns the function "WebAssembly.instantiate". 2316 func (WebAssembly) FuncInstantiate3() (fn js.Func[func(moduleObject Module) js.Promise[Instance]]) { 2317 bindings.FuncWebAssemblyInstantiate3( 2318 js.Pointer(&fn), 2319 ) 2320 return 2321 } 2322 2323 // Instantiate3 calls the function "WebAssembly.instantiate". 2324 func (WebAssembly) Instantiate3(moduleObject Module) (ret js.Promise[Instance]) { 2325 bindings.CallWebAssemblyInstantiate3( 2326 js.Pointer(&ret), 2327 moduleObject.Ref(), 2328 ) 2329 return 2330 } 2331 2332 // TryInstantiate3 calls the function "WebAssembly.instantiate" 2333 // in a try/catch block and returns (_, err, ok = true) when it went through 2334 // the catch clause. 2335 func (WebAssembly) TryInstantiate3(moduleObject Module) (ret js.Promise[Instance], exception js.Any, ok bool) { 2336 ok = js.True == bindings.TryWebAssemblyInstantiate3( 2337 js.Pointer(&ret), js.Pointer(&exception), 2338 moduleObject.Ref(), 2339 ) 2340 return 2341 } 2342 2343 // HasFuncCompileStreaming returns ture if the function "WebAssembly.compileStreaming" exists. 2344 func (WebAssembly) HasFuncCompileStreaming() bool { 2345 return js.True == bindings.HasFuncWebAssemblyCompileStreaming() 2346 } 2347 2348 // FuncCompileStreaming returns the function "WebAssembly.compileStreaming". 2349 func (WebAssembly) FuncCompileStreaming() (fn js.Func[func(source js.Promise[Response]) js.Promise[Module]]) { 2350 bindings.FuncWebAssemblyCompileStreaming( 2351 js.Pointer(&fn), 2352 ) 2353 return 2354 } 2355 2356 // CompileStreaming calls the function "WebAssembly.compileStreaming". 2357 func (WebAssembly) CompileStreaming(source js.Promise[Response]) (ret js.Promise[Module]) { 2358 bindings.CallWebAssemblyCompileStreaming( 2359 js.Pointer(&ret), 2360 source.Ref(), 2361 ) 2362 return 2363 } 2364 2365 // TryCompileStreaming calls the function "WebAssembly.compileStreaming" 2366 // in a try/catch block and returns (_, err, ok = true) when it went through 2367 // the catch clause. 2368 func (WebAssembly) TryCompileStreaming(source js.Promise[Response]) (ret js.Promise[Module], exception js.Any, ok bool) { 2369 ok = js.True == bindings.TryWebAssemblyCompileStreaming( 2370 js.Pointer(&ret), js.Pointer(&exception), 2371 source.Ref(), 2372 ) 2373 return 2374 } 2375 2376 // HasFuncInstantiateStreaming returns ture if the function "WebAssembly.instantiateStreaming" exists. 2377 func (WebAssembly) HasFuncInstantiateStreaming() bool { 2378 return js.True == bindings.HasFuncWebAssemblyInstantiateStreaming() 2379 } 2380 2381 // FuncInstantiateStreaming returns the function "WebAssembly.instantiateStreaming". 2382 func (WebAssembly) FuncInstantiateStreaming() (fn js.Func[func(source js.Promise[Response], importObject js.Object) js.Promise[WebAssemblyInstantiatedSource]]) { 2383 bindings.FuncWebAssemblyInstantiateStreaming( 2384 js.Pointer(&fn), 2385 ) 2386 return 2387 } 2388 2389 // InstantiateStreaming calls the function "WebAssembly.instantiateStreaming". 2390 func (WebAssembly) InstantiateStreaming(source js.Promise[Response], importObject js.Object) (ret js.Promise[WebAssemblyInstantiatedSource]) { 2391 bindings.CallWebAssemblyInstantiateStreaming( 2392 js.Pointer(&ret), 2393 source.Ref(), 2394 importObject.Ref(), 2395 ) 2396 return 2397 } 2398 2399 // TryInstantiateStreaming calls the function "WebAssembly.instantiateStreaming" 2400 // in a try/catch block and returns (_, err, ok = true) when it went through 2401 // the catch clause. 2402 func (WebAssembly) TryInstantiateStreaming(source js.Promise[Response], importObject js.Object) (ret js.Promise[WebAssemblyInstantiatedSource], exception js.Any, ok bool) { 2403 ok = js.True == bindings.TryWebAssemblyInstantiateStreaming( 2404 js.Pointer(&ret), js.Pointer(&exception), 2405 source.Ref(), 2406 importObject.Ref(), 2407 ) 2408 return 2409 } 2410 2411 // HasFuncInstantiateStreaming1 returns ture if the function "WebAssembly.instantiateStreaming" exists. 2412 func (WebAssembly) HasFuncInstantiateStreaming1() bool { 2413 return js.True == bindings.HasFuncWebAssemblyInstantiateStreaming1() 2414 } 2415 2416 // FuncInstantiateStreaming1 returns the function "WebAssembly.instantiateStreaming". 2417 func (WebAssembly) FuncInstantiateStreaming1() (fn js.Func[func(source js.Promise[Response]) js.Promise[WebAssemblyInstantiatedSource]]) { 2418 bindings.FuncWebAssemblyInstantiateStreaming1( 2419 js.Pointer(&fn), 2420 ) 2421 return 2422 } 2423 2424 // InstantiateStreaming1 calls the function "WebAssembly.instantiateStreaming". 2425 func (WebAssembly) InstantiateStreaming1(source js.Promise[Response]) (ret js.Promise[WebAssemblyInstantiatedSource]) { 2426 bindings.CallWebAssemblyInstantiateStreaming1( 2427 js.Pointer(&ret), 2428 source.Ref(), 2429 ) 2430 return 2431 } 2432 2433 // TryInstantiateStreaming1 calls the function "WebAssembly.instantiateStreaming" 2434 // in a try/catch block and returns (_, err, ok = true) when it went through 2435 // the catch clause. 2436 func (WebAssembly) TryInstantiateStreaming1(source js.Promise[Response]) (ret js.Promise[WebAssemblyInstantiatedSource], exception js.Any, ok bool) { 2437 ok = js.True == bindings.TryWebAssemblyInstantiateStreaming1( 2438 js.Pointer(&ret), js.Pointer(&exception), 2439 source.Ref(), 2440 ) 2441 return 2442 } 2443 2444 type WebGLContextEventInit struct { 2445 // StatusMessage is "WebGLContextEventInit.statusMessage" 2446 // 2447 // Optional, defaults to "". 2448 StatusMessage js.String 2449 // Bubbles is "WebGLContextEventInit.bubbles" 2450 // 2451 // Optional, defaults to false. 2452 // 2453 // NOTE: FFI_USE_Bubbles MUST be set to true to make this field effective. 2454 Bubbles bool 2455 // Cancelable is "WebGLContextEventInit.cancelable" 2456 // 2457 // Optional, defaults to false. 2458 // 2459 // NOTE: FFI_USE_Cancelable MUST be set to true to make this field effective. 2460 Cancelable bool 2461 // Composed is "WebGLContextEventInit.composed" 2462 // 2463 // Optional, defaults to false. 2464 // 2465 // NOTE: FFI_USE_Composed MUST be set to true to make this field effective. 2466 Composed bool 2467 2468 FFI_USE_Bubbles bool // for Bubbles. 2469 FFI_USE_Cancelable bool // for Cancelable. 2470 FFI_USE_Composed bool // for Composed. 2471 2472 FFI_USE bool 2473 } 2474 2475 // FromRef calls UpdateFrom and returns a WebGLContextEventInit with all fields set. 2476 func (p WebGLContextEventInit) FromRef(ref js.Ref) WebGLContextEventInit { 2477 p.UpdateFrom(ref) 2478 return p 2479 } 2480 2481 // New creates a new WebGLContextEventInit in the application heap. 2482 func (p WebGLContextEventInit) New() js.Ref { 2483 return bindings.WebGLContextEventInitJSLoad( 2484 js.Pointer(&p), js.True, 0, 2485 ) 2486 } 2487 2488 // UpdateFrom copies value of all fields of the heap object to p. 2489 func (p *WebGLContextEventInit) UpdateFrom(ref js.Ref) { 2490 bindings.WebGLContextEventInitJSStore( 2491 js.Pointer(p), ref, 2492 ) 2493 } 2494 2495 // Update writes all fields of the p to the heap object referenced by ref. 2496 func (p *WebGLContextEventInit) Update(ref js.Ref) { 2497 bindings.WebGLContextEventInitJSLoad( 2498 js.Pointer(p), js.False, ref, 2499 ) 2500 } 2501 2502 // FreeMembers frees fields with heap reference, if recursive is true 2503 // free all heap references reachable from p. 2504 func (p *WebGLContextEventInit) FreeMembers(recursive bool) { 2505 js.Free( 2506 p.StatusMessage.Ref(), 2507 ) 2508 p.StatusMessage = p.StatusMessage.FromRef(js.Undefined) 2509 }