github.com/primecitizens/pcz/std@v0.2.1/plat/js/webext/inputmethodprivate/apis_js_wasm.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright 2023 The Prime Citizens 3 4 package inputmethodprivate 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/inputmethodprivate/bindings" 11 ) 12 13 type AutoCapitalizeType uint32 14 15 const ( 16 _ AutoCapitalizeType = iota 17 18 AutoCapitalizeType_OFF 19 AutoCapitalizeType_CHARACTERS 20 AutoCapitalizeType_WORDS 21 AutoCapitalizeType_SENTENCES 22 ) 23 24 func (AutoCapitalizeType) FromRef(str js.Ref) AutoCapitalizeType { 25 return AutoCapitalizeType(bindings.ConstOfAutoCapitalizeType(str)) 26 } 27 28 func (x AutoCapitalizeType) String() (string, bool) { 29 switch x { 30 case AutoCapitalizeType_OFF: 31 return "off", true 32 case AutoCapitalizeType_CHARACTERS: 33 return "characters", true 34 case AutoCapitalizeType_WORDS: 35 return "words", true 36 case AutoCapitalizeType_SENTENCES: 37 return "sentences", true 38 default: 39 return "", false 40 } 41 } 42 43 type FinishComposingTextArgParameters struct { 44 // ContextID is "FinishComposingTextArgParameters.contextID" 45 // 46 // Required 47 ContextID int64 48 49 FFI_USE bool 50 } 51 52 // FromRef calls UpdateFrom and returns a FinishComposingTextArgParameters with all fields set. 53 func (p FinishComposingTextArgParameters) FromRef(ref js.Ref) FinishComposingTextArgParameters { 54 p.UpdateFrom(ref) 55 return p 56 } 57 58 // New creates a new FinishComposingTextArgParameters in the application heap. 59 func (p FinishComposingTextArgParameters) New() js.Ref { 60 return bindings.FinishComposingTextArgParametersJSLoad( 61 js.Pointer(&p), js.True, 0, 62 ) 63 } 64 65 // UpdateFrom copies value of all fields of the heap object to p. 66 func (p *FinishComposingTextArgParameters) UpdateFrom(ref js.Ref) { 67 bindings.FinishComposingTextArgParametersJSStore( 68 js.Pointer(p), ref, 69 ) 70 } 71 72 // Update writes all fields of the p to the heap object referenced by ref. 73 func (p *FinishComposingTextArgParameters) Update(ref js.Ref) { 74 bindings.FinishComposingTextArgParametersJSLoad( 75 js.Pointer(p), js.False, ref, 76 ) 77 } 78 79 // FreeMembers frees fields with heap reference, if recursive is true 80 // free all heap references reachable from p. 81 func (p *FinishComposingTextArgParameters) FreeMembers(recursive bool) { 82 } 83 84 type FocusReason uint32 85 86 const ( 87 _ FocusReason = iota 88 89 FocusReason_MOUSE 90 FocusReason_TOUCH 91 FocusReason_PEN 92 FocusReason_OTHER 93 ) 94 95 func (FocusReason) FromRef(str js.Ref) FocusReason { 96 return FocusReason(bindings.ConstOfFocusReason(str)) 97 } 98 99 func (x FocusReason) String() (string, bool) { 100 switch x { 101 case FocusReason_MOUSE: 102 return "mouse", true 103 case FocusReason_TOUCH: 104 return "touch", true 105 case FocusReason_PEN: 106 return "pen", true 107 case FocusReason_OTHER: 108 return "other", true 109 default: 110 return "", false 111 } 112 } 113 114 type GetInputMethodConfigReturnType struct { 115 // IsImeMenuActivated is "GetInputMethodConfigReturnType.isImeMenuActivated" 116 // 117 // Required 118 IsImeMenuActivated bool 119 // IsPhysicalKeyboardAutocorrectEnabled is "GetInputMethodConfigReturnType.isPhysicalKeyboardAutocorrectEnabled" 120 // 121 // Required 122 IsPhysicalKeyboardAutocorrectEnabled bool 123 124 FFI_USE bool 125 } 126 127 // FromRef calls UpdateFrom and returns a GetInputMethodConfigReturnType with all fields set. 128 func (p GetInputMethodConfigReturnType) FromRef(ref js.Ref) GetInputMethodConfigReturnType { 129 p.UpdateFrom(ref) 130 return p 131 } 132 133 // New creates a new GetInputMethodConfigReturnType in the application heap. 134 func (p GetInputMethodConfigReturnType) New() js.Ref { 135 return bindings.GetInputMethodConfigReturnTypeJSLoad( 136 js.Pointer(&p), js.True, 0, 137 ) 138 } 139 140 // UpdateFrom copies value of all fields of the heap object to p. 141 func (p *GetInputMethodConfigReturnType) UpdateFrom(ref js.Ref) { 142 bindings.GetInputMethodConfigReturnTypeJSStore( 143 js.Pointer(p), ref, 144 ) 145 } 146 147 // Update writes all fields of the p to the heap object referenced by ref. 148 func (p *GetInputMethodConfigReturnType) Update(ref js.Ref) { 149 bindings.GetInputMethodConfigReturnTypeJSLoad( 150 js.Pointer(p), js.False, ref, 151 ) 152 } 153 154 // FreeMembers frees fields with heap reference, if recursive is true 155 // free all heap references reachable from p. 156 func (p *GetInputMethodConfigReturnType) FreeMembers(recursive bool) { 157 } 158 159 type GetInputMethodsReturnTypeElem struct { 160 // Id is "GetInputMethodsReturnTypeElem.id" 161 // 162 // Required 163 Id js.String 164 // Indicator is "GetInputMethodsReturnTypeElem.indicator" 165 // 166 // Required 167 Indicator js.String 168 // Name is "GetInputMethodsReturnTypeElem.name" 169 // 170 // Required 171 Name js.String 172 173 FFI_USE bool 174 } 175 176 // FromRef calls UpdateFrom and returns a GetInputMethodsReturnTypeElem with all fields set. 177 func (p GetInputMethodsReturnTypeElem) FromRef(ref js.Ref) GetInputMethodsReturnTypeElem { 178 p.UpdateFrom(ref) 179 return p 180 } 181 182 // New creates a new GetInputMethodsReturnTypeElem in the application heap. 183 func (p GetInputMethodsReturnTypeElem) New() js.Ref { 184 return bindings.GetInputMethodsReturnTypeElemJSLoad( 185 js.Pointer(&p), js.True, 0, 186 ) 187 } 188 189 // UpdateFrom copies value of all fields of the heap object to p. 190 func (p *GetInputMethodsReturnTypeElem) UpdateFrom(ref js.Ref) { 191 bindings.GetInputMethodsReturnTypeElemJSStore( 192 js.Pointer(p), ref, 193 ) 194 } 195 196 // Update writes all fields of the p to the heap object referenced by ref. 197 func (p *GetInputMethodsReturnTypeElem) Update(ref js.Ref) { 198 bindings.GetInputMethodsReturnTypeElemJSLoad( 199 js.Pointer(p), js.False, ref, 200 ) 201 } 202 203 // FreeMembers frees fields with heap reference, if recursive is true 204 // free all heap references reachable from p. 205 func (p *GetInputMethodsReturnTypeElem) FreeMembers(recursive bool) { 206 js.Free( 207 p.Id.Ref(), 208 p.Indicator.Ref(), 209 p.Name.Ref(), 210 ) 211 p.Id = p.Id.FromRef(js.Undefined) 212 p.Indicator = p.Indicator.FromRef(js.Undefined) 213 p.Name = p.Name.FromRef(js.Undefined) 214 } 215 216 type GetSurroundingTextReturnType struct { 217 // After is "GetSurroundingTextReturnType.after" 218 // 219 // Required 220 After js.String 221 // Before is "GetSurroundingTextReturnType.before" 222 // 223 // Required 224 Before js.String 225 // Selected is "GetSurroundingTextReturnType.selected" 226 // 227 // Required 228 Selected js.String 229 230 FFI_USE bool 231 } 232 233 // FromRef calls UpdateFrom and returns a GetSurroundingTextReturnType with all fields set. 234 func (p GetSurroundingTextReturnType) FromRef(ref js.Ref) GetSurroundingTextReturnType { 235 p.UpdateFrom(ref) 236 return p 237 } 238 239 // New creates a new GetSurroundingTextReturnType in the application heap. 240 func (p GetSurroundingTextReturnType) New() js.Ref { 241 return bindings.GetSurroundingTextReturnTypeJSLoad( 242 js.Pointer(&p), js.True, 0, 243 ) 244 } 245 246 // UpdateFrom copies value of all fields of the heap object to p. 247 func (p *GetSurroundingTextReturnType) UpdateFrom(ref js.Ref) { 248 bindings.GetSurroundingTextReturnTypeJSStore( 249 js.Pointer(p), ref, 250 ) 251 } 252 253 // Update writes all fields of the p to the heap object referenced by ref. 254 func (p *GetSurroundingTextReturnType) Update(ref js.Ref) { 255 bindings.GetSurroundingTextReturnTypeJSLoad( 256 js.Pointer(p), js.False, ref, 257 ) 258 } 259 260 // FreeMembers frees fields with heap reference, if recursive is true 261 // free all heap references reachable from p. 262 func (p *GetSurroundingTextReturnType) FreeMembers(recursive bool) { 263 js.Free( 264 p.After.Ref(), 265 p.Before.Ref(), 266 p.Selected.Ref(), 267 ) 268 p.After = p.After.FromRef(js.Undefined) 269 p.Before = p.Before.FromRef(js.Undefined) 270 p.Selected = p.Selected.FromRef(js.Undefined) 271 } 272 273 type GetTextFieldBoundsArgParameters struct { 274 // ContextID is "GetTextFieldBoundsArgParameters.contextID" 275 // 276 // Required 277 ContextID int64 278 279 FFI_USE bool 280 } 281 282 // FromRef calls UpdateFrom and returns a GetTextFieldBoundsArgParameters with all fields set. 283 func (p GetTextFieldBoundsArgParameters) FromRef(ref js.Ref) GetTextFieldBoundsArgParameters { 284 p.UpdateFrom(ref) 285 return p 286 } 287 288 // New creates a new GetTextFieldBoundsArgParameters in the application heap. 289 func (p GetTextFieldBoundsArgParameters) New() js.Ref { 290 return bindings.GetTextFieldBoundsArgParametersJSLoad( 291 js.Pointer(&p), js.True, 0, 292 ) 293 } 294 295 // UpdateFrom copies value of all fields of the heap object to p. 296 func (p *GetTextFieldBoundsArgParameters) UpdateFrom(ref js.Ref) { 297 bindings.GetTextFieldBoundsArgParametersJSStore( 298 js.Pointer(p), ref, 299 ) 300 } 301 302 // Update writes all fields of the p to the heap object referenced by ref. 303 func (p *GetTextFieldBoundsArgParameters) Update(ref js.Ref) { 304 bindings.GetTextFieldBoundsArgParametersJSLoad( 305 js.Pointer(p), js.False, ref, 306 ) 307 } 308 309 // FreeMembers frees fields with heap reference, if recursive is true 310 // free all heap references reachable from p. 311 func (p *GetTextFieldBoundsArgParameters) FreeMembers(recursive bool) { 312 } 313 314 type GetTextFieldBoundsReturnType struct { 315 // Height is "GetTextFieldBoundsReturnType.height" 316 // 317 // Required 318 Height int64 319 // Width is "GetTextFieldBoundsReturnType.width" 320 // 321 // Required 322 Width int64 323 // X is "GetTextFieldBoundsReturnType.x" 324 // 325 // Required 326 X int64 327 // Y is "GetTextFieldBoundsReturnType.y" 328 // 329 // Required 330 Y int64 331 332 FFI_USE bool 333 } 334 335 // FromRef calls UpdateFrom and returns a GetTextFieldBoundsReturnType with all fields set. 336 func (p GetTextFieldBoundsReturnType) FromRef(ref js.Ref) GetTextFieldBoundsReturnType { 337 p.UpdateFrom(ref) 338 return p 339 } 340 341 // New creates a new GetTextFieldBoundsReturnType in the application heap. 342 func (p GetTextFieldBoundsReturnType) New() js.Ref { 343 return bindings.GetTextFieldBoundsReturnTypeJSLoad( 344 js.Pointer(&p), js.True, 0, 345 ) 346 } 347 348 // UpdateFrom copies value of all fields of the heap object to p. 349 func (p *GetTextFieldBoundsReturnType) UpdateFrom(ref js.Ref) { 350 bindings.GetTextFieldBoundsReturnTypeJSStore( 351 js.Pointer(p), ref, 352 ) 353 } 354 355 // Update writes all fields of the p to the heap object referenced by ref. 356 func (p *GetTextFieldBoundsReturnType) Update(ref js.Ref) { 357 bindings.GetTextFieldBoundsReturnTypeJSLoad( 358 js.Pointer(p), js.False, ref, 359 ) 360 } 361 362 // FreeMembers frees fields with heap reference, if recursive is true 363 // free all heap references reachable from p. 364 func (p *GetTextFieldBoundsReturnType) FreeMembers(recursive bool) { 365 } 366 367 type InputModeType uint32 368 369 const ( 370 _ InputModeType = iota 371 372 InputModeType_NO_KEYBOARD 373 InputModeType_TEXT 374 InputModeType_TEL 375 InputModeType_URL 376 InputModeType_EMAIL 377 InputModeType_NUMERIC 378 InputModeType_DECIMAL 379 InputModeType_SEARCH 380 ) 381 382 func (InputModeType) FromRef(str js.Ref) InputModeType { 383 return InputModeType(bindings.ConstOfInputModeType(str)) 384 } 385 386 func (x InputModeType) String() (string, bool) { 387 switch x { 388 case InputModeType_NO_KEYBOARD: 389 return "noKeyboard", true 390 case InputModeType_TEXT: 391 return "text", true 392 case InputModeType_TEL: 393 return "tel", true 394 case InputModeType_URL: 395 return "url", true 396 case InputModeType_EMAIL: 397 return "email", true 398 case InputModeType_NUMERIC: 399 return "numeric", true 400 case InputModeType_DECIMAL: 401 return "decimal", true 402 case InputModeType_SEARCH: 403 return "search", true 404 default: 405 return "", false 406 } 407 } 408 409 type InputContextType uint32 410 411 const ( 412 _ InputContextType = iota 413 414 InputContextType_TEXT 415 InputContextType_SEARCH 416 InputContextType_TEL 417 InputContextType_URL 418 InputContextType_EMAIL 419 InputContextType_NUMBER 420 InputContextType_PASSWORD 421 InputContextType_NULL 422 ) 423 424 func (InputContextType) FromRef(str js.Ref) InputContextType { 425 return InputContextType(bindings.ConstOfInputContextType(str)) 426 } 427 428 func (x InputContextType) String() (string, bool) { 429 switch x { 430 case InputContextType_TEXT: 431 return "text", true 432 case InputContextType_SEARCH: 433 return "search", true 434 case InputContextType_TEL: 435 return "tel", true 436 case InputContextType_URL: 437 return "url", true 438 case InputContextType_EMAIL: 439 return "email", true 440 case InputContextType_NUMBER: 441 return "number", true 442 case InputContextType_PASSWORD: 443 return "password", true 444 case InputContextType_NULL: 445 return "null", true 446 default: 447 return "", false 448 } 449 } 450 451 type InputContext struct { 452 // AppKey is "InputContext.appKey" 453 // 454 // Optional 455 AppKey js.String 456 // AutoCapitalize is "InputContext.autoCapitalize" 457 // 458 // Required 459 AutoCapitalize AutoCapitalizeType 460 // AutoComplete is "InputContext.autoComplete" 461 // 462 // Required 463 AutoComplete bool 464 // AutoCorrect is "InputContext.autoCorrect" 465 // 466 // Required 467 AutoCorrect bool 468 // ContextID is "InputContext.contextID" 469 // 470 // Required 471 ContextID int64 472 // FocusReason is "InputContext.focusReason" 473 // 474 // Required 475 FocusReason FocusReason 476 // Mode is "InputContext.mode" 477 // 478 // Required 479 Mode InputModeType 480 // ShouldDoLearning is "InputContext.shouldDoLearning" 481 // 482 // Required 483 ShouldDoLearning bool 484 // SpellCheck is "InputContext.spellCheck" 485 // 486 // Required 487 SpellCheck bool 488 // Type is "InputContext.type" 489 // 490 // Required 491 Type InputContextType 492 493 FFI_USE bool 494 } 495 496 // FromRef calls UpdateFrom and returns a InputContext with all fields set. 497 func (p InputContext) FromRef(ref js.Ref) InputContext { 498 p.UpdateFrom(ref) 499 return p 500 } 501 502 // New creates a new InputContext in the application heap. 503 func (p InputContext) New() js.Ref { 504 return bindings.InputContextJSLoad( 505 js.Pointer(&p), js.True, 0, 506 ) 507 } 508 509 // UpdateFrom copies value of all fields of the heap object to p. 510 func (p *InputContext) UpdateFrom(ref js.Ref) { 511 bindings.InputContextJSStore( 512 js.Pointer(p), ref, 513 ) 514 } 515 516 // Update writes all fields of the p to the heap object referenced by ref. 517 func (p *InputContext) Update(ref js.Ref) { 518 bindings.InputContextJSLoad( 519 js.Pointer(p), js.False, ref, 520 ) 521 } 522 523 // FreeMembers frees fields with heap reference, if recursive is true 524 // free all heap references reachable from p. 525 func (p *InputContext) FreeMembers(recursive bool) { 526 js.Free( 527 p.AppKey.Ref(), 528 ) 529 p.AppKey = p.AppKey.FromRef(js.Undefined) 530 } 531 532 type InputMethodSettingsFieldPinyinFuzzyConfig struct { 533 // AnAng is "InputMethodSettingsFieldPinyinFuzzyConfig.an_ang" 534 // 535 // Optional 536 // 537 // NOTE: FFI_USE_AnAng MUST be set to true to make this field effective. 538 AnAng bool 539 // CCh is "InputMethodSettingsFieldPinyinFuzzyConfig.c_ch" 540 // 541 // Optional 542 // 543 // NOTE: FFI_USE_CCh MUST be set to true to make this field effective. 544 CCh bool 545 // EnEng is "InputMethodSettingsFieldPinyinFuzzyConfig.en_eng" 546 // 547 // Optional 548 // 549 // NOTE: FFI_USE_EnEng MUST be set to true to make this field effective. 550 EnEng bool 551 // FH is "InputMethodSettingsFieldPinyinFuzzyConfig.f_h" 552 // 553 // Optional 554 // 555 // NOTE: FFI_USE_FH MUST be set to true to make this field effective. 556 FH bool 557 // IanIang is "InputMethodSettingsFieldPinyinFuzzyConfig.ian_iang" 558 // 559 // Optional 560 // 561 // NOTE: FFI_USE_IanIang MUST be set to true to make this field effective. 562 IanIang bool 563 // InIng is "InputMethodSettingsFieldPinyinFuzzyConfig.in_ing" 564 // 565 // Optional 566 // 567 // NOTE: FFI_USE_InIng MUST be set to true to make this field effective. 568 InIng bool 569 // KG is "InputMethodSettingsFieldPinyinFuzzyConfig.k_g" 570 // 571 // Optional 572 // 573 // NOTE: FFI_USE_KG MUST be set to true to make this field effective. 574 KG bool 575 // LN is "InputMethodSettingsFieldPinyinFuzzyConfig.l_n" 576 // 577 // Optional 578 // 579 // NOTE: FFI_USE_LN MUST be set to true to make this field effective. 580 LN bool 581 // RL is "InputMethodSettingsFieldPinyinFuzzyConfig.r_l" 582 // 583 // Optional 584 // 585 // NOTE: FFI_USE_RL MUST be set to true to make this field effective. 586 RL bool 587 // SSh is "InputMethodSettingsFieldPinyinFuzzyConfig.s_sh" 588 // 589 // Optional 590 // 591 // NOTE: FFI_USE_SSh MUST be set to true to make this field effective. 592 SSh bool 593 // UanUang is "InputMethodSettingsFieldPinyinFuzzyConfig.uan_uang" 594 // 595 // Optional 596 // 597 // NOTE: FFI_USE_UanUang MUST be set to true to make this field effective. 598 UanUang bool 599 // ZZh is "InputMethodSettingsFieldPinyinFuzzyConfig.z_zh" 600 // 601 // Optional 602 // 603 // NOTE: FFI_USE_ZZh MUST be set to true to make this field effective. 604 ZZh bool 605 606 FFI_USE_AnAng bool // for AnAng. 607 FFI_USE_CCh bool // for CCh. 608 FFI_USE_EnEng bool // for EnEng. 609 FFI_USE_FH bool // for FH. 610 FFI_USE_IanIang bool // for IanIang. 611 FFI_USE_InIng bool // for InIng. 612 FFI_USE_KG bool // for KG. 613 FFI_USE_LN bool // for LN. 614 FFI_USE_RL bool // for RL. 615 FFI_USE_SSh bool // for SSh. 616 FFI_USE_UanUang bool // for UanUang. 617 FFI_USE_ZZh bool // for ZZh. 618 619 FFI_USE bool 620 } 621 622 // FromRef calls UpdateFrom and returns a InputMethodSettingsFieldPinyinFuzzyConfig with all fields set. 623 func (p InputMethodSettingsFieldPinyinFuzzyConfig) FromRef(ref js.Ref) InputMethodSettingsFieldPinyinFuzzyConfig { 624 p.UpdateFrom(ref) 625 return p 626 } 627 628 // New creates a new InputMethodSettingsFieldPinyinFuzzyConfig in the application heap. 629 func (p InputMethodSettingsFieldPinyinFuzzyConfig) New() js.Ref { 630 return bindings.InputMethodSettingsFieldPinyinFuzzyConfigJSLoad( 631 js.Pointer(&p), js.True, 0, 632 ) 633 } 634 635 // UpdateFrom copies value of all fields of the heap object to p. 636 func (p *InputMethodSettingsFieldPinyinFuzzyConfig) UpdateFrom(ref js.Ref) { 637 bindings.InputMethodSettingsFieldPinyinFuzzyConfigJSStore( 638 js.Pointer(p), ref, 639 ) 640 } 641 642 // Update writes all fields of the p to the heap object referenced by ref. 643 func (p *InputMethodSettingsFieldPinyinFuzzyConfig) Update(ref js.Ref) { 644 bindings.InputMethodSettingsFieldPinyinFuzzyConfigJSLoad( 645 js.Pointer(p), js.False, ref, 646 ) 647 } 648 649 // FreeMembers frees fields with heap reference, if recursive is true 650 // free all heap references reachable from p. 651 func (p *InputMethodSettingsFieldPinyinFuzzyConfig) FreeMembers(recursive bool) { 652 } 653 654 type InputMethodSettings struct { 655 // EnableCompletion is "InputMethodSettings.enableCompletion" 656 // 657 // Optional 658 // 659 // NOTE: FFI_USE_EnableCompletion MUST be set to true to make this field effective. 660 EnableCompletion bool 661 // EnableDoubleSpacePeriod is "InputMethodSettings.enableDoubleSpacePeriod" 662 // 663 // Optional 664 // 665 // NOTE: FFI_USE_EnableDoubleSpacePeriod MUST be set to true to make this field effective. 666 EnableDoubleSpacePeriod bool 667 // EnableGestureTyping is "InputMethodSettings.enableGestureTyping" 668 // 669 // Optional 670 // 671 // NOTE: FFI_USE_EnableGestureTyping MUST be set to true to make this field effective. 672 EnableGestureTyping bool 673 // EnablePrediction is "InputMethodSettings.enablePrediction" 674 // 675 // Optional 676 // 677 // NOTE: FFI_USE_EnablePrediction MUST be set to true to make this field effective. 678 EnablePrediction bool 679 // EnableSoundOnKeypress is "InputMethodSettings.enableSoundOnKeypress" 680 // 681 // Optional 682 // 683 // NOTE: FFI_USE_EnableSoundOnKeypress MUST be set to true to make this field effective. 684 EnableSoundOnKeypress bool 685 // KoreanEnableSyllableInput is "InputMethodSettings.koreanEnableSyllableInput" 686 // 687 // Optional 688 // 689 // NOTE: FFI_USE_KoreanEnableSyllableInput MUST be set to true to make this field effective. 690 KoreanEnableSyllableInput bool 691 // KoreanKeyboardLayout is "InputMethodSettings.koreanKeyboardLayout" 692 // 693 // Optional 694 KoreanKeyboardLayout js.String 695 // KoreanShowHangulCandidate is "InputMethodSettings.koreanShowHangulCandidate" 696 // 697 // Optional 698 // 699 // NOTE: FFI_USE_KoreanShowHangulCandidate MUST be set to true to make this field effective. 700 KoreanShowHangulCandidate bool 701 // PhysicalKeyboardAutoCorrectionEnabledByDefault is "InputMethodSettings.physicalKeyboardAutoCorrectionEnabledByDefault" 702 // 703 // Optional 704 // 705 // NOTE: FFI_USE_PhysicalKeyboardAutoCorrectionEnabledByDefault MUST be set to true to make this field effective. 706 PhysicalKeyboardAutoCorrectionEnabledByDefault bool 707 // PhysicalKeyboardAutoCorrectionLevel is "InputMethodSettings.physicalKeyboardAutoCorrectionLevel" 708 // 709 // Optional 710 // 711 // NOTE: FFI_USE_PhysicalKeyboardAutoCorrectionLevel MUST be set to true to make this field effective. 712 PhysicalKeyboardAutoCorrectionLevel int64 713 // PhysicalKeyboardEnableCapitalization is "InputMethodSettings.physicalKeyboardEnableCapitalization" 714 // 715 // Optional 716 // 717 // NOTE: FFI_USE_PhysicalKeyboardEnableCapitalization MUST be set to true to make this field effective. 718 PhysicalKeyboardEnableCapitalization bool 719 // PhysicalKeyboardEnableDiacriticsOnLongpress is "InputMethodSettings.physicalKeyboardEnableDiacriticsOnLongpress" 720 // 721 // Optional 722 // 723 // NOTE: FFI_USE_PhysicalKeyboardEnableDiacriticsOnLongpress MUST be set to true to make this field effective. 724 PhysicalKeyboardEnableDiacriticsOnLongpress bool 725 // PhysicalKeyboardEnablePredictiveWriting is "InputMethodSettings.physicalKeyboardEnablePredictiveWriting" 726 // 727 // Optional 728 // 729 // NOTE: FFI_USE_PhysicalKeyboardEnablePredictiveWriting MUST be set to true to make this field effective. 730 PhysicalKeyboardEnablePredictiveWriting bool 731 // PinyinChinesePunctuation is "InputMethodSettings.pinyinChinesePunctuation" 732 // 733 // Optional 734 // 735 // NOTE: FFI_USE_PinyinChinesePunctuation MUST be set to true to make this field effective. 736 PinyinChinesePunctuation bool 737 // PinyinDefaultChinese is "InputMethodSettings.pinyinDefaultChinese" 738 // 739 // Optional 740 // 741 // NOTE: FFI_USE_PinyinDefaultChinese MUST be set to true to make this field effective. 742 PinyinDefaultChinese bool 743 // PinyinEnableFuzzy is "InputMethodSettings.pinyinEnableFuzzy" 744 // 745 // Optional 746 // 747 // NOTE: FFI_USE_PinyinEnableFuzzy MUST be set to true to make this field effective. 748 PinyinEnableFuzzy bool 749 // PinyinEnableLowerPaging is "InputMethodSettings.pinyinEnableLowerPaging" 750 // 751 // Optional 752 // 753 // NOTE: FFI_USE_PinyinEnableLowerPaging MUST be set to true to make this field effective. 754 PinyinEnableLowerPaging bool 755 // PinyinEnableUpperPaging is "InputMethodSettings.pinyinEnableUpperPaging" 756 // 757 // Optional 758 // 759 // NOTE: FFI_USE_PinyinEnableUpperPaging MUST be set to true to make this field effective. 760 PinyinEnableUpperPaging bool 761 // PinyinFullWidthCharacter is "InputMethodSettings.pinyinFullWidthCharacter" 762 // 763 // Optional 764 // 765 // NOTE: FFI_USE_PinyinFullWidthCharacter MUST be set to true to make this field effective. 766 PinyinFullWidthCharacter bool 767 // PinyinFuzzyConfig is "InputMethodSettings.pinyinFuzzyConfig" 768 // 769 // Optional 770 // 771 // NOTE: PinyinFuzzyConfig.FFI_USE MUST be set to true to get PinyinFuzzyConfig used. 772 PinyinFuzzyConfig InputMethodSettingsFieldPinyinFuzzyConfig 773 // VietnameseTelexAllowFlexibleDiacritics is "InputMethodSettings.vietnameseTelexAllowFlexibleDiacritics" 774 // 775 // Optional 776 // 777 // NOTE: FFI_USE_VietnameseTelexAllowFlexibleDiacritics MUST be set to true to make this field effective. 778 VietnameseTelexAllowFlexibleDiacritics bool 779 // VietnameseTelexInsertDoubleHornOnUo is "InputMethodSettings.vietnameseTelexInsertDoubleHornOnUo" 780 // 781 // Optional 782 // 783 // NOTE: FFI_USE_VietnameseTelexInsertDoubleHornOnUo MUST be set to true to make this field effective. 784 VietnameseTelexInsertDoubleHornOnUo bool 785 // VietnameseTelexInsertUHornOnW is "InputMethodSettings.vietnameseTelexInsertUHornOnW" 786 // 787 // Optional 788 // 789 // NOTE: FFI_USE_VietnameseTelexInsertUHornOnW MUST be set to true to make this field effective. 790 VietnameseTelexInsertUHornOnW bool 791 // VietnameseTelexNewStyleToneMarkPlacement is "InputMethodSettings.vietnameseTelexNewStyleToneMarkPlacement" 792 // 793 // Optional 794 // 795 // NOTE: FFI_USE_VietnameseTelexNewStyleToneMarkPlacement MUST be set to true to make this field effective. 796 VietnameseTelexNewStyleToneMarkPlacement bool 797 // VietnameseTelexShowUnderline is "InputMethodSettings.vietnameseTelexShowUnderline" 798 // 799 // Optional 800 // 801 // NOTE: FFI_USE_VietnameseTelexShowUnderline MUST be set to true to make this field effective. 802 VietnameseTelexShowUnderline bool 803 // VietnameseVniAllowFlexibleDiacritics is "InputMethodSettings.vietnameseVniAllowFlexibleDiacritics" 804 // 805 // Optional 806 // 807 // NOTE: FFI_USE_VietnameseVniAllowFlexibleDiacritics MUST be set to true to make this field effective. 808 VietnameseVniAllowFlexibleDiacritics bool 809 // VietnameseVniInsertDoubleHornOnUo is "InputMethodSettings.vietnameseVniInsertDoubleHornOnUo" 810 // 811 // Optional 812 // 813 // NOTE: FFI_USE_VietnameseVniInsertDoubleHornOnUo MUST be set to true to make this field effective. 814 VietnameseVniInsertDoubleHornOnUo bool 815 // VietnameseVniNewStyleToneMarkPlacement is "InputMethodSettings.vietnameseVniNewStyleToneMarkPlacement" 816 // 817 // Optional 818 // 819 // NOTE: FFI_USE_VietnameseVniNewStyleToneMarkPlacement MUST be set to true to make this field effective. 820 VietnameseVniNewStyleToneMarkPlacement bool 821 // VietnameseVniShowUnderline is "InputMethodSettings.vietnameseVniShowUnderline" 822 // 823 // Optional 824 // 825 // NOTE: FFI_USE_VietnameseVniShowUnderline MUST be set to true to make this field effective. 826 VietnameseVniShowUnderline bool 827 // VirtualKeyboardAutoCorrectionLevel is "InputMethodSettings.virtualKeyboardAutoCorrectionLevel" 828 // 829 // Optional 830 // 831 // NOTE: FFI_USE_VirtualKeyboardAutoCorrectionLevel MUST be set to true to make this field effective. 832 VirtualKeyboardAutoCorrectionLevel int64 833 // VirtualKeyboardEnableCapitalization is "InputMethodSettings.virtualKeyboardEnableCapitalization" 834 // 835 // Optional 836 // 837 // NOTE: FFI_USE_VirtualKeyboardEnableCapitalization MUST be set to true to make this field effective. 838 VirtualKeyboardEnableCapitalization bool 839 // XkbLayout is "InputMethodSettings.xkbLayout" 840 // 841 // Optional 842 XkbLayout js.String 843 // ZhuyinKeyboardLayout is "InputMethodSettings.zhuyinKeyboardLayout" 844 // 845 // Optional 846 ZhuyinKeyboardLayout js.String 847 // ZhuyinPageSize is "InputMethodSettings.zhuyinPageSize" 848 // 849 // Optional 850 // 851 // NOTE: FFI_USE_ZhuyinPageSize MUST be set to true to make this field effective. 852 ZhuyinPageSize int64 853 // ZhuyinSelectKeys is "InputMethodSettings.zhuyinSelectKeys" 854 // 855 // Optional 856 ZhuyinSelectKeys js.String 857 858 FFI_USE_EnableCompletion bool // for EnableCompletion. 859 FFI_USE_EnableDoubleSpacePeriod bool // for EnableDoubleSpacePeriod. 860 FFI_USE_EnableGestureTyping bool // for EnableGestureTyping. 861 FFI_USE_EnablePrediction bool // for EnablePrediction. 862 FFI_USE_EnableSoundOnKeypress bool // for EnableSoundOnKeypress. 863 FFI_USE_KoreanEnableSyllableInput bool // for KoreanEnableSyllableInput. 864 FFI_USE_KoreanShowHangulCandidate bool // for KoreanShowHangulCandidate. 865 FFI_USE_PhysicalKeyboardAutoCorrectionEnabledByDefault bool // for PhysicalKeyboardAutoCorrectionEnabledByDefault. 866 FFI_USE_PhysicalKeyboardAutoCorrectionLevel bool // for PhysicalKeyboardAutoCorrectionLevel. 867 FFI_USE_PhysicalKeyboardEnableCapitalization bool // for PhysicalKeyboardEnableCapitalization. 868 FFI_USE_PhysicalKeyboardEnableDiacriticsOnLongpress bool // for PhysicalKeyboardEnableDiacriticsOnLongpress. 869 FFI_USE_PhysicalKeyboardEnablePredictiveWriting bool // for PhysicalKeyboardEnablePredictiveWriting. 870 FFI_USE_PinyinChinesePunctuation bool // for PinyinChinesePunctuation. 871 FFI_USE_PinyinDefaultChinese bool // for PinyinDefaultChinese. 872 FFI_USE_PinyinEnableFuzzy bool // for PinyinEnableFuzzy. 873 FFI_USE_PinyinEnableLowerPaging bool // for PinyinEnableLowerPaging. 874 FFI_USE_PinyinEnableUpperPaging bool // for PinyinEnableUpperPaging. 875 FFI_USE_PinyinFullWidthCharacter bool // for PinyinFullWidthCharacter. 876 FFI_USE_VietnameseTelexAllowFlexibleDiacritics bool // for VietnameseTelexAllowFlexibleDiacritics. 877 FFI_USE_VietnameseTelexInsertDoubleHornOnUo bool // for VietnameseTelexInsertDoubleHornOnUo. 878 FFI_USE_VietnameseTelexInsertUHornOnW bool // for VietnameseTelexInsertUHornOnW. 879 FFI_USE_VietnameseTelexNewStyleToneMarkPlacement bool // for VietnameseTelexNewStyleToneMarkPlacement. 880 FFI_USE_VietnameseTelexShowUnderline bool // for VietnameseTelexShowUnderline. 881 FFI_USE_VietnameseVniAllowFlexibleDiacritics bool // for VietnameseVniAllowFlexibleDiacritics. 882 FFI_USE_VietnameseVniInsertDoubleHornOnUo bool // for VietnameseVniInsertDoubleHornOnUo. 883 FFI_USE_VietnameseVniNewStyleToneMarkPlacement bool // for VietnameseVniNewStyleToneMarkPlacement. 884 FFI_USE_VietnameseVniShowUnderline bool // for VietnameseVniShowUnderline. 885 FFI_USE_VirtualKeyboardAutoCorrectionLevel bool // for VirtualKeyboardAutoCorrectionLevel. 886 FFI_USE_VirtualKeyboardEnableCapitalization bool // for VirtualKeyboardEnableCapitalization. 887 FFI_USE_ZhuyinPageSize bool // for ZhuyinPageSize. 888 889 FFI_USE bool 890 } 891 892 // FromRef calls UpdateFrom and returns a InputMethodSettings with all fields set. 893 func (p InputMethodSettings) FromRef(ref js.Ref) InputMethodSettings { 894 p.UpdateFrom(ref) 895 return p 896 } 897 898 // New creates a new InputMethodSettings in the application heap. 899 func (p InputMethodSettings) New() js.Ref { 900 return bindings.InputMethodSettingsJSLoad( 901 js.Pointer(&p), js.True, 0, 902 ) 903 } 904 905 // UpdateFrom copies value of all fields of the heap object to p. 906 func (p *InputMethodSettings) UpdateFrom(ref js.Ref) { 907 bindings.InputMethodSettingsJSStore( 908 js.Pointer(p), ref, 909 ) 910 } 911 912 // Update writes all fields of the p to the heap object referenced by ref. 913 func (p *InputMethodSettings) Update(ref js.Ref) { 914 bindings.InputMethodSettingsJSLoad( 915 js.Pointer(p), js.False, ref, 916 ) 917 } 918 919 // FreeMembers frees fields with heap reference, if recursive is true 920 // free all heap references reachable from p. 921 func (p *InputMethodSettings) FreeMembers(recursive bool) { 922 js.Free( 923 p.KoreanKeyboardLayout.Ref(), 924 p.XkbLayout.Ref(), 925 p.ZhuyinKeyboardLayout.Ref(), 926 p.ZhuyinSelectKeys.Ref(), 927 ) 928 p.KoreanKeyboardLayout = p.KoreanKeyboardLayout.FromRef(js.Undefined) 929 p.XkbLayout = p.XkbLayout.FromRef(js.Undefined) 930 p.ZhuyinKeyboardLayout = p.ZhuyinKeyboardLayout.FromRef(js.Undefined) 931 p.ZhuyinSelectKeys = p.ZhuyinSelectKeys.FromRef(js.Undefined) 932 if recursive { 933 p.PinyinFuzzyConfig.FreeMembers(true) 934 } 935 } 936 937 type MenuItemStyle uint32 938 939 const ( 940 _ MenuItemStyle = iota 941 942 MenuItemStyle_CHECK 943 MenuItemStyle_RADIO 944 MenuItemStyle_SEPARATOR 945 ) 946 947 func (MenuItemStyle) FromRef(str js.Ref) MenuItemStyle { 948 return MenuItemStyle(bindings.ConstOfMenuItemStyle(str)) 949 } 950 951 func (x MenuItemStyle) String() (string, bool) { 952 switch x { 953 case MenuItemStyle_CHECK: 954 return "check", true 955 case MenuItemStyle_RADIO: 956 return "radio", true 957 case MenuItemStyle_SEPARATOR: 958 return "separator", true 959 default: 960 return "", false 961 } 962 } 963 964 type MenuItem struct { 965 // Checked is "MenuItem.checked" 966 // 967 // Optional 968 // 969 // NOTE: FFI_USE_Checked MUST be set to true to make this field effective. 970 Checked bool 971 // Enabled is "MenuItem.enabled" 972 // 973 // Optional 974 // 975 // NOTE: FFI_USE_Enabled MUST be set to true to make this field effective. 976 Enabled bool 977 // Id is "MenuItem.id" 978 // 979 // Required 980 Id js.String 981 // Label is "MenuItem.label" 982 // 983 // Optional 984 Label js.String 985 // Style is "MenuItem.style" 986 // 987 // Optional 988 Style MenuItemStyle 989 // Visible is "MenuItem.visible" 990 // 991 // Optional 992 // 993 // NOTE: FFI_USE_Visible MUST be set to true to make this field effective. 994 Visible bool 995 996 FFI_USE_Checked bool // for Checked. 997 FFI_USE_Enabled bool // for Enabled. 998 FFI_USE_Visible bool // for Visible. 999 1000 FFI_USE bool 1001 } 1002 1003 // FromRef calls UpdateFrom and returns a MenuItem with all fields set. 1004 func (p MenuItem) FromRef(ref js.Ref) MenuItem { 1005 p.UpdateFrom(ref) 1006 return p 1007 } 1008 1009 // New creates a new MenuItem in the application heap. 1010 func (p MenuItem) New() js.Ref { 1011 return bindings.MenuItemJSLoad( 1012 js.Pointer(&p), js.True, 0, 1013 ) 1014 } 1015 1016 // UpdateFrom copies value of all fields of the heap object to p. 1017 func (p *MenuItem) UpdateFrom(ref js.Ref) { 1018 bindings.MenuItemJSStore( 1019 js.Pointer(p), ref, 1020 ) 1021 } 1022 1023 // Update writes all fields of the p to the heap object referenced by ref. 1024 func (p *MenuItem) Update(ref js.Ref) { 1025 bindings.MenuItemJSLoad( 1026 js.Pointer(p), js.False, ref, 1027 ) 1028 } 1029 1030 // FreeMembers frees fields with heap reference, if recursive is true 1031 // free all heap references reachable from p. 1032 func (p *MenuItem) FreeMembers(recursive bool) { 1033 js.Free( 1034 p.Id.Ref(), 1035 p.Label.Ref(), 1036 ) 1037 p.Id = p.Id.FromRef(js.Undefined) 1038 p.Label = p.Label.FromRef(js.Undefined) 1039 } 1040 1041 type OnAutocorrectArgParameters struct { 1042 // ContextID is "OnAutocorrectArgParameters.contextID" 1043 // 1044 // Required 1045 ContextID int64 1046 // CorrectedWord is "OnAutocorrectArgParameters.correctedWord" 1047 // 1048 // Required 1049 CorrectedWord js.String 1050 // StartIndex is "OnAutocorrectArgParameters.startIndex" 1051 // 1052 // Required 1053 StartIndex int64 1054 // TypedWord is "OnAutocorrectArgParameters.typedWord" 1055 // 1056 // Required 1057 TypedWord js.String 1058 1059 FFI_USE bool 1060 } 1061 1062 // FromRef calls UpdateFrom and returns a OnAutocorrectArgParameters with all fields set. 1063 func (p OnAutocorrectArgParameters) FromRef(ref js.Ref) OnAutocorrectArgParameters { 1064 p.UpdateFrom(ref) 1065 return p 1066 } 1067 1068 // New creates a new OnAutocorrectArgParameters in the application heap. 1069 func (p OnAutocorrectArgParameters) New() js.Ref { 1070 return bindings.OnAutocorrectArgParametersJSLoad( 1071 js.Pointer(&p), js.True, 0, 1072 ) 1073 } 1074 1075 // UpdateFrom copies value of all fields of the heap object to p. 1076 func (p *OnAutocorrectArgParameters) UpdateFrom(ref js.Ref) { 1077 bindings.OnAutocorrectArgParametersJSStore( 1078 js.Pointer(p), ref, 1079 ) 1080 } 1081 1082 // Update writes all fields of the p to the heap object referenced by ref. 1083 func (p *OnAutocorrectArgParameters) Update(ref js.Ref) { 1084 bindings.OnAutocorrectArgParametersJSLoad( 1085 js.Pointer(p), js.False, ref, 1086 ) 1087 } 1088 1089 // FreeMembers frees fields with heap reference, if recursive is true 1090 // free all heap references reachable from p. 1091 func (p *OnAutocorrectArgParameters) FreeMembers(recursive bool) { 1092 js.Free( 1093 p.CorrectedWord.Ref(), 1094 p.TypedWord.Ref(), 1095 ) 1096 p.CorrectedWord = p.CorrectedWord.FromRef(js.Undefined) 1097 p.TypedWord = p.TypedWord.FromRef(js.Undefined) 1098 } 1099 1100 type OnCaretBoundsChangedArgCaretBounds struct { 1101 // H is "OnCaretBoundsChangedArgCaretBounds.h" 1102 // 1103 // Required 1104 H int64 1105 // W is "OnCaretBoundsChangedArgCaretBounds.w" 1106 // 1107 // Required 1108 W int64 1109 // X is "OnCaretBoundsChangedArgCaretBounds.x" 1110 // 1111 // Required 1112 X int64 1113 // Y is "OnCaretBoundsChangedArgCaretBounds.y" 1114 // 1115 // Required 1116 Y int64 1117 1118 FFI_USE bool 1119 } 1120 1121 // FromRef calls UpdateFrom and returns a OnCaretBoundsChangedArgCaretBounds with all fields set. 1122 func (p OnCaretBoundsChangedArgCaretBounds) FromRef(ref js.Ref) OnCaretBoundsChangedArgCaretBounds { 1123 p.UpdateFrom(ref) 1124 return p 1125 } 1126 1127 // New creates a new OnCaretBoundsChangedArgCaretBounds in the application heap. 1128 func (p OnCaretBoundsChangedArgCaretBounds) New() js.Ref { 1129 return bindings.OnCaretBoundsChangedArgCaretBoundsJSLoad( 1130 js.Pointer(&p), js.True, 0, 1131 ) 1132 } 1133 1134 // UpdateFrom copies value of all fields of the heap object to p. 1135 func (p *OnCaretBoundsChangedArgCaretBounds) UpdateFrom(ref js.Ref) { 1136 bindings.OnCaretBoundsChangedArgCaretBoundsJSStore( 1137 js.Pointer(p), ref, 1138 ) 1139 } 1140 1141 // Update writes all fields of the p to the heap object referenced by ref. 1142 func (p *OnCaretBoundsChangedArgCaretBounds) Update(ref js.Ref) { 1143 bindings.OnCaretBoundsChangedArgCaretBoundsJSLoad( 1144 js.Pointer(p), js.False, ref, 1145 ) 1146 } 1147 1148 // FreeMembers frees fields with heap reference, if recursive is true 1149 // free all heap references reachable from p. 1150 func (p *OnCaretBoundsChangedArgCaretBounds) FreeMembers(recursive bool) { 1151 } 1152 1153 type UnderlineStyle uint32 1154 1155 const ( 1156 _ UnderlineStyle = iota 1157 1158 UnderlineStyle_UNDERLINE 1159 UnderlineStyle_DOUBLE_UNDERLINE 1160 UnderlineStyle_NO_UNDERLINE 1161 ) 1162 1163 func (UnderlineStyle) FromRef(str js.Ref) UnderlineStyle { 1164 return UnderlineStyle(bindings.ConstOfUnderlineStyle(str)) 1165 } 1166 1167 func (x UnderlineStyle) String() (string, bool) { 1168 switch x { 1169 case UnderlineStyle_UNDERLINE: 1170 return "underline", true 1171 case UnderlineStyle_DOUBLE_UNDERLINE: 1172 return "doubleUnderline", true 1173 case UnderlineStyle_NO_UNDERLINE: 1174 return "noUnderline", true 1175 default: 1176 return "", false 1177 } 1178 } 1179 1180 type SetCompositionRangeArgParametersFieldSegmentsElem struct { 1181 // End is "SetCompositionRangeArgParametersFieldSegmentsElem.end" 1182 // 1183 // Required 1184 End int64 1185 // Start is "SetCompositionRangeArgParametersFieldSegmentsElem.start" 1186 // 1187 // Required 1188 Start int64 1189 // Style is "SetCompositionRangeArgParametersFieldSegmentsElem.style" 1190 // 1191 // Required 1192 Style UnderlineStyle 1193 1194 FFI_USE bool 1195 } 1196 1197 // FromRef calls UpdateFrom and returns a SetCompositionRangeArgParametersFieldSegmentsElem with all fields set. 1198 func (p SetCompositionRangeArgParametersFieldSegmentsElem) FromRef(ref js.Ref) SetCompositionRangeArgParametersFieldSegmentsElem { 1199 p.UpdateFrom(ref) 1200 return p 1201 } 1202 1203 // New creates a new SetCompositionRangeArgParametersFieldSegmentsElem in the application heap. 1204 func (p SetCompositionRangeArgParametersFieldSegmentsElem) New() js.Ref { 1205 return bindings.SetCompositionRangeArgParametersFieldSegmentsElemJSLoad( 1206 js.Pointer(&p), js.True, 0, 1207 ) 1208 } 1209 1210 // UpdateFrom copies value of all fields of the heap object to p. 1211 func (p *SetCompositionRangeArgParametersFieldSegmentsElem) UpdateFrom(ref js.Ref) { 1212 bindings.SetCompositionRangeArgParametersFieldSegmentsElemJSStore( 1213 js.Pointer(p), ref, 1214 ) 1215 } 1216 1217 // Update writes all fields of the p to the heap object referenced by ref. 1218 func (p *SetCompositionRangeArgParametersFieldSegmentsElem) Update(ref js.Ref) { 1219 bindings.SetCompositionRangeArgParametersFieldSegmentsElemJSLoad( 1220 js.Pointer(p), js.False, ref, 1221 ) 1222 } 1223 1224 // FreeMembers frees fields with heap reference, if recursive is true 1225 // free all heap references reachable from p. 1226 func (p *SetCompositionRangeArgParametersFieldSegmentsElem) FreeMembers(recursive bool) { 1227 } 1228 1229 type SetCompositionRangeArgParameters struct { 1230 // ContextID is "SetCompositionRangeArgParameters.contextID" 1231 // 1232 // Required 1233 ContextID int64 1234 // Segments is "SetCompositionRangeArgParameters.segments" 1235 // 1236 // Optional 1237 Segments js.Array[SetCompositionRangeArgParametersFieldSegmentsElem] 1238 // SelectionAfter is "SetCompositionRangeArgParameters.selectionAfter" 1239 // 1240 // Required 1241 SelectionAfter int64 1242 // SelectionBefore is "SetCompositionRangeArgParameters.selectionBefore" 1243 // 1244 // Required 1245 SelectionBefore int64 1246 1247 FFI_USE bool 1248 } 1249 1250 // FromRef calls UpdateFrom and returns a SetCompositionRangeArgParameters with all fields set. 1251 func (p SetCompositionRangeArgParameters) FromRef(ref js.Ref) SetCompositionRangeArgParameters { 1252 p.UpdateFrom(ref) 1253 return p 1254 } 1255 1256 // New creates a new SetCompositionRangeArgParameters in the application heap. 1257 func (p SetCompositionRangeArgParameters) New() js.Ref { 1258 return bindings.SetCompositionRangeArgParametersJSLoad( 1259 js.Pointer(&p), js.True, 0, 1260 ) 1261 } 1262 1263 // UpdateFrom copies value of all fields of the heap object to p. 1264 func (p *SetCompositionRangeArgParameters) UpdateFrom(ref js.Ref) { 1265 bindings.SetCompositionRangeArgParametersJSStore( 1266 js.Pointer(p), ref, 1267 ) 1268 } 1269 1270 // Update writes all fields of the p to the heap object referenced by ref. 1271 func (p *SetCompositionRangeArgParameters) Update(ref js.Ref) { 1272 bindings.SetCompositionRangeArgParametersJSLoad( 1273 js.Pointer(p), js.False, ref, 1274 ) 1275 } 1276 1277 // FreeMembers frees fields with heap reference, if recursive is true 1278 // free all heap references reachable from p. 1279 func (p *SetCompositionRangeArgParameters) FreeMembers(recursive bool) { 1280 js.Free( 1281 p.Segments.Ref(), 1282 ) 1283 p.Segments = p.Segments.FromRef(js.Undefined) 1284 } 1285 1286 // HasFuncAddWordToDictionary returns true if the function "WEBEXT.inputMethodPrivate.addWordToDictionary" exists. 1287 func HasFuncAddWordToDictionary() bool { 1288 return js.True == bindings.HasFuncAddWordToDictionary() 1289 } 1290 1291 // FuncAddWordToDictionary returns the function "WEBEXT.inputMethodPrivate.addWordToDictionary". 1292 func FuncAddWordToDictionary() (fn js.Func[func(word js.String) js.Promise[js.Void]]) { 1293 bindings.FuncAddWordToDictionary( 1294 js.Pointer(&fn), 1295 ) 1296 return 1297 } 1298 1299 // AddWordToDictionary calls the function "WEBEXT.inputMethodPrivate.addWordToDictionary" directly. 1300 func AddWordToDictionary(word js.String) (ret js.Promise[js.Void]) { 1301 bindings.CallAddWordToDictionary( 1302 js.Pointer(&ret), 1303 word.Ref(), 1304 ) 1305 1306 return 1307 } 1308 1309 // TryAddWordToDictionary calls the function "WEBEXT.inputMethodPrivate.addWordToDictionary" 1310 // in a try/catch block and returns (_, err, ok = false) when it went through 1311 // the catch clause. 1312 func TryAddWordToDictionary(word js.String) (ret js.Promise[js.Void], exception js.Any, ok bool) { 1313 ok = js.True == bindings.TryAddWordToDictionary( 1314 js.Pointer(&ret), js.Pointer(&exception), 1315 word.Ref(), 1316 ) 1317 1318 return 1319 } 1320 1321 // HasFuncFetchAllDictionaryWords returns true if the function "WEBEXT.inputMethodPrivate.fetchAllDictionaryWords" exists. 1322 func HasFuncFetchAllDictionaryWords() bool { 1323 return js.True == bindings.HasFuncFetchAllDictionaryWords() 1324 } 1325 1326 // FuncFetchAllDictionaryWords returns the function "WEBEXT.inputMethodPrivate.fetchAllDictionaryWords". 1327 func FuncFetchAllDictionaryWords() (fn js.Func[func() js.Promise[js.Array[js.String]]]) { 1328 bindings.FuncFetchAllDictionaryWords( 1329 js.Pointer(&fn), 1330 ) 1331 return 1332 } 1333 1334 // FetchAllDictionaryWords calls the function "WEBEXT.inputMethodPrivate.fetchAllDictionaryWords" directly. 1335 func FetchAllDictionaryWords() (ret js.Promise[js.Array[js.String]]) { 1336 bindings.CallFetchAllDictionaryWords( 1337 js.Pointer(&ret), 1338 ) 1339 1340 return 1341 } 1342 1343 // TryFetchAllDictionaryWords calls the function "WEBEXT.inputMethodPrivate.fetchAllDictionaryWords" 1344 // in a try/catch block and returns (_, err, ok = false) when it went through 1345 // the catch clause. 1346 func TryFetchAllDictionaryWords() (ret js.Promise[js.Array[js.String]], exception js.Any, ok bool) { 1347 ok = js.True == bindings.TryFetchAllDictionaryWords( 1348 js.Pointer(&ret), js.Pointer(&exception), 1349 ) 1350 1351 return 1352 } 1353 1354 // HasFuncFinishComposingText returns true if the function "WEBEXT.inputMethodPrivate.finishComposingText" exists. 1355 func HasFuncFinishComposingText() bool { 1356 return js.True == bindings.HasFuncFinishComposingText() 1357 } 1358 1359 // FuncFinishComposingText returns the function "WEBEXT.inputMethodPrivate.finishComposingText". 1360 func FuncFinishComposingText() (fn js.Func[func(parameters FinishComposingTextArgParameters) js.Promise[js.Void]]) { 1361 bindings.FuncFinishComposingText( 1362 js.Pointer(&fn), 1363 ) 1364 return 1365 } 1366 1367 // FinishComposingText calls the function "WEBEXT.inputMethodPrivate.finishComposingText" directly. 1368 func FinishComposingText(parameters FinishComposingTextArgParameters) (ret js.Promise[js.Void]) { 1369 bindings.CallFinishComposingText( 1370 js.Pointer(&ret), 1371 js.Pointer(¶meters), 1372 ) 1373 1374 return 1375 } 1376 1377 // TryFinishComposingText calls the function "WEBEXT.inputMethodPrivate.finishComposingText" 1378 // in a try/catch block and returns (_, err, ok = false) when it went through 1379 // the catch clause. 1380 func TryFinishComposingText(parameters FinishComposingTextArgParameters) (ret js.Promise[js.Void], exception js.Any, ok bool) { 1381 ok = js.True == bindings.TryFinishComposingText( 1382 js.Pointer(&ret), js.Pointer(&exception), 1383 js.Pointer(¶meters), 1384 ) 1385 1386 return 1387 } 1388 1389 // HasFuncGetCurrentInputMethod returns true if the function "WEBEXT.inputMethodPrivate.getCurrentInputMethod" exists. 1390 func HasFuncGetCurrentInputMethod() bool { 1391 return js.True == bindings.HasFuncGetCurrentInputMethod() 1392 } 1393 1394 // FuncGetCurrentInputMethod returns the function "WEBEXT.inputMethodPrivate.getCurrentInputMethod". 1395 func FuncGetCurrentInputMethod() (fn js.Func[func() js.Promise[js.String]]) { 1396 bindings.FuncGetCurrentInputMethod( 1397 js.Pointer(&fn), 1398 ) 1399 return 1400 } 1401 1402 // GetCurrentInputMethod calls the function "WEBEXT.inputMethodPrivate.getCurrentInputMethod" directly. 1403 func GetCurrentInputMethod() (ret js.Promise[js.String]) { 1404 bindings.CallGetCurrentInputMethod( 1405 js.Pointer(&ret), 1406 ) 1407 1408 return 1409 } 1410 1411 // TryGetCurrentInputMethod calls the function "WEBEXT.inputMethodPrivate.getCurrentInputMethod" 1412 // in a try/catch block and returns (_, err, ok = false) when it went through 1413 // the catch clause. 1414 func TryGetCurrentInputMethod() (ret js.Promise[js.String], exception js.Any, ok bool) { 1415 ok = js.True == bindings.TryGetCurrentInputMethod( 1416 js.Pointer(&ret), js.Pointer(&exception), 1417 ) 1418 1419 return 1420 } 1421 1422 // HasFuncGetInputMethodConfig returns true if the function "WEBEXT.inputMethodPrivate.getInputMethodConfig" exists. 1423 func HasFuncGetInputMethodConfig() bool { 1424 return js.True == bindings.HasFuncGetInputMethodConfig() 1425 } 1426 1427 // FuncGetInputMethodConfig returns the function "WEBEXT.inputMethodPrivate.getInputMethodConfig". 1428 func FuncGetInputMethodConfig() (fn js.Func[func() js.Promise[GetInputMethodConfigReturnType]]) { 1429 bindings.FuncGetInputMethodConfig( 1430 js.Pointer(&fn), 1431 ) 1432 return 1433 } 1434 1435 // GetInputMethodConfig calls the function "WEBEXT.inputMethodPrivate.getInputMethodConfig" directly. 1436 func GetInputMethodConfig() (ret js.Promise[GetInputMethodConfigReturnType]) { 1437 bindings.CallGetInputMethodConfig( 1438 js.Pointer(&ret), 1439 ) 1440 1441 return 1442 } 1443 1444 // TryGetInputMethodConfig calls the function "WEBEXT.inputMethodPrivate.getInputMethodConfig" 1445 // in a try/catch block and returns (_, err, ok = false) when it went through 1446 // the catch clause. 1447 func TryGetInputMethodConfig() (ret js.Promise[GetInputMethodConfigReturnType], exception js.Any, ok bool) { 1448 ok = js.True == bindings.TryGetInputMethodConfig( 1449 js.Pointer(&ret), js.Pointer(&exception), 1450 ) 1451 1452 return 1453 } 1454 1455 // HasFuncGetInputMethods returns true if the function "WEBEXT.inputMethodPrivate.getInputMethods" exists. 1456 func HasFuncGetInputMethods() bool { 1457 return js.True == bindings.HasFuncGetInputMethods() 1458 } 1459 1460 // FuncGetInputMethods returns the function "WEBEXT.inputMethodPrivate.getInputMethods". 1461 func FuncGetInputMethods() (fn js.Func[func() js.Promise[js.Array[GetInputMethodsReturnTypeElem]]]) { 1462 bindings.FuncGetInputMethods( 1463 js.Pointer(&fn), 1464 ) 1465 return 1466 } 1467 1468 // GetInputMethods calls the function "WEBEXT.inputMethodPrivate.getInputMethods" directly. 1469 func GetInputMethods() (ret js.Promise[js.Array[GetInputMethodsReturnTypeElem]]) { 1470 bindings.CallGetInputMethods( 1471 js.Pointer(&ret), 1472 ) 1473 1474 return 1475 } 1476 1477 // TryGetInputMethods calls the function "WEBEXT.inputMethodPrivate.getInputMethods" 1478 // in a try/catch block and returns (_, err, ok = false) when it went through 1479 // the catch clause. 1480 func TryGetInputMethods() (ret js.Promise[js.Array[GetInputMethodsReturnTypeElem]], exception js.Any, ok bool) { 1481 ok = js.True == bindings.TryGetInputMethods( 1482 js.Pointer(&ret), js.Pointer(&exception), 1483 ) 1484 1485 return 1486 } 1487 1488 // HasFuncGetSettings returns true if the function "WEBEXT.inputMethodPrivate.getSettings" exists. 1489 func HasFuncGetSettings() bool { 1490 return js.True == bindings.HasFuncGetSettings() 1491 } 1492 1493 // FuncGetSettings returns the function "WEBEXT.inputMethodPrivate.getSettings". 1494 func FuncGetSettings() (fn js.Func[func(engineID js.String) js.Promise[InputMethodSettings]]) { 1495 bindings.FuncGetSettings( 1496 js.Pointer(&fn), 1497 ) 1498 return 1499 } 1500 1501 // GetSettings calls the function "WEBEXT.inputMethodPrivate.getSettings" directly. 1502 func GetSettings(engineID js.String) (ret js.Promise[InputMethodSettings]) { 1503 bindings.CallGetSettings( 1504 js.Pointer(&ret), 1505 engineID.Ref(), 1506 ) 1507 1508 return 1509 } 1510 1511 // TryGetSettings calls the function "WEBEXT.inputMethodPrivate.getSettings" 1512 // in a try/catch block and returns (_, err, ok = false) when it went through 1513 // the catch clause. 1514 func TryGetSettings(engineID js.String) (ret js.Promise[InputMethodSettings], exception js.Any, ok bool) { 1515 ok = js.True == bindings.TryGetSettings( 1516 js.Pointer(&ret), js.Pointer(&exception), 1517 engineID.Ref(), 1518 ) 1519 1520 return 1521 } 1522 1523 // HasFuncGetSurroundingText returns true if the function "WEBEXT.inputMethodPrivate.getSurroundingText" exists. 1524 func HasFuncGetSurroundingText() bool { 1525 return js.True == bindings.HasFuncGetSurroundingText() 1526 } 1527 1528 // FuncGetSurroundingText returns the function "WEBEXT.inputMethodPrivate.getSurroundingText". 1529 func FuncGetSurroundingText() (fn js.Func[func(beforeLength int64, afterLength int64) js.Promise[GetSurroundingTextReturnType]]) { 1530 bindings.FuncGetSurroundingText( 1531 js.Pointer(&fn), 1532 ) 1533 return 1534 } 1535 1536 // GetSurroundingText calls the function "WEBEXT.inputMethodPrivate.getSurroundingText" directly. 1537 func GetSurroundingText(beforeLength int64, afterLength int64) (ret js.Promise[GetSurroundingTextReturnType]) { 1538 bindings.CallGetSurroundingText( 1539 js.Pointer(&ret), 1540 float64(beforeLength), 1541 float64(afterLength), 1542 ) 1543 1544 return 1545 } 1546 1547 // TryGetSurroundingText calls the function "WEBEXT.inputMethodPrivate.getSurroundingText" 1548 // in a try/catch block and returns (_, err, ok = false) when it went through 1549 // the catch clause. 1550 func TryGetSurroundingText(beforeLength int64, afterLength int64) (ret js.Promise[GetSurroundingTextReturnType], exception js.Any, ok bool) { 1551 ok = js.True == bindings.TryGetSurroundingText( 1552 js.Pointer(&ret), js.Pointer(&exception), 1553 float64(beforeLength), 1554 float64(afterLength), 1555 ) 1556 1557 return 1558 } 1559 1560 // HasFuncGetTextFieldBounds returns true if the function "WEBEXT.inputMethodPrivate.getTextFieldBounds" exists. 1561 func HasFuncGetTextFieldBounds() bool { 1562 return js.True == bindings.HasFuncGetTextFieldBounds() 1563 } 1564 1565 // FuncGetTextFieldBounds returns the function "WEBEXT.inputMethodPrivate.getTextFieldBounds". 1566 func FuncGetTextFieldBounds() (fn js.Func[func(parameters GetTextFieldBoundsArgParameters) js.Promise[GetTextFieldBoundsReturnType]]) { 1567 bindings.FuncGetTextFieldBounds( 1568 js.Pointer(&fn), 1569 ) 1570 return 1571 } 1572 1573 // GetTextFieldBounds calls the function "WEBEXT.inputMethodPrivate.getTextFieldBounds" directly. 1574 func GetTextFieldBounds(parameters GetTextFieldBoundsArgParameters) (ret js.Promise[GetTextFieldBoundsReturnType]) { 1575 bindings.CallGetTextFieldBounds( 1576 js.Pointer(&ret), 1577 js.Pointer(¶meters), 1578 ) 1579 1580 return 1581 } 1582 1583 // TryGetTextFieldBounds calls the function "WEBEXT.inputMethodPrivate.getTextFieldBounds" 1584 // in a try/catch block and returns (_, err, ok = false) when it went through 1585 // the catch clause. 1586 func TryGetTextFieldBounds(parameters GetTextFieldBoundsArgParameters) (ret js.Promise[GetTextFieldBoundsReturnType], exception js.Any, ok bool) { 1587 ok = js.True == bindings.TryGetTextFieldBounds( 1588 js.Pointer(&ret), js.Pointer(&exception), 1589 js.Pointer(¶meters), 1590 ) 1591 1592 return 1593 } 1594 1595 // HasFuncHideInputView returns true if the function "WEBEXT.inputMethodPrivate.hideInputView" exists. 1596 func HasFuncHideInputView() bool { 1597 return js.True == bindings.HasFuncHideInputView() 1598 } 1599 1600 // FuncHideInputView returns the function "WEBEXT.inputMethodPrivate.hideInputView". 1601 func FuncHideInputView() (fn js.Func[func() js.Promise[js.Void]]) { 1602 bindings.FuncHideInputView( 1603 js.Pointer(&fn), 1604 ) 1605 return 1606 } 1607 1608 // HideInputView calls the function "WEBEXT.inputMethodPrivate.hideInputView" directly. 1609 func HideInputView() (ret js.Promise[js.Void]) { 1610 bindings.CallHideInputView( 1611 js.Pointer(&ret), 1612 ) 1613 1614 return 1615 } 1616 1617 // TryHideInputView calls the function "WEBEXT.inputMethodPrivate.hideInputView" 1618 // in a try/catch block and returns (_, err, ok = false) when it went through 1619 // the catch clause. 1620 func TryHideInputView() (ret js.Promise[js.Void], exception js.Any, ok bool) { 1621 ok = js.True == bindings.TryHideInputView( 1622 js.Pointer(&ret), js.Pointer(&exception), 1623 ) 1624 1625 return 1626 } 1627 1628 // HasFuncNotifyInputMethodReadyForTesting returns true if the function "WEBEXT.inputMethodPrivate.notifyInputMethodReadyForTesting" exists. 1629 func HasFuncNotifyInputMethodReadyForTesting() bool { 1630 return js.True == bindings.HasFuncNotifyInputMethodReadyForTesting() 1631 } 1632 1633 // FuncNotifyInputMethodReadyForTesting returns the function "WEBEXT.inputMethodPrivate.notifyInputMethodReadyForTesting". 1634 func FuncNotifyInputMethodReadyForTesting() (fn js.Func[func()]) { 1635 bindings.FuncNotifyInputMethodReadyForTesting( 1636 js.Pointer(&fn), 1637 ) 1638 return 1639 } 1640 1641 // NotifyInputMethodReadyForTesting calls the function "WEBEXT.inputMethodPrivate.notifyInputMethodReadyForTesting" directly. 1642 func NotifyInputMethodReadyForTesting() (ret js.Void) { 1643 bindings.CallNotifyInputMethodReadyForTesting( 1644 js.Pointer(&ret), 1645 ) 1646 1647 return 1648 } 1649 1650 // TryNotifyInputMethodReadyForTesting calls the function "WEBEXT.inputMethodPrivate.notifyInputMethodReadyForTesting" 1651 // in a try/catch block and returns (_, err, ok = false) when it went through 1652 // the catch clause. 1653 func TryNotifyInputMethodReadyForTesting() (ret js.Void, exception js.Any, ok bool) { 1654 ok = js.True == bindings.TryNotifyInputMethodReadyForTesting( 1655 js.Pointer(&ret), js.Pointer(&exception), 1656 ) 1657 1658 return 1659 } 1660 1661 // HasFuncOnAutocorrect returns true if the function "WEBEXT.inputMethodPrivate.onAutocorrect" exists. 1662 func HasFuncOnAutocorrect() bool { 1663 return js.True == bindings.HasFuncOnAutocorrect() 1664 } 1665 1666 // FuncOnAutocorrect returns the function "WEBEXT.inputMethodPrivate.onAutocorrect". 1667 func FuncOnAutocorrect() (fn js.Func[func(parameters OnAutocorrectArgParameters)]) { 1668 bindings.FuncOnAutocorrect( 1669 js.Pointer(&fn), 1670 ) 1671 return 1672 } 1673 1674 // OnAutocorrect calls the function "WEBEXT.inputMethodPrivate.onAutocorrect" directly. 1675 func OnAutocorrect(parameters OnAutocorrectArgParameters) (ret js.Void) { 1676 bindings.CallOnAutocorrect( 1677 js.Pointer(&ret), 1678 js.Pointer(¶meters), 1679 ) 1680 1681 return 1682 } 1683 1684 // TryOnAutocorrect calls the function "WEBEXT.inputMethodPrivate.onAutocorrect" 1685 // in a try/catch block and returns (_, err, ok = false) when it went through 1686 // the catch clause. 1687 func TryOnAutocorrect(parameters OnAutocorrectArgParameters) (ret js.Void, exception js.Any, ok bool) { 1688 ok = js.True == bindings.TryOnAutocorrect( 1689 js.Pointer(&ret), js.Pointer(&exception), 1690 js.Pointer(¶meters), 1691 ) 1692 1693 return 1694 } 1695 1696 type OnCaretBoundsChangedEventCallbackFunc func(this js.Ref, caretBounds *OnCaretBoundsChangedArgCaretBounds) js.Ref 1697 1698 func (fn OnCaretBoundsChangedEventCallbackFunc) Register() js.Func[func(caretBounds *OnCaretBoundsChangedArgCaretBounds)] { 1699 return js.RegisterCallback[func(caretBounds *OnCaretBoundsChangedArgCaretBounds)]( 1700 fn, abi.FuncPCABIInternal(fn), 1701 ) 1702 } 1703 1704 func (fn OnCaretBoundsChangedEventCallbackFunc) DispatchCallback( 1705 targetPC uintptr, ctx *js.CallbackContext, 1706 ) { 1707 args := ctx.Args() 1708 if len(args) != 1+1 /* js this */ || 1709 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 1710 js.ThrowInvalidCallbackInvocation() 1711 } 1712 var arg0 OnCaretBoundsChangedArgCaretBounds 1713 arg0.UpdateFrom(args[0+1]) 1714 defer arg0.FreeMembers(true) 1715 1716 if ctx.Return(fn( 1717 args[0], 1718 1719 mark.NoEscape(&arg0), 1720 )) { 1721 return 1722 } 1723 1724 js.ThrowCallbackValueNotReturned() 1725 } 1726 1727 type OnCaretBoundsChangedEventCallback[T any] struct { 1728 Fn func(arg T, this js.Ref, caretBounds *OnCaretBoundsChangedArgCaretBounds) js.Ref 1729 Arg T 1730 } 1731 1732 func (cb *OnCaretBoundsChangedEventCallback[T]) Register() js.Func[func(caretBounds *OnCaretBoundsChangedArgCaretBounds)] { 1733 return js.RegisterCallback[func(caretBounds *OnCaretBoundsChangedArgCaretBounds)]( 1734 cb, abi.FuncPCABIInternal(cb.Fn), 1735 ) 1736 } 1737 1738 func (cb *OnCaretBoundsChangedEventCallback[T]) DispatchCallback( 1739 targetPC uintptr, ctx *js.CallbackContext, 1740 ) { 1741 args := ctx.Args() 1742 if len(args) != 1+1 /* js this */ || 1743 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 1744 js.ThrowInvalidCallbackInvocation() 1745 } 1746 var arg0 OnCaretBoundsChangedArgCaretBounds 1747 arg0.UpdateFrom(args[0+1]) 1748 defer arg0.FreeMembers(true) 1749 1750 if ctx.Return(cb.Fn( 1751 cb.Arg, 1752 args[0], 1753 1754 mark.NoEscape(&arg0), 1755 )) { 1756 return 1757 } 1758 1759 js.ThrowCallbackValueNotReturned() 1760 } 1761 1762 // HasFuncOnCaretBoundsChanged returns true if the function "WEBEXT.inputMethodPrivate.onCaretBoundsChanged.addListener" exists. 1763 func HasFuncOnCaretBoundsChanged() bool { 1764 return js.True == bindings.HasFuncOnCaretBoundsChanged() 1765 } 1766 1767 // FuncOnCaretBoundsChanged returns the function "WEBEXT.inputMethodPrivate.onCaretBoundsChanged.addListener". 1768 func FuncOnCaretBoundsChanged() (fn js.Func[func(callback js.Func[func(caretBounds *OnCaretBoundsChangedArgCaretBounds)])]) { 1769 bindings.FuncOnCaretBoundsChanged( 1770 js.Pointer(&fn), 1771 ) 1772 return 1773 } 1774 1775 // OnCaretBoundsChanged calls the function "WEBEXT.inputMethodPrivate.onCaretBoundsChanged.addListener" directly. 1776 func OnCaretBoundsChanged(callback js.Func[func(caretBounds *OnCaretBoundsChangedArgCaretBounds)]) (ret js.Void) { 1777 bindings.CallOnCaretBoundsChanged( 1778 js.Pointer(&ret), 1779 callback.Ref(), 1780 ) 1781 1782 return 1783 } 1784 1785 // TryOnCaretBoundsChanged calls the function "WEBEXT.inputMethodPrivate.onCaretBoundsChanged.addListener" 1786 // in a try/catch block and returns (_, err, ok = false) when it went through 1787 // the catch clause. 1788 func TryOnCaretBoundsChanged(callback js.Func[func(caretBounds *OnCaretBoundsChangedArgCaretBounds)]) (ret js.Void, exception js.Any, ok bool) { 1789 ok = js.True == bindings.TryOnCaretBoundsChanged( 1790 js.Pointer(&ret), js.Pointer(&exception), 1791 callback.Ref(), 1792 ) 1793 1794 return 1795 } 1796 1797 // HasFuncOffCaretBoundsChanged returns true if the function "WEBEXT.inputMethodPrivate.onCaretBoundsChanged.removeListener" exists. 1798 func HasFuncOffCaretBoundsChanged() bool { 1799 return js.True == bindings.HasFuncOffCaretBoundsChanged() 1800 } 1801 1802 // FuncOffCaretBoundsChanged returns the function "WEBEXT.inputMethodPrivate.onCaretBoundsChanged.removeListener". 1803 func FuncOffCaretBoundsChanged() (fn js.Func[func(callback js.Func[func(caretBounds *OnCaretBoundsChangedArgCaretBounds)])]) { 1804 bindings.FuncOffCaretBoundsChanged( 1805 js.Pointer(&fn), 1806 ) 1807 return 1808 } 1809 1810 // OffCaretBoundsChanged calls the function "WEBEXT.inputMethodPrivate.onCaretBoundsChanged.removeListener" directly. 1811 func OffCaretBoundsChanged(callback js.Func[func(caretBounds *OnCaretBoundsChangedArgCaretBounds)]) (ret js.Void) { 1812 bindings.CallOffCaretBoundsChanged( 1813 js.Pointer(&ret), 1814 callback.Ref(), 1815 ) 1816 1817 return 1818 } 1819 1820 // TryOffCaretBoundsChanged calls the function "WEBEXT.inputMethodPrivate.onCaretBoundsChanged.removeListener" 1821 // in a try/catch block and returns (_, err, ok = false) when it went through 1822 // the catch clause. 1823 func TryOffCaretBoundsChanged(callback js.Func[func(caretBounds *OnCaretBoundsChangedArgCaretBounds)]) (ret js.Void, exception js.Any, ok bool) { 1824 ok = js.True == bindings.TryOffCaretBoundsChanged( 1825 js.Pointer(&ret), js.Pointer(&exception), 1826 callback.Ref(), 1827 ) 1828 1829 return 1830 } 1831 1832 // HasFuncHasOnCaretBoundsChanged returns true if the function "WEBEXT.inputMethodPrivate.onCaretBoundsChanged.hasListener" exists. 1833 func HasFuncHasOnCaretBoundsChanged() bool { 1834 return js.True == bindings.HasFuncHasOnCaretBoundsChanged() 1835 } 1836 1837 // FuncHasOnCaretBoundsChanged returns the function "WEBEXT.inputMethodPrivate.onCaretBoundsChanged.hasListener". 1838 func FuncHasOnCaretBoundsChanged() (fn js.Func[func(callback js.Func[func(caretBounds *OnCaretBoundsChangedArgCaretBounds)]) bool]) { 1839 bindings.FuncHasOnCaretBoundsChanged( 1840 js.Pointer(&fn), 1841 ) 1842 return 1843 } 1844 1845 // HasOnCaretBoundsChanged calls the function "WEBEXT.inputMethodPrivate.onCaretBoundsChanged.hasListener" directly. 1846 func HasOnCaretBoundsChanged(callback js.Func[func(caretBounds *OnCaretBoundsChangedArgCaretBounds)]) (ret bool) { 1847 bindings.CallHasOnCaretBoundsChanged( 1848 js.Pointer(&ret), 1849 callback.Ref(), 1850 ) 1851 1852 return 1853 } 1854 1855 // TryHasOnCaretBoundsChanged calls the function "WEBEXT.inputMethodPrivate.onCaretBoundsChanged.hasListener" 1856 // in a try/catch block and returns (_, err, ok = false) when it went through 1857 // the catch clause. 1858 func TryHasOnCaretBoundsChanged(callback js.Func[func(caretBounds *OnCaretBoundsChangedArgCaretBounds)]) (ret bool, exception js.Any, ok bool) { 1859 ok = js.True == bindings.TryHasOnCaretBoundsChanged( 1860 js.Pointer(&ret), js.Pointer(&exception), 1861 callback.Ref(), 1862 ) 1863 1864 return 1865 } 1866 1867 type OnChangedEventCallbackFunc func(this js.Ref, newInputMethodId js.String) js.Ref 1868 1869 func (fn OnChangedEventCallbackFunc) Register() js.Func[func(newInputMethodId js.String)] { 1870 return js.RegisterCallback[func(newInputMethodId js.String)]( 1871 fn, abi.FuncPCABIInternal(fn), 1872 ) 1873 } 1874 1875 func (fn OnChangedEventCallbackFunc) DispatchCallback( 1876 targetPC uintptr, ctx *js.CallbackContext, 1877 ) { 1878 args := ctx.Args() 1879 if len(args) != 1+1 /* js this */ || 1880 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 1881 js.ThrowInvalidCallbackInvocation() 1882 } 1883 1884 if ctx.Return(fn( 1885 args[0], 1886 1887 js.String{}.FromRef(args[0+1]), 1888 )) { 1889 return 1890 } 1891 1892 js.ThrowCallbackValueNotReturned() 1893 } 1894 1895 type OnChangedEventCallback[T any] struct { 1896 Fn func(arg T, this js.Ref, newInputMethodId js.String) js.Ref 1897 Arg T 1898 } 1899 1900 func (cb *OnChangedEventCallback[T]) Register() js.Func[func(newInputMethodId js.String)] { 1901 return js.RegisterCallback[func(newInputMethodId js.String)]( 1902 cb, abi.FuncPCABIInternal(cb.Fn), 1903 ) 1904 } 1905 1906 func (cb *OnChangedEventCallback[T]) DispatchCallback( 1907 targetPC uintptr, ctx *js.CallbackContext, 1908 ) { 1909 args := ctx.Args() 1910 if len(args) != 1+1 /* js this */ || 1911 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 1912 js.ThrowInvalidCallbackInvocation() 1913 } 1914 1915 if ctx.Return(cb.Fn( 1916 cb.Arg, 1917 args[0], 1918 1919 js.String{}.FromRef(args[0+1]), 1920 )) { 1921 return 1922 } 1923 1924 js.ThrowCallbackValueNotReturned() 1925 } 1926 1927 // HasFuncOnChanged returns true if the function "WEBEXT.inputMethodPrivate.onChanged.addListener" exists. 1928 func HasFuncOnChanged() bool { 1929 return js.True == bindings.HasFuncOnChanged() 1930 } 1931 1932 // FuncOnChanged returns the function "WEBEXT.inputMethodPrivate.onChanged.addListener". 1933 func FuncOnChanged() (fn js.Func[func(callback js.Func[func(newInputMethodId js.String)])]) { 1934 bindings.FuncOnChanged( 1935 js.Pointer(&fn), 1936 ) 1937 return 1938 } 1939 1940 // OnChanged calls the function "WEBEXT.inputMethodPrivate.onChanged.addListener" directly. 1941 func OnChanged(callback js.Func[func(newInputMethodId js.String)]) (ret js.Void) { 1942 bindings.CallOnChanged( 1943 js.Pointer(&ret), 1944 callback.Ref(), 1945 ) 1946 1947 return 1948 } 1949 1950 // TryOnChanged calls the function "WEBEXT.inputMethodPrivate.onChanged.addListener" 1951 // in a try/catch block and returns (_, err, ok = false) when it went through 1952 // the catch clause. 1953 func TryOnChanged(callback js.Func[func(newInputMethodId js.String)]) (ret js.Void, exception js.Any, ok bool) { 1954 ok = js.True == bindings.TryOnChanged( 1955 js.Pointer(&ret), js.Pointer(&exception), 1956 callback.Ref(), 1957 ) 1958 1959 return 1960 } 1961 1962 // HasFuncOffChanged returns true if the function "WEBEXT.inputMethodPrivate.onChanged.removeListener" exists. 1963 func HasFuncOffChanged() bool { 1964 return js.True == bindings.HasFuncOffChanged() 1965 } 1966 1967 // FuncOffChanged returns the function "WEBEXT.inputMethodPrivate.onChanged.removeListener". 1968 func FuncOffChanged() (fn js.Func[func(callback js.Func[func(newInputMethodId js.String)])]) { 1969 bindings.FuncOffChanged( 1970 js.Pointer(&fn), 1971 ) 1972 return 1973 } 1974 1975 // OffChanged calls the function "WEBEXT.inputMethodPrivate.onChanged.removeListener" directly. 1976 func OffChanged(callback js.Func[func(newInputMethodId js.String)]) (ret js.Void) { 1977 bindings.CallOffChanged( 1978 js.Pointer(&ret), 1979 callback.Ref(), 1980 ) 1981 1982 return 1983 } 1984 1985 // TryOffChanged calls the function "WEBEXT.inputMethodPrivate.onChanged.removeListener" 1986 // in a try/catch block and returns (_, err, ok = false) when it went through 1987 // the catch clause. 1988 func TryOffChanged(callback js.Func[func(newInputMethodId js.String)]) (ret js.Void, exception js.Any, ok bool) { 1989 ok = js.True == bindings.TryOffChanged( 1990 js.Pointer(&ret), js.Pointer(&exception), 1991 callback.Ref(), 1992 ) 1993 1994 return 1995 } 1996 1997 // HasFuncHasOnChanged returns true if the function "WEBEXT.inputMethodPrivate.onChanged.hasListener" exists. 1998 func HasFuncHasOnChanged() bool { 1999 return js.True == bindings.HasFuncHasOnChanged() 2000 } 2001 2002 // FuncHasOnChanged returns the function "WEBEXT.inputMethodPrivate.onChanged.hasListener". 2003 func FuncHasOnChanged() (fn js.Func[func(callback js.Func[func(newInputMethodId js.String)]) bool]) { 2004 bindings.FuncHasOnChanged( 2005 js.Pointer(&fn), 2006 ) 2007 return 2008 } 2009 2010 // HasOnChanged calls the function "WEBEXT.inputMethodPrivate.onChanged.hasListener" directly. 2011 func HasOnChanged(callback js.Func[func(newInputMethodId js.String)]) (ret bool) { 2012 bindings.CallHasOnChanged( 2013 js.Pointer(&ret), 2014 callback.Ref(), 2015 ) 2016 2017 return 2018 } 2019 2020 // TryHasOnChanged calls the function "WEBEXT.inputMethodPrivate.onChanged.hasListener" 2021 // in a try/catch block and returns (_, err, ok = false) when it went through 2022 // the catch clause. 2023 func TryHasOnChanged(callback js.Func[func(newInputMethodId js.String)]) (ret bool, exception js.Any, ok bool) { 2024 ok = js.True == bindings.TryHasOnChanged( 2025 js.Pointer(&ret), js.Pointer(&exception), 2026 callback.Ref(), 2027 ) 2028 2029 return 2030 } 2031 2032 type OnDictionaryChangedEventCallbackFunc func(this js.Ref, added js.Array[js.String], removed js.Array[js.String]) js.Ref 2033 2034 func (fn OnDictionaryChangedEventCallbackFunc) Register() js.Func[func(added js.Array[js.String], removed js.Array[js.String])] { 2035 return js.RegisterCallback[func(added js.Array[js.String], removed js.Array[js.String])]( 2036 fn, abi.FuncPCABIInternal(fn), 2037 ) 2038 } 2039 2040 func (fn OnDictionaryChangedEventCallbackFunc) DispatchCallback( 2041 targetPC uintptr, ctx *js.CallbackContext, 2042 ) { 2043 args := ctx.Args() 2044 if len(args) != 2+1 /* js this */ || 2045 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 2046 js.ThrowInvalidCallbackInvocation() 2047 } 2048 2049 if ctx.Return(fn( 2050 args[0], 2051 2052 js.Array[js.String]{}.FromRef(args[0+1]), 2053 js.Array[js.String]{}.FromRef(args[1+1]), 2054 )) { 2055 return 2056 } 2057 2058 js.ThrowCallbackValueNotReturned() 2059 } 2060 2061 type OnDictionaryChangedEventCallback[T any] struct { 2062 Fn func(arg T, this js.Ref, added js.Array[js.String], removed js.Array[js.String]) js.Ref 2063 Arg T 2064 } 2065 2066 func (cb *OnDictionaryChangedEventCallback[T]) Register() js.Func[func(added js.Array[js.String], removed js.Array[js.String])] { 2067 return js.RegisterCallback[func(added js.Array[js.String], removed js.Array[js.String])]( 2068 cb, abi.FuncPCABIInternal(cb.Fn), 2069 ) 2070 } 2071 2072 func (cb *OnDictionaryChangedEventCallback[T]) DispatchCallback( 2073 targetPC uintptr, ctx *js.CallbackContext, 2074 ) { 2075 args := ctx.Args() 2076 if len(args) != 2+1 /* js this */ || 2077 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 2078 js.ThrowInvalidCallbackInvocation() 2079 } 2080 2081 if ctx.Return(cb.Fn( 2082 cb.Arg, 2083 args[0], 2084 2085 js.Array[js.String]{}.FromRef(args[0+1]), 2086 js.Array[js.String]{}.FromRef(args[1+1]), 2087 )) { 2088 return 2089 } 2090 2091 js.ThrowCallbackValueNotReturned() 2092 } 2093 2094 // HasFuncOnDictionaryChanged returns true if the function "WEBEXT.inputMethodPrivate.onDictionaryChanged.addListener" exists. 2095 func HasFuncOnDictionaryChanged() bool { 2096 return js.True == bindings.HasFuncOnDictionaryChanged() 2097 } 2098 2099 // FuncOnDictionaryChanged returns the function "WEBEXT.inputMethodPrivate.onDictionaryChanged.addListener". 2100 func FuncOnDictionaryChanged() (fn js.Func[func(callback js.Func[func(added js.Array[js.String], removed js.Array[js.String])])]) { 2101 bindings.FuncOnDictionaryChanged( 2102 js.Pointer(&fn), 2103 ) 2104 return 2105 } 2106 2107 // OnDictionaryChanged calls the function "WEBEXT.inputMethodPrivate.onDictionaryChanged.addListener" directly. 2108 func OnDictionaryChanged(callback js.Func[func(added js.Array[js.String], removed js.Array[js.String])]) (ret js.Void) { 2109 bindings.CallOnDictionaryChanged( 2110 js.Pointer(&ret), 2111 callback.Ref(), 2112 ) 2113 2114 return 2115 } 2116 2117 // TryOnDictionaryChanged calls the function "WEBEXT.inputMethodPrivate.onDictionaryChanged.addListener" 2118 // in a try/catch block and returns (_, err, ok = false) when it went through 2119 // the catch clause. 2120 func TryOnDictionaryChanged(callback js.Func[func(added js.Array[js.String], removed js.Array[js.String])]) (ret js.Void, exception js.Any, ok bool) { 2121 ok = js.True == bindings.TryOnDictionaryChanged( 2122 js.Pointer(&ret), js.Pointer(&exception), 2123 callback.Ref(), 2124 ) 2125 2126 return 2127 } 2128 2129 // HasFuncOffDictionaryChanged returns true if the function "WEBEXT.inputMethodPrivate.onDictionaryChanged.removeListener" exists. 2130 func HasFuncOffDictionaryChanged() bool { 2131 return js.True == bindings.HasFuncOffDictionaryChanged() 2132 } 2133 2134 // FuncOffDictionaryChanged returns the function "WEBEXT.inputMethodPrivate.onDictionaryChanged.removeListener". 2135 func FuncOffDictionaryChanged() (fn js.Func[func(callback js.Func[func(added js.Array[js.String], removed js.Array[js.String])])]) { 2136 bindings.FuncOffDictionaryChanged( 2137 js.Pointer(&fn), 2138 ) 2139 return 2140 } 2141 2142 // OffDictionaryChanged calls the function "WEBEXT.inputMethodPrivate.onDictionaryChanged.removeListener" directly. 2143 func OffDictionaryChanged(callback js.Func[func(added js.Array[js.String], removed js.Array[js.String])]) (ret js.Void) { 2144 bindings.CallOffDictionaryChanged( 2145 js.Pointer(&ret), 2146 callback.Ref(), 2147 ) 2148 2149 return 2150 } 2151 2152 // TryOffDictionaryChanged calls the function "WEBEXT.inputMethodPrivate.onDictionaryChanged.removeListener" 2153 // in a try/catch block and returns (_, err, ok = false) when it went through 2154 // the catch clause. 2155 func TryOffDictionaryChanged(callback js.Func[func(added js.Array[js.String], removed js.Array[js.String])]) (ret js.Void, exception js.Any, ok bool) { 2156 ok = js.True == bindings.TryOffDictionaryChanged( 2157 js.Pointer(&ret), js.Pointer(&exception), 2158 callback.Ref(), 2159 ) 2160 2161 return 2162 } 2163 2164 // HasFuncHasOnDictionaryChanged returns true if the function "WEBEXT.inputMethodPrivate.onDictionaryChanged.hasListener" exists. 2165 func HasFuncHasOnDictionaryChanged() bool { 2166 return js.True == bindings.HasFuncHasOnDictionaryChanged() 2167 } 2168 2169 // FuncHasOnDictionaryChanged returns the function "WEBEXT.inputMethodPrivate.onDictionaryChanged.hasListener". 2170 func FuncHasOnDictionaryChanged() (fn js.Func[func(callback js.Func[func(added js.Array[js.String], removed js.Array[js.String])]) bool]) { 2171 bindings.FuncHasOnDictionaryChanged( 2172 js.Pointer(&fn), 2173 ) 2174 return 2175 } 2176 2177 // HasOnDictionaryChanged calls the function "WEBEXT.inputMethodPrivate.onDictionaryChanged.hasListener" directly. 2178 func HasOnDictionaryChanged(callback js.Func[func(added js.Array[js.String], removed js.Array[js.String])]) (ret bool) { 2179 bindings.CallHasOnDictionaryChanged( 2180 js.Pointer(&ret), 2181 callback.Ref(), 2182 ) 2183 2184 return 2185 } 2186 2187 // TryHasOnDictionaryChanged calls the function "WEBEXT.inputMethodPrivate.onDictionaryChanged.hasListener" 2188 // in a try/catch block and returns (_, err, ok = false) when it went through 2189 // the catch clause. 2190 func TryHasOnDictionaryChanged(callback js.Func[func(added js.Array[js.String], removed js.Array[js.String])]) (ret bool, exception js.Any, ok bool) { 2191 ok = js.True == bindings.TryHasOnDictionaryChanged( 2192 js.Pointer(&ret), js.Pointer(&exception), 2193 callback.Ref(), 2194 ) 2195 2196 return 2197 } 2198 2199 type OnDictionaryLoadedEventCallbackFunc func(this js.Ref) js.Ref 2200 2201 func (fn OnDictionaryLoadedEventCallbackFunc) Register() js.Func[func()] { 2202 return js.RegisterCallback[func()]( 2203 fn, abi.FuncPCABIInternal(fn), 2204 ) 2205 } 2206 2207 func (fn OnDictionaryLoadedEventCallbackFunc) DispatchCallback( 2208 targetPC uintptr, ctx *js.CallbackContext, 2209 ) { 2210 args := ctx.Args() 2211 if len(args) != 0+1 /* js this */ || 2212 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 2213 js.ThrowInvalidCallbackInvocation() 2214 } 2215 2216 if ctx.Return(fn( 2217 args[0], 2218 )) { 2219 return 2220 } 2221 2222 js.ThrowCallbackValueNotReturned() 2223 } 2224 2225 type OnDictionaryLoadedEventCallback[T any] struct { 2226 Fn func(arg T, this js.Ref) js.Ref 2227 Arg T 2228 } 2229 2230 func (cb *OnDictionaryLoadedEventCallback[T]) Register() js.Func[func()] { 2231 return js.RegisterCallback[func()]( 2232 cb, abi.FuncPCABIInternal(cb.Fn), 2233 ) 2234 } 2235 2236 func (cb *OnDictionaryLoadedEventCallback[T]) DispatchCallback( 2237 targetPC uintptr, ctx *js.CallbackContext, 2238 ) { 2239 args := ctx.Args() 2240 if len(args) != 0+1 /* js this */ || 2241 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 2242 js.ThrowInvalidCallbackInvocation() 2243 } 2244 2245 if ctx.Return(cb.Fn( 2246 cb.Arg, 2247 args[0], 2248 )) { 2249 return 2250 } 2251 2252 js.ThrowCallbackValueNotReturned() 2253 } 2254 2255 // HasFuncOnDictionaryLoaded returns true if the function "WEBEXT.inputMethodPrivate.onDictionaryLoaded.addListener" exists. 2256 func HasFuncOnDictionaryLoaded() bool { 2257 return js.True == bindings.HasFuncOnDictionaryLoaded() 2258 } 2259 2260 // FuncOnDictionaryLoaded returns the function "WEBEXT.inputMethodPrivate.onDictionaryLoaded.addListener". 2261 func FuncOnDictionaryLoaded() (fn js.Func[func(callback js.Func[func()])]) { 2262 bindings.FuncOnDictionaryLoaded( 2263 js.Pointer(&fn), 2264 ) 2265 return 2266 } 2267 2268 // OnDictionaryLoaded calls the function "WEBEXT.inputMethodPrivate.onDictionaryLoaded.addListener" directly. 2269 func OnDictionaryLoaded(callback js.Func[func()]) (ret js.Void) { 2270 bindings.CallOnDictionaryLoaded( 2271 js.Pointer(&ret), 2272 callback.Ref(), 2273 ) 2274 2275 return 2276 } 2277 2278 // TryOnDictionaryLoaded calls the function "WEBEXT.inputMethodPrivate.onDictionaryLoaded.addListener" 2279 // in a try/catch block and returns (_, err, ok = false) when it went through 2280 // the catch clause. 2281 func TryOnDictionaryLoaded(callback js.Func[func()]) (ret js.Void, exception js.Any, ok bool) { 2282 ok = js.True == bindings.TryOnDictionaryLoaded( 2283 js.Pointer(&ret), js.Pointer(&exception), 2284 callback.Ref(), 2285 ) 2286 2287 return 2288 } 2289 2290 // HasFuncOffDictionaryLoaded returns true if the function "WEBEXT.inputMethodPrivate.onDictionaryLoaded.removeListener" exists. 2291 func HasFuncOffDictionaryLoaded() bool { 2292 return js.True == bindings.HasFuncOffDictionaryLoaded() 2293 } 2294 2295 // FuncOffDictionaryLoaded returns the function "WEBEXT.inputMethodPrivate.onDictionaryLoaded.removeListener". 2296 func FuncOffDictionaryLoaded() (fn js.Func[func(callback js.Func[func()])]) { 2297 bindings.FuncOffDictionaryLoaded( 2298 js.Pointer(&fn), 2299 ) 2300 return 2301 } 2302 2303 // OffDictionaryLoaded calls the function "WEBEXT.inputMethodPrivate.onDictionaryLoaded.removeListener" directly. 2304 func OffDictionaryLoaded(callback js.Func[func()]) (ret js.Void) { 2305 bindings.CallOffDictionaryLoaded( 2306 js.Pointer(&ret), 2307 callback.Ref(), 2308 ) 2309 2310 return 2311 } 2312 2313 // TryOffDictionaryLoaded calls the function "WEBEXT.inputMethodPrivate.onDictionaryLoaded.removeListener" 2314 // in a try/catch block and returns (_, err, ok = false) when it went through 2315 // the catch clause. 2316 func TryOffDictionaryLoaded(callback js.Func[func()]) (ret js.Void, exception js.Any, ok bool) { 2317 ok = js.True == bindings.TryOffDictionaryLoaded( 2318 js.Pointer(&ret), js.Pointer(&exception), 2319 callback.Ref(), 2320 ) 2321 2322 return 2323 } 2324 2325 // HasFuncHasOnDictionaryLoaded returns true if the function "WEBEXT.inputMethodPrivate.onDictionaryLoaded.hasListener" exists. 2326 func HasFuncHasOnDictionaryLoaded() bool { 2327 return js.True == bindings.HasFuncHasOnDictionaryLoaded() 2328 } 2329 2330 // FuncHasOnDictionaryLoaded returns the function "WEBEXT.inputMethodPrivate.onDictionaryLoaded.hasListener". 2331 func FuncHasOnDictionaryLoaded() (fn js.Func[func(callback js.Func[func()]) bool]) { 2332 bindings.FuncHasOnDictionaryLoaded( 2333 js.Pointer(&fn), 2334 ) 2335 return 2336 } 2337 2338 // HasOnDictionaryLoaded calls the function "WEBEXT.inputMethodPrivate.onDictionaryLoaded.hasListener" directly. 2339 func HasOnDictionaryLoaded(callback js.Func[func()]) (ret bool) { 2340 bindings.CallHasOnDictionaryLoaded( 2341 js.Pointer(&ret), 2342 callback.Ref(), 2343 ) 2344 2345 return 2346 } 2347 2348 // TryHasOnDictionaryLoaded calls the function "WEBEXT.inputMethodPrivate.onDictionaryLoaded.hasListener" 2349 // in a try/catch block and returns (_, err, ok = false) when it went through 2350 // the catch clause. 2351 func TryHasOnDictionaryLoaded(callback js.Func[func()]) (ret bool, exception js.Any, ok bool) { 2352 ok = js.True == bindings.TryHasOnDictionaryLoaded( 2353 js.Pointer(&ret), js.Pointer(&exception), 2354 callback.Ref(), 2355 ) 2356 2357 return 2358 } 2359 2360 type OnFocusEventCallbackFunc func(this js.Ref, context *InputContext) js.Ref 2361 2362 func (fn OnFocusEventCallbackFunc) Register() js.Func[func(context *InputContext)] { 2363 return js.RegisterCallback[func(context *InputContext)]( 2364 fn, abi.FuncPCABIInternal(fn), 2365 ) 2366 } 2367 2368 func (fn OnFocusEventCallbackFunc) DispatchCallback( 2369 targetPC uintptr, ctx *js.CallbackContext, 2370 ) { 2371 args := ctx.Args() 2372 if len(args) != 1+1 /* js this */ || 2373 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 2374 js.ThrowInvalidCallbackInvocation() 2375 } 2376 var arg0 InputContext 2377 arg0.UpdateFrom(args[0+1]) 2378 defer arg0.FreeMembers(true) 2379 2380 if ctx.Return(fn( 2381 args[0], 2382 2383 mark.NoEscape(&arg0), 2384 )) { 2385 return 2386 } 2387 2388 js.ThrowCallbackValueNotReturned() 2389 } 2390 2391 type OnFocusEventCallback[T any] struct { 2392 Fn func(arg T, this js.Ref, context *InputContext) js.Ref 2393 Arg T 2394 } 2395 2396 func (cb *OnFocusEventCallback[T]) Register() js.Func[func(context *InputContext)] { 2397 return js.RegisterCallback[func(context *InputContext)]( 2398 cb, abi.FuncPCABIInternal(cb.Fn), 2399 ) 2400 } 2401 2402 func (cb *OnFocusEventCallback[T]) DispatchCallback( 2403 targetPC uintptr, ctx *js.CallbackContext, 2404 ) { 2405 args := ctx.Args() 2406 if len(args) != 1+1 /* js this */ || 2407 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 2408 js.ThrowInvalidCallbackInvocation() 2409 } 2410 var arg0 InputContext 2411 arg0.UpdateFrom(args[0+1]) 2412 defer arg0.FreeMembers(true) 2413 2414 if ctx.Return(cb.Fn( 2415 cb.Arg, 2416 args[0], 2417 2418 mark.NoEscape(&arg0), 2419 )) { 2420 return 2421 } 2422 2423 js.ThrowCallbackValueNotReturned() 2424 } 2425 2426 // HasFuncOnFocus returns true if the function "WEBEXT.inputMethodPrivate.onFocus.addListener" exists. 2427 func HasFuncOnFocus() bool { 2428 return js.True == bindings.HasFuncOnFocus() 2429 } 2430 2431 // FuncOnFocus returns the function "WEBEXT.inputMethodPrivate.onFocus.addListener". 2432 func FuncOnFocus() (fn js.Func[func(callback js.Func[func(context *InputContext)])]) { 2433 bindings.FuncOnFocus( 2434 js.Pointer(&fn), 2435 ) 2436 return 2437 } 2438 2439 // OnFocus calls the function "WEBEXT.inputMethodPrivate.onFocus.addListener" directly. 2440 func OnFocus(callback js.Func[func(context *InputContext)]) (ret js.Void) { 2441 bindings.CallOnFocus( 2442 js.Pointer(&ret), 2443 callback.Ref(), 2444 ) 2445 2446 return 2447 } 2448 2449 // TryOnFocus calls the function "WEBEXT.inputMethodPrivate.onFocus.addListener" 2450 // in a try/catch block and returns (_, err, ok = false) when it went through 2451 // the catch clause. 2452 func TryOnFocus(callback js.Func[func(context *InputContext)]) (ret js.Void, exception js.Any, ok bool) { 2453 ok = js.True == bindings.TryOnFocus( 2454 js.Pointer(&ret), js.Pointer(&exception), 2455 callback.Ref(), 2456 ) 2457 2458 return 2459 } 2460 2461 // HasFuncOffFocus returns true if the function "WEBEXT.inputMethodPrivate.onFocus.removeListener" exists. 2462 func HasFuncOffFocus() bool { 2463 return js.True == bindings.HasFuncOffFocus() 2464 } 2465 2466 // FuncOffFocus returns the function "WEBEXT.inputMethodPrivate.onFocus.removeListener". 2467 func FuncOffFocus() (fn js.Func[func(callback js.Func[func(context *InputContext)])]) { 2468 bindings.FuncOffFocus( 2469 js.Pointer(&fn), 2470 ) 2471 return 2472 } 2473 2474 // OffFocus calls the function "WEBEXT.inputMethodPrivate.onFocus.removeListener" directly. 2475 func OffFocus(callback js.Func[func(context *InputContext)]) (ret js.Void) { 2476 bindings.CallOffFocus( 2477 js.Pointer(&ret), 2478 callback.Ref(), 2479 ) 2480 2481 return 2482 } 2483 2484 // TryOffFocus calls the function "WEBEXT.inputMethodPrivate.onFocus.removeListener" 2485 // in a try/catch block and returns (_, err, ok = false) when it went through 2486 // the catch clause. 2487 func TryOffFocus(callback js.Func[func(context *InputContext)]) (ret js.Void, exception js.Any, ok bool) { 2488 ok = js.True == bindings.TryOffFocus( 2489 js.Pointer(&ret), js.Pointer(&exception), 2490 callback.Ref(), 2491 ) 2492 2493 return 2494 } 2495 2496 // HasFuncHasOnFocus returns true if the function "WEBEXT.inputMethodPrivate.onFocus.hasListener" exists. 2497 func HasFuncHasOnFocus() bool { 2498 return js.True == bindings.HasFuncHasOnFocus() 2499 } 2500 2501 // FuncHasOnFocus returns the function "WEBEXT.inputMethodPrivate.onFocus.hasListener". 2502 func FuncHasOnFocus() (fn js.Func[func(callback js.Func[func(context *InputContext)]) bool]) { 2503 bindings.FuncHasOnFocus( 2504 js.Pointer(&fn), 2505 ) 2506 return 2507 } 2508 2509 // HasOnFocus calls the function "WEBEXT.inputMethodPrivate.onFocus.hasListener" directly. 2510 func HasOnFocus(callback js.Func[func(context *InputContext)]) (ret bool) { 2511 bindings.CallHasOnFocus( 2512 js.Pointer(&ret), 2513 callback.Ref(), 2514 ) 2515 2516 return 2517 } 2518 2519 // TryHasOnFocus calls the function "WEBEXT.inputMethodPrivate.onFocus.hasListener" 2520 // in a try/catch block and returns (_, err, ok = false) when it went through 2521 // the catch clause. 2522 func TryHasOnFocus(callback js.Func[func(context *InputContext)]) (ret bool, exception js.Any, ok bool) { 2523 ok = js.True == bindings.TryHasOnFocus( 2524 js.Pointer(&ret), js.Pointer(&exception), 2525 callback.Ref(), 2526 ) 2527 2528 return 2529 } 2530 2531 type OnImeMenuActivationChangedEventCallbackFunc func(this js.Ref, activation bool) js.Ref 2532 2533 func (fn OnImeMenuActivationChangedEventCallbackFunc) Register() js.Func[func(activation bool)] { 2534 return js.RegisterCallback[func(activation bool)]( 2535 fn, abi.FuncPCABIInternal(fn), 2536 ) 2537 } 2538 2539 func (fn OnImeMenuActivationChangedEventCallbackFunc) DispatchCallback( 2540 targetPC uintptr, ctx *js.CallbackContext, 2541 ) { 2542 args := ctx.Args() 2543 if len(args) != 1+1 /* js this */ || 2544 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 2545 js.ThrowInvalidCallbackInvocation() 2546 } 2547 2548 if ctx.Return(fn( 2549 args[0], 2550 2551 args[0+1] == js.True, 2552 )) { 2553 return 2554 } 2555 2556 js.ThrowCallbackValueNotReturned() 2557 } 2558 2559 type OnImeMenuActivationChangedEventCallback[T any] struct { 2560 Fn func(arg T, this js.Ref, activation bool) js.Ref 2561 Arg T 2562 } 2563 2564 func (cb *OnImeMenuActivationChangedEventCallback[T]) Register() js.Func[func(activation bool)] { 2565 return js.RegisterCallback[func(activation bool)]( 2566 cb, abi.FuncPCABIInternal(cb.Fn), 2567 ) 2568 } 2569 2570 func (cb *OnImeMenuActivationChangedEventCallback[T]) 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(cb.Fn)) { 2576 js.ThrowInvalidCallbackInvocation() 2577 } 2578 2579 if ctx.Return(cb.Fn( 2580 cb.Arg, 2581 args[0], 2582 2583 args[0+1] == js.True, 2584 )) { 2585 return 2586 } 2587 2588 js.ThrowCallbackValueNotReturned() 2589 } 2590 2591 // HasFuncOnImeMenuActivationChanged returns true if the function "WEBEXT.inputMethodPrivate.onImeMenuActivationChanged.addListener" exists. 2592 func HasFuncOnImeMenuActivationChanged() bool { 2593 return js.True == bindings.HasFuncOnImeMenuActivationChanged() 2594 } 2595 2596 // FuncOnImeMenuActivationChanged returns the function "WEBEXT.inputMethodPrivate.onImeMenuActivationChanged.addListener". 2597 func FuncOnImeMenuActivationChanged() (fn js.Func[func(callback js.Func[func(activation bool)])]) { 2598 bindings.FuncOnImeMenuActivationChanged( 2599 js.Pointer(&fn), 2600 ) 2601 return 2602 } 2603 2604 // OnImeMenuActivationChanged calls the function "WEBEXT.inputMethodPrivate.onImeMenuActivationChanged.addListener" directly. 2605 func OnImeMenuActivationChanged(callback js.Func[func(activation bool)]) (ret js.Void) { 2606 bindings.CallOnImeMenuActivationChanged( 2607 js.Pointer(&ret), 2608 callback.Ref(), 2609 ) 2610 2611 return 2612 } 2613 2614 // TryOnImeMenuActivationChanged calls the function "WEBEXT.inputMethodPrivate.onImeMenuActivationChanged.addListener" 2615 // in a try/catch block and returns (_, err, ok = false) when it went through 2616 // the catch clause. 2617 func TryOnImeMenuActivationChanged(callback js.Func[func(activation bool)]) (ret js.Void, exception js.Any, ok bool) { 2618 ok = js.True == bindings.TryOnImeMenuActivationChanged( 2619 js.Pointer(&ret), js.Pointer(&exception), 2620 callback.Ref(), 2621 ) 2622 2623 return 2624 } 2625 2626 // HasFuncOffImeMenuActivationChanged returns true if the function "WEBEXT.inputMethodPrivate.onImeMenuActivationChanged.removeListener" exists. 2627 func HasFuncOffImeMenuActivationChanged() bool { 2628 return js.True == bindings.HasFuncOffImeMenuActivationChanged() 2629 } 2630 2631 // FuncOffImeMenuActivationChanged returns the function "WEBEXT.inputMethodPrivate.onImeMenuActivationChanged.removeListener". 2632 func FuncOffImeMenuActivationChanged() (fn js.Func[func(callback js.Func[func(activation bool)])]) { 2633 bindings.FuncOffImeMenuActivationChanged( 2634 js.Pointer(&fn), 2635 ) 2636 return 2637 } 2638 2639 // OffImeMenuActivationChanged calls the function "WEBEXT.inputMethodPrivate.onImeMenuActivationChanged.removeListener" directly. 2640 func OffImeMenuActivationChanged(callback js.Func[func(activation bool)]) (ret js.Void) { 2641 bindings.CallOffImeMenuActivationChanged( 2642 js.Pointer(&ret), 2643 callback.Ref(), 2644 ) 2645 2646 return 2647 } 2648 2649 // TryOffImeMenuActivationChanged calls the function "WEBEXT.inputMethodPrivate.onImeMenuActivationChanged.removeListener" 2650 // in a try/catch block and returns (_, err, ok = false) when it went through 2651 // the catch clause. 2652 func TryOffImeMenuActivationChanged(callback js.Func[func(activation bool)]) (ret js.Void, exception js.Any, ok bool) { 2653 ok = js.True == bindings.TryOffImeMenuActivationChanged( 2654 js.Pointer(&ret), js.Pointer(&exception), 2655 callback.Ref(), 2656 ) 2657 2658 return 2659 } 2660 2661 // HasFuncHasOnImeMenuActivationChanged returns true if the function "WEBEXT.inputMethodPrivate.onImeMenuActivationChanged.hasListener" exists. 2662 func HasFuncHasOnImeMenuActivationChanged() bool { 2663 return js.True == bindings.HasFuncHasOnImeMenuActivationChanged() 2664 } 2665 2666 // FuncHasOnImeMenuActivationChanged returns the function "WEBEXT.inputMethodPrivate.onImeMenuActivationChanged.hasListener". 2667 func FuncHasOnImeMenuActivationChanged() (fn js.Func[func(callback js.Func[func(activation bool)]) bool]) { 2668 bindings.FuncHasOnImeMenuActivationChanged( 2669 js.Pointer(&fn), 2670 ) 2671 return 2672 } 2673 2674 // HasOnImeMenuActivationChanged calls the function "WEBEXT.inputMethodPrivate.onImeMenuActivationChanged.hasListener" directly. 2675 func HasOnImeMenuActivationChanged(callback js.Func[func(activation bool)]) (ret bool) { 2676 bindings.CallHasOnImeMenuActivationChanged( 2677 js.Pointer(&ret), 2678 callback.Ref(), 2679 ) 2680 2681 return 2682 } 2683 2684 // TryHasOnImeMenuActivationChanged calls the function "WEBEXT.inputMethodPrivate.onImeMenuActivationChanged.hasListener" 2685 // in a try/catch block and returns (_, err, ok = false) when it went through 2686 // the catch clause. 2687 func TryHasOnImeMenuActivationChanged(callback js.Func[func(activation bool)]) (ret bool, exception js.Any, ok bool) { 2688 ok = js.True == bindings.TryHasOnImeMenuActivationChanged( 2689 js.Pointer(&ret), js.Pointer(&exception), 2690 callback.Ref(), 2691 ) 2692 2693 return 2694 } 2695 2696 type OnImeMenuItemsChangedEventCallbackFunc func(this js.Ref, engineID js.String, items js.Array[MenuItem]) js.Ref 2697 2698 func (fn OnImeMenuItemsChangedEventCallbackFunc) Register() js.Func[func(engineID js.String, items js.Array[MenuItem])] { 2699 return js.RegisterCallback[func(engineID js.String, items js.Array[MenuItem])]( 2700 fn, abi.FuncPCABIInternal(fn), 2701 ) 2702 } 2703 2704 func (fn OnImeMenuItemsChangedEventCallbackFunc) DispatchCallback( 2705 targetPC uintptr, ctx *js.CallbackContext, 2706 ) { 2707 args := ctx.Args() 2708 if len(args) != 2+1 /* js this */ || 2709 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 2710 js.ThrowInvalidCallbackInvocation() 2711 } 2712 2713 if ctx.Return(fn( 2714 args[0], 2715 2716 js.String{}.FromRef(args[0+1]), 2717 js.Array[MenuItem]{}.FromRef(args[1+1]), 2718 )) { 2719 return 2720 } 2721 2722 js.ThrowCallbackValueNotReturned() 2723 } 2724 2725 type OnImeMenuItemsChangedEventCallback[T any] struct { 2726 Fn func(arg T, this js.Ref, engineID js.String, items js.Array[MenuItem]) js.Ref 2727 Arg T 2728 } 2729 2730 func (cb *OnImeMenuItemsChangedEventCallback[T]) Register() js.Func[func(engineID js.String, items js.Array[MenuItem])] { 2731 return js.RegisterCallback[func(engineID js.String, items js.Array[MenuItem])]( 2732 cb, abi.FuncPCABIInternal(cb.Fn), 2733 ) 2734 } 2735 2736 func (cb *OnImeMenuItemsChangedEventCallback[T]) DispatchCallback( 2737 targetPC uintptr, ctx *js.CallbackContext, 2738 ) { 2739 args := ctx.Args() 2740 if len(args) != 2+1 /* js this */ || 2741 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 2742 js.ThrowInvalidCallbackInvocation() 2743 } 2744 2745 if ctx.Return(cb.Fn( 2746 cb.Arg, 2747 args[0], 2748 2749 js.String{}.FromRef(args[0+1]), 2750 js.Array[MenuItem]{}.FromRef(args[1+1]), 2751 )) { 2752 return 2753 } 2754 2755 js.ThrowCallbackValueNotReturned() 2756 } 2757 2758 // HasFuncOnImeMenuItemsChanged returns true if the function "WEBEXT.inputMethodPrivate.onImeMenuItemsChanged.addListener" exists. 2759 func HasFuncOnImeMenuItemsChanged() bool { 2760 return js.True == bindings.HasFuncOnImeMenuItemsChanged() 2761 } 2762 2763 // FuncOnImeMenuItemsChanged returns the function "WEBEXT.inputMethodPrivate.onImeMenuItemsChanged.addListener". 2764 func FuncOnImeMenuItemsChanged() (fn js.Func[func(callback js.Func[func(engineID js.String, items js.Array[MenuItem])])]) { 2765 bindings.FuncOnImeMenuItemsChanged( 2766 js.Pointer(&fn), 2767 ) 2768 return 2769 } 2770 2771 // OnImeMenuItemsChanged calls the function "WEBEXT.inputMethodPrivate.onImeMenuItemsChanged.addListener" directly. 2772 func OnImeMenuItemsChanged(callback js.Func[func(engineID js.String, items js.Array[MenuItem])]) (ret js.Void) { 2773 bindings.CallOnImeMenuItemsChanged( 2774 js.Pointer(&ret), 2775 callback.Ref(), 2776 ) 2777 2778 return 2779 } 2780 2781 // TryOnImeMenuItemsChanged calls the function "WEBEXT.inputMethodPrivate.onImeMenuItemsChanged.addListener" 2782 // in a try/catch block and returns (_, err, ok = false) when it went through 2783 // the catch clause. 2784 func TryOnImeMenuItemsChanged(callback js.Func[func(engineID js.String, items js.Array[MenuItem])]) (ret js.Void, exception js.Any, ok bool) { 2785 ok = js.True == bindings.TryOnImeMenuItemsChanged( 2786 js.Pointer(&ret), js.Pointer(&exception), 2787 callback.Ref(), 2788 ) 2789 2790 return 2791 } 2792 2793 // HasFuncOffImeMenuItemsChanged returns true if the function "WEBEXT.inputMethodPrivate.onImeMenuItemsChanged.removeListener" exists. 2794 func HasFuncOffImeMenuItemsChanged() bool { 2795 return js.True == bindings.HasFuncOffImeMenuItemsChanged() 2796 } 2797 2798 // FuncOffImeMenuItemsChanged returns the function "WEBEXT.inputMethodPrivate.onImeMenuItemsChanged.removeListener". 2799 func FuncOffImeMenuItemsChanged() (fn js.Func[func(callback js.Func[func(engineID js.String, items js.Array[MenuItem])])]) { 2800 bindings.FuncOffImeMenuItemsChanged( 2801 js.Pointer(&fn), 2802 ) 2803 return 2804 } 2805 2806 // OffImeMenuItemsChanged calls the function "WEBEXT.inputMethodPrivate.onImeMenuItemsChanged.removeListener" directly. 2807 func OffImeMenuItemsChanged(callback js.Func[func(engineID js.String, items js.Array[MenuItem])]) (ret js.Void) { 2808 bindings.CallOffImeMenuItemsChanged( 2809 js.Pointer(&ret), 2810 callback.Ref(), 2811 ) 2812 2813 return 2814 } 2815 2816 // TryOffImeMenuItemsChanged calls the function "WEBEXT.inputMethodPrivate.onImeMenuItemsChanged.removeListener" 2817 // in a try/catch block and returns (_, err, ok = false) when it went through 2818 // the catch clause. 2819 func TryOffImeMenuItemsChanged(callback js.Func[func(engineID js.String, items js.Array[MenuItem])]) (ret js.Void, exception js.Any, ok bool) { 2820 ok = js.True == bindings.TryOffImeMenuItemsChanged( 2821 js.Pointer(&ret), js.Pointer(&exception), 2822 callback.Ref(), 2823 ) 2824 2825 return 2826 } 2827 2828 // HasFuncHasOnImeMenuItemsChanged returns true if the function "WEBEXT.inputMethodPrivate.onImeMenuItemsChanged.hasListener" exists. 2829 func HasFuncHasOnImeMenuItemsChanged() bool { 2830 return js.True == bindings.HasFuncHasOnImeMenuItemsChanged() 2831 } 2832 2833 // FuncHasOnImeMenuItemsChanged returns the function "WEBEXT.inputMethodPrivate.onImeMenuItemsChanged.hasListener". 2834 func FuncHasOnImeMenuItemsChanged() (fn js.Func[func(callback js.Func[func(engineID js.String, items js.Array[MenuItem])]) bool]) { 2835 bindings.FuncHasOnImeMenuItemsChanged( 2836 js.Pointer(&fn), 2837 ) 2838 return 2839 } 2840 2841 // HasOnImeMenuItemsChanged calls the function "WEBEXT.inputMethodPrivate.onImeMenuItemsChanged.hasListener" directly. 2842 func HasOnImeMenuItemsChanged(callback js.Func[func(engineID js.String, items js.Array[MenuItem])]) (ret bool) { 2843 bindings.CallHasOnImeMenuItemsChanged( 2844 js.Pointer(&ret), 2845 callback.Ref(), 2846 ) 2847 2848 return 2849 } 2850 2851 // TryHasOnImeMenuItemsChanged calls the function "WEBEXT.inputMethodPrivate.onImeMenuItemsChanged.hasListener" 2852 // in a try/catch block and returns (_, err, ok = false) when it went through 2853 // the catch clause. 2854 func TryHasOnImeMenuItemsChanged(callback js.Func[func(engineID js.String, items js.Array[MenuItem])]) (ret bool, exception js.Any, ok bool) { 2855 ok = js.True == bindings.TryHasOnImeMenuItemsChanged( 2856 js.Pointer(&ret), js.Pointer(&exception), 2857 callback.Ref(), 2858 ) 2859 2860 return 2861 } 2862 2863 type OnImeMenuListChangedEventCallbackFunc func(this js.Ref) js.Ref 2864 2865 func (fn OnImeMenuListChangedEventCallbackFunc) Register() js.Func[func()] { 2866 return js.RegisterCallback[func()]( 2867 fn, abi.FuncPCABIInternal(fn), 2868 ) 2869 } 2870 2871 func (fn OnImeMenuListChangedEventCallbackFunc) DispatchCallback( 2872 targetPC uintptr, ctx *js.CallbackContext, 2873 ) { 2874 args := ctx.Args() 2875 if len(args) != 0+1 /* js this */ || 2876 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 2877 js.ThrowInvalidCallbackInvocation() 2878 } 2879 2880 if ctx.Return(fn( 2881 args[0], 2882 )) { 2883 return 2884 } 2885 2886 js.ThrowCallbackValueNotReturned() 2887 } 2888 2889 type OnImeMenuListChangedEventCallback[T any] struct { 2890 Fn func(arg T, this js.Ref) js.Ref 2891 Arg T 2892 } 2893 2894 func (cb *OnImeMenuListChangedEventCallback[T]) Register() js.Func[func()] { 2895 return js.RegisterCallback[func()]( 2896 cb, abi.FuncPCABIInternal(cb.Fn), 2897 ) 2898 } 2899 2900 func (cb *OnImeMenuListChangedEventCallback[T]) DispatchCallback( 2901 targetPC uintptr, ctx *js.CallbackContext, 2902 ) { 2903 args := ctx.Args() 2904 if len(args) != 0+1 /* js this */ || 2905 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 2906 js.ThrowInvalidCallbackInvocation() 2907 } 2908 2909 if ctx.Return(cb.Fn( 2910 cb.Arg, 2911 args[0], 2912 )) { 2913 return 2914 } 2915 2916 js.ThrowCallbackValueNotReturned() 2917 } 2918 2919 // HasFuncOnImeMenuListChanged returns true if the function "WEBEXT.inputMethodPrivate.onImeMenuListChanged.addListener" exists. 2920 func HasFuncOnImeMenuListChanged() bool { 2921 return js.True == bindings.HasFuncOnImeMenuListChanged() 2922 } 2923 2924 // FuncOnImeMenuListChanged returns the function "WEBEXT.inputMethodPrivate.onImeMenuListChanged.addListener". 2925 func FuncOnImeMenuListChanged() (fn js.Func[func(callback js.Func[func()])]) { 2926 bindings.FuncOnImeMenuListChanged( 2927 js.Pointer(&fn), 2928 ) 2929 return 2930 } 2931 2932 // OnImeMenuListChanged calls the function "WEBEXT.inputMethodPrivate.onImeMenuListChanged.addListener" directly. 2933 func OnImeMenuListChanged(callback js.Func[func()]) (ret js.Void) { 2934 bindings.CallOnImeMenuListChanged( 2935 js.Pointer(&ret), 2936 callback.Ref(), 2937 ) 2938 2939 return 2940 } 2941 2942 // TryOnImeMenuListChanged calls the function "WEBEXT.inputMethodPrivate.onImeMenuListChanged.addListener" 2943 // in a try/catch block and returns (_, err, ok = false) when it went through 2944 // the catch clause. 2945 func TryOnImeMenuListChanged(callback js.Func[func()]) (ret js.Void, exception js.Any, ok bool) { 2946 ok = js.True == bindings.TryOnImeMenuListChanged( 2947 js.Pointer(&ret), js.Pointer(&exception), 2948 callback.Ref(), 2949 ) 2950 2951 return 2952 } 2953 2954 // HasFuncOffImeMenuListChanged returns true if the function "WEBEXT.inputMethodPrivate.onImeMenuListChanged.removeListener" exists. 2955 func HasFuncOffImeMenuListChanged() bool { 2956 return js.True == bindings.HasFuncOffImeMenuListChanged() 2957 } 2958 2959 // FuncOffImeMenuListChanged returns the function "WEBEXT.inputMethodPrivate.onImeMenuListChanged.removeListener". 2960 func FuncOffImeMenuListChanged() (fn js.Func[func(callback js.Func[func()])]) { 2961 bindings.FuncOffImeMenuListChanged( 2962 js.Pointer(&fn), 2963 ) 2964 return 2965 } 2966 2967 // OffImeMenuListChanged calls the function "WEBEXT.inputMethodPrivate.onImeMenuListChanged.removeListener" directly. 2968 func OffImeMenuListChanged(callback js.Func[func()]) (ret js.Void) { 2969 bindings.CallOffImeMenuListChanged( 2970 js.Pointer(&ret), 2971 callback.Ref(), 2972 ) 2973 2974 return 2975 } 2976 2977 // TryOffImeMenuListChanged calls the function "WEBEXT.inputMethodPrivate.onImeMenuListChanged.removeListener" 2978 // in a try/catch block and returns (_, err, ok = false) when it went through 2979 // the catch clause. 2980 func TryOffImeMenuListChanged(callback js.Func[func()]) (ret js.Void, exception js.Any, ok bool) { 2981 ok = js.True == bindings.TryOffImeMenuListChanged( 2982 js.Pointer(&ret), js.Pointer(&exception), 2983 callback.Ref(), 2984 ) 2985 2986 return 2987 } 2988 2989 // HasFuncHasOnImeMenuListChanged returns true if the function "WEBEXT.inputMethodPrivate.onImeMenuListChanged.hasListener" exists. 2990 func HasFuncHasOnImeMenuListChanged() bool { 2991 return js.True == bindings.HasFuncHasOnImeMenuListChanged() 2992 } 2993 2994 // FuncHasOnImeMenuListChanged returns the function "WEBEXT.inputMethodPrivate.onImeMenuListChanged.hasListener". 2995 func FuncHasOnImeMenuListChanged() (fn js.Func[func(callback js.Func[func()]) bool]) { 2996 bindings.FuncHasOnImeMenuListChanged( 2997 js.Pointer(&fn), 2998 ) 2999 return 3000 } 3001 3002 // HasOnImeMenuListChanged calls the function "WEBEXT.inputMethodPrivate.onImeMenuListChanged.hasListener" directly. 3003 func HasOnImeMenuListChanged(callback js.Func[func()]) (ret bool) { 3004 bindings.CallHasOnImeMenuListChanged( 3005 js.Pointer(&ret), 3006 callback.Ref(), 3007 ) 3008 3009 return 3010 } 3011 3012 // TryHasOnImeMenuListChanged calls the function "WEBEXT.inputMethodPrivate.onImeMenuListChanged.hasListener" 3013 // in a try/catch block and returns (_, err, ok = false) when it went through 3014 // the catch clause. 3015 func TryHasOnImeMenuListChanged(callback js.Func[func()]) (ret bool, exception js.Any, ok bool) { 3016 ok = js.True == bindings.TryHasOnImeMenuListChanged( 3017 js.Pointer(&ret), js.Pointer(&exception), 3018 callback.Ref(), 3019 ) 3020 3021 return 3022 } 3023 3024 type OnInputMethodOptionsChangedEventCallbackFunc func(this js.Ref, engineID js.String) js.Ref 3025 3026 func (fn OnInputMethodOptionsChangedEventCallbackFunc) Register() js.Func[func(engineID js.String)] { 3027 return js.RegisterCallback[func(engineID js.String)]( 3028 fn, abi.FuncPCABIInternal(fn), 3029 ) 3030 } 3031 3032 func (fn OnInputMethodOptionsChangedEventCallbackFunc) DispatchCallback( 3033 targetPC uintptr, ctx *js.CallbackContext, 3034 ) { 3035 args := ctx.Args() 3036 if len(args) != 1+1 /* js this */ || 3037 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 3038 js.ThrowInvalidCallbackInvocation() 3039 } 3040 3041 if ctx.Return(fn( 3042 args[0], 3043 3044 js.String{}.FromRef(args[0+1]), 3045 )) { 3046 return 3047 } 3048 3049 js.ThrowCallbackValueNotReturned() 3050 } 3051 3052 type OnInputMethodOptionsChangedEventCallback[T any] struct { 3053 Fn func(arg T, this js.Ref, engineID js.String) js.Ref 3054 Arg T 3055 } 3056 3057 func (cb *OnInputMethodOptionsChangedEventCallback[T]) Register() js.Func[func(engineID js.String)] { 3058 return js.RegisterCallback[func(engineID js.String)]( 3059 cb, abi.FuncPCABIInternal(cb.Fn), 3060 ) 3061 } 3062 3063 func (cb *OnInputMethodOptionsChangedEventCallback[T]) DispatchCallback( 3064 targetPC uintptr, ctx *js.CallbackContext, 3065 ) { 3066 args := ctx.Args() 3067 if len(args) != 1+1 /* js this */ || 3068 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 3069 js.ThrowInvalidCallbackInvocation() 3070 } 3071 3072 if ctx.Return(cb.Fn( 3073 cb.Arg, 3074 args[0], 3075 3076 js.String{}.FromRef(args[0+1]), 3077 )) { 3078 return 3079 } 3080 3081 js.ThrowCallbackValueNotReturned() 3082 } 3083 3084 // HasFuncOnInputMethodOptionsChanged returns true if the function "WEBEXT.inputMethodPrivate.onInputMethodOptionsChanged.addListener" exists. 3085 func HasFuncOnInputMethodOptionsChanged() bool { 3086 return js.True == bindings.HasFuncOnInputMethodOptionsChanged() 3087 } 3088 3089 // FuncOnInputMethodOptionsChanged returns the function "WEBEXT.inputMethodPrivate.onInputMethodOptionsChanged.addListener". 3090 func FuncOnInputMethodOptionsChanged() (fn js.Func[func(callback js.Func[func(engineID js.String)])]) { 3091 bindings.FuncOnInputMethodOptionsChanged( 3092 js.Pointer(&fn), 3093 ) 3094 return 3095 } 3096 3097 // OnInputMethodOptionsChanged calls the function "WEBEXT.inputMethodPrivate.onInputMethodOptionsChanged.addListener" directly. 3098 func OnInputMethodOptionsChanged(callback js.Func[func(engineID js.String)]) (ret js.Void) { 3099 bindings.CallOnInputMethodOptionsChanged( 3100 js.Pointer(&ret), 3101 callback.Ref(), 3102 ) 3103 3104 return 3105 } 3106 3107 // TryOnInputMethodOptionsChanged calls the function "WEBEXT.inputMethodPrivate.onInputMethodOptionsChanged.addListener" 3108 // in a try/catch block and returns (_, err, ok = false) when it went through 3109 // the catch clause. 3110 func TryOnInputMethodOptionsChanged(callback js.Func[func(engineID js.String)]) (ret js.Void, exception js.Any, ok bool) { 3111 ok = js.True == bindings.TryOnInputMethodOptionsChanged( 3112 js.Pointer(&ret), js.Pointer(&exception), 3113 callback.Ref(), 3114 ) 3115 3116 return 3117 } 3118 3119 // HasFuncOffInputMethodOptionsChanged returns true if the function "WEBEXT.inputMethodPrivate.onInputMethodOptionsChanged.removeListener" exists. 3120 func HasFuncOffInputMethodOptionsChanged() bool { 3121 return js.True == bindings.HasFuncOffInputMethodOptionsChanged() 3122 } 3123 3124 // FuncOffInputMethodOptionsChanged returns the function "WEBEXT.inputMethodPrivate.onInputMethodOptionsChanged.removeListener". 3125 func FuncOffInputMethodOptionsChanged() (fn js.Func[func(callback js.Func[func(engineID js.String)])]) { 3126 bindings.FuncOffInputMethodOptionsChanged( 3127 js.Pointer(&fn), 3128 ) 3129 return 3130 } 3131 3132 // OffInputMethodOptionsChanged calls the function "WEBEXT.inputMethodPrivate.onInputMethodOptionsChanged.removeListener" directly. 3133 func OffInputMethodOptionsChanged(callback js.Func[func(engineID js.String)]) (ret js.Void) { 3134 bindings.CallOffInputMethodOptionsChanged( 3135 js.Pointer(&ret), 3136 callback.Ref(), 3137 ) 3138 3139 return 3140 } 3141 3142 // TryOffInputMethodOptionsChanged calls the function "WEBEXT.inputMethodPrivate.onInputMethodOptionsChanged.removeListener" 3143 // in a try/catch block and returns (_, err, ok = false) when it went through 3144 // the catch clause. 3145 func TryOffInputMethodOptionsChanged(callback js.Func[func(engineID js.String)]) (ret js.Void, exception js.Any, ok bool) { 3146 ok = js.True == bindings.TryOffInputMethodOptionsChanged( 3147 js.Pointer(&ret), js.Pointer(&exception), 3148 callback.Ref(), 3149 ) 3150 3151 return 3152 } 3153 3154 // HasFuncHasOnInputMethodOptionsChanged returns true if the function "WEBEXT.inputMethodPrivate.onInputMethodOptionsChanged.hasListener" exists. 3155 func HasFuncHasOnInputMethodOptionsChanged() bool { 3156 return js.True == bindings.HasFuncHasOnInputMethodOptionsChanged() 3157 } 3158 3159 // FuncHasOnInputMethodOptionsChanged returns the function "WEBEXT.inputMethodPrivate.onInputMethodOptionsChanged.hasListener". 3160 func FuncHasOnInputMethodOptionsChanged() (fn js.Func[func(callback js.Func[func(engineID js.String)]) bool]) { 3161 bindings.FuncHasOnInputMethodOptionsChanged( 3162 js.Pointer(&fn), 3163 ) 3164 return 3165 } 3166 3167 // HasOnInputMethodOptionsChanged calls the function "WEBEXT.inputMethodPrivate.onInputMethodOptionsChanged.hasListener" directly. 3168 func HasOnInputMethodOptionsChanged(callback js.Func[func(engineID js.String)]) (ret bool) { 3169 bindings.CallHasOnInputMethodOptionsChanged( 3170 js.Pointer(&ret), 3171 callback.Ref(), 3172 ) 3173 3174 return 3175 } 3176 3177 // TryHasOnInputMethodOptionsChanged calls the function "WEBEXT.inputMethodPrivate.onInputMethodOptionsChanged.hasListener" 3178 // in a try/catch block and returns (_, err, ok = false) when it went through 3179 // the catch clause. 3180 func TryHasOnInputMethodOptionsChanged(callback js.Func[func(engineID js.String)]) (ret bool, exception js.Any, ok bool) { 3181 ok = js.True == bindings.TryHasOnInputMethodOptionsChanged( 3182 js.Pointer(&ret), js.Pointer(&exception), 3183 callback.Ref(), 3184 ) 3185 3186 return 3187 } 3188 3189 type OnScreenProjectionChangedEventCallbackFunc func(this js.Ref, isProjected bool) js.Ref 3190 3191 func (fn OnScreenProjectionChangedEventCallbackFunc) Register() js.Func[func(isProjected bool)] { 3192 return js.RegisterCallback[func(isProjected bool)]( 3193 fn, abi.FuncPCABIInternal(fn), 3194 ) 3195 } 3196 3197 func (fn OnScreenProjectionChangedEventCallbackFunc) DispatchCallback( 3198 targetPC uintptr, ctx *js.CallbackContext, 3199 ) { 3200 args := ctx.Args() 3201 if len(args) != 1+1 /* js this */ || 3202 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 3203 js.ThrowInvalidCallbackInvocation() 3204 } 3205 3206 if ctx.Return(fn( 3207 args[0], 3208 3209 args[0+1] == js.True, 3210 )) { 3211 return 3212 } 3213 3214 js.ThrowCallbackValueNotReturned() 3215 } 3216 3217 type OnScreenProjectionChangedEventCallback[T any] struct { 3218 Fn func(arg T, this js.Ref, isProjected bool) js.Ref 3219 Arg T 3220 } 3221 3222 func (cb *OnScreenProjectionChangedEventCallback[T]) Register() js.Func[func(isProjected bool)] { 3223 return js.RegisterCallback[func(isProjected bool)]( 3224 cb, abi.FuncPCABIInternal(cb.Fn), 3225 ) 3226 } 3227 3228 func (cb *OnScreenProjectionChangedEventCallback[T]) DispatchCallback( 3229 targetPC uintptr, ctx *js.CallbackContext, 3230 ) { 3231 args := ctx.Args() 3232 if len(args) != 1+1 /* js this */ || 3233 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 3234 js.ThrowInvalidCallbackInvocation() 3235 } 3236 3237 if ctx.Return(cb.Fn( 3238 cb.Arg, 3239 args[0], 3240 3241 args[0+1] == js.True, 3242 )) { 3243 return 3244 } 3245 3246 js.ThrowCallbackValueNotReturned() 3247 } 3248 3249 // HasFuncOnScreenProjectionChanged returns true if the function "WEBEXT.inputMethodPrivate.onScreenProjectionChanged.addListener" exists. 3250 func HasFuncOnScreenProjectionChanged() bool { 3251 return js.True == bindings.HasFuncOnScreenProjectionChanged() 3252 } 3253 3254 // FuncOnScreenProjectionChanged returns the function "WEBEXT.inputMethodPrivate.onScreenProjectionChanged.addListener". 3255 func FuncOnScreenProjectionChanged() (fn js.Func[func(callback js.Func[func(isProjected bool)])]) { 3256 bindings.FuncOnScreenProjectionChanged( 3257 js.Pointer(&fn), 3258 ) 3259 return 3260 } 3261 3262 // OnScreenProjectionChanged calls the function "WEBEXT.inputMethodPrivate.onScreenProjectionChanged.addListener" directly. 3263 func OnScreenProjectionChanged(callback js.Func[func(isProjected bool)]) (ret js.Void) { 3264 bindings.CallOnScreenProjectionChanged( 3265 js.Pointer(&ret), 3266 callback.Ref(), 3267 ) 3268 3269 return 3270 } 3271 3272 // TryOnScreenProjectionChanged calls the function "WEBEXT.inputMethodPrivate.onScreenProjectionChanged.addListener" 3273 // in a try/catch block and returns (_, err, ok = false) when it went through 3274 // the catch clause. 3275 func TryOnScreenProjectionChanged(callback js.Func[func(isProjected bool)]) (ret js.Void, exception js.Any, ok bool) { 3276 ok = js.True == bindings.TryOnScreenProjectionChanged( 3277 js.Pointer(&ret), js.Pointer(&exception), 3278 callback.Ref(), 3279 ) 3280 3281 return 3282 } 3283 3284 // HasFuncOffScreenProjectionChanged returns true if the function "WEBEXT.inputMethodPrivate.onScreenProjectionChanged.removeListener" exists. 3285 func HasFuncOffScreenProjectionChanged() bool { 3286 return js.True == bindings.HasFuncOffScreenProjectionChanged() 3287 } 3288 3289 // FuncOffScreenProjectionChanged returns the function "WEBEXT.inputMethodPrivate.onScreenProjectionChanged.removeListener". 3290 func FuncOffScreenProjectionChanged() (fn js.Func[func(callback js.Func[func(isProjected bool)])]) { 3291 bindings.FuncOffScreenProjectionChanged( 3292 js.Pointer(&fn), 3293 ) 3294 return 3295 } 3296 3297 // OffScreenProjectionChanged calls the function "WEBEXT.inputMethodPrivate.onScreenProjectionChanged.removeListener" directly. 3298 func OffScreenProjectionChanged(callback js.Func[func(isProjected bool)]) (ret js.Void) { 3299 bindings.CallOffScreenProjectionChanged( 3300 js.Pointer(&ret), 3301 callback.Ref(), 3302 ) 3303 3304 return 3305 } 3306 3307 // TryOffScreenProjectionChanged calls the function "WEBEXT.inputMethodPrivate.onScreenProjectionChanged.removeListener" 3308 // in a try/catch block and returns (_, err, ok = false) when it went through 3309 // the catch clause. 3310 func TryOffScreenProjectionChanged(callback js.Func[func(isProjected bool)]) (ret js.Void, exception js.Any, ok bool) { 3311 ok = js.True == bindings.TryOffScreenProjectionChanged( 3312 js.Pointer(&ret), js.Pointer(&exception), 3313 callback.Ref(), 3314 ) 3315 3316 return 3317 } 3318 3319 // HasFuncHasOnScreenProjectionChanged returns true if the function "WEBEXT.inputMethodPrivate.onScreenProjectionChanged.hasListener" exists. 3320 func HasFuncHasOnScreenProjectionChanged() bool { 3321 return js.True == bindings.HasFuncHasOnScreenProjectionChanged() 3322 } 3323 3324 // FuncHasOnScreenProjectionChanged returns the function "WEBEXT.inputMethodPrivate.onScreenProjectionChanged.hasListener". 3325 func FuncHasOnScreenProjectionChanged() (fn js.Func[func(callback js.Func[func(isProjected bool)]) bool]) { 3326 bindings.FuncHasOnScreenProjectionChanged( 3327 js.Pointer(&fn), 3328 ) 3329 return 3330 } 3331 3332 // HasOnScreenProjectionChanged calls the function "WEBEXT.inputMethodPrivate.onScreenProjectionChanged.hasListener" directly. 3333 func HasOnScreenProjectionChanged(callback js.Func[func(isProjected bool)]) (ret bool) { 3334 bindings.CallHasOnScreenProjectionChanged( 3335 js.Pointer(&ret), 3336 callback.Ref(), 3337 ) 3338 3339 return 3340 } 3341 3342 // TryHasOnScreenProjectionChanged calls the function "WEBEXT.inputMethodPrivate.onScreenProjectionChanged.hasListener" 3343 // in a try/catch block and returns (_, err, ok = false) when it went through 3344 // the catch clause. 3345 func TryHasOnScreenProjectionChanged(callback js.Func[func(isProjected bool)]) (ret bool, exception js.Any, ok bool) { 3346 ok = js.True == bindings.TryHasOnScreenProjectionChanged( 3347 js.Pointer(&ret), js.Pointer(&exception), 3348 callback.Ref(), 3349 ) 3350 3351 return 3352 } 3353 3354 type OnSettingsChangedEventCallbackFunc func(this js.Ref, engineID js.String, settings *InputMethodSettings) js.Ref 3355 3356 func (fn OnSettingsChangedEventCallbackFunc) Register() js.Func[func(engineID js.String, settings *InputMethodSettings)] { 3357 return js.RegisterCallback[func(engineID js.String, settings *InputMethodSettings)]( 3358 fn, abi.FuncPCABIInternal(fn), 3359 ) 3360 } 3361 3362 func (fn OnSettingsChangedEventCallbackFunc) DispatchCallback( 3363 targetPC uintptr, ctx *js.CallbackContext, 3364 ) { 3365 args := ctx.Args() 3366 if len(args) != 2+1 /* js this */ || 3367 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 3368 js.ThrowInvalidCallbackInvocation() 3369 } 3370 var arg1 InputMethodSettings 3371 arg1.UpdateFrom(args[1+1]) 3372 defer arg1.FreeMembers(true) 3373 3374 if ctx.Return(fn( 3375 args[0], 3376 3377 js.String{}.FromRef(args[0+1]), 3378 mark.NoEscape(&arg1), 3379 )) { 3380 return 3381 } 3382 3383 js.ThrowCallbackValueNotReturned() 3384 } 3385 3386 type OnSettingsChangedEventCallback[T any] struct { 3387 Fn func(arg T, this js.Ref, engineID js.String, settings *InputMethodSettings) js.Ref 3388 Arg T 3389 } 3390 3391 func (cb *OnSettingsChangedEventCallback[T]) Register() js.Func[func(engineID js.String, settings *InputMethodSettings)] { 3392 return js.RegisterCallback[func(engineID js.String, settings *InputMethodSettings)]( 3393 cb, abi.FuncPCABIInternal(cb.Fn), 3394 ) 3395 } 3396 3397 func (cb *OnSettingsChangedEventCallback[T]) DispatchCallback( 3398 targetPC uintptr, ctx *js.CallbackContext, 3399 ) { 3400 args := ctx.Args() 3401 if len(args) != 2+1 /* js this */ || 3402 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 3403 js.ThrowInvalidCallbackInvocation() 3404 } 3405 var arg1 InputMethodSettings 3406 arg1.UpdateFrom(args[1+1]) 3407 defer arg1.FreeMembers(true) 3408 3409 if ctx.Return(cb.Fn( 3410 cb.Arg, 3411 args[0], 3412 3413 js.String{}.FromRef(args[0+1]), 3414 mark.NoEscape(&arg1), 3415 )) { 3416 return 3417 } 3418 3419 js.ThrowCallbackValueNotReturned() 3420 } 3421 3422 // HasFuncOnSettingsChanged returns true if the function "WEBEXT.inputMethodPrivate.onSettingsChanged.addListener" exists. 3423 func HasFuncOnSettingsChanged() bool { 3424 return js.True == bindings.HasFuncOnSettingsChanged() 3425 } 3426 3427 // FuncOnSettingsChanged returns the function "WEBEXT.inputMethodPrivate.onSettingsChanged.addListener". 3428 func FuncOnSettingsChanged() (fn js.Func[func(callback js.Func[func(engineID js.String, settings *InputMethodSettings)])]) { 3429 bindings.FuncOnSettingsChanged( 3430 js.Pointer(&fn), 3431 ) 3432 return 3433 } 3434 3435 // OnSettingsChanged calls the function "WEBEXT.inputMethodPrivate.onSettingsChanged.addListener" directly. 3436 func OnSettingsChanged(callback js.Func[func(engineID js.String, settings *InputMethodSettings)]) (ret js.Void) { 3437 bindings.CallOnSettingsChanged( 3438 js.Pointer(&ret), 3439 callback.Ref(), 3440 ) 3441 3442 return 3443 } 3444 3445 // TryOnSettingsChanged calls the function "WEBEXT.inputMethodPrivate.onSettingsChanged.addListener" 3446 // in a try/catch block and returns (_, err, ok = false) when it went through 3447 // the catch clause. 3448 func TryOnSettingsChanged(callback js.Func[func(engineID js.String, settings *InputMethodSettings)]) (ret js.Void, exception js.Any, ok bool) { 3449 ok = js.True == bindings.TryOnSettingsChanged( 3450 js.Pointer(&ret), js.Pointer(&exception), 3451 callback.Ref(), 3452 ) 3453 3454 return 3455 } 3456 3457 // HasFuncOffSettingsChanged returns true if the function "WEBEXT.inputMethodPrivate.onSettingsChanged.removeListener" exists. 3458 func HasFuncOffSettingsChanged() bool { 3459 return js.True == bindings.HasFuncOffSettingsChanged() 3460 } 3461 3462 // FuncOffSettingsChanged returns the function "WEBEXT.inputMethodPrivate.onSettingsChanged.removeListener". 3463 func FuncOffSettingsChanged() (fn js.Func[func(callback js.Func[func(engineID js.String, settings *InputMethodSettings)])]) { 3464 bindings.FuncOffSettingsChanged( 3465 js.Pointer(&fn), 3466 ) 3467 return 3468 } 3469 3470 // OffSettingsChanged calls the function "WEBEXT.inputMethodPrivate.onSettingsChanged.removeListener" directly. 3471 func OffSettingsChanged(callback js.Func[func(engineID js.String, settings *InputMethodSettings)]) (ret js.Void) { 3472 bindings.CallOffSettingsChanged( 3473 js.Pointer(&ret), 3474 callback.Ref(), 3475 ) 3476 3477 return 3478 } 3479 3480 // TryOffSettingsChanged calls the function "WEBEXT.inputMethodPrivate.onSettingsChanged.removeListener" 3481 // in a try/catch block and returns (_, err, ok = false) when it went through 3482 // the catch clause. 3483 func TryOffSettingsChanged(callback js.Func[func(engineID js.String, settings *InputMethodSettings)]) (ret js.Void, exception js.Any, ok bool) { 3484 ok = js.True == bindings.TryOffSettingsChanged( 3485 js.Pointer(&ret), js.Pointer(&exception), 3486 callback.Ref(), 3487 ) 3488 3489 return 3490 } 3491 3492 // HasFuncHasOnSettingsChanged returns true if the function "WEBEXT.inputMethodPrivate.onSettingsChanged.hasListener" exists. 3493 func HasFuncHasOnSettingsChanged() bool { 3494 return js.True == bindings.HasFuncHasOnSettingsChanged() 3495 } 3496 3497 // FuncHasOnSettingsChanged returns the function "WEBEXT.inputMethodPrivate.onSettingsChanged.hasListener". 3498 func FuncHasOnSettingsChanged() (fn js.Func[func(callback js.Func[func(engineID js.String, settings *InputMethodSettings)]) bool]) { 3499 bindings.FuncHasOnSettingsChanged( 3500 js.Pointer(&fn), 3501 ) 3502 return 3503 } 3504 3505 // HasOnSettingsChanged calls the function "WEBEXT.inputMethodPrivate.onSettingsChanged.hasListener" directly. 3506 func HasOnSettingsChanged(callback js.Func[func(engineID js.String, settings *InputMethodSettings)]) (ret bool) { 3507 bindings.CallHasOnSettingsChanged( 3508 js.Pointer(&ret), 3509 callback.Ref(), 3510 ) 3511 3512 return 3513 } 3514 3515 // TryHasOnSettingsChanged calls the function "WEBEXT.inputMethodPrivate.onSettingsChanged.hasListener" 3516 // in a try/catch block and returns (_, err, ok = false) when it went through 3517 // the catch clause. 3518 func TryHasOnSettingsChanged(callback js.Func[func(engineID js.String, settings *InputMethodSettings)]) (ret bool, exception js.Any, ok bool) { 3519 ok = js.True == bindings.TryHasOnSettingsChanged( 3520 js.Pointer(&ret), js.Pointer(&exception), 3521 callback.Ref(), 3522 ) 3523 3524 return 3525 } 3526 3527 type OnSuggestionsChangedEventCallbackFunc func(this js.Ref, suggestions js.Array[js.String]) js.Ref 3528 3529 func (fn OnSuggestionsChangedEventCallbackFunc) Register() js.Func[func(suggestions js.Array[js.String])] { 3530 return js.RegisterCallback[func(suggestions js.Array[js.String])]( 3531 fn, abi.FuncPCABIInternal(fn), 3532 ) 3533 } 3534 3535 func (fn OnSuggestionsChangedEventCallbackFunc) DispatchCallback( 3536 targetPC uintptr, ctx *js.CallbackContext, 3537 ) { 3538 args := ctx.Args() 3539 if len(args) != 1+1 /* js this */ || 3540 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 3541 js.ThrowInvalidCallbackInvocation() 3542 } 3543 3544 if ctx.Return(fn( 3545 args[0], 3546 3547 js.Array[js.String]{}.FromRef(args[0+1]), 3548 )) { 3549 return 3550 } 3551 3552 js.ThrowCallbackValueNotReturned() 3553 } 3554 3555 type OnSuggestionsChangedEventCallback[T any] struct { 3556 Fn func(arg T, this js.Ref, suggestions js.Array[js.String]) js.Ref 3557 Arg T 3558 } 3559 3560 func (cb *OnSuggestionsChangedEventCallback[T]) Register() js.Func[func(suggestions js.Array[js.String])] { 3561 return js.RegisterCallback[func(suggestions js.Array[js.String])]( 3562 cb, abi.FuncPCABIInternal(cb.Fn), 3563 ) 3564 } 3565 3566 func (cb *OnSuggestionsChangedEventCallback[T]) DispatchCallback( 3567 targetPC uintptr, ctx *js.CallbackContext, 3568 ) { 3569 args := ctx.Args() 3570 if len(args) != 1+1 /* js this */ || 3571 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 3572 js.ThrowInvalidCallbackInvocation() 3573 } 3574 3575 if ctx.Return(cb.Fn( 3576 cb.Arg, 3577 args[0], 3578 3579 js.Array[js.String]{}.FromRef(args[0+1]), 3580 )) { 3581 return 3582 } 3583 3584 js.ThrowCallbackValueNotReturned() 3585 } 3586 3587 // HasFuncOnSuggestionsChanged returns true if the function "WEBEXT.inputMethodPrivate.onSuggestionsChanged.addListener" exists. 3588 func HasFuncOnSuggestionsChanged() bool { 3589 return js.True == bindings.HasFuncOnSuggestionsChanged() 3590 } 3591 3592 // FuncOnSuggestionsChanged returns the function "WEBEXT.inputMethodPrivate.onSuggestionsChanged.addListener". 3593 func FuncOnSuggestionsChanged() (fn js.Func[func(callback js.Func[func(suggestions js.Array[js.String])])]) { 3594 bindings.FuncOnSuggestionsChanged( 3595 js.Pointer(&fn), 3596 ) 3597 return 3598 } 3599 3600 // OnSuggestionsChanged calls the function "WEBEXT.inputMethodPrivate.onSuggestionsChanged.addListener" directly. 3601 func OnSuggestionsChanged(callback js.Func[func(suggestions js.Array[js.String])]) (ret js.Void) { 3602 bindings.CallOnSuggestionsChanged( 3603 js.Pointer(&ret), 3604 callback.Ref(), 3605 ) 3606 3607 return 3608 } 3609 3610 // TryOnSuggestionsChanged calls the function "WEBEXT.inputMethodPrivate.onSuggestionsChanged.addListener" 3611 // in a try/catch block and returns (_, err, ok = false) when it went through 3612 // the catch clause. 3613 func TryOnSuggestionsChanged(callback js.Func[func(suggestions js.Array[js.String])]) (ret js.Void, exception js.Any, ok bool) { 3614 ok = js.True == bindings.TryOnSuggestionsChanged( 3615 js.Pointer(&ret), js.Pointer(&exception), 3616 callback.Ref(), 3617 ) 3618 3619 return 3620 } 3621 3622 // HasFuncOffSuggestionsChanged returns true if the function "WEBEXT.inputMethodPrivate.onSuggestionsChanged.removeListener" exists. 3623 func HasFuncOffSuggestionsChanged() bool { 3624 return js.True == bindings.HasFuncOffSuggestionsChanged() 3625 } 3626 3627 // FuncOffSuggestionsChanged returns the function "WEBEXT.inputMethodPrivate.onSuggestionsChanged.removeListener". 3628 func FuncOffSuggestionsChanged() (fn js.Func[func(callback js.Func[func(suggestions js.Array[js.String])])]) { 3629 bindings.FuncOffSuggestionsChanged( 3630 js.Pointer(&fn), 3631 ) 3632 return 3633 } 3634 3635 // OffSuggestionsChanged calls the function "WEBEXT.inputMethodPrivate.onSuggestionsChanged.removeListener" directly. 3636 func OffSuggestionsChanged(callback js.Func[func(suggestions js.Array[js.String])]) (ret js.Void) { 3637 bindings.CallOffSuggestionsChanged( 3638 js.Pointer(&ret), 3639 callback.Ref(), 3640 ) 3641 3642 return 3643 } 3644 3645 // TryOffSuggestionsChanged calls the function "WEBEXT.inputMethodPrivate.onSuggestionsChanged.removeListener" 3646 // in a try/catch block and returns (_, err, ok = false) when it went through 3647 // the catch clause. 3648 func TryOffSuggestionsChanged(callback js.Func[func(suggestions js.Array[js.String])]) (ret js.Void, exception js.Any, ok bool) { 3649 ok = js.True == bindings.TryOffSuggestionsChanged( 3650 js.Pointer(&ret), js.Pointer(&exception), 3651 callback.Ref(), 3652 ) 3653 3654 return 3655 } 3656 3657 // HasFuncHasOnSuggestionsChanged returns true if the function "WEBEXT.inputMethodPrivate.onSuggestionsChanged.hasListener" exists. 3658 func HasFuncHasOnSuggestionsChanged() bool { 3659 return js.True == bindings.HasFuncHasOnSuggestionsChanged() 3660 } 3661 3662 // FuncHasOnSuggestionsChanged returns the function "WEBEXT.inputMethodPrivate.onSuggestionsChanged.hasListener". 3663 func FuncHasOnSuggestionsChanged() (fn js.Func[func(callback js.Func[func(suggestions js.Array[js.String])]) bool]) { 3664 bindings.FuncHasOnSuggestionsChanged( 3665 js.Pointer(&fn), 3666 ) 3667 return 3668 } 3669 3670 // HasOnSuggestionsChanged calls the function "WEBEXT.inputMethodPrivate.onSuggestionsChanged.hasListener" directly. 3671 func HasOnSuggestionsChanged(callback js.Func[func(suggestions js.Array[js.String])]) (ret bool) { 3672 bindings.CallHasOnSuggestionsChanged( 3673 js.Pointer(&ret), 3674 callback.Ref(), 3675 ) 3676 3677 return 3678 } 3679 3680 // TryHasOnSuggestionsChanged calls the function "WEBEXT.inputMethodPrivate.onSuggestionsChanged.hasListener" 3681 // in a try/catch block and returns (_, err, ok = false) when it went through 3682 // the catch clause. 3683 func TryHasOnSuggestionsChanged(callback js.Func[func(suggestions js.Array[js.String])]) (ret bool, exception js.Any, ok bool) { 3684 ok = js.True == bindings.TryHasOnSuggestionsChanged( 3685 js.Pointer(&ret), js.Pointer(&exception), 3686 callback.Ref(), 3687 ) 3688 3689 return 3690 } 3691 3692 type OnTouchEventCallbackFunc func(this js.Ref, pointerType FocusReason) js.Ref 3693 3694 func (fn OnTouchEventCallbackFunc) Register() js.Func[func(pointerType FocusReason)] { 3695 return js.RegisterCallback[func(pointerType FocusReason)]( 3696 fn, abi.FuncPCABIInternal(fn), 3697 ) 3698 } 3699 3700 func (fn OnTouchEventCallbackFunc) DispatchCallback( 3701 targetPC uintptr, ctx *js.CallbackContext, 3702 ) { 3703 args := ctx.Args() 3704 if len(args) != 1+1 /* js this */ || 3705 targetPC != uintptr(abi.FuncPCABIInternal(fn)) { 3706 js.ThrowInvalidCallbackInvocation() 3707 } 3708 3709 if ctx.Return(fn( 3710 args[0], 3711 3712 FocusReason(0).FromRef(args[0+1]), 3713 )) { 3714 return 3715 } 3716 3717 js.ThrowCallbackValueNotReturned() 3718 } 3719 3720 type OnTouchEventCallback[T any] struct { 3721 Fn func(arg T, this js.Ref, pointerType FocusReason) js.Ref 3722 Arg T 3723 } 3724 3725 func (cb *OnTouchEventCallback[T]) Register() js.Func[func(pointerType FocusReason)] { 3726 return js.RegisterCallback[func(pointerType FocusReason)]( 3727 cb, abi.FuncPCABIInternal(cb.Fn), 3728 ) 3729 } 3730 3731 func (cb *OnTouchEventCallback[T]) DispatchCallback( 3732 targetPC uintptr, ctx *js.CallbackContext, 3733 ) { 3734 args := ctx.Args() 3735 if len(args) != 1+1 /* js this */ || 3736 targetPC != uintptr(abi.FuncPCABIInternal(cb.Fn)) { 3737 js.ThrowInvalidCallbackInvocation() 3738 } 3739 3740 if ctx.Return(cb.Fn( 3741 cb.Arg, 3742 args[0], 3743 3744 FocusReason(0).FromRef(args[0+1]), 3745 )) { 3746 return 3747 } 3748 3749 js.ThrowCallbackValueNotReturned() 3750 } 3751 3752 // HasFuncOnTouch returns true if the function "WEBEXT.inputMethodPrivate.onTouch.addListener" exists. 3753 func HasFuncOnTouch() bool { 3754 return js.True == bindings.HasFuncOnTouch() 3755 } 3756 3757 // FuncOnTouch returns the function "WEBEXT.inputMethodPrivate.onTouch.addListener". 3758 func FuncOnTouch() (fn js.Func[func(callback js.Func[func(pointerType FocusReason)])]) { 3759 bindings.FuncOnTouch( 3760 js.Pointer(&fn), 3761 ) 3762 return 3763 } 3764 3765 // OnTouch calls the function "WEBEXT.inputMethodPrivate.onTouch.addListener" directly. 3766 func OnTouch(callback js.Func[func(pointerType FocusReason)]) (ret js.Void) { 3767 bindings.CallOnTouch( 3768 js.Pointer(&ret), 3769 callback.Ref(), 3770 ) 3771 3772 return 3773 } 3774 3775 // TryOnTouch calls the function "WEBEXT.inputMethodPrivate.onTouch.addListener" 3776 // in a try/catch block and returns (_, err, ok = false) when it went through 3777 // the catch clause. 3778 func TryOnTouch(callback js.Func[func(pointerType FocusReason)]) (ret js.Void, exception js.Any, ok bool) { 3779 ok = js.True == bindings.TryOnTouch( 3780 js.Pointer(&ret), js.Pointer(&exception), 3781 callback.Ref(), 3782 ) 3783 3784 return 3785 } 3786 3787 // HasFuncOffTouch returns true if the function "WEBEXT.inputMethodPrivate.onTouch.removeListener" exists. 3788 func HasFuncOffTouch() bool { 3789 return js.True == bindings.HasFuncOffTouch() 3790 } 3791 3792 // FuncOffTouch returns the function "WEBEXT.inputMethodPrivate.onTouch.removeListener". 3793 func FuncOffTouch() (fn js.Func[func(callback js.Func[func(pointerType FocusReason)])]) { 3794 bindings.FuncOffTouch( 3795 js.Pointer(&fn), 3796 ) 3797 return 3798 } 3799 3800 // OffTouch calls the function "WEBEXT.inputMethodPrivate.onTouch.removeListener" directly. 3801 func OffTouch(callback js.Func[func(pointerType FocusReason)]) (ret js.Void) { 3802 bindings.CallOffTouch( 3803 js.Pointer(&ret), 3804 callback.Ref(), 3805 ) 3806 3807 return 3808 } 3809 3810 // TryOffTouch calls the function "WEBEXT.inputMethodPrivate.onTouch.removeListener" 3811 // in a try/catch block and returns (_, err, ok = false) when it went through 3812 // the catch clause. 3813 func TryOffTouch(callback js.Func[func(pointerType FocusReason)]) (ret js.Void, exception js.Any, ok bool) { 3814 ok = js.True == bindings.TryOffTouch( 3815 js.Pointer(&ret), js.Pointer(&exception), 3816 callback.Ref(), 3817 ) 3818 3819 return 3820 } 3821 3822 // HasFuncHasOnTouch returns true if the function "WEBEXT.inputMethodPrivate.onTouch.hasListener" exists. 3823 func HasFuncHasOnTouch() bool { 3824 return js.True == bindings.HasFuncHasOnTouch() 3825 } 3826 3827 // FuncHasOnTouch returns the function "WEBEXT.inputMethodPrivate.onTouch.hasListener". 3828 func FuncHasOnTouch() (fn js.Func[func(callback js.Func[func(pointerType FocusReason)]) bool]) { 3829 bindings.FuncHasOnTouch( 3830 js.Pointer(&fn), 3831 ) 3832 return 3833 } 3834 3835 // HasOnTouch calls the function "WEBEXT.inputMethodPrivate.onTouch.hasListener" directly. 3836 func HasOnTouch(callback js.Func[func(pointerType FocusReason)]) (ret bool) { 3837 bindings.CallHasOnTouch( 3838 js.Pointer(&ret), 3839 callback.Ref(), 3840 ) 3841 3842 return 3843 } 3844 3845 // TryHasOnTouch calls the function "WEBEXT.inputMethodPrivate.onTouch.hasListener" 3846 // in a try/catch block and returns (_, err, ok = false) when it went through 3847 // the catch clause. 3848 func TryHasOnTouch(callback js.Func[func(pointerType FocusReason)]) (ret bool, exception js.Any, ok bool) { 3849 ok = js.True == bindings.TryHasOnTouch( 3850 js.Pointer(&ret), js.Pointer(&exception), 3851 callback.Ref(), 3852 ) 3853 3854 return 3855 } 3856 3857 // HasFuncOpenOptionsPage returns true if the function "WEBEXT.inputMethodPrivate.openOptionsPage" exists. 3858 func HasFuncOpenOptionsPage() bool { 3859 return js.True == bindings.HasFuncOpenOptionsPage() 3860 } 3861 3862 // FuncOpenOptionsPage returns the function "WEBEXT.inputMethodPrivate.openOptionsPage". 3863 func FuncOpenOptionsPage() (fn js.Func[func(inputMethodId js.String)]) { 3864 bindings.FuncOpenOptionsPage( 3865 js.Pointer(&fn), 3866 ) 3867 return 3868 } 3869 3870 // OpenOptionsPage calls the function "WEBEXT.inputMethodPrivate.openOptionsPage" directly. 3871 func OpenOptionsPage(inputMethodId js.String) (ret js.Void) { 3872 bindings.CallOpenOptionsPage( 3873 js.Pointer(&ret), 3874 inputMethodId.Ref(), 3875 ) 3876 3877 return 3878 } 3879 3880 // TryOpenOptionsPage calls the function "WEBEXT.inputMethodPrivate.openOptionsPage" 3881 // in a try/catch block and returns (_, err, ok = false) when it went through 3882 // the catch clause. 3883 func TryOpenOptionsPage(inputMethodId js.String) (ret js.Void, exception js.Any, ok bool) { 3884 ok = js.True == bindings.TryOpenOptionsPage( 3885 js.Pointer(&ret), js.Pointer(&exception), 3886 inputMethodId.Ref(), 3887 ) 3888 3889 return 3890 } 3891 3892 // HasFuncReset returns true if the function "WEBEXT.inputMethodPrivate.reset" exists. 3893 func HasFuncReset() bool { 3894 return js.True == bindings.HasFuncReset() 3895 } 3896 3897 // FuncReset returns the function "WEBEXT.inputMethodPrivate.reset". 3898 func FuncReset() (fn js.Func[func()]) { 3899 bindings.FuncReset( 3900 js.Pointer(&fn), 3901 ) 3902 return 3903 } 3904 3905 // Reset calls the function "WEBEXT.inputMethodPrivate.reset" directly. 3906 func Reset() (ret js.Void) { 3907 bindings.CallReset( 3908 js.Pointer(&ret), 3909 ) 3910 3911 return 3912 } 3913 3914 // TryReset calls the function "WEBEXT.inputMethodPrivate.reset" 3915 // in a try/catch block and returns (_, err, ok = false) when it went through 3916 // the catch clause. 3917 func TryReset() (ret js.Void, exception js.Any, ok bool) { 3918 ok = js.True == bindings.TryReset( 3919 js.Pointer(&ret), js.Pointer(&exception), 3920 ) 3921 3922 return 3923 } 3924 3925 // HasFuncSetCompositionRange returns true if the function "WEBEXT.inputMethodPrivate.setCompositionRange" exists. 3926 func HasFuncSetCompositionRange() bool { 3927 return js.True == bindings.HasFuncSetCompositionRange() 3928 } 3929 3930 // FuncSetCompositionRange returns the function "WEBEXT.inputMethodPrivate.setCompositionRange". 3931 func FuncSetCompositionRange() (fn js.Func[func(parameters SetCompositionRangeArgParameters) js.Promise[js.Boolean]]) { 3932 bindings.FuncSetCompositionRange( 3933 js.Pointer(&fn), 3934 ) 3935 return 3936 } 3937 3938 // SetCompositionRange calls the function "WEBEXT.inputMethodPrivate.setCompositionRange" directly. 3939 func SetCompositionRange(parameters SetCompositionRangeArgParameters) (ret js.Promise[js.Boolean]) { 3940 bindings.CallSetCompositionRange( 3941 js.Pointer(&ret), 3942 js.Pointer(¶meters), 3943 ) 3944 3945 return 3946 } 3947 3948 // TrySetCompositionRange calls the function "WEBEXT.inputMethodPrivate.setCompositionRange" 3949 // in a try/catch block and returns (_, err, ok = false) when it went through 3950 // the catch clause. 3951 func TrySetCompositionRange(parameters SetCompositionRangeArgParameters) (ret js.Promise[js.Boolean], exception js.Any, ok bool) { 3952 ok = js.True == bindings.TrySetCompositionRange( 3953 js.Pointer(&ret), js.Pointer(&exception), 3954 js.Pointer(¶meters), 3955 ) 3956 3957 return 3958 } 3959 3960 // HasFuncSetCurrentInputMethod returns true if the function "WEBEXT.inputMethodPrivate.setCurrentInputMethod" exists. 3961 func HasFuncSetCurrentInputMethod() bool { 3962 return js.True == bindings.HasFuncSetCurrentInputMethod() 3963 } 3964 3965 // FuncSetCurrentInputMethod returns the function "WEBEXT.inputMethodPrivate.setCurrentInputMethod". 3966 func FuncSetCurrentInputMethod() (fn js.Func[func(inputMethodId js.String) js.Promise[js.Void]]) { 3967 bindings.FuncSetCurrentInputMethod( 3968 js.Pointer(&fn), 3969 ) 3970 return 3971 } 3972 3973 // SetCurrentInputMethod calls the function "WEBEXT.inputMethodPrivate.setCurrentInputMethod" directly. 3974 func SetCurrentInputMethod(inputMethodId js.String) (ret js.Promise[js.Void]) { 3975 bindings.CallSetCurrentInputMethod( 3976 js.Pointer(&ret), 3977 inputMethodId.Ref(), 3978 ) 3979 3980 return 3981 } 3982 3983 // TrySetCurrentInputMethod calls the function "WEBEXT.inputMethodPrivate.setCurrentInputMethod" 3984 // in a try/catch block and returns (_, err, ok = false) when it went through 3985 // the catch clause. 3986 func TrySetCurrentInputMethod(inputMethodId js.String) (ret js.Promise[js.Void], exception js.Any, ok bool) { 3987 ok = js.True == bindings.TrySetCurrentInputMethod( 3988 js.Pointer(&ret), js.Pointer(&exception), 3989 inputMethodId.Ref(), 3990 ) 3991 3992 return 3993 } 3994 3995 // HasFuncSetSettings returns true if the function "WEBEXT.inputMethodPrivate.setSettings" exists. 3996 func HasFuncSetSettings() bool { 3997 return js.True == bindings.HasFuncSetSettings() 3998 } 3999 4000 // FuncSetSettings returns the function "WEBEXT.inputMethodPrivate.setSettings". 4001 func FuncSetSettings() (fn js.Func[func(engineID js.String, settings InputMethodSettings) js.Promise[js.Void]]) { 4002 bindings.FuncSetSettings( 4003 js.Pointer(&fn), 4004 ) 4005 return 4006 } 4007 4008 // SetSettings calls the function "WEBEXT.inputMethodPrivate.setSettings" directly. 4009 func SetSettings(engineID js.String, settings InputMethodSettings) (ret js.Promise[js.Void]) { 4010 bindings.CallSetSettings( 4011 js.Pointer(&ret), 4012 engineID.Ref(), 4013 js.Pointer(&settings), 4014 ) 4015 4016 return 4017 } 4018 4019 // TrySetSettings calls the function "WEBEXT.inputMethodPrivate.setSettings" 4020 // in a try/catch block and returns (_, err, ok = false) when it went through 4021 // the catch clause. 4022 func TrySetSettings(engineID js.String, settings InputMethodSettings) (ret js.Promise[js.Void], exception js.Any, ok bool) { 4023 ok = js.True == bindings.TrySetSettings( 4024 js.Pointer(&ret), js.Pointer(&exception), 4025 engineID.Ref(), 4026 js.Pointer(&settings), 4027 ) 4028 4029 return 4030 } 4031 4032 // HasFuncSetXkbLayout returns true if the function "WEBEXT.inputMethodPrivate.setXkbLayout" exists. 4033 func HasFuncSetXkbLayout() bool { 4034 return js.True == bindings.HasFuncSetXkbLayout() 4035 } 4036 4037 // FuncSetXkbLayout returns the function "WEBEXT.inputMethodPrivate.setXkbLayout". 4038 func FuncSetXkbLayout() (fn js.Func[func(xkb_name js.String) js.Promise[js.Void]]) { 4039 bindings.FuncSetXkbLayout( 4040 js.Pointer(&fn), 4041 ) 4042 return 4043 } 4044 4045 // SetXkbLayout calls the function "WEBEXT.inputMethodPrivate.setXkbLayout" directly. 4046 func SetXkbLayout(xkb_name js.String) (ret js.Promise[js.Void]) { 4047 bindings.CallSetXkbLayout( 4048 js.Pointer(&ret), 4049 xkb_name.Ref(), 4050 ) 4051 4052 return 4053 } 4054 4055 // TrySetXkbLayout calls the function "WEBEXT.inputMethodPrivate.setXkbLayout" 4056 // in a try/catch block and returns (_, err, ok = false) when it went through 4057 // the catch clause. 4058 func TrySetXkbLayout(xkb_name js.String) (ret js.Promise[js.Void], exception js.Any, ok bool) { 4059 ok = js.True == bindings.TrySetXkbLayout( 4060 js.Pointer(&ret), js.Pointer(&exception), 4061 xkb_name.Ref(), 4062 ) 4063 4064 return 4065 } 4066 4067 // HasFuncShowInputView returns true if the function "WEBEXT.inputMethodPrivate.showInputView" exists. 4068 func HasFuncShowInputView() bool { 4069 return js.True == bindings.HasFuncShowInputView() 4070 } 4071 4072 // FuncShowInputView returns the function "WEBEXT.inputMethodPrivate.showInputView". 4073 func FuncShowInputView() (fn js.Func[func() js.Promise[js.Void]]) { 4074 bindings.FuncShowInputView( 4075 js.Pointer(&fn), 4076 ) 4077 return 4078 } 4079 4080 // ShowInputView calls the function "WEBEXT.inputMethodPrivate.showInputView" directly. 4081 func ShowInputView() (ret js.Promise[js.Void]) { 4082 bindings.CallShowInputView( 4083 js.Pointer(&ret), 4084 ) 4085 4086 return 4087 } 4088 4089 // TryShowInputView calls the function "WEBEXT.inputMethodPrivate.showInputView" 4090 // in a try/catch block and returns (_, err, ok = false) when it went through 4091 // the catch clause. 4092 func TryShowInputView() (ret js.Promise[js.Void], exception js.Any, ok bool) { 4093 ok = js.True == bindings.TryShowInputView( 4094 js.Pointer(&ret), js.Pointer(&exception), 4095 ) 4096 4097 return 4098 } 4099 4100 // HasFuncSwitchToLastUsedInputMethod returns true if the function "WEBEXT.inputMethodPrivate.switchToLastUsedInputMethod" exists. 4101 func HasFuncSwitchToLastUsedInputMethod() bool { 4102 return js.True == bindings.HasFuncSwitchToLastUsedInputMethod() 4103 } 4104 4105 // FuncSwitchToLastUsedInputMethod returns the function "WEBEXT.inputMethodPrivate.switchToLastUsedInputMethod". 4106 func FuncSwitchToLastUsedInputMethod() (fn js.Func[func() js.Promise[js.Void]]) { 4107 bindings.FuncSwitchToLastUsedInputMethod( 4108 js.Pointer(&fn), 4109 ) 4110 return 4111 } 4112 4113 // SwitchToLastUsedInputMethod calls the function "WEBEXT.inputMethodPrivate.switchToLastUsedInputMethod" directly. 4114 func SwitchToLastUsedInputMethod() (ret js.Promise[js.Void]) { 4115 bindings.CallSwitchToLastUsedInputMethod( 4116 js.Pointer(&ret), 4117 ) 4118 4119 return 4120 } 4121 4122 // TrySwitchToLastUsedInputMethod calls the function "WEBEXT.inputMethodPrivate.switchToLastUsedInputMethod" 4123 // in a try/catch block and returns (_, err, ok = false) when it went through 4124 // the catch clause. 4125 func TrySwitchToLastUsedInputMethod() (ret js.Promise[js.Void], exception js.Any, ok bool) { 4126 ok = js.True == bindings.TrySwitchToLastUsedInputMethod( 4127 js.Pointer(&ret), js.Pointer(&exception), 4128 ) 4129 4130 return 4131 }