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

     1  import { importModule, Application, heap, Pointer } from "@ffi";
     2  
     3  importModule("plat/js/webext/system/display", (A: Application) => {
     4    const WEBEXT = typeof globalThis.browser === "undefined" ? globalThis.chrome : globalThis.browser;
     5  
     6    return {
     7      "constof_ActiveState": (ref: heap.Ref<string>): number => {
     8        const idx = ["active", "inactive"].indexOf(A.H.get(ref));
     9        return idx < 0 ? 0 : idx + 1;
    10      },
    11  
    12      "store_Bounds": (ptr: Pointer, ref: heap.Ref<any>) => {
    13        const x = A.H.get<any>(ref);
    14  
    15        if (typeof x === "undefined") {
    16          A.store.Bool(ptr + 20, false);
    17          A.store.Bool(ptr + 16, false);
    18          A.store.Int32(ptr + 0, 0);
    19          A.store.Bool(ptr + 17, false);
    20          A.store.Int32(ptr + 4, 0);
    21          A.store.Bool(ptr + 18, false);
    22          A.store.Int32(ptr + 8, 0);
    23          A.store.Bool(ptr + 19, false);
    24          A.store.Int32(ptr + 12, 0);
    25        } else {
    26          A.store.Bool(ptr + 20, true);
    27          A.store.Bool(ptr + 16, "left" in x ? true : false);
    28          A.store.Int32(ptr + 0, x["left"] === undefined ? 0 : (x["left"] as number));
    29          A.store.Bool(ptr + 17, "top" in x ? true : false);
    30          A.store.Int32(ptr + 4, x["top"] === undefined ? 0 : (x["top"] as number));
    31          A.store.Bool(ptr + 18, "width" in x ? true : false);
    32          A.store.Int32(ptr + 8, x["width"] === undefined ? 0 : (x["width"] as number));
    33          A.store.Bool(ptr + 19, "height" in x ? true : false);
    34          A.store.Int32(ptr + 12, x["height"] === undefined ? 0 : (x["height"] as number));
    35        }
    36      },
    37      "load_Bounds": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => {
    38        const x = create === A.H.TRUE ? {} : A.H.get<any>(ref);
    39  
    40        if (A.load.Bool(ptr + 16)) {
    41          x["left"] = A.load.Int32(ptr + 0);
    42        } else {
    43          delete x["left"];
    44        }
    45        if (A.load.Bool(ptr + 17)) {
    46          x["top"] = A.load.Int32(ptr + 4);
    47        } else {
    48          delete x["top"];
    49        }
    50        if (A.load.Bool(ptr + 18)) {
    51          x["width"] = A.load.Int32(ptr + 8);
    52        } else {
    53          delete x["width"];
    54        }
    55        if (A.load.Bool(ptr + 19)) {
    56          x["height"] = A.load.Int32(ptr + 12);
    57        } else {
    58          delete x["height"];
    59        }
    60        return create === A.H.TRUE ? A.H.push(x) : ref;
    61      },
    62  
    63      "store_Edid": (ptr: Pointer, ref: heap.Ref<any>) => {
    64        const x = A.H.get<any>(ref);
    65  
    66        if (typeof x === "undefined") {
    67          A.store.Bool(ptr + 13, false);
    68          A.store.Ref(ptr + 0, undefined);
    69          A.store.Ref(ptr + 4, undefined);
    70          A.store.Bool(ptr + 12, false);
    71          A.store.Int32(ptr + 8, 0);
    72        } else {
    73          A.store.Bool(ptr + 13, true);
    74          A.store.Ref(ptr + 0, x["manufacturerId"]);
    75          A.store.Ref(ptr + 4, x["productId"]);
    76          A.store.Bool(ptr + 12, "yearOfManufacture" in x ? true : false);
    77          A.store.Int32(ptr + 8, x["yearOfManufacture"] === undefined ? 0 : (x["yearOfManufacture"] as number));
    78        }
    79      },
    80      "load_Edid": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => {
    81        const x = create === A.H.TRUE ? {} : A.H.get<any>(ref);
    82  
    83        x["manufacturerId"] = A.load.Ref(ptr + 0, undefined);
    84        x["productId"] = A.load.Ref(ptr + 4, undefined);
    85        if (A.load.Bool(ptr + 12)) {
    86          x["yearOfManufacture"] = A.load.Int32(ptr + 8);
    87        } else {
    88          delete x["yearOfManufacture"];
    89        }
    90        return create === A.H.TRUE ? A.H.push(x) : ref;
    91      },
    92  
    93      "store_Insets": (ptr: Pointer, ref: heap.Ref<any>) => {
    94        const x = A.H.get<any>(ref);
    95  
    96        if (typeof x === "undefined") {
    97          A.store.Bool(ptr + 20, false);
    98          A.store.Bool(ptr + 16, false);
    99          A.store.Int32(ptr + 0, 0);
   100          A.store.Bool(ptr + 17, false);
   101          A.store.Int32(ptr + 4, 0);
   102          A.store.Bool(ptr + 18, false);
   103          A.store.Int32(ptr + 8, 0);
   104          A.store.Bool(ptr + 19, false);
   105          A.store.Int32(ptr + 12, 0);
   106        } else {
   107          A.store.Bool(ptr + 20, true);
   108          A.store.Bool(ptr + 16, "left" in x ? true : false);
   109          A.store.Int32(ptr + 0, x["left"] === undefined ? 0 : (x["left"] as number));
   110          A.store.Bool(ptr + 17, "top" in x ? true : false);
   111          A.store.Int32(ptr + 4, x["top"] === undefined ? 0 : (x["top"] as number));
   112          A.store.Bool(ptr + 18, "right" in x ? true : false);
   113          A.store.Int32(ptr + 8, x["right"] === undefined ? 0 : (x["right"] as number));
   114          A.store.Bool(ptr + 19, "bottom" in x ? true : false);
   115          A.store.Int32(ptr + 12, x["bottom"] === undefined ? 0 : (x["bottom"] as number));
   116        }
   117      },
   118      "load_Insets": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => {
   119        const x = create === A.H.TRUE ? {} : A.H.get<any>(ref);
   120  
   121        if (A.load.Bool(ptr + 16)) {
   122          x["left"] = A.load.Int32(ptr + 0);
   123        } else {
   124          delete x["left"];
   125        }
   126        if (A.load.Bool(ptr + 17)) {
   127          x["top"] = A.load.Int32(ptr + 4);
   128        } else {
   129          delete x["top"];
   130        }
   131        if (A.load.Bool(ptr + 18)) {
   132          x["right"] = A.load.Int32(ptr + 8);
   133        } else {
   134          delete x["right"];
   135        }
   136        if (A.load.Bool(ptr + 19)) {
   137          x["bottom"] = A.load.Int32(ptr + 12);
   138        } else {
   139          delete x["bottom"];
   140        }
   141        return create === A.H.TRUE ? A.H.push(x) : ref;
   142      },
   143  
   144      "store_DisplayMode": (ptr: Pointer, ref: heap.Ref<any>) => {
   145        const x = A.H.get<any>(ref);
   146  
   147        if (typeof x === "undefined") {
   148          A.store.Bool(ptr + 53, false);
   149          A.store.Bool(ptr + 43, false);
   150          A.store.Int32(ptr + 0, 0);
   151          A.store.Bool(ptr + 44, false);
   152          A.store.Int32(ptr + 4, 0);
   153          A.store.Bool(ptr + 45, false);
   154          A.store.Int32(ptr + 8, 0);
   155          A.store.Bool(ptr + 46, false);
   156          A.store.Int32(ptr + 12, 0);
   157          A.store.Bool(ptr + 47, false);
   158          A.store.Float64(ptr + 16, 0);
   159          A.store.Bool(ptr + 48, false);
   160          A.store.Float64(ptr + 24, 0);
   161          A.store.Bool(ptr + 49, false);
   162          A.store.Float64(ptr + 32, 0);
   163          A.store.Bool(ptr + 50, false);
   164          A.store.Bool(ptr + 40, false);
   165          A.store.Bool(ptr + 51, false);
   166          A.store.Bool(ptr + 41, false);
   167          A.store.Bool(ptr + 52, false);
   168          A.store.Bool(ptr + 42, false);
   169        } else {
   170          A.store.Bool(ptr + 53, true);
   171          A.store.Bool(ptr + 43, "width" in x ? true : false);
   172          A.store.Int32(ptr + 0, x["width"] === undefined ? 0 : (x["width"] as number));
   173          A.store.Bool(ptr + 44, "height" in x ? true : false);
   174          A.store.Int32(ptr + 4, x["height"] === undefined ? 0 : (x["height"] as number));
   175          A.store.Bool(ptr + 45, "widthInNativePixels" in x ? true : false);
   176          A.store.Int32(ptr + 8, x["widthInNativePixels"] === undefined ? 0 : (x["widthInNativePixels"] as number));
   177          A.store.Bool(ptr + 46, "heightInNativePixels" in x ? true : false);
   178          A.store.Int32(ptr + 12, x["heightInNativePixels"] === undefined ? 0 : (x["heightInNativePixels"] as number));
   179          A.store.Bool(ptr + 47, "uiScale" in x ? true : false);
   180          A.store.Float64(ptr + 16, x["uiScale"] === undefined ? 0 : (x["uiScale"] as number));
   181          A.store.Bool(ptr + 48, "deviceScaleFactor" in x ? true : false);
   182          A.store.Float64(ptr + 24, x["deviceScaleFactor"] === undefined ? 0 : (x["deviceScaleFactor"] as number));
   183          A.store.Bool(ptr + 49, "refreshRate" in x ? true : false);
   184          A.store.Float64(ptr + 32, x["refreshRate"] === undefined ? 0 : (x["refreshRate"] as number));
   185          A.store.Bool(ptr + 50, "isNative" in x ? true : false);
   186          A.store.Bool(ptr + 40, x["isNative"] ? true : false);
   187          A.store.Bool(ptr + 51, "isSelected" in x ? true : false);
   188          A.store.Bool(ptr + 41, x["isSelected"] ? true : false);
   189          A.store.Bool(ptr + 52, "isInterlaced" in x ? true : false);
   190          A.store.Bool(ptr + 42, x["isInterlaced"] ? true : false);
   191        }
   192      },
   193      "load_DisplayMode": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => {
   194        const x = create === A.H.TRUE ? {} : A.H.get<any>(ref);
   195  
   196        if (A.load.Bool(ptr + 43)) {
   197          x["width"] = A.load.Int32(ptr + 0);
   198        } else {
   199          delete x["width"];
   200        }
   201        if (A.load.Bool(ptr + 44)) {
   202          x["height"] = A.load.Int32(ptr + 4);
   203        } else {
   204          delete x["height"];
   205        }
   206        if (A.load.Bool(ptr + 45)) {
   207          x["widthInNativePixels"] = A.load.Int32(ptr + 8);
   208        } else {
   209          delete x["widthInNativePixels"];
   210        }
   211        if (A.load.Bool(ptr + 46)) {
   212          x["heightInNativePixels"] = A.load.Int32(ptr + 12);
   213        } else {
   214          delete x["heightInNativePixels"];
   215        }
   216        if (A.load.Bool(ptr + 47)) {
   217          x["uiScale"] = A.load.Float64(ptr + 16);
   218        } else {
   219          delete x["uiScale"];
   220        }
   221        if (A.load.Bool(ptr + 48)) {
   222          x["deviceScaleFactor"] = A.load.Float64(ptr + 24);
   223        } else {
   224          delete x["deviceScaleFactor"];
   225        }
   226        if (A.load.Bool(ptr + 49)) {
   227          x["refreshRate"] = A.load.Float64(ptr + 32);
   228        } else {
   229          delete x["refreshRate"];
   230        }
   231        if (A.load.Bool(ptr + 50)) {
   232          x["isNative"] = A.load.Bool(ptr + 40);
   233        } else {
   234          delete x["isNative"];
   235        }
   236        if (A.load.Bool(ptr + 51)) {
   237          x["isSelected"] = A.load.Bool(ptr + 41);
   238        } else {
   239          delete x["isSelected"];
   240        }
   241        if (A.load.Bool(ptr + 52)) {
   242          x["isInterlaced"] = A.load.Bool(ptr + 42);
   243        } else {
   244          delete x["isInterlaced"];
   245        }
   246        return create === A.H.TRUE ? A.H.push(x) : ref;
   247      },
   248  
   249      "store_DisplayUnitInfo": (ptr: Pointer, ref: heap.Ref<any>) => {
   250        const x = A.H.get<any>(ref);
   251  
   252        if (typeof x === "undefined") {
   253          A.store.Bool(ptr + 171, false);
   254          A.store.Ref(ptr + 0, undefined);
   255          A.store.Ref(ptr + 4, undefined);
   256  
   257          A.store.Bool(ptr + 8 + 13, false);
   258          A.store.Ref(ptr + 8 + 0, undefined);
   259          A.store.Ref(ptr + 8 + 4, undefined);
   260          A.store.Bool(ptr + 8 + 12, false);
   261          A.store.Int32(ptr + 8 + 8, 0);
   262          A.store.Ref(ptr + 24, undefined);
   263          A.store.Ref(ptr + 28, undefined);
   264          A.store.Bool(ptr + 160, false);
   265          A.store.Bool(ptr + 32, false);
   266          A.store.Bool(ptr + 161, false);
   267          A.store.Bool(ptr + 33, false);
   268          A.store.Bool(ptr + 162, false);
   269          A.store.Bool(ptr + 34, false);
   270          A.store.Enum(ptr + 36, -1);
   271          A.store.Bool(ptr + 163, false);
   272          A.store.Bool(ptr + 40, false);
   273          A.store.Bool(ptr + 164, false);
   274          A.store.Bool(ptr + 41, false);
   275          A.store.Bool(ptr + 165, false);
   276          A.store.Float64(ptr + 48, 0);
   277          A.store.Bool(ptr + 166, false);
   278          A.store.Float64(ptr + 56, 0);
   279          A.store.Bool(ptr + 167, false);
   280          A.store.Int32(ptr + 64, 0);
   281  
   282          A.store.Bool(ptr + 68 + 20, false);
   283          A.store.Bool(ptr + 68 + 16, false);
   284          A.store.Int32(ptr + 68 + 0, 0);
   285          A.store.Bool(ptr + 68 + 17, false);
   286          A.store.Int32(ptr + 68 + 4, 0);
   287          A.store.Bool(ptr + 68 + 18, false);
   288          A.store.Int32(ptr + 68 + 8, 0);
   289          A.store.Bool(ptr + 68 + 19, false);
   290          A.store.Int32(ptr + 68 + 12, 0);
   291  
   292          A.store.Bool(ptr + 92 + 20, false);
   293          A.store.Bool(ptr + 92 + 16, false);
   294          A.store.Int32(ptr + 92 + 0, 0);
   295          A.store.Bool(ptr + 92 + 17, false);
   296          A.store.Int32(ptr + 92 + 4, 0);
   297          A.store.Bool(ptr + 92 + 18, false);
   298          A.store.Int32(ptr + 92 + 8, 0);
   299          A.store.Bool(ptr + 92 + 19, false);
   300          A.store.Int32(ptr + 92 + 12, 0);
   301  
   302          A.store.Bool(ptr + 116 + 20, false);
   303          A.store.Bool(ptr + 116 + 16, false);
   304          A.store.Int32(ptr + 116 + 0, 0);
   305          A.store.Bool(ptr + 116 + 17, false);
   306          A.store.Int32(ptr + 116 + 4, 0);
   307          A.store.Bool(ptr + 116 + 18, false);
   308          A.store.Int32(ptr + 116 + 8, 0);
   309          A.store.Bool(ptr + 116 + 19, false);
   310          A.store.Int32(ptr + 116 + 12, 0);
   311          A.store.Ref(ptr + 140, undefined);
   312          A.store.Bool(ptr + 168, false);
   313          A.store.Bool(ptr + 144, false);
   314          A.store.Bool(ptr + 169, false);
   315          A.store.Bool(ptr + 145, false);
   316          A.store.Ref(ptr + 148, undefined);
   317          A.store.Bool(ptr + 170, false);
   318          A.store.Float64(ptr + 152, 0);
   319        } else {
   320          A.store.Bool(ptr + 171, true);
   321          A.store.Ref(ptr + 0, x["id"]);
   322          A.store.Ref(ptr + 4, x["name"]);
   323  
   324          if (typeof x["edid"] === "undefined") {
   325            A.store.Bool(ptr + 8 + 13, false);
   326            A.store.Ref(ptr + 8 + 0, undefined);
   327            A.store.Ref(ptr + 8 + 4, undefined);
   328            A.store.Bool(ptr + 8 + 12, false);
   329            A.store.Int32(ptr + 8 + 8, 0);
   330          } else {
   331            A.store.Bool(ptr + 8 + 13, true);
   332            A.store.Ref(ptr + 8 + 0, x["edid"]["manufacturerId"]);
   333            A.store.Ref(ptr + 8 + 4, x["edid"]["productId"]);
   334            A.store.Bool(ptr + 8 + 12, "yearOfManufacture" in x["edid"] ? true : false);
   335            A.store.Int32(
   336              ptr + 8 + 8,
   337              x["edid"]["yearOfManufacture"] === undefined ? 0 : (x["edid"]["yearOfManufacture"] as number)
   338            );
   339          }
   340          A.store.Ref(ptr + 24, x["mirroringSourceId"]);
   341          A.store.Ref(ptr + 28, x["mirroringDestinationIds"]);
   342          A.store.Bool(ptr + 160, "isPrimary" in x ? true : false);
   343          A.store.Bool(ptr + 32, x["isPrimary"] ? true : false);
   344          A.store.Bool(ptr + 161, "isInternal" in x ? true : false);
   345          A.store.Bool(ptr + 33, x["isInternal"] ? true : false);
   346          A.store.Bool(ptr + 162, "isEnabled" in x ? true : false);
   347          A.store.Bool(ptr + 34, x["isEnabled"] ? true : false);
   348          A.store.Enum(ptr + 36, ["active", "inactive"].indexOf(x["activeState"] as string));
   349          A.store.Bool(ptr + 163, "isUnified" in x ? true : false);
   350          A.store.Bool(ptr + 40, x["isUnified"] ? true : false);
   351          A.store.Bool(ptr + 164, "isAutoRotationAllowed" in x ? true : false);
   352          A.store.Bool(ptr + 41, x["isAutoRotationAllowed"] ? true : false);
   353          A.store.Bool(ptr + 165, "dpiX" in x ? true : false);
   354          A.store.Float64(ptr + 48, x["dpiX"] === undefined ? 0 : (x["dpiX"] as number));
   355          A.store.Bool(ptr + 166, "dpiY" in x ? true : false);
   356          A.store.Float64(ptr + 56, x["dpiY"] === undefined ? 0 : (x["dpiY"] as number));
   357          A.store.Bool(ptr + 167, "rotation" in x ? true : false);
   358          A.store.Int32(ptr + 64, x["rotation"] === undefined ? 0 : (x["rotation"] as number));
   359  
   360          if (typeof x["bounds"] === "undefined") {
   361            A.store.Bool(ptr + 68 + 20, false);
   362            A.store.Bool(ptr + 68 + 16, false);
   363            A.store.Int32(ptr + 68 + 0, 0);
   364            A.store.Bool(ptr + 68 + 17, false);
   365            A.store.Int32(ptr + 68 + 4, 0);
   366            A.store.Bool(ptr + 68 + 18, false);
   367            A.store.Int32(ptr + 68 + 8, 0);
   368            A.store.Bool(ptr + 68 + 19, false);
   369            A.store.Int32(ptr + 68 + 12, 0);
   370          } else {
   371            A.store.Bool(ptr + 68 + 20, true);
   372            A.store.Bool(ptr + 68 + 16, "left" in x["bounds"] ? true : false);
   373            A.store.Int32(ptr + 68 + 0, x["bounds"]["left"] === undefined ? 0 : (x["bounds"]["left"] as number));
   374            A.store.Bool(ptr + 68 + 17, "top" in x["bounds"] ? true : false);
   375            A.store.Int32(ptr + 68 + 4, x["bounds"]["top"] === undefined ? 0 : (x["bounds"]["top"] as number));
   376            A.store.Bool(ptr + 68 + 18, "width" in x["bounds"] ? true : false);
   377            A.store.Int32(ptr + 68 + 8, x["bounds"]["width"] === undefined ? 0 : (x["bounds"]["width"] as number));
   378            A.store.Bool(ptr + 68 + 19, "height" in x["bounds"] ? true : false);
   379            A.store.Int32(ptr + 68 + 12, x["bounds"]["height"] === undefined ? 0 : (x["bounds"]["height"] as number));
   380          }
   381  
   382          if (typeof x["overscan"] === "undefined") {
   383            A.store.Bool(ptr + 92 + 20, false);
   384            A.store.Bool(ptr + 92 + 16, false);
   385            A.store.Int32(ptr + 92 + 0, 0);
   386            A.store.Bool(ptr + 92 + 17, false);
   387            A.store.Int32(ptr + 92 + 4, 0);
   388            A.store.Bool(ptr + 92 + 18, false);
   389            A.store.Int32(ptr + 92 + 8, 0);
   390            A.store.Bool(ptr + 92 + 19, false);
   391            A.store.Int32(ptr + 92 + 12, 0);
   392          } else {
   393            A.store.Bool(ptr + 92 + 20, true);
   394            A.store.Bool(ptr + 92 + 16, "left" in x["overscan"] ? true : false);
   395            A.store.Int32(ptr + 92 + 0, x["overscan"]["left"] === undefined ? 0 : (x["overscan"]["left"] as number));
   396            A.store.Bool(ptr + 92 + 17, "top" in x["overscan"] ? true : false);
   397            A.store.Int32(ptr + 92 + 4, x["overscan"]["top"] === undefined ? 0 : (x["overscan"]["top"] as number));
   398            A.store.Bool(ptr + 92 + 18, "right" in x["overscan"] ? true : false);
   399            A.store.Int32(ptr + 92 + 8, x["overscan"]["right"] === undefined ? 0 : (x["overscan"]["right"] as number));
   400            A.store.Bool(ptr + 92 + 19, "bottom" in x["overscan"] ? true : false);
   401            A.store.Int32(ptr + 92 + 12, x["overscan"]["bottom"] === undefined ? 0 : (x["overscan"]["bottom"] as number));
   402          }
   403  
   404          if (typeof x["workArea"] === "undefined") {
   405            A.store.Bool(ptr + 116 + 20, false);
   406            A.store.Bool(ptr + 116 + 16, false);
   407            A.store.Int32(ptr + 116 + 0, 0);
   408            A.store.Bool(ptr + 116 + 17, false);
   409            A.store.Int32(ptr + 116 + 4, 0);
   410            A.store.Bool(ptr + 116 + 18, false);
   411            A.store.Int32(ptr + 116 + 8, 0);
   412            A.store.Bool(ptr + 116 + 19, false);
   413            A.store.Int32(ptr + 116 + 12, 0);
   414          } else {
   415            A.store.Bool(ptr + 116 + 20, true);
   416            A.store.Bool(ptr + 116 + 16, "left" in x["workArea"] ? true : false);
   417            A.store.Int32(ptr + 116 + 0, x["workArea"]["left"] === undefined ? 0 : (x["workArea"]["left"] as number));
   418            A.store.Bool(ptr + 116 + 17, "top" in x["workArea"] ? true : false);
   419            A.store.Int32(ptr + 116 + 4, x["workArea"]["top"] === undefined ? 0 : (x["workArea"]["top"] as number));
   420            A.store.Bool(ptr + 116 + 18, "width" in x["workArea"] ? true : false);
   421            A.store.Int32(ptr + 116 + 8, x["workArea"]["width"] === undefined ? 0 : (x["workArea"]["width"] as number));
   422            A.store.Bool(ptr + 116 + 19, "height" in x["workArea"] ? true : false);
   423            A.store.Int32(
   424              ptr + 116 + 12,
   425              x["workArea"]["height"] === undefined ? 0 : (x["workArea"]["height"] as number)
   426            );
   427          }
   428          A.store.Ref(ptr + 140, x["modes"]);
   429          A.store.Bool(ptr + 168, "hasTouchSupport" in x ? true : false);
   430          A.store.Bool(ptr + 144, x["hasTouchSupport"] ? true : false);
   431          A.store.Bool(ptr + 169, "hasAccelerometerSupport" in x ? true : false);
   432          A.store.Bool(ptr + 145, x["hasAccelerometerSupport"] ? true : false);
   433          A.store.Ref(ptr + 148, x["availableDisplayZoomFactors"]);
   434          A.store.Bool(ptr + 170, "displayZoomFactor" in x ? true : false);
   435          A.store.Float64(ptr + 152, x["displayZoomFactor"] === undefined ? 0 : (x["displayZoomFactor"] as number));
   436        }
   437      },
   438      "load_DisplayUnitInfo": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => {
   439        const x = create === A.H.TRUE ? {} : A.H.get<any>(ref);
   440  
   441        x["id"] = A.load.Ref(ptr + 0, undefined);
   442        x["name"] = A.load.Ref(ptr + 4, undefined);
   443        if (A.load.Bool(ptr + 8 + 13)) {
   444          x["edid"] = {};
   445          x["edid"]["manufacturerId"] = A.load.Ref(ptr + 8 + 0, undefined);
   446          x["edid"]["productId"] = A.load.Ref(ptr + 8 + 4, undefined);
   447          if (A.load.Bool(ptr + 8 + 12)) {
   448            x["edid"]["yearOfManufacture"] = A.load.Int32(ptr + 8 + 8);
   449          } else {
   450            delete x["edid"]["yearOfManufacture"];
   451          }
   452        } else {
   453          delete x["edid"];
   454        }
   455        x["mirroringSourceId"] = A.load.Ref(ptr + 24, undefined);
   456        x["mirroringDestinationIds"] = A.load.Ref(ptr + 28, undefined);
   457        if (A.load.Bool(ptr + 160)) {
   458          x["isPrimary"] = A.load.Bool(ptr + 32);
   459        } else {
   460          delete x["isPrimary"];
   461        }
   462        if (A.load.Bool(ptr + 161)) {
   463          x["isInternal"] = A.load.Bool(ptr + 33);
   464        } else {
   465          delete x["isInternal"];
   466        }
   467        if (A.load.Bool(ptr + 162)) {
   468          x["isEnabled"] = A.load.Bool(ptr + 34);
   469        } else {
   470          delete x["isEnabled"];
   471        }
   472        x["activeState"] = A.load.Enum(ptr + 36, ["active", "inactive"]);
   473        if (A.load.Bool(ptr + 163)) {
   474          x["isUnified"] = A.load.Bool(ptr + 40);
   475        } else {
   476          delete x["isUnified"];
   477        }
   478        if (A.load.Bool(ptr + 164)) {
   479          x["isAutoRotationAllowed"] = A.load.Bool(ptr + 41);
   480        } else {
   481          delete x["isAutoRotationAllowed"];
   482        }
   483        if (A.load.Bool(ptr + 165)) {
   484          x["dpiX"] = A.load.Float64(ptr + 48);
   485        } else {
   486          delete x["dpiX"];
   487        }
   488        if (A.load.Bool(ptr + 166)) {
   489          x["dpiY"] = A.load.Float64(ptr + 56);
   490        } else {
   491          delete x["dpiY"];
   492        }
   493        if (A.load.Bool(ptr + 167)) {
   494          x["rotation"] = A.load.Int32(ptr + 64);
   495        } else {
   496          delete x["rotation"];
   497        }
   498        if (A.load.Bool(ptr + 68 + 20)) {
   499          x["bounds"] = {};
   500          if (A.load.Bool(ptr + 68 + 16)) {
   501            x["bounds"]["left"] = A.load.Int32(ptr + 68 + 0);
   502          } else {
   503            delete x["bounds"]["left"];
   504          }
   505          if (A.load.Bool(ptr + 68 + 17)) {
   506            x["bounds"]["top"] = A.load.Int32(ptr + 68 + 4);
   507          } else {
   508            delete x["bounds"]["top"];
   509          }
   510          if (A.load.Bool(ptr + 68 + 18)) {
   511            x["bounds"]["width"] = A.load.Int32(ptr + 68 + 8);
   512          } else {
   513            delete x["bounds"]["width"];
   514          }
   515          if (A.load.Bool(ptr + 68 + 19)) {
   516            x["bounds"]["height"] = A.load.Int32(ptr + 68 + 12);
   517          } else {
   518            delete x["bounds"]["height"];
   519          }
   520        } else {
   521          delete x["bounds"];
   522        }
   523        if (A.load.Bool(ptr + 92 + 20)) {
   524          x["overscan"] = {};
   525          if (A.load.Bool(ptr + 92 + 16)) {
   526            x["overscan"]["left"] = A.load.Int32(ptr + 92 + 0);
   527          } else {
   528            delete x["overscan"]["left"];
   529          }
   530          if (A.load.Bool(ptr + 92 + 17)) {
   531            x["overscan"]["top"] = A.load.Int32(ptr + 92 + 4);
   532          } else {
   533            delete x["overscan"]["top"];
   534          }
   535          if (A.load.Bool(ptr + 92 + 18)) {
   536            x["overscan"]["right"] = A.load.Int32(ptr + 92 + 8);
   537          } else {
   538            delete x["overscan"]["right"];
   539          }
   540          if (A.load.Bool(ptr + 92 + 19)) {
   541            x["overscan"]["bottom"] = A.load.Int32(ptr + 92 + 12);
   542          } else {
   543            delete x["overscan"]["bottom"];
   544          }
   545        } else {
   546          delete x["overscan"];
   547        }
   548        if (A.load.Bool(ptr + 116 + 20)) {
   549          x["workArea"] = {};
   550          if (A.load.Bool(ptr + 116 + 16)) {
   551            x["workArea"]["left"] = A.load.Int32(ptr + 116 + 0);
   552          } else {
   553            delete x["workArea"]["left"];
   554          }
   555          if (A.load.Bool(ptr + 116 + 17)) {
   556            x["workArea"]["top"] = A.load.Int32(ptr + 116 + 4);
   557          } else {
   558            delete x["workArea"]["top"];
   559          }
   560          if (A.load.Bool(ptr + 116 + 18)) {
   561            x["workArea"]["width"] = A.load.Int32(ptr + 116 + 8);
   562          } else {
   563            delete x["workArea"]["width"];
   564          }
   565          if (A.load.Bool(ptr + 116 + 19)) {
   566            x["workArea"]["height"] = A.load.Int32(ptr + 116 + 12);
   567          } else {
   568            delete x["workArea"]["height"];
   569          }
   570        } else {
   571          delete x["workArea"];
   572        }
   573        x["modes"] = A.load.Ref(ptr + 140, undefined);
   574        if (A.load.Bool(ptr + 168)) {
   575          x["hasTouchSupport"] = A.load.Bool(ptr + 144);
   576        } else {
   577          delete x["hasTouchSupport"];
   578        }
   579        if (A.load.Bool(ptr + 169)) {
   580          x["hasAccelerometerSupport"] = A.load.Bool(ptr + 145);
   581        } else {
   582          delete x["hasAccelerometerSupport"];
   583        }
   584        x["availableDisplayZoomFactors"] = A.load.Ref(ptr + 148, undefined);
   585        if (A.load.Bool(ptr + 170)) {
   586          x["displayZoomFactor"] = A.load.Float64(ptr + 152);
   587        } else {
   588          delete x["displayZoomFactor"];
   589        }
   590        return create === A.H.TRUE ? A.H.push(x) : ref;
   591      },
   592      "constof_LayoutPosition": (ref: heap.Ref<string>): number => {
   593        const idx = ["top", "right", "bottom", "left"].indexOf(A.H.get(ref));
   594        return idx < 0 ? 0 : idx + 1;
   595      },
   596  
   597      "store_DisplayLayout": (ptr: Pointer, ref: heap.Ref<any>) => {
   598        const x = A.H.get<any>(ref);
   599  
   600        if (typeof x === "undefined") {
   601          A.store.Bool(ptr + 17, false);
   602          A.store.Ref(ptr + 0, undefined);
   603          A.store.Ref(ptr + 4, undefined);
   604          A.store.Enum(ptr + 8, -1);
   605          A.store.Bool(ptr + 16, false);
   606          A.store.Int32(ptr + 12, 0);
   607        } else {
   608          A.store.Bool(ptr + 17, true);
   609          A.store.Ref(ptr + 0, x["id"]);
   610          A.store.Ref(ptr + 4, x["parentId"]);
   611          A.store.Enum(ptr + 8, ["top", "right", "bottom", "left"].indexOf(x["position"] as string));
   612          A.store.Bool(ptr + 16, "offset" in x ? true : false);
   613          A.store.Int32(ptr + 12, x["offset"] === undefined ? 0 : (x["offset"] as number));
   614        }
   615      },
   616      "load_DisplayLayout": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => {
   617        const x = create === A.H.TRUE ? {} : A.H.get<any>(ref);
   618  
   619        x["id"] = A.load.Ref(ptr + 0, undefined);
   620        x["parentId"] = A.load.Ref(ptr + 4, undefined);
   621        x["position"] = A.load.Enum(ptr + 8, ["top", "right", "bottom", "left"]);
   622        if (A.load.Bool(ptr + 16)) {
   623          x["offset"] = A.load.Int32(ptr + 12);
   624        } else {
   625          delete x["offset"];
   626        }
   627        return create === A.H.TRUE ? A.H.push(x) : ref;
   628      },
   629  
   630      "store_DisplayProperties": (ptr: Pointer, ref: heap.Ref<any>) => {
   631        const x = A.H.get<any>(ref);
   632  
   633        if (typeof x === "undefined") {
   634          A.store.Bool(ptr + 118, false);
   635          A.store.Bool(ptr + 112, false);
   636          A.store.Bool(ptr + 0, false);
   637          A.store.Ref(ptr + 4, undefined);
   638          A.store.Bool(ptr + 113, false);
   639          A.store.Bool(ptr + 8, false);
   640  
   641          A.store.Bool(ptr + 12 + 20, false);
   642          A.store.Bool(ptr + 12 + 16, false);
   643          A.store.Int32(ptr + 12 + 0, 0);
   644          A.store.Bool(ptr + 12 + 17, false);
   645          A.store.Int32(ptr + 12 + 4, 0);
   646          A.store.Bool(ptr + 12 + 18, false);
   647          A.store.Int32(ptr + 12 + 8, 0);
   648          A.store.Bool(ptr + 12 + 19, false);
   649          A.store.Int32(ptr + 12 + 12, 0);
   650          A.store.Bool(ptr + 114, false);
   651          A.store.Int32(ptr + 36, 0);
   652          A.store.Bool(ptr + 115, false);
   653          A.store.Int32(ptr + 40, 0);
   654          A.store.Bool(ptr + 116, false);
   655          A.store.Int32(ptr + 44, 0);
   656  
   657          A.store.Bool(ptr + 48 + 53, false);
   658          A.store.Bool(ptr + 48 + 43, false);
   659          A.store.Int32(ptr + 48 + 0, 0);
   660          A.store.Bool(ptr + 48 + 44, false);
   661          A.store.Int32(ptr + 48 + 4, 0);
   662          A.store.Bool(ptr + 48 + 45, false);
   663          A.store.Int32(ptr + 48 + 8, 0);
   664          A.store.Bool(ptr + 48 + 46, false);
   665          A.store.Int32(ptr + 48 + 12, 0);
   666          A.store.Bool(ptr + 48 + 47, false);
   667          A.store.Float64(ptr + 48 + 16, 0);
   668          A.store.Bool(ptr + 48 + 48, false);
   669          A.store.Float64(ptr + 48 + 24, 0);
   670          A.store.Bool(ptr + 48 + 49, false);
   671          A.store.Float64(ptr + 48 + 32, 0);
   672          A.store.Bool(ptr + 48 + 50, false);
   673          A.store.Bool(ptr + 48 + 40, false);
   674          A.store.Bool(ptr + 48 + 51, false);
   675          A.store.Bool(ptr + 48 + 41, false);
   676          A.store.Bool(ptr + 48 + 52, false);
   677          A.store.Bool(ptr + 48 + 42, false);
   678          A.store.Bool(ptr + 117, false);
   679          A.store.Float64(ptr + 104, 0);
   680        } else {
   681          A.store.Bool(ptr + 118, true);
   682          A.store.Bool(ptr + 112, "isUnified" in x ? true : false);
   683          A.store.Bool(ptr + 0, x["isUnified"] ? true : false);
   684          A.store.Ref(ptr + 4, x["mirroringSourceId"]);
   685          A.store.Bool(ptr + 113, "isPrimary" in x ? true : false);
   686          A.store.Bool(ptr + 8, x["isPrimary"] ? true : false);
   687  
   688          if (typeof x["overscan"] === "undefined") {
   689            A.store.Bool(ptr + 12 + 20, false);
   690            A.store.Bool(ptr + 12 + 16, false);
   691            A.store.Int32(ptr + 12 + 0, 0);
   692            A.store.Bool(ptr + 12 + 17, false);
   693            A.store.Int32(ptr + 12 + 4, 0);
   694            A.store.Bool(ptr + 12 + 18, false);
   695            A.store.Int32(ptr + 12 + 8, 0);
   696            A.store.Bool(ptr + 12 + 19, false);
   697            A.store.Int32(ptr + 12 + 12, 0);
   698          } else {
   699            A.store.Bool(ptr + 12 + 20, true);
   700            A.store.Bool(ptr + 12 + 16, "left" in x["overscan"] ? true : false);
   701            A.store.Int32(ptr + 12 + 0, x["overscan"]["left"] === undefined ? 0 : (x["overscan"]["left"] as number));
   702            A.store.Bool(ptr + 12 + 17, "top" in x["overscan"] ? true : false);
   703            A.store.Int32(ptr + 12 + 4, x["overscan"]["top"] === undefined ? 0 : (x["overscan"]["top"] as number));
   704            A.store.Bool(ptr + 12 + 18, "right" in x["overscan"] ? true : false);
   705            A.store.Int32(ptr + 12 + 8, x["overscan"]["right"] === undefined ? 0 : (x["overscan"]["right"] as number));
   706            A.store.Bool(ptr + 12 + 19, "bottom" in x["overscan"] ? true : false);
   707            A.store.Int32(ptr + 12 + 12, x["overscan"]["bottom"] === undefined ? 0 : (x["overscan"]["bottom"] as number));
   708          }
   709          A.store.Bool(ptr + 114, "rotation" in x ? true : false);
   710          A.store.Int32(ptr + 36, x["rotation"] === undefined ? 0 : (x["rotation"] as number));
   711          A.store.Bool(ptr + 115, "boundsOriginX" in x ? true : false);
   712          A.store.Int32(ptr + 40, x["boundsOriginX"] === undefined ? 0 : (x["boundsOriginX"] as number));
   713          A.store.Bool(ptr + 116, "boundsOriginY" in x ? true : false);
   714          A.store.Int32(ptr + 44, x["boundsOriginY"] === undefined ? 0 : (x["boundsOriginY"] as number));
   715  
   716          if (typeof x["displayMode"] === "undefined") {
   717            A.store.Bool(ptr + 48 + 53, false);
   718            A.store.Bool(ptr + 48 + 43, false);
   719            A.store.Int32(ptr + 48 + 0, 0);
   720            A.store.Bool(ptr + 48 + 44, false);
   721            A.store.Int32(ptr + 48 + 4, 0);
   722            A.store.Bool(ptr + 48 + 45, false);
   723            A.store.Int32(ptr + 48 + 8, 0);
   724            A.store.Bool(ptr + 48 + 46, false);
   725            A.store.Int32(ptr + 48 + 12, 0);
   726            A.store.Bool(ptr + 48 + 47, false);
   727            A.store.Float64(ptr + 48 + 16, 0);
   728            A.store.Bool(ptr + 48 + 48, false);
   729            A.store.Float64(ptr + 48 + 24, 0);
   730            A.store.Bool(ptr + 48 + 49, false);
   731            A.store.Float64(ptr + 48 + 32, 0);
   732            A.store.Bool(ptr + 48 + 50, false);
   733            A.store.Bool(ptr + 48 + 40, false);
   734            A.store.Bool(ptr + 48 + 51, false);
   735            A.store.Bool(ptr + 48 + 41, false);
   736            A.store.Bool(ptr + 48 + 52, false);
   737            A.store.Bool(ptr + 48 + 42, false);
   738          } else {
   739            A.store.Bool(ptr + 48 + 53, true);
   740            A.store.Bool(ptr + 48 + 43, "width" in x["displayMode"] ? true : false);
   741            A.store.Int32(
   742              ptr + 48 + 0,
   743              x["displayMode"]["width"] === undefined ? 0 : (x["displayMode"]["width"] as number)
   744            );
   745            A.store.Bool(ptr + 48 + 44, "height" in x["displayMode"] ? true : false);
   746            A.store.Int32(
   747              ptr + 48 + 4,
   748              x["displayMode"]["height"] === undefined ? 0 : (x["displayMode"]["height"] as number)
   749            );
   750            A.store.Bool(ptr + 48 + 45, "widthInNativePixels" in x["displayMode"] ? true : false);
   751            A.store.Int32(
   752              ptr + 48 + 8,
   753              x["displayMode"]["widthInNativePixels"] === undefined
   754                ? 0
   755                : (x["displayMode"]["widthInNativePixels"] as number)
   756            );
   757            A.store.Bool(ptr + 48 + 46, "heightInNativePixels" in x["displayMode"] ? true : false);
   758            A.store.Int32(
   759              ptr + 48 + 12,
   760              x["displayMode"]["heightInNativePixels"] === undefined
   761                ? 0
   762                : (x["displayMode"]["heightInNativePixels"] as number)
   763            );
   764            A.store.Bool(ptr + 48 + 47, "uiScale" in x["displayMode"] ? true : false);
   765            A.store.Float64(
   766              ptr + 48 + 16,
   767              x["displayMode"]["uiScale"] === undefined ? 0 : (x["displayMode"]["uiScale"] as number)
   768            );
   769            A.store.Bool(ptr + 48 + 48, "deviceScaleFactor" in x["displayMode"] ? true : false);
   770            A.store.Float64(
   771              ptr + 48 + 24,
   772              x["displayMode"]["deviceScaleFactor"] === undefined ? 0 : (x["displayMode"]["deviceScaleFactor"] as number)
   773            );
   774            A.store.Bool(ptr + 48 + 49, "refreshRate" in x["displayMode"] ? true : false);
   775            A.store.Float64(
   776              ptr + 48 + 32,
   777              x["displayMode"]["refreshRate"] === undefined ? 0 : (x["displayMode"]["refreshRate"] as number)
   778            );
   779            A.store.Bool(ptr + 48 + 50, "isNative" in x["displayMode"] ? true : false);
   780            A.store.Bool(ptr + 48 + 40, x["displayMode"]["isNative"] ? true : false);
   781            A.store.Bool(ptr + 48 + 51, "isSelected" in x["displayMode"] ? true : false);
   782            A.store.Bool(ptr + 48 + 41, x["displayMode"]["isSelected"] ? true : false);
   783            A.store.Bool(ptr + 48 + 52, "isInterlaced" in x["displayMode"] ? true : false);
   784            A.store.Bool(ptr + 48 + 42, x["displayMode"]["isInterlaced"] ? true : false);
   785          }
   786          A.store.Bool(ptr + 117, "displayZoomFactor" in x ? true : false);
   787          A.store.Float64(ptr + 104, x["displayZoomFactor"] === undefined ? 0 : (x["displayZoomFactor"] as number));
   788        }
   789      },
   790      "load_DisplayProperties": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => {
   791        const x = create === A.H.TRUE ? {} : A.H.get<any>(ref);
   792  
   793        if (A.load.Bool(ptr + 112)) {
   794          x["isUnified"] = A.load.Bool(ptr + 0);
   795        } else {
   796          delete x["isUnified"];
   797        }
   798        x["mirroringSourceId"] = A.load.Ref(ptr + 4, undefined);
   799        if (A.load.Bool(ptr + 113)) {
   800          x["isPrimary"] = A.load.Bool(ptr + 8);
   801        } else {
   802          delete x["isPrimary"];
   803        }
   804        if (A.load.Bool(ptr + 12 + 20)) {
   805          x["overscan"] = {};
   806          if (A.load.Bool(ptr + 12 + 16)) {
   807            x["overscan"]["left"] = A.load.Int32(ptr + 12 + 0);
   808          } else {
   809            delete x["overscan"]["left"];
   810          }
   811          if (A.load.Bool(ptr + 12 + 17)) {
   812            x["overscan"]["top"] = A.load.Int32(ptr + 12 + 4);
   813          } else {
   814            delete x["overscan"]["top"];
   815          }
   816          if (A.load.Bool(ptr + 12 + 18)) {
   817            x["overscan"]["right"] = A.load.Int32(ptr + 12 + 8);
   818          } else {
   819            delete x["overscan"]["right"];
   820          }
   821          if (A.load.Bool(ptr + 12 + 19)) {
   822            x["overscan"]["bottom"] = A.load.Int32(ptr + 12 + 12);
   823          } else {
   824            delete x["overscan"]["bottom"];
   825          }
   826        } else {
   827          delete x["overscan"];
   828        }
   829        if (A.load.Bool(ptr + 114)) {
   830          x["rotation"] = A.load.Int32(ptr + 36);
   831        } else {
   832          delete x["rotation"];
   833        }
   834        if (A.load.Bool(ptr + 115)) {
   835          x["boundsOriginX"] = A.load.Int32(ptr + 40);
   836        } else {
   837          delete x["boundsOriginX"];
   838        }
   839        if (A.load.Bool(ptr + 116)) {
   840          x["boundsOriginY"] = A.load.Int32(ptr + 44);
   841        } else {
   842          delete x["boundsOriginY"];
   843        }
   844        if (A.load.Bool(ptr + 48 + 53)) {
   845          x["displayMode"] = {};
   846          if (A.load.Bool(ptr + 48 + 43)) {
   847            x["displayMode"]["width"] = A.load.Int32(ptr + 48 + 0);
   848          } else {
   849            delete x["displayMode"]["width"];
   850          }
   851          if (A.load.Bool(ptr + 48 + 44)) {
   852            x["displayMode"]["height"] = A.load.Int32(ptr + 48 + 4);
   853          } else {
   854            delete x["displayMode"]["height"];
   855          }
   856          if (A.load.Bool(ptr + 48 + 45)) {
   857            x["displayMode"]["widthInNativePixels"] = A.load.Int32(ptr + 48 + 8);
   858          } else {
   859            delete x["displayMode"]["widthInNativePixels"];
   860          }
   861          if (A.load.Bool(ptr + 48 + 46)) {
   862            x["displayMode"]["heightInNativePixels"] = A.load.Int32(ptr + 48 + 12);
   863          } else {
   864            delete x["displayMode"]["heightInNativePixels"];
   865          }
   866          if (A.load.Bool(ptr + 48 + 47)) {
   867            x["displayMode"]["uiScale"] = A.load.Float64(ptr + 48 + 16);
   868          } else {
   869            delete x["displayMode"]["uiScale"];
   870          }
   871          if (A.load.Bool(ptr + 48 + 48)) {
   872            x["displayMode"]["deviceScaleFactor"] = A.load.Float64(ptr + 48 + 24);
   873          } else {
   874            delete x["displayMode"]["deviceScaleFactor"];
   875          }
   876          if (A.load.Bool(ptr + 48 + 49)) {
   877            x["displayMode"]["refreshRate"] = A.load.Float64(ptr + 48 + 32);
   878          } else {
   879            delete x["displayMode"]["refreshRate"];
   880          }
   881          if (A.load.Bool(ptr + 48 + 50)) {
   882            x["displayMode"]["isNative"] = A.load.Bool(ptr + 48 + 40);
   883          } else {
   884            delete x["displayMode"]["isNative"];
   885          }
   886          if (A.load.Bool(ptr + 48 + 51)) {
   887            x["displayMode"]["isSelected"] = A.load.Bool(ptr + 48 + 41);
   888          } else {
   889            delete x["displayMode"]["isSelected"];
   890          }
   891          if (A.load.Bool(ptr + 48 + 52)) {
   892            x["displayMode"]["isInterlaced"] = A.load.Bool(ptr + 48 + 42);
   893          } else {
   894            delete x["displayMode"]["isInterlaced"];
   895          }
   896        } else {
   897          delete x["displayMode"];
   898        }
   899        if (A.load.Bool(ptr + 117)) {
   900          x["displayZoomFactor"] = A.load.Float64(ptr + 104);
   901        } else {
   902          delete x["displayZoomFactor"];
   903        }
   904        return create === A.H.TRUE ? A.H.push(x) : ref;
   905      },
   906  
   907      "store_GetInfoFlags": (ptr: Pointer, ref: heap.Ref<any>) => {
   908        const x = A.H.get<any>(ref);
   909  
   910        if (typeof x === "undefined") {
   911          A.store.Bool(ptr + 2, false);
   912          A.store.Bool(ptr + 1, false);
   913          A.store.Bool(ptr + 0, false);
   914        } else {
   915          A.store.Bool(ptr + 2, true);
   916          A.store.Bool(ptr + 1, "singleUnified" in x ? true : false);
   917          A.store.Bool(ptr + 0, x["singleUnified"] ? true : false);
   918        }
   919      },
   920      "load_GetInfoFlags": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => {
   921        const x = create === A.H.TRUE ? {} : A.H.get<any>(ref);
   922  
   923        if (A.load.Bool(ptr + 1)) {
   924          x["singleUnified"] = A.load.Bool(ptr + 0);
   925        } else {
   926          delete x["singleUnified"];
   927        }
   928        return create === A.H.TRUE ? A.H.push(x) : ref;
   929      },
   930      "constof_MirrorMode": (ref: heap.Ref<string>): number => {
   931        const idx = ["off", "normal", "mixed"].indexOf(A.H.get(ref));
   932        return idx < 0 ? 0 : idx + 1;
   933      },
   934  
   935      "store_MirrorModeInfo": (ptr: Pointer, ref: heap.Ref<any>) => {
   936        const x = A.H.get<any>(ref);
   937  
   938        if (typeof x === "undefined") {
   939          A.store.Bool(ptr + 12, false);
   940          A.store.Enum(ptr + 0, -1);
   941          A.store.Ref(ptr + 4, undefined);
   942          A.store.Ref(ptr + 8, undefined);
   943        } else {
   944          A.store.Bool(ptr + 12, true);
   945          A.store.Enum(ptr + 0, ["off", "normal", "mixed"].indexOf(x["mode"] as string));
   946          A.store.Ref(ptr + 4, x["mirroringSourceId"]);
   947          A.store.Ref(ptr + 8, x["mirroringDestinationIds"]);
   948        }
   949      },
   950      "load_MirrorModeInfo": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => {
   951        const x = create === A.H.TRUE ? {} : A.H.get<any>(ref);
   952  
   953        x["mode"] = A.load.Enum(ptr + 0, ["off", "normal", "mixed"]);
   954        x["mirroringSourceId"] = A.load.Ref(ptr + 4, undefined);
   955        x["mirroringDestinationIds"] = A.load.Ref(ptr + 8, undefined);
   956        return create === A.H.TRUE ? A.H.push(x) : ref;
   957      },
   958  
   959      "store_Point": (ptr: Pointer, ref: heap.Ref<any>) => {
   960        const x = A.H.get<any>(ref);
   961  
   962        if (typeof x === "undefined") {
   963          A.store.Bool(ptr + 10, false);
   964          A.store.Bool(ptr + 8, false);
   965          A.store.Int32(ptr + 0, 0);
   966          A.store.Bool(ptr + 9, false);
   967          A.store.Int32(ptr + 4, 0);
   968        } else {
   969          A.store.Bool(ptr + 10, true);
   970          A.store.Bool(ptr + 8, "x" in x ? true : false);
   971          A.store.Int32(ptr + 0, x["x"] === undefined ? 0 : (x["x"] as number));
   972          A.store.Bool(ptr + 9, "y" in x ? true : false);
   973          A.store.Int32(ptr + 4, x["y"] === undefined ? 0 : (x["y"] as number));
   974        }
   975      },
   976      "load_Point": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => {
   977        const x = create === A.H.TRUE ? {} : A.H.get<any>(ref);
   978  
   979        if (A.load.Bool(ptr + 8)) {
   980          x["x"] = A.load.Int32(ptr + 0);
   981        } else {
   982          delete x["x"];
   983        }
   984        if (A.load.Bool(ptr + 9)) {
   985          x["y"] = A.load.Int32(ptr + 4);
   986        } else {
   987          delete x["y"];
   988        }
   989        return create === A.H.TRUE ? A.H.push(x) : ref;
   990      },
   991  
   992      "store_TouchCalibrationPair": (ptr: Pointer, ref: heap.Ref<any>) => {
   993        const x = A.H.get<any>(ref);
   994  
   995        if (typeof x === "undefined") {
   996          A.store.Bool(ptr + 23, false);
   997  
   998          A.store.Bool(ptr + 0 + 10, false);
   999          A.store.Bool(ptr + 0 + 8, false);
  1000          A.store.Int32(ptr + 0 + 0, 0);
  1001          A.store.Bool(ptr + 0 + 9, false);
  1002          A.store.Int32(ptr + 0 + 4, 0);
  1003  
  1004          A.store.Bool(ptr + 12 + 10, false);
  1005          A.store.Bool(ptr + 12 + 8, false);
  1006          A.store.Int32(ptr + 12 + 0, 0);
  1007          A.store.Bool(ptr + 12 + 9, false);
  1008          A.store.Int32(ptr + 12 + 4, 0);
  1009        } else {
  1010          A.store.Bool(ptr + 23, true);
  1011  
  1012          if (typeof x["displayPoint"] === "undefined") {
  1013            A.store.Bool(ptr + 0 + 10, false);
  1014            A.store.Bool(ptr + 0 + 8, false);
  1015            A.store.Int32(ptr + 0 + 0, 0);
  1016            A.store.Bool(ptr + 0 + 9, false);
  1017            A.store.Int32(ptr + 0 + 4, 0);
  1018          } else {
  1019            A.store.Bool(ptr + 0 + 10, true);
  1020            A.store.Bool(ptr + 0 + 8, "x" in x["displayPoint"] ? true : false);
  1021            A.store.Int32(ptr + 0 + 0, x["displayPoint"]["x"] === undefined ? 0 : (x["displayPoint"]["x"] as number));
  1022            A.store.Bool(ptr + 0 + 9, "y" in x["displayPoint"] ? true : false);
  1023            A.store.Int32(ptr + 0 + 4, x["displayPoint"]["y"] === undefined ? 0 : (x["displayPoint"]["y"] as number));
  1024          }
  1025  
  1026          if (typeof x["touchPoint"] === "undefined") {
  1027            A.store.Bool(ptr + 12 + 10, false);
  1028            A.store.Bool(ptr + 12 + 8, false);
  1029            A.store.Int32(ptr + 12 + 0, 0);
  1030            A.store.Bool(ptr + 12 + 9, false);
  1031            A.store.Int32(ptr + 12 + 4, 0);
  1032          } else {
  1033            A.store.Bool(ptr + 12 + 10, true);
  1034            A.store.Bool(ptr + 12 + 8, "x" in x["touchPoint"] ? true : false);
  1035            A.store.Int32(ptr + 12 + 0, x["touchPoint"]["x"] === undefined ? 0 : (x["touchPoint"]["x"] as number));
  1036            A.store.Bool(ptr + 12 + 9, "y" in x["touchPoint"] ? true : false);
  1037            A.store.Int32(ptr + 12 + 4, x["touchPoint"]["y"] === undefined ? 0 : (x["touchPoint"]["y"] as number));
  1038          }
  1039        }
  1040      },
  1041      "load_TouchCalibrationPair": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => {
  1042        const x = create === A.H.TRUE ? {} : A.H.get<any>(ref);
  1043  
  1044        if (A.load.Bool(ptr + 0 + 10)) {
  1045          x["displayPoint"] = {};
  1046          if (A.load.Bool(ptr + 0 + 8)) {
  1047            x["displayPoint"]["x"] = A.load.Int32(ptr + 0 + 0);
  1048          } else {
  1049            delete x["displayPoint"]["x"];
  1050          }
  1051          if (A.load.Bool(ptr + 0 + 9)) {
  1052            x["displayPoint"]["y"] = A.load.Int32(ptr + 0 + 4);
  1053          } else {
  1054            delete x["displayPoint"]["y"];
  1055          }
  1056        } else {
  1057          delete x["displayPoint"];
  1058        }
  1059        if (A.load.Bool(ptr + 12 + 10)) {
  1060          x["touchPoint"] = {};
  1061          if (A.load.Bool(ptr + 12 + 8)) {
  1062            x["touchPoint"]["x"] = A.load.Int32(ptr + 12 + 0);
  1063          } else {
  1064            delete x["touchPoint"]["x"];
  1065          }
  1066          if (A.load.Bool(ptr + 12 + 9)) {
  1067            x["touchPoint"]["y"] = A.load.Int32(ptr + 12 + 4);
  1068          } else {
  1069            delete x["touchPoint"]["y"];
  1070          }
  1071        } else {
  1072          delete x["touchPoint"];
  1073        }
  1074        return create === A.H.TRUE ? A.H.push(x) : ref;
  1075      },
  1076  
  1077      "store_TouchCalibrationPairQuad": (ptr: Pointer, ref: heap.Ref<any>) => {
  1078        const x = A.H.get<any>(ref);
  1079  
  1080        if (typeof x === "undefined") {
  1081          A.store.Bool(ptr + 96, false);
  1082  
  1083          A.store.Bool(ptr + 0 + 23, false);
  1084  
  1085          A.store.Bool(ptr + 0 + 0 + 10, false);
  1086          A.store.Bool(ptr + 0 + 0 + 8, false);
  1087          A.store.Int32(ptr + 0 + 0 + 0, 0);
  1088          A.store.Bool(ptr + 0 + 0 + 9, false);
  1089          A.store.Int32(ptr + 0 + 0 + 4, 0);
  1090  
  1091          A.store.Bool(ptr + 0 + 12 + 10, false);
  1092          A.store.Bool(ptr + 0 + 12 + 8, false);
  1093          A.store.Int32(ptr + 0 + 12 + 0, 0);
  1094          A.store.Bool(ptr + 0 + 12 + 9, false);
  1095          A.store.Int32(ptr + 0 + 12 + 4, 0);
  1096  
  1097          A.store.Bool(ptr + 24 + 23, false);
  1098  
  1099          A.store.Bool(ptr + 24 + 0 + 10, false);
  1100          A.store.Bool(ptr + 24 + 0 + 8, false);
  1101          A.store.Int32(ptr + 24 + 0 + 0, 0);
  1102          A.store.Bool(ptr + 24 + 0 + 9, false);
  1103          A.store.Int32(ptr + 24 + 0 + 4, 0);
  1104  
  1105          A.store.Bool(ptr + 24 + 12 + 10, false);
  1106          A.store.Bool(ptr + 24 + 12 + 8, false);
  1107          A.store.Int32(ptr + 24 + 12 + 0, 0);
  1108          A.store.Bool(ptr + 24 + 12 + 9, false);
  1109          A.store.Int32(ptr + 24 + 12 + 4, 0);
  1110  
  1111          A.store.Bool(ptr + 48 + 23, false);
  1112  
  1113          A.store.Bool(ptr + 48 + 0 + 10, false);
  1114          A.store.Bool(ptr + 48 + 0 + 8, false);
  1115          A.store.Int32(ptr + 48 + 0 + 0, 0);
  1116          A.store.Bool(ptr + 48 + 0 + 9, false);
  1117          A.store.Int32(ptr + 48 + 0 + 4, 0);
  1118  
  1119          A.store.Bool(ptr + 48 + 12 + 10, false);
  1120          A.store.Bool(ptr + 48 + 12 + 8, false);
  1121          A.store.Int32(ptr + 48 + 12 + 0, 0);
  1122          A.store.Bool(ptr + 48 + 12 + 9, false);
  1123          A.store.Int32(ptr + 48 + 12 + 4, 0);
  1124  
  1125          A.store.Bool(ptr + 72 + 23, false);
  1126  
  1127          A.store.Bool(ptr + 72 + 0 + 10, false);
  1128          A.store.Bool(ptr + 72 + 0 + 8, false);
  1129          A.store.Int32(ptr + 72 + 0 + 0, 0);
  1130          A.store.Bool(ptr + 72 + 0 + 9, false);
  1131          A.store.Int32(ptr + 72 + 0 + 4, 0);
  1132  
  1133          A.store.Bool(ptr + 72 + 12 + 10, false);
  1134          A.store.Bool(ptr + 72 + 12 + 8, false);
  1135          A.store.Int32(ptr + 72 + 12 + 0, 0);
  1136          A.store.Bool(ptr + 72 + 12 + 9, false);
  1137          A.store.Int32(ptr + 72 + 12 + 4, 0);
  1138        } else {
  1139          A.store.Bool(ptr + 96, true);
  1140  
  1141          if (typeof x["pair1"] === "undefined") {
  1142            A.store.Bool(ptr + 0 + 23, false);
  1143  
  1144            A.store.Bool(ptr + 0 + 0 + 10, false);
  1145            A.store.Bool(ptr + 0 + 0 + 8, false);
  1146            A.store.Int32(ptr + 0 + 0 + 0, 0);
  1147            A.store.Bool(ptr + 0 + 0 + 9, false);
  1148            A.store.Int32(ptr + 0 + 0 + 4, 0);
  1149  
  1150            A.store.Bool(ptr + 0 + 12 + 10, false);
  1151            A.store.Bool(ptr + 0 + 12 + 8, false);
  1152            A.store.Int32(ptr + 0 + 12 + 0, 0);
  1153            A.store.Bool(ptr + 0 + 12 + 9, false);
  1154            A.store.Int32(ptr + 0 + 12 + 4, 0);
  1155          } else {
  1156            A.store.Bool(ptr + 0 + 23, true);
  1157  
  1158            if (typeof x["pair1"]["displayPoint"] === "undefined") {
  1159              A.store.Bool(ptr + 0 + 0 + 10, false);
  1160              A.store.Bool(ptr + 0 + 0 + 8, false);
  1161              A.store.Int32(ptr + 0 + 0 + 0, 0);
  1162              A.store.Bool(ptr + 0 + 0 + 9, false);
  1163              A.store.Int32(ptr + 0 + 0 + 4, 0);
  1164            } else {
  1165              A.store.Bool(ptr + 0 + 0 + 10, true);
  1166              A.store.Bool(ptr + 0 + 0 + 8, "x" in x["pair1"]["displayPoint"] ? true : false);
  1167              A.store.Int32(
  1168                ptr + 0 + 0 + 0,
  1169                x["pair1"]["displayPoint"]["x"] === undefined ? 0 : (x["pair1"]["displayPoint"]["x"] as number)
  1170              );
  1171              A.store.Bool(ptr + 0 + 0 + 9, "y" in x["pair1"]["displayPoint"] ? true : false);
  1172              A.store.Int32(
  1173                ptr + 0 + 0 + 4,
  1174                x["pair1"]["displayPoint"]["y"] === undefined ? 0 : (x["pair1"]["displayPoint"]["y"] as number)
  1175              );
  1176            }
  1177  
  1178            if (typeof x["pair1"]["touchPoint"] === "undefined") {
  1179              A.store.Bool(ptr + 0 + 12 + 10, false);
  1180              A.store.Bool(ptr + 0 + 12 + 8, false);
  1181              A.store.Int32(ptr + 0 + 12 + 0, 0);
  1182              A.store.Bool(ptr + 0 + 12 + 9, false);
  1183              A.store.Int32(ptr + 0 + 12 + 4, 0);
  1184            } else {
  1185              A.store.Bool(ptr + 0 + 12 + 10, true);
  1186              A.store.Bool(ptr + 0 + 12 + 8, "x" in x["pair1"]["touchPoint"] ? true : false);
  1187              A.store.Int32(
  1188                ptr + 0 + 12 + 0,
  1189                x["pair1"]["touchPoint"]["x"] === undefined ? 0 : (x["pair1"]["touchPoint"]["x"] as number)
  1190              );
  1191              A.store.Bool(ptr + 0 + 12 + 9, "y" in x["pair1"]["touchPoint"] ? true : false);
  1192              A.store.Int32(
  1193                ptr + 0 + 12 + 4,
  1194                x["pair1"]["touchPoint"]["y"] === undefined ? 0 : (x["pair1"]["touchPoint"]["y"] as number)
  1195              );
  1196            }
  1197          }
  1198  
  1199          if (typeof x["pair2"] === "undefined") {
  1200            A.store.Bool(ptr + 24 + 23, false);
  1201  
  1202            A.store.Bool(ptr + 24 + 0 + 10, false);
  1203            A.store.Bool(ptr + 24 + 0 + 8, false);
  1204            A.store.Int32(ptr + 24 + 0 + 0, 0);
  1205            A.store.Bool(ptr + 24 + 0 + 9, false);
  1206            A.store.Int32(ptr + 24 + 0 + 4, 0);
  1207  
  1208            A.store.Bool(ptr + 24 + 12 + 10, false);
  1209            A.store.Bool(ptr + 24 + 12 + 8, false);
  1210            A.store.Int32(ptr + 24 + 12 + 0, 0);
  1211            A.store.Bool(ptr + 24 + 12 + 9, false);
  1212            A.store.Int32(ptr + 24 + 12 + 4, 0);
  1213          } else {
  1214            A.store.Bool(ptr + 24 + 23, true);
  1215  
  1216            if (typeof x["pair2"]["displayPoint"] === "undefined") {
  1217              A.store.Bool(ptr + 24 + 0 + 10, false);
  1218              A.store.Bool(ptr + 24 + 0 + 8, false);
  1219              A.store.Int32(ptr + 24 + 0 + 0, 0);
  1220              A.store.Bool(ptr + 24 + 0 + 9, false);
  1221              A.store.Int32(ptr + 24 + 0 + 4, 0);
  1222            } else {
  1223              A.store.Bool(ptr + 24 + 0 + 10, true);
  1224              A.store.Bool(ptr + 24 + 0 + 8, "x" in x["pair2"]["displayPoint"] ? true : false);
  1225              A.store.Int32(
  1226                ptr + 24 + 0 + 0,
  1227                x["pair2"]["displayPoint"]["x"] === undefined ? 0 : (x["pair2"]["displayPoint"]["x"] as number)
  1228              );
  1229              A.store.Bool(ptr + 24 + 0 + 9, "y" in x["pair2"]["displayPoint"] ? true : false);
  1230              A.store.Int32(
  1231                ptr + 24 + 0 + 4,
  1232                x["pair2"]["displayPoint"]["y"] === undefined ? 0 : (x["pair2"]["displayPoint"]["y"] as number)
  1233              );
  1234            }
  1235  
  1236            if (typeof x["pair2"]["touchPoint"] === "undefined") {
  1237              A.store.Bool(ptr + 24 + 12 + 10, false);
  1238              A.store.Bool(ptr + 24 + 12 + 8, false);
  1239              A.store.Int32(ptr + 24 + 12 + 0, 0);
  1240              A.store.Bool(ptr + 24 + 12 + 9, false);
  1241              A.store.Int32(ptr + 24 + 12 + 4, 0);
  1242            } else {
  1243              A.store.Bool(ptr + 24 + 12 + 10, true);
  1244              A.store.Bool(ptr + 24 + 12 + 8, "x" in x["pair2"]["touchPoint"] ? true : false);
  1245              A.store.Int32(
  1246                ptr + 24 + 12 + 0,
  1247                x["pair2"]["touchPoint"]["x"] === undefined ? 0 : (x["pair2"]["touchPoint"]["x"] as number)
  1248              );
  1249              A.store.Bool(ptr + 24 + 12 + 9, "y" in x["pair2"]["touchPoint"] ? true : false);
  1250              A.store.Int32(
  1251                ptr + 24 + 12 + 4,
  1252                x["pair2"]["touchPoint"]["y"] === undefined ? 0 : (x["pair2"]["touchPoint"]["y"] as number)
  1253              );
  1254            }
  1255          }
  1256  
  1257          if (typeof x["pair3"] === "undefined") {
  1258            A.store.Bool(ptr + 48 + 23, false);
  1259  
  1260            A.store.Bool(ptr + 48 + 0 + 10, false);
  1261            A.store.Bool(ptr + 48 + 0 + 8, false);
  1262            A.store.Int32(ptr + 48 + 0 + 0, 0);
  1263            A.store.Bool(ptr + 48 + 0 + 9, false);
  1264            A.store.Int32(ptr + 48 + 0 + 4, 0);
  1265  
  1266            A.store.Bool(ptr + 48 + 12 + 10, false);
  1267            A.store.Bool(ptr + 48 + 12 + 8, false);
  1268            A.store.Int32(ptr + 48 + 12 + 0, 0);
  1269            A.store.Bool(ptr + 48 + 12 + 9, false);
  1270            A.store.Int32(ptr + 48 + 12 + 4, 0);
  1271          } else {
  1272            A.store.Bool(ptr + 48 + 23, true);
  1273  
  1274            if (typeof x["pair3"]["displayPoint"] === "undefined") {
  1275              A.store.Bool(ptr + 48 + 0 + 10, false);
  1276              A.store.Bool(ptr + 48 + 0 + 8, false);
  1277              A.store.Int32(ptr + 48 + 0 + 0, 0);
  1278              A.store.Bool(ptr + 48 + 0 + 9, false);
  1279              A.store.Int32(ptr + 48 + 0 + 4, 0);
  1280            } else {
  1281              A.store.Bool(ptr + 48 + 0 + 10, true);
  1282              A.store.Bool(ptr + 48 + 0 + 8, "x" in x["pair3"]["displayPoint"] ? true : false);
  1283              A.store.Int32(
  1284                ptr + 48 + 0 + 0,
  1285                x["pair3"]["displayPoint"]["x"] === undefined ? 0 : (x["pair3"]["displayPoint"]["x"] as number)
  1286              );
  1287              A.store.Bool(ptr + 48 + 0 + 9, "y" in x["pair3"]["displayPoint"] ? true : false);
  1288              A.store.Int32(
  1289                ptr + 48 + 0 + 4,
  1290                x["pair3"]["displayPoint"]["y"] === undefined ? 0 : (x["pair3"]["displayPoint"]["y"] as number)
  1291              );
  1292            }
  1293  
  1294            if (typeof x["pair3"]["touchPoint"] === "undefined") {
  1295              A.store.Bool(ptr + 48 + 12 + 10, false);
  1296              A.store.Bool(ptr + 48 + 12 + 8, false);
  1297              A.store.Int32(ptr + 48 + 12 + 0, 0);
  1298              A.store.Bool(ptr + 48 + 12 + 9, false);
  1299              A.store.Int32(ptr + 48 + 12 + 4, 0);
  1300            } else {
  1301              A.store.Bool(ptr + 48 + 12 + 10, true);
  1302              A.store.Bool(ptr + 48 + 12 + 8, "x" in x["pair3"]["touchPoint"] ? true : false);
  1303              A.store.Int32(
  1304                ptr + 48 + 12 + 0,
  1305                x["pair3"]["touchPoint"]["x"] === undefined ? 0 : (x["pair3"]["touchPoint"]["x"] as number)
  1306              );
  1307              A.store.Bool(ptr + 48 + 12 + 9, "y" in x["pair3"]["touchPoint"] ? true : false);
  1308              A.store.Int32(
  1309                ptr + 48 + 12 + 4,
  1310                x["pair3"]["touchPoint"]["y"] === undefined ? 0 : (x["pair3"]["touchPoint"]["y"] as number)
  1311              );
  1312            }
  1313          }
  1314  
  1315          if (typeof x["pair4"] === "undefined") {
  1316            A.store.Bool(ptr + 72 + 23, false);
  1317  
  1318            A.store.Bool(ptr + 72 + 0 + 10, false);
  1319            A.store.Bool(ptr + 72 + 0 + 8, false);
  1320            A.store.Int32(ptr + 72 + 0 + 0, 0);
  1321            A.store.Bool(ptr + 72 + 0 + 9, false);
  1322            A.store.Int32(ptr + 72 + 0 + 4, 0);
  1323  
  1324            A.store.Bool(ptr + 72 + 12 + 10, false);
  1325            A.store.Bool(ptr + 72 + 12 + 8, false);
  1326            A.store.Int32(ptr + 72 + 12 + 0, 0);
  1327            A.store.Bool(ptr + 72 + 12 + 9, false);
  1328            A.store.Int32(ptr + 72 + 12 + 4, 0);
  1329          } else {
  1330            A.store.Bool(ptr + 72 + 23, true);
  1331  
  1332            if (typeof x["pair4"]["displayPoint"] === "undefined") {
  1333              A.store.Bool(ptr + 72 + 0 + 10, false);
  1334              A.store.Bool(ptr + 72 + 0 + 8, false);
  1335              A.store.Int32(ptr + 72 + 0 + 0, 0);
  1336              A.store.Bool(ptr + 72 + 0 + 9, false);
  1337              A.store.Int32(ptr + 72 + 0 + 4, 0);
  1338            } else {
  1339              A.store.Bool(ptr + 72 + 0 + 10, true);
  1340              A.store.Bool(ptr + 72 + 0 + 8, "x" in x["pair4"]["displayPoint"] ? true : false);
  1341              A.store.Int32(
  1342                ptr + 72 + 0 + 0,
  1343                x["pair4"]["displayPoint"]["x"] === undefined ? 0 : (x["pair4"]["displayPoint"]["x"] as number)
  1344              );
  1345              A.store.Bool(ptr + 72 + 0 + 9, "y" in x["pair4"]["displayPoint"] ? true : false);
  1346              A.store.Int32(
  1347                ptr + 72 + 0 + 4,
  1348                x["pair4"]["displayPoint"]["y"] === undefined ? 0 : (x["pair4"]["displayPoint"]["y"] as number)
  1349              );
  1350            }
  1351  
  1352            if (typeof x["pair4"]["touchPoint"] === "undefined") {
  1353              A.store.Bool(ptr + 72 + 12 + 10, false);
  1354              A.store.Bool(ptr + 72 + 12 + 8, false);
  1355              A.store.Int32(ptr + 72 + 12 + 0, 0);
  1356              A.store.Bool(ptr + 72 + 12 + 9, false);
  1357              A.store.Int32(ptr + 72 + 12 + 4, 0);
  1358            } else {
  1359              A.store.Bool(ptr + 72 + 12 + 10, true);
  1360              A.store.Bool(ptr + 72 + 12 + 8, "x" in x["pair4"]["touchPoint"] ? true : false);
  1361              A.store.Int32(
  1362                ptr + 72 + 12 + 0,
  1363                x["pair4"]["touchPoint"]["x"] === undefined ? 0 : (x["pair4"]["touchPoint"]["x"] as number)
  1364              );
  1365              A.store.Bool(ptr + 72 + 12 + 9, "y" in x["pair4"]["touchPoint"] ? true : false);
  1366              A.store.Int32(
  1367                ptr + 72 + 12 + 4,
  1368                x["pair4"]["touchPoint"]["y"] === undefined ? 0 : (x["pair4"]["touchPoint"]["y"] as number)
  1369              );
  1370            }
  1371          }
  1372        }
  1373      },
  1374      "load_TouchCalibrationPairQuad": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => {
  1375        const x = create === A.H.TRUE ? {} : A.H.get<any>(ref);
  1376  
  1377        if (A.load.Bool(ptr + 0 + 23)) {
  1378          x["pair1"] = {};
  1379          if (A.load.Bool(ptr + 0 + 0 + 10)) {
  1380            x["pair1"]["displayPoint"] = {};
  1381            if (A.load.Bool(ptr + 0 + 0 + 8)) {
  1382              x["pair1"]["displayPoint"]["x"] = A.load.Int32(ptr + 0 + 0 + 0);
  1383            } else {
  1384              delete x["pair1"]["displayPoint"]["x"];
  1385            }
  1386            if (A.load.Bool(ptr + 0 + 0 + 9)) {
  1387              x["pair1"]["displayPoint"]["y"] = A.load.Int32(ptr + 0 + 0 + 4);
  1388            } else {
  1389              delete x["pair1"]["displayPoint"]["y"];
  1390            }
  1391          } else {
  1392            delete x["pair1"]["displayPoint"];
  1393          }
  1394          if (A.load.Bool(ptr + 0 + 12 + 10)) {
  1395            x["pair1"]["touchPoint"] = {};
  1396            if (A.load.Bool(ptr + 0 + 12 + 8)) {
  1397              x["pair1"]["touchPoint"]["x"] = A.load.Int32(ptr + 0 + 12 + 0);
  1398            } else {
  1399              delete x["pair1"]["touchPoint"]["x"];
  1400            }
  1401            if (A.load.Bool(ptr + 0 + 12 + 9)) {
  1402              x["pair1"]["touchPoint"]["y"] = A.load.Int32(ptr + 0 + 12 + 4);
  1403            } else {
  1404              delete x["pair1"]["touchPoint"]["y"];
  1405            }
  1406          } else {
  1407            delete x["pair1"]["touchPoint"];
  1408          }
  1409        } else {
  1410          delete x["pair1"];
  1411        }
  1412        if (A.load.Bool(ptr + 24 + 23)) {
  1413          x["pair2"] = {};
  1414          if (A.load.Bool(ptr + 24 + 0 + 10)) {
  1415            x["pair2"]["displayPoint"] = {};
  1416            if (A.load.Bool(ptr + 24 + 0 + 8)) {
  1417              x["pair2"]["displayPoint"]["x"] = A.load.Int32(ptr + 24 + 0 + 0);
  1418            } else {
  1419              delete x["pair2"]["displayPoint"]["x"];
  1420            }
  1421            if (A.load.Bool(ptr + 24 + 0 + 9)) {
  1422              x["pair2"]["displayPoint"]["y"] = A.load.Int32(ptr + 24 + 0 + 4);
  1423            } else {
  1424              delete x["pair2"]["displayPoint"]["y"];
  1425            }
  1426          } else {
  1427            delete x["pair2"]["displayPoint"];
  1428          }
  1429          if (A.load.Bool(ptr + 24 + 12 + 10)) {
  1430            x["pair2"]["touchPoint"] = {};
  1431            if (A.load.Bool(ptr + 24 + 12 + 8)) {
  1432              x["pair2"]["touchPoint"]["x"] = A.load.Int32(ptr + 24 + 12 + 0);
  1433            } else {
  1434              delete x["pair2"]["touchPoint"]["x"];
  1435            }
  1436            if (A.load.Bool(ptr + 24 + 12 + 9)) {
  1437              x["pair2"]["touchPoint"]["y"] = A.load.Int32(ptr + 24 + 12 + 4);
  1438            } else {
  1439              delete x["pair2"]["touchPoint"]["y"];
  1440            }
  1441          } else {
  1442            delete x["pair2"]["touchPoint"];
  1443          }
  1444        } else {
  1445          delete x["pair2"];
  1446        }
  1447        if (A.load.Bool(ptr + 48 + 23)) {
  1448          x["pair3"] = {};
  1449          if (A.load.Bool(ptr + 48 + 0 + 10)) {
  1450            x["pair3"]["displayPoint"] = {};
  1451            if (A.load.Bool(ptr + 48 + 0 + 8)) {
  1452              x["pair3"]["displayPoint"]["x"] = A.load.Int32(ptr + 48 + 0 + 0);
  1453            } else {
  1454              delete x["pair3"]["displayPoint"]["x"];
  1455            }
  1456            if (A.load.Bool(ptr + 48 + 0 + 9)) {
  1457              x["pair3"]["displayPoint"]["y"] = A.load.Int32(ptr + 48 + 0 + 4);
  1458            } else {
  1459              delete x["pair3"]["displayPoint"]["y"];
  1460            }
  1461          } else {
  1462            delete x["pair3"]["displayPoint"];
  1463          }
  1464          if (A.load.Bool(ptr + 48 + 12 + 10)) {
  1465            x["pair3"]["touchPoint"] = {};
  1466            if (A.load.Bool(ptr + 48 + 12 + 8)) {
  1467              x["pair3"]["touchPoint"]["x"] = A.load.Int32(ptr + 48 + 12 + 0);
  1468            } else {
  1469              delete x["pair3"]["touchPoint"]["x"];
  1470            }
  1471            if (A.load.Bool(ptr + 48 + 12 + 9)) {
  1472              x["pair3"]["touchPoint"]["y"] = A.load.Int32(ptr + 48 + 12 + 4);
  1473            } else {
  1474              delete x["pair3"]["touchPoint"]["y"];
  1475            }
  1476          } else {
  1477            delete x["pair3"]["touchPoint"];
  1478          }
  1479        } else {
  1480          delete x["pair3"];
  1481        }
  1482        if (A.load.Bool(ptr + 72 + 23)) {
  1483          x["pair4"] = {};
  1484          if (A.load.Bool(ptr + 72 + 0 + 10)) {
  1485            x["pair4"]["displayPoint"] = {};
  1486            if (A.load.Bool(ptr + 72 + 0 + 8)) {
  1487              x["pair4"]["displayPoint"]["x"] = A.load.Int32(ptr + 72 + 0 + 0);
  1488            } else {
  1489              delete x["pair4"]["displayPoint"]["x"];
  1490            }
  1491            if (A.load.Bool(ptr + 72 + 0 + 9)) {
  1492              x["pair4"]["displayPoint"]["y"] = A.load.Int32(ptr + 72 + 0 + 4);
  1493            } else {
  1494              delete x["pair4"]["displayPoint"]["y"];
  1495            }
  1496          } else {
  1497            delete x["pair4"]["displayPoint"];
  1498          }
  1499          if (A.load.Bool(ptr + 72 + 12 + 10)) {
  1500            x["pair4"]["touchPoint"] = {};
  1501            if (A.load.Bool(ptr + 72 + 12 + 8)) {
  1502              x["pair4"]["touchPoint"]["x"] = A.load.Int32(ptr + 72 + 12 + 0);
  1503            } else {
  1504              delete x["pair4"]["touchPoint"]["x"];
  1505            }
  1506            if (A.load.Bool(ptr + 72 + 12 + 9)) {
  1507              x["pair4"]["touchPoint"]["y"] = A.load.Int32(ptr + 72 + 12 + 4);
  1508            } else {
  1509              delete x["pair4"]["touchPoint"]["y"];
  1510            }
  1511          } else {
  1512            delete x["pair4"]["touchPoint"];
  1513          }
  1514        } else {
  1515          delete x["pair4"];
  1516        }
  1517        return create === A.H.TRUE ? A.H.push(x) : ref;
  1518      },
  1519      "has_ClearTouchCalibration": (): heap.Ref<boolean> => {
  1520        if (WEBEXT?.system?.display && "clearTouchCalibration" in WEBEXT?.system?.display) {
  1521          return A.H.TRUE;
  1522        }
  1523        return A.H.FALSE;
  1524      },
  1525      "func_ClearTouchCalibration": (fn: Pointer): void => {
  1526        A.store.Ref(fn, WEBEXT.system.display.clearTouchCalibration);
  1527      },
  1528      "call_ClearTouchCalibration": (retPtr: Pointer, id: heap.Ref<object>): void => {
  1529        const _ret = WEBEXT.system.display.clearTouchCalibration(A.H.get<object>(id));
  1530      },
  1531      "try_ClearTouchCalibration": (retPtr: Pointer, errPtr: Pointer, id: heap.Ref<object>): heap.Ref<boolean> => {
  1532        try {
  1533          const _ret = WEBEXT.system.display.clearTouchCalibration(A.H.get<object>(id));
  1534          return A.H.TRUE;
  1535        } catch (err: any) {
  1536          A.store.Ref(errPtr, err);
  1537          return A.H.FALSE;
  1538        }
  1539      },
  1540      "has_CompleteCustomTouchCalibration": (): heap.Ref<boolean> => {
  1541        if (WEBEXT?.system?.display && "completeCustomTouchCalibration" in WEBEXT?.system?.display) {
  1542          return A.H.TRUE;
  1543        }
  1544        return A.H.FALSE;
  1545      },
  1546      "func_CompleteCustomTouchCalibration": (fn: Pointer): void => {
  1547        A.store.Ref(fn, WEBEXT.system.display.completeCustomTouchCalibration);
  1548      },
  1549      "call_CompleteCustomTouchCalibration": (retPtr: Pointer, pairs: Pointer, bounds: Pointer): void => {
  1550        const pairs_ffi = {};
  1551  
  1552        if (A.load.Bool(pairs + 0 + 23)) {
  1553          pairs_ffi["pair1"] = {};
  1554          if (A.load.Bool(pairs + 0 + 0 + 10)) {
  1555            pairs_ffi["pair1"]["displayPoint"] = {};
  1556            if (A.load.Bool(pairs + 0 + 0 + 8)) {
  1557              pairs_ffi["pair1"]["displayPoint"]["x"] = A.load.Int32(pairs + 0 + 0 + 0);
  1558            }
  1559            if (A.load.Bool(pairs + 0 + 0 + 9)) {
  1560              pairs_ffi["pair1"]["displayPoint"]["y"] = A.load.Int32(pairs + 0 + 0 + 4);
  1561            }
  1562          }
  1563          if (A.load.Bool(pairs + 0 + 12 + 10)) {
  1564            pairs_ffi["pair1"]["touchPoint"] = {};
  1565            if (A.load.Bool(pairs + 0 + 12 + 8)) {
  1566              pairs_ffi["pair1"]["touchPoint"]["x"] = A.load.Int32(pairs + 0 + 12 + 0);
  1567            }
  1568            if (A.load.Bool(pairs + 0 + 12 + 9)) {
  1569              pairs_ffi["pair1"]["touchPoint"]["y"] = A.load.Int32(pairs + 0 + 12 + 4);
  1570            }
  1571          }
  1572        }
  1573        if (A.load.Bool(pairs + 24 + 23)) {
  1574          pairs_ffi["pair2"] = {};
  1575          if (A.load.Bool(pairs + 24 + 0 + 10)) {
  1576            pairs_ffi["pair2"]["displayPoint"] = {};
  1577            if (A.load.Bool(pairs + 24 + 0 + 8)) {
  1578              pairs_ffi["pair2"]["displayPoint"]["x"] = A.load.Int32(pairs + 24 + 0 + 0);
  1579            }
  1580            if (A.load.Bool(pairs + 24 + 0 + 9)) {
  1581              pairs_ffi["pair2"]["displayPoint"]["y"] = A.load.Int32(pairs + 24 + 0 + 4);
  1582            }
  1583          }
  1584          if (A.load.Bool(pairs + 24 + 12 + 10)) {
  1585            pairs_ffi["pair2"]["touchPoint"] = {};
  1586            if (A.load.Bool(pairs + 24 + 12 + 8)) {
  1587              pairs_ffi["pair2"]["touchPoint"]["x"] = A.load.Int32(pairs + 24 + 12 + 0);
  1588            }
  1589            if (A.load.Bool(pairs + 24 + 12 + 9)) {
  1590              pairs_ffi["pair2"]["touchPoint"]["y"] = A.load.Int32(pairs + 24 + 12 + 4);
  1591            }
  1592          }
  1593        }
  1594        if (A.load.Bool(pairs + 48 + 23)) {
  1595          pairs_ffi["pair3"] = {};
  1596          if (A.load.Bool(pairs + 48 + 0 + 10)) {
  1597            pairs_ffi["pair3"]["displayPoint"] = {};
  1598            if (A.load.Bool(pairs + 48 + 0 + 8)) {
  1599              pairs_ffi["pair3"]["displayPoint"]["x"] = A.load.Int32(pairs + 48 + 0 + 0);
  1600            }
  1601            if (A.load.Bool(pairs + 48 + 0 + 9)) {
  1602              pairs_ffi["pair3"]["displayPoint"]["y"] = A.load.Int32(pairs + 48 + 0 + 4);
  1603            }
  1604          }
  1605          if (A.load.Bool(pairs + 48 + 12 + 10)) {
  1606            pairs_ffi["pair3"]["touchPoint"] = {};
  1607            if (A.load.Bool(pairs + 48 + 12 + 8)) {
  1608              pairs_ffi["pair3"]["touchPoint"]["x"] = A.load.Int32(pairs + 48 + 12 + 0);
  1609            }
  1610            if (A.load.Bool(pairs + 48 + 12 + 9)) {
  1611              pairs_ffi["pair3"]["touchPoint"]["y"] = A.load.Int32(pairs + 48 + 12 + 4);
  1612            }
  1613          }
  1614        }
  1615        if (A.load.Bool(pairs + 72 + 23)) {
  1616          pairs_ffi["pair4"] = {};
  1617          if (A.load.Bool(pairs + 72 + 0 + 10)) {
  1618            pairs_ffi["pair4"]["displayPoint"] = {};
  1619            if (A.load.Bool(pairs + 72 + 0 + 8)) {
  1620              pairs_ffi["pair4"]["displayPoint"]["x"] = A.load.Int32(pairs + 72 + 0 + 0);
  1621            }
  1622            if (A.load.Bool(pairs + 72 + 0 + 9)) {
  1623              pairs_ffi["pair4"]["displayPoint"]["y"] = A.load.Int32(pairs + 72 + 0 + 4);
  1624            }
  1625          }
  1626          if (A.load.Bool(pairs + 72 + 12 + 10)) {
  1627            pairs_ffi["pair4"]["touchPoint"] = {};
  1628            if (A.load.Bool(pairs + 72 + 12 + 8)) {
  1629              pairs_ffi["pair4"]["touchPoint"]["x"] = A.load.Int32(pairs + 72 + 12 + 0);
  1630            }
  1631            if (A.load.Bool(pairs + 72 + 12 + 9)) {
  1632              pairs_ffi["pair4"]["touchPoint"]["y"] = A.load.Int32(pairs + 72 + 12 + 4);
  1633            }
  1634          }
  1635        }
  1636  
  1637        const bounds_ffi = {};
  1638  
  1639        if (A.load.Bool(bounds + 16)) {
  1640          bounds_ffi["left"] = A.load.Int32(bounds + 0);
  1641        }
  1642        if (A.load.Bool(bounds + 17)) {
  1643          bounds_ffi["top"] = A.load.Int32(bounds + 4);
  1644        }
  1645        if (A.load.Bool(bounds + 18)) {
  1646          bounds_ffi["width"] = A.load.Int32(bounds + 8);
  1647        }
  1648        if (A.load.Bool(bounds + 19)) {
  1649          bounds_ffi["height"] = A.load.Int32(bounds + 12);
  1650        }
  1651  
  1652        const _ret = WEBEXT.system.display.completeCustomTouchCalibration(pairs_ffi, bounds_ffi);
  1653      },
  1654      "try_CompleteCustomTouchCalibration": (
  1655        retPtr: Pointer,
  1656        errPtr: Pointer,
  1657        pairs: Pointer,
  1658        bounds: Pointer
  1659      ): heap.Ref<boolean> => {
  1660        try {
  1661          const pairs_ffi = {};
  1662  
  1663          if (A.load.Bool(pairs + 0 + 23)) {
  1664            pairs_ffi["pair1"] = {};
  1665            if (A.load.Bool(pairs + 0 + 0 + 10)) {
  1666              pairs_ffi["pair1"]["displayPoint"] = {};
  1667              if (A.load.Bool(pairs + 0 + 0 + 8)) {
  1668                pairs_ffi["pair1"]["displayPoint"]["x"] = A.load.Int32(pairs + 0 + 0 + 0);
  1669              }
  1670              if (A.load.Bool(pairs + 0 + 0 + 9)) {
  1671                pairs_ffi["pair1"]["displayPoint"]["y"] = A.load.Int32(pairs + 0 + 0 + 4);
  1672              }
  1673            }
  1674            if (A.load.Bool(pairs + 0 + 12 + 10)) {
  1675              pairs_ffi["pair1"]["touchPoint"] = {};
  1676              if (A.load.Bool(pairs + 0 + 12 + 8)) {
  1677                pairs_ffi["pair1"]["touchPoint"]["x"] = A.load.Int32(pairs + 0 + 12 + 0);
  1678              }
  1679              if (A.load.Bool(pairs + 0 + 12 + 9)) {
  1680                pairs_ffi["pair1"]["touchPoint"]["y"] = A.load.Int32(pairs + 0 + 12 + 4);
  1681              }
  1682            }
  1683          }
  1684          if (A.load.Bool(pairs + 24 + 23)) {
  1685            pairs_ffi["pair2"] = {};
  1686            if (A.load.Bool(pairs + 24 + 0 + 10)) {
  1687              pairs_ffi["pair2"]["displayPoint"] = {};
  1688              if (A.load.Bool(pairs + 24 + 0 + 8)) {
  1689                pairs_ffi["pair2"]["displayPoint"]["x"] = A.load.Int32(pairs + 24 + 0 + 0);
  1690              }
  1691              if (A.load.Bool(pairs + 24 + 0 + 9)) {
  1692                pairs_ffi["pair2"]["displayPoint"]["y"] = A.load.Int32(pairs + 24 + 0 + 4);
  1693              }
  1694            }
  1695            if (A.load.Bool(pairs + 24 + 12 + 10)) {
  1696              pairs_ffi["pair2"]["touchPoint"] = {};
  1697              if (A.load.Bool(pairs + 24 + 12 + 8)) {
  1698                pairs_ffi["pair2"]["touchPoint"]["x"] = A.load.Int32(pairs + 24 + 12 + 0);
  1699              }
  1700              if (A.load.Bool(pairs + 24 + 12 + 9)) {
  1701                pairs_ffi["pair2"]["touchPoint"]["y"] = A.load.Int32(pairs + 24 + 12 + 4);
  1702              }
  1703            }
  1704          }
  1705          if (A.load.Bool(pairs + 48 + 23)) {
  1706            pairs_ffi["pair3"] = {};
  1707            if (A.load.Bool(pairs + 48 + 0 + 10)) {
  1708              pairs_ffi["pair3"]["displayPoint"] = {};
  1709              if (A.load.Bool(pairs + 48 + 0 + 8)) {
  1710                pairs_ffi["pair3"]["displayPoint"]["x"] = A.load.Int32(pairs + 48 + 0 + 0);
  1711              }
  1712              if (A.load.Bool(pairs + 48 + 0 + 9)) {
  1713                pairs_ffi["pair3"]["displayPoint"]["y"] = A.load.Int32(pairs + 48 + 0 + 4);
  1714              }
  1715            }
  1716            if (A.load.Bool(pairs + 48 + 12 + 10)) {
  1717              pairs_ffi["pair3"]["touchPoint"] = {};
  1718              if (A.load.Bool(pairs + 48 + 12 + 8)) {
  1719                pairs_ffi["pair3"]["touchPoint"]["x"] = A.load.Int32(pairs + 48 + 12 + 0);
  1720              }
  1721              if (A.load.Bool(pairs + 48 + 12 + 9)) {
  1722                pairs_ffi["pair3"]["touchPoint"]["y"] = A.load.Int32(pairs + 48 + 12 + 4);
  1723              }
  1724            }
  1725          }
  1726          if (A.load.Bool(pairs + 72 + 23)) {
  1727            pairs_ffi["pair4"] = {};
  1728            if (A.load.Bool(pairs + 72 + 0 + 10)) {
  1729              pairs_ffi["pair4"]["displayPoint"] = {};
  1730              if (A.load.Bool(pairs + 72 + 0 + 8)) {
  1731                pairs_ffi["pair4"]["displayPoint"]["x"] = A.load.Int32(pairs + 72 + 0 + 0);
  1732              }
  1733              if (A.load.Bool(pairs + 72 + 0 + 9)) {
  1734                pairs_ffi["pair4"]["displayPoint"]["y"] = A.load.Int32(pairs + 72 + 0 + 4);
  1735              }
  1736            }
  1737            if (A.load.Bool(pairs + 72 + 12 + 10)) {
  1738              pairs_ffi["pair4"]["touchPoint"] = {};
  1739              if (A.load.Bool(pairs + 72 + 12 + 8)) {
  1740                pairs_ffi["pair4"]["touchPoint"]["x"] = A.load.Int32(pairs + 72 + 12 + 0);
  1741              }
  1742              if (A.load.Bool(pairs + 72 + 12 + 9)) {
  1743                pairs_ffi["pair4"]["touchPoint"]["y"] = A.load.Int32(pairs + 72 + 12 + 4);
  1744              }
  1745            }
  1746          }
  1747  
  1748          const bounds_ffi = {};
  1749  
  1750          if (A.load.Bool(bounds + 16)) {
  1751            bounds_ffi["left"] = A.load.Int32(bounds + 0);
  1752          }
  1753          if (A.load.Bool(bounds + 17)) {
  1754            bounds_ffi["top"] = A.load.Int32(bounds + 4);
  1755          }
  1756          if (A.load.Bool(bounds + 18)) {
  1757            bounds_ffi["width"] = A.load.Int32(bounds + 8);
  1758          }
  1759          if (A.load.Bool(bounds + 19)) {
  1760            bounds_ffi["height"] = A.load.Int32(bounds + 12);
  1761          }
  1762  
  1763          const _ret = WEBEXT.system.display.completeCustomTouchCalibration(pairs_ffi, bounds_ffi);
  1764          return A.H.TRUE;
  1765        } catch (err: any) {
  1766          A.store.Ref(errPtr, err);
  1767          return A.H.FALSE;
  1768        }
  1769      },
  1770      "has_EnableUnifiedDesktop": (): heap.Ref<boolean> => {
  1771        if (WEBEXT?.system?.display && "enableUnifiedDesktop" in WEBEXT?.system?.display) {
  1772          return A.H.TRUE;
  1773        }
  1774        return A.H.FALSE;
  1775      },
  1776      "func_EnableUnifiedDesktop": (fn: Pointer): void => {
  1777        A.store.Ref(fn, WEBEXT.system.display.enableUnifiedDesktop);
  1778      },
  1779      "call_EnableUnifiedDesktop": (retPtr: Pointer, enabled: heap.Ref<boolean>): void => {
  1780        const _ret = WEBEXT.system.display.enableUnifiedDesktop(enabled === A.H.TRUE);
  1781      },
  1782      "try_EnableUnifiedDesktop": (retPtr: Pointer, errPtr: Pointer, enabled: heap.Ref<boolean>): heap.Ref<boolean> => {
  1783        try {
  1784          const _ret = WEBEXT.system.display.enableUnifiedDesktop(enabled === A.H.TRUE);
  1785          return A.H.TRUE;
  1786        } catch (err: any) {
  1787          A.store.Ref(errPtr, err);
  1788          return A.H.FALSE;
  1789        }
  1790      },
  1791      "has_GetDisplayLayout": (): heap.Ref<boolean> => {
  1792        if (WEBEXT?.system?.display && "getDisplayLayout" in WEBEXT?.system?.display) {
  1793          return A.H.TRUE;
  1794        }
  1795        return A.H.FALSE;
  1796      },
  1797      "func_GetDisplayLayout": (fn: Pointer): void => {
  1798        A.store.Ref(fn, WEBEXT.system.display.getDisplayLayout);
  1799      },
  1800      "call_GetDisplayLayout": (retPtr: Pointer): void => {
  1801        const _ret = WEBEXT.system.display.getDisplayLayout();
  1802        A.store.Ref(retPtr, _ret);
  1803      },
  1804      "try_GetDisplayLayout": (retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => {
  1805        try {
  1806          const _ret = WEBEXT.system.display.getDisplayLayout();
  1807          A.store.Ref(retPtr, _ret);
  1808          return A.H.TRUE;
  1809        } catch (err: any) {
  1810          A.store.Ref(errPtr, err);
  1811          return A.H.FALSE;
  1812        }
  1813      },
  1814      "has_GetInfo": (): heap.Ref<boolean> => {
  1815        if (WEBEXT?.system?.display && "getInfo" in WEBEXT?.system?.display) {
  1816          return A.H.TRUE;
  1817        }
  1818        return A.H.FALSE;
  1819      },
  1820      "func_GetInfo": (fn: Pointer): void => {
  1821        A.store.Ref(fn, WEBEXT.system.display.getInfo);
  1822      },
  1823      "call_GetInfo": (retPtr: Pointer, flags: Pointer): void => {
  1824        const flags_ffi = {};
  1825  
  1826        if (A.load.Bool(flags + 1)) {
  1827          flags_ffi["singleUnified"] = A.load.Bool(flags + 0);
  1828        }
  1829  
  1830        const _ret = WEBEXT.system.display.getInfo(flags_ffi);
  1831        A.store.Ref(retPtr, _ret);
  1832      },
  1833      "try_GetInfo": (retPtr: Pointer, errPtr: Pointer, flags: Pointer): heap.Ref<boolean> => {
  1834        try {
  1835          const flags_ffi = {};
  1836  
  1837          if (A.load.Bool(flags + 1)) {
  1838            flags_ffi["singleUnified"] = A.load.Bool(flags + 0);
  1839          }
  1840  
  1841          const _ret = WEBEXT.system.display.getInfo(flags_ffi);
  1842          A.store.Ref(retPtr, _ret);
  1843          return A.H.TRUE;
  1844        } catch (err: any) {
  1845          A.store.Ref(errPtr, err);
  1846          return A.H.FALSE;
  1847        }
  1848      },
  1849      "has_OnDisplayChanged": (): heap.Ref<boolean> => {
  1850        if (WEBEXT?.system?.display?.onDisplayChanged && "addListener" in WEBEXT?.system?.display?.onDisplayChanged) {
  1851          return A.H.TRUE;
  1852        }
  1853        return A.H.FALSE;
  1854      },
  1855      "func_OnDisplayChanged": (fn: Pointer): void => {
  1856        A.store.Ref(fn, WEBEXT.system.display.onDisplayChanged.addListener);
  1857      },
  1858      "call_OnDisplayChanged": (retPtr: Pointer, callback: heap.Ref<object>): void => {
  1859        const _ret = WEBEXT.system.display.onDisplayChanged.addListener(A.H.get<object>(callback));
  1860      },
  1861      "try_OnDisplayChanged": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
  1862        try {
  1863          const _ret = WEBEXT.system.display.onDisplayChanged.addListener(A.H.get<object>(callback));
  1864          return A.H.TRUE;
  1865        } catch (err: any) {
  1866          A.store.Ref(errPtr, err);
  1867          return A.H.FALSE;
  1868        }
  1869      },
  1870      "has_OffDisplayChanged": (): heap.Ref<boolean> => {
  1871        if (WEBEXT?.system?.display?.onDisplayChanged && "removeListener" in WEBEXT?.system?.display?.onDisplayChanged) {
  1872          return A.H.TRUE;
  1873        }
  1874        return A.H.FALSE;
  1875      },
  1876      "func_OffDisplayChanged": (fn: Pointer): void => {
  1877        A.store.Ref(fn, WEBEXT.system.display.onDisplayChanged.removeListener);
  1878      },
  1879      "call_OffDisplayChanged": (retPtr: Pointer, callback: heap.Ref<object>): void => {
  1880        const _ret = WEBEXT.system.display.onDisplayChanged.removeListener(A.H.get<object>(callback));
  1881      },
  1882      "try_OffDisplayChanged": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
  1883        try {
  1884          const _ret = WEBEXT.system.display.onDisplayChanged.removeListener(A.H.get<object>(callback));
  1885          return A.H.TRUE;
  1886        } catch (err: any) {
  1887          A.store.Ref(errPtr, err);
  1888          return A.H.FALSE;
  1889        }
  1890      },
  1891      "has_HasOnDisplayChanged": (): heap.Ref<boolean> => {
  1892        if (WEBEXT?.system?.display?.onDisplayChanged && "hasListener" in WEBEXT?.system?.display?.onDisplayChanged) {
  1893          return A.H.TRUE;
  1894        }
  1895        return A.H.FALSE;
  1896      },
  1897      "func_HasOnDisplayChanged": (fn: Pointer): void => {
  1898        A.store.Ref(fn, WEBEXT.system.display.onDisplayChanged.hasListener);
  1899      },
  1900      "call_HasOnDisplayChanged": (retPtr: Pointer, callback: heap.Ref<object>): void => {
  1901        const _ret = WEBEXT.system.display.onDisplayChanged.hasListener(A.H.get<object>(callback));
  1902        A.store.Bool(retPtr, _ret);
  1903      },
  1904      "try_HasOnDisplayChanged": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
  1905        try {
  1906          const _ret = WEBEXT.system.display.onDisplayChanged.hasListener(A.H.get<object>(callback));
  1907          A.store.Bool(retPtr, _ret);
  1908          return A.H.TRUE;
  1909        } catch (err: any) {
  1910          A.store.Ref(errPtr, err);
  1911          return A.H.FALSE;
  1912        }
  1913      },
  1914      "has_OverscanCalibrationAdjust": (): heap.Ref<boolean> => {
  1915        if (WEBEXT?.system?.display && "overscanCalibrationAdjust" in WEBEXT?.system?.display) {
  1916          return A.H.TRUE;
  1917        }
  1918        return A.H.FALSE;
  1919      },
  1920      "func_OverscanCalibrationAdjust": (fn: Pointer): void => {
  1921        A.store.Ref(fn, WEBEXT.system.display.overscanCalibrationAdjust);
  1922      },
  1923      "call_OverscanCalibrationAdjust": (retPtr: Pointer, id: heap.Ref<object>, delta: Pointer): void => {
  1924        const delta_ffi = {};
  1925  
  1926        if (A.load.Bool(delta + 16)) {
  1927          delta_ffi["left"] = A.load.Int32(delta + 0);
  1928        }
  1929        if (A.load.Bool(delta + 17)) {
  1930          delta_ffi["top"] = A.load.Int32(delta + 4);
  1931        }
  1932        if (A.load.Bool(delta + 18)) {
  1933          delta_ffi["right"] = A.load.Int32(delta + 8);
  1934        }
  1935        if (A.load.Bool(delta + 19)) {
  1936          delta_ffi["bottom"] = A.load.Int32(delta + 12);
  1937        }
  1938  
  1939        const _ret = WEBEXT.system.display.overscanCalibrationAdjust(A.H.get<object>(id), delta_ffi);
  1940      },
  1941      "try_OverscanCalibrationAdjust": (
  1942        retPtr: Pointer,
  1943        errPtr: Pointer,
  1944        id: heap.Ref<object>,
  1945        delta: Pointer
  1946      ): heap.Ref<boolean> => {
  1947        try {
  1948          const delta_ffi = {};
  1949  
  1950          if (A.load.Bool(delta + 16)) {
  1951            delta_ffi["left"] = A.load.Int32(delta + 0);
  1952          }
  1953          if (A.load.Bool(delta + 17)) {
  1954            delta_ffi["top"] = A.load.Int32(delta + 4);
  1955          }
  1956          if (A.load.Bool(delta + 18)) {
  1957            delta_ffi["right"] = A.load.Int32(delta + 8);
  1958          }
  1959          if (A.load.Bool(delta + 19)) {
  1960            delta_ffi["bottom"] = A.load.Int32(delta + 12);
  1961          }
  1962  
  1963          const _ret = WEBEXT.system.display.overscanCalibrationAdjust(A.H.get<object>(id), delta_ffi);
  1964          return A.H.TRUE;
  1965        } catch (err: any) {
  1966          A.store.Ref(errPtr, err);
  1967          return A.H.FALSE;
  1968        }
  1969      },
  1970      "has_OverscanCalibrationComplete": (): heap.Ref<boolean> => {
  1971        if (WEBEXT?.system?.display && "overscanCalibrationComplete" in WEBEXT?.system?.display) {
  1972          return A.H.TRUE;
  1973        }
  1974        return A.H.FALSE;
  1975      },
  1976      "func_OverscanCalibrationComplete": (fn: Pointer): void => {
  1977        A.store.Ref(fn, WEBEXT.system.display.overscanCalibrationComplete);
  1978      },
  1979      "call_OverscanCalibrationComplete": (retPtr: Pointer, id: heap.Ref<object>): void => {
  1980        const _ret = WEBEXT.system.display.overscanCalibrationComplete(A.H.get<object>(id));
  1981      },
  1982      "try_OverscanCalibrationComplete": (retPtr: Pointer, errPtr: Pointer, id: heap.Ref<object>): heap.Ref<boolean> => {
  1983        try {
  1984          const _ret = WEBEXT.system.display.overscanCalibrationComplete(A.H.get<object>(id));
  1985          return A.H.TRUE;
  1986        } catch (err: any) {
  1987          A.store.Ref(errPtr, err);
  1988          return A.H.FALSE;
  1989        }
  1990      },
  1991      "has_OverscanCalibrationReset": (): heap.Ref<boolean> => {
  1992        if (WEBEXT?.system?.display && "overscanCalibrationReset" in WEBEXT?.system?.display) {
  1993          return A.H.TRUE;
  1994        }
  1995        return A.H.FALSE;
  1996      },
  1997      "func_OverscanCalibrationReset": (fn: Pointer): void => {
  1998        A.store.Ref(fn, WEBEXT.system.display.overscanCalibrationReset);
  1999      },
  2000      "call_OverscanCalibrationReset": (retPtr: Pointer, id: heap.Ref<object>): void => {
  2001        const _ret = WEBEXT.system.display.overscanCalibrationReset(A.H.get<object>(id));
  2002      },
  2003      "try_OverscanCalibrationReset": (retPtr: Pointer, errPtr: Pointer, id: heap.Ref<object>): heap.Ref<boolean> => {
  2004        try {
  2005          const _ret = WEBEXT.system.display.overscanCalibrationReset(A.H.get<object>(id));
  2006          return A.H.TRUE;
  2007        } catch (err: any) {
  2008          A.store.Ref(errPtr, err);
  2009          return A.H.FALSE;
  2010        }
  2011      },
  2012      "has_OverscanCalibrationStart": (): heap.Ref<boolean> => {
  2013        if (WEBEXT?.system?.display && "overscanCalibrationStart" in WEBEXT?.system?.display) {
  2014          return A.H.TRUE;
  2015        }
  2016        return A.H.FALSE;
  2017      },
  2018      "func_OverscanCalibrationStart": (fn: Pointer): void => {
  2019        A.store.Ref(fn, WEBEXT.system.display.overscanCalibrationStart);
  2020      },
  2021      "call_OverscanCalibrationStart": (retPtr: Pointer, id: heap.Ref<object>): void => {
  2022        const _ret = WEBEXT.system.display.overscanCalibrationStart(A.H.get<object>(id));
  2023      },
  2024      "try_OverscanCalibrationStart": (retPtr: Pointer, errPtr: Pointer, id: heap.Ref<object>): heap.Ref<boolean> => {
  2025        try {
  2026          const _ret = WEBEXT.system.display.overscanCalibrationStart(A.H.get<object>(id));
  2027          return A.H.TRUE;
  2028        } catch (err: any) {
  2029          A.store.Ref(errPtr, err);
  2030          return A.H.FALSE;
  2031        }
  2032      },
  2033      "has_SetDisplayLayout": (): heap.Ref<boolean> => {
  2034        if (WEBEXT?.system?.display && "setDisplayLayout" in WEBEXT?.system?.display) {
  2035          return A.H.TRUE;
  2036        }
  2037        return A.H.FALSE;
  2038      },
  2039      "func_SetDisplayLayout": (fn: Pointer): void => {
  2040        A.store.Ref(fn, WEBEXT.system.display.setDisplayLayout);
  2041      },
  2042      "call_SetDisplayLayout": (retPtr: Pointer, layouts: heap.Ref<object>): void => {
  2043        const _ret = WEBEXT.system.display.setDisplayLayout(A.H.get<object>(layouts));
  2044        A.store.Ref(retPtr, _ret);
  2045      },
  2046      "try_SetDisplayLayout": (retPtr: Pointer, errPtr: Pointer, layouts: heap.Ref<object>): heap.Ref<boolean> => {
  2047        try {
  2048          const _ret = WEBEXT.system.display.setDisplayLayout(A.H.get<object>(layouts));
  2049          A.store.Ref(retPtr, _ret);
  2050          return A.H.TRUE;
  2051        } catch (err: any) {
  2052          A.store.Ref(errPtr, err);
  2053          return A.H.FALSE;
  2054        }
  2055      },
  2056      "has_SetDisplayProperties": (): heap.Ref<boolean> => {
  2057        if (WEBEXT?.system?.display && "setDisplayProperties" in WEBEXT?.system?.display) {
  2058          return A.H.TRUE;
  2059        }
  2060        return A.H.FALSE;
  2061      },
  2062      "func_SetDisplayProperties": (fn: Pointer): void => {
  2063        A.store.Ref(fn, WEBEXT.system.display.setDisplayProperties);
  2064      },
  2065      "call_SetDisplayProperties": (retPtr: Pointer, id: heap.Ref<object>, info: Pointer): void => {
  2066        const info_ffi = {};
  2067  
  2068        if (A.load.Bool(info + 112)) {
  2069          info_ffi["isUnified"] = A.load.Bool(info + 0);
  2070        }
  2071        info_ffi["mirroringSourceId"] = A.load.Ref(info + 4, undefined);
  2072        if (A.load.Bool(info + 113)) {
  2073          info_ffi["isPrimary"] = A.load.Bool(info + 8);
  2074        }
  2075        if (A.load.Bool(info + 12 + 20)) {
  2076          info_ffi["overscan"] = {};
  2077          if (A.load.Bool(info + 12 + 16)) {
  2078            info_ffi["overscan"]["left"] = A.load.Int32(info + 12 + 0);
  2079          }
  2080          if (A.load.Bool(info + 12 + 17)) {
  2081            info_ffi["overscan"]["top"] = A.load.Int32(info + 12 + 4);
  2082          }
  2083          if (A.load.Bool(info + 12 + 18)) {
  2084            info_ffi["overscan"]["right"] = A.load.Int32(info + 12 + 8);
  2085          }
  2086          if (A.load.Bool(info + 12 + 19)) {
  2087            info_ffi["overscan"]["bottom"] = A.load.Int32(info + 12 + 12);
  2088          }
  2089        }
  2090        if (A.load.Bool(info + 114)) {
  2091          info_ffi["rotation"] = A.load.Int32(info + 36);
  2092        }
  2093        if (A.load.Bool(info + 115)) {
  2094          info_ffi["boundsOriginX"] = A.load.Int32(info + 40);
  2095        }
  2096        if (A.load.Bool(info + 116)) {
  2097          info_ffi["boundsOriginY"] = A.load.Int32(info + 44);
  2098        }
  2099        if (A.load.Bool(info + 48 + 53)) {
  2100          info_ffi["displayMode"] = {};
  2101          if (A.load.Bool(info + 48 + 43)) {
  2102            info_ffi["displayMode"]["width"] = A.load.Int32(info + 48 + 0);
  2103          }
  2104          if (A.load.Bool(info + 48 + 44)) {
  2105            info_ffi["displayMode"]["height"] = A.load.Int32(info + 48 + 4);
  2106          }
  2107          if (A.load.Bool(info + 48 + 45)) {
  2108            info_ffi["displayMode"]["widthInNativePixels"] = A.load.Int32(info + 48 + 8);
  2109          }
  2110          if (A.load.Bool(info + 48 + 46)) {
  2111            info_ffi["displayMode"]["heightInNativePixels"] = A.load.Int32(info + 48 + 12);
  2112          }
  2113          if (A.load.Bool(info + 48 + 47)) {
  2114            info_ffi["displayMode"]["uiScale"] = A.load.Float64(info + 48 + 16);
  2115          }
  2116          if (A.load.Bool(info + 48 + 48)) {
  2117            info_ffi["displayMode"]["deviceScaleFactor"] = A.load.Float64(info + 48 + 24);
  2118          }
  2119          if (A.load.Bool(info + 48 + 49)) {
  2120            info_ffi["displayMode"]["refreshRate"] = A.load.Float64(info + 48 + 32);
  2121          }
  2122          if (A.load.Bool(info + 48 + 50)) {
  2123            info_ffi["displayMode"]["isNative"] = A.load.Bool(info + 48 + 40);
  2124          }
  2125          if (A.load.Bool(info + 48 + 51)) {
  2126            info_ffi["displayMode"]["isSelected"] = A.load.Bool(info + 48 + 41);
  2127          }
  2128          if (A.load.Bool(info + 48 + 52)) {
  2129            info_ffi["displayMode"]["isInterlaced"] = A.load.Bool(info + 48 + 42);
  2130          }
  2131        }
  2132        if (A.load.Bool(info + 117)) {
  2133          info_ffi["displayZoomFactor"] = A.load.Float64(info + 104);
  2134        }
  2135  
  2136        const _ret = WEBEXT.system.display.setDisplayProperties(A.H.get<object>(id), info_ffi);
  2137        A.store.Ref(retPtr, _ret);
  2138      },
  2139      "try_SetDisplayProperties": (
  2140        retPtr: Pointer,
  2141        errPtr: Pointer,
  2142        id: heap.Ref<object>,
  2143        info: Pointer
  2144      ): heap.Ref<boolean> => {
  2145        try {
  2146          const info_ffi = {};
  2147  
  2148          if (A.load.Bool(info + 112)) {
  2149            info_ffi["isUnified"] = A.load.Bool(info + 0);
  2150          }
  2151          info_ffi["mirroringSourceId"] = A.load.Ref(info + 4, undefined);
  2152          if (A.load.Bool(info + 113)) {
  2153            info_ffi["isPrimary"] = A.load.Bool(info + 8);
  2154          }
  2155          if (A.load.Bool(info + 12 + 20)) {
  2156            info_ffi["overscan"] = {};
  2157            if (A.load.Bool(info + 12 + 16)) {
  2158              info_ffi["overscan"]["left"] = A.load.Int32(info + 12 + 0);
  2159            }
  2160            if (A.load.Bool(info + 12 + 17)) {
  2161              info_ffi["overscan"]["top"] = A.load.Int32(info + 12 + 4);
  2162            }
  2163            if (A.load.Bool(info + 12 + 18)) {
  2164              info_ffi["overscan"]["right"] = A.load.Int32(info + 12 + 8);
  2165            }
  2166            if (A.load.Bool(info + 12 + 19)) {
  2167              info_ffi["overscan"]["bottom"] = A.load.Int32(info + 12 + 12);
  2168            }
  2169          }
  2170          if (A.load.Bool(info + 114)) {
  2171            info_ffi["rotation"] = A.load.Int32(info + 36);
  2172          }
  2173          if (A.load.Bool(info + 115)) {
  2174            info_ffi["boundsOriginX"] = A.load.Int32(info + 40);
  2175          }
  2176          if (A.load.Bool(info + 116)) {
  2177            info_ffi["boundsOriginY"] = A.load.Int32(info + 44);
  2178          }
  2179          if (A.load.Bool(info + 48 + 53)) {
  2180            info_ffi["displayMode"] = {};
  2181            if (A.load.Bool(info + 48 + 43)) {
  2182              info_ffi["displayMode"]["width"] = A.load.Int32(info + 48 + 0);
  2183            }
  2184            if (A.load.Bool(info + 48 + 44)) {
  2185              info_ffi["displayMode"]["height"] = A.load.Int32(info + 48 + 4);
  2186            }
  2187            if (A.load.Bool(info + 48 + 45)) {
  2188              info_ffi["displayMode"]["widthInNativePixels"] = A.load.Int32(info + 48 + 8);
  2189            }
  2190            if (A.load.Bool(info + 48 + 46)) {
  2191              info_ffi["displayMode"]["heightInNativePixels"] = A.load.Int32(info + 48 + 12);
  2192            }
  2193            if (A.load.Bool(info + 48 + 47)) {
  2194              info_ffi["displayMode"]["uiScale"] = A.load.Float64(info + 48 + 16);
  2195            }
  2196            if (A.load.Bool(info + 48 + 48)) {
  2197              info_ffi["displayMode"]["deviceScaleFactor"] = A.load.Float64(info + 48 + 24);
  2198            }
  2199            if (A.load.Bool(info + 48 + 49)) {
  2200              info_ffi["displayMode"]["refreshRate"] = A.load.Float64(info + 48 + 32);
  2201            }
  2202            if (A.load.Bool(info + 48 + 50)) {
  2203              info_ffi["displayMode"]["isNative"] = A.load.Bool(info + 48 + 40);
  2204            }
  2205            if (A.load.Bool(info + 48 + 51)) {
  2206              info_ffi["displayMode"]["isSelected"] = A.load.Bool(info + 48 + 41);
  2207            }
  2208            if (A.load.Bool(info + 48 + 52)) {
  2209              info_ffi["displayMode"]["isInterlaced"] = A.load.Bool(info + 48 + 42);
  2210            }
  2211          }
  2212          if (A.load.Bool(info + 117)) {
  2213            info_ffi["displayZoomFactor"] = A.load.Float64(info + 104);
  2214          }
  2215  
  2216          const _ret = WEBEXT.system.display.setDisplayProperties(A.H.get<object>(id), info_ffi);
  2217          A.store.Ref(retPtr, _ret);
  2218          return A.H.TRUE;
  2219        } catch (err: any) {
  2220          A.store.Ref(errPtr, err);
  2221          return A.H.FALSE;
  2222        }
  2223      },
  2224      "has_SetMirrorMode": (): heap.Ref<boolean> => {
  2225        if (WEBEXT?.system?.display && "setMirrorMode" in WEBEXT?.system?.display) {
  2226          return A.H.TRUE;
  2227        }
  2228        return A.H.FALSE;
  2229      },
  2230      "func_SetMirrorMode": (fn: Pointer): void => {
  2231        A.store.Ref(fn, WEBEXT.system.display.setMirrorMode);
  2232      },
  2233      "call_SetMirrorMode": (retPtr: Pointer, info: Pointer): void => {
  2234        const info_ffi = {};
  2235  
  2236        info_ffi["mode"] = A.load.Enum(info + 0, ["off", "normal", "mixed"]);
  2237        info_ffi["mirroringSourceId"] = A.load.Ref(info + 4, undefined);
  2238        info_ffi["mirroringDestinationIds"] = A.load.Ref(info + 8, undefined);
  2239  
  2240        const _ret = WEBEXT.system.display.setMirrorMode(info_ffi);
  2241        A.store.Ref(retPtr, _ret);
  2242      },
  2243      "try_SetMirrorMode": (retPtr: Pointer, errPtr: Pointer, info: Pointer): heap.Ref<boolean> => {
  2244        try {
  2245          const info_ffi = {};
  2246  
  2247          info_ffi["mode"] = A.load.Enum(info + 0, ["off", "normal", "mixed"]);
  2248          info_ffi["mirroringSourceId"] = A.load.Ref(info + 4, undefined);
  2249          info_ffi["mirroringDestinationIds"] = A.load.Ref(info + 8, undefined);
  2250  
  2251          const _ret = WEBEXT.system.display.setMirrorMode(info_ffi);
  2252          A.store.Ref(retPtr, _ret);
  2253          return A.H.TRUE;
  2254        } catch (err: any) {
  2255          A.store.Ref(errPtr, err);
  2256          return A.H.FALSE;
  2257        }
  2258      },
  2259      "has_ShowNativeTouchCalibration": (): heap.Ref<boolean> => {
  2260        if (WEBEXT?.system?.display && "showNativeTouchCalibration" in WEBEXT?.system?.display) {
  2261          return A.H.TRUE;
  2262        }
  2263        return A.H.FALSE;
  2264      },
  2265      "func_ShowNativeTouchCalibration": (fn: Pointer): void => {
  2266        A.store.Ref(fn, WEBEXT.system.display.showNativeTouchCalibration);
  2267      },
  2268      "call_ShowNativeTouchCalibration": (retPtr: Pointer, id: heap.Ref<object>): void => {
  2269        const _ret = WEBEXT.system.display.showNativeTouchCalibration(A.H.get<object>(id));
  2270        A.store.Ref(retPtr, _ret);
  2271      },
  2272      "try_ShowNativeTouchCalibration": (retPtr: Pointer, errPtr: Pointer, id: heap.Ref<object>): heap.Ref<boolean> => {
  2273        try {
  2274          const _ret = WEBEXT.system.display.showNativeTouchCalibration(A.H.get<object>(id));
  2275          A.store.Ref(retPtr, _ret);
  2276          return A.H.TRUE;
  2277        } catch (err: any) {
  2278          A.store.Ref(errPtr, err);
  2279          return A.H.FALSE;
  2280        }
  2281      },
  2282      "has_StartCustomTouchCalibration": (): heap.Ref<boolean> => {
  2283        if (WEBEXT?.system?.display && "startCustomTouchCalibration" in WEBEXT?.system?.display) {
  2284          return A.H.TRUE;
  2285        }
  2286        return A.H.FALSE;
  2287      },
  2288      "func_StartCustomTouchCalibration": (fn: Pointer): void => {
  2289        A.store.Ref(fn, WEBEXT.system.display.startCustomTouchCalibration);
  2290      },
  2291      "call_StartCustomTouchCalibration": (retPtr: Pointer, id: heap.Ref<object>): void => {
  2292        const _ret = WEBEXT.system.display.startCustomTouchCalibration(A.H.get<object>(id));
  2293      },
  2294      "try_StartCustomTouchCalibration": (retPtr: Pointer, errPtr: Pointer, id: heap.Ref<object>): heap.Ref<boolean> => {
  2295        try {
  2296          const _ret = WEBEXT.system.display.startCustomTouchCalibration(A.H.get<object>(id));
  2297          return A.H.TRUE;
  2298        } catch (err: any) {
  2299          A.store.Ref(errPtr, err);
  2300          return A.H.FALSE;
  2301        }
  2302      },
  2303    };
  2304  });