github.com/primecitizens/pcz/std@v0.2.1/plat/js/webext/input/ime/apis_js_wasm.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright 2023 The Prime Citizens 3 4 package ime 5 6 import ( 7 "github.com/primecitizens/pcz/std/core/abi" 8 "github.com/primecitizens/pcz/std/core/mark" 9 "github.com/primecitizens/pcz/std/ffi/js" 10 "github.com/primecitizens/pcz/std/plat/js/webext/input/ime/bindings" 11 ) 12 13 type AssistiveWindowButton uint32 14 15 const ( 16 _ AssistiveWindowButton = iota 17 18 AssistiveWindowButton_UNDO 19 AssistiveWindowButton_ADD_TO_DICTIONARY 20 ) 21 22 func (AssistiveWindowButton) FromRef(str js.Ref) AssistiveWindowButton { 23 return AssistiveWindowButton(bindings.ConstOfAssistiveWindowButton(str)) 24 } 25 26 func (x AssistiveWindowButton) String() (string, bool) { 27 switch x { 28 case AssistiveWindowButton_UNDO: 29 return "undo", true 30 case AssistiveWindowButton_ADD_TO_DICTIONARY: 31 return "addToDictionary", true 32 default: 33 return "", false 34 } 35 } 36 37 type AssistiveWindowType uint32 38 39 const ( 40 _ AssistiveWindowType = iota 41 42 AssistiveWindowType_UNDO 43 ) 44 45 func (AssistiveWindowType) FromRef(str js.Ref) AssistiveWindowType { 46 return AssistiveWindowType(bindings.ConstOfAssistiveWindowType(str)) 47 } 48 49 func (x AssistiveWindowType) String() (string, bool) { 50 switch x { 51 case AssistiveWindowType_UNDO: 52 return "undo", true 53 default: 54 return "", false 55 } 56 } 57 58 type AssistiveWindowProperties struct { 59 // AnnounceString is "AssistiveWindowProperties.announceString" 60 // 61 // Optional 62 AnnounceString js.String 63 // Type is "AssistiveWindowProperties.type" 64 // 65 // Required 66 Type AssistiveWindowType 67 // Visible is "AssistiveWindowProperties.visible" 68 // 69 // Required 70 Visible bool 71 72 FFI_USE bool 73 } 74 75 // FromRef calls UpdateFrom and returns a AssistiveWindowProperties with all fields set. 76 func (p AssistiveWindowProperties) FromRef(ref js.Ref) AssistiveWindowProperties { 77 p.UpdateFrom(ref) 78 return p 79 } 80 81 // New creates a new AssistiveWindowProperties in the application heap. 82 func (p AssistiveWindowProperties) New() js.Ref { 83 return bindings.AssistiveWindowPropertiesJSLoad( 84 js.Pointer(&p), js.True, 0, 85 ) 86 } 87 88 // UpdateFrom copies value of all fields of the heap object to p. 89 func (p *AssistiveWindowProperties) UpdateFrom(ref js.Ref) { 90 bindings.AssistiveWindowPropertiesJSStore( 91 js.Pointer(p), ref, 92 ) 93 } 94 95 // Update writes all fields of the p to the heap object referenced by ref. 96 func (p *AssistiveWindowProperties) Update(ref js.Ref) { 97 bindings.AssistiveWindowPropertiesJSLoad( 98 js.Pointer(p), js.False, ref, 99 ) 100 } 101 102 // FreeMembers frees fields with heap reference, if recursive is true 103 // free all heap references reachable from p. 104 func (p *AssistiveWindowProperties) FreeMembers(recursive bool) { 105 js.Free( 106 p.AnnounceString.Ref(), 107 ) 108 p.AnnounceString = p.AnnounceString.FromRef(js.Undefined) 109 } 110 111 type AutoCapitalizeType uint32 112 113 const ( 114 _ AutoCapitalizeType = iota 115 116 AutoCapitalizeType_CHARACTERS 117 AutoCapitalizeType_WORDS 118 AutoCapitalizeType_SENTENCES 119 ) 120 121 func (AutoCapitalizeType) FromRef(str js.Ref) AutoCapitalizeType { 122 return AutoCapitalizeType(bindings.ConstOfAutoCapitalizeType(str)) 123 } 124 125 func (x AutoCapitalizeType) String() (string, bool) { 126 switch x { 127 case AutoCapitalizeType_CHARACTERS: 128 return "characters", true 129 case AutoCapitalizeType_WORDS: 130 return "words", true 131 case AutoCapitalizeType_SENTENCES: 132 return "sentences", true 133 default: 134 return "", false 135 } 136 } 137 138 type ClearCompositionArgParameters struct { 139 // ContextID is "ClearCompositionArgParameters.contextID" 140 // 141 // Required 142 ContextID int64 143 144 FFI_USE bool 145 } 146 147 // FromRef calls UpdateFrom and returns a ClearCompositionArgParameters with all fields set. 148 func (p ClearCompositionArgParameters) FromRef(ref js.Ref) ClearCompositionArgParameters { 149 p.UpdateFrom(ref) 150 return p 151 } 152 153 // New creates a new ClearCompositionArgParameters in the application heap. 154 func (p ClearCompositionArgParameters) New() js.Ref { 155 return bindings.ClearCompositionArgParametersJSLoad( 156 js.Pointer(&p), js.True, 0, 157 ) 158 } 159 160 // UpdateFrom copies value of all fields of the heap object to p. 161 func (p *ClearCompositionArgParameters) UpdateFrom(ref js.Ref) { 162 bindings.ClearCompositionArgParametersJSStore( 163 js.Pointer(p), ref, 164 ) 165 } 166 167 // Update writes all fields of the p to the heap object referenced by ref. 168 func (p *ClearCompositionArgParameters) Update(ref js.Ref) { 169 bindings.ClearCompositionArgParametersJSLoad( 170 js.Pointer(p), js.False, ref, 171 ) 172 } 173 174 // FreeMembers frees fields with heap reference, if recursive is true 175 // free all heap references reachable from p. 176 func (p *ClearCompositionArgParameters) FreeMembers(recursive bool) { 177 } 178 179 type CommitTextArgParameters struct { 180 // ContextID is "CommitTextArgParameters.contextID" 181 // 182 // Required 183 ContextID int64 184 // Text is "CommitTextArgParameters.text" 185 // 186 // Required 187 Text js.String 188 189 FFI_USE bool 190 } 191 192 // FromRef calls UpdateFrom and returns a CommitTextArgParameters with all fields set. 193 func (p CommitTextArgParameters) FromRef(ref js.Ref) CommitTextArgParameters { 194 p.UpdateFrom(ref) 195 return p 196 } 197 198 // New creates a new CommitTextArgParameters in the application heap. 199 func (p CommitTextArgParameters) New() js.Ref { 200 return bindings.CommitTextArgParametersJSLoad( 201 js.Pointer(&p), js.True, 0, 202 ) 203 } 204 205 // UpdateFrom copies value of all fields of the heap object to p. 206 func (p *CommitTextArgParameters) UpdateFrom(ref js.Ref) { 207 bindings.CommitTextArgParametersJSStore( 208 js.Pointer(p), ref, 209 ) 210 } 211 212 // Update writes all fields of the p to the heap object referenced by ref. 213 func (p *CommitTextArgParameters) Update(ref js.Ref) { 214 bindings.CommitTextArgParametersJSLoad( 215 js.Pointer(p), js.False, ref, 216 ) 217 } 218 219 // FreeMembers frees fields with heap reference, if recursive is true 220 // free all heap references reachable from p. 221 func (p *CommitTextArgParameters) FreeMembers(recursive bool) { 222 js.Free( 223 p.Text.Ref(), 224 ) 225 p.Text = p.Text.FromRef(js.Undefined) 226 } 227 228 type DeleteSurroundingTextArgParameters struct { 229 // ContextID is "DeleteSurroundingTextArgParameters.contextID" 230 // 231 // Required 232 ContextID int64 233 // EngineID is "DeleteSurroundingTextArgParameters.engineID" 234 // 235 // Required 236 EngineID js.String 237 // Length is "DeleteSurroundingTextArgParameters.length" 238 // 239 // Required 240 Length int64 241 // Offset is "DeleteSurroundingTextArgParameters.offset" 242 // 243 // Required 244 Offset int64 245 246 FFI_USE bool 247 } 248 249 // FromRef calls UpdateFrom and returns a DeleteSurroundingTextArgParameters with all fields set. 250 func (p DeleteSurroundingTextArgParameters) FromRef(ref js.Ref) DeleteSurroundingTextArgParameters { 251 p.UpdateFrom(ref) 252 return p 253 } 254 255 // New creates a new DeleteSurroundingTextArgParameters in the application heap. 256 func (p DeleteSurroundingTextArgParameters) New() js.Ref { 257 return bindings.DeleteSurroundingTextArgParametersJSLoad( 258 js.Pointer(&p), js.True, 0, 259 ) 260 } 261 262 // UpdateFrom copies value of all fields of the heap object to p. 263 func (p *DeleteSurroundingTextArgParameters) UpdateFrom(ref js.Ref) { 264 bindings.DeleteSurroundingTextArgParametersJSStore( 265 js.Pointer(p), ref, 266 ) 267 } 268 269 // Update writes all fields of the p to the heap object referenced by ref. 270 func (p *DeleteSurroundingTextArgParameters) Update(ref js.Ref) { 271 bindings.DeleteSurroundingTextArgParametersJSLoad( 272 js.Pointer(p), js.False, ref, 273 ) 274 } 275 276 // FreeMembers frees fields with heap reference, if recursive is true 277 // free all heap references reachable from p. 278 func (p *DeleteSurroundingTextArgParameters) FreeMembers(recursive bool) { 279 js.Free( 280 p.EngineID.Ref(), 281 ) 282 p.EngineID = p.EngineID.FromRef(js.Undefined) 283 } 284 285 type InputContextType uint32 286 287 const ( 288 _ InputContextType = iota 289 290 InputContextType_TEXT 291 InputContextType_SEARCH 292 InputContextType_TEL 293 InputContextType_URL 294 InputContextType_EMAIL 295 InputContextType_NUMBER 296 InputContextType_PASSWORD 297 InputContextType_NULL 298 ) 299 300 func (InputContextType) FromRef(str js.Ref) InputContextType { 301 return InputContextType(bindings.ConstOfInputContextType(str)) 302 } 303 304 func (x InputContextType) String() (string, bool) { 305 switch x { 306 case InputContextType_TEXT: 307 return "text", true 308 case InputContextType_SEARCH: 309 return "search", true 310 case InputContextType_TEL: 311 return "tel", true 312 case InputContextType_URL: 313 return "url", true 314 case InputContextType_EMAIL: 315 return "email", true 316 case InputContextType_NUMBER: 317 return "number", true 318 case InputContextType_PASSWORD: 319 return "password", true 320 case InputContextType_NULL: 321 return "null", true 322 default: 323 return "", false 324 } 325 } 326 327 type InputContext struct { 328 // AutoCapitalize is "InputContext.autoCapitalize" 329 // 330 // Required 331 AutoCapitalize AutoCapitalizeType 332 // AutoComplete is "InputContext.autoComplete" 333 // 334 // Required 335 AutoComplete bool 336 // AutoCorrect is "InputContext.autoCorrect" 337 // 338 // Required 339 AutoCorrect bool 340 // ContextID is "InputContext.contextID" 341 // 342 // Required 343 ContextID int64 344 // ShouldDoLearning is "InputContext.shouldDoLearning" 345 // 346 // Required 347 ShouldDoLearning bool 348 // SpellCheck is "InputContext.spellCheck" 349 // 350 // Required 351 SpellCheck bool 352 // Type is "InputContext.type" 353 // 354 // Required 355 Type InputContextType 356 357 FFI_USE bool 358 } 359 360 // FromRef calls UpdateFrom and returns a InputContext with all fields set. 361 func (p InputContext) FromRef(ref js.Ref) InputContext { 362 p.UpdateFrom(ref) 363 return p 364 } 365 366 // New creates a new InputContext in the application heap. 367 func (p InputContext) New() js.Ref { 368 return bindings.InputContextJSLoad( 369 js.Pointer(&p), js.True, 0, 370 ) 371 } 372 373 // UpdateFrom copies value of all fields of the heap object to p. 374 func (p *InputContext) UpdateFrom(ref js.Ref) { 375 bindings.InputContextJSStore( 376 js.Pointer(p), ref, 377 ) 378 } 379 380 // Update writes all fields of the p to the heap object referenced by ref. 381 func (p *InputContext) Update(ref js.Ref) { 382 bindings.InputContextJSLoad( 383 js.Pointer(p), js.False, ref, 384 ) 385 } 386 387 // FreeMembers frees fields with heap reference, if recursive is true 388 // free all heap references reachable from p. 389 func (p *InputContext) FreeMembers(recursive bool) { 390 } 391 392 type KeyboardEventType uint32 393 394 const ( 395 _ KeyboardEventType = iota 396 397 KeyboardEventType_KEYUP 398 KeyboardEventType_KEYDOWN 399 ) 400 401 func (KeyboardEventType) FromRef(str js.Ref) KeyboardEventType { 402 return KeyboardEventType(bindings.ConstOfKeyboardEventType(str)) 403 } 404 405 func (x KeyboardEventType) String() (string, bool) { 406 switch x { 407 case KeyboardEventType_KEYUP: 408 return "keyup", true 409 case KeyboardEventType_KEYDOWN: 410 return "keydown", true 411 default: 412 return "", false 413 } 414 } 415 416 type KeyboardEvent struct { 417 // AltKey is "KeyboardEvent.altKey" 418 // 419 // Optional 420 // 421 // NOTE: FFI_USE_AltKey MUST be set to true to make this field effective. 422 AltKey bool 423 // AltgrKey is "KeyboardEvent.altgrKey" 424 // 425 // Optional 426 // 427 // NOTE: FFI_USE_AltgrKey MUST be set to true to make this field effective. 428 AltgrKey bool 429 // CapsLock is "KeyboardEvent.capsLock" 430 // 431 // Optional 432 // 433 // NOTE: FFI_USE_CapsLock MUST be set to true to make this field effective. 434 CapsLock bool 435 // Code is "KeyboardEvent.code" 436 // 437 // Required 438 Code js.String 439 // CtrlKey is "KeyboardEvent.ctrlKey" 440 // 441 // Optional 442 // 443 // NOTE: FFI_USE_CtrlKey MUST be set to true to make this field effective. 444 CtrlKey bool 445 // ExtensionId is "KeyboardEvent.extensionId" 446 // 447 // Optional 448 ExtensionId js.String 449 // Key is "KeyboardEvent.key" 450 // 451 // Required 452 Key js.String 453 // KeyCode is "KeyboardEvent.keyCode" 454 // 455 // Optional 456 // 457 // NOTE: FFI_USE_KeyCode MUST be set to true to make this field effective. 458 KeyCode int64 459 // RequestId is "KeyboardEvent.requestId" 460 // 461 // Optional 462 RequestId js.String 463 // ShiftKey is "KeyboardEvent.shiftKey" 464 // 465 // Optional 466 // 467 // NOTE: FFI_USE_ShiftKey MUST be set to true to make this field effective. 468 ShiftKey bool 469 // Type is "KeyboardEvent.type" 470 // 471 // Required 472 Type KeyboardEventType 473 474 FFI_USE_AltKey bool // for AltKey. 475 FFI_USE_AltgrKey bool // for AltgrKey. 476 FFI_USE_CapsLock bool // for CapsLock. 477 FFI_USE_CtrlKey bool // for CtrlKey. 478 FFI_USE_KeyCode bool // for KeyCode. 479 FFI_USE_ShiftKey bool // for ShiftKey. 480 481 FFI_USE bool 482 } 483 484 // FromRef calls UpdateFrom and returns a KeyboardEvent with all fields set. 485 func (p KeyboardEvent) FromRef(ref js.Ref) KeyboardEvent { 486 p.UpdateFrom(ref) 487 return p 488 } 489 490 // New creates a new KeyboardEvent in the application heap. 491 func (p KeyboardEvent) New() js.Ref { 492 return bindings.KeyboardEventJSLoad( 493 js.Pointer(&p), js.True, 0, 494 ) 495 } 496 497 // UpdateFrom copies value of all fields of the heap object to p. 498 func (p *KeyboardEvent) UpdateFrom(ref js.Ref) { 499 bindings.KeyboardEventJSStore( 500 js.Pointer(p), ref, 501 ) 502 } 503 504 // Update writes all fields of the p to the heap object referenced by ref. 505 func (p *KeyboardEvent) Update(ref js.Ref) { 506 bindings.KeyboardEventJSLoad( 507 js.Pointer(p), js.False, ref, 508 ) 509 } 510 511 // FreeMembers frees fields with heap reference, if recursive is true 512 // free all heap references reachable from p. 513 func (p *KeyboardEvent) FreeMembers(recursive bool) { 514 js.Free( 515 p.Code.Ref(), 516 p.ExtensionId.Ref(), 517 p.Key.Ref(), 518 p.RequestId.Ref(), 519 ) 520 p.Code = p.Code.FromRef(js.Undefined) 521 p.ExtensionId = p.ExtensionId.FromRef(js.Undefined) 522 p.Key = p.Key.FromRef(js.Undefined) 523 p.RequestId = p.RequestId.FromRef(js.Undefined) 524 } 525 526 type MenuItemStyle uint32 527 528 const ( 529 _ MenuItemStyle = iota 530 531 MenuItemStyle_CHECK 532 MenuItemStyle_RADIO 533 MenuItemStyle_SEPARATOR 534 ) 535 536 func (MenuItemStyle) FromRef(str js.Ref) MenuItemStyle { 537 return MenuItemStyle(bindings.ConstOfMenuItemStyle(str)) 538 } 539 540 func (x MenuItemStyle) String() (string, bool) { 541 switch x { 542 case MenuItemStyle_CHECK: 543 return "check", true 544 case MenuItemStyle_RADIO: 545 return "radio", true 546 case MenuItemStyle_SEPARATOR: 547 return "separator", true 548 default: 549 return "", false 550 } 551 } 552 553 type MenuItem struct { 554 // Checked is "MenuItem.checked" 555 // 556 // Optional 557 // 558 // NOTE: FFI_USE_Checked MUST be set to true to make this field effective. 559 Checked bool 560 // Enabled is "MenuItem.enabled" 561 // 562 // Optional 563 // 564 // NOTE: FFI_USE_Enabled MUST be set to true to make this field effective. 565 Enabled bool 566 // Id is "MenuItem.id" 567 // 568 // Required 569 Id js.String 570 // Label is "MenuItem.label" 571 // 572 // Optional 573 Label js.String 574 // Style is "MenuItem.style" 575 // 576 // Optional 577 Style MenuItemStyle 578 // Visible is "MenuItem.visible" 579 // 580 // Optional 581 // 582 // NOTE: FFI_USE_Visible MUST be set to true to make this field effective. 583 Visible bool 584 585 FFI_USE_Checked bool // for Checked. 586 FFI_USE_Enabled bool // for Enabled. 587 FFI_USE_Visible bool // for Visible. 588 589 FFI_USE bool 590 } 591 592 // FromRef calls UpdateFrom and returns a MenuItem with all fields set. 593 func (p MenuItem) FromRef(ref js.Ref) MenuItem { 594 p.UpdateFrom(ref) 595 return p 596 } 597 598 // New creates a new MenuItem in the application heap. 599 func (p MenuItem) New() js.Ref { 600 return bindings.MenuItemJSLoad( 601 js.Pointer(&p), js.True, 0, 602 ) 603 } 604 605 // UpdateFrom copies value of all fields of the heap object to p. 606 func (p *MenuItem) UpdateFrom(ref js.Ref) { 607 bindings.MenuItemJSStore( 608 js.Pointer(p), ref, 609 ) 610 } 611 612 // Update writes all fields of the p to the heap object referenced by ref. 613 func (p *MenuItem) Update(ref js.Ref) { 614 bindings.MenuItemJSLoad( 615 js.Pointer(p), js.False, ref, 616 ) 617 } 618 619 // FreeMembers frees fields with heap reference, if recursive is true 620 // free all heap references reachable from p. 621 func (p *MenuItem) FreeMembers(recursive bool) { 622 js.Free( 623 p.Id.Ref(), 624 p.Label.Ref(), 625 ) 626 p.Id = p.Id.FromRef(js.Undefined) 627 p.Label = p.Label.FromRef(js.Undefined) 628 } 629 630 type MenuParameters struct { 631 // EngineID is "MenuParameters.engineID" 632 // 633 // Required 634 EngineID js.String 635 // Items is "MenuParameters.items" 636 // 637 // Required 638 Items js.Array[MenuItem] 639 640 FFI_USE bool 641 } 642 643 // FromRef calls UpdateFrom and returns a MenuParameters with all fields set. 644 func (p MenuParameters) FromRef(ref js.Ref) MenuParameters { 645 p.UpdateFrom(ref) 646 return p 647 } 648 649 // New creates a new MenuParameters in the application heap. 650 func (p MenuParameters) New() js.Ref { 651 return bindings.MenuParametersJSLoad( 652 js.Pointer(&p), js.True, 0, 653 ) 654 } 655 656 // UpdateFrom copies value of all fields of the heap object to p. 657 func (p *MenuParameters) UpdateFrom(ref js.Ref) { 658 bindings.MenuParametersJSStore( 659 js.Pointer(p), ref, 660 ) 661 } 662 663 // Update writes all fields of the p to the heap object referenced by ref. 664 func (p *MenuParameters) Update(ref js.Ref) { 665 bindings.MenuParametersJSLoad( 666 js.Pointer(p), js.False, ref, 667 ) 668 } 669 670 // FreeMembers frees fields with heap reference, if recursive is true 671 // free all heap references reachable from p. 672 func (p *MenuParameters) FreeMembers(recursive bool) { 673 js.Free( 674 p.EngineID.Ref(), 675 p.Items.Ref(), 676 ) 677 p.EngineID = p.EngineID.FromRef(js.Undefined) 678 p.Items = p.Items.FromRef(js.Undefined) 679 } 680 681 type MouseButton uint32 682 683 const ( 684 _ MouseButton = iota 685 686 MouseButton_LEFT 687 MouseButton_MIDDLE 688 MouseButton_RIGHT 689 ) 690 691 func (MouseButton) FromRef(str js.Ref) MouseButton { 692 return MouseButton(bindings.ConstOfMouseButton(str)) 693 } 694 695 func (x MouseButton) String() (string, bool) { 696 switch x { 697 case MouseButton_LEFT: 698 return "left", true 699 case MouseButton_MIDDLE: 700 return "middle", true 701 case MouseButton_RIGHT: 702 return "right", true 703 default: 704 return "", false 705 } 706 } 707 708 type OnAssistiveWindowButtonClickedArgDetails struct { 709 // ButtonID is "OnAssistiveWindowButtonClickedArgDetails.buttonID" 710 // 711 // Required 712 ButtonID AssistiveWindowButton 713 // WindowType is "OnAssistiveWindowButtonClickedArgDetails.windowType" 714 // 715 // Required 716 WindowType AssistiveWindowType 717 718 FFI_USE bool 719 } 720 721 // FromRef calls UpdateFrom and returns a OnAssistiveWindowButtonClickedArgDetails with all fields set. 722 func (p OnAssistiveWindowButtonClickedArgDetails) FromRef(ref js.Ref) OnAssistiveWindowButtonClickedArgDetails { 723 p.UpdateFrom(ref) 724 return p 725 } 726 727 // New creates a new OnAssistiveWindowButtonClickedArgDetails in the application heap. 728 func (p OnAssistiveWindowButtonClickedArgDetails) New() js.Ref { 729 return bindings.OnAssistiveWindowButtonClickedArgDetailsJSLoad( 730 js.Pointer(&p), js.True, 0, 731 ) 732 } 733 734 // UpdateFrom copies value of all fields of the heap object to p. 735 func (p *OnAssistiveWindowButtonClickedArgDetails) UpdateFrom(ref js.Ref) { 736 bindings.OnAssistiveWindowButtonClickedArgDetailsJSStore( 737 js.Pointer(p), ref, 738 ) 739 } 740 741 // Update writes all fields of the p to the heap object referenced by ref. 742 func (p *OnAssistiveWindowButtonClickedArgDetails) Update(ref js.Ref) { 743 bindings.OnAssistiveWindowButtonClickedArgDetailsJSLoad( 744 js.Pointer(p), js.False, ref, 745 ) 746 } 747 748 // FreeMembers frees fields with heap reference, if recursive is true 749 // free all heap references reachable from p. 750 func (p *OnAssistiveWindowButtonClickedArgDetails) FreeMembers(recursive bool) { 751 } 752 753 type OnSurroundingTextChangedArgSurroundingInfo struct { 754 // Anchor is "OnSurroundingTextChangedArgSurroundingInfo.anchor" 755 // 756 // Required 757 Anchor int64 758 // Focus is "OnSurroundingTextChangedArgSurroundingInfo.focus" 759 // 760 // Required 761 Focus int64 762 // Offset is "OnSurroundingTextChangedArgSurroundingInfo.offset" 763 // 764 // Required 765 Offset int64 766 // Text is "OnSurroundingTextChangedArgSurroundingInfo.text" 767 // 768 // Required 769 Text js.String 770 771 FFI_USE bool 772 } 773 774 // FromRef calls UpdateFrom and returns a OnSurroundingTextChangedArgSurroundingInfo with all fields set. 775 func (p OnSurroundingTextChangedArgSurroundingInfo) FromRef(ref js.Ref) OnSurroundingTextChangedArgSurroundingInfo { 776 p.UpdateFrom(ref) 777 return p 778 } 779 780 // New creates a new OnSurroundingTextChangedArgSurroundingInfo in the application heap. 781 func (p OnSurroundingTextChangedArgSurroundingInfo) New() js.Ref { 782 return bindings.OnSurroundingTextChangedArgSurroundingInfoJSLoad( 783 js.Pointer(&p), js.True, 0, 784 ) 785 } 786 787 // UpdateFrom copies value of all fields of the heap object to p. 788 func (p *OnSurroundingTextChangedArgSurroundingInfo) UpdateFrom(ref js.Ref) { 789 bindings.OnSurroundingTextChangedArgSurroundingInfoJSStore( 790 js.Pointer(p), ref, 791 ) 792 } 793 794 // Update writes all fields of the p to the heap object referenced by ref. 795 func (p *OnSurroundingTextChangedArgSurroundingInfo) Update(ref js.Ref) { 796 bindings.OnSurroundingTextChangedArgSurroundingInfoJSLoad( 797 js.Pointer(p), js.False, ref, 798 ) 799 } 800 801 // FreeMembers frees fields with heap reference, if recursive is true 802 // free all heap references reachable from p. 803 func (p *OnSurroundingTextChangedArgSurroundingInfo) FreeMembers(recursive bool) { 804 js.Free( 805 p.Text.Ref(), 806 ) 807 p.Text = p.Text.FromRef(js.Undefined) 808 } 809 810 type ScreenType uint32 811 812 const ( 813 _ ScreenType = iota 814 815 ScreenType_NORMAL 816 ScreenType_LOGIN 817 ScreenType_LOCK 818 ScreenType_SECONDARY_LOGIN 819 ) 820 821 func (ScreenType) FromRef(str js.Ref) ScreenType { 822 return ScreenType(bindings.ConstOfScreenType(str)) 823 } 824 825 func (x ScreenType) String() (string, bool) { 826 switch x { 827 case ScreenType_NORMAL: 828 return "normal", true 829 case ScreenType_LOGIN: 830 return "login", true 831 case ScreenType_LOCK: 832 return "lock", true 833 case ScreenType_SECONDARY_LOGIN: 834 return "secondary-login", true 835 default: 836 return "", false 837 } 838 } 839 840 type SendKeyEventsArgParameters struct { 841 // ContextID is "SendKeyEventsArgParameters.contextID" 842 // 843 // Required 844 ContextID int64 845 // KeyData is "SendKeyEventsArgParameters.keyData" 846 // 847 // Required 848 KeyData js.Array[KeyboardEvent] 849 850 FFI_USE bool 851 } 852 853 // FromRef calls UpdateFrom and returns a SendKeyEventsArgParameters with all fields set. 854 func (p SendKeyEventsArgParameters) FromRef(ref js.Ref) SendKeyEventsArgParameters { 855 p.UpdateFrom(ref) 856 return p 857 } 858 859 // New creates a new SendKeyEventsArgParameters in the application heap. 860 func (p SendKeyEventsArgParameters) New() js.Ref { 861 return bindings.SendKeyEventsArgParametersJSLoad( 862 js.Pointer(&p), js.True, 0, 863 ) 864 } 865 866 // UpdateFrom copies value of all fields of the heap object to p. 867 func (p *SendKeyEventsArgParameters) UpdateFrom(ref js.Ref) { 868 bindings.SendKeyEventsArgParametersJSStore( 869 js.Pointer(p), ref, 870 ) 871 } 872 873 // Update writes all fields of the p to the heap object referenced by ref. 874 func (p *SendKeyEventsArgParameters) Update(ref js.Ref) { 875 bindings.SendKeyEventsArgParametersJSLoad( 876 js.Pointer(p), js.False, ref, 877 ) 878 } 879 880 // FreeMembers frees fields with heap reference, if recursive is true 881 // free all heap references reachable from p. 882 func (p *SendKeyEventsArgParameters) FreeMembers(recursive bool) { 883 js.Free( 884 p.KeyData.Ref(), 885 ) 886 p.KeyData = p.KeyData.FromRef(js.Undefined) 887 } 888 889 type SetAssistiveWindowButtonHighlightedArgParameters struct { 890 // AnnounceString is "SetAssistiveWindowButtonHighlightedArgParameters.announceString" 891 // 892 // Optional 893 AnnounceString js.String 894 // ButtonID is "SetAssistiveWindowButtonHighlightedArgParameters.buttonID" 895 // 896 // Required 897 ButtonID AssistiveWindowButton 898 // ContextID is "SetAssistiveWindowButtonHighlightedArgParameters.contextID" 899 // 900 // Required 901 ContextID int64 902 // Highlighted is "SetAssistiveWindowButtonHighlightedArgParameters.highlighted" 903 // 904 // Required 905 Highlighted bool 906 // WindowType is "SetAssistiveWindowButtonHighlightedArgParameters.windowType" 907 // 908 // Required 909 WindowType AssistiveWindowType 910 911 FFI_USE bool 912 } 913 914 // FromRef calls UpdateFrom and returns a SetAssistiveWindowButtonHighlightedArgParameters with all fields set. 915 func (p SetAssistiveWindowButtonHighlightedArgParameters) FromRef(ref js.Ref) SetAssistiveWindowButtonHighlightedArgParameters { 916 p.UpdateFrom(ref) 917 return p 918 } 919 920 // New creates a new SetAssistiveWindowButtonHighlightedArgParameters in the application heap. 921 func (p SetAssistiveWindowButtonHighlightedArgParameters) New() js.Ref { 922 return bindings.SetAssistiveWindowButtonHighlightedArgParametersJSLoad( 923 js.Pointer(&p), js.True, 0, 924 ) 925 } 926 927 // UpdateFrom copies value of all fields of the heap object to p. 928 func (p *SetAssistiveWindowButtonHighlightedArgParameters) UpdateFrom(ref js.Ref) { 929 bindings.SetAssistiveWindowButtonHighlightedArgParametersJSStore( 930 js.Pointer(p), ref, 931 ) 932 } 933 934 // Update writes all fields of the p to the heap object referenced by ref. 935 func (p *SetAssistiveWindowButtonHighlightedArgParameters) Update(ref js.Ref) { 936 bindings.SetAssistiveWindowButtonHighlightedArgParametersJSLoad( 937 js.Pointer(p), js.False, ref, 938 ) 939 } 940 941 // FreeMembers frees fields with heap reference, if recursive is true 942 // free all heap references reachable from p. 943 func (p *SetAssistiveWindowButtonHighlightedArgParameters) FreeMembers(recursive bool) { 944 js.Free( 945 p.AnnounceString.Ref(), 946 ) 947 p.AnnounceString = p.AnnounceString.FromRef(js.Undefined) 948 } 949 950 type SetAssistiveWindowPropertiesArgParameters struct { 951 // ContextID is "SetAssistiveWindowPropertiesArgParameters.contextID" 952 // 953 // Required 954 ContextID int64 955 // Properties is "SetAssistiveWindowPropertiesArgParameters.properties" 956 // 957 // Required 958 // 959 // NOTE: Properties.FFI_USE MUST be set to true to get Properties used. 960 Properties AssistiveWindowProperties 961 962 FFI_USE bool 963 } 964 965 // FromRef calls UpdateFrom and returns a SetAssistiveWindowPropertiesArgParameters with all fields set. 966 func (p SetAssistiveWindowPropertiesArgParameters) FromRef(ref js.Ref) SetAssistiveWindowPropertiesArgParameters { 967 p.UpdateFrom(ref) 968 return p 969 } 970 971 // New creates a new SetAssistiveWindowPropertiesArgParameters in the application heap. 972 func (p SetAssistiveWindowPropertiesArgParameters) New() js.Ref { 973 return bindings.SetAssistiveWindowPropertiesArgParametersJSLoad( 974 js.Pointer(&p), js.True, 0, 975 ) 976 } 977 978 // UpdateFrom copies value of all fields of the heap object to p. 979 func (p *SetAssistiveWindowPropertiesArgParameters) UpdateFrom(ref js.Ref) { 980 bindings.SetAssistiveWindowPropertiesArgParametersJSStore( 981 js.Pointer(p), ref, 982 ) 983 } 984 985 // Update writes all fields of the p to the heap object referenced by ref. 986 func (p *SetAssistiveWindowPropertiesArgParameters) Update(ref js.Ref) { 987 bindings.SetAssistiveWindowPropertiesArgParametersJSLoad( 988 js.Pointer(p), js.False, ref, 989 ) 990 } 991 992 // FreeMembers frees fields with heap reference, if recursive is true 993 // free all heap references reachable from p. 994 func (p *SetAssistiveWindowPropertiesArgParameters) FreeMembers(recursive bool) { 995 if recursive { 996 p.Properties.FreeMembers(true) 997 } 998 } 999 1000 type WindowPosition uint32 1001 1002 const ( 1003 _ WindowPosition = iota 1004 1005 WindowPosition_CURSOR 1006 WindowPosition_COMPOSITION 1007 ) 1008 1009 func (WindowPosition) FromRef(str js.Ref) WindowPosition { 1010 return WindowPosition(bindings.ConstOfWindowPosition(str)) 1011 } 1012 1013 func (x WindowPosition) String() (string, bool) { 1014 switch x { 1015 case WindowPosition_CURSOR: 1016 return "cursor", true 1017 case WindowPosition_COMPOSITION: 1018 return "composition", true 1019 default: 1020 return "", false 1021 } 1022 } 1023 1024 type SetCandidateWindowPropertiesArgParametersFieldProperties struct { 1025 // AuxiliaryText is "SetCandidateWindowPropertiesArgParametersFieldProperties.auxiliaryText" 1026 // 1027 // Optional 1028 AuxiliaryText js.String 1029 // AuxiliaryTextVisible is "SetCandidateWindowPropertiesArgParametersFieldProperties.auxiliaryTextVisible" 1030 // 1031 // Optional 1032 // 1033 // NOTE: FFI_USE_AuxiliaryTextVisible MUST be set to true to make this field effective. 1034 AuxiliaryTextVisible bool 1035 // CurrentCandidateIndex is "SetCandidateWindowPropertiesArgParametersFieldProperties.currentCandidateIndex" 1036 // 1037 // Optional 1038 // 1039 // NOTE: FFI_USE_CurrentCandidateIndex MUST be set to true to make this field effective. 1040 CurrentCandidateIndex int64 1041 // CursorVisible is "SetCandidateWindowPropertiesArgParametersFieldProperties.cursorVisible" 1042 // 1043 // Optional 1044 // 1045 // NOTE: FFI_USE_CursorVisible MUST be set to true to make this field effective. 1046 CursorVisible bool 1047 // PageSize is "SetCandidateWindowPropertiesArgParametersFieldProperties.pageSize" 1048 // 1049 // Optional 1050 // 1051 // NOTE: FFI_USE_PageSize MUST be set to true to make this field effective. 1052 PageSize int64 1053 // TotalCandidates is "SetCandidateWindowPropertiesArgParametersFieldProperties.totalCandidates" 1054 // 1055 // Optional 1056 // 1057 // NOTE: FFI_USE_TotalCandidates MUST be set to true to make this field effective. 1058 TotalCandidates int64 1059 // Vertical is "SetCandidateWindowPropertiesArgParametersFieldProperties.vertical" 1060 // 1061 // Optional 1062 // 1063 // NOTE: FFI_USE_Vertical MUST be set to true to make this field effective. 1064 Vertical bool 1065 // Visible is "SetCandidateWindowPropertiesArgParametersFieldProperties.visible" 1066 // 1067 // Optional 1068 // 1069 // NOTE: FFI_USE_Visible MUST be set to true to make this field effective. 1070 Visible bool 1071 // WindowPosition is "SetCandidateWindowPropertiesArgParametersFieldProperties.windowPosition" 1072 // 1073 // Optional 1074 WindowPosition WindowPosition 1075 1076 FFI_USE_AuxiliaryTextVisible bool // for AuxiliaryTextVisible. 1077 FFI_USE_CurrentCandidateIndex bool // for CurrentCandidateIndex. 1078 FFI_USE_CursorVisible bool // for CursorVisible. 1079 FFI_USE_PageSize bool // for PageSize. 1080 FFI_USE_TotalCandidates bool // for TotalCandidates. 1081 FFI_USE_Vertical bool // for Vertical. 1082 FFI_USE_Visible bool // for Visible. 1083 1084 FFI_USE bool 1085 } 1086 1087 // FromRef calls UpdateFrom and returns a SetCandidateWindowPropertiesArgParametersFieldProperties with all fields set. 1088 func (p SetCandidateWindowPropertiesArgParametersFieldProperties) FromRef(ref js.Ref) SetCandidateWindowPropertiesArgParametersFieldProperties { 1089 p.UpdateFrom(ref) 1090 return p 1091 } 1092 1093 // New creates a new SetCandidateWindowPropertiesArgParametersFieldProperties in the application heap. 1094 func (p SetCandidateWindowPropertiesArgParametersFieldProperties) New() js.Ref { 1095 return bindings.SetCandidateWindowPropertiesArgParametersFieldPropertiesJSLoad( 1096 js.Pointer(&p), js.True, 0, 1097 ) 1098 } 1099 1100 // UpdateFrom copies value of all fields of the heap object to p. 1101 func (p *SetCandidateWindowPropertiesArgParametersFieldProperties) UpdateFrom(ref js.Ref) { 1102 bindings.SetCandidateWindowPropertiesArgParametersFieldPropertiesJSStore( 1103 js.Pointer(p), ref, 1104 ) 1105 } 1106 1107 // Update writes all fields of the p to the heap object referenced by ref. 1108 func (p *SetCandidateWindowPropertiesArgParametersFieldProperties) Update(ref js.Ref) { 1109 bindings.SetCandidateWindowPropertiesArgParametersFieldPropertiesJSLoad( 1110 js.Pointer(p), js.False, ref, 1111 ) 1112 } 1113 1114 // FreeMembers frees fields with heap reference, if recursive is true 1115 // free all heap references reachable from p. 1116 func (p *SetCandidateWindowPropertiesArgParametersFieldProperties) FreeMembers(recursive bool) { 1117 js.Free( 1118 p.AuxiliaryText.Ref(), 1119 ) 1120 p.AuxiliaryText = p.AuxiliaryText.FromRef(js.Undefined) 1121 } 1122 1123 type SetCandidateWindowPropertiesArgParameters struct { 1124 // EngineID is "SetCandidateWindowPropertiesArgParameters.engineID" 1125 // 1126 // Required 1127 EngineID js.String 1128 // Properties is "SetCandidateWindowPropertiesArgParameters.properties" 1129 // 1130 // Required 1131 // 1132 // NOTE: Properties.FFI_USE MUST be set to true to get Properties used. 1133 Properties SetCandidateWindowPropertiesArgParametersFieldProperties 1134 1135 FFI_USE bool 1136 } 1137 1138 // FromRef calls UpdateFrom and returns a SetCandidateWindowPropertiesArgParameters with all fields set. 1139 func (p SetCandidateWindowPropertiesArgParameters) FromRef(ref js.Ref) SetCandidateWindowPropertiesArgParameters { 1140 p.UpdateFrom(ref) 1141 return p 1142 } 1143 1144 // New creates a new SetCandidateWindowPropertiesArgParameters in the application heap. 1145 func (p SetCandidateWindowPropertiesArgParameters) New() js.Ref { 1146 return bindings.SetCandidateWindowPropertiesArgParametersJSLoad( 1147 js.Pointer(&p), js.True, 0, 1148 ) 1149 } 1150 1151 // UpdateFrom copies value of all fields of the heap object to p. 1152 func (p *SetCandidateWindowPropertiesArgParameters) UpdateFrom(ref js.Ref) { 1153 bindings.SetCandidateWindowPropertiesArgParametersJSStore( 1154 js.Pointer(p), ref, 1155 ) 1156 } 1157 1158 // Update writes all fields of the p to the heap object referenced by ref. 1159 func (p *SetCandidateWindowPropertiesArgParameters) Update(ref js.Ref) { 1160 bindings.SetCandidateWindowPropertiesArgParametersJSLoad( 1161 js.Pointer(p), js.False, ref, 1162 ) 1163 } 1164 1165 // FreeMembers frees fields with heap reference, if recursive is true 1166 // free all heap references reachable from p. 1167 func (p *SetCandidateWindowPropertiesArgParameters) FreeMembers(recursive bool) { 1168 js.Free( 1169 p.EngineID.Ref(), 1170 ) 1171 p.EngineID = p.EngineID.FromRef(js.Undefined) 1172 if recursive { 1173 p.Properties.FreeMembers(true) 1174 } 1175 } 1176 1177 type SetCandidatesArgParametersFieldCandidatesElemFieldUsage struct { 1178 // Body is "SetCandidatesArgParametersFieldCandidatesElemFieldUsage.body" 1179 // 1180 // Required 1181 Body js.String 1182 // Title is "SetCandidatesArgParametersFieldCandidatesElemFieldUsage.title" 1183 // 1184 // Required 1185 Title js.String 1186 1187 FFI_USE bool 1188 } 1189 1190 // FromRef calls UpdateFrom and returns a SetCandidatesArgParametersFieldCandidatesElemFieldUsage with all fields set. 1191 func (p SetCandidatesArgParametersFieldCandidatesElemFieldUsage) FromRef(ref js.Ref) SetCandidatesArgParametersFieldCandidatesElemFieldUsage { 1192 p.UpdateFrom(ref) 1193 return p 1194 } 1195 1196 // New creates a new SetCandidatesArgParametersFieldCandidatesElemFieldUsage in the application heap. 1197 func (p SetCandidatesArgParametersFieldCandidatesElemFieldUsage) New() js.Ref { 1198 return bindings.SetCandidatesArgParametersFieldCandidatesElemFieldUsageJSLoad( 1199 js.Pointer(&p), js.True, 0, 1200 ) 1201 } 1202 1203 // UpdateFrom copies value of all fields of the heap object to p. 1204 func (p *SetCandidatesArgParametersFieldCandidatesElemFieldUsage) UpdateFrom(ref js.Ref) { 1205 bindings.SetCandidatesArgParametersFieldCandidatesElemFieldUsageJSStore( 1206 js.Pointer(p), ref, 1207 ) 1208 } 1209 1210 // Update writes all fields of the p to the heap object referenced by ref. 1211 func (p *SetCandidatesArgParametersFieldCandidatesElemFieldUsage) Update(ref js.Ref) { 1212 bindings.SetCandidatesArgParametersFieldCandidatesElemFieldUsageJSLoad( 1213 js.Pointer(p), js.False, ref, 1214 ) 1215 } 1216 1217 // FreeMembers frees fields with heap reference, if recursive is true 1218 // free all heap references reachable from p. 1219 func (p *SetCandidatesArgParametersFieldCandidatesElemFieldUsage) FreeMembers(recursive bool) { 1220 js.Free( 1221 p.Body.Ref(), 1222 p.Title.Ref(), 1223 ) 1224 p.Body = p.Body.FromRef(js.Undefined) 1225 p.Title = p.Title.FromRef(js.Undefined) 1226 } 1227 1228 type SetCandidatesArgParametersFieldCandidatesElem struct { 1229 // Annotation is "SetCandidatesArgParametersFieldCandidatesElem.annotation" 1230 // 1231 // Optional 1232 Annotation js.String 1233 // Candidate is "SetCandidatesArgParametersFieldCandidatesElem.candidate" 1234 // 1235 // Required 1236 Candidate js.String 1237 // Id is "SetCandidatesArgParametersFieldCandidatesElem.id" 1238 // 1239 // Required 1240 Id int64 1241 // Label is "SetCandidatesArgParametersFieldCandidatesElem.label" 1242 // 1243 // Optional 1244 Label js.String 1245 // ParentId is "SetCandidatesArgParametersFieldCandidatesElem.parentId" 1246 // 1247 // Optional 1248 // 1249 // NOTE: FFI_USE_ParentId MUST be set to true to make this field effective. 1250 ParentId int64 1251 // Usage is "SetCandidatesArgParametersFieldCandidatesElem.usage" 1252 // 1253 // Optional 1254 // 1255 // NOTE: Usage.FFI_USE MUST be set to true to get Usage used. 1256 Usage SetCandidatesArgParametersFieldCandidatesElemFieldUsage 1257 1258 FFI_USE_ParentId bool // for ParentId. 1259 1260 FFI_USE bool 1261 } 1262 1263 // FromRef calls UpdateFrom and returns a SetCandidatesArgParametersFieldCandidatesElem with all fields set. 1264 func (p SetCandidatesArgParametersFieldCandidatesElem) FromRef(ref js.Ref) SetCandidatesArgParametersFieldCandidatesElem { 1265 p.UpdateFrom(ref) 1266 return p 1267 } 1268 1269 // New creates a new SetCandidatesArgParametersFieldCandidatesElem in the application heap. 1270 func (p SetCandidatesArgParametersFieldCandidatesElem) New() js.Ref { 1271 return bindings.SetCandidatesArgParametersFieldCandidatesElemJSLoad( 1272 js.Pointer(&p), js.True, 0, 1273 ) 1274 } 1275 1276 // UpdateFrom copies value of all fields of the heap object to p. 1277 func (p *SetCandidatesArgParametersFieldCandidatesElem) UpdateFrom(ref js.Ref) { 1278 bindings.SetCandidatesArgParametersFieldCandidatesElemJSStore( 1279 js.Pointer(p), ref, 1280 ) 1281 } 1282 1283 // Update writes all fields of the p to the heap object referenced by ref. 1284 func (p *SetCandidatesArgParametersFieldCandidatesElem) Update(ref js.Ref) { 1285 bindings.SetCandidatesArgParametersFieldCandidatesElemJSLoad( 1286 js.Pointer(p), js.False, ref, 1287 ) 1288 } 1289 1290 // FreeMembers frees fields with heap reference, if recursive is true 1291 // free all heap references reachable from p. 1292 func (p *SetCandidatesArgParametersFieldCandidatesElem) FreeMembers(recursive bool) { 1293 js.Free( 1294 p.Annotation.Ref(), 1295 p.Candidate.Ref(), 1296 p.Label.Ref(), 1297 ) 1298 p.Annotation = p.Annotation.FromRef(js.Undefined) 1299 p.Candidate = p.Candidate.FromRef(js.Undefined) 1300 p.Label = p.Label.FromRef(js.Undefined) 1301 if recursive { 1302 p.Usage.FreeMembers(true) 1303 } 1304 } 1305 1306 type SetCandidatesArgParameters struct { 1307 // Candidates is "SetCandidatesArgParameters.candidates" 1308 // 1309 // Required 1310 Candidates js.Array[SetCandidatesArgParametersFieldCandidatesElem] 1311 // ContextID is "SetCandidatesArgParameters.contextID" 1312 // 1313 // Required 1314 ContextID int64 1315 1316 FFI_USE bool 1317 } 1318 1319 // FromRef calls UpdateFrom and returns a SetCandidatesArgParameters with all fields set. 1320 func (p SetCandidatesArgParameters) FromRef(ref js.Ref) SetCandidatesArgParameters { 1321 p.UpdateFrom(ref) 1322 return p 1323 } 1324 1325 // New creates a new SetCandidatesArgParameters in the application heap. 1326 func (p SetCandidatesArgParameters) New() js.Ref { 1327 return bindings.SetCandidatesArgParametersJSLoad( 1328 js.Pointer(&p), js.True, 0, 1329 ) 1330 } 1331 1332 // UpdateFrom copies value of all fields of the heap object to p. 1333 func (p *SetCandidatesArgParameters) UpdateFrom(ref js.Ref) { 1334 bindings.SetCandidatesArgParametersJSStore( 1335 js.Pointer(p), ref, 1336 ) 1337 } 1338 1339 // Update writes all fields of the p to the heap object referenced by ref. 1340 func (p *SetCandidatesArgParameters) Update(ref js.Ref) { 1341 bindings.SetCandidatesArgParametersJSLoad( 1342 js.Pointer(p), js.False, ref, 1343 ) 1344 } 1345 1346 // FreeMembers frees fields with heap reference, if recursive is true 1347 // free all heap references reachable from p. 1348 func (p *SetCandidatesArgParameters) FreeMembers(recursive bool) { 1349 js.Free( 1350 p.Candidates.Ref(), 1351 ) 1352 p.Candidates = p.Candidates.FromRef(js.Undefined) 1353 } 1354 1355 type UnderlineStyle uint32 1356 1357 const ( 1358 _ UnderlineStyle = iota 1359 1360 UnderlineStyle_UNDERLINE 1361 UnderlineStyle_DOUBLE_UNDERLINE 1362 UnderlineStyle_NO_UNDERLINE 1363 ) 1364 1365 func (UnderlineStyle) FromRef(str js.Ref) UnderlineStyle { 1366 return UnderlineStyle(bindings.ConstOfUnderlineStyle(str)) 1367 } 1368 1369 func (x UnderlineStyle) String() (string, bool) { 1370 switch x { 1371 case UnderlineStyle_UNDERLINE: 1372 return "underline", true 1373 case UnderlineStyle_DOUBLE_UNDERLINE: 1374 return "doubleUnderline", true 1375 case UnderlineStyle_NO_UNDERLINE: 1376 return "noUnderline", true 1377 default: 1378 return "", false 1379 } 1380 } 1381 1382 type SetCompositionArgParametersFieldSegmentsElem struct { 1383 // End is "SetCompositionArgParametersFieldSegmentsElem.end" 1384 // 1385 // Required 1386 End int64 1387 // Start is "SetCompositionArgParametersFieldSegmentsElem.start" 1388 // 1389 // Required 1390 Start int64 1391 // Style is "SetCompositionArgParametersFieldSegmentsElem.style" 1392 // 1393 // Required 1394 Style UnderlineStyle 1395 1396 FFI_USE bool 1397 } 1398 1399 // FromRef calls UpdateFrom and returns a SetCompositionArgParametersFieldSegmentsElem with all fields set. 1400 func (p SetCompositionArgParametersFieldSegmentsElem) FromRef(ref js.Ref) SetCompositionArgParametersFieldSegmentsElem { 1401 p.UpdateFrom(ref) 1402 return p 1403 } 1404 1405 // New creates a new SetCompositionArgParametersFieldSegmentsElem in the application heap. 1406 func (p SetCompositionArgParametersFieldSegmentsElem) New() js.Ref { 1407 return bindings.SetCompositionArgParametersFieldSegmentsElemJSLoad( 1408 js.Pointer(&p), js.True, 0, 1409 ) 1410 } 1411 1412 // UpdateFrom copies value of all fields of the heap object to p. 1413 func (p *SetCompositionArgParametersFieldSegmentsElem) UpdateFrom(ref js.Ref) { 1414 bindings.SetCompositionArgParametersFieldSegmentsElemJSStore( 1415 js.Pointer(p), ref, 1416 ) 1417 } 1418 1419 // Update writes all fields of the p to the heap object referenced by ref. 1420 func (p *SetCompositionArgParametersFieldSegmentsElem) Update(ref js.Ref) { 1421 bindings.SetCompositionArgParametersFieldSegmentsElemJSLoad( 1422 js.Pointer(p), js.False, ref, 1423 ) 1424 } 1425 1426 // FreeMembers frees fields with heap reference, if recursive is true 1427 // free all heap references reachable from p. 1428 func (p *SetCompositionArgParametersFieldSegmentsElem) FreeMembers(recursive bool) { 1429 } 1430 1431 type SetCompositionArgParameters struct { 1432 // ContextID is "SetCompositionArgParameters.contextID" 1433 // 1434 // Required 1435 ContextID int64 1436 // Cursor is "SetCompositionArgParameters.cursor" 1437 // 1438 // Required 1439 Cursor int64 1440 // Segments is "SetCompositionArgParameters.segments" 1441 // 1442 // Optional 1443 Segments js.Array[SetCompositionArgParametersFieldSegmentsElem] 1444 // SelectionEnd is "SetCompositionArgParameters.selectionEnd" 1445 // 1446 // Optional 1447 // 1448 // NOTE: FFI_USE_SelectionEnd MUST be set to true to make this field effective. 1449 SelectionEnd int64 1450 // SelectionStart is "SetCompositionArgParameters.selectionStart" 1451 // 1452 // Optional 1453 // 1454 // NOTE: FFI_USE_SelectionStart MUST be set to true to make this field effective. 1455 SelectionStart int64 1456 // Text is "SetCompositionArgParameters.text" 1457 // 1458 // Required 1459 Text js.String 1460 1461 FFI_USE_SelectionEnd bool // for SelectionEnd. 1462 FFI_USE_SelectionStart bool // for SelectionStart. 1463 1464 FFI_USE bool 1465 } 1466 1467 // FromRef calls UpdateFrom and returns a SetCompositionArgParameters with all fields set. 1468 func (p SetCompositionArgParameters) FromRef(ref js.Ref) SetCompositionArgParameters { 1469 p.UpdateFrom(ref) 1470 return p 1471 } 1472 1473 // New creates a new SetCompositionArgParameters in the application heap. 1474 func (p SetCompositionArgParameters) New() js.Ref { 1475 return bindings.SetCompositionArgParametersJSLoad( 1476 js.Pointer(&p), js.True, 0, 1477 ) 1478 } 1479 1480 // UpdateFrom copies value of all fields of the heap object to p. 1481 func (p *SetCompositionArgParameters) UpdateFrom(ref js.Ref) { 1482 bindings.SetCompositionArgParametersJSStore( 1483 js.Pointer(p), ref, 1484 ) 1485 } 1486 1487 // Update writes all fields of the p to the heap object referenced by ref. 1488 func (p *SetCompositionArgParameters) Update(ref js.Ref) { 1489 bindings.SetCompositionArgParametersJSLoad( 1490 js.Pointer(p), js.False, ref, 1491 ) 1492 } 1493 1494 // FreeMembers frees fields with heap reference, if recursive is true 1495 // free all heap references reachable from p. 1496 func (p *SetCompositionArgParameters) FreeMembers(recursive bool) { 1497 js.Free( 1498 p.Segments.Ref(), 1499 p.Text.Ref(), 1500 ) 1501 p.Segments = p.Segments.FromRef(js.Undefined) 1502 p.Text = p.Text.FromRef(js.Undefined) 1503 } 1504 1505 type SetCursorPositionArgParameters struct { 1506 // CandidateID is "SetCursorPositionArgParameters.candidateID" 1507 // 1508 // Required 1509 CandidateID int64 1510 // ContextID is "SetCursorPositionArgParameters.contextID" 1511 // 1512 // Required 1513 ContextID int64 1514 1515 FFI_USE bool 1516 } 1517 1518 // FromRef calls UpdateFrom and returns a SetCursorPositionArgParameters with all fields set. 1519 func (p SetCursorPositionArgParameters) FromRef(ref js.Ref) SetCursorPositionArgParameters { 1520 p.UpdateFrom(ref) 1521 return p 1522 } 1523 1524 // New creates a new SetCursorPositionArgParameters in the application heap. 1525 func (p SetCursorPositionArgParameters) New() js.Ref { 1526 return bindings.SetCursorPositionArgParametersJSLoad( 1527 js.Pointer(&p), js.True, 0, 1528 ) 1529 } 1530 1531 // UpdateFrom copies value of all fields of the heap object to p. 1532 func (p *SetCursorPositionArgParameters) UpdateFrom(ref js.Ref) { 1533 bindings.SetCursorPositionArgParametersJSStore( 1534 js.Pointer(p), ref, 1535 ) 1536 } 1537 1538 // Update writes all fields of the p to the heap object referenced by ref. 1539 func (p *SetCursorPositionArgParameters) Update(ref js.Ref) { 1540 bindings.SetCursorPositionArgParametersJSLoad( 1541 js.Pointer(p), js.False, ref, 1542 ) 1543 } 1544 1545 // FreeMembers frees fields with heap reference, if recursive is true 1546 // free all heap references reachable from p. 1547 func (p *SetCursorPositionArgParameters) FreeMembers(recursive bool) { 1548 } 1549 1550 // HasFuncClearComposition returns true if the function "WEBEXT.input.ime.clearComposition" exists. 1551 func HasFuncClearComposition() bool { 1552 return js.True == bindings.HasFuncClearComposition() 1553 } 1554 1555 // FuncClearComposition returns the function "WEBEXT.input.ime.clearComposition". 1556 func FuncClearComposition() (fn js.Func[func(parameters ClearCompositionArgParameters) js.Promise[js.Boolean]]) { 1557 bindings.FuncClearComposition( 1558 js.Pointer(&fn), 1559 ) 1560 return 1561 } 1562 1563 // ClearComposition calls the function "WEBEXT.input.ime.clearComposition" directly. 1564 func ClearComposition(parameters ClearCompositionArgParameters) (ret js.Promise[js.Boolean]) { 1565 bindings.CallClearComposition( 1566 js.Pointer(&ret), 1567 js.Pointer(¶meters), 1568 ) 1569 1570 return 1571 } 1572 1573 // TryClearComposition calls the function "WEBEXT.input.ime.clearComposition" 1574 // in a try/catch block and returns (_, err, ok = false) when it went through 1575 // the catch clause. 1576 func TryClearComposition(parameters ClearCompositionArgParameters) (ret js.Promise[js.Boolean], exception js.Any, ok bool) { 1577 ok = js.True == bindings.TryClearComposition( 1578 js.Pointer(&ret), js.Pointer(&exception), 1579 js.Pointer(¶meters), 1580 ) 1581 1582 return 1583 } 1584 1585 // HasFuncCommitText returns true if the function "WEBEXT.input.ime.commitText" exists. 1586 func HasFuncCommitText() bool { 1587 return js.True == bindings.HasFuncCommitText() 1588 } 1589 1590 // FuncCommitText returns the function "WEBEXT.input.ime.commitText". 1591 func FuncCommitText() (fn js.Func[func(parameters CommitTextArgParameters) js.Promise[js.Boolean]]) { 1592 bindings.FuncCommitText( 1593 js.Pointer(&fn), 1594 ) 1595 return 1596 } 1597 1598 // CommitText calls the function "WEBEXT.input.ime.commitText" directly. 1599 func CommitText(parameters CommitTextArgParameters) (ret js.Promise[js.Boolean]) { 1600 bindings.CallCommitText( 1601 js.Pointer(&ret), 1602 js.Pointer(¶meters), 1603 ) 1604 1605 return 1606 } 1607 1608 // TryCommitText calls the function "WEBEXT.input.ime.commitText" 1609 // in a try/catch block and returns (_, err, ok = false) when it went through 1610 // the catch clause. 1611 func TryCommitText(parameters CommitTextArgParameters) (ret js.Promise[js.Boolean], exception js.Any, ok bool) { 1612 ok = js.True == bindings.TryCommitText( 1613 js.Pointer(&ret), js.Pointer(&exception), 1614 js.Pointer(¶meters), 1615 ) 1616 1617 return 1618 } 1619 1620 // HasFuncDeleteSurroundingText returns true if the function "WEBEXT.input.ime.deleteSurroundingText" exists. 1621 func HasFuncDeleteSurroundingText() bool { 1622 return js.True == bindings.HasFuncDeleteSurroundingText() 1623 } 1624 1625 // FuncDeleteSurroundingText returns the function "WEBEXT.input.ime.deleteSurroundingText". 1626 func FuncDeleteSurroundingText() (fn js.Func[func(parameters DeleteSurroundingTextArgParameters) js.Promise[js.Void]]) { 1627 bindings.FuncDeleteSurroundingText( 1628 js.Pointer(&fn), 1629 ) 1630 return 1631 } 1632 1633 // DeleteSurroundingText calls the function "WEBEXT.input.ime.deleteSurroundingText" directly. 1634 func DeleteSurroundingText(parameters DeleteSurroundingTextArgParameters) (ret js.Promise[js.Void]) { 1635 bindings.CallDeleteSurroundingText( 1636 js.Pointer(&ret), 1637 js.Pointer(¶meters), 1638 ) 1639 1640 return 1641 } 1642 1643 // TryDeleteSurroundingText calls the function "WEBEXT.input.ime.deleteSurroundingText" 1644 // in a try/catch block and returns (_, err, ok = false) when it went through 1645 // the catch clause. 1646 func TryDeleteSurroundingText(parameters DeleteSurroundingTextArgParameters) (ret js.Promise[js.Void], exception js.Any, ok bool) { 1647 ok = js.True == bindings.TryDeleteSurroundingText( 1648 js.Pointer(&ret), js.Pointer(&exception), 1649 js.Pointer(¶meters), 1650 ) 1651 1652 return 1653 } 1654 1655 // HasFuncHideInputView returns true if the function "WEBEXT.input.ime.hideInputView" exists. 1656 func HasFuncHideInputView() bool { 1657 return js.True == bindings.HasFuncHideInputView() 1658 } 1659 1660 // FuncHideInputView returns the function "WEBEXT.input.ime.hideInputView". 1661 func FuncHideInputView() (fn js.Func[func()]) { 1662 bindings.FuncHideInputView( 1663 js.Pointer(&fn), 1664 ) 1665 return 1666 } 1667 1668 // HideInputView calls the function "WEBEXT.input.ime.hideInputView" directly. 1669 func HideInputView() (ret js.Void) { 1670 bindings.CallHideInputView( 1671 js.Pointer(&ret), 1672 ) 1673 1674 return 1675 } 1676 1677 // TryHideInputView calls the function "WEBEXT.input.ime.hideInputView" 1678 // in a try/catch block and returns (_, err, ok = false) when it went through 1679 // the catch clause. 1680 func TryHideInputView() (ret js.Void, exception js.Any, ok bool) { 1681 ok = js.True == bindings.TryHideInputView( 1682 js.Pointer(&ret), js.Pointer(&exception), 1683 ) 1684 1685 return 1686 } 1687 1688 // HasFuncKeyEventHandled returns true if the function "WEBEXT.input.ime.keyEventHandled" exists. 1689 func HasFuncKeyEventHandled() bool { 1690 return js.True == bindings.HasFuncKeyEventHandled() 1691 } 1692 1693 // FuncKeyEventHandled returns the function "WEBEXT.input.ime.keyEventHandled". 1694 func FuncKeyEventHandled() (fn js.Func[func(requestId js.String, response bool)]) { 1695 bindings.FuncKeyEventHandled( 1696 js.Pointer(&fn), 1697 ) 1698 return 1699 } 1700 1701 // KeyEventHandled calls the function "WEBEXT.input.ime.keyEventHandled" directly. 1702 func KeyEventHandled(requestId js.String, response bool) (ret js.Void) { 1703 bindings.CallKeyEventHandled( 1704 js.Pointer(&ret), 1705 requestId.Ref(), 1706 js.Bool(bool(response)), 1707 ) 1708 1709 return 1710 } 1711 1712 // TryKeyEventHandled calls the function "WEBEXT.input.ime.keyEventHandled" 1713 // in a try/catch block and returns (_, err, ok = false) when it went through 1714 // the catch clause. 1715 func TryKeyEventHandled(requestId js.String, response bool) (ret js.Void, exception js.Any, ok bool) { 1716 ok = js.True == bindings.TryKeyEventHandled( 1717 js.Pointer(&ret), js.Pointer(&exception), 1718 requestId.Ref(), 1719 js.Bool(bool(response)), 1720 ) 1721 1722 return 1723 } 1724 1725 type OnActivateEventCallbackFunc func(this js.Ref, engineID js.String, screen ScreenType) js.Ref 1726 1727 func (fn OnActivateEventCallbackFunc) Register() js.Func[func(engineID js.String, screen ScreenType)] { 1728 return js.RegisterCallback[func(engineID js.String, screen ScreenType)]( 1729 fn, abi.FuncPCABIInternal(fn), 1730 ) 1731 } 1732 1733 func (fn OnActivateEventCallbackFunc) DispatchCallback( 1734 targetPC uintptr, ctx *js.CallbackContext, 1735 ) { 1736 args := ctx.Args() 1737 if len(args) != 2+1 /* js this */ || 1738 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 1739 js.ThrowInvalidCallbackInvocation() 1740 } 1741 1742 if ctx.Return(fn( 1743 args[0], 1744 1745 js.String{}.FromRef(args[0+1]), 1746 ScreenType(0).FromRef(args[1+1]), 1747 )) { 1748 return 1749 } 1750 1751 js.ThrowCallbackValueNotReturned() 1752 } 1753 1754 type OnActivateEventCallback[T any] struct { 1755 Fn func(arg T, this js.Ref, engineID js.String, screen ScreenType) js.Ref 1756 Arg T 1757 } 1758 1759 func (cb *OnActivateEventCallback[T]) Register() js.Func[func(engineID js.String, screen ScreenType)] { 1760 return js.RegisterCallback[func(engineID js.String, screen ScreenType)]( 1761 cb, abi.FuncPCABIInternal(cb.Fn), 1762 ) 1763 } 1764 1765 func (cb *OnActivateEventCallback[T]) DispatchCallback( 1766 targetPC uintptr, ctx *js.CallbackContext, 1767 ) { 1768 args := ctx.Args() 1769 if len(args) != 2+1 /* js this */ || 1770 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 1771 js.ThrowInvalidCallbackInvocation() 1772 } 1773 1774 if ctx.Return(cb.Fn( 1775 cb.Arg, 1776 args[0], 1777 1778 js.String{}.FromRef(args[0+1]), 1779 ScreenType(0).FromRef(args[1+1]), 1780 )) { 1781 return 1782 } 1783 1784 js.ThrowCallbackValueNotReturned() 1785 } 1786 1787 // HasFuncOnActivate returns true if the function "WEBEXT.input.ime.onActivate.addListener" exists. 1788 func HasFuncOnActivate() bool { 1789 return js.True == bindings.HasFuncOnActivate() 1790 } 1791 1792 // FuncOnActivate returns the function "WEBEXT.input.ime.onActivate.addListener". 1793 func FuncOnActivate() (fn js.Func[func(callback js.Func[func(engineID js.String, screen ScreenType)])]) { 1794 bindings.FuncOnActivate( 1795 js.Pointer(&fn), 1796 ) 1797 return 1798 } 1799 1800 // OnActivate calls the function "WEBEXT.input.ime.onActivate.addListener" directly. 1801 func OnActivate(callback js.Func[func(engineID js.String, screen ScreenType)]) (ret js.Void) { 1802 bindings.CallOnActivate( 1803 js.Pointer(&ret), 1804 callback.Ref(), 1805 ) 1806 1807 return 1808 } 1809 1810 // TryOnActivate calls the function "WEBEXT.input.ime.onActivate.addListener" 1811 // in a try/catch block and returns (_, err, ok = false) when it went through 1812 // the catch clause. 1813 func TryOnActivate(callback js.Func[func(engineID js.String, screen ScreenType)]) (ret js.Void, exception js.Any, ok bool) { 1814 ok = js.True == bindings.TryOnActivate( 1815 js.Pointer(&ret), js.Pointer(&exception), 1816 callback.Ref(), 1817 ) 1818 1819 return 1820 } 1821 1822 // HasFuncOffActivate returns true if the function "WEBEXT.input.ime.onActivate.removeListener" exists. 1823 func HasFuncOffActivate() bool { 1824 return js.True == bindings.HasFuncOffActivate() 1825 } 1826 1827 // FuncOffActivate returns the function "WEBEXT.input.ime.onActivate.removeListener". 1828 func FuncOffActivate() (fn js.Func[func(callback js.Func[func(engineID js.String, screen ScreenType)])]) { 1829 bindings.FuncOffActivate( 1830 js.Pointer(&fn), 1831 ) 1832 return 1833 } 1834 1835 // OffActivate calls the function "WEBEXT.input.ime.onActivate.removeListener" directly. 1836 func OffActivate(callback js.Func[func(engineID js.String, screen ScreenType)]) (ret js.Void) { 1837 bindings.CallOffActivate( 1838 js.Pointer(&ret), 1839 callback.Ref(), 1840 ) 1841 1842 return 1843 } 1844 1845 // TryOffActivate calls the function "WEBEXT.input.ime.onActivate.removeListener" 1846 // in a try/catch block and returns (_, err, ok = false) when it went through 1847 // the catch clause. 1848 func TryOffActivate(callback js.Func[func(engineID js.String, screen ScreenType)]) (ret js.Void, exception js.Any, ok bool) { 1849 ok = js.True == bindings.TryOffActivate( 1850 js.Pointer(&ret), js.Pointer(&exception), 1851 callback.Ref(), 1852 ) 1853 1854 return 1855 } 1856 1857 // HasFuncHasOnActivate returns true if the function "WEBEXT.input.ime.onActivate.hasListener" exists. 1858 func HasFuncHasOnActivate() bool { 1859 return js.True == bindings.HasFuncHasOnActivate() 1860 } 1861 1862 // FuncHasOnActivate returns the function "WEBEXT.input.ime.onActivate.hasListener". 1863 func FuncHasOnActivate() (fn js.Func[func(callback js.Func[func(engineID js.String, screen ScreenType)]) bool]) { 1864 bindings.FuncHasOnActivate( 1865 js.Pointer(&fn), 1866 ) 1867 return 1868 } 1869 1870 // HasOnActivate calls the function "WEBEXT.input.ime.onActivate.hasListener" directly. 1871 func HasOnActivate(callback js.Func[func(engineID js.String, screen ScreenType)]) (ret bool) { 1872 bindings.CallHasOnActivate( 1873 js.Pointer(&ret), 1874 callback.Ref(), 1875 ) 1876 1877 return 1878 } 1879 1880 // TryHasOnActivate calls the function "WEBEXT.input.ime.onActivate.hasListener" 1881 // in a try/catch block and returns (_, err, ok = false) when it went through 1882 // the catch clause. 1883 func TryHasOnActivate(callback js.Func[func(engineID js.String, screen ScreenType)]) (ret bool, exception js.Any, ok bool) { 1884 ok = js.True == bindings.TryHasOnActivate( 1885 js.Pointer(&ret), js.Pointer(&exception), 1886 callback.Ref(), 1887 ) 1888 1889 return 1890 } 1891 1892 type OnAssistiveWindowButtonClickedEventCallbackFunc func(this js.Ref, details *OnAssistiveWindowButtonClickedArgDetails) js.Ref 1893 1894 func (fn OnAssistiveWindowButtonClickedEventCallbackFunc) Register() js.Func[func(details *OnAssistiveWindowButtonClickedArgDetails)] { 1895 return js.RegisterCallback[func(details *OnAssistiveWindowButtonClickedArgDetails)]( 1896 fn, abi.FuncPCABIInternal(fn), 1897 ) 1898 } 1899 1900 func (fn OnAssistiveWindowButtonClickedEventCallbackFunc) DispatchCallback( 1901 targetPC uintptr, ctx *js.CallbackContext, 1902 ) { 1903 args := ctx.Args() 1904 if len(args) != 1+1 /* js this */ || 1905 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 1906 js.ThrowInvalidCallbackInvocation() 1907 } 1908 var arg0 OnAssistiveWindowButtonClickedArgDetails 1909 arg0.UpdateFrom(args[0+1]) 1910 defer arg0.FreeMembers(true) 1911 1912 if ctx.Return(fn( 1913 args[0], 1914 1915 mark.NoEscape(&arg0), 1916 )) { 1917 return 1918 } 1919 1920 js.ThrowCallbackValueNotReturned() 1921 } 1922 1923 type OnAssistiveWindowButtonClickedEventCallback[T any] struct { 1924 Fn func(arg T, this js.Ref, details *OnAssistiveWindowButtonClickedArgDetails) js.Ref 1925 Arg T 1926 } 1927 1928 func (cb *OnAssistiveWindowButtonClickedEventCallback[T]) Register() js.Func[func(details *OnAssistiveWindowButtonClickedArgDetails)] { 1929 return js.RegisterCallback[func(details *OnAssistiveWindowButtonClickedArgDetails)]( 1930 cb, abi.FuncPCABIInternal(cb.Fn), 1931 ) 1932 } 1933 1934 func (cb *OnAssistiveWindowButtonClickedEventCallback[T]) DispatchCallback( 1935 targetPC uintptr, ctx *js.CallbackContext, 1936 ) { 1937 args := ctx.Args() 1938 if len(args) != 1+1 /* js this */ || 1939 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 1940 js.ThrowInvalidCallbackInvocation() 1941 } 1942 var arg0 OnAssistiveWindowButtonClickedArgDetails 1943 arg0.UpdateFrom(args[0+1]) 1944 defer arg0.FreeMembers(true) 1945 1946 if ctx.Return(cb.Fn( 1947 cb.Arg, 1948 args[0], 1949 1950 mark.NoEscape(&arg0), 1951 )) { 1952 return 1953 } 1954 1955 js.ThrowCallbackValueNotReturned() 1956 } 1957 1958 // HasFuncOnAssistiveWindowButtonClicked returns true if the function "WEBEXT.input.ime.onAssistiveWindowButtonClicked.addListener" exists. 1959 func HasFuncOnAssistiveWindowButtonClicked() bool { 1960 return js.True == bindings.HasFuncOnAssistiveWindowButtonClicked() 1961 } 1962 1963 // FuncOnAssistiveWindowButtonClicked returns the function "WEBEXT.input.ime.onAssistiveWindowButtonClicked.addListener". 1964 func FuncOnAssistiveWindowButtonClicked() (fn js.Func[func(callback js.Func[func(details *OnAssistiveWindowButtonClickedArgDetails)])]) { 1965 bindings.FuncOnAssistiveWindowButtonClicked( 1966 js.Pointer(&fn), 1967 ) 1968 return 1969 } 1970 1971 // OnAssistiveWindowButtonClicked calls the function "WEBEXT.input.ime.onAssistiveWindowButtonClicked.addListener" directly. 1972 func OnAssistiveWindowButtonClicked(callback js.Func[func(details *OnAssistiveWindowButtonClickedArgDetails)]) (ret js.Void) { 1973 bindings.CallOnAssistiveWindowButtonClicked( 1974 js.Pointer(&ret), 1975 callback.Ref(), 1976 ) 1977 1978 return 1979 } 1980 1981 // TryOnAssistiveWindowButtonClicked calls the function "WEBEXT.input.ime.onAssistiveWindowButtonClicked.addListener" 1982 // in a try/catch block and returns (_, err, ok = false) when it went through 1983 // the catch clause. 1984 func TryOnAssistiveWindowButtonClicked(callback js.Func[func(details *OnAssistiveWindowButtonClickedArgDetails)]) (ret js.Void, exception js.Any, ok bool) { 1985 ok = js.True == bindings.TryOnAssistiveWindowButtonClicked( 1986 js.Pointer(&ret), js.Pointer(&exception), 1987 callback.Ref(), 1988 ) 1989 1990 return 1991 } 1992 1993 // HasFuncOffAssistiveWindowButtonClicked returns true if the function "WEBEXT.input.ime.onAssistiveWindowButtonClicked.removeListener" exists. 1994 func HasFuncOffAssistiveWindowButtonClicked() bool { 1995 return js.True == bindings.HasFuncOffAssistiveWindowButtonClicked() 1996 } 1997 1998 // FuncOffAssistiveWindowButtonClicked returns the function "WEBEXT.input.ime.onAssistiveWindowButtonClicked.removeListener". 1999 func FuncOffAssistiveWindowButtonClicked() (fn js.Func[func(callback js.Func[func(details *OnAssistiveWindowButtonClickedArgDetails)])]) { 2000 bindings.FuncOffAssistiveWindowButtonClicked( 2001 js.Pointer(&fn), 2002 ) 2003 return 2004 } 2005 2006 // OffAssistiveWindowButtonClicked calls the function "WEBEXT.input.ime.onAssistiveWindowButtonClicked.removeListener" directly. 2007 func OffAssistiveWindowButtonClicked(callback js.Func[func(details *OnAssistiveWindowButtonClickedArgDetails)]) (ret js.Void) { 2008 bindings.CallOffAssistiveWindowButtonClicked( 2009 js.Pointer(&ret), 2010 callback.Ref(), 2011 ) 2012 2013 return 2014 } 2015 2016 // TryOffAssistiveWindowButtonClicked calls the function "WEBEXT.input.ime.onAssistiveWindowButtonClicked.removeListener" 2017 // in a try/catch block and returns (_, err, ok = false) when it went through 2018 // the catch clause. 2019 func TryOffAssistiveWindowButtonClicked(callback js.Func[func(details *OnAssistiveWindowButtonClickedArgDetails)]) (ret js.Void, exception js.Any, ok bool) { 2020 ok = js.True == bindings.TryOffAssistiveWindowButtonClicked( 2021 js.Pointer(&ret), js.Pointer(&exception), 2022 callback.Ref(), 2023 ) 2024 2025 return 2026 } 2027 2028 // HasFuncHasOnAssistiveWindowButtonClicked returns true if the function "WEBEXT.input.ime.onAssistiveWindowButtonClicked.hasListener" exists. 2029 func HasFuncHasOnAssistiveWindowButtonClicked() bool { 2030 return js.True == bindings.HasFuncHasOnAssistiveWindowButtonClicked() 2031 } 2032 2033 // FuncHasOnAssistiveWindowButtonClicked returns the function "WEBEXT.input.ime.onAssistiveWindowButtonClicked.hasListener". 2034 func FuncHasOnAssistiveWindowButtonClicked() (fn js.Func[func(callback js.Func[func(details *OnAssistiveWindowButtonClickedArgDetails)]) bool]) { 2035 bindings.FuncHasOnAssistiveWindowButtonClicked( 2036 js.Pointer(&fn), 2037 ) 2038 return 2039 } 2040 2041 // HasOnAssistiveWindowButtonClicked calls the function "WEBEXT.input.ime.onAssistiveWindowButtonClicked.hasListener" directly. 2042 func HasOnAssistiveWindowButtonClicked(callback js.Func[func(details *OnAssistiveWindowButtonClickedArgDetails)]) (ret bool) { 2043 bindings.CallHasOnAssistiveWindowButtonClicked( 2044 js.Pointer(&ret), 2045 callback.Ref(), 2046 ) 2047 2048 return 2049 } 2050 2051 // TryHasOnAssistiveWindowButtonClicked calls the function "WEBEXT.input.ime.onAssistiveWindowButtonClicked.hasListener" 2052 // in a try/catch block and returns (_, err, ok = false) when it went through 2053 // the catch clause. 2054 func TryHasOnAssistiveWindowButtonClicked(callback js.Func[func(details *OnAssistiveWindowButtonClickedArgDetails)]) (ret bool, exception js.Any, ok bool) { 2055 ok = js.True == bindings.TryHasOnAssistiveWindowButtonClicked( 2056 js.Pointer(&ret), js.Pointer(&exception), 2057 callback.Ref(), 2058 ) 2059 2060 return 2061 } 2062 2063 type OnBlurEventCallbackFunc func(this js.Ref, contextID int64) js.Ref 2064 2065 func (fn OnBlurEventCallbackFunc) Register() js.Func[func(contextID int64)] { 2066 return js.RegisterCallback[func(contextID int64)]( 2067 fn, abi.FuncPCABIInternal(fn), 2068 ) 2069 } 2070 2071 func (fn OnBlurEventCallbackFunc) DispatchCallback( 2072 targetPC uintptr, ctx *js.CallbackContext, 2073 ) { 2074 args := ctx.Args() 2075 if len(args) != 1+1 /* js this */ || 2076 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 2077 js.ThrowInvalidCallbackInvocation() 2078 } 2079 2080 if ctx.Return(fn( 2081 args[0], 2082 2083 js.BigInt[int64]{}.FromRef(args[0+1]).Get(), 2084 )) { 2085 return 2086 } 2087 2088 js.ThrowCallbackValueNotReturned() 2089 } 2090 2091 type OnBlurEventCallback[T any] struct { 2092 Fn func(arg T, this js.Ref, contextID int64) js.Ref 2093 Arg T 2094 } 2095 2096 func (cb *OnBlurEventCallback[T]) Register() js.Func[func(contextID int64)] { 2097 return js.RegisterCallback[func(contextID int64)]( 2098 cb, abi.FuncPCABIInternal(cb.Fn), 2099 ) 2100 } 2101 2102 func (cb *OnBlurEventCallback[T]) DispatchCallback( 2103 targetPC uintptr, ctx *js.CallbackContext, 2104 ) { 2105 args := ctx.Args() 2106 if len(args) != 1+1 /* js this */ || 2107 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 2108 js.ThrowInvalidCallbackInvocation() 2109 } 2110 2111 if ctx.Return(cb.Fn( 2112 cb.Arg, 2113 args[0], 2114 2115 js.BigInt[int64]{}.FromRef(args[0+1]).Get(), 2116 )) { 2117 return 2118 } 2119 2120 js.ThrowCallbackValueNotReturned() 2121 } 2122 2123 // HasFuncOnBlur returns true if the function "WEBEXT.input.ime.onBlur.addListener" exists. 2124 func HasFuncOnBlur() bool { 2125 return js.True == bindings.HasFuncOnBlur() 2126 } 2127 2128 // FuncOnBlur returns the function "WEBEXT.input.ime.onBlur.addListener". 2129 func FuncOnBlur() (fn js.Func[func(callback js.Func[func(contextID int64)])]) { 2130 bindings.FuncOnBlur( 2131 js.Pointer(&fn), 2132 ) 2133 return 2134 } 2135 2136 // OnBlur calls the function "WEBEXT.input.ime.onBlur.addListener" directly. 2137 func OnBlur(callback js.Func[func(contextID int64)]) (ret js.Void) { 2138 bindings.CallOnBlur( 2139 js.Pointer(&ret), 2140 callback.Ref(), 2141 ) 2142 2143 return 2144 } 2145 2146 // TryOnBlur calls the function "WEBEXT.input.ime.onBlur.addListener" 2147 // in a try/catch block and returns (_, err, ok = false) when it went through 2148 // the catch clause. 2149 func TryOnBlur(callback js.Func[func(contextID int64)]) (ret js.Void, exception js.Any, ok bool) { 2150 ok = js.True == bindings.TryOnBlur( 2151 js.Pointer(&ret), js.Pointer(&exception), 2152 callback.Ref(), 2153 ) 2154 2155 return 2156 } 2157 2158 // HasFuncOffBlur returns true if the function "WEBEXT.input.ime.onBlur.removeListener" exists. 2159 func HasFuncOffBlur() bool { 2160 return js.True == bindings.HasFuncOffBlur() 2161 } 2162 2163 // FuncOffBlur returns the function "WEBEXT.input.ime.onBlur.removeListener". 2164 func FuncOffBlur() (fn js.Func[func(callback js.Func[func(contextID int64)])]) { 2165 bindings.FuncOffBlur( 2166 js.Pointer(&fn), 2167 ) 2168 return 2169 } 2170 2171 // OffBlur calls the function "WEBEXT.input.ime.onBlur.removeListener" directly. 2172 func OffBlur(callback js.Func[func(contextID int64)]) (ret js.Void) { 2173 bindings.CallOffBlur( 2174 js.Pointer(&ret), 2175 callback.Ref(), 2176 ) 2177 2178 return 2179 } 2180 2181 // TryOffBlur calls the function "WEBEXT.input.ime.onBlur.removeListener" 2182 // in a try/catch block and returns (_, err, ok = false) when it went through 2183 // the catch clause. 2184 func TryOffBlur(callback js.Func[func(contextID int64)]) (ret js.Void, exception js.Any, ok bool) { 2185 ok = js.True == bindings.TryOffBlur( 2186 js.Pointer(&ret), js.Pointer(&exception), 2187 callback.Ref(), 2188 ) 2189 2190 return 2191 } 2192 2193 // HasFuncHasOnBlur returns true if the function "WEBEXT.input.ime.onBlur.hasListener" exists. 2194 func HasFuncHasOnBlur() bool { 2195 return js.True == bindings.HasFuncHasOnBlur() 2196 } 2197 2198 // FuncHasOnBlur returns the function "WEBEXT.input.ime.onBlur.hasListener". 2199 func FuncHasOnBlur() (fn js.Func[func(callback js.Func[func(contextID int64)]) bool]) { 2200 bindings.FuncHasOnBlur( 2201 js.Pointer(&fn), 2202 ) 2203 return 2204 } 2205 2206 // HasOnBlur calls the function "WEBEXT.input.ime.onBlur.hasListener" directly. 2207 func HasOnBlur(callback js.Func[func(contextID int64)]) (ret bool) { 2208 bindings.CallHasOnBlur( 2209 js.Pointer(&ret), 2210 callback.Ref(), 2211 ) 2212 2213 return 2214 } 2215 2216 // TryHasOnBlur calls the function "WEBEXT.input.ime.onBlur.hasListener" 2217 // in a try/catch block and returns (_, err, ok = false) when it went through 2218 // the catch clause. 2219 func TryHasOnBlur(callback js.Func[func(contextID int64)]) (ret bool, exception js.Any, ok bool) { 2220 ok = js.True == bindings.TryHasOnBlur( 2221 js.Pointer(&ret), js.Pointer(&exception), 2222 callback.Ref(), 2223 ) 2224 2225 return 2226 } 2227 2228 type OnCandidateClickedEventCallbackFunc func(this js.Ref, engineID js.String, candidateID int64, button MouseButton) js.Ref 2229 2230 func (fn OnCandidateClickedEventCallbackFunc) Register() js.Func[func(engineID js.String, candidateID int64, button MouseButton)] { 2231 return js.RegisterCallback[func(engineID js.String, candidateID int64, button MouseButton)]( 2232 fn, abi.FuncPCABIInternal(fn), 2233 ) 2234 } 2235 2236 func (fn OnCandidateClickedEventCallbackFunc) DispatchCallback( 2237 targetPC uintptr, ctx *js.CallbackContext, 2238 ) { 2239 args := ctx.Args() 2240 if len(args) != 3+1 /* js this */ || 2241 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 2242 js.ThrowInvalidCallbackInvocation() 2243 } 2244 2245 if ctx.Return(fn( 2246 args[0], 2247 2248 js.String{}.FromRef(args[0+1]), 2249 js.BigInt[int64]{}.FromRef(args[1+1]).Get(), 2250 MouseButton(0).FromRef(args[2+1]), 2251 )) { 2252 return 2253 } 2254 2255 js.ThrowCallbackValueNotReturned() 2256 } 2257 2258 type OnCandidateClickedEventCallback[T any] struct { 2259 Fn func(arg T, this js.Ref, engineID js.String, candidateID int64, button MouseButton) js.Ref 2260 Arg T 2261 } 2262 2263 func (cb *OnCandidateClickedEventCallback[T]) Register() js.Func[func(engineID js.String, candidateID int64, button MouseButton)] { 2264 return js.RegisterCallback[func(engineID js.String, candidateID int64, button MouseButton)]( 2265 cb, abi.FuncPCABIInternal(cb.Fn), 2266 ) 2267 } 2268 2269 func (cb *OnCandidateClickedEventCallback[T]) DispatchCallback( 2270 targetPC uintptr, ctx *js.CallbackContext, 2271 ) { 2272 args := ctx.Args() 2273 if len(args) != 3+1 /* js this */ || 2274 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 2275 js.ThrowInvalidCallbackInvocation() 2276 } 2277 2278 if ctx.Return(cb.Fn( 2279 cb.Arg, 2280 args[0], 2281 2282 js.String{}.FromRef(args[0+1]), 2283 js.BigInt[int64]{}.FromRef(args[1+1]).Get(), 2284 MouseButton(0).FromRef(args[2+1]), 2285 )) { 2286 return 2287 } 2288 2289 js.ThrowCallbackValueNotReturned() 2290 } 2291 2292 // HasFuncOnCandidateClicked returns true if the function "WEBEXT.input.ime.onCandidateClicked.addListener" exists. 2293 func HasFuncOnCandidateClicked() bool { 2294 return js.True == bindings.HasFuncOnCandidateClicked() 2295 } 2296 2297 // FuncOnCandidateClicked returns the function "WEBEXT.input.ime.onCandidateClicked.addListener". 2298 func FuncOnCandidateClicked() (fn js.Func[func(callback js.Func[func(engineID js.String, candidateID int64, button MouseButton)])]) { 2299 bindings.FuncOnCandidateClicked( 2300 js.Pointer(&fn), 2301 ) 2302 return 2303 } 2304 2305 // OnCandidateClicked calls the function "WEBEXT.input.ime.onCandidateClicked.addListener" directly. 2306 func OnCandidateClicked(callback js.Func[func(engineID js.String, candidateID int64, button MouseButton)]) (ret js.Void) { 2307 bindings.CallOnCandidateClicked( 2308 js.Pointer(&ret), 2309 callback.Ref(), 2310 ) 2311 2312 return 2313 } 2314 2315 // TryOnCandidateClicked calls the function "WEBEXT.input.ime.onCandidateClicked.addListener" 2316 // in a try/catch block and returns (_, err, ok = false) when it went through 2317 // the catch clause. 2318 func TryOnCandidateClicked(callback js.Func[func(engineID js.String, candidateID int64, button MouseButton)]) (ret js.Void, exception js.Any, ok bool) { 2319 ok = js.True == bindings.TryOnCandidateClicked( 2320 js.Pointer(&ret), js.Pointer(&exception), 2321 callback.Ref(), 2322 ) 2323 2324 return 2325 } 2326 2327 // HasFuncOffCandidateClicked returns true if the function "WEBEXT.input.ime.onCandidateClicked.removeListener" exists. 2328 func HasFuncOffCandidateClicked() bool { 2329 return js.True == bindings.HasFuncOffCandidateClicked() 2330 } 2331 2332 // FuncOffCandidateClicked returns the function "WEBEXT.input.ime.onCandidateClicked.removeListener". 2333 func FuncOffCandidateClicked() (fn js.Func[func(callback js.Func[func(engineID js.String, candidateID int64, button MouseButton)])]) { 2334 bindings.FuncOffCandidateClicked( 2335 js.Pointer(&fn), 2336 ) 2337 return 2338 } 2339 2340 // OffCandidateClicked calls the function "WEBEXT.input.ime.onCandidateClicked.removeListener" directly. 2341 func OffCandidateClicked(callback js.Func[func(engineID js.String, candidateID int64, button MouseButton)]) (ret js.Void) { 2342 bindings.CallOffCandidateClicked( 2343 js.Pointer(&ret), 2344 callback.Ref(), 2345 ) 2346 2347 return 2348 } 2349 2350 // TryOffCandidateClicked calls the function "WEBEXT.input.ime.onCandidateClicked.removeListener" 2351 // in a try/catch block and returns (_, err, ok = false) when it went through 2352 // the catch clause. 2353 func TryOffCandidateClicked(callback js.Func[func(engineID js.String, candidateID int64, button MouseButton)]) (ret js.Void, exception js.Any, ok bool) { 2354 ok = js.True == bindings.TryOffCandidateClicked( 2355 js.Pointer(&ret), js.Pointer(&exception), 2356 callback.Ref(), 2357 ) 2358 2359 return 2360 } 2361 2362 // HasFuncHasOnCandidateClicked returns true if the function "WEBEXT.input.ime.onCandidateClicked.hasListener" exists. 2363 func HasFuncHasOnCandidateClicked() bool { 2364 return js.True == bindings.HasFuncHasOnCandidateClicked() 2365 } 2366 2367 // FuncHasOnCandidateClicked returns the function "WEBEXT.input.ime.onCandidateClicked.hasListener". 2368 func FuncHasOnCandidateClicked() (fn js.Func[func(callback js.Func[func(engineID js.String, candidateID int64, button MouseButton)]) bool]) { 2369 bindings.FuncHasOnCandidateClicked( 2370 js.Pointer(&fn), 2371 ) 2372 return 2373 } 2374 2375 // HasOnCandidateClicked calls the function "WEBEXT.input.ime.onCandidateClicked.hasListener" directly. 2376 func HasOnCandidateClicked(callback js.Func[func(engineID js.String, candidateID int64, button MouseButton)]) (ret bool) { 2377 bindings.CallHasOnCandidateClicked( 2378 js.Pointer(&ret), 2379 callback.Ref(), 2380 ) 2381 2382 return 2383 } 2384 2385 // TryHasOnCandidateClicked calls the function "WEBEXT.input.ime.onCandidateClicked.hasListener" 2386 // in a try/catch block and returns (_, err, ok = false) when it went through 2387 // the catch clause. 2388 func TryHasOnCandidateClicked(callback js.Func[func(engineID js.String, candidateID int64, button MouseButton)]) (ret bool, exception js.Any, ok bool) { 2389 ok = js.True == bindings.TryHasOnCandidateClicked( 2390 js.Pointer(&ret), js.Pointer(&exception), 2391 callback.Ref(), 2392 ) 2393 2394 return 2395 } 2396 2397 type OnDeactivatedEventCallbackFunc func(this js.Ref, engineID js.String) js.Ref 2398 2399 func (fn OnDeactivatedEventCallbackFunc) Register() js.Func[func(engineID js.String)] { 2400 return js.RegisterCallback[func(engineID js.String)]( 2401 fn, abi.FuncPCABIInternal(fn), 2402 ) 2403 } 2404 2405 func (fn OnDeactivatedEventCallbackFunc) DispatchCallback( 2406 targetPC uintptr, ctx *js.CallbackContext, 2407 ) { 2408 args := ctx.Args() 2409 if len(args) != 1+1 /* js this */ || 2410 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 2411 js.ThrowInvalidCallbackInvocation() 2412 } 2413 2414 if ctx.Return(fn( 2415 args[0], 2416 2417 js.String{}.FromRef(args[0+1]), 2418 )) { 2419 return 2420 } 2421 2422 js.ThrowCallbackValueNotReturned() 2423 } 2424 2425 type OnDeactivatedEventCallback[T any] struct { 2426 Fn func(arg T, this js.Ref, engineID js.String) js.Ref 2427 Arg T 2428 } 2429 2430 func (cb *OnDeactivatedEventCallback[T]) Register() js.Func[func(engineID js.String)] { 2431 return js.RegisterCallback[func(engineID js.String)]( 2432 cb, abi.FuncPCABIInternal(cb.Fn), 2433 ) 2434 } 2435 2436 func (cb *OnDeactivatedEventCallback[T]) DispatchCallback( 2437 targetPC uintptr, ctx *js.CallbackContext, 2438 ) { 2439 args := ctx.Args() 2440 if len(args) != 1+1 /* js this */ || 2441 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 2442 js.ThrowInvalidCallbackInvocation() 2443 } 2444 2445 if ctx.Return(cb.Fn( 2446 cb.Arg, 2447 args[0], 2448 2449 js.String{}.FromRef(args[0+1]), 2450 )) { 2451 return 2452 } 2453 2454 js.ThrowCallbackValueNotReturned() 2455 } 2456 2457 // HasFuncOnDeactivated returns true if the function "WEBEXT.input.ime.onDeactivated.addListener" exists. 2458 func HasFuncOnDeactivated() bool { 2459 return js.True == bindings.HasFuncOnDeactivated() 2460 } 2461 2462 // FuncOnDeactivated returns the function "WEBEXT.input.ime.onDeactivated.addListener". 2463 func FuncOnDeactivated() (fn js.Func[func(callback js.Func[func(engineID js.String)])]) { 2464 bindings.FuncOnDeactivated( 2465 js.Pointer(&fn), 2466 ) 2467 return 2468 } 2469 2470 // OnDeactivated calls the function "WEBEXT.input.ime.onDeactivated.addListener" directly. 2471 func OnDeactivated(callback js.Func[func(engineID js.String)]) (ret js.Void) { 2472 bindings.CallOnDeactivated( 2473 js.Pointer(&ret), 2474 callback.Ref(), 2475 ) 2476 2477 return 2478 } 2479 2480 // TryOnDeactivated calls the function "WEBEXT.input.ime.onDeactivated.addListener" 2481 // in a try/catch block and returns (_, err, ok = false) when it went through 2482 // the catch clause. 2483 func TryOnDeactivated(callback js.Func[func(engineID js.String)]) (ret js.Void, exception js.Any, ok bool) { 2484 ok = js.True == bindings.TryOnDeactivated( 2485 js.Pointer(&ret), js.Pointer(&exception), 2486 callback.Ref(), 2487 ) 2488 2489 return 2490 } 2491 2492 // HasFuncOffDeactivated returns true if the function "WEBEXT.input.ime.onDeactivated.removeListener" exists. 2493 func HasFuncOffDeactivated() bool { 2494 return js.True == bindings.HasFuncOffDeactivated() 2495 } 2496 2497 // FuncOffDeactivated returns the function "WEBEXT.input.ime.onDeactivated.removeListener". 2498 func FuncOffDeactivated() (fn js.Func[func(callback js.Func[func(engineID js.String)])]) { 2499 bindings.FuncOffDeactivated( 2500 js.Pointer(&fn), 2501 ) 2502 return 2503 } 2504 2505 // OffDeactivated calls the function "WEBEXT.input.ime.onDeactivated.removeListener" directly. 2506 func OffDeactivated(callback js.Func[func(engineID js.String)]) (ret js.Void) { 2507 bindings.CallOffDeactivated( 2508 js.Pointer(&ret), 2509 callback.Ref(), 2510 ) 2511 2512 return 2513 } 2514 2515 // TryOffDeactivated calls the function "WEBEXT.input.ime.onDeactivated.removeListener" 2516 // in a try/catch block and returns (_, err, ok = false) when it went through 2517 // the catch clause. 2518 func TryOffDeactivated(callback js.Func[func(engineID js.String)]) (ret js.Void, exception js.Any, ok bool) { 2519 ok = js.True == bindings.TryOffDeactivated( 2520 js.Pointer(&ret), js.Pointer(&exception), 2521 callback.Ref(), 2522 ) 2523 2524 return 2525 } 2526 2527 // HasFuncHasOnDeactivated returns true if the function "WEBEXT.input.ime.onDeactivated.hasListener" exists. 2528 func HasFuncHasOnDeactivated() bool { 2529 return js.True == bindings.HasFuncHasOnDeactivated() 2530 } 2531 2532 // FuncHasOnDeactivated returns the function "WEBEXT.input.ime.onDeactivated.hasListener". 2533 func FuncHasOnDeactivated() (fn js.Func[func(callback js.Func[func(engineID js.String)]) bool]) { 2534 bindings.FuncHasOnDeactivated( 2535 js.Pointer(&fn), 2536 ) 2537 return 2538 } 2539 2540 // HasOnDeactivated calls the function "WEBEXT.input.ime.onDeactivated.hasListener" directly. 2541 func HasOnDeactivated(callback js.Func[func(engineID js.String)]) (ret bool) { 2542 bindings.CallHasOnDeactivated( 2543 js.Pointer(&ret), 2544 callback.Ref(), 2545 ) 2546 2547 return 2548 } 2549 2550 // TryHasOnDeactivated calls the function "WEBEXT.input.ime.onDeactivated.hasListener" 2551 // in a try/catch block and returns (_, err, ok = false) when it went through 2552 // the catch clause. 2553 func TryHasOnDeactivated(callback js.Func[func(engineID js.String)]) (ret bool, exception js.Any, ok bool) { 2554 ok = js.True == bindings.TryHasOnDeactivated( 2555 js.Pointer(&ret), js.Pointer(&exception), 2556 callback.Ref(), 2557 ) 2558 2559 return 2560 } 2561 2562 type OnFocusEventCallbackFunc func(this js.Ref, context *InputContext) js.Ref 2563 2564 func (fn OnFocusEventCallbackFunc) Register() js.Func[func(context *InputContext)] { 2565 return js.RegisterCallback[func(context *InputContext)]( 2566 fn, abi.FuncPCABIInternal(fn), 2567 ) 2568 } 2569 2570 func (fn OnFocusEventCallbackFunc) DispatchCallback( 2571 targetPC uintptr, ctx *js.CallbackContext, 2572 ) { 2573 args := ctx.Args() 2574 if len(args) != 1+1 /* js this */ || 2575 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 2576 js.ThrowInvalidCallbackInvocation() 2577 } 2578 var arg0 InputContext 2579 arg0.UpdateFrom(args[0+1]) 2580 defer arg0.FreeMembers(true) 2581 2582 if ctx.Return(fn( 2583 args[0], 2584 2585 mark.NoEscape(&arg0), 2586 )) { 2587 return 2588 } 2589 2590 js.ThrowCallbackValueNotReturned() 2591 } 2592 2593 type OnFocusEventCallback[T any] struct { 2594 Fn func(arg T, this js.Ref, context *InputContext) js.Ref 2595 Arg T 2596 } 2597 2598 func (cb *OnFocusEventCallback[T]) Register() js.Func[func(context *InputContext)] { 2599 return js.RegisterCallback[func(context *InputContext)]( 2600 cb, abi.FuncPCABIInternal(cb.Fn), 2601 ) 2602 } 2603 2604 func (cb *OnFocusEventCallback[T]) DispatchCallback( 2605 targetPC uintptr, ctx *js.CallbackContext, 2606 ) { 2607 args := ctx.Args() 2608 if len(args) != 1+1 /* js this */ || 2609 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 2610 js.ThrowInvalidCallbackInvocation() 2611 } 2612 var arg0 InputContext 2613 arg0.UpdateFrom(args[0+1]) 2614 defer arg0.FreeMembers(true) 2615 2616 if ctx.Return(cb.Fn( 2617 cb.Arg, 2618 args[0], 2619 2620 mark.NoEscape(&arg0), 2621 )) { 2622 return 2623 } 2624 2625 js.ThrowCallbackValueNotReturned() 2626 } 2627 2628 // HasFuncOnFocus returns true if the function "WEBEXT.input.ime.onFocus.addListener" exists. 2629 func HasFuncOnFocus() bool { 2630 return js.True == bindings.HasFuncOnFocus() 2631 } 2632 2633 // FuncOnFocus returns the function "WEBEXT.input.ime.onFocus.addListener". 2634 func FuncOnFocus() (fn js.Func[func(callback js.Func[func(context *InputContext)])]) { 2635 bindings.FuncOnFocus( 2636 js.Pointer(&fn), 2637 ) 2638 return 2639 } 2640 2641 // OnFocus calls the function "WEBEXT.input.ime.onFocus.addListener" directly. 2642 func OnFocus(callback js.Func[func(context *InputContext)]) (ret js.Void) { 2643 bindings.CallOnFocus( 2644 js.Pointer(&ret), 2645 callback.Ref(), 2646 ) 2647 2648 return 2649 } 2650 2651 // TryOnFocus calls the function "WEBEXT.input.ime.onFocus.addListener" 2652 // in a try/catch block and returns (_, err, ok = false) when it went through 2653 // the catch clause. 2654 func TryOnFocus(callback js.Func[func(context *InputContext)]) (ret js.Void, exception js.Any, ok bool) { 2655 ok = js.True == bindings.TryOnFocus( 2656 js.Pointer(&ret), js.Pointer(&exception), 2657 callback.Ref(), 2658 ) 2659 2660 return 2661 } 2662 2663 // HasFuncOffFocus returns true if the function "WEBEXT.input.ime.onFocus.removeListener" exists. 2664 func HasFuncOffFocus() bool { 2665 return js.True == bindings.HasFuncOffFocus() 2666 } 2667 2668 // FuncOffFocus returns the function "WEBEXT.input.ime.onFocus.removeListener". 2669 func FuncOffFocus() (fn js.Func[func(callback js.Func[func(context *InputContext)])]) { 2670 bindings.FuncOffFocus( 2671 js.Pointer(&fn), 2672 ) 2673 return 2674 } 2675 2676 // OffFocus calls the function "WEBEXT.input.ime.onFocus.removeListener" directly. 2677 func OffFocus(callback js.Func[func(context *InputContext)]) (ret js.Void) { 2678 bindings.CallOffFocus( 2679 js.Pointer(&ret), 2680 callback.Ref(), 2681 ) 2682 2683 return 2684 } 2685 2686 // TryOffFocus calls the function "WEBEXT.input.ime.onFocus.removeListener" 2687 // in a try/catch block and returns (_, err, ok = false) when it went through 2688 // the catch clause. 2689 func TryOffFocus(callback js.Func[func(context *InputContext)]) (ret js.Void, exception js.Any, ok bool) { 2690 ok = js.True == bindings.TryOffFocus( 2691 js.Pointer(&ret), js.Pointer(&exception), 2692 callback.Ref(), 2693 ) 2694 2695 return 2696 } 2697 2698 // HasFuncHasOnFocus returns true if the function "WEBEXT.input.ime.onFocus.hasListener" exists. 2699 func HasFuncHasOnFocus() bool { 2700 return js.True == bindings.HasFuncHasOnFocus() 2701 } 2702 2703 // FuncHasOnFocus returns the function "WEBEXT.input.ime.onFocus.hasListener". 2704 func FuncHasOnFocus() (fn js.Func[func(callback js.Func[func(context *InputContext)]) bool]) { 2705 bindings.FuncHasOnFocus( 2706 js.Pointer(&fn), 2707 ) 2708 return 2709 } 2710 2711 // HasOnFocus calls the function "WEBEXT.input.ime.onFocus.hasListener" directly. 2712 func HasOnFocus(callback js.Func[func(context *InputContext)]) (ret bool) { 2713 bindings.CallHasOnFocus( 2714 js.Pointer(&ret), 2715 callback.Ref(), 2716 ) 2717 2718 return 2719 } 2720 2721 // TryHasOnFocus calls the function "WEBEXT.input.ime.onFocus.hasListener" 2722 // in a try/catch block and returns (_, err, ok = false) when it went through 2723 // the catch clause. 2724 func TryHasOnFocus(callback js.Func[func(context *InputContext)]) (ret bool, exception js.Any, ok bool) { 2725 ok = js.True == bindings.TryHasOnFocus( 2726 js.Pointer(&ret), js.Pointer(&exception), 2727 callback.Ref(), 2728 ) 2729 2730 return 2731 } 2732 2733 type OnInputContextUpdateEventCallbackFunc func(this js.Ref, context *InputContext) js.Ref 2734 2735 func (fn OnInputContextUpdateEventCallbackFunc) Register() js.Func[func(context *InputContext)] { 2736 return js.RegisterCallback[func(context *InputContext)]( 2737 fn, abi.FuncPCABIInternal(fn), 2738 ) 2739 } 2740 2741 func (fn OnInputContextUpdateEventCallbackFunc) DispatchCallback( 2742 targetPC uintptr, ctx *js.CallbackContext, 2743 ) { 2744 args := ctx.Args() 2745 if len(args) != 1+1 /* js this */ || 2746 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 2747 js.ThrowInvalidCallbackInvocation() 2748 } 2749 var arg0 InputContext 2750 arg0.UpdateFrom(args[0+1]) 2751 defer arg0.FreeMembers(true) 2752 2753 if ctx.Return(fn( 2754 args[0], 2755 2756 mark.NoEscape(&arg0), 2757 )) { 2758 return 2759 } 2760 2761 js.ThrowCallbackValueNotReturned() 2762 } 2763 2764 type OnInputContextUpdateEventCallback[T any] struct { 2765 Fn func(arg T, this js.Ref, context *InputContext) js.Ref 2766 Arg T 2767 } 2768 2769 func (cb *OnInputContextUpdateEventCallback[T]) Register() js.Func[func(context *InputContext)] { 2770 return js.RegisterCallback[func(context *InputContext)]( 2771 cb, abi.FuncPCABIInternal(cb.Fn), 2772 ) 2773 } 2774 2775 func (cb *OnInputContextUpdateEventCallback[T]) DispatchCallback( 2776 targetPC uintptr, ctx *js.CallbackContext, 2777 ) { 2778 args := ctx.Args() 2779 if len(args) != 1+1 /* js this */ || 2780 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 2781 js.ThrowInvalidCallbackInvocation() 2782 } 2783 var arg0 InputContext 2784 arg0.UpdateFrom(args[0+1]) 2785 defer arg0.FreeMembers(true) 2786 2787 if ctx.Return(cb.Fn( 2788 cb.Arg, 2789 args[0], 2790 2791 mark.NoEscape(&arg0), 2792 )) { 2793 return 2794 } 2795 2796 js.ThrowCallbackValueNotReturned() 2797 } 2798 2799 // HasFuncOnInputContextUpdate returns true if the function "WEBEXT.input.ime.onInputContextUpdate.addListener" exists. 2800 func HasFuncOnInputContextUpdate() bool { 2801 return js.True == bindings.HasFuncOnInputContextUpdate() 2802 } 2803 2804 // FuncOnInputContextUpdate returns the function "WEBEXT.input.ime.onInputContextUpdate.addListener". 2805 func FuncOnInputContextUpdate() (fn js.Func[func(callback js.Func[func(context *InputContext)])]) { 2806 bindings.FuncOnInputContextUpdate( 2807 js.Pointer(&fn), 2808 ) 2809 return 2810 } 2811 2812 // OnInputContextUpdate calls the function "WEBEXT.input.ime.onInputContextUpdate.addListener" directly. 2813 func OnInputContextUpdate(callback js.Func[func(context *InputContext)]) (ret js.Void) { 2814 bindings.CallOnInputContextUpdate( 2815 js.Pointer(&ret), 2816 callback.Ref(), 2817 ) 2818 2819 return 2820 } 2821 2822 // TryOnInputContextUpdate calls the function "WEBEXT.input.ime.onInputContextUpdate.addListener" 2823 // in a try/catch block and returns (_, err, ok = false) when it went through 2824 // the catch clause. 2825 func TryOnInputContextUpdate(callback js.Func[func(context *InputContext)]) (ret js.Void, exception js.Any, ok bool) { 2826 ok = js.True == bindings.TryOnInputContextUpdate( 2827 js.Pointer(&ret), js.Pointer(&exception), 2828 callback.Ref(), 2829 ) 2830 2831 return 2832 } 2833 2834 // HasFuncOffInputContextUpdate returns true if the function "WEBEXT.input.ime.onInputContextUpdate.removeListener" exists. 2835 func HasFuncOffInputContextUpdate() bool { 2836 return js.True == bindings.HasFuncOffInputContextUpdate() 2837 } 2838 2839 // FuncOffInputContextUpdate returns the function "WEBEXT.input.ime.onInputContextUpdate.removeListener". 2840 func FuncOffInputContextUpdate() (fn js.Func[func(callback js.Func[func(context *InputContext)])]) { 2841 bindings.FuncOffInputContextUpdate( 2842 js.Pointer(&fn), 2843 ) 2844 return 2845 } 2846 2847 // OffInputContextUpdate calls the function "WEBEXT.input.ime.onInputContextUpdate.removeListener" directly. 2848 func OffInputContextUpdate(callback js.Func[func(context *InputContext)]) (ret js.Void) { 2849 bindings.CallOffInputContextUpdate( 2850 js.Pointer(&ret), 2851 callback.Ref(), 2852 ) 2853 2854 return 2855 } 2856 2857 // TryOffInputContextUpdate calls the function "WEBEXT.input.ime.onInputContextUpdate.removeListener" 2858 // in a try/catch block and returns (_, err, ok = false) when it went through 2859 // the catch clause. 2860 func TryOffInputContextUpdate(callback js.Func[func(context *InputContext)]) (ret js.Void, exception js.Any, ok bool) { 2861 ok = js.True == bindings.TryOffInputContextUpdate( 2862 js.Pointer(&ret), js.Pointer(&exception), 2863 callback.Ref(), 2864 ) 2865 2866 return 2867 } 2868 2869 // HasFuncHasOnInputContextUpdate returns true if the function "WEBEXT.input.ime.onInputContextUpdate.hasListener" exists. 2870 func HasFuncHasOnInputContextUpdate() bool { 2871 return js.True == bindings.HasFuncHasOnInputContextUpdate() 2872 } 2873 2874 // FuncHasOnInputContextUpdate returns the function "WEBEXT.input.ime.onInputContextUpdate.hasListener". 2875 func FuncHasOnInputContextUpdate() (fn js.Func[func(callback js.Func[func(context *InputContext)]) bool]) { 2876 bindings.FuncHasOnInputContextUpdate( 2877 js.Pointer(&fn), 2878 ) 2879 return 2880 } 2881 2882 // HasOnInputContextUpdate calls the function "WEBEXT.input.ime.onInputContextUpdate.hasListener" directly. 2883 func HasOnInputContextUpdate(callback js.Func[func(context *InputContext)]) (ret bool) { 2884 bindings.CallHasOnInputContextUpdate( 2885 js.Pointer(&ret), 2886 callback.Ref(), 2887 ) 2888 2889 return 2890 } 2891 2892 // TryHasOnInputContextUpdate calls the function "WEBEXT.input.ime.onInputContextUpdate.hasListener" 2893 // in a try/catch block and returns (_, err, ok = false) when it went through 2894 // the catch clause. 2895 func TryHasOnInputContextUpdate(callback js.Func[func(context *InputContext)]) (ret bool, exception js.Any, ok bool) { 2896 ok = js.True == bindings.TryHasOnInputContextUpdate( 2897 js.Pointer(&ret), js.Pointer(&exception), 2898 callback.Ref(), 2899 ) 2900 2901 return 2902 } 2903 2904 type OnKeyEventEventCallbackFunc func(this js.Ref, engineID js.String, keyData *KeyboardEvent, requestId js.String) js.Ref 2905 2906 func (fn OnKeyEventEventCallbackFunc) Register() js.Func[func(engineID js.String, keyData *KeyboardEvent, requestId js.String) bool] { 2907 return js.RegisterCallback[func(engineID js.String, keyData *KeyboardEvent, requestId js.String) bool]( 2908 fn, abi.FuncPCABIInternal(fn), 2909 ) 2910 } 2911 2912 func (fn OnKeyEventEventCallbackFunc) DispatchCallback( 2913 targetPC uintptr, ctx *js.CallbackContext, 2914 ) { 2915 args := ctx.Args() 2916 if len(args) != 3+1 /* js this */ || 2917 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 2918 js.ThrowInvalidCallbackInvocation() 2919 } 2920 var arg1 KeyboardEvent 2921 arg1.UpdateFrom(args[1+1]) 2922 defer arg1.FreeMembers(true) 2923 2924 if ctx.Return(fn( 2925 args[0], 2926 2927 js.String{}.FromRef(args[0+1]), 2928 mark.NoEscape(&arg1), 2929 js.String{}.FromRef(args[2+1]), 2930 )) { 2931 return 2932 } 2933 2934 js.ThrowCallbackValueNotReturned() 2935 } 2936 2937 type OnKeyEventEventCallback[T any] struct { 2938 Fn func(arg T, this js.Ref, engineID js.String, keyData *KeyboardEvent, requestId js.String) js.Ref 2939 Arg T 2940 } 2941 2942 func (cb *OnKeyEventEventCallback[T]) Register() js.Func[func(engineID js.String, keyData *KeyboardEvent, requestId js.String) bool] { 2943 return js.RegisterCallback[func(engineID js.String, keyData *KeyboardEvent, requestId js.String) bool]( 2944 cb, abi.FuncPCABIInternal(cb.Fn), 2945 ) 2946 } 2947 2948 func (cb *OnKeyEventEventCallback[T]) DispatchCallback( 2949 targetPC uintptr, ctx *js.CallbackContext, 2950 ) { 2951 args := ctx.Args() 2952 if len(args) != 3+1 /* js this */ || 2953 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 2954 js.ThrowInvalidCallbackInvocation() 2955 } 2956 var arg1 KeyboardEvent 2957 arg1.UpdateFrom(args[1+1]) 2958 defer arg1.FreeMembers(true) 2959 2960 if ctx.Return(cb.Fn( 2961 cb.Arg, 2962 args[0], 2963 2964 js.String{}.FromRef(args[0+1]), 2965 mark.NoEscape(&arg1), 2966 js.String{}.FromRef(args[2+1]), 2967 )) { 2968 return 2969 } 2970 2971 js.ThrowCallbackValueNotReturned() 2972 } 2973 2974 // HasFuncOnKeyEvent returns true if the function "WEBEXT.input.ime.onKeyEvent.addListener" exists. 2975 func HasFuncOnKeyEvent() bool { 2976 return js.True == bindings.HasFuncOnKeyEvent() 2977 } 2978 2979 // FuncOnKeyEvent returns the function "WEBEXT.input.ime.onKeyEvent.addListener". 2980 func FuncOnKeyEvent() (fn js.Func[func(callback js.Func[func(engineID js.String, keyData *KeyboardEvent, requestId js.String) bool])]) { 2981 bindings.FuncOnKeyEvent( 2982 js.Pointer(&fn), 2983 ) 2984 return 2985 } 2986 2987 // OnKeyEvent calls the function "WEBEXT.input.ime.onKeyEvent.addListener" directly. 2988 func OnKeyEvent(callback js.Func[func(engineID js.String, keyData *KeyboardEvent, requestId js.String) bool]) (ret js.Void) { 2989 bindings.CallOnKeyEvent( 2990 js.Pointer(&ret), 2991 callback.Ref(), 2992 ) 2993 2994 return 2995 } 2996 2997 // TryOnKeyEvent calls the function "WEBEXT.input.ime.onKeyEvent.addListener" 2998 // in a try/catch block and returns (_, err, ok = false) when it went through 2999 // the catch clause. 3000 func TryOnKeyEvent(callback js.Func[func(engineID js.String, keyData *KeyboardEvent, requestId js.String) bool]) (ret js.Void, exception js.Any, ok bool) { 3001 ok = js.True == bindings.TryOnKeyEvent( 3002 js.Pointer(&ret), js.Pointer(&exception), 3003 callback.Ref(), 3004 ) 3005 3006 return 3007 } 3008 3009 // HasFuncOffKeyEvent returns true if the function "WEBEXT.input.ime.onKeyEvent.removeListener" exists. 3010 func HasFuncOffKeyEvent() bool { 3011 return js.True == bindings.HasFuncOffKeyEvent() 3012 } 3013 3014 // FuncOffKeyEvent returns the function "WEBEXT.input.ime.onKeyEvent.removeListener". 3015 func FuncOffKeyEvent() (fn js.Func[func(callback js.Func[func(engineID js.String, keyData *KeyboardEvent, requestId js.String) bool])]) { 3016 bindings.FuncOffKeyEvent( 3017 js.Pointer(&fn), 3018 ) 3019 return 3020 } 3021 3022 // OffKeyEvent calls the function "WEBEXT.input.ime.onKeyEvent.removeListener" directly. 3023 func OffKeyEvent(callback js.Func[func(engineID js.String, keyData *KeyboardEvent, requestId js.String) bool]) (ret js.Void) { 3024 bindings.CallOffKeyEvent( 3025 js.Pointer(&ret), 3026 callback.Ref(), 3027 ) 3028 3029 return 3030 } 3031 3032 // TryOffKeyEvent calls the function "WEBEXT.input.ime.onKeyEvent.removeListener" 3033 // in a try/catch block and returns (_, err, ok = false) when it went through 3034 // the catch clause. 3035 func TryOffKeyEvent(callback js.Func[func(engineID js.String, keyData *KeyboardEvent, requestId js.String) bool]) (ret js.Void, exception js.Any, ok bool) { 3036 ok = js.True == bindings.TryOffKeyEvent( 3037 js.Pointer(&ret), js.Pointer(&exception), 3038 callback.Ref(), 3039 ) 3040 3041 return 3042 } 3043 3044 // HasFuncHasOnKeyEvent returns true if the function "WEBEXT.input.ime.onKeyEvent.hasListener" exists. 3045 func HasFuncHasOnKeyEvent() bool { 3046 return js.True == bindings.HasFuncHasOnKeyEvent() 3047 } 3048 3049 // FuncHasOnKeyEvent returns the function "WEBEXT.input.ime.onKeyEvent.hasListener". 3050 func FuncHasOnKeyEvent() (fn js.Func[func(callback js.Func[func(engineID js.String, keyData *KeyboardEvent, requestId js.String) bool]) bool]) { 3051 bindings.FuncHasOnKeyEvent( 3052 js.Pointer(&fn), 3053 ) 3054 return 3055 } 3056 3057 // HasOnKeyEvent calls the function "WEBEXT.input.ime.onKeyEvent.hasListener" directly. 3058 func HasOnKeyEvent(callback js.Func[func(engineID js.String, keyData *KeyboardEvent, requestId js.String) bool]) (ret bool) { 3059 bindings.CallHasOnKeyEvent( 3060 js.Pointer(&ret), 3061 callback.Ref(), 3062 ) 3063 3064 return 3065 } 3066 3067 // TryHasOnKeyEvent calls the function "WEBEXT.input.ime.onKeyEvent.hasListener" 3068 // in a try/catch block and returns (_, err, ok = false) when it went through 3069 // the catch clause. 3070 func TryHasOnKeyEvent(callback js.Func[func(engineID js.String, keyData *KeyboardEvent, requestId js.String) bool]) (ret bool, exception js.Any, ok bool) { 3071 ok = js.True == bindings.TryHasOnKeyEvent( 3072 js.Pointer(&ret), js.Pointer(&exception), 3073 callback.Ref(), 3074 ) 3075 3076 return 3077 } 3078 3079 type OnMenuItemActivatedEventCallbackFunc func(this js.Ref, engineID js.String, name js.String) js.Ref 3080 3081 func (fn OnMenuItemActivatedEventCallbackFunc) Register() js.Func[func(engineID js.String, name js.String)] { 3082 return js.RegisterCallback[func(engineID js.String, name js.String)]( 3083 fn, abi.FuncPCABIInternal(fn), 3084 ) 3085 } 3086 3087 func (fn OnMenuItemActivatedEventCallbackFunc) DispatchCallback( 3088 targetPC uintptr, ctx *js.CallbackContext, 3089 ) { 3090 args := ctx.Args() 3091 if len(args) != 2+1 /* js this */ || 3092 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 3093 js.ThrowInvalidCallbackInvocation() 3094 } 3095 3096 if ctx.Return(fn( 3097 args[0], 3098 3099 js.String{}.FromRef(args[0+1]), 3100 js.String{}.FromRef(args[1+1]), 3101 )) { 3102 return 3103 } 3104 3105 js.ThrowCallbackValueNotReturned() 3106 } 3107 3108 type OnMenuItemActivatedEventCallback[T any] struct { 3109 Fn func(arg T, this js.Ref, engineID js.String, name js.String) js.Ref 3110 Arg T 3111 } 3112 3113 func (cb *OnMenuItemActivatedEventCallback[T]) Register() js.Func[func(engineID js.String, name js.String)] { 3114 return js.RegisterCallback[func(engineID js.String, name js.String)]( 3115 cb, abi.FuncPCABIInternal(cb.Fn), 3116 ) 3117 } 3118 3119 func (cb *OnMenuItemActivatedEventCallback[T]) DispatchCallback( 3120 targetPC uintptr, ctx *js.CallbackContext, 3121 ) { 3122 args := ctx.Args() 3123 if len(args) != 2+1 /* js this */ || 3124 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 3125 js.ThrowInvalidCallbackInvocation() 3126 } 3127 3128 if ctx.Return(cb.Fn( 3129 cb.Arg, 3130 args[0], 3131 3132 js.String{}.FromRef(args[0+1]), 3133 js.String{}.FromRef(args[1+1]), 3134 )) { 3135 return 3136 } 3137 3138 js.ThrowCallbackValueNotReturned() 3139 } 3140 3141 // HasFuncOnMenuItemActivated returns true if the function "WEBEXT.input.ime.onMenuItemActivated.addListener" exists. 3142 func HasFuncOnMenuItemActivated() bool { 3143 return js.True == bindings.HasFuncOnMenuItemActivated() 3144 } 3145 3146 // FuncOnMenuItemActivated returns the function "WEBEXT.input.ime.onMenuItemActivated.addListener". 3147 func FuncOnMenuItemActivated() (fn js.Func[func(callback js.Func[func(engineID js.String, name js.String)])]) { 3148 bindings.FuncOnMenuItemActivated( 3149 js.Pointer(&fn), 3150 ) 3151 return 3152 } 3153 3154 // OnMenuItemActivated calls the function "WEBEXT.input.ime.onMenuItemActivated.addListener" directly. 3155 func OnMenuItemActivated(callback js.Func[func(engineID js.String, name js.String)]) (ret js.Void) { 3156 bindings.CallOnMenuItemActivated( 3157 js.Pointer(&ret), 3158 callback.Ref(), 3159 ) 3160 3161 return 3162 } 3163 3164 // TryOnMenuItemActivated calls the function "WEBEXT.input.ime.onMenuItemActivated.addListener" 3165 // in a try/catch block and returns (_, err, ok = false) when it went through 3166 // the catch clause. 3167 func TryOnMenuItemActivated(callback js.Func[func(engineID js.String, name js.String)]) (ret js.Void, exception js.Any, ok bool) { 3168 ok = js.True == bindings.TryOnMenuItemActivated( 3169 js.Pointer(&ret), js.Pointer(&exception), 3170 callback.Ref(), 3171 ) 3172 3173 return 3174 } 3175 3176 // HasFuncOffMenuItemActivated returns true if the function "WEBEXT.input.ime.onMenuItemActivated.removeListener" exists. 3177 func HasFuncOffMenuItemActivated() bool { 3178 return js.True == bindings.HasFuncOffMenuItemActivated() 3179 } 3180 3181 // FuncOffMenuItemActivated returns the function "WEBEXT.input.ime.onMenuItemActivated.removeListener". 3182 func FuncOffMenuItemActivated() (fn js.Func[func(callback js.Func[func(engineID js.String, name js.String)])]) { 3183 bindings.FuncOffMenuItemActivated( 3184 js.Pointer(&fn), 3185 ) 3186 return 3187 } 3188 3189 // OffMenuItemActivated calls the function "WEBEXT.input.ime.onMenuItemActivated.removeListener" directly. 3190 func OffMenuItemActivated(callback js.Func[func(engineID js.String, name js.String)]) (ret js.Void) { 3191 bindings.CallOffMenuItemActivated( 3192 js.Pointer(&ret), 3193 callback.Ref(), 3194 ) 3195 3196 return 3197 } 3198 3199 // TryOffMenuItemActivated calls the function "WEBEXT.input.ime.onMenuItemActivated.removeListener" 3200 // in a try/catch block and returns (_, err, ok = false) when it went through 3201 // the catch clause. 3202 func TryOffMenuItemActivated(callback js.Func[func(engineID js.String, name js.String)]) (ret js.Void, exception js.Any, ok bool) { 3203 ok = js.True == bindings.TryOffMenuItemActivated( 3204 js.Pointer(&ret), js.Pointer(&exception), 3205 callback.Ref(), 3206 ) 3207 3208 return 3209 } 3210 3211 // HasFuncHasOnMenuItemActivated returns true if the function "WEBEXT.input.ime.onMenuItemActivated.hasListener" exists. 3212 func HasFuncHasOnMenuItemActivated() bool { 3213 return js.True == bindings.HasFuncHasOnMenuItemActivated() 3214 } 3215 3216 // FuncHasOnMenuItemActivated returns the function "WEBEXT.input.ime.onMenuItemActivated.hasListener". 3217 func FuncHasOnMenuItemActivated() (fn js.Func[func(callback js.Func[func(engineID js.String, name js.String)]) bool]) { 3218 bindings.FuncHasOnMenuItemActivated( 3219 js.Pointer(&fn), 3220 ) 3221 return 3222 } 3223 3224 // HasOnMenuItemActivated calls the function "WEBEXT.input.ime.onMenuItemActivated.hasListener" directly. 3225 func HasOnMenuItemActivated(callback js.Func[func(engineID js.String, name js.String)]) (ret bool) { 3226 bindings.CallHasOnMenuItemActivated( 3227 js.Pointer(&ret), 3228 callback.Ref(), 3229 ) 3230 3231 return 3232 } 3233 3234 // TryHasOnMenuItemActivated calls the function "WEBEXT.input.ime.onMenuItemActivated.hasListener" 3235 // in a try/catch block and returns (_, err, ok = false) when it went through 3236 // the catch clause. 3237 func TryHasOnMenuItemActivated(callback js.Func[func(engineID js.String, name js.String)]) (ret bool, exception js.Any, ok bool) { 3238 ok = js.True == bindings.TryHasOnMenuItemActivated( 3239 js.Pointer(&ret), js.Pointer(&exception), 3240 callback.Ref(), 3241 ) 3242 3243 return 3244 } 3245 3246 type OnResetEventCallbackFunc func(this js.Ref, engineID js.String) js.Ref 3247 3248 func (fn OnResetEventCallbackFunc) Register() js.Func[func(engineID js.String)] { 3249 return js.RegisterCallback[func(engineID js.String)]( 3250 fn, abi.FuncPCABIInternal(fn), 3251 ) 3252 } 3253 3254 func (fn OnResetEventCallbackFunc) DispatchCallback( 3255 targetPC uintptr, ctx *js.CallbackContext, 3256 ) { 3257 args := ctx.Args() 3258 if len(args) != 1+1 /* js this */ || 3259 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 3260 js.ThrowInvalidCallbackInvocation() 3261 } 3262 3263 if ctx.Return(fn( 3264 args[0], 3265 3266 js.String{}.FromRef(args[0+1]), 3267 )) { 3268 return 3269 } 3270 3271 js.ThrowCallbackValueNotReturned() 3272 } 3273 3274 type OnResetEventCallback[T any] struct { 3275 Fn func(arg T, this js.Ref, engineID js.String) js.Ref 3276 Arg T 3277 } 3278 3279 func (cb *OnResetEventCallback[T]) Register() js.Func[func(engineID js.String)] { 3280 return js.RegisterCallback[func(engineID js.String)]( 3281 cb, abi.FuncPCABIInternal(cb.Fn), 3282 ) 3283 } 3284 3285 func (cb *OnResetEventCallback[T]) DispatchCallback( 3286 targetPC uintptr, ctx *js.CallbackContext, 3287 ) { 3288 args := ctx.Args() 3289 if len(args) != 1+1 /* js this */ || 3290 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 3291 js.ThrowInvalidCallbackInvocation() 3292 } 3293 3294 if ctx.Return(cb.Fn( 3295 cb.Arg, 3296 args[0], 3297 3298 js.String{}.FromRef(args[0+1]), 3299 )) { 3300 return 3301 } 3302 3303 js.ThrowCallbackValueNotReturned() 3304 } 3305 3306 // HasFuncOnReset returns true if the function "WEBEXT.input.ime.onReset.addListener" exists. 3307 func HasFuncOnReset() bool { 3308 return js.True == bindings.HasFuncOnReset() 3309 } 3310 3311 // FuncOnReset returns the function "WEBEXT.input.ime.onReset.addListener". 3312 func FuncOnReset() (fn js.Func[func(callback js.Func[func(engineID js.String)])]) { 3313 bindings.FuncOnReset( 3314 js.Pointer(&fn), 3315 ) 3316 return 3317 } 3318 3319 // OnReset calls the function "WEBEXT.input.ime.onReset.addListener" directly. 3320 func OnReset(callback js.Func[func(engineID js.String)]) (ret js.Void) { 3321 bindings.CallOnReset( 3322 js.Pointer(&ret), 3323 callback.Ref(), 3324 ) 3325 3326 return 3327 } 3328 3329 // TryOnReset calls the function "WEBEXT.input.ime.onReset.addListener" 3330 // in a try/catch block and returns (_, err, ok = false) when it went through 3331 // the catch clause. 3332 func TryOnReset(callback js.Func[func(engineID js.String)]) (ret js.Void, exception js.Any, ok bool) { 3333 ok = js.True == bindings.TryOnReset( 3334 js.Pointer(&ret), js.Pointer(&exception), 3335 callback.Ref(), 3336 ) 3337 3338 return 3339 } 3340 3341 // HasFuncOffReset returns true if the function "WEBEXT.input.ime.onReset.removeListener" exists. 3342 func HasFuncOffReset() bool { 3343 return js.True == bindings.HasFuncOffReset() 3344 } 3345 3346 // FuncOffReset returns the function "WEBEXT.input.ime.onReset.removeListener". 3347 func FuncOffReset() (fn js.Func[func(callback js.Func[func(engineID js.String)])]) { 3348 bindings.FuncOffReset( 3349 js.Pointer(&fn), 3350 ) 3351 return 3352 } 3353 3354 // OffReset calls the function "WEBEXT.input.ime.onReset.removeListener" directly. 3355 func OffReset(callback js.Func[func(engineID js.String)]) (ret js.Void) { 3356 bindings.CallOffReset( 3357 js.Pointer(&ret), 3358 callback.Ref(), 3359 ) 3360 3361 return 3362 } 3363 3364 // TryOffReset calls the function "WEBEXT.input.ime.onReset.removeListener" 3365 // in a try/catch block and returns (_, err, ok = false) when it went through 3366 // the catch clause. 3367 func TryOffReset(callback js.Func[func(engineID js.String)]) (ret js.Void, exception js.Any, ok bool) { 3368 ok = js.True == bindings.TryOffReset( 3369 js.Pointer(&ret), js.Pointer(&exception), 3370 callback.Ref(), 3371 ) 3372 3373 return 3374 } 3375 3376 // HasFuncHasOnReset returns true if the function "WEBEXT.input.ime.onReset.hasListener" exists. 3377 func HasFuncHasOnReset() bool { 3378 return js.True == bindings.HasFuncHasOnReset() 3379 } 3380 3381 // FuncHasOnReset returns the function "WEBEXT.input.ime.onReset.hasListener". 3382 func FuncHasOnReset() (fn js.Func[func(callback js.Func[func(engineID js.String)]) bool]) { 3383 bindings.FuncHasOnReset( 3384 js.Pointer(&fn), 3385 ) 3386 return 3387 } 3388 3389 // HasOnReset calls the function "WEBEXT.input.ime.onReset.hasListener" directly. 3390 func HasOnReset(callback js.Func[func(engineID js.String)]) (ret bool) { 3391 bindings.CallHasOnReset( 3392 js.Pointer(&ret), 3393 callback.Ref(), 3394 ) 3395 3396 return 3397 } 3398 3399 // TryHasOnReset calls the function "WEBEXT.input.ime.onReset.hasListener" 3400 // in a try/catch block and returns (_, err, ok = false) when it went through 3401 // the catch clause. 3402 func TryHasOnReset(callback js.Func[func(engineID js.String)]) (ret bool, exception js.Any, ok bool) { 3403 ok = js.True == bindings.TryHasOnReset( 3404 js.Pointer(&ret), js.Pointer(&exception), 3405 callback.Ref(), 3406 ) 3407 3408 return 3409 } 3410 3411 type OnSurroundingTextChangedEventCallbackFunc func(this js.Ref, engineID js.String, surroundingInfo *OnSurroundingTextChangedArgSurroundingInfo) js.Ref 3412 3413 func (fn OnSurroundingTextChangedEventCallbackFunc) Register() js.Func[func(engineID js.String, surroundingInfo *OnSurroundingTextChangedArgSurroundingInfo)] { 3414 return js.RegisterCallback[func(engineID js.String, surroundingInfo *OnSurroundingTextChangedArgSurroundingInfo)]( 3415 fn, abi.FuncPCABIInternal(fn), 3416 ) 3417 } 3418 3419 func (fn OnSurroundingTextChangedEventCallbackFunc) DispatchCallback( 3420 targetPC uintptr, ctx *js.CallbackContext, 3421 ) { 3422 args := ctx.Args() 3423 if len(args) != 2+1 /* js this */ || 3424 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 3425 js.ThrowInvalidCallbackInvocation() 3426 } 3427 var arg1 OnSurroundingTextChangedArgSurroundingInfo 3428 arg1.UpdateFrom(args[1+1]) 3429 defer arg1.FreeMembers(true) 3430 3431 if ctx.Return(fn( 3432 args[0], 3433 3434 js.String{}.FromRef(args[0+1]), 3435 mark.NoEscape(&arg1), 3436 )) { 3437 return 3438 } 3439 3440 js.ThrowCallbackValueNotReturned() 3441 } 3442 3443 type OnSurroundingTextChangedEventCallback[T any] struct { 3444 Fn func(arg T, this js.Ref, engineID js.String, surroundingInfo *OnSurroundingTextChangedArgSurroundingInfo) js.Ref 3445 Arg T 3446 } 3447 3448 func (cb *OnSurroundingTextChangedEventCallback[T]) Register() js.Func[func(engineID js.String, surroundingInfo *OnSurroundingTextChangedArgSurroundingInfo)] { 3449 return js.RegisterCallback[func(engineID js.String, surroundingInfo *OnSurroundingTextChangedArgSurroundingInfo)]( 3450 cb, abi.FuncPCABIInternal(cb.Fn), 3451 ) 3452 } 3453 3454 func (cb *OnSurroundingTextChangedEventCallback[T]) DispatchCallback( 3455 targetPC uintptr, ctx *js.CallbackContext, 3456 ) { 3457 args := ctx.Args() 3458 if len(args) != 2+1 /* js this */ || 3459 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 3460 js.ThrowInvalidCallbackInvocation() 3461 } 3462 var arg1 OnSurroundingTextChangedArgSurroundingInfo 3463 arg1.UpdateFrom(args[1+1]) 3464 defer arg1.FreeMembers(true) 3465 3466 if ctx.Return(cb.Fn( 3467 cb.Arg, 3468 args[0], 3469 3470 js.String{}.FromRef(args[0+1]), 3471 mark.NoEscape(&arg1), 3472 )) { 3473 return 3474 } 3475 3476 js.ThrowCallbackValueNotReturned() 3477 } 3478 3479 // HasFuncOnSurroundingTextChanged returns true if the function "WEBEXT.input.ime.onSurroundingTextChanged.addListener" exists. 3480 func HasFuncOnSurroundingTextChanged() bool { 3481 return js.True == bindings.HasFuncOnSurroundingTextChanged() 3482 } 3483 3484 // FuncOnSurroundingTextChanged returns the function "WEBEXT.input.ime.onSurroundingTextChanged.addListener". 3485 func FuncOnSurroundingTextChanged() (fn js.Func[func(callback js.Func[func(engineID js.String, surroundingInfo *OnSurroundingTextChangedArgSurroundingInfo)])]) { 3486 bindings.FuncOnSurroundingTextChanged( 3487 js.Pointer(&fn), 3488 ) 3489 return 3490 } 3491 3492 // OnSurroundingTextChanged calls the function "WEBEXT.input.ime.onSurroundingTextChanged.addListener" directly. 3493 func OnSurroundingTextChanged(callback js.Func[func(engineID js.String, surroundingInfo *OnSurroundingTextChangedArgSurroundingInfo)]) (ret js.Void) { 3494 bindings.CallOnSurroundingTextChanged( 3495 js.Pointer(&ret), 3496 callback.Ref(), 3497 ) 3498 3499 return 3500 } 3501 3502 // TryOnSurroundingTextChanged calls the function "WEBEXT.input.ime.onSurroundingTextChanged.addListener" 3503 // in a try/catch block and returns (_, err, ok = false) when it went through 3504 // the catch clause. 3505 func TryOnSurroundingTextChanged(callback js.Func[func(engineID js.String, surroundingInfo *OnSurroundingTextChangedArgSurroundingInfo)]) (ret js.Void, exception js.Any, ok bool) { 3506 ok = js.True == bindings.TryOnSurroundingTextChanged( 3507 js.Pointer(&ret), js.Pointer(&exception), 3508 callback.Ref(), 3509 ) 3510 3511 return 3512 } 3513 3514 // HasFuncOffSurroundingTextChanged returns true if the function "WEBEXT.input.ime.onSurroundingTextChanged.removeListener" exists. 3515 func HasFuncOffSurroundingTextChanged() bool { 3516 return js.True == bindings.HasFuncOffSurroundingTextChanged() 3517 } 3518 3519 // FuncOffSurroundingTextChanged returns the function "WEBEXT.input.ime.onSurroundingTextChanged.removeListener". 3520 func FuncOffSurroundingTextChanged() (fn js.Func[func(callback js.Func[func(engineID js.String, surroundingInfo *OnSurroundingTextChangedArgSurroundingInfo)])]) { 3521 bindings.FuncOffSurroundingTextChanged( 3522 js.Pointer(&fn), 3523 ) 3524 return 3525 } 3526 3527 // OffSurroundingTextChanged calls the function "WEBEXT.input.ime.onSurroundingTextChanged.removeListener" directly. 3528 func OffSurroundingTextChanged(callback js.Func[func(engineID js.String, surroundingInfo *OnSurroundingTextChangedArgSurroundingInfo)]) (ret js.Void) { 3529 bindings.CallOffSurroundingTextChanged( 3530 js.Pointer(&ret), 3531 callback.Ref(), 3532 ) 3533 3534 return 3535 } 3536 3537 // TryOffSurroundingTextChanged calls the function "WEBEXT.input.ime.onSurroundingTextChanged.removeListener" 3538 // in a try/catch block and returns (_, err, ok = false) when it went through 3539 // the catch clause. 3540 func TryOffSurroundingTextChanged(callback js.Func[func(engineID js.String, surroundingInfo *OnSurroundingTextChangedArgSurroundingInfo)]) (ret js.Void, exception js.Any, ok bool) { 3541 ok = js.True == bindings.TryOffSurroundingTextChanged( 3542 js.Pointer(&ret), js.Pointer(&exception), 3543 callback.Ref(), 3544 ) 3545 3546 return 3547 } 3548 3549 // HasFuncHasOnSurroundingTextChanged returns true if the function "WEBEXT.input.ime.onSurroundingTextChanged.hasListener" exists. 3550 func HasFuncHasOnSurroundingTextChanged() bool { 3551 return js.True == bindings.HasFuncHasOnSurroundingTextChanged() 3552 } 3553 3554 // FuncHasOnSurroundingTextChanged returns the function "WEBEXT.input.ime.onSurroundingTextChanged.hasListener". 3555 func FuncHasOnSurroundingTextChanged() (fn js.Func[func(callback js.Func[func(engineID js.String, surroundingInfo *OnSurroundingTextChangedArgSurroundingInfo)]) bool]) { 3556 bindings.FuncHasOnSurroundingTextChanged( 3557 js.Pointer(&fn), 3558 ) 3559 return 3560 } 3561 3562 // HasOnSurroundingTextChanged calls the function "WEBEXT.input.ime.onSurroundingTextChanged.hasListener" directly. 3563 func HasOnSurroundingTextChanged(callback js.Func[func(engineID js.String, surroundingInfo *OnSurroundingTextChangedArgSurroundingInfo)]) (ret bool) { 3564 bindings.CallHasOnSurroundingTextChanged( 3565 js.Pointer(&ret), 3566 callback.Ref(), 3567 ) 3568 3569 return 3570 } 3571 3572 // TryHasOnSurroundingTextChanged calls the function "WEBEXT.input.ime.onSurroundingTextChanged.hasListener" 3573 // in a try/catch block and returns (_, err, ok = false) when it went through 3574 // the catch clause. 3575 func TryHasOnSurroundingTextChanged(callback js.Func[func(engineID js.String, surroundingInfo *OnSurroundingTextChangedArgSurroundingInfo)]) (ret bool, exception js.Any, ok bool) { 3576 ok = js.True == bindings.TryHasOnSurroundingTextChanged( 3577 js.Pointer(&ret), js.Pointer(&exception), 3578 callback.Ref(), 3579 ) 3580 3581 return 3582 } 3583 3584 // HasFuncSendKeyEvents returns true if the function "WEBEXT.input.ime.sendKeyEvents" exists. 3585 func HasFuncSendKeyEvents() bool { 3586 return js.True == bindings.HasFuncSendKeyEvents() 3587 } 3588 3589 // FuncSendKeyEvents returns the function "WEBEXT.input.ime.sendKeyEvents". 3590 func FuncSendKeyEvents() (fn js.Func[func(parameters SendKeyEventsArgParameters) js.Promise[js.Void]]) { 3591 bindings.FuncSendKeyEvents( 3592 js.Pointer(&fn), 3593 ) 3594 return 3595 } 3596 3597 // SendKeyEvents calls the function "WEBEXT.input.ime.sendKeyEvents" directly. 3598 func SendKeyEvents(parameters SendKeyEventsArgParameters) (ret js.Promise[js.Void]) { 3599 bindings.CallSendKeyEvents( 3600 js.Pointer(&ret), 3601 js.Pointer(¶meters), 3602 ) 3603 3604 return 3605 } 3606 3607 // TrySendKeyEvents calls the function "WEBEXT.input.ime.sendKeyEvents" 3608 // in a try/catch block and returns (_, err, ok = false) when it went through 3609 // the catch clause. 3610 func TrySendKeyEvents(parameters SendKeyEventsArgParameters) (ret js.Promise[js.Void], exception js.Any, ok bool) { 3611 ok = js.True == bindings.TrySendKeyEvents( 3612 js.Pointer(&ret), js.Pointer(&exception), 3613 js.Pointer(¶meters), 3614 ) 3615 3616 return 3617 } 3618 3619 // HasFuncSetAssistiveWindowButtonHighlighted returns true if the function "WEBEXT.input.ime.setAssistiveWindowButtonHighlighted" exists. 3620 func HasFuncSetAssistiveWindowButtonHighlighted() bool { 3621 return js.True == bindings.HasFuncSetAssistiveWindowButtonHighlighted() 3622 } 3623 3624 // FuncSetAssistiveWindowButtonHighlighted returns the function "WEBEXT.input.ime.setAssistiveWindowButtonHighlighted". 3625 func FuncSetAssistiveWindowButtonHighlighted() (fn js.Func[func(parameters SetAssistiveWindowButtonHighlightedArgParameters) js.Promise[js.Void]]) { 3626 bindings.FuncSetAssistiveWindowButtonHighlighted( 3627 js.Pointer(&fn), 3628 ) 3629 return 3630 } 3631 3632 // SetAssistiveWindowButtonHighlighted calls the function "WEBEXT.input.ime.setAssistiveWindowButtonHighlighted" directly. 3633 func SetAssistiveWindowButtonHighlighted(parameters SetAssistiveWindowButtonHighlightedArgParameters) (ret js.Promise[js.Void]) { 3634 bindings.CallSetAssistiveWindowButtonHighlighted( 3635 js.Pointer(&ret), 3636 js.Pointer(¶meters), 3637 ) 3638 3639 return 3640 } 3641 3642 // TrySetAssistiveWindowButtonHighlighted calls the function "WEBEXT.input.ime.setAssistiveWindowButtonHighlighted" 3643 // in a try/catch block and returns (_, err, ok = false) when it went through 3644 // the catch clause. 3645 func TrySetAssistiveWindowButtonHighlighted(parameters SetAssistiveWindowButtonHighlightedArgParameters) (ret js.Promise[js.Void], exception js.Any, ok bool) { 3646 ok = js.True == bindings.TrySetAssistiveWindowButtonHighlighted( 3647 js.Pointer(&ret), js.Pointer(&exception), 3648 js.Pointer(¶meters), 3649 ) 3650 3651 return 3652 } 3653 3654 // HasFuncSetAssistiveWindowProperties returns true if the function "WEBEXT.input.ime.setAssistiveWindowProperties" exists. 3655 func HasFuncSetAssistiveWindowProperties() bool { 3656 return js.True == bindings.HasFuncSetAssistiveWindowProperties() 3657 } 3658 3659 // FuncSetAssistiveWindowProperties returns the function "WEBEXT.input.ime.setAssistiveWindowProperties". 3660 func FuncSetAssistiveWindowProperties() (fn js.Func[func(parameters SetAssistiveWindowPropertiesArgParameters) js.Promise[js.Boolean]]) { 3661 bindings.FuncSetAssistiveWindowProperties( 3662 js.Pointer(&fn), 3663 ) 3664 return 3665 } 3666 3667 // SetAssistiveWindowProperties calls the function "WEBEXT.input.ime.setAssistiveWindowProperties" directly. 3668 func SetAssistiveWindowProperties(parameters SetAssistiveWindowPropertiesArgParameters) (ret js.Promise[js.Boolean]) { 3669 bindings.CallSetAssistiveWindowProperties( 3670 js.Pointer(&ret), 3671 js.Pointer(¶meters), 3672 ) 3673 3674 return 3675 } 3676 3677 // TrySetAssistiveWindowProperties calls the function "WEBEXT.input.ime.setAssistiveWindowProperties" 3678 // in a try/catch block and returns (_, err, ok = false) when it went through 3679 // the catch clause. 3680 func TrySetAssistiveWindowProperties(parameters SetAssistiveWindowPropertiesArgParameters) (ret js.Promise[js.Boolean], exception js.Any, ok bool) { 3681 ok = js.True == bindings.TrySetAssistiveWindowProperties( 3682 js.Pointer(&ret), js.Pointer(&exception), 3683 js.Pointer(¶meters), 3684 ) 3685 3686 return 3687 } 3688 3689 // HasFuncSetCandidateWindowProperties returns true if the function "WEBEXT.input.ime.setCandidateWindowProperties" exists. 3690 func HasFuncSetCandidateWindowProperties() bool { 3691 return js.True == bindings.HasFuncSetCandidateWindowProperties() 3692 } 3693 3694 // FuncSetCandidateWindowProperties returns the function "WEBEXT.input.ime.setCandidateWindowProperties". 3695 func FuncSetCandidateWindowProperties() (fn js.Func[func(parameters SetCandidateWindowPropertiesArgParameters) js.Promise[js.Boolean]]) { 3696 bindings.FuncSetCandidateWindowProperties( 3697 js.Pointer(&fn), 3698 ) 3699 return 3700 } 3701 3702 // SetCandidateWindowProperties calls the function "WEBEXT.input.ime.setCandidateWindowProperties" directly. 3703 func SetCandidateWindowProperties(parameters SetCandidateWindowPropertiesArgParameters) (ret js.Promise[js.Boolean]) { 3704 bindings.CallSetCandidateWindowProperties( 3705 js.Pointer(&ret), 3706 js.Pointer(¶meters), 3707 ) 3708 3709 return 3710 } 3711 3712 // TrySetCandidateWindowProperties calls the function "WEBEXT.input.ime.setCandidateWindowProperties" 3713 // in a try/catch block and returns (_, err, ok = false) when it went through 3714 // the catch clause. 3715 func TrySetCandidateWindowProperties(parameters SetCandidateWindowPropertiesArgParameters) (ret js.Promise[js.Boolean], exception js.Any, ok bool) { 3716 ok = js.True == bindings.TrySetCandidateWindowProperties( 3717 js.Pointer(&ret), js.Pointer(&exception), 3718 js.Pointer(¶meters), 3719 ) 3720 3721 return 3722 } 3723 3724 // HasFuncSetCandidates returns true if the function "WEBEXT.input.ime.setCandidates" exists. 3725 func HasFuncSetCandidates() bool { 3726 return js.True == bindings.HasFuncSetCandidates() 3727 } 3728 3729 // FuncSetCandidates returns the function "WEBEXT.input.ime.setCandidates". 3730 func FuncSetCandidates() (fn js.Func[func(parameters SetCandidatesArgParameters) js.Promise[js.Boolean]]) { 3731 bindings.FuncSetCandidates( 3732 js.Pointer(&fn), 3733 ) 3734 return 3735 } 3736 3737 // SetCandidates calls the function "WEBEXT.input.ime.setCandidates" directly. 3738 func SetCandidates(parameters SetCandidatesArgParameters) (ret js.Promise[js.Boolean]) { 3739 bindings.CallSetCandidates( 3740 js.Pointer(&ret), 3741 js.Pointer(¶meters), 3742 ) 3743 3744 return 3745 } 3746 3747 // TrySetCandidates calls the function "WEBEXT.input.ime.setCandidates" 3748 // in a try/catch block and returns (_, err, ok = false) when it went through 3749 // the catch clause. 3750 func TrySetCandidates(parameters SetCandidatesArgParameters) (ret js.Promise[js.Boolean], exception js.Any, ok bool) { 3751 ok = js.True == bindings.TrySetCandidates( 3752 js.Pointer(&ret), js.Pointer(&exception), 3753 js.Pointer(¶meters), 3754 ) 3755 3756 return 3757 } 3758 3759 // HasFuncSetComposition returns true if the function "WEBEXT.input.ime.setComposition" exists. 3760 func HasFuncSetComposition() bool { 3761 return js.True == bindings.HasFuncSetComposition() 3762 } 3763 3764 // FuncSetComposition returns the function "WEBEXT.input.ime.setComposition". 3765 func FuncSetComposition() (fn js.Func[func(parameters SetCompositionArgParameters) js.Promise[js.Boolean]]) { 3766 bindings.FuncSetComposition( 3767 js.Pointer(&fn), 3768 ) 3769 return 3770 } 3771 3772 // SetComposition calls the function "WEBEXT.input.ime.setComposition" directly. 3773 func SetComposition(parameters SetCompositionArgParameters) (ret js.Promise[js.Boolean]) { 3774 bindings.CallSetComposition( 3775 js.Pointer(&ret), 3776 js.Pointer(¶meters), 3777 ) 3778 3779 return 3780 } 3781 3782 // TrySetComposition calls the function "WEBEXT.input.ime.setComposition" 3783 // in a try/catch block and returns (_, err, ok = false) when it went through 3784 // the catch clause. 3785 func TrySetComposition(parameters SetCompositionArgParameters) (ret js.Promise[js.Boolean], exception js.Any, ok bool) { 3786 ok = js.True == bindings.TrySetComposition( 3787 js.Pointer(&ret), js.Pointer(&exception), 3788 js.Pointer(¶meters), 3789 ) 3790 3791 return 3792 } 3793 3794 // HasFuncSetCursorPosition returns true if the function "WEBEXT.input.ime.setCursorPosition" exists. 3795 func HasFuncSetCursorPosition() bool { 3796 return js.True == bindings.HasFuncSetCursorPosition() 3797 } 3798 3799 // FuncSetCursorPosition returns the function "WEBEXT.input.ime.setCursorPosition". 3800 func FuncSetCursorPosition() (fn js.Func[func(parameters SetCursorPositionArgParameters) js.Promise[js.Boolean]]) { 3801 bindings.FuncSetCursorPosition( 3802 js.Pointer(&fn), 3803 ) 3804 return 3805 } 3806 3807 // SetCursorPosition calls the function "WEBEXT.input.ime.setCursorPosition" directly. 3808 func SetCursorPosition(parameters SetCursorPositionArgParameters) (ret js.Promise[js.Boolean]) { 3809 bindings.CallSetCursorPosition( 3810 js.Pointer(&ret), 3811 js.Pointer(¶meters), 3812 ) 3813 3814 return 3815 } 3816 3817 // TrySetCursorPosition calls the function "WEBEXT.input.ime.setCursorPosition" 3818 // in a try/catch block and returns (_, err, ok = false) when it went through 3819 // the catch clause. 3820 func TrySetCursorPosition(parameters SetCursorPositionArgParameters) (ret js.Promise[js.Boolean], exception js.Any, ok bool) { 3821 ok = js.True == bindings.TrySetCursorPosition( 3822 js.Pointer(&ret), js.Pointer(&exception), 3823 js.Pointer(¶meters), 3824 ) 3825 3826 return 3827 } 3828 3829 // HasFuncSetMenuItems returns true if the function "WEBEXT.input.ime.setMenuItems" exists. 3830 func HasFuncSetMenuItems() bool { 3831 return js.True == bindings.HasFuncSetMenuItems() 3832 } 3833 3834 // FuncSetMenuItems returns the function "WEBEXT.input.ime.setMenuItems". 3835 func FuncSetMenuItems() (fn js.Func[func(parameters MenuParameters) js.Promise[js.Void]]) { 3836 bindings.FuncSetMenuItems( 3837 js.Pointer(&fn), 3838 ) 3839 return 3840 } 3841 3842 // SetMenuItems calls the function "WEBEXT.input.ime.setMenuItems" directly. 3843 func SetMenuItems(parameters MenuParameters) (ret js.Promise[js.Void]) { 3844 bindings.CallSetMenuItems( 3845 js.Pointer(&ret), 3846 js.Pointer(¶meters), 3847 ) 3848 3849 return 3850 } 3851 3852 // TrySetMenuItems calls the function "WEBEXT.input.ime.setMenuItems" 3853 // in a try/catch block and returns (_, err, ok = false) when it went through 3854 // the catch clause. 3855 func TrySetMenuItems(parameters MenuParameters) (ret js.Promise[js.Void], exception js.Any, ok bool) { 3856 ok = js.True == bindings.TrySetMenuItems( 3857 js.Pointer(&ret), js.Pointer(&exception), 3858 js.Pointer(¶meters), 3859 ) 3860 3861 return 3862 } 3863 3864 // HasFuncUpdateMenuItems returns true if the function "WEBEXT.input.ime.updateMenuItems" exists. 3865 func HasFuncUpdateMenuItems() bool { 3866 return js.True == bindings.HasFuncUpdateMenuItems() 3867 } 3868 3869 // FuncUpdateMenuItems returns the function "WEBEXT.input.ime.updateMenuItems". 3870 func FuncUpdateMenuItems() (fn js.Func[func(parameters MenuParameters) js.Promise[js.Void]]) { 3871 bindings.FuncUpdateMenuItems( 3872 js.Pointer(&fn), 3873 ) 3874 return 3875 } 3876 3877 // UpdateMenuItems calls the function "WEBEXT.input.ime.updateMenuItems" directly. 3878 func UpdateMenuItems(parameters MenuParameters) (ret js.Promise[js.Void]) { 3879 bindings.CallUpdateMenuItems( 3880 js.Pointer(&ret), 3881 js.Pointer(¶meters), 3882 ) 3883 3884 return 3885 } 3886 3887 // TryUpdateMenuItems calls the function "WEBEXT.input.ime.updateMenuItems" 3888 // in a try/catch block and returns (_, err, ok = false) when it went through 3889 // the catch clause. 3890 func TryUpdateMenuItems(parameters MenuParameters) (ret js.Promise[js.Void], exception js.Any, ok bool) { 3891 ok = js.True == bindings.TryUpdateMenuItems( 3892 js.Pointer(&ret), js.Pointer(&exception), 3893 js.Pointer(¶meters), 3894 ) 3895 3896 return 3897 }