github.com/primecitizens/pcz/std@v0.2.1/plat/js/webext/virtualkeyboardprivate/bindings/ffi_bindings.ts (about)

     1  import { importModule, Application, heap, Pointer } from "@ffi";
     2  
     3  importModule("plat/js/webext/virtualkeyboardprivate", (A: Application) => {
     4    const WEBEXT = typeof globalThis.browser === "undefined" ? globalThis.chrome : globalThis.browser;
     5  
     6    return {
     7      "store_Bounds": (ptr: Pointer, ref: heap.Ref<any>) => {
     8        const x = A.H.get<any>(ref);
     9  
    10        if (typeof x === "undefined") {
    11          A.store.Bool(ptr + 32, false);
    12          A.store.Int64(ptr + 0, 0);
    13          A.store.Int64(ptr + 8, 0);
    14          A.store.Int64(ptr + 16, 0);
    15          A.store.Int64(ptr + 24, 0);
    16        } else {
    17          A.store.Bool(ptr + 32, true);
    18          A.store.Int64(ptr + 0, x["height"] === undefined ? 0 : (x["height"] as number));
    19          A.store.Int64(ptr + 8, x["left"] === undefined ? 0 : (x["left"] as number));
    20          A.store.Int64(ptr + 16, x["top"] === undefined ? 0 : (x["top"] as number));
    21          A.store.Int64(ptr + 24, x["width"] === undefined ? 0 : (x["width"] as number));
    22        }
    23      },
    24      "load_Bounds": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => {
    25        const x = create === A.H.TRUE ? {} : A.H.get<any>(ref);
    26  
    27        x["height"] = A.load.Int64(ptr + 0);
    28        x["left"] = A.load.Int64(ptr + 8);
    29        x["top"] = A.load.Int64(ptr + 16);
    30        x["width"] = A.load.Int64(ptr + 24);
    31        return create === A.H.TRUE ? A.H.push(x) : ref;
    32      },
    33      "constof_DisplayFormat": (ref: heap.Ref<string>): number => {
    34        const idx = ["text", "png", "html", "file"].indexOf(A.H.get(ref));
    35        return idx < 0 ? 0 : idx + 1;
    36      },
    37  
    38      "store_ClipboardItem": (ptr: Pointer, ref: heap.Ref<any>) => {
    39        const x = A.H.get<any>(ref);
    40  
    41        if (typeof x === "undefined") {
    42          A.store.Bool(ptr + 24, false);
    43          A.store.Enum(ptr + 0, -1);
    44          A.store.Ref(ptr + 4, undefined);
    45          A.store.Ref(ptr + 8, undefined);
    46          A.store.Ref(ptr + 12, undefined);
    47          A.store.Float64(ptr + 16, 0);
    48        } else {
    49          A.store.Bool(ptr + 24, true);
    50          A.store.Enum(ptr + 0, ["text", "png", "html", "file"].indexOf(x["displayFormat"] as string));
    51          A.store.Ref(ptr + 4, x["id"]);
    52          A.store.Ref(ptr + 8, x["imageData"]);
    53          A.store.Ref(ptr + 12, x["textData"]);
    54          A.store.Float64(ptr + 16, x["timeCopied"] === undefined ? 0 : (x["timeCopied"] as number));
    55        }
    56      },
    57      "load_ClipboardItem": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => {
    58        const x = create === A.H.TRUE ? {} : A.H.get<any>(ref);
    59  
    60        x["displayFormat"] = A.load.Enum(ptr + 0, ["text", "png", "html", "file"]);
    61        x["id"] = A.load.Ref(ptr + 4, undefined);
    62        x["imageData"] = A.load.Ref(ptr + 8, undefined);
    63        x["textData"] = A.load.Ref(ptr + 12, undefined);
    64        x["timeCopied"] = A.load.Float64(ptr + 16);
    65        return create === A.H.TRUE ? A.H.push(x) : ref;
    66      },
    67      "constof_KeyboardMode": (ref: heap.Ref<string>): number => {
    68        const idx = ["FULL_WIDTH", "FLOATING"].indexOf(A.H.get(ref));
    69        return idx < 0 ? 0 : idx + 1;
    70      },
    71  
    72      "store_ContainerBehaviorOptions": (ptr: Pointer, ref: heap.Ref<any>) => {
    73        const x = A.H.get<any>(ref);
    74  
    75        if (typeof x === "undefined") {
    76          A.store.Bool(ptr + 40, false);
    77  
    78          A.store.Bool(ptr + 0 + 32, false);
    79          A.store.Int64(ptr + 0 + 0, 0);
    80          A.store.Int64(ptr + 0 + 8, 0);
    81          A.store.Int64(ptr + 0 + 16, 0);
    82          A.store.Int64(ptr + 0 + 24, 0);
    83          A.store.Enum(ptr + 36, -1);
    84        } else {
    85          A.store.Bool(ptr + 40, true);
    86  
    87          if (typeof x["bounds"] === "undefined") {
    88            A.store.Bool(ptr + 0 + 32, false);
    89            A.store.Int64(ptr + 0 + 0, 0);
    90            A.store.Int64(ptr + 0 + 8, 0);
    91            A.store.Int64(ptr + 0 + 16, 0);
    92            A.store.Int64(ptr + 0 + 24, 0);
    93          } else {
    94            A.store.Bool(ptr + 0 + 32, true);
    95            A.store.Int64(ptr + 0 + 0, x["bounds"]["height"] === undefined ? 0 : (x["bounds"]["height"] as number));
    96            A.store.Int64(ptr + 0 + 8, x["bounds"]["left"] === undefined ? 0 : (x["bounds"]["left"] as number));
    97            A.store.Int64(ptr + 0 + 16, x["bounds"]["top"] === undefined ? 0 : (x["bounds"]["top"] as number));
    98            A.store.Int64(ptr + 0 + 24, x["bounds"]["width"] === undefined ? 0 : (x["bounds"]["width"] as number));
    99          }
   100          A.store.Enum(ptr + 36, ["FULL_WIDTH", "FLOATING"].indexOf(x["mode"] as string));
   101        }
   102      },
   103      "load_ContainerBehaviorOptions": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => {
   104        const x = create === A.H.TRUE ? {} : A.H.get<any>(ref);
   105  
   106        if (A.load.Bool(ptr + 0 + 32)) {
   107          x["bounds"] = {};
   108          x["bounds"]["height"] = A.load.Int64(ptr + 0 + 0);
   109          x["bounds"]["left"] = A.load.Int64(ptr + 0 + 8);
   110          x["bounds"]["top"] = A.load.Int64(ptr + 0 + 16);
   111          x["bounds"]["width"] = A.load.Int64(ptr + 0 + 24);
   112        } else {
   113          delete x["bounds"];
   114        }
   115        x["mode"] = A.load.Enum(ptr + 36, ["FULL_WIDTH", "FLOATING"]);
   116        return create === A.H.TRUE ? A.H.push(x) : ref;
   117      },
   118  
   119      "store_GetClipboardHistoryArgOptions": (ptr: Pointer, ref: heap.Ref<any>) => {
   120        const x = A.H.get<any>(ref);
   121  
   122        if (typeof x === "undefined") {
   123          A.store.Bool(ptr + 4, false);
   124          A.store.Ref(ptr + 0, undefined);
   125        } else {
   126          A.store.Bool(ptr + 4, true);
   127          A.store.Ref(ptr + 0, x["itemIds"]);
   128        }
   129      },
   130      "load_GetClipboardHistoryArgOptions": (
   131        ptr: Pointer,
   132        create: heap.Ref<boolean>,
   133        ref: heap.Ref<any>
   134      ): heap.Ref<any> => {
   135        const x = create === A.H.TRUE ? {} : A.H.get<any>(ref);
   136  
   137        x["itemIds"] = A.load.Ref(ptr + 0, undefined);
   138        return create === A.H.TRUE ? A.H.push(x) : ref;
   139      },
   140  
   141      "store_KeyboardConfig": (ptr: Pointer, ref: heap.Ref<any>) => {
   142        const x = A.H.get<any>(ref);
   143  
   144        if (typeof x === "undefined") {
   145          A.store.Bool(ptr + 16, false);
   146          A.store.Bool(ptr + 0, false);
   147          A.store.Ref(ptr + 4, undefined);
   148          A.store.Bool(ptr + 8, false);
   149          A.store.Ref(ptr + 12, undefined);
   150        } else {
   151          A.store.Bool(ptr + 16, true);
   152          A.store.Bool(ptr + 0, x["a11ymode"] ? true : false);
   153          A.store.Ref(ptr + 4, x["features"]);
   154          A.store.Bool(ptr + 8, x["hotrodmode"] ? true : false);
   155          A.store.Ref(ptr + 12, x["layout"]);
   156        }
   157      },
   158      "load_KeyboardConfig": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => {
   159        const x = create === A.H.TRUE ? {} : A.H.get<any>(ref);
   160  
   161        x["a11ymode"] = A.load.Bool(ptr + 0);
   162        x["features"] = A.load.Ref(ptr + 4, undefined);
   163        x["hotrodmode"] = A.load.Bool(ptr + 8);
   164        x["layout"] = A.load.Ref(ptr + 12, undefined);
   165        return create === A.H.TRUE ? A.H.push(x) : ref;
   166      },
   167      "constof_KeyboardState": (ref: heap.Ref<string>): number => {
   168        const idx = ["ENABLED", "DISABLED", "AUTO"].indexOf(A.H.get(ref));
   169        return idx < 0 ? 0 : idx + 1;
   170      },
   171      "constof_VirtualKeyboardEventType": (ref: heap.Ref<string>): number => {
   172        const idx = ["keyup", "keydown"].indexOf(A.H.get(ref));
   173        return idx < 0 ? 0 : idx + 1;
   174      },
   175  
   176      "store_VirtualKeyboardEvent": (ptr: Pointer, ref: heap.Ref<any>) => {
   177        const x = A.H.get<any>(ref);
   178  
   179        if (typeof x === "undefined") {
   180          A.store.Bool(ptr + 37, false);
   181          A.store.Int64(ptr + 0, 0);
   182          A.store.Int64(ptr + 8, 0);
   183          A.store.Ref(ptr + 16, undefined);
   184          A.store.Bool(ptr + 36, false);
   185          A.store.Int64(ptr + 24, 0);
   186          A.store.Enum(ptr + 32, -1);
   187        } else {
   188          A.store.Bool(ptr + 37, true);
   189          A.store.Int64(ptr + 0, x["charValue"] === undefined ? 0 : (x["charValue"] as number));
   190          A.store.Int64(ptr + 8, x["keyCode"] === undefined ? 0 : (x["keyCode"] as number));
   191          A.store.Ref(ptr + 16, x["keyName"]);
   192          A.store.Bool(ptr + 36, "modifiers" in x ? true : false);
   193          A.store.Int64(ptr + 24, x["modifiers"] === undefined ? 0 : (x["modifiers"] as number));
   194          A.store.Enum(ptr + 32, ["keyup", "keydown"].indexOf(x["type"] as string));
   195        }
   196      },
   197      "load_VirtualKeyboardEvent": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => {
   198        const x = create === A.H.TRUE ? {} : A.H.get<any>(ref);
   199  
   200        x["charValue"] = A.load.Int64(ptr + 0);
   201        x["keyCode"] = A.load.Int64(ptr + 8);
   202        x["keyName"] = A.load.Ref(ptr + 16, undefined);
   203        if (A.load.Bool(ptr + 36)) {
   204          x["modifiers"] = A.load.Int64(ptr + 24);
   205        } else {
   206          delete x["modifiers"];
   207        }
   208        x["type"] = A.load.Enum(ptr + 32, ["keyup", "keydown"]);
   209        return create === A.H.TRUE ? A.H.push(x) : ref;
   210      },
   211      "has_DeleteClipboardItem": (): heap.Ref<boolean> => {
   212        if (WEBEXT?.virtualKeyboardPrivate && "deleteClipboardItem" in WEBEXT?.virtualKeyboardPrivate) {
   213          return A.H.TRUE;
   214        }
   215        return A.H.FALSE;
   216      },
   217      "func_DeleteClipboardItem": (fn: Pointer): void => {
   218        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.deleteClipboardItem);
   219      },
   220      "call_DeleteClipboardItem": (retPtr: Pointer, itemId: heap.Ref<object>): void => {
   221        const _ret = WEBEXT.virtualKeyboardPrivate.deleteClipboardItem(A.H.get<object>(itemId));
   222      },
   223      "try_DeleteClipboardItem": (retPtr: Pointer, errPtr: Pointer, itemId: heap.Ref<object>): heap.Ref<boolean> => {
   224        try {
   225          const _ret = WEBEXT.virtualKeyboardPrivate.deleteClipboardItem(A.H.get<object>(itemId));
   226          return A.H.TRUE;
   227        } catch (err: any) {
   228          A.store.Ref(errPtr, err);
   229          return A.H.FALSE;
   230        }
   231      },
   232      "has_GetClipboardHistory": (): heap.Ref<boolean> => {
   233        if (WEBEXT?.virtualKeyboardPrivate && "getClipboardHistory" in WEBEXT?.virtualKeyboardPrivate) {
   234          return A.H.TRUE;
   235        }
   236        return A.H.FALSE;
   237      },
   238      "func_GetClipboardHistory": (fn: Pointer): void => {
   239        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.getClipboardHistory);
   240      },
   241      "call_GetClipboardHistory": (retPtr: Pointer, options: Pointer): void => {
   242        const options_ffi = {};
   243  
   244        options_ffi["itemIds"] = A.load.Ref(options + 0, undefined);
   245  
   246        const _ret = WEBEXT.virtualKeyboardPrivate.getClipboardHistory(options_ffi);
   247        A.store.Ref(retPtr, _ret);
   248      },
   249      "try_GetClipboardHistory": (retPtr: Pointer, errPtr: Pointer, options: Pointer): heap.Ref<boolean> => {
   250        try {
   251          const options_ffi = {};
   252  
   253          options_ffi["itemIds"] = A.load.Ref(options + 0, undefined);
   254  
   255          const _ret = WEBEXT.virtualKeyboardPrivate.getClipboardHistory(options_ffi);
   256          A.store.Ref(retPtr, _ret);
   257          return A.H.TRUE;
   258        } catch (err: any) {
   259          A.store.Ref(errPtr, err);
   260          return A.H.FALSE;
   261        }
   262      },
   263      "has_GetKeyboardConfig": (): heap.Ref<boolean> => {
   264        if (WEBEXT?.virtualKeyboardPrivate && "getKeyboardConfig" in WEBEXT?.virtualKeyboardPrivate) {
   265          return A.H.TRUE;
   266        }
   267        return A.H.FALSE;
   268      },
   269      "func_GetKeyboardConfig": (fn: Pointer): void => {
   270        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.getKeyboardConfig);
   271      },
   272      "call_GetKeyboardConfig": (retPtr: Pointer): void => {
   273        const _ret = WEBEXT.virtualKeyboardPrivate.getKeyboardConfig();
   274        A.store.Ref(retPtr, _ret);
   275      },
   276      "try_GetKeyboardConfig": (retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => {
   277        try {
   278          const _ret = WEBEXT.virtualKeyboardPrivate.getKeyboardConfig();
   279          A.store.Ref(retPtr, _ret);
   280          return A.H.TRUE;
   281        } catch (err: any) {
   282          A.store.Ref(errPtr, err);
   283          return A.H.FALSE;
   284        }
   285      },
   286      "has_HideKeyboard": (): heap.Ref<boolean> => {
   287        if (WEBEXT?.virtualKeyboardPrivate && "hideKeyboard" in WEBEXT?.virtualKeyboardPrivate) {
   288          return A.H.TRUE;
   289        }
   290        return A.H.FALSE;
   291      },
   292      "func_HideKeyboard": (fn: Pointer): void => {
   293        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.hideKeyboard);
   294      },
   295      "call_HideKeyboard": (retPtr: Pointer): void => {
   296        const _ret = WEBEXT.virtualKeyboardPrivate.hideKeyboard();
   297        A.store.Ref(retPtr, _ret);
   298      },
   299      "try_HideKeyboard": (retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => {
   300        try {
   301          const _ret = WEBEXT.virtualKeyboardPrivate.hideKeyboard();
   302          A.store.Ref(retPtr, _ret);
   303          return A.H.TRUE;
   304        } catch (err: any) {
   305          A.store.Ref(errPtr, err);
   306          return A.H.FALSE;
   307        }
   308      },
   309      "has_InsertText": (): heap.Ref<boolean> => {
   310        if (WEBEXT?.virtualKeyboardPrivate && "insertText" in WEBEXT?.virtualKeyboardPrivate) {
   311          return A.H.TRUE;
   312        }
   313        return A.H.FALSE;
   314      },
   315      "func_InsertText": (fn: Pointer): void => {
   316        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.insertText);
   317      },
   318      "call_InsertText": (retPtr: Pointer, text: heap.Ref<object>): void => {
   319        const _ret = WEBEXT.virtualKeyboardPrivate.insertText(A.H.get<object>(text));
   320        A.store.Ref(retPtr, _ret);
   321      },
   322      "try_InsertText": (retPtr: Pointer, errPtr: Pointer, text: heap.Ref<object>): heap.Ref<boolean> => {
   323        try {
   324          const _ret = WEBEXT.virtualKeyboardPrivate.insertText(A.H.get<object>(text));
   325          A.store.Ref(retPtr, _ret);
   326          return A.H.TRUE;
   327        } catch (err: any) {
   328          A.store.Ref(errPtr, err);
   329          return A.H.FALSE;
   330        }
   331      },
   332      "has_KeyboardLoaded": (): heap.Ref<boolean> => {
   333        if (WEBEXT?.virtualKeyboardPrivate && "keyboardLoaded" in WEBEXT?.virtualKeyboardPrivate) {
   334          return A.H.TRUE;
   335        }
   336        return A.H.FALSE;
   337      },
   338      "func_KeyboardLoaded": (fn: Pointer): void => {
   339        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.keyboardLoaded);
   340      },
   341      "call_KeyboardLoaded": (retPtr: Pointer): void => {
   342        const _ret = WEBEXT.virtualKeyboardPrivate.keyboardLoaded();
   343        A.store.Ref(retPtr, _ret);
   344      },
   345      "try_KeyboardLoaded": (retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => {
   346        try {
   347          const _ret = WEBEXT.virtualKeyboardPrivate.keyboardLoaded();
   348          A.store.Ref(retPtr, _ret);
   349          return A.H.TRUE;
   350        } catch (err: any) {
   351          A.store.Ref(errPtr, err);
   352          return A.H.FALSE;
   353        }
   354      },
   355      "has_LockKeyboard": (): heap.Ref<boolean> => {
   356        if (WEBEXT?.virtualKeyboardPrivate && "lockKeyboard" in WEBEXT?.virtualKeyboardPrivate) {
   357          return A.H.TRUE;
   358        }
   359        return A.H.FALSE;
   360      },
   361      "func_LockKeyboard": (fn: Pointer): void => {
   362        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.lockKeyboard);
   363      },
   364      "call_LockKeyboard": (retPtr: Pointer, lock: heap.Ref<boolean>): void => {
   365        const _ret = WEBEXT.virtualKeyboardPrivate.lockKeyboard(lock === A.H.TRUE);
   366      },
   367      "try_LockKeyboard": (retPtr: Pointer, errPtr: Pointer, lock: heap.Ref<boolean>): heap.Ref<boolean> => {
   368        try {
   369          const _ret = WEBEXT.virtualKeyboardPrivate.lockKeyboard(lock === A.H.TRUE);
   370          return A.H.TRUE;
   371        } catch (err: any) {
   372          A.store.Ref(errPtr, err);
   373          return A.H.FALSE;
   374        }
   375      },
   376      "has_OnBoundsChanged": (): heap.Ref<boolean> => {
   377        if (
   378          WEBEXT?.virtualKeyboardPrivate?.onBoundsChanged &&
   379          "addListener" in WEBEXT?.virtualKeyboardPrivate?.onBoundsChanged
   380        ) {
   381          return A.H.TRUE;
   382        }
   383        return A.H.FALSE;
   384      },
   385      "func_OnBoundsChanged": (fn: Pointer): void => {
   386        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.onBoundsChanged.addListener);
   387      },
   388      "call_OnBoundsChanged": (retPtr: Pointer, callback: heap.Ref<object>): void => {
   389        const _ret = WEBEXT.virtualKeyboardPrivate.onBoundsChanged.addListener(A.H.get<object>(callback));
   390      },
   391      "try_OnBoundsChanged": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
   392        try {
   393          const _ret = WEBEXT.virtualKeyboardPrivate.onBoundsChanged.addListener(A.H.get<object>(callback));
   394          return A.H.TRUE;
   395        } catch (err: any) {
   396          A.store.Ref(errPtr, err);
   397          return A.H.FALSE;
   398        }
   399      },
   400      "has_OffBoundsChanged": (): heap.Ref<boolean> => {
   401        if (
   402          WEBEXT?.virtualKeyboardPrivate?.onBoundsChanged &&
   403          "removeListener" in WEBEXT?.virtualKeyboardPrivate?.onBoundsChanged
   404        ) {
   405          return A.H.TRUE;
   406        }
   407        return A.H.FALSE;
   408      },
   409      "func_OffBoundsChanged": (fn: Pointer): void => {
   410        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.onBoundsChanged.removeListener);
   411      },
   412      "call_OffBoundsChanged": (retPtr: Pointer, callback: heap.Ref<object>): void => {
   413        const _ret = WEBEXT.virtualKeyboardPrivate.onBoundsChanged.removeListener(A.H.get<object>(callback));
   414      },
   415      "try_OffBoundsChanged": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
   416        try {
   417          const _ret = WEBEXT.virtualKeyboardPrivate.onBoundsChanged.removeListener(A.H.get<object>(callback));
   418          return A.H.TRUE;
   419        } catch (err: any) {
   420          A.store.Ref(errPtr, err);
   421          return A.H.FALSE;
   422        }
   423      },
   424      "has_HasOnBoundsChanged": (): heap.Ref<boolean> => {
   425        if (
   426          WEBEXT?.virtualKeyboardPrivate?.onBoundsChanged &&
   427          "hasListener" in WEBEXT?.virtualKeyboardPrivate?.onBoundsChanged
   428        ) {
   429          return A.H.TRUE;
   430        }
   431        return A.H.FALSE;
   432      },
   433      "func_HasOnBoundsChanged": (fn: Pointer): void => {
   434        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.onBoundsChanged.hasListener);
   435      },
   436      "call_HasOnBoundsChanged": (retPtr: Pointer, callback: heap.Ref<object>): void => {
   437        const _ret = WEBEXT.virtualKeyboardPrivate.onBoundsChanged.hasListener(A.H.get<object>(callback));
   438        A.store.Bool(retPtr, _ret);
   439      },
   440      "try_HasOnBoundsChanged": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
   441        try {
   442          const _ret = WEBEXT.virtualKeyboardPrivate.onBoundsChanged.hasListener(A.H.get<object>(callback));
   443          A.store.Bool(retPtr, _ret);
   444          return A.H.TRUE;
   445        } catch (err: any) {
   446          A.store.Ref(errPtr, err);
   447          return A.H.FALSE;
   448        }
   449      },
   450      "has_OnClipboardHistoryChanged": (): heap.Ref<boolean> => {
   451        if (
   452          WEBEXT?.virtualKeyboardPrivate?.onClipboardHistoryChanged &&
   453          "addListener" in WEBEXT?.virtualKeyboardPrivate?.onClipboardHistoryChanged
   454        ) {
   455          return A.H.TRUE;
   456        }
   457        return A.H.FALSE;
   458      },
   459      "func_OnClipboardHistoryChanged": (fn: Pointer): void => {
   460        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.onClipboardHistoryChanged.addListener);
   461      },
   462      "call_OnClipboardHistoryChanged": (retPtr: Pointer, callback: heap.Ref<object>): void => {
   463        const _ret = WEBEXT.virtualKeyboardPrivate.onClipboardHistoryChanged.addListener(A.H.get<object>(callback));
   464      },
   465      "try_OnClipboardHistoryChanged": (
   466        retPtr: Pointer,
   467        errPtr: Pointer,
   468        callback: heap.Ref<object>
   469      ): heap.Ref<boolean> => {
   470        try {
   471          const _ret = WEBEXT.virtualKeyboardPrivate.onClipboardHistoryChanged.addListener(A.H.get<object>(callback));
   472          return A.H.TRUE;
   473        } catch (err: any) {
   474          A.store.Ref(errPtr, err);
   475          return A.H.FALSE;
   476        }
   477      },
   478      "has_OffClipboardHistoryChanged": (): heap.Ref<boolean> => {
   479        if (
   480          WEBEXT?.virtualKeyboardPrivate?.onClipboardHistoryChanged &&
   481          "removeListener" in WEBEXT?.virtualKeyboardPrivate?.onClipboardHistoryChanged
   482        ) {
   483          return A.H.TRUE;
   484        }
   485        return A.H.FALSE;
   486      },
   487      "func_OffClipboardHistoryChanged": (fn: Pointer): void => {
   488        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.onClipboardHistoryChanged.removeListener);
   489      },
   490      "call_OffClipboardHistoryChanged": (retPtr: Pointer, callback: heap.Ref<object>): void => {
   491        const _ret = WEBEXT.virtualKeyboardPrivate.onClipboardHistoryChanged.removeListener(A.H.get<object>(callback));
   492      },
   493      "try_OffClipboardHistoryChanged": (
   494        retPtr: Pointer,
   495        errPtr: Pointer,
   496        callback: heap.Ref<object>
   497      ): heap.Ref<boolean> => {
   498        try {
   499          const _ret = WEBEXT.virtualKeyboardPrivate.onClipboardHistoryChanged.removeListener(A.H.get<object>(callback));
   500          return A.H.TRUE;
   501        } catch (err: any) {
   502          A.store.Ref(errPtr, err);
   503          return A.H.FALSE;
   504        }
   505      },
   506      "has_HasOnClipboardHistoryChanged": (): heap.Ref<boolean> => {
   507        if (
   508          WEBEXT?.virtualKeyboardPrivate?.onClipboardHistoryChanged &&
   509          "hasListener" in WEBEXT?.virtualKeyboardPrivate?.onClipboardHistoryChanged
   510        ) {
   511          return A.H.TRUE;
   512        }
   513        return A.H.FALSE;
   514      },
   515      "func_HasOnClipboardHistoryChanged": (fn: Pointer): void => {
   516        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.onClipboardHistoryChanged.hasListener);
   517      },
   518      "call_HasOnClipboardHistoryChanged": (retPtr: Pointer, callback: heap.Ref<object>): void => {
   519        const _ret = WEBEXT.virtualKeyboardPrivate.onClipboardHistoryChanged.hasListener(A.H.get<object>(callback));
   520        A.store.Bool(retPtr, _ret);
   521      },
   522      "try_HasOnClipboardHistoryChanged": (
   523        retPtr: Pointer,
   524        errPtr: Pointer,
   525        callback: heap.Ref<object>
   526      ): heap.Ref<boolean> => {
   527        try {
   528          const _ret = WEBEXT.virtualKeyboardPrivate.onClipboardHistoryChanged.hasListener(A.H.get<object>(callback));
   529          A.store.Bool(retPtr, _ret);
   530          return A.H.TRUE;
   531        } catch (err: any) {
   532          A.store.Ref(errPtr, err);
   533          return A.H.FALSE;
   534        }
   535      },
   536      "has_OnClipboardItemUpdated": (): heap.Ref<boolean> => {
   537        if (
   538          WEBEXT?.virtualKeyboardPrivate?.onClipboardItemUpdated &&
   539          "addListener" in WEBEXT?.virtualKeyboardPrivate?.onClipboardItemUpdated
   540        ) {
   541          return A.H.TRUE;
   542        }
   543        return A.H.FALSE;
   544      },
   545      "func_OnClipboardItemUpdated": (fn: Pointer): void => {
   546        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.onClipboardItemUpdated.addListener);
   547      },
   548      "call_OnClipboardItemUpdated": (retPtr: Pointer, callback: heap.Ref<object>): void => {
   549        const _ret = WEBEXT.virtualKeyboardPrivate.onClipboardItemUpdated.addListener(A.H.get<object>(callback));
   550      },
   551      "try_OnClipboardItemUpdated": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
   552        try {
   553          const _ret = WEBEXT.virtualKeyboardPrivate.onClipboardItemUpdated.addListener(A.H.get<object>(callback));
   554          return A.H.TRUE;
   555        } catch (err: any) {
   556          A.store.Ref(errPtr, err);
   557          return A.H.FALSE;
   558        }
   559      },
   560      "has_OffClipboardItemUpdated": (): heap.Ref<boolean> => {
   561        if (
   562          WEBEXT?.virtualKeyboardPrivate?.onClipboardItemUpdated &&
   563          "removeListener" in WEBEXT?.virtualKeyboardPrivate?.onClipboardItemUpdated
   564        ) {
   565          return A.H.TRUE;
   566        }
   567        return A.H.FALSE;
   568      },
   569      "func_OffClipboardItemUpdated": (fn: Pointer): void => {
   570        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.onClipboardItemUpdated.removeListener);
   571      },
   572      "call_OffClipboardItemUpdated": (retPtr: Pointer, callback: heap.Ref<object>): void => {
   573        const _ret = WEBEXT.virtualKeyboardPrivate.onClipboardItemUpdated.removeListener(A.H.get<object>(callback));
   574      },
   575      "try_OffClipboardItemUpdated": (
   576        retPtr: Pointer,
   577        errPtr: Pointer,
   578        callback: heap.Ref<object>
   579      ): heap.Ref<boolean> => {
   580        try {
   581          const _ret = WEBEXT.virtualKeyboardPrivate.onClipboardItemUpdated.removeListener(A.H.get<object>(callback));
   582          return A.H.TRUE;
   583        } catch (err: any) {
   584          A.store.Ref(errPtr, err);
   585          return A.H.FALSE;
   586        }
   587      },
   588      "has_HasOnClipboardItemUpdated": (): heap.Ref<boolean> => {
   589        if (
   590          WEBEXT?.virtualKeyboardPrivate?.onClipboardItemUpdated &&
   591          "hasListener" in WEBEXT?.virtualKeyboardPrivate?.onClipboardItemUpdated
   592        ) {
   593          return A.H.TRUE;
   594        }
   595        return A.H.FALSE;
   596      },
   597      "func_HasOnClipboardItemUpdated": (fn: Pointer): void => {
   598        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.onClipboardItemUpdated.hasListener);
   599      },
   600      "call_HasOnClipboardItemUpdated": (retPtr: Pointer, callback: heap.Ref<object>): void => {
   601        const _ret = WEBEXT.virtualKeyboardPrivate.onClipboardItemUpdated.hasListener(A.H.get<object>(callback));
   602        A.store.Bool(retPtr, _ret);
   603      },
   604      "try_HasOnClipboardItemUpdated": (
   605        retPtr: Pointer,
   606        errPtr: Pointer,
   607        callback: heap.Ref<object>
   608      ): heap.Ref<boolean> => {
   609        try {
   610          const _ret = WEBEXT.virtualKeyboardPrivate.onClipboardItemUpdated.hasListener(A.H.get<object>(callback));
   611          A.store.Bool(retPtr, _ret);
   612          return A.H.TRUE;
   613        } catch (err: any) {
   614          A.store.Ref(errPtr, err);
   615          return A.H.FALSE;
   616        }
   617      },
   618      "has_OnColorProviderChanged": (): heap.Ref<boolean> => {
   619        if (
   620          WEBEXT?.virtualKeyboardPrivate?.onColorProviderChanged &&
   621          "addListener" in WEBEXT?.virtualKeyboardPrivate?.onColorProviderChanged
   622        ) {
   623          return A.H.TRUE;
   624        }
   625        return A.H.FALSE;
   626      },
   627      "func_OnColorProviderChanged": (fn: Pointer): void => {
   628        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.onColorProviderChanged.addListener);
   629      },
   630      "call_OnColorProviderChanged": (retPtr: Pointer, callback: heap.Ref<object>): void => {
   631        const _ret = WEBEXT.virtualKeyboardPrivate.onColorProviderChanged.addListener(A.H.get<object>(callback));
   632      },
   633      "try_OnColorProviderChanged": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
   634        try {
   635          const _ret = WEBEXT.virtualKeyboardPrivate.onColorProviderChanged.addListener(A.H.get<object>(callback));
   636          return A.H.TRUE;
   637        } catch (err: any) {
   638          A.store.Ref(errPtr, err);
   639          return A.H.FALSE;
   640        }
   641      },
   642      "has_OffColorProviderChanged": (): heap.Ref<boolean> => {
   643        if (
   644          WEBEXT?.virtualKeyboardPrivate?.onColorProviderChanged &&
   645          "removeListener" in WEBEXT?.virtualKeyboardPrivate?.onColorProviderChanged
   646        ) {
   647          return A.H.TRUE;
   648        }
   649        return A.H.FALSE;
   650      },
   651      "func_OffColorProviderChanged": (fn: Pointer): void => {
   652        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.onColorProviderChanged.removeListener);
   653      },
   654      "call_OffColorProviderChanged": (retPtr: Pointer, callback: heap.Ref<object>): void => {
   655        const _ret = WEBEXT.virtualKeyboardPrivate.onColorProviderChanged.removeListener(A.H.get<object>(callback));
   656      },
   657      "try_OffColorProviderChanged": (
   658        retPtr: Pointer,
   659        errPtr: Pointer,
   660        callback: heap.Ref<object>
   661      ): heap.Ref<boolean> => {
   662        try {
   663          const _ret = WEBEXT.virtualKeyboardPrivate.onColorProviderChanged.removeListener(A.H.get<object>(callback));
   664          return A.H.TRUE;
   665        } catch (err: any) {
   666          A.store.Ref(errPtr, err);
   667          return A.H.FALSE;
   668        }
   669      },
   670      "has_HasOnColorProviderChanged": (): heap.Ref<boolean> => {
   671        if (
   672          WEBEXT?.virtualKeyboardPrivate?.onColorProviderChanged &&
   673          "hasListener" in WEBEXT?.virtualKeyboardPrivate?.onColorProviderChanged
   674        ) {
   675          return A.H.TRUE;
   676        }
   677        return A.H.FALSE;
   678      },
   679      "func_HasOnColorProviderChanged": (fn: Pointer): void => {
   680        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.onColorProviderChanged.hasListener);
   681      },
   682      "call_HasOnColorProviderChanged": (retPtr: Pointer, callback: heap.Ref<object>): void => {
   683        const _ret = WEBEXT.virtualKeyboardPrivate.onColorProviderChanged.hasListener(A.H.get<object>(callback));
   684        A.store.Bool(retPtr, _ret);
   685      },
   686      "try_HasOnColorProviderChanged": (
   687        retPtr: Pointer,
   688        errPtr: Pointer,
   689        callback: heap.Ref<object>
   690      ): heap.Ref<boolean> => {
   691        try {
   692          const _ret = WEBEXT.virtualKeyboardPrivate.onColorProviderChanged.hasListener(A.H.get<object>(callback));
   693          A.store.Bool(retPtr, _ret);
   694          return A.H.TRUE;
   695        } catch (err: any) {
   696          A.store.Ref(errPtr, err);
   697          return A.H.FALSE;
   698        }
   699      },
   700      "has_OnKeyboardClosed": (): heap.Ref<boolean> => {
   701        if (
   702          WEBEXT?.virtualKeyboardPrivate?.onKeyboardClosed &&
   703          "addListener" in WEBEXT?.virtualKeyboardPrivate?.onKeyboardClosed
   704        ) {
   705          return A.H.TRUE;
   706        }
   707        return A.H.FALSE;
   708      },
   709      "func_OnKeyboardClosed": (fn: Pointer): void => {
   710        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.onKeyboardClosed.addListener);
   711      },
   712      "call_OnKeyboardClosed": (retPtr: Pointer, callback: heap.Ref<object>): void => {
   713        const _ret = WEBEXT.virtualKeyboardPrivate.onKeyboardClosed.addListener(A.H.get<object>(callback));
   714      },
   715      "try_OnKeyboardClosed": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
   716        try {
   717          const _ret = WEBEXT.virtualKeyboardPrivate.onKeyboardClosed.addListener(A.H.get<object>(callback));
   718          return A.H.TRUE;
   719        } catch (err: any) {
   720          A.store.Ref(errPtr, err);
   721          return A.H.FALSE;
   722        }
   723      },
   724      "has_OffKeyboardClosed": (): heap.Ref<boolean> => {
   725        if (
   726          WEBEXT?.virtualKeyboardPrivate?.onKeyboardClosed &&
   727          "removeListener" in WEBEXT?.virtualKeyboardPrivate?.onKeyboardClosed
   728        ) {
   729          return A.H.TRUE;
   730        }
   731        return A.H.FALSE;
   732      },
   733      "func_OffKeyboardClosed": (fn: Pointer): void => {
   734        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.onKeyboardClosed.removeListener);
   735      },
   736      "call_OffKeyboardClosed": (retPtr: Pointer, callback: heap.Ref<object>): void => {
   737        const _ret = WEBEXT.virtualKeyboardPrivate.onKeyboardClosed.removeListener(A.H.get<object>(callback));
   738      },
   739      "try_OffKeyboardClosed": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
   740        try {
   741          const _ret = WEBEXT.virtualKeyboardPrivate.onKeyboardClosed.removeListener(A.H.get<object>(callback));
   742          return A.H.TRUE;
   743        } catch (err: any) {
   744          A.store.Ref(errPtr, err);
   745          return A.H.FALSE;
   746        }
   747      },
   748      "has_HasOnKeyboardClosed": (): heap.Ref<boolean> => {
   749        if (
   750          WEBEXT?.virtualKeyboardPrivate?.onKeyboardClosed &&
   751          "hasListener" in WEBEXT?.virtualKeyboardPrivate?.onKeyboardClosed
   752        ) {
   753          return A.H.TRUE;
   754        }
   755        return A.H.FALSE;
   756      },
   757      "func_HasOnKeyboardClosed": (fn: Pointer): void => {
   758        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.onKeyboardClosed.hasListener);
   759      },
   760      "call_HasOnKeyboardClosed": (retPtr: Pointer, callback: heap.Ref<object>): void => {
   761        const _ret = WEBEXT.virtualKeyboardPrivate.onKeyboardClosed.hasListener(A.H.get<object>(callback));
   762        A.store.Bool(retPtr, _ret);
   763      },
   764      "try_HasOnKeyboardClosed": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
   765        try {
   766          const _ret = WEBEXT.virtualKeyboardPrivate.onKeyboardClosed.hasListener(A.H.get<object>(callback));
   767          A.store.Bool(retPtr, _ret);
   768          return A.H.TRUE;
   769        } catch (err: any) {
   770          A.store.Ref(errPtr, err);
   771          return A.H.FALSE;
   772        }
   773      },
   774      "has_OnKeyboardConfigChanged": (): heap.Ref<boolean> => {
   775        if (
   776          WEBEXT?.virtualKeyboardPrivate?.onKeyboardConfigChanged &&
   777          "addListener" in WEBEXT?.virtualKeyboardPrivate?.onKeyboardConfigChanged
   778        ) {
   779          return A.H.TRUE;
   780        }
   781        return A.H.FALSE;
   782      },
   783      "func_OnKeyboardConfigChanged": (fn: Pointer): void => {
   784        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.onKeyboardConfigChanged.addListener);
   785      },
   786      "call_OnKeyboardConfigChanged": (retPtr: Pointer, callback: heap.Ref<object>): void => {
   787        const _ret = WEBEXT.virtualKeyboardPrivate.onKeyboardConfigChanged.addListener(A.H.get<object>(callback));
   788      },
   789      "try_OnKeyboardConfigChanged": (
   790        retPtr: Pointer,
   791        errPtr: Pointer,
   792        callback: heap.Ref<object>
   793      ): heap.Ref<boolean> => {
   794        try {
   795          const _ret = WEBEXT.virtualKeyboardPrivate.onKeyboardConfigChanged.addListener(A.H.get<object>(callback));
   796          return A.H.TRUE;
   797        } catch (err: any) {
   798          A.store.Ref(errPtr, err);
   799          return A.H.FALSE;
   800        }
   801      },
   802      "has_OffKeyboardConfigChanged": (): heap.Ref<boolean> => {
   803        if (
   804          WEBEXT?.virtualKeyboardPrivate?.onKeyboardConfigChanged &&
   805          "removeListener" in WEBEXT?.virtualKeyboardPrivate?.onKeyboardConfigChanged
   806        ) {
   807          return A.H.TRUE;
   808        }
   809        return A.H.FALSE;
   810      },
   811      "func_OffKeyboardConfigChanged": (fn: Pointer): void => {
   812        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.onKeyboardConfigChanged.removeListener);
   813      },
   814      "call_OffKeyboardConfigChanged": (retPtr: Pointer, callback: heap.Ref<object>): void => {
   815        const _ret = WEBEXT.virtualKeyboardPrivate.onKeyboardConfigChanged.removeListener(A.H.get<object>(callback));
   816      },
   817      "try_OffKeyboardConfigChanged": (
   818        retPtr: Pointer,
   819        errPtr: Pointer,
   820        callback: heap.Ref<object>
   821      ): heap.Ref<boolean> => {
   822        try {
   823          const _ret = WEBEXT.virtualKeyboardPrivate.onKeyboardConfigChanged.removeListener(A.H.get<object>(callback));
   824          return A.H.TRUE;
   825        } catch (err: any) {
   826          A.store.Ref(errPtr, err);
   827          return A.H.FALSE;
   828        }
   829      },
   830      "has_HasOnKeyboardConfigChanged": (): heap.Ref<boolean> => {
   831        if (
   832          WEBEXT?.virtualKeyboardPrivate?.onKeyboardConfigChanged &&
   833          "hasListener" in WEBEXT?.virtualKeyboardPrivate?.onKeyboardConfigChanged
   834        ) {
   835          return A.H.TRUE;
   836        }
   837        return A.H.FALSE;
   838      },
   839      "func_HasOnKeyboardConfigChanged": (fn: Pointer): void => {
   840        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.onKeyboardConfigChanged.hasListener);
   841      },
   842      "call_HasOnKeyboardConfigChanged": (retPtr: Pointer, callback: heap.Ref<object>): void => {
   843        const _ret = WEBEXT.virtualKeyboardPrivate.onKeyboardConfigChanged.hasListener(A.H.get<object>(callback));
   844        A.store.Bool(retPtr, _ret);
   845      },
   846      "try_HasOnKeyboardConfigChanged": (
   847        retPtr: Pointer,
   848        errPtr: Pointer,
   849        callback: heap.Ref<object>
   850      ): heap.Ref<boolean> => {
   851        try {
   852          const _ret = WEBEXT.virtualKeyboardPrivate.onKeyboardConfigChanged.hasListener(A.H.get<object>(callback));
   853          A.store.Bool(retPtr, _ret);
   854          return A.H.TRUE;
   855        } catch (err: any) {
   856          A.store.Ref(errPtr, err);
   857          return A.H.FALSE;
   858        }
   859      },
   860      "has_OpenSettings": (): heap.Ref<boolean> => {
   861        if (WEBEXT?.virtualKeyboardPrivate && "openSettings" in WEBEXT?.virtualKeyboardPrivate) {
   862          return A.H.TRUE;
   863        }
   864        return A.H.FALSE;
   865      },
   866      "func_OpenSettings": (fn: Pointer): void => {
   867        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.openSettings);
   868      },
   869      "call_OpenSettings": (retPtr: Pointer): void => {
   870        const _ret = WEBEXT.virtualKeyboardPrivate.openSettings();
   871      },
   872      "try_OpenSettings": (retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => {
   873        try {
   874          const _ret = WEBEXT.virtualKeyboardPrivate.openSettings();
   875          return A.H.TRUE;
   876        } catch (err: any) {
   877          A.store.Ref(errPtr, err);
   878          return A.H.FALSE;
   879        }
   880      },
   881      "has_OpenSuggestionSettings": (): heap.Ref<boolean> => {
   882        if (WEBEXT?.virtualKeyboardPrivate && "openSuggestionSettings" in WEBEXT?.virtualKeyboardPrivate) {
   883          return A.H.TRUE;
   884        }
   885        return A.H.FALSE;
   886      },
   887      "func_OpenSuggestionSettings": (fn: Pointer): void => {
   888        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.openSuggestionSettings);
   889      },
   890      "call_OpenSuggestionSettings": (retPtr: Pointer): void => {
   891        const _ret = WEBEXT.virtualKeyboardPrivate.openSuggestionSettings();
   892      },
   893      "try_OpenSuggestionSettings": (retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => {
   894        try {
   895          const _ret = WEBEXT.virtualKeyboardPrivate.openSuggestionSettings();
   896          return A.H.TRUE;
   897        } catch (err: any) {
   898          A.store.Ref(errPtr, err);
   899          return A.H.FALSE;
   900        }
   901      },
   902      "has_PasteClipboardItem": (): heap.Ref<boolean> => {
   903        if (WEBEXT?.virtualKeyboardPrivate && "pasteClipboardItem" in WEBEXT?.virtualKeyboardPrivate) {
   904          return A.H.TRUE;
   905        }
   906        return A.H.FALSE;
   907      },
   908      "func_PasteClipboardItem": (fn: Pointer): void => {
   909        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.pasteClipboardItem);
   910      },
   911      "call_PasteClipboardItem": (retPtr: Pointer, itemId: heap.Ref<object>): void => {
   912        const _ret = WEBEXT.virtualKeyboardPrivate.pasteClipboardItem(A.H.get<object>(itemId));
   913      },
   914      "try_PasteClipboardItem": (retPtr: Pointer, errPtr: Pointer, itemId: heap.Ref<object>): heap.Ref<boolean> => {
   915        try {
   916          const _ret = WEBEXT.virtualKeyboardPrivate.pasteClipboardItem(A.H.get<object>(itemId));
   917          return A.H.TRUE;
   918        } catch (err: any) {
   919          A.store.Ref(errPtr, err);
   920          return A.H.FALSE;
   921        }
   922      },
   923      "has_SendKeyEvent": (): heap.Ref<boolean> => {
   924        if (WEBEXT?.virtualKeyboardPrivate && "sendKeyEvent" in WEBEXT?.virtualKeyboardPrivate) {
   925          return A.H.TRUE;
   926        }
   927        return A.H.FALSE;
   928      },
   929      "func_SendKeyEvent": (fn: Pointer): void => {
   930        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.sendKeyEvent);
   931      },
   932      "call_SendKeyEvent": (retPtr: Pointer, keyEvent: Pointer): void => {
   933        const keyEvent_ffi = {};
   934  
   935        keyEvent_ffi["charValue"] = A.load.Int64(keyEvent + 0);
   936        keyEvent_ffi["keyCode"] = A.load.Int64(keyEvent + 8);
   937        keyEvent_ffi["keyName"] = A.load.Ref(keyEvent + 16, undefined);
   938        if (A.load.Bool(keyEvent + 36)) {
   939          keyEvent_ffi["modifiers"] = A.load.Int64(keyEvent + 24);
   940        }
   941        keyEvent_ffi["type"] = A.load.Enum(keyEvent + 32, ["keyup", "keydown"]);
   942  
   943        const _ret = WEBEXT.virtualKeyboardPrivate.sendKeyEvent(keyEvent_ffi);
   944        A.store.Ref(retPtr, _ret);
   945      },
   946      "try_SendKeyEvent": (retPtr: Pointer, errPtr: Pointer, keyEvent: Pointer): heap.Ref<boolean> => {
   947        try {
   948          const keyEvent_ffi = {};
   949  
   950          keyEvent_ffi["charValue"] = A.load.Int64(keyEvent + 0);
   951          keyEvent_ffi["keyCode"] = A.load.Int64(keyEvent + 8);
   952          keyEvent_ffi["keyName"] = A.load.Ref(keyEvent + 16, undefined);
   953          if (A.load.Bool(keyEvent + 36)) {
   954            keyEvent_ffi["modifiers"] = A.load.Int64(keyEvent + 24);
   955          }
   956          keyEvent_ffi["type"] = A.load.Enum(keyEvent + 32, ["keyup", "keydown"]);
   957  
   958          const _ret = WEBEXT.virtualKeyboardPrivate.sendKeyEvent(keyEvent_ffi);
   959          A.store.Ref(retPtr, _ret);
   960          return A.H.TRUE;
   961        } catch (err: any) {
   962          A.store.Ref(errPtr, err);
   963          return A.H.FALSE;
   964        }
   965      },
   966      "has_SetAreaToRemainOnScreen": (): heap.Ref<boolean> => {
   967        if (WEBEXT?.virtualKeyboardPrivate && "setAreaToRemainOnScreen" in WEBEXT?.virtualKeyboardPrivate) {
   968          return A.H.TRUE;
   969        }
   970        return A.H.FALSE;
   971      },
   972      "func_SetAreaToRemainOnScreen": (fn: Pointer): void => {
   973        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.setAreaToRemainOnScreen);
   974      },
   975      "call_SetAreaToRemainOnScreen": (retPtr: Pointer, bounds: Pointer): void => {
   976        const bounds_ffi = {};
   977  
   978        bounds_ffi["height"] = A.load.Int64(bounds + 0);
   979        bounds_ffi["left"] = A.load.Int64(bounds + 8);
   980        bounds_ffi["top"] = A.load.Int64(bounds + 16);
   981        bounds_ffi["width"] = A.load.Int64(bounds + 24);
   982  
   983        const _ret = WEBEXT.virtualKeyboardPrivate.setAreaToRemainOnScreen(bounds_ffi);
   984      },
   985      "try_SetAreaToRemainOnScreen": (retPtr: Pointer, errPtr: Pointer, bounds: Pointer): heap.Ref<boolean> => {
   986        try {
   987          const bounds_ffi = {};
   988  
   989          bounds_ffi["height"] = A.load.Int64(bounds + 0);
   990          bounds_ffi["left"] = A.load.Int64(bounds + 8);
   991          bounds_ffi["top"] = A.load.Int64(bounds + 16);
   992          bounds_ffi["width"] = A.load.Int64(bounds + 24);
   993  
   994          const _ret = WEBEXT.virtualKeyboardPrivate.setAreaToRemainOnScreen(bounds_ffi);
   995          return A.H.TRUE;
   996        } catch (err: any) {
   997          A.store.Ref(errPtr, err);
   998          return A.H.FALSE;
   999        }
  1000      },
  1001      "has_SetContainerBehavior": (): heap.Ref<boolean> => {
  1002        if (WEBEXT?.virtualKeyboardPrivate && "setContainerBehavior" in WEBEXT?.virtualKeyboardPrivate) {
  1003          return A.H.TRUE;
  1004        }
  1005        return A.H.FALSE;
  1006      },
  1007      "func_SetContainerBehavior": (fn: Pointer): void => {
  1008        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.setContainerBehavior);
  1009      },
  1010      "call_SetContainerBehavior": (retPtr: Pointer, options: Pointer): void => {
  1011        const options_ffi = {};
  1012  
  1013        if (A.load.Bool(options + 0 + 32)) {
  1014          options_ffi["bounds"] = {};
  1015          options_ffi["bounds"]["height"] = A.load.Int64(options + 0 + 0);
  1016          options_ffi["bounds"]["left"] = A.load.Int64(options + 0 + 8);
  1017          options_ffi["bounds"]["top"] = A.load.Int64(options + 0 + 16);
  1018          options_ffi["bounds"]["width"] = A.load.Int64(options + 0 + 24);
  1019        }
  1020        options_ffi["mode"] = A.load.Enum(options + 36, ["FULL_WIDTH", "FLOATING"]);
  1021  
  1022        const _ret = WEBEXT.virtualKeyboardPrivate.setContainerBehavior(options_ffi);
  1023        A.store.Ref(retPtr, _ret);
  1024      },
  1025      "try_SetContainerBehavior": (retPtr: Pointer, errPtr: Pointer, options: Pointer): heap.Ref<boolean> => {
  1026        try {
  1027          const options_ffi = {};
  1028  
  1029          if (A.load.Bool(options + 0 + 32)) {
  1030            options_ffi["bounds"] = {};
  1031            options_ffi["bounds"]["height"] = A.load.Int64(options + 0 + 0);
  1032            options_ffi["bounds"]["left"] = A.load.Int64(options + 0 + 8);
  1033            options_ffi["bounds"]["top"] = A.load.Int64(options + 0 + 16);
  1034            options_ffi["bounds"]["width"] = A.load.Int64(options + 0 + 24);
  1035          }
  1036          options_ffi["mode"] = A.load.Enum(options + 36, ["FULL_WIDTH", "FLOATING"]);
  1037  
  1038          const _ret = WEBEXT.virtualKeyboardPrivate.setContainerBehavior(options_ffi);
  1039          A.store.Ref(retPtr, _ret);
  1040          return A.H.TRUE;
  1041        } catch (err: any) {
  1042          A.store.Ref(errPtr, err);
  1043          return A.H.FALSE;
  1044        }
  1045      },
  1046      "has_SetDraggableArea": (): heap.Ref<boolean> => {
  1047        if (WEBEXT?.virtualKeyboardPrivate && "setDraggableArea" in WEBEXT?.virtualKeyboardPrivate) {
  1048          return A.H.TRUE;
  1049        }
  1050        return A.H.FALSE;
  1051      },
  1052      "func_SetDraggableArea": (fn: Pointer): void => {
  1053        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.setDraggableArea);
  1054      },
  1055      "call_SetDraggableArea": (retPtr: Pointer, bounds: Pointer): void => {
  1056        const bounds_ffi = {};
  1057  
  1058        bounds_ffi["height"] = A.load.Int64(bounds + 0);
  1059        bounds_ffi["left"] = A.load.Int64(bounds + 8);
  1060        bounds_ffi["top"] = A.load.Int64(bounds + 16);
  1061        bounds_ffi["width"] = A.load.Int64(bounds + 24);
  1062  
  1063        const _ret = WEBEXT.virtualKeyboardPrivate.setDraggableArea(bounds_ffi);
  1064      },
  1065      "try_SetDraggableArea": (retPtr: Pointer, errPtr: Pointer, bounds: Pointer): heap.Ref<boolean> => {
  1066        try {
  1067          const bounds_ffi = {};
  1068  
  1069          bounds_ffi["height"] = A.load.Int64(bounds + 0);
  1070          bounds_ffi["left"] = A.load.Int64(bounds + 8);
  1071          bounds_ffi["top"] = A.load.Int64(bounds + 16);
  1072          bounds_ffi["width"] = A.load.Int64(bounds + 24);
  1073  
  1074          const _ret = WEBEXT.virtualKeyboardPrivate.setDraggableArea(bounds_ffi);
  1075          return A.H.TRUE;
  1076        } catch (err: any) {
  1077          A.store.Ref(errPtr, err);
  1078          return A.H.FALSE;
  1079        }
  1080      },
  1081      "has_SetHitTestBounds": (): heap.Ref<boolean> => {
  1082        if (WEBEXT?.virtualKeyboardPrivate && "setHitTestBounds" in WEBEXT?.virtualKeyboardPrivate) {
  1083          return A.H.TRUE;
  1084        }
  1085        return A.H.FALSE;
  1086      },
  1087      "func_SetHitTestBounds": (fn: Pointer): void => {
  1088        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.setHitTestBounds);
  1089      },
  1090      "call_SetHitTestBounds": (retPtr: Pointer, boundsList: heap.Ref<object>): void => {
  1091        const _ret = WEBEXT.virtualKeyboardPrivate.setHitTestBounds(A.H.get<object>(boundsList));
  1092      },
  1093      "try_SetHitTestBounds": (retPtr: Pointer, errPtr: Pointer, boundsList: heap.Ref<object>): heap.Ref<boolean> => {
  1094        try {
  1095          const _ret = WEBEXT.virtualKeyboardPrivate.setHitTestBounds(A.H.get<object>(boundsList));
  1096          return A.H.TRUE;
  1097        } catch (err: any) {
  1098          A.store.Ref(errPtr, err);
  1099          return A.H.FALSE;
  1100        }
  1101      },
  1102      "has_SetHotrodKeyboard": (): heap.Ref<boolean> => {
  1103        if (WEBEXT?.virtualKeyboardPrivate && "setHotrodKeyboard" in WEBEXT?.virtualKeyboardPrivate) {
  1104          return A.H.TRUE;
  1105        }
  1106        return A.H.FALSE;
  1107      },
  1108      "func_SetHotrodKeyboard": (fn: Pointer): void => {
  1109        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.setHotrodKeyboard);
  1110      },
  1111      "call_SetHotrodKeyboard": (retPtr: Pointer, enable: heap.Ref<boolean>): void => {
  1112        const _ret = WEBEXT.virtualKeyboardPrivate.setHotrodKeyboard(enable === A.H.TRUE);
  1113      },
  1114      "try_SetHotrodKeyboard": (retPtr: Pointer, errPtr: Pointer, enable: heap.Ref<boolean>): heap.Ref<boolean> => {
  1115        try {
  1116          const _ret = WEBEXT.virtualKeyboardPrivate.setHotrodKeyboard(enable === A.H.TRUE);
  1117          return A.H.TRUE;
  1118        } catch (err: any) {
  1119          A.store.Ref(errPtr, err);
  1120          return A.H.FALSE;
  1121        }
  1122      },
  1123      "has_SetKeyboardState": (): heap.Ref<boolean> => {
  1124        if (WEBEXT?.virtualKeyboardPrivate && "setKeyboardState" in WEBEXT?.virtualKeyboardPrivate) {
  1125          return A.H.TRUE;
  1126        }
  1127        return A.H.FALSE;
  1128      },
  1129      "func_SetKeyboardState": (fn: Pointer): void => {
  1130        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.setKeyboardState);
  1131      },
  1132      "call_SetKeyboardState": (retPtr: Pointer, state: number): void => {
  1133        const _ret = WEBEXT.virtualKeyboardPrivate.setKeyboardState(
  1134          state > 0 && state <= 3 ? ["ENABLED", "DISABLED", "AUTO"][state - 1] : undefined
  1135        );
  1136      },
  1137      "try_SetKeyboardState": (retPtr: Pointer, errPtr: Pointer, state: number): heap.Ref<boolean> => {
  1138        try {
  1139          const _ret = WEBEXT.virtualKeyboardPrivate.setKeyboardState(
  1140            state > 0 && state <= 3 ? ["ENABLED", "DISABLED", "AUTO"][state - 1] : undefined
  1141          );
  1142          return A.H.TRUE;
  1143        } catch (err: any) {
  1144          A.store.Ref(errPtr, err);
  1145          return A.H.FALSE;
  1146        }
  1147      },
  1148      "has_SetOccludedBounds": (): heap.Ref<boolean> => {
  1149        if (WEBEXT?.virtualKeyboardPrivate && "setOccludedBounds" in WEBEXT?.virtualKeyboardPrivate) {
  1150          return A.H.TRUE;
  1151        }
  1152        return A.H.FALSE;
  1153      },
  1154      "func_SetOccludedBounds": (fn: Pointer): void => {
  1155        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.setOccludedBounds);
  1156      },
  1157      "call_SetOccludedBounds": (retPtr: Pointer, boundsList: heap.Ref<object>): void => {
  1158        const _ret = WEBEXT.virtualKeyboardPrivate.setOccludedBounds(A.H.get<object>(boundsList));
  1159      },
  1160      "try_SetOccludedBounds": (retPtr: Pointer, errPtr: Pointer, boundsList: heap.Ref<object>): heap.Ref<boolean> => {
  1161        try {
  1162          const _ret = WEBEXT.virtualKeyboardPrivate.setOccludedBounds(A.H.get<object>(boundsList));
  1163          return A.H.TRUE;
  1164        } catch (err: any) {
  1165          A.store.Ref(errPtr, err);
  1166          return A.H.FALSE;
  1167        }
  1168      },
  1169      "has_SetWindowBoundsInScreen": (): heap.Ref<boolean> => {
  1170        if (WEBEXT?.virtualKeyboardPrivate && "setWindowBoundsInScreen" in WEBEXT?.virtualKeyboardPrivate) {
  1171          return A.H.TRUE;
  1172        }
  1173        return A.H.FALSE;
  1174      },
  1175      "func_SetWindowBoundsInScreen": (fn: Pointer): void => {
  1176        A.store.Ref(fn, WEBEXT.virtualKeyboardPrivate.setWindowBoundsInScreen);
  1177      },
  1178      "call_SetWindowBoundsInScreen": (retPtr: Pointer, bounds: Pointer): void => {
  1179        const bounds_ffi = {};
  1180  
  1181        bounds_ffi["height"] = A.load.Int64(bounds + 0);
  1182        bounds_ffi["left"] = A.load.Int64(bounds + 8);
  1183        bounds_ffi["top"] = A.load.Int64(bounds + 16);
  1184        bounds_ffi["width"] = A.load.Int64(bounds + 24);
  1185  
  1186        const _ret = WEBEXT.virtualKeyboardPrivate.setWindowBoundsInScreen(bounds_ffi);
  1187      },
  1188      "try_SetWindowBoundsInScreen": (retPtr: Pointer, errPtr: Pointer, bounds: Pointer): heap.Ref<boolean> => {
  1189        try {
  1190          const bounds_ffi = {};
  1191  
  1192          bounds_ffi["height"] = A.load.Int64(bounds + 0);
  1193          bounds_ffi["left"] = A.load.Int64(bounds + 8);
  1194          bounds_ffi["top"] = A.load.Int64(bounds + 16);
  1195          bounds_ffi["width"] = A.load.Int64(bounds + 24);
  1196  
  1197          const _ret = WEBEXT.virtualKeyboardPrivate.setWindowBoundsInScreen(bounds_ffi);
  1198          return A.H.TRUE;
  1199        } catch (err: any) {
  1200          A.store.Ref(errPtr, err);
  1201          return A.H.FALSE;
  1202        }
  1203      },
  1204    };
  1205  });