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

     1  import { importModule, Application, heap, Pointer } from "@ffi";
     2  
     3  importModule("plat/js/webext/app/window", (A: Application) => {
     4    const WEBEXT = typeof globalThis.browser === "undefined" ? globalThis.chrome : globalThis.browser;
     5  
     6    return {
     7      "store_ContentBounds": (ptr: Pointer, ref: heap.Ref<any>) => {
     8        const x = A.H.get<any>(ref);
     9  
    10        if (typeof x === "undefined") {
    11          A.store.Bool(ptr + 20, false);
    12          A.store.Bool(ptr + 16, false);
    13          A.store.Int32(ptr + 0, 0);
    14          A.store.Bool(ptr + 17, false);
    15          A.store.Int32(ptr + 4, 0);
    16          A.store.Bool(ptr + 18, false);
    17          A.store.Int32(ptr + 8, 0);
    18          A.store.Bool(ptr + 19, false);
    19          A.store.Int32(ptr + 12, 0);
    20        } else {
    21          A.store.Bool(ptr + 20, true);
    22          A.store.Bool(ptr + 16, "left" in x ? true : false);
    23          A.store.Int32(ptr + 0, x["left"] === undefined ? 0 : (x["left"] as number));
    24          A.store.Bool(ptr + 17, "top" in x ? true : false);
    25          A.store.Int32(ptr + 4, x["top"] === undefined ? 0 : (x["top"] as number));
    26          A.store.Bool(ptr + 18, "width" in x ? true : false);
    27          A.store.Int32(ptr + 8, x["width"] === undefined ? 0 : (x["width"] as number));
    28          A.store.Bool(ptr + 19, "height" in x ? true : false);
    29          A.store.Int32(ptr + 12, x["height"] === undefined ? 0 : (x["height"] as number));
    30        }
    31      },
    32      "load_ContentBounds": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => {
    33        const x = create === A.H.TRUE ? {} : A.H.get<any>(ref);
    34  
    35        if (A.load.Bool(ptr + 16)) {
    36          x["left"] = A.load.Int32(ptr + 0);
    37        } else {
    38          delete x["left"];
    39        }
    40        if (A.load.Bool(ptr + 17)) {
    41          x["top"] = A.load.Int32(ptr + 4);
    42        } else {
    43          delete x["top"];
    44        }
    45        if (A.load.Bool(ptr + 18)) {
    46          x["width"] = A.load.Int32(ptr + 8);
    47        } else {
    48          delete x["width"];
    49        }
    50        if (A.load.Bool(ptr + 19)) {
    51          x["height"] = A.load.Int32(ptr + 12);
    52        } else {
    53          delete x["height"];
    54        }
    55        return create === A.H.TRUE ? A.H.push(x) : ref;
    56      },
    57  
    58      "has_Bounds_SetPosition": (self: heap.Ref<any>): heap.Ref<boolean> => {
    59        const obj = A.H.get<object>(self);
    60        if (obj && "setPosition" in obj) {
    61          return A.H.TRUE;
    62        }
    63        return A.H.FALSE;
    64      },
    65      "func_Bounds_SetPosition": (self: heap.Ref<any>, fn: Pointer): void => {
    66        A.store.Ref(fn, A.H.get<any>(self).setPosition);
    67      },
    68  
    69      "call_Bounds_SetPosition": (self: heap.Ref<object>, retPtr: Pointer, left: number, top: number): void => {
    70        const thiz = A.H.get<any>(self);
    71  
    72        const _ret = thiz.setPosition(left, top);
    73      },
    74      "try_Bounds_SetPosition": (
    75        self: heap.Ref<object>,
    76        retPtr: Pointer,
    77        errPtr: Pointer,
    78        left: number,
    79        top: number
    80      ): heap.Ref<boolean> => {
    81        try {
    82          const thiz = A.H.get<any>(self);
    83  
    84          const _ret = thiz.setPosition(left, top);
    85          return A.H.TRUE;
    86        } catch (err: any) {
    87          A.store.Ref(errPtr, err);
    88          return A.H.FALSE;
    89        }
    90      },
    91      "has_Bounds_SetSize": (self: heap.Ref<any>): heap.Ref<boolean> => {
    92        const obj = A.H.get<object>(self);
    93        if (obj && "setSize" in obj) {
    94          return A.H.TRUE;
    95        }
    96        return A.H.FALSE;
    97      },
    98      "func_Bounds_SetSize": (self: heap.Ref<any>, fn: Pointer): void => {
    99        A.store.Ref(fn, A.H.get<any>(self).setSize);
   100      },
   101  
   102      "call_Bounds_SetSize": (self: heap.Ref<object>, retPtr: Pointer, width: number, height: number): void => {
   103        const thiz = A.H.get<any>(self);
   104  
   105        const _ret = thiz.setSize(width, height);
   106      },
   107      "try_Bounds_SetSize": (
   108        self: heap.Ref<object>,
   109        retPtr: Pointer,
   110        errPtr: Pointer,
   111        width: number,
   112        height: number
   113      ): heap.Ref<boolean> => {
   114        try {
   115          const thiz = A.H.get<any>(self);
   116  
   117          const _ret = thiz.setSize(width, height);
   118          return A.H.TRUE;
   119        } catch (err: any) {
   120          A.store.Ref(errPtr, err);
   121          return A.H.FALSE;
   122        }
   123      },
   124      "has_Bounds_SetMinimumSize": (self: heap.Ref<any>): heap.Ref<boolean> => {
   125        const obj = A.H.get<object>(self);
   126        if (obj && "setMinimumSize" in obj) {
   127          return A.H.TRUE;
   128        }
   129        return A.H.FALSE;
   130      },
   131      "func_Bounds_SetMinimumSize": (self: heap.Ref<any>, fn: Pointer): void => {
   132        A.store.Ref(fn, A.H.get<any>(self).setMinimumSize);
   133      },
   134  
   135      "call_Bounds_SetMinimumSize": (
   136        self: heap.Ref<object>,
   137        retPtr: Pointer,
   138        minWidth: number,
   139        minHeight: number
   140      ): void => {
   141        const thiz = A.H.get<any>(self);
   142  
   143        const _ret = thiz.setMinimumSize(minWidth, minHeight);
   144      },
   145      "try_Bounds_SetMinimumSize": (
   146        self: heap.Ref<object>,
   147        retPtr: Pointer,
   148        errPtr: Pointer,
   149        minWidth: number,
   150        minHeight: number
   151      ): heap.Ref<boolean> => {
   152        try {
   153          const thiz = A.H.get<any>(self);
   154  
   155          const _ret = thiz.setMinimumSize(minWidth, minHeight);
   156          return A.H.TRUE;
   157        } catch (err: any) {
   158          A.store.Ref(errPtr, err);
   159          return A.H.FALSE;
   160        }
   161      },
   162      "has_Bounds_SetMaximumSize": (self: heap.Ref<any>): heap.Ref<boolean> => {
   163        const obj = A.H.get<object>(self);
   164        if (obj && "setMaximumSize" in obj) {
   165          return A.H.TRUE;
   166        }
   167        return A.H.FALSE;
   168      },
   169      "func_Bounds_SetMaximumSize": (self: heap.Ref<any>, fn: Pointer): void => {
   170        A.store.Ref(fn, A.H.get<any>(self).setMaximumSize);
   171      },
   172  
   173      "call_Bounds_SetMaximumSize": (
   174        self: heap.Ref<object>,
   175        retPtr: Pointer,
   176        maxWidth: number,
   177        maxHeight: number
   178      ): void => {
   179        const thiz = A.H.get<any>(self);
   180  
   181        const _ret = thiz.setMaximumSize(maxWidth, maxHeight);
   182      },
   183      "try_Bounds_SetMaximumSize": (
   184        self: heap.Ref<object>,
   185        retPtr: Pointer,
   186        errPtr: Pointer,
   187        maxWidth: number,
   188        maxHeight: number
   189      ): heap.Ref<boolean> => {
   190        try {
   191          const thiz = A.H.get<any>(self);
   192  
   193          const _ret = thiz.setMaximumSize(maxWidth, maxHeight);
   194          return A.H.TRUE;
   195        } catch (err: any) {
   196          A.store.Ref(errPtr, err);
   197          return A.H.FALSE;
   198        }
   199      },
   200      "get_Bounds_Left": (self: heap.Ref<any>, retPtr: Pointer): heap.Ref<boolean> => {
   201        const thiz = A.H.get<object>(self);
   202        if (thiz && "left" in thiz) {
   203          const val = thiz.left;
   204          A.store.Int32(retPtr, val);
   205          return A.H.TRUE;
   206        }
   207  
   208        return A.H.FALSE;
   209      },
   210      "set_Bounds_Left": (self: heap.Ref<object>, val: number): heap.Ref<boolean> => {
   211        const thiz = A.H.get<object>(self);
   212  
   213        return Reflect.set(thiz, "left", val, thiz) ? A.H.TRUE : A.H.FALSE;
   214      },
   215      "get_Bounds_Top": (self: heap.Ref<any>, retPtr: Pointer): heap.Ref<boolean> => {
   216        const thiz = A.H.get<object>(self);
   217        if (thiz && "top" in thiz) {
   218          const val = thiz.top;
   219          A.store.Int32(retPtr, val);
   220          return A.H.TRUE;
   221        }
   222  
   223        return A.H.FALSE;
   224      },
   225      "set_Bounds_Top": (self: heap.Ref<object>, val: number): heap.Ref<boolean> => {
   226        const thiz = A.H.get<object>(self);
   227  
   228        return Reflect.set(thiz, "top", val, thiz) ? A.H.TRUE : A.H.FALSE;
   229      },
   230      "get_Bounds_Width": (self: heap.Ref<any>, retPtr: Pointer): heap.Ref<boolean> => {
   231        const thiz = A.H.get<object>(self);
   232        if (thiz && "width" in thiz) {
   233          const val = thiz.width;
   234          A.store.Int32(retPtr, val);
   235          return A.H.TRUE;
   236        }
   237  
   238        return A.H.FALSE;
   239      },
   240      "set_Bounds_Width": (self: heap.Ref<object>, val: number): heap.Ref<boolean> => {
   241        const thiz = A.H.get<object>(self);
   242  
   243        return Reflect.set(thiz, "width", val, thiz) ? A.H.TRUE : A.H.FALSE;
   244      },
   245      "get_Bounds_Height": (self: heap.Ref<any>, retPtr: Pointer): heap.Ref<boolean> => {
   246        const thiz = A.H.get<object>(self);
   247        if (thiz && "height" in thiz) {
   248          const val = thiz.height;
   249          A.store.Int32(retPtr, val);
   250          return A.H.TRUE;
   251        }
   252  
   253        return A.H.FALSE;
   254      },
   255      "set_Bounds_Height": (self: heap.Ref<object>, val: number): heap.Ref<boolean> => {
   256        const thiz = A.H.get<object>(self);
   257  
   258        return Reflect.set(thiz, "height", val, thiz) ? A.H.TRUE : A.H.FALSE;
   259      },
   260      "get_Bounds_MinWidth": (self: heap.Ref<any>, retPtr: Pointer): heap.Ref<boolean> => {
   261        const thiz = A.H.get<object>(self);
   262        if (thiz && "minWidth" in thiz) {
   263          const val = thiz.minWidth;
   264          A.store.Int32(retPtr, val);
   265          return A.H.TRUE;
   266        }
   267  
   268        return A.H.FALSE;
   269      },
   270      "set_Bounds_MinWidth": (self: heap.Ref<object>, val: number): heap.Ref<boolean> => {
   271        const thiz = A.H.get<object>(self);
   272  
   273        return Reflect.set(thiz, "minWidth", val, thiz) ? A.H.TRUE : A.H.FALSE;
   274      },
   275      "get_Bounds_MinHeight": (self: heap.Ref<any>, retPtr: Pointer): heap.Ref<boolean> => {
   276        const thiz = A.H.get<object>(self);
   277        if (thiz && "minHeight" in thiz) {
   278          const val = thiz.minHeight;
   279          A.store.Int32(retPtr, val);
   280          return A.H.TRUE;
   281        }
   282  
   283        return A.H.FALSE;
   284      },
   285      "set_Bounds_MinHeight": (self: heap.Ref<object>, val: number): heap.Ref<boolean> => {
   286        const thiz = A.H.get<object>(self);
   287  
   288        return Reflect.set(thiz, "minHeight", val, thiz) ? A.H.TRUE : A.H.FALSE;
   289      },
   290      "get_Bounds_MaxWidth": (self: heap.Ref<any>, retPtr: Pointer): heap.Ref<boolean> => {
   291        const thiz = A.H.get<object>(self);
   292        if (thiz && "maxWidth" in thiz) {
   293          const val = thiz.maxWidth;
   294          A.store.Int32(retPtr, val);
   295          return A.H.TRUE;
   296        }
   297  
   298        return A.H.FALSE;
   299      },
   300      "set_Bounds_MaxWidth": (self: heap.Ref<object>, val: number): heap.Ref<boolean> => {
   301        const thiz = A.H.get<object>(self);
   302  
   303        return Reflect.set(thiz, "maxWidth", val, thiz) ? A.H.TRUE : A.H.FALSE;
   304      },
   305      "get_Bounds_MaxHeight": (self: heap.Ref<any>, retPtr: Pointer): heap.Ref<boolean> => {
   306        const thiz = A.H.get<object>(self);
   307        if (thiz && "maxHeight" in thiz) {
   308          const val = thiz.maxHeight;
   309          A.store.Int32(retPtr, val);
   310          return A.H.TRUE;
   311        }
   312  
   313        return A.H.FALSE;
   314      },
   315      "set_Bounds_MaxHeight": (self: heap.Ref<object>, val: number): heap.Ref<boolean> => {
   316        const thiz = A.H.get<object>(self);
   317  
   318        return Reflect.set(thiz, "maxHeight", val, thiz) ? A.H.TRUE : A.H.FALSE;
   319      },
   320  
   321      "has_AppWindow_Focus": (self: heap.Ref<any>): heap.Ref<boolean> => {
   322        const obj = A.H.get<object>(self);
   323        if (obj && "focus" in obj) {
   324          return A.H.TRUE;
   325        }
   326        return A.H.FALSE;
   327      },
   328      "func_AppWindow_Focus": (self: heap.Ref<any>, fn: Pointer): void => {
   329        A.store.Ref(fn, A.H.get<any>(self).focus);
   330      },
   331  
   332      "call_AppWindow_Focus": (self: heap.Ref<object>, retPtr: Pointer): void => {
   333        const thiz = A.H.get<any>(self);
   334  
   335        const _ret = thiz.focus();
   336      },
   337      "try_AppWindow_Focus": (self: heap.Ref<object>, retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => {
   338        try {
   339          const thiz = A.H.get<any>(self);
   340  
   341          const _ret = thiz.focus();
   342          return A.H.TRUE;
   343        } catch (err: any) {
   344          A.store.Ref(errPtr, err);
   345          return A.H.FALSE;
   346        }
   347      },
   348      "has_AppWindow_Fullscreen": (self: heap.Ref<any>): heap.Ref<boolean> => {
   349        const obj = A.H.get<object>(self);
   350        if (obj && "fullscreen" in obj) {
   351          return A.H.TRUE;
   352        }
   353        return A.H.FALSE;
   354      },
   355      "func_AppWindow_Fullscreen": (self: heap.Ref<any>, fn: Pointer): void => {
   356        A.store.Ref(fn, A.H.get<any>(self).fullscreen);
   357      },
   358  
   359      "call_AppWindow_Fullscreen": (self: heap.Ref<object>, retPtr: Pointer): void => {
   360        const thiz = A.H.get<any>(self);
   361  
   362        const _ret = thiz.fullscreen();
   363      },
   364      "try_AppWindow_Fullscreen": (self: heap.Ref<object>, retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => {
   365        try {
   366          const thiz = A.H.get<any>(self);
   367  
   368          const _ret = thiz.fullscreen();
   369          return A.H.TRUE;
   370        } catch (err: any) {
   371          A.store.Ref(errPtr, err);
   372          return A.H.FALSE;
   373        }
   374      },
   375      "has_AppWindow_IsFullscreen": (self: heap.Ref<any>): heap.Ref<boolean> => {
   376        const obj = A.H.get<object>(self);
   377        if (obj && "isFullscreen" in obj) {
   378          return A.H.TRUE;
   379        }
   380        return A.H.FALSE;
   381      },
   382      "func_AppWindow_IsFullscreen": (self: heap.Ref<any>, fn: Pointer): void => {
   383        A.store.Ref(fn, A.H.get<any>(self).isFullscreen);
   384      },
   385  
   386      "call_AppWindow_IsFullscreen": (self: heap.Ref<object>, retPtr: Pointer): void => {
   387        const thiz = A.H.get<any>(self);
   388  
   389        const _ret = thiz.isFullscreen();
   390        A.store.Bool(retPtr, _ret);
   391      },
   392      "try_AppWindow_IsFullscreen": (self: heap.Ref<object>, retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => {
   393        try {
   394          const thiz = A.H.get<any>(self);
   395  
   396          const _ret = thiz.isFullscreen();
   397          A.store.Bool(retPtr, _ret);
   398          return A.H.TRUE;
   399        } catch (err: any) {
   400          A.store.Ref(errPtr, err);
   401          return A.H.FALSE;
   402        }
   403      },
   404      "has_AppWindow_Minimize": (self: heap.Ref<any>): heap.Ref<boolean> => {
   405        const obj = A.H.get<object>(self);
   406        if (obj && "minimize" in obj) {
   407          return A.H.TRUE;
   408        }
   409        return A.H.FALSE;
   410      },
   411      "func_AppWindow_Minimize": (self: heap.Ref<any>, fn: Pointer): void => {
   412        A.store.Ref(fn, A.H.get<any>(self).minimize);
   413      },
   414  
   415      "call_AppWindow_Minimize": (self: heap.Ref<object>, retPtr: Pointer): void => {
   416        const thiz = A.H.get<any>(self);
   417  
   418        const _ret = thiz.minimize();
   419      },
   420      "try_AppWindow_Minimize": (self: heap.Ref<object>, retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => {
   421        try {
   422          const thiz = A.H.get<any>(self);
   423  
   424          const _ret = thiz.minimize();
   425          return A.H.TRUE;
   426        } catch (err: any) {
   427          A.store.Ref(errPtr, err);
   428          return A.H.FALSE;
   429        }
   430      },
   431      "has_AppWindow_IsMinimized": (self: heap.Ref<any>): heap.Ref<boolean> => {
   432        const obj = A.H.get<object>(self);
   433        if (obj && "isMinimized" in obj) {
   434          return A.H.TRUE;
   435        }
   436        return A.H.FALSE;
   437      },
   438      "func_AppWindow_IsMinimized": (self: heap.Ref<any>, fn: Pointer): void => {
   439        A.store.Ref(fn, A.H.get<any>(self).isMinimized);
   440      },
   441  
   442      "call_AppWindow_IsMinimized": (self: heap.Ref<object>, retPtr: Pointer): void => {
   443        const thiz = A.H.get<any>(self);
   444  
   445        const _ret = thiz.isMinimized();
   446        A.store.Bool(retPtr, _ret);
   447      },
   448      "try_AppWindow_IsMinimized": (self: heap.Ref<object>, retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => {
   449        try {
   450          const thiz = A.H.get<any>(self);
   451  
   452          const _ret = thiz.isMinimized();
   453          A.store.Bool(retPtr, _ret);
   454          return A.H.TRUE;
   455        } catch (err: any) {
   456          A.store.Ref(errPtr, err);
   457          return A.H.FALSE;
   458        }
   459      },
   460      "has_AppWindow_Maximize": (self: heap.Ref<any>): heap.Ref<boolean> => {
   461        const obj = A.H.get<object>(self);
   462        if (obj && "maximize" in obj) {
   463          return A.H.TRUE;
   464        }
   465        return A.H.FALSE;
   466      },
   467      "func_AppWindow_Maximize": (self: heap.Ref<any>, fn: Pointer): void => {
   468        A.store.Ref(fn, A.H.get<any>(self).maximize);
   469      },
   470  
   471      "call_AppWindow_Maximize": (self: heap.Ref<object>, retPtr: Pointer): void => {
   472        const thiz = A.H.get<any>(self);
   473  
   474        const _ret = thiz.maximize();
   475      },
   476      "try_AppWindow_Maximize": (self: heap.Ref<object>, retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => {
   477        try {
   478          const thiz = A.H.get<any>(self);
   479  
   480          const _ret = thiz.maximize();
   481          return A.H.TRUE;
   482        } catch (err: any) {
   483          A.store.Ref(errPtr, err);
   484          return A.H.FALSE;
   485        }
   486      },
   487      "has_AppWindow_IsMaximized": (self: heap.Ref<any>): heap.Ref<boolean> => {
   488        const obj = A.H.get<object>(self);
   489        if (obj && "isMaximized" in obj) {
   490          return A.H.TRUE;
   491        }
   492        return A.H.FALSE;
   493      },
   494      "func_AppWindow_IsMaximized": (self: heap.Ref<any>, fn: Pointer): void => {
   495        A.store.Ref(fn, A.H.get<any>(self).isMaximized);
   496      },
   497  
   498      "call_AppWindow_IsMaximized": (self: heap.Ref<object>, retPtr: Pointer): void => {
   499        const thiz = A.H.get<any>(self);
   500  
   501        const _ret = thiz.isMaximized();
   502        A.store.Bool(retPtr, _ret);
   503      },
   504      "try_AppWindow_IsMaximized": (self: heap.Ref<object>, retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => {
   505        try {
   506          const thiz = A.H.get<any>(self);
   507  
   508          const _ret = thiz.isMaximized();
   509          A.store.Bool(retPtr, _ret);
   510          return A.H.TRUE;
   511        } catch (err: any) {
   512          A.store.Ref(errPtr, err);
   513          return A.H.FALSE;
   514        }
   515      },
   516      "has_AppWindow_Restore": (self: heap.Ref<any>): heap.Ref<boolean> => {
   517        const obj = A.H.get<object>(self);
   518        if (obj && "restore" in obj) {
   519          return A.H.TRUE;
   520        }
   521        return A.H.FALSE;
   522      },
   523      "func_AppWindow_Restore": (self: heap.Ref<any>, fn: Pointer): void => {
   524        A.store.Ref(fn, A.H.get<any>(self).restore);
   525      },
   526  
   527      "call_AppWindow_Restore": (self: heap.Ref<object>, retPtr: Pointer): void => {
   528        const thiz = A.H.get<any>(self);
   529  
   530        const _ret = thiz.restore();
   531      },
   532      "try_AppWindow_Restore": (self: heap.Ref<object>, retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => {
   533        try {
   534          const thiz = A.H.get<any>(self);
   535  
   536          const _ret = thiz.restore();
   537          return A.H.TRUE;
   538        } catch (err: any) {
   539          A.store.Ref(errPtr, err);
   540          return A.H.FALSE;
   541        }
   542      },
   543      "has_AppWindow_MoveTo": (self: heap.Ref<any>): heap.Ref<boolean> => {
   544        const obj = A.H.get<object>(self);
   545        if (obj && "moveTo" in obj) {
   546          return A.H.TRUE;
   547        }
   548        return A.H.FALSE;
   549      },
   550      "func_AppWindow_MoveTo": (self: heap.Ref<any>, fn: Pointer): void => {
   551        A.store.Ref(fn, A.H.get<any>(self).moveTo);
   552      },
   553  
   554      "call_AppWindow_MoveTo": (self: heap.Ref<object>, retPtr: Pointer, left: number, top: number): void => {
   555        const thiz = A.H.get<any>(self);
   556  
   557        const _ret = thiz.moveTo(left, top);
   558      },
   559      "try_AppWindow_MoveTo": (
   560        self: heap.Ref<object>,
   561        retPtr: Pointer,
   562        errPtr: Pointer,
   563        left: number,
   564        top: number
   565      ): heap.Ref<boolean> => {
   566        try {
   567          const thiz = A.H.get<any>(self);
   568  
   569          const _ret = thiz.moveTo(left, top);
   570          return A.H.TRUE;
   571        } catch (err: any) {
   572          A.store.Ref(errPtr, err);
   573          return A.H.FALSE;
   574        }
   575      },
   576      "has_AppWindow_ResizeTo": (self: heap.Ref<any>): heap.Ref<boolean> => {
   577        const obj = A.H.get<object>(self);
   578        if (obj && "resizeTo" in obj) {
   579          return A.H.TRUE;
   580        }
   581        return A.H.FALSE;
   582      },
   583      "func_AppWindow_ResizeTo": (self: heap.Ref<any>, fn: Pointer): void => {
   584        A.store.Ref(fn, A.H.get<any>(self).resizeTo);
   585      },
   586  
   587      "call_AppWindow_ResizeTo": (self: heap.Ref<object>, retPtr: Pointer, width: number, height: number): void => {
   588        const thiz = A.H.get<any>(self);
   589  
   590        const _ret = thiz.resizeTo(width, height);
   591      },
   592      "try_AppWindow_ResizeTo": (
   593        self: heap.Ref<object>,
   594        retPtr: Pointer,
   595        errPtr: Pointer,
   596        width: number,
   597        height: number
   598      ): heap.Ref<boolean> => {
   599        try {
   600          const thiz = A.H.get<any>(self);
   601  
   602          const _ret = thiz.resizeTo(width, height);
   603          return A.H.TRUE;
   604        } catch (err: any) {
   605          A.store.Ref(errPtr, err);
   606          return A.H.FALSE;
   607        }
   608      },
   609      "has_AppWindow_DrawAttention": (self: heap.Ref<any>): heap.Ref<boolean> => {
   610        const obj = A.H.get<object>(self);
   611        if (obj && "drawAttention" in obj) {
   612          return A.H.TRUE;
   613        }
   614        return A.H.FALSE;
   615      },
   616      "func_AppWindow_DrawAttention": (self: heap.Ref<any>, fn: Pointer): void => {
   617        A.store.Ref(fn, A.H.get<any>(self).drawAttention);
   618      },
   619  
   620      "call_AppWindow_DrawAttention": (self: heap.Ref<object>, retPtr: Pointer): void => {
   621        const thiz = A.H.get<any>(self);
   622  
   623        const _ret = thiz.drawAttention();
   624      },
   625      "try_AppWindow_DrawAttention": (self: heap.Ref<object>, retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => {
   626        try {
   627          const thiz = A.H.get<any>(self);
   628  
   629          const _ret = thiz.drawAttention();
   630          return A.H.TRUE;
   631        } catch (err: any) {
   632          A.store.Ref(errPtr, err);
   633          return A.H.FALSE;
   634        }
   635      },
   636      "has_AppWindow_ClearAttention": (self: heap.Ref<any>): heap.Ref<boolean> => {
   637        const obj = A.H.get<object>(self);
   638        if (obj && "clearAttention" in obj) {
   639          return A.H.TRUE;
   640        }
   641        return A.H.FALSE;
   642      },
   643      "func_AppWindow_ClearAttention": (self: heap.Ref<any>, fn: Pointer): void => {
   644        A.store.Ref(fn, A.H.get<any>(self).clearAttention);
   645      },
   646  
   647      "call_AppWindow_ClearAttention": (self: heap.Ref<object>, retPtr: Pointer): void => {
   648        const thiz = A.H.get<any>(self);
   649  
   650        const _ret = thiz.clearAttention();
   651      },
   652      "try_AppWindow_ClearAttention": (self: heap.Ref<object>, retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => {
   653        try {
   654          const thiz = A.H.get<any>(self);
   655  
   656          const _ret = thiz.clearAttention();
   657          return A.H.TRUE;
   658        } catch (err: any) {
   659          A.store.Ref(errPtr, err);
   660          return A.H.FALSE;
   661        }
   662      },
   663      "has_AppWindow_Close": (self: heap.Ref<any>): heap.Ref<boolean> => {
   664        const obj = A.H.get<object>(self);
   665        if (obj && "close" in obj) {
   666          return A.H.TRUE;
   667        }
   668        return A.H.FALSE;
   669      },
   670      "func_AppWindow_Close": (self: heap.Ref<any>, fn: Pointer): void => {
   671        A.store.Ref(fn, A.H.get<any>(self).close);
   672      },
   673  
   674      "call_AppWindow_Close": (self: heap.Ref<object>, retPtr: Pointer): void => {
   675        const thiz = A.H.get<any>(self);
   676  
   677        const _ret = thiz.close();
   678      },
   679      "try_AppWindow_Close": (self: heap.Ref<object>, retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => {
   680        try {
   681          const thiz = A.H.get<any>(self);
   682  
   683          const _ret = thiz.close();
   684          return A.H.TRUE;
   685        } catch (err: any) {
   686          A.store.Ref(errPtr, err);
   687          return A.H.FALSE;
   688        }
   689      },
   690      "has_AppWindow_Show": (self: heap.Ref<any>): heap.Ref<boolean> => {
   691        const obj = A.H.get<object>(self);
   692        if (obj && "show" in obj) {
   693          return A.H.TRUE;
   694        }
   695        return A.H.FALSE;
   696      },
   697      "func_AppWindow_Show": (self: heap.Ref<any>, fn: Pointer): void => {
   698        A.store.Ref(fn, A.H.get<any>(self).show);
   699      },
   700  
   701      "call_AppWindow_Show": (self: heap.Ref<object>, retPtr: Pointer, focused: heap.Ref<boolean>): void => {
   702        const thiz = A.H.get<any>(self);
   703  
   704        const _ret = thiz.show(focused === A.H.TRUE);
   705      },
   706      "try_AppWindow_Show": (
   707        self: heap.Ref<object>,
   708        retPtr: Pointer,
   709        errPtr: Pointer,
   710        focused: heap.Ref<boolean>
   711      ): heap.Ref<boolean> => {
   712        try {
   713          const thiz = A.H.get<any>(self);
   714  
   715          const _ret = thiz.show(focused === A.H.TRUE);
   716          return A.H.TRUE;
   717        } catch (err: any) {
   718          A.store.Ref(errPtr, err);
   719          return A.H.FALSE;
   720        }
   721      },
   722      "has_AppWindow_Show1": (self: heap.Ref<any>): heap.Ref<boolean> => {
   723        const obj = A.H.get<object>(self);
   724        if (obj && "show" in obj) {
   725          return A.H.TRUE;
   726        }
   727        return A.H.FALSE;
   728      },
   729      "func_AppWindow_Show1": (self: heap.Ref<any>, fn: Pointer): void => {
   730        A.store.Ref(fn, A.H.get<any>(self).show);
   731      },
   732  
   733      "call_AppWindow_Show1": (self: heap.Ref<object>, retPtr: Pointer): void => {
   734        const thiz = A.H.get<any>(self);
   735  
   736        const _ret = thiz.show();
   737      },
   738      "try_AppWindow_Show1": (self: heap.Ref<object>, retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => {
   739        try {
   740          const thiz = A.H.get<any>(self);
   741  
   742          const _ret = thiz.show();
   743          return A.H.TRUE;
   744        } catch (err: any) {
   745          A.store.Ref(errPtr, err);
   746          return A.H.FALSE;
   747        }
   748      },
   749      "has_AppWindow_Hide": (self: heap.Ref<any>): heap.Ref<boolean> => {
   750        const obj = A.H.get<object>(self);
   751        if (obj && "hide" in obj) {
   752          return A.H.TRUE;
   753        }
   754        return A.H.FALSE;
   755      },
   756      "func_AppWindow_Hide": (self: heap.Ref<any>, fn: Pointer): void => {
   757        A.store.Ref(fn, A.H.get<any>(self).hide);
   758      },
   759  
   760      "call_AppWindow_Hide": (self: heap.Ref<object>, retPtr: Pointer): void => {
   761        const thiz = A.H.get<any>(self);
   762  
   763        const _ret = thiz.hide();
   764      },
   765      "try_AppWindow_Hide": (self: heap.Ref<object>, retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => {
   766        try {
   767          const thiz = A.H.get<any>(self);
   768  
   769          const _ret = thiz.hide();
   770          return A.H.TRUE;
   771        } catch (err: any) {
   772          A.store.Ref(errPtr, err);
   773          return A.H.FALSE;
   774        }
   775      },
   776      "has_AppWindow_GetBounds": (self: heap.Ref<any>): heap.Ref<boolean> => {
   777        const obj = A.H.get<object>(self);
   778        if (obj && "getBounds" in obj) {
   779          return A.H.TRUE;
   780        }
   781        return A.H.FALSE;
   782      },
   783      "func_AppWindow_GetBounds": (self: heap.Ref<any>, fn: Pointer): void => {
   784        A.store.Ref(fn, A.H.get<any>(self).getBounds);
   785      },
   786  
   787      "call_AppWindow_GetBounds": (self: heap.Ref<object>, retPtr: Pointer): void => {
   788        const thiz = A.H.get<any>(self);
   789  
   790        const _ret = thiz.getBounds();
   791        if (typeof _ret === "undefined") {
   792          A.store.Bool(retPtr + 20, false);
   793          A.store.Bool(retPtr + 16, false);
   794          A.store.Int32(retPtr + 0, 0);
   795          A.store.Bool(retPtr + 17, false);
   796          A.store.Int32(retPtr + 4, 0);
   797          A.store.Bool(retPtr + 18, false);
   798          A.store.Int32(retPtr + 8, 0);
   799          A.store.Bool(retPtr + 19, false);
   800          A.store.Int32(retPtr + 12, 0);
   801        } else {
   802          A.store.Bool(retPtr + 20, true);
   803          A.store.Bool(retPtr + 16, "left" in _ret ? true : false);
   804          A.store.Int32(retPtr + 0, _ret["left"] === undefined ? 0 : (_ret["left"] as number));
   805          A.store.Bool(retPtr + 17, "top" in _ret ? true : false);
   806          A.store.Int32(retPtr + 4, _ret["top"] === undefined ? 0 : (_ret["top"] as number));
   807          A.store.Bool(retPtr + 18, "width" in _ret ? true : false);
   808          A.store.Int32(retPtr + 8, _ret["width"] === undefined ? 0 : (_ret["width"] as number));
   809          A.store.Bool(retPtr + 19, "height" in _ret ? true : false);
   810          A.store.Int32(retPtr + 12, _ret["height"] === undefined ? 0 : (_ret["height"] as number));
   811        }
   812      },
   813      "try_AppWindow_GetBounds": (self: heap.Ref<object>, retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => {
   814        try {
   815          const thiz = A.H.get<any>(self);
   816  
   817          const _ret = thiz.getBounds();
   818          if (typeof _ret === "undefined") {
   819            A.store.Bool(retPtr + 20, false);
   820            A.store.Bool(retPtr + 16, false);
   821            A.store.Int32(retPtr + 0, 0);
   822            A.store.Bool(retPtr + 17, false);
   823            A.store.Int32(retPtr + 4, 0);
   824            A.store.Bool(retPtr + 18, false);
   825            A.store.Int32(retPtr + 8, 0);
   826            A.store.Bool(retPtr + 19, false);
   827            A.store.Int32(retPtr + 12, 0);
   828          } else {
   829            A.store.Bool(retPtr + 20, true);
   830            A.store.Bool(retPtr + 16, "left" in _ret ? true : false);
   831            A.store.Int32(retPtr + 0, _ret["left"] === undefined ? 0 : (_ret["left"] as number));
   832            A.store.Bool(retPtr + 17, "top" in _ret ? true : false);
   833            A.store.Int32(retPtr + 4, _ret["top"] === undefined ? 0 : (_ret["top"] as number));
   834            A.store.Bool(retPtr + 18, "width" in _ret ? true : false);
   835            A.store.Int32(retPtr + 8, _ret["width"] === undefined ? 0 : (_ret["width"] as number));
   836            A.store.Bool(retPtr + 19, "height" in _ret ? true : false);
   837            A.store.Int32(retPtr + 12, _ret["height"] === undefined ? 0 : (_ret["height"] as number));
   838          }
   839          return A.H.TRUE;
   840        } catch (err: any) {
   841          A.store.Ref(errPtr, err);
   842          return A.H.FALSE;
   843        }
   844      },
   845      "has_AppWindow_SetBounds": (self: heap.Ref<any>): heap.Ref<boolean> => {
   846        const obj = A.H.get<object>(self);
   847        if (obj && "setBounds" in obj) {
   848          return A.H.TRUE;
   849        }
   850        return A.H.FALSE;
   851      },
   852      "func_AppWindow_SetBounds": (self: heap.Ref<any>, fn: Pointer): void => {
   853        A.store.Ref(fn, A.H.get<any>(self).setBounds);
   854      },
   855  
   856      "call_AppWindow_SetBounds": (self: heap.Ref<object>, retPtr: Pointer, bounds: Pointer): void => {
   857        const thiz = A.H.get<any>(self);
   858  
   859        const bounds_ffi = {};
   860  
   861        if (A.load.Bool(bounds + 16)) {
   862          bounds_ffi["left"] = A.load.Int32(bounds + 0);
   863        }
   864        if (A.load.Bool(bounds + 17)) {
   865          bounds_ffi["top"] = A.load.Int32(bounds + 4);
   866        }
   867        if (A.load.Bool(bounds + 18)) {
   868          bounds_ffi["width"] = A.load.Int32(bounds + 8);
   869        }
   870        if (A.load.Bool(bounds + 19)) {
   871          bounds_ffi["height"] = A.load.Int32(bounds + 12);
   872        }
   873        const _ret = thiz.setBounds(bounds_ffi);
   874      },
   875      "try_AppWindow_SetBounds": (
   876        self: heap.Ref<object>,
   877        retPtr: Pointer,
   878        errPtr: Pointer,
   879        bounds: Pointer
   880      ): heap.Ref<boolean> => {
   881        try {
   882          const thiz = A.H.get<any>(self);
   883  
   884          const bounds_ffi = {};
   885  
   886          if (A.load.Bool(bounds + 16)) {
   887            bounds_ffi["left"] = A.load.Int32(bounds + 0);
   888          }
   889          if (A.load.Bool(bounds + 17)) {
   890            bounds_ffi["top"] = A.load.Int32(bounds + 4);
   891          }
   892          if (A.load.Bool(bounds + 18)) {
   893            bounds_ffi["width"] = A.load.Int32(bounds + 8);
   894          }
   895          if (A.load.Bool(bounds + 19)) {
   896            bounds_ffi["height"] = A.load.Int32(bounds + 12);
   897          }
   898          const _ret = thiz.setBounds(bounds_ffi);
   899          return A.H.TRUE;
   900        } catch (err: any) {
   901          A.store.Ref(errPtr, err);
   902          return A.H.FALSE;
   903        }
   904      },
   905      "has_AppWindow_SetIcon": (self: heap.Ref<any>): heap.Ref<boolean> => {
   906        const obj = A.H.get<object>(self);
   907        if (obj && "setIcon" in obj) {
   908          return A.H.TRUE;
   909        }
   910        return A.H.FALSE;
   911      },
   912      "func_AppWindow_SetIcon": (self: heap.Ref<any>, fn: Pointer): void => {
   913        A.store.Ref(fn, A.H.get<any>(self).setIcon);
   914      },
   915  
   916      "call_AppWindow_SetIcon": (self: heap.Ref<object>, retPtr: Pointer, iconUrl: heap.Ref<object>): void => {
   917        const thiz = A.H.get<any>(self);
   918  
   919        const _ret = thiz.setIcon(A.H.get<object>(iconUrl));
   920      },
   921      "try_AppWindow_SetIcon": (
   922        self: heap.Ref<object>,
   923        retPtr: Pointer,
   924        errPtr: Pointer,
   925        iconUrl: heap.Ref<object>
   926      ): heap.Ref<boolean> => {
   927        try {
   928          const thiz = A.H.get<any>(self);
   929  
   930          const _ret = thiz.setIcon(A.H.get<object>(iconUrl));
   931          return A.H.TRUE;
   932        } catch (err: any) {
   933          A.store.Ref(errPtr, err);
   934          return A.H.FALSE;
   935        }
   936      },
   937      "has_AppWindow_IsAlwaysOnTop": (self: heap.Ref<any>): heap.Ref<boolean> => {
   938        const obj = A.H.get<object>(self);
   939        if (obj && "isAlwaysOnTop" in obj) {
   940          return A.H.TRUE;
   941        }
   942        return A.H.FALSE;
   943      },
   944      "func_AppWindow_IsAlwaysOnTop": (self: heap.Ref<any>, fn: Pointer): void => {
   945        A.store.Ref(fn, A.H.get<any>(self).isAlwaysOnTop);
   946      },
   947  
   948      "call_AppWindow_IsAlwaysOnTop": (self: heap.Ref<object>, retPtr: Pointer): void => {
   949        const thiz = A.H.get<any>(self);
   950  
   951        const _ret = thiz.isAlwaysOnTop();
   952        A.store.Bool(retPtr, _ret);
   953      },
   954      "try_AppWindow_IsAlwaysOnTop": (self: heap.Ref<object>, retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => {
   955        try {
   956          const thiz = A.H.get<any>(self);
   957  
   958          const _ret = thiz.isAlwaysOnTop();
   959          A.store.Bool(retPtr, _ret);
   960          return A.H.TRUE;
   961        } catch (err: any) {
   962          A.store.Ref(errPtr, err);
   963          return A.H.FALSE;
   964        }
   965      },
   966      "has_AppWindow_SetAlwaysOnTop": (self: heap.Ref<any>): heap.Ref<boolean> => {
   967        const obj = A.H.get<object>(self);
   968        if (obj && "setAlwaysOnTop" in obj) {
   969          return A.H.TRUE;
   970        }
   971        return A.H.FALSE;
   972      },
   973      "func_AppWindow_SetAlwaysOnTop": (self: heap.Ref<any>, fn: Pointer): void => {
   974        A.store.Ref(fn, A.H.get<any>(self).setAlwaysOnTop);
   975      },
   976  
   977      "call_AppWindow_SetAlwaysOnTop": (
   978        self: heap.Ref<object>,
   979        retPtr: Pointer,
   980        alwaysOnTop: heap.Ref<boolean>
   981      ): void => {
   982        const thiz = A.H.get<any>(self);
   983  
   984        const _ret = thiz.setAlwaysOnTop(alwaysOnTop === A.H.TRUE);
   985      },
   986      "try_AppWindow_SetAlwaysOnTop": (
   987        self: heap.Ref<object>,
   988        retPtr: Pointer,
   989        errPtr: Pointer,
   990        alwaysOnTop: heap.Ref<boolean>
   991      ): heap.Ref<boolean> => {
   992        try {
   993          const thiz = A.H.get<any>(self);
   994  
   995          const _ret = thiz.setAlwaysOnTop(alwaysOnTop === A.H.TRUE);
   996          return A.H.TRUE;
   997        } catch (err: any) {
   998          A.store.Ref(errPtr, err);
   999          return A.H.FALSE;
  1000        }
  1001      },
  1002      "has_AppWindow_AlphaEnabled": (self: heap.Ref<any>): heap.Ref<boolean> => {
  1003        const obj = A.H.get<object>(self);
  1004        if (obj && "alphaEnabled" in obj) {
  1005          return A.H.TRUE;
  1006        }
  1007        return A.H.FALSE;
  1008      },
  1009      "func_AppWindow_AlphaEnabled": (self: heap.Ref<any>, fn: Pointer): void => {
  1010        A.store.Ref(fn, A.H.get<any>(self).alphaEnabled);
  1011      },
  1012  
  1013      "call_AppWindow_AlphaEnabled": (self: heap.Ref<object>, retPtr: Pointer): void => {
  1014        const thiz = A.H.get<any>(self);
  1015  
  1016        const _ret = thiz.alphaEnabled();
  1017        A.store.Bool(retPtr, _ret);
  1018      },
  1019      "try_AppWindow_AlphaEnabled": (self: heap.Ref<object>, retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => {
  1020        try {
  1021          const thiz = A.H.get<any>(self);
  1022  
  1023          const _ret = thiz.alphaEnabled();
  1024          A.store.Bool(retPtr, _ret);
  1025          return A.H.TRUE;
  1026        } catch (err: any) {
  1027          A.store.Ref(errPtr, err);
  1028          return A.H.FALSE;
  1029        }
  1030      },
  1031      "has_AppWindow_SetVisibleOnAllWorkspaces": (self: heap.Ref<any>): heap.Ref<boolean> => {
  1032        const obj = A.H.get<object>(self);
  1033        if (obj && "setVisibleOnAllWorkspaces" in obj) {
  1034          return A.H.TRUE;
  1035        }
  1036        return A.H.FALSE;
  1037      },
  1038      "func_AppWindow_SetVisibleOnAllWorkspaces": (self: heap.Ref<any>, fn: Pointer): void => {
  1039        A.store.Ref(fn, A.H.get<any>(self).setVisibleOnAllWorkspaces);
  1040      },
  1041  
  1042      "call_AppWindow_SetVisibleOnAllWorkspaces": (
  1043        self: heap.Ref<object>,
  1044        retPtr: Pointer,
  1045        alwaysVisible: heap.Ref<boolean>
  1046      ): void => {
  1047        const thiz = A.H.get<any>(self);
  1048  
  1049        const _ret = thiz.setVisibleOnAllWorkspaces(alwaysVisible === A.H.TRUE);
  1050      },
  1051      "try_AppWindow_SetVisibleOnAllWorkspaces": (
  1052        self: heap.Ref<object>,
  1053        retPtr: Pointer,
  1054        errPtr: Pointer,
  1055        alwaysVisible: heap.Ref<boolean>
  1056      ): heap.Ref<boolean> => {
  1057        try {
  1058          const thiz = A.H.get<any>(self);
  1059  
  1060          const _ret = thiz.setVisibleOnAllWorkspaces(alwaysVisible === A.H.TRUE);
  1061          return A.H.TRUE;
  1062        } catch (err: any) {
  1063          A.store.Ref(errPtr, err);
  1064          return A.H.FALSE;
  1065        }
  1066      },
  1067      "get_AppWindow_HasFrameColor": (self: heap.Ref<any>, retPtr: Pointer): heap.Ref<boolean> => {
  1068        const thiz = A.H.get<object>(self);
  1069        if (thiz && "hasFrameColor" in thiz) {
  1070          const val = thiz.hasFrameColor;
  1071          A.store.Bool(retPtr, val);
  1072          return A.H.TRUE;
  1073        }
  1074  
  1075        return A.H.FALSE;
  1076      },
  1077      "set_AppWindow_HasFrameColor": (self: heap.Ref<object>, val: heap.Ref<boolean>): heap.Ref<boolean> => {
  1078        const thiz = A.H.get<object>(self);
  1079  
  1080        return Reflect.set(thiz, "hasFrameColor", val === A.H.TRUE, thiz) ? A.H.TRUE : A.H.FALSE;
  1081      },
  1082      "get_AppWindow_ActiveFrameColor": (self: heap.Ref<any>, retPtr: Pointer): heap.Ref<boolean> => {
  1083        const thiz = A.H.get<object>(self);
  1084        if (thiz && "activeFrameColor" in thiz) {
  1085          const val = thiz.activeFrameColor;
  1086          A.store.Int32(retPtr, val);
  1087          return A.H.TRUE;
  1088        }
  1089  
  1090        return A.H.FALSE;
  1091      },
  1092      "set_AppWindow_ActiveFrameColor": (self: heap.Ref<object>, val: number): heap.Ref<boolean> => {
  1093        const thiz = A.H.get<object>(self);
  1094  
  1095        return Reflect.set(thiz, "activeFrameColor", val, thiz) ? A.H.TRUE : A.H.FALSE;
  1096      },
  1097      "get_AppWindow_InactiveFrameColor": (self: heap.Ref<any>, retPtr: Pointer): heap.Ref<boolean> => {
  1098        const thiz = A.H.get<object>(self);
  1099        if (thiz && "inactiveFrameColor" in thiz) {
  1100          const val = thiz.inactiveFrameColor;
  1101          A.store.Int32(retPtr, val);
  1102          return A.H.TRUE;
  1103        }
  1104  
  1105        return A.H.FALSE;
  1106      },
  1107      "set_AppWindow_InactiveFrameColor": (self: heap.Ref<object>, val: number): heap.Ref<boolean> => {
  1108        const thiz = A.H.get<object>(self);
  1109  
  1110        return Reflect.set(thiz, "inactiveFrameColor", val, thiz) ? A.H.TRUE : A.H.FALSE;
  1111      },
  1112      "get_AppWindow_ContentWindow": (self: heap.Ref<any>, retPtr: Pointer): heap.Ref<boolean> => {
  1113        const thiz = A.H.get<object>(self);
  1114        if (thiz && "contentWindow" in thiz) {
  1115          const val = thiz.contentWindow;
  1116          A.store.Ref(retPtr, val);
  1117          return A.H.TRUE;
  1118        }
  1119  
  1120        return A.H.FALSE;
  1121      },
  1122      "set_AppWindow_ContentWindow": (self: heap.Ref<object>, val: heap.Ref<object>): heap.Ref<boolean> => {
  1123        const thiz = A.H.get<object>(self);
  1124  
  1125        return Reflect.set(thiz, "contentWindow", A.H.get<object>(val), thiz) ? A.H.TRUE : A.H.FALSE;
  1126      },
  1127      "get_AppWindow_Id": (self: heap.Ref<any>, retPtr: Pointer): heap.Ref<boolean> => {
  1128        const thiz = A.H.get<object>(self);
  1129        if (thiz && "id" in thiz) {
  1130          const val = thiz.id;
  1131          A.store.Ref(retPtr, val);
  1132          return A.H.TRUE;
  1133        }
  1134  
  1135        return A.H.FALSE;
  1136      },
  1137      "set_AppWindow_Id": (self: heap.Ref<object>, val: heap.Ref<object>): heap.Ref<boolean> => {
  1138        const thiz = A.H.get<object>(self);
  1139  
  1140        return Reflect.set(thiz, "id", A.H.get<object>(val), thiz) ? A.H.TRUE : A.H.FALSE;
  1141      },
  1142      "get_AppWindow_InnerBounds": (self: heap.Ref<any>, retPtr: Pointer): heap.Ref<boolean> => {
  1143        const thiz = A.H.get<object>(self);
  1144        if (thiz && "innerBounds" in thiz) {
  1145          const val = thiz.innerBounds;
  1146          A.store.Ref(retPtr, val);
  1147          return A.H.TRUE;
  1148        }
  1149  
  1150        return A.H.FALSE;
  1151      },
  1152      "set_AppWindow_InnerBounds": (self: heap.Ref<object>, val: heap.Ref<object>): heap.Ref<boolean> => {
  1153        const thiz = A.H.get<object>(self);
  1154  
  1155        return Reflect.set(thiz, "innerBounds", A.H.get<object>(val), thiz) ? A.H.TRUE : A.H.FALSE;
  1156      },
  1157      "get_AppWindow_OuterBounds": (self: heap.Ref<any>, retPtr: Pointer): heap.Ref<boolean> => {
  1158        const thiz = A.H.get<object>(self);
  1159        if (thiz && "outerBounds" in thiz) {
  1160          const val = thiz.outerBounds;
  1161          A.store.Ref(retPtr, val);
  1162          return A.H.TRUE;
  1163        }
  1164  
  1165        return A.H.FALSE;
  1166      },
  1167      "set_AppWindow_OuterBounds": (self: heap.Ref<object>, val: heap.Ref<object>): heap.Ref<boolean> => {
  1168        const thiz = A.H.get<object>(self);
  1169  
  1170        return Reflect.set(thiz, "outerBounds", A.H.get<object>(val), thiz) ? A.H.TRUE : A.H.FALSE;
  1171      },
  1172  
  1173      "store_BoundsSpecification": (ptr: Pointer, ref: heap.Ref<any>) => {
  1174        const x = A.H.get<any>(ref);
  1175  
  1176        if (typeof x === "undefined") {
  1177          A.store.Bool(ptr + 40, false);
  1178          A.store.Bool(ptr + 32, false);
  1179          A.store.Int32(ptr + 0, 0);
  1180          A.store.Bool(ptr + 33, false);
  1181          A.store.Int32(ptr + 4, 0);
  1182          A.store.Bool(ptr + 34, false);
  1183          A.store.Int32(ptr + 8, 0);
  1184          A.store.Bool(ptr + 35, false);
  1185          A.store.Int32(ptr + 12, 0);
  1186          A.store.Bool(ptr + 36, false);
  1187          A.store.Int32(ptr + 16, 0);
  1188          A.store.Bool(ptr + 37, false);
  1189          A.store.Int32(ptr + 20, 0);
  1190          A.store.Bool(ptr + 38, false);
  1191          A.store.Int32(ptr + 24, 0);
  1192          A.store.Bool(ptr + 39, false);
  1193          A.store.Int32(ptr + 28, 0);
  1194        } else {
  1195          A.store.Bool(ptr + 40, true);
  1196          A.store.Bool(ptr + 32, "left" in x ? true : false);
  1197          A.store.Int32(ptr + 0, x["left"] === undefined ? 0 : (x["left"] as number));
  1198          A.store.Bool(ptr + 33, "top" in x ? true : false);
  1199          A.store.Int32(ptr + 4, x["top"] === undefined ? 0 : (x["top"] as number));
  1200          A.store.Bool(ptr + 34, "width" in x ? true : false);
  1201          A.store.Int32(ptr + 8, x["width"] === undefined ? 0 : (x["width"] as number));
  1202          A.store.Bool(ptr + 35, "height" in x ? true : false);
  1203          A.store.Int32(ptr + 12, x["height"] === undefined ? 0 : (x["height"] as number));
  1204          A.store.Bool(ptr + 36, "minWidth" in x ? true : false);
  1205          A.store.Int32(ptr + 16, x["minWidth"] === undefined ? 0 : (x["minWidth"] as number));
  1206          A.store.Bool(ptr + 37, "minHeight" in x ? true : false);
  1207          A.store.Int32(ptr + 20, x["minHeight"] === undefined ? 0 : (x["minHeight"] as number));
  1208          A.store.Bool(ptr + 38, "maxWidth" in x ? true : false);
  1209          A.store.Int32(ptr + 24, x["maxWidth"] === undefined ? 0 : (x["maxWidth"] as number));
  1210          A.store.Bool(ptr + 39, "maxHeight" in x ? true : false);
  1211          A.store.Int32(ptr + 28, x["maxHeight"] === undefined ? 0 : (x["maxHeight"] as number));
  1212        }
  1213      },
  1214      "load_BoundsSpecification": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => {
  1215        const x = create === A.H.TRUE ? {} : A.H.get<any>(ref);
  1216  
  1217        if (A.load.Bool(ptr + 32)) {
  1218          x["left"] = A.load.Int32(ptr + 0);
  1219        } else {
  1220          delete x["left"];
  1221        }
  1222        if (A.load.Bool(ptr + 33)) {
  1223          x["top"] = A.load.Int32(ptr + 4);
  1224        } else {
  1225          delete x["top"];
  1226        }
  1227        if (A.load.Bool(ptr + 34)) {
  1228          x["width"] = A.load.Int32(ptr + 8);
  1229        } else {
  1230          delete x["width"];
  1231        }
  1232        if (A.load.Bool(ptr + 35)) {
  1233          x["height"] = A.load.Int32(ptr + 12);
  1234        } else {
  1235          delete x["height"];
  1236        }
  1237        if (A.load.Bool(ptr + 36)) {
  1238          x["minWidth"] = A.load.Int32(ptr + 16);
  1239        } else {
  1240          delete x["minWidth"];
  1241        }
  1242        if (A.load.Bool(ptr + 37)) {
  1243          x["minHeight"] = A.load.Int32(ptr + 20);
  1244        } else {
  1245          delete x["minHeight"];
  1246        }
  1247        if (A.load.Bool(ptr + 38)) {
  1248          x["maxWidth"] = A.load.Int32(ptr + 24);
  1249        } else {
  1250          delete x["maxWidth"];
  1251        }
  1252        if (A.load.Bool(ptr + 39)) {
  1253          x["maxHeight"] = A.load.Int32(ptr + 28);
  1254        } else {
  1255          delete x["maxHeight"];
  1256        }
  1257        return create === A.H.TRUE ? A.H.push(x) : ref;
  1258      },
  1259      "constof_WindowType": (ref: heap.Ref<string>): number => {
  1260        const idx = ["shell", "panel"].indexOf(A.H.get(ref));
  1261        return idx < 0 ? 0 : idx + 1;
  1262      },
  1263  
  1264      "store_FrameOptions": (ptr: Pointer, ref: heap.Ref<any>) => {
  1265        const x = A.H.get<any>(ref);
  1266  
  1267        if (typeof x === "undefined") {
  1268          A.store.Bool(ptr + 16, false);
  1269          A.store.Ref(ptr + 0, undefined);
  1270          A.store.Ref(ptr + 4, undefined);
  1271          A.store.Ref(ptr + 8, undefined);
  1272          A.store.Ref(ptr + 12, undefined);
  1273        } else {
  1274          A.store.Bool(ptr + 16, true);
  1275          A.store.Ref(ptr + 0, x["type"]);
  1276          A.store.Ref(ptr + 4, x["color"]);
  1277          A.store.Ref(ptr + 8, x["activeColor"]);
  1278          A.store.Ref(ptr + 12, x["inactiveColor"]);
  1279        }
  1280      },
  1281      "load_FrameOptions": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => {
  1282        const x = create === A.H.TRUE ? {} : A.H.get<any>(ref);
  1283  
  1284        x["type"] = A.load.Ref(ptr + 0, undefined);
  1285        x["color"] = A.load.Ref(ptr + 4, undefined);
  1286        x["activeColor"] = A.load.Ref(ptr + 8, undefined);
  1287        x["inactiveColor"] = A.load.Ref(ptr + 12, undefined);
  1288        return create === A.H.TRUE ? A.H.push(x) : ref;
  1289      },
  1290      "constof_State": (ref: heap.Ref<string>): number => {
  1291        const idx = ["normal", "fullscreen", "maximized", "minimized"].indexOf(A.H.get(ref));
  1292        return idx < 0 ? 0 : idx + 1;
  1293      },
  1294  
  1295      "store_CreateWindowOptions": (ptr: Pointer, ref: heap.Ref<any>) => {
  1296        const x = A.H.get<any>(ref);
  1297  
  1298        if (typeof x === "undefined") {
  1299          A.store.Bool(ptr + 217, false);
  1300          A.store.Ref(ptr + 0, undefined);
  1301  
  1302          A.store.Bool(ptr + 4 + 40, false);
  1303          A.store.Bool(ptr + 4 + 32, false);
  1304          A.store.Int32(ptr + 4 + 0, 0);
  1305          A.store.Bool(ptr + 4 + 33, false);
  1306          A.store.Int32(ptr + 4 + 4, 0);
  1307          A.store.Bool(ptr + 4 + 34, false);
  1308          A.store.Int32(ptr + 4 + 8, 0);
  1309          A.store.Bool(ptr + 4 + 35, false);
  1310          A.store.Int32(ptr + 4 + 12, 0);
  1311          A.store.Bool(ptr + 4 + 36, false);
  1312          A.store.Int32(ptr + 4 + 16, 0);
  1313          A.store.Bool(ptr + 4 + 37, false);
  1314          A.store.Int32(ptr + 4 + 20, 0);
  1315          A.store.Bool(ptr + 4 + 38, false);
  1316          A.store.Int32(ptr + 4 + 24, 0);
  1317          A.store.Bool(ptr + 4 + 39, false);
  1318          A.store.Int32(ptr + 4 + 28, 0);
  1319  
  1320          A.store.Bool(ptr + 48 + 40, false);
  1321          A.store.Bool(ptr + 48 + 32, false);
  1322          A.store.Int32(ptr + 48 + 0, 0);
  1323          A.store.Bool(ptr + 48 + 33, false);
  1324          A.store.Int32(ptr + 48 + 4, 0);
  1325          A.store.Bool(ptr + 48 + 34, false);
  1326          A.store.Int32(ptr + 48 + 8, 0);
  1327          A.store.Bool(ptr + 48 + 35, false);
  1328          A.store.Int32(ptr + 48 + 12, 0);
  1329          A.store.Bool(ptr + 48 + 36, false);
  1330          A.store.Int32(ptr + 48 + 16, 0);
  1331          A.store.Bool(ptr + 48 + 37, false);
  1332          A.store.Int32(ptr + 48 + 20, 0);
  1333          A.store.Bool(ptr + 48 + 38, false);
  1334          A.store.Int32(ptr + 48 + 24, 0);
  1335          A.store.Bool(ptr + 48 + 39, false);
  1336          A.store.Int32(ptr + 48 + 28, 0);
  1337          A.store.Bool(ptr + 196, false);
  1338          A.store.Int32(ptr + 92, 0);
  1339          A.store.Bool(ptr + 197, false);
  1340          A.store.Int32(ptr + 96, 0);
  1341          A.store.Bool(ptr + 198, false);
  1342          A.store.Int32(ptr + 100, 0);
  1343          A.store.Bool(ptr + 199, false);
  1344          A.store.Int32(ptr + 104, 0);
  1345          A.store.Bool(ptr + 200, false);
  1346          A.store.Int32(ptr + 108, 0);
  1347          A.store.Bool(ptr + 201, false);
  1348          A.store.Int32(ptr + 112, 0);
  1349          A.store.Bool(ptr + 202, false);
  1350          A.store.Int32(ptr + 116, 0);
  1351          A.store.Bool(ptr + 203, false);
  1352          A.store.Int32(ptr + 120, 0);
  1353          A.store.Bool(ptr + 204, false);
  1354          A.store.Int32(ptr + 124, 0);
  1355          A.store.Bool(ptr + 205, false);
  1356          A.store.Int32(ptr + 128, 0);
  1357          A.store.Bool(ptr + 206, false);
  1358          A.store.Int32(ptr + 132, 0);
  1359          A.store.Bool(ptr + 207, false);
  1360          A.store.Int32(ptr + 136, 0);
  1361          A.store.Enum(ptr + 140, -1);
  1362          A.store.Bool(ptr + 208, false);
  1363          A.store.Bool(ptr + 144, false);
  1364          A.store.Bool(ptr + 209, false);
  1365          A.store.Bool(ptr + 145, false);
  1366          A.store.Ref(ptr + 148, undefined);
  1367          A.store.Ref(ptr + 152, undefined);
  1368  
  1369          A.store.Bool(ptr + 156 + 20, false);
  1370          A.store.Bool(ptr + 156 + 16, false);
  1371          A.store.Int32(ptr + 156 + 0, 0);
  1372          A.store.Bool(ptr + 156 + 17, false);
  1373          A.store.Int32(ptr + 156 + 4, 0);
  1374          A.store.Bool(ptr + 156 + 18, false);
  1375          A.store.Int32(ptr + 156 + 8, 0);
  1376          A.store.Bool(ptr + 156 + 19, false);
  1377          A.store.Int32(ptr + 156 + 12, 0);
  1378          A.store.Bool(ptr + 210, false);
  1379          A.store.Bool(ptr + 177, false);
  1380          A.store.Enum(ptr + 180, -1);
  1381          A.store.Bool(ptr + 211, false);
  1382          A.store.Bool(ptr + 184, false);
  1383          A.store.Bool(ptr + 212, false);
  1384          A.store.Bool(ptr + 185, false);
  1385          A.store.Bool(ptr + 213, false);
  1386          A.store.Bool(ptr + 186, false);
  1387          A.store.Bool(ptr + 214, false);
  1388          A.store.Bool(ptr + 187, false);
  1389          A.store.Bool(ptr + 215, false);
  1390          A.store.Bool(ptr + 188, false);
  1391          A.store.Bool(ptr + 216, false);
  1392          A.store.Bool(ptr + 189, false);
  1393          A.store.Enum(ptr + 192, -1);
  1394        } else {
  1395          A.store.Bool(ptr + 217, true);
  1396          A.store.Ref(ptr + 0, x["id"]);
  1397  
  1398          if (typeof x["innerBounds"] === "undefined") {
  1399            A.store.Bool(ptr + 4 + 40, false);
  1400            A.store.Bool(ptr + 4 + 32, false);
  1401            A.store.Int32(ptr + 4 + 0, 0);
  1402            A.store.Bool(ptr + 4 + 33, false);
  1403            A.store.Int32(ptr + 4 + 4, 0);
  1404            A.store.Bool(ptr + 4 + 34, false);
  1405            A.store.Int32(ptr + 4 + 8, 0);
  1406            A.store.Bool(ptr + 4 + 35, false);
  1407            A.store.Int32(ptr + 4 + 12, 0);
  1408            A.store.Bool(ptr + 4 + 36, false);
  1409            A.store.Int32(ptr + 4 + 16, 0);
  1410            A.store.Bool(ptr + 4 + 37, false);
  1411            A.store.Int32(ptr + 4 + 20, 0);
  1412            A.store.Bool(ptr + 4 + 38, false);
  1413            A.store.Int32(ptr + 4 + 24, 0);
  1414            A.store.Bool(ptr + 4 + 39, false);
  1415            A.store.Int32(ptr + 4 + 28, 0);
  1416          } else {
  1417            A.store.Bool(ptr + 4 + 40, true);
  1418            A.store.Bool(ptr + 4 + 32, "left" in x["innerBounds"] ? true : false);
  1419            A.store.Int32(ptr + 4 + 0, x["innerBounds"]["left"] === undefined ? 0 : (x["innerBounds"]["left"] as number));
  1420            A.store.Bool(ptr + 4 + 33, "top" in x["innerBounds"] ? true : false);
  1421            A.store.Int32(ptr + 4 + 4, x["innerBounds"]["top"] === undefined ? 0 : (x["innerBounds"]["top"] as number));
  1422            A.store.Bool(ptr + 4 + 34, "width" in x["innerBounds"] ? true : false);
  1423            A.store.Int32(
  1424              ptr + 4 + 8,
  1425              x["innerBounds"]["width"] === undefined ? 0 : (x["innerBounds"]["width"] as number)
  1426            );
  1427            A.store.Bool(ptr + 4 + 35, "height" in x["innerBounds"] ? true : false);
  1428            A.store.Int32(
  1429              ptr + 4 + 12,
  1430              x["innerBounds"]["height"] === undefined ? 0 : (x["innerBounds"]["height"] as number)
  1431            );
  1432            A.store.Bool(ptr + 4 + 36, "minWidth" in x["innerBounds"] ? true : false);
  1433            A.store.Int32(
  1434              ptr + 4 + 16,
  1435              x["innerBounds"]["minWidth"] === undefined ? 0 : (x["innerBounds"]["minWidth"] as number)
  1436            );
  1437            A.store.Bool(ptr + 4 + 37, "minHeight" in x["innerBounds"] ? true : false);
  1438            A.store.Int32(
  1439              ptr + 4 + 20,
  1440              x["innerBounds"]["minHeight"] === undefined ? 0 : (x["innerBounds"]["minHeight"] as number)
  1441            );
  1442            A.store.Bool(ptr + 4 + 38, "maxWidth" in x["innerBounds"] ? true : false);
  1443            A.store.Int32(
  1444              ptr + 4 + 24,
  1445              x["innerBounds"]["maxWidth"] === undefined ? 0 : (x["innerBounds"]["maxWidth"] as number)
  1446            );
  1447            A.store.Bool(ptr + 4 + 39, "maxHeight" in x["innerBounds"] ? true : false);
  1448            A.store.Int32(
  1449              ptr + 4 + 28,
  1450              x["innerBounds"]["maxHeight"] === undefined ? 0 : (x["innerBounds"]["maxHeight"] as number)
  1451            );
  1452          }
  1453  
  1454          if (typeof x["outerBounds"] === "undefined") {
  1455            A.store.Bool(ptr + 48 + 40, false);
  1456            A.store.Bool(ptr + 48 + 32, false);
  1457            A.store.Int32(ptr + 48 + 0, 0);
  1458            A.store.Bool(ptr + 48 + 33, false);
  1459            A.store.Int32(ptr + 48 + 4, 0);
  1460            A.store.Bool(ptr + 48 + 34, false);
  1461            A.store.Int32(ptr + 48 + 8, 0);
  1462            A.store.Bool(ptr + 48 + 35, false);
  1463            A.store.Int32(ptr + 48 + 12, 0);
  1464            A.store.Bool(ptr + 48 + 36, false);
  1465            A.store.Int32(ptr + 48 + 16, 0);
  1466            A.store.Bool(ptr + 48 + 37, false);
  1467            A.store.Int32(ptr + 48 + 20, 0);
  1468            A.store.Bool(ptr + 48 + 38, false);
  1469            A.store.Int32(ptr + 48 + 24, 0);
  1470            A.store.Bool(ptr + 48 + 39, false);
  1471            A.store.Int32(ptr + 48 + 28, 0);
  1472          } else {
  1473            A.store.Bool(ptr + 48 + 40, true);
  1474            A.store.Bool(ptr + 48 + 32, "left" in x["outerBounds"] ? true : false);
  1475            A.store.Int32(
  1476              ptr + 48 + 0,
  1477              x["outerBounds"]["left"] === undefined ? 0 : (x["outerBounds"]["left"] as number)
  1478            );
  1479            A.store.Bool(ptr + 48 + 33, "top" in x["outerBounds"] ? true : false);
  1480            A.store.Int32(ptr + 48 + 4, x["outerBounds"]["top"] === undefined ? 0 : (x["outerBounds"]["top"] as number));
  1481            A.store.Bool(ptr + 48 + 34, "width" in x["outerBounds"] ? true : false);
  1482            A.store.Int32(
  1483              ptr + 48 + 8,
  1484              x["outerBounds"]["width"] === undefined ? 0 : (x["outerBounds"]["width"] as number)
  1485            );
  1486            A.store.Bool(ptr + 48 + 35, "height" in x["outerBounds"] ? true : false);
  1487            A.store.Int32(
  1488              ptr + 48 + 12,
  1489              x["outerBounds"]["height"] === undefined ? 0 : (x["outerBounds"]["height"] as number)
  1490            );
  1491            A.store.Bool(ptr + 48 + 36, "minWidth" in x["outerBounds"] ? true : false);
  1492            A.store.Int32(
  1493              ptr + 48 + 16,
  1494              x["outerBounds"]["minWidth"] === undefined ? 0 : (x["outerBounds"]["minWidth"] as number)
  1495            );
  1496            A.store.Bool(ptr + 48 + 37, "minHeight" in x["outerBounds"] ? true : false);
  1497            A.store.Int32(
  1498              ptr + 48 + 20,
  1499              x["outerBounds"]["minHeight"] === undefined ? 0 : (x["outerBounds"]["minHeight"] as number)
  1500            );
  1501            A.store.Bool(ptr + 48 + 38, "maxWidth" in x["outerBounds"] ? true : false);
  1502            A.store.Int32(
  1503              ptr + 48 + 24,
  1504              x["outerBounds"]["maxWidth"] === undefined ? 0 : (x["outerBounds"]["maxWidth"] as number)
  1505            );
  1506            A.store.Bool(ptr + 48 + 39, "maxHeight" in x["outerBounds"] ? true : false);
  1507            A.store.Int32(
  1508              ptr + 48 + 28,
  1509              x["outerBounds"]["maxHeight"] === undefined ? 0 : (x["outerBounds"]["maxHeight"] as number)
  1510            );
  1511          }
  1512          A.store.Bool(ptr + 196, "defaultWidth" in x ? true : false);
  1513          A.store.Int32(ptr + 92, x["defaultWidth"] === undefined ? 0 : (x["defaultWidth"] as number));
  1514          A.store.Bool(ptr + 197, "defaultHeight" in x ? true : false);
  1515          A.store.Int32(ptr + 96, x["defaultHeight"] === undefined ? 0 : (x["defaultHeight"] as number));
  1516          A.store.Bool(ptr + 198, "defaultLeft" in x ? true : false);
  1517          A.store.Int32(ptr + 100, x["defaultLeft"] === undefined ? 0 : (x["defaultLeft"] as number));
  1518          A.store.Bool(ptr + 199, "defaultTop" in x ? true : false);
  1519          A.store.Int32(ptr + 104, x["defaultTop"] === undefined ? 0 : (x["defaultTop"] as number));
  1520          A.store.Bool(ptr + 200, "width" in x ? true : false);
  1521          A.store.Int32(ptr + 108, x["width"] === undefined ? 0 : (x["width"] as number));
  1522          A.store.Bool(ptr + 201, "height" in x ? true : false);
  1523          A.store.Int32(ptr + 112, x["height"] === undefined ? 0 : (x["height"] as number));
  1524          A.store.Bool(ptr + 202, "left" in x ? true : false);
  1525          A.store.Int32(ptr + 116, x["left"] === undefined ? 0 : (x["left"] as number));
  1526          A.store.Bool(ptr + 203, "top" in x ? true : false);
  1527          A.store.Int32(ptr + 120, x["top"] === undefined ? 0 : (x["top"] as number));
  1528          A.store.Bool(ptr + 204, "minWidth" in x ? true : false);
  1529          A.store.Int32(ptr + 124, x["minWidth"] === undefined ? 0 : (x["minWidth"] as number));
  1530          A.store.Bool(ptr + 205, "minHeight" in x ? true : false);
  1531          A.store.Int32(ptr + 128, x["minHeight"] === undefined ? 0 : (x["minHeight"] as number));
  1532          A.store.Bool(ptr + 206, "maxWidth" in x ? true : false);
  1533          A.store.Int32(ptr + 132, x["maxWidth"] === undefined ? 0 : (x["maxWidth"] as number));
  1534          A.store.Bool(ptr + 207, "maxHeight" in x ? true : false);
  1535          A.store.Int32(ptr + 136, x["maxHeight"] === undefined ? 0 : (x["maxHeight"] as number));
  1536          A.store.Enum(ptr + 140, ["shell", "panel"].indexOf(x["type"] as string));
  1537          A.store.Bool(ptr + 208, "ime" in x ? true : false);
  1538          A.store.Bool(ptr + 144, x["ime"] ? true : false);
  1539          A.store.Bool(ptr + 209, "showInShelf" in x ? true : false);
  1540          A.store.Bool(ptr + 145, x["showInShelf"] ? true : false);
  1541          A.store.Ref(ptr + 148, x["icon"]);
  1542          A.store.Ref(ptr + 152, x["frame"]);
  1543  
  1544          if (typeof x["bounds"] === "undefined") {
  1545            A.store.Bool(ptr + 156 + 20, false);
  1546            A.store.Bool(ptr + 156 + 16, false);
  1547            A.store.Int32(ptr + 156 + 0, 0);
  1548            A.store.Bool(ptr + 156 + 17, false);
  1549            A.store.Int32(ptr + 156 + 4, 0);
  1550            A.store.Bool(ptr + 156 + 18, false);
  1551            A.store.Int32(ptr + 156 + 8, 0);
  1552            A.store.Bool(ptr + 156 + 19, false);
  1553            A.store.Int32(ptr + 156 + 12, 0);
  1554          } else {
  1555            A.store.Bool(ptr + 156 + 20, true);
  1556            A.store.Bool(ptr + 156 + 16, "left" in x["bounds"] ? true : false);
  1557            A.store.Int32(ptr + 156 + 0, x["bounds"]["left"] === undefined ? 0 : (x["bounds"]["left"] as number));
  1558            A.store.Bool(ptr + 156 + 17, "top" in x["bounds"] ? true : false);
  1559            A.store.Int32(ptr + 156 + 4, x["bounds"]["top"] === undefined ? 0 : (x["bounds"]["top"] as number));
  1560            A.store.Bool(ptr + 156 + 18, "width" in x["bounds"] ? true : false);
  1561            A.store.Int32(ptr + 156 + 8, x["bounds"]["width"] === undefined ? 0 : (x["bounds"]["width"] as number));
  1562            A.store.Bool(ptr + 156 + 19, "height" in x["bounds"] ? true : false);
  1563            A.store.Int32(ptr + 156 + 12, x["bounds"]["height"] === undefined ? 0 : (x["bounds"]["height"] as number));
  1564          }
  1565          A.store.Bool(ptr + 210, "alphaEnabled" in x ? true : false);
  1566          A.store.Bool(ptr + 177, x["alphaEnabled"] ? true : false);
  1567          A.store.Enum(ptr + 180, ["normal", "fullscreen", "maximized", "minimized"].indexOf(x["state"] as string));
  1568          A.store.Bool(ptr + 211, "hidden" in x ? true : false);
  1569          A.store.Bool(ptr + 184, x["hidden"] ? true : false);
  1570          A.store.Bool(ptr + 212, "resizable" in x ? true : false);
  1571          A.store.Bool(ptr + 185, x["resizable"] ? true : false);
  1572          A.store.Bool(ptr + 213, "singleton" in x ? true : false);
  1573          A.store.Bool(ptr + 186, x["singleton"] ? true : false);
  1574          A.store.Bool(ptr + 214, "alwaysOnTop" in x ? true : false);
  1575          A.store.Bool(ptr + 187, x["alwaysOnTop"] ? true : false);
  1576          A.store.Bool(ptr + 215, "focused" in x ? true : false);
  1577          A.store.Bool(ptr + 188, x["focused"] ? true : false);
  1578          A.store.Bool(ptr + 216, "visibleOnAllWorkspaces" in x ? true : false);
  1579          A.store.Bool(ptr + 189, x["visibleOnAllWorkspaces"] ? true : false);
  1580          A.store.Enum(ptr + 192, ["new_note"].indexOf(x["lockScreenAction"] as string));
  1581        }
  1582      },
  1583      "load_CreateWindowOptions": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => {
  1584        const x = create === A.H.TRUE ? {} : A.H.get<any>(ref);
  1585  
  1586        x["id"] = A.load.Ref(ptr + 0, undefined);
  1587        if (A.load.Bool(ptr + 4 + 40)) {
  1588          x["innerBounds"] = {};
  1589          if (A.load.Bool(ptr + 4 + 32)) {
  1590            x["innerBounds"]["left"] = A.load.Int32(ptr + 4 + 0);
  1591          } else {
  1592            delete x["innerBounds"]["left"];
  1593          }
  1594          if (A.load.Bool(ptr + 4 + 33)) {
  1595            x["innerBounds"]["top"] = A.load.Int32(ptr + 4 + 4);
  1596          } else {
  1597            delete x["innerBounds"]["top"];
  1598          }
  1599          if (A.load.Bool(ptr + 4 + 34)) {
  1600            x["innerBounds"]["width"] = A.load.Int32(ptr + 4 + 8);
  1601          } else {
  1602            delete x["innerBounds"]["width"];
  1603          }
  1604          if (A.load.Bool(ptr + 4 + 35)) {
  1605            x["innerBounds"]["height"] = A.load.Int32(ptr + 4 + 12);
  1606          } else {
  1607            delete x["innerBounds"]["height"];
  1608          }
  1609          if (A.load.Bool(ptr + 4 + 36)) {
  1610            x["innerBounds"]["minWidth"] = A.load.Int32(ptr + 4 + 16);
  1611          } else {
  1612            delete x["innerBounds"]["minWidth"];
  1613          }
  1614          if (A.load.Bool(ptr + 4 + 37)) {
  1615            x["innerBounds"]["minHeight"] = A.load.Int32(ptr + 4 + 20);
  1616          } else {
  1617            delete x["innerBounds"]["minHeight"];
  1618          }
  1619          if (A.load.Bool(ptr + 4 + 38)) {
  1620            x["innerBounds"]["maxWidth"] = A.load.Int32(ptr + 4 + 24);
  1621          } else {
  1622            delete x["innerBounds"]["maxWidth"];
  1623          }
  1624          if (A.load.Bool(ptr + 4 + 39)) {
  1625            x["innerBounds"]["maxHeight"] = A.load.Int32(ptr + 4 + 28);
  1626          } else {
  1627            delete x["innerBounds"]["maxHeight"];
  1628          }
  1629        } else {
  1630          delete x["innerBounds"];
  1631        }
  1632        if (A.load.Bool(ptr + 48 + 40)) {
  1633          x["outerBounds"] = {};
  1634          if (A.load.Bool(ptr + 48 + 32)) {
  1635            x["outerBounds"]["left"] = A.load.Int32(ptr + 48 + 0);
  1636          } else {
  1637            delete x["outerBounds"]["left"];
  1638          }
  1639          if (A.load.Bool(ptr + 48 + 33)) {
  1640            x["outerBounds"]["top"] = A.load.Int32(ptr + 48 + 4);
  1641          } else {
  1642            delete x["outerBounds"]["top"];
  1643          }
  1644          if (A.load.Bool(ptr + 48 + 34)) {
  1645            x["outerBounds"]["width"] = A.load.Int32(ptr + 48 + 8);
  1646          } else {
  1647            delete x["outerBounds"]["width"];
  1648          }
  1649          if (A.load.Bool(ptr + 48 + 35)) {
  1650            x["outerBounds"]["height"] = A.load.Int32(ptr + 48 + 12);
  1651          } else {
  1652            delete x["outerBounds"]["height"];
  1653          }
  1654          if (A.load.Bool(ptr + 48 + 36)) {
  1655            x["outerBounds"]["minWidth"] = A.load.Int32(ptr + 48 + 16);
  1656          } else {
  1657            delete x["outerBounds"]["minWidth"];
  1658          }
  1659          if (A.load.Bool(ptr + 48 + 37)) {
  1660            x["outerBounds"]["minHeight"] = A.load.Int32(ptr + 48 + 20);
  1661          } else {
  1662            delete x["outerBounds"]["minHeight"];
  1663          }
  1664          if (A.load.Bool(ptr + 48 + 38)) {
  1665            x["outerBounds"]["maxWidth"] = A.load.Int32(ptr + 48 + 24);
  1666          } else {
  1667            delete x["outerBounds"]["maxWidth"];
  1668          }
  1669          if (A.load.Bool(ptr + 48 + 39)) {
  1670            x["outerBounds"]["maxHeight"] = A.load.Int32(ptr + 48 + 28);
  1671          } else {
  1672            delete x["outerBounds"]["maxHeight"];
  1673          }
  1674        } else {
  1675          delete x["outerBounds"];
  1676        }
  1677        if (A.load.Bool(ptr + 196)) {
  1678          x["defaultWidth"] = A.load.Int32(ptr + 92);
  1679        } else {
  1680          delete x["defaultWidth"];
  1681        }
  1682        if (A.load.Bool(ptr + 197)) {
  1683          x["defaultHeight"] = A.load.Int32(ptr + 96);
  1684        } else {
  1685          delete x["defaultHeight"];
  1686        }
  1687        if (A.load.Bool(ptr + 198)) {
  1688          x["defaultLeft"] = A.load.Int32(ptr + 100);
  1689        } else {
  1690          delete x["defaultLeft"];
  1691        }
  1692        if (A.load.Bool(ptr + 199)) {
  1693          x["defaultTop"] = A.load.Int32(ptr + 104);
  1694        } else {
  1695          delete x["defaultTop"];
  1696        }
  1697        if (A.load.Bool(ptr + 200)) {
  1698          x["width"] = A.load.Int32(ptr + 108);
  1699        } else {
  1700          delete x["width"];
  1701        }
  1702        if (A.load.Bool(ptr + 201)) {
  1703          x["height"] = A.load.Int32(ptr + 112);
  1704        } else {
  1705          delete x["height"];
  1706        }
  1707        if (A.load.Bool(ptr + 202)) {
  1708          x["left"] = A.load.Int32(ptr + 116);
  1709        } else {
  1710          delete x["left"];
  1711        }
  1712        if (A.load.Bool(ptr + 203)) {
  1713          x["top"] = A.load.Int32(ptr + 120);
  1714        } else {
  1715          delete x["top"];
  1716        }
  1717        if (A.load.Bool(ptr + 204)) {
  1718          x["minWidth"] = A.load.Int32(ptr + 124);
  1719        } else {
  1720          delete x["minWidth"];
  1721        }
  1722        if (A.load.Bool(ptr + 205)) {
  1723          x["minHeight"] = A.load.Int32(ptr + 128);
  1724        } else {
  1725          delete x["minHeight"];
  1726        }
  1727        if (A.load.Bool(ptr + 206)) {
  1728          x["maxWidth"] = A.load.Int32(ptr + 132);
  1729        } else {
  1730          delete x["maxWidth"];
  1731        }
  1732        if (A.load.Bool(ptr + 207)) {
  1733          x["maxHeight"] = A.load.Int32(ptr + 136);
  1734        } else {
  1735          delete x["maxHeight"];
  1736        }
  1737        x["type"] = A.load.Enum(ptr + 140, ["shell", "panel"]);
  1738        if (A.load.Bool(ptr + 208)) {
  1739          x["ime"] = A.load.Bool(ptr + 144);
  1740        } else {
  1741          delete x["ime"];
  1742        }
  1743        if (A.load.Bool(ptr + 209)) {
  1744          x["showInShelf"] = A.load.Bool(ptr + 145);
  1745        } else {
  1746          delete x["showInShelf"];
  1747        }
  1748        x["icon"] = A.load.Ref(ptr + 148, undefined);
  1749        x["frame"] = A.load.Ref(ptr + 152, undefined);
  1750        if (A.load.Bool(ptr + 156 + 20)) {
  1751          x["bounds"] = {};
  1752          if (A.load.Bool(ptr + 156 + 16)) {
  1753            x["bounds"]["left"] = A.load.Int32(ptr + 156 + 0);
  1754          } else {
  1755            delete x["bounds"]["left"];
  1756          }
  1757          if (A.load.Bool(ptr + 156 + 17)) {
  1758            x["bounds"]["top"] = A.load.Int32(ptr + 156 + 4);
  1759          } else {
  1760            delete x["bounds"]["top"];
  1761          }
  1762          if (A.load.Bool(ptr + 156 + 18)) {
  1763            x["bounds"]["width"] = A.load.Int32(ptr + 156 + 8);
  1764          } else {
  1765            delete x["bounds"]["width"];
  1766          }
  1767          if (A.load.Bool(ptr + 156 + 19)) {
  1768            x["bounds"]["height"] = A.load.Int32(ptr + 156 + 12);
  1769          } else {
  1770            delete x["bounds"]["height"];
  1771          }
  1772        } else {
  1773          delete x["bounds"];
  1774        }
  1775        if (A.load.Bool(ptr + 210)) {
  1776          x["alphaEnabled"] = A.load.Bool(ptr + 177);
  1777        } else {
  1778          delete x["alphaEnabled"];
  1779        }
  1780        x["state"] = A.load.Enum(ptr + 180, ["normal", "fullscreen", "maximized", "minimized"]);
  1781        if (A.load.Bool(ptr + 211)) {
  1782          x["hidden"] = A.load.Bool(ptr + 184);
  1783        } else {
  1784          delete x["hidden"];
  1785        }
  1786        if (A.load.Bool(ptr + 212)) {
  1787          x["resizable"] = A.load.Bool(ptr + 185);
  1788        } else {
  1789          delete x["resizable"];
  1790        }
  1791        if (A.load.Bool(ptr + 213)) {
  1792          x["singleton"] = A.load.Bool(ptr + 186);
  1793        } else {
  1794          delete x["singleton"];
  1795        }
  1796        if (A.load.Bool(ptr + 214)) {
  1797          x["alwaysOnTop"] = A.load.Bool(ptr + 187);
  1798        } else {
  1799          delete x["alwaysOnTop"];
  1800        }
  1801        if (A.load.Bool(ptr + 215)) {
  1802          x["focused"] = A.load.Bool(ptr + 188);
  1803        } else {
  1804          delete x["focused"];
  1805        }
  1806        if (A.load.Bool(ptr + 216)) {
  1807          x["visibleOnAllWorkspaces"] = A.load.Bool(ptr + 189);
  1808        } else {
  1809          delete x["visibleOnAllWorkspaces"];
  1810        }
  1811        x["lockScreenAction"] = A.load.Enum(ptr + 192, ["new_note"]);
  1812        return create === A.H.TRUE ? A.H.push(x) : ref;
  1813      },
  1814      "has_CanSetVisibleOnAllWorkspaces": (): heap.Ref<boolean> => {
  1815        if (WEBEXT?.app?.window && "canSetVisibleOnAllWorkspaces" in WEBEXT?.app?.window) {
  1816          return A.H.TRUE;
  1817        }
  1818        return A.H.FALSE;
  1819      },
  1820      "func_CanSetVisibleOnAllWorkspaces": (fn: Pointer): void => {
  1821        A.store.Ref(fn, WEBEXT.app.window.canSetVisibleOnAllWorkspaces);
  1822      },
  1823      "call_CanSetVisibleOnAllWorkspaces": (retPtr: Pointer): void => {
  1824        const _ret = WEBEXT.app.window.canSetVisibleOnAllWorkspaces();
  1825        A.store.Bool(retPtr, _ret);
  1826      },
  1827      "try_CanSetVisibleOnAllWorkspaces": (retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => {
  1828        try {
  1829          const _ret = WEBEXT.app.window.canSetVisibleOnAllWorkspaces();
  1830          A.store.Bool(retPtr, _ret);
  1831          return A.H.TRUE;
  1832        } catch (err: any) {
  1833          A.store.Ref(errPtr, err);
  1834          return A.H.FALSE;
  1835        }
  1836      },
  1837      "has_Create": (): heap.Ref<boolean> => {
  1838        if (WEBEXT?.app?.window && "create" in WEBEXT?.app?.window) {
  1839          return A.H.TRUE;
  1840        }
  1841        return A.H.FALSE;
  1842      },
  1843      "func_Create": (fn: Pointer): void => {
  1844        A.store.Ref(fn, WEBEXT.app.window.create);
  1845      },
  1846      "call_Create": (retPtr: Pointer, url: heap.Ref<object>, options: Pointer): void => {
  1847        const options_ffi = {};
  1848  
  1849        options_ffi["id"] = A.load.Ref(options + 0, undefined);
  1850        if (A.load.Bool(options + 4 + 40)) {
  1851          options_ffi["innerBounds"] = {};
  1852          if (A.load.Bool(options + 4 + 32)) {
  1853            options_ffi["innerBounds"]["left"] = A.load.Int32(options + 4 + 0);
  1854          }
  1855          if (A.load.Bool(options + 4 + 33)) {
  1856            options_ffi["innerBounds"]["top"] = A.load.Int32(options + 4 + 4);
  1857          }
  1858          if (A.load.Bool(options + 4 + 34)) {
  1859            options_ffi["innerBounds"]["width"] = A.load.Int32(options + 4 + 8);
  1860          }
  1861          if (A.load.Bool(options + 4 + 35)) {
  1862            options_ffi["innerBounds"]["height"] = A.load.Int32(options + 4 + 12);
  1863          }
  1864          if (A.load.Bool(options + 4 + 36)) {
  1865            options_ffi["innerBounds"]["minWidth"] = A.load.Int32(options + 4 + 16);
  1866          }
  1867          if (A.load.Bool(options + 4 + 37)) {
  1868            options_ffi["innerBounds"]["minHeight"] = A.load.Int32(options + 4 + 20);
  1869          }
  1870          if (A.load.Bool(options + 4 + 38)) {
  1871            options_ffi["innerBounds"]["maxWidth"] = A.load.Int32(options + 4 + 24);
  1872          }
  1873          if (A.load.Bool(options + 4 + 39)) {
  1874            options_ffi["innerBounds"]["maxHeight"] = A.load.Int32(options + 4 + 28);
  1875          }
  1876        }
  1877        if (A.load.Bool(options + 48 + 40)) {
  1878          options_ffi["outerBounds"] = {};
  1879          if (A.load.Bool(options + 48 + 32)) {
  1880            options_ffi["outerBounds"]["left"] = A.load.Int32(options + 48 + 0);
  1881          }
  1882          if (A.load.Bool(options + 48 + 33)) {
  1883            options_ffi["outerBounds"]["top"] = A.load.Int32(options + 48 + 4);
  1884          }
  1885          if (A.load.Bool(options + 48 + 34)) {
  1886            options_ffi["outerBounds"]["width"] = A.load.Int32(options + 48 + 8);
  1887          }
  1888          if (A.load.Bool(options + 48 + 35)) {
  1889            options_ffi["outerBounds"]["height"] = A.load.Int32(options + 48 + 12);
  1890          }
  1891          if (A.load.Bool(options + 48 + 36)) {
  1892            options_ffi["outerBounds"]["minWidth"] = A.load.Int32(options + 48 + 16);
  1893          }
  1894          if (A.load.Bool(options + 48 + 37)) {
  1895            options_ffi["outerBounds"]["minHeight"] = A.load.Int32(options + 48 + 20);
  1896          }
  1897          if (A.load.Bool(options + 48 + 38)) {
  1898            options_ffi["outerBounds"]["maxWidth"] = A.load.Int32(options + 48 + 24);
  1899          }
  1900          if (A.load.Bool(options + 48 + 39)) {
  1901            options_ffi["outerBounds"]["maxHeight"] = A.load.Int32(options + 48 + 28);
  1902          }
  1903        }
  1904        if (A.load.Bool(options + 196)) {
  1905          options_ffi["defaultWidth"] = A.load.Int32(options + 92);
  1906        }
  1907        if (A.load.Bool(options + 197)) {
  1908          options_ffi["defaultHeight"] = A.load.Int32(options + 96);
  1909        }
  1910        if (A.load.Bool(options + 198)) {
  1911          options_ffi["defaultLeft"] = A.load.Int32(options + 100);
  1912        }
  1913        if (A.load.Bool(options + 199)) {
  1914          options_ffi["defaultTop"] = A.load.Int32(options + 104);
  1915        }
  1916        if (A.load.Bool(options + 200)) {
  1917          options_ffi["width"] = A.load.Int32(options + 108);
  1918        }
  1919        if (A.load.Bool(options + 201)) {
  1920          options_ffi["height"] = A.load.Int32(options + 112);
  1921        }
  1922        if (A.load.Bool(options + 202)) {
  1923          options_ffi["left"] = A.load.Int32(options + 116);
  1924        }
  1925        if (A.load.Bool(options + 203)) {
  1926          options_ffi["top"] = A.load.Int32(options + 120);
  1927        }
  1928        if (A.load.Bool(options + 204)) {
  1929          options_ffi["minWidth"] = A.load.Int32(options + 124);
  1930        }
  1931        if (A.load.Bool(options + 205)) {
  1932          options_ffi["minHeight"] = A.load.Int32(options + 128);
  1933        }
  1934        if (A.load.Bool(options + 206)) {
  1935          options_ffi["maxWidth"] = A.load.Int32(options + 132);
  1936        }
  1937        if (A.load.Bool(options + 207)) {
  1938          options_ffi["maxHeight"] = A.load.Int32(options + 136);
  1939        }
  1940        options_ffi["type"] = A.load.Enum(options + 140, ["shell", "panel"]);
  1941        if (A.load.Bool(options + 208)) {
  1942          options_ffi["ime"] = A.load.Bool(options + 144);
  1943        }
  1944        if (A.load.Bool(options + 209)) {
  1945          options_ffi["showInShelf"] = A.load.Bool(options + 145);
  1946        }
  1947        options_ffi["icon"] = A.load.Ref(options + 148, undefined);
  1948        options_ffi["frame"] = A.load.Ref(options + 152, undefined);
  1949        if (A.load.Bool(options + 156 + 20)) {
  1950          options_ffi["bounds"] = {};
  1951          if (A.load.Bool(options + 156 + 16)) {
  1952            options_ffi["bounds"]["left"] = A.load.Int32(options + 156 + 0);
  1953          }
  1954          if (A.load.Bool(options + 156 + 17)) {
  1955            options_ffi["bounds"]["top"] = A.load.Int32(options + 156 + 4);
  1956          }
  1957          if (A.load.Bool(options + 156 + 18)) {
  1958            options_ffi["bounds"]["width"] = A.load.Int32(options + 156 + 8);
  1959          }
  1960          if (A.load.Bool(options + 156 + 19)) {
  1961            options_ffi["bounds"]["height"] = A.load.Int32(options + 156 + 12);
  1962          }
  1963        }
  1964        if (A.load.Bool(options + 210)) {
  1965          options_ffi["alphaEnabled"] = A.load.Bool(options + 177);
  1966        }
  1967        options_ffi["state"] = A.load.Enum(options + 180, ["normal", "fullscreen", "maximized", "minimized"]);
  1968        if (A.load.Bool(options + 211)) {
  1969          options_ffi["hidden"] = A.load.Bool(options + 184);
  1970        }
  1971        if (A.load.Bool(options + 212)) {
  1972          options_ffi["resizable"] = A.load.Bool(options + 185);
  1973        }
  1974        if (A.load.Bool(options + 213)) {
  1975          options_ffi["singleton"] = A.load.Bool(options + 186);
  1976        }
  1977        if (A.load.Bool(options + 214)) {
  1978          options_ffi["alwaysOnTop"] = A.load.Bool(options + 187);
  1979        }
  1980        if (A.load.Bool(options + 215)) {
  1981          options_ffi["focused"] = A.load.Bool(options + 188);
  1982        }
  1983        if (A.load.Bool(options + 216)) {
  1984          options_ffi["visibleOnAllWorkspaces"] = A.load.Bool(options + 189);
  1985        }
  1986        options_ffi["lockScreenAction"] = A.load.Enum(options + 192, ["new_note"]);
  1987  
  1988        const _ret = WEBEXT.app.window.create(A.H.get<object>(url), options_ffi);
  1989        A.store.Ref(retPtr, _ret);
  1990      },
  1991      "try_Create": (retPtr: Pointer, errPtr: Pointer, url: heap.Ref<object>, options: Pointer): heap.Ref<boolean> => {
  1992        try {
  1993          const options_ffi = {};
  1994  
  1995          options_ffi["id"] = A.load.Ref(options + 0, undefined);
  1996          if (A.load.Bool(options + 4 + 40)) {
  1997            options_ffi["innerBounds"] = {};
  1998            if (A.load.Bool(options + 4 + 32)) {
  1999              options_ffi["innerBounds"]["left"] = A.load.Int32(options + 4 + 0);
  2000            }
  2001            if (A.load.Bool(options + 4 + 33)) {
  2002              options_ffi["innerBounds"]["top"] = A.load.Int32(options + 4 + 4);
  2003            }
  2004            if (A.load.Bool(options + 4 + 34)) {
  2005              options_ffi["innerBounds"]["width"] = A.load.Int32(options + 4 + 8);
  2006            }
  2007            if (A.load.Bool(options + 4 + 35)) {
  2008              options_ffi["innerBounds"]["height"] = A.load.Int32(options + 4 + 12);
  2009            }
  2010            if (A.load.Bool(options + 4 + 36)) {
  2011              options_ffi["innerBounds"]["minWidth"] = A.load.Int32(options + 4 + 16);
  2012            }
  2013            if (A.load.Bool(options + 4 + 37)) {
  2014              options_ffi["innerBounds"]["minHeight"] = A.load.Int32(options + 4 + 20);
  2015            }
  2016            if (A.load.Bool(options + 4 + 38)) {
  2017              options_ffi["innerBounds"]["maxWidth"] = A.load.Int32(options + 4 + 24);
  2018            }
  2019            if (A.load.Bool(options + 4 + 39)) {
  2020              options_ffi["innerBounds"]["maxHeight"] = A.load.Int32(options + 4 + 28);
  2021            }
  2022          }
  2023          if (A.load.Bool(options + 48 + 40)) {
  2024            options_ffi["outerBounds"] = {};
  2025            if (A.load.Bool(options + 48 + 32)) {
  2026              options_ffi["outerBounds"]["left"] = A.load.Int32(options + 48 + 0);
  2027            }
  2028            if (A.load.Bool(options + 48 + 33)) {
  2029              options_ffi["outerBounds"]["top"] = A.load.Int32(options + 48 + 4);
  2030            }
  2031            if (A.load.Bool(options + 48 + 34)) {
  2032              options_ffi["outerBounds"]["width"] = A.load.Int32(options + 48 + 8);
  2033            }
  2034            if (A.load.Bool(options + 48 + 35)) {
  2035              options_ffi["outerBounds"]["height"] = A.load.Int32(options + 48 + 12);
  2036            }
  2037            if (A.load.Bool(options + 48 + 36)) {
  2038              options_ffi["outerBounds"]["minWidth"] = A.load.Int32(options + 48 + 16);
  2039            }
  2040            if (A.load.Bool(options + 48 + 37)) {
  2041              options_ffi["outerBounds"]["minHeight"] = A.load.Int32(options + 48 + 20);
  2042            }
  2043            if (A.load.Bool(options + 48 + 38)) {
  2044              options_ffi["outerBounds"]["maxWidth"] = A.load.Int32(options + 48 + 24);
  2045            }
  2046            if (A.load.Bool(options + 48 + 39)) {
  2047              options_ffi["outerBounds"]["maxHeight"] = A.load.Int32(options + 48 + 28);
  2048            }
  2049          }
  2050          if (A.load.Bool(options + 196)) {
  2051            options_ffi["defaultWidth"] = A.load.Int32(options + 92);
  2052          }
  2053          if (A.load.Bool(options + 197)) {
  2054            options_ffi["defaultHeight"] = A.load.Int32(options + 96);
  2055          }
  2056          if (A.load.Bool(options + 198)) {
  2057            options_ffi["defaultLeft"] = A.load.Int32(options + 100);
  2058          }
  2059          if (A.load.Bool(options + 199)) {
  2060            options_ffi["defaultTop"] = A.load.Int32(options + 104);
  2061          }
  2062          if (A.load.Bool(options + 200)) {
  2063            options_ffi["width"] = A.load.Int32(options + 108);
  2064          }
  2065          if (A.load.Bool(options + 201)) {
  2066            options_ffi["height"] = A.load.Int32(options + 112);
  2067          }
  2068          if (A.load.Bool(options + 202)) {
  2069            options_ffi["left"] = A.load.Int32(options + 116);
  2070          }
  2071          if (A.load.Bool(options + 203)) {
  2072            options_ffi["top"] = A.load.Int32(options + 120);
  2073          }
  2074          if (A.load.Bool(options + 204)) {
  2075            options_ffi["minWidth"] = A.load.Int32(options + 124);
  2076          }
  2077          if (A.load.Bool(options + 205)) {
  2078            options_ffi["minHeight"] = A.load.Int32(options + 128);
  2079          }
  2080          if (A.load.Bool(options + 206)) {
  2081            options_ffi["maxWidth"] = A.load.Int32(options + 132);
  2082          }
  2083          if (A.load.Bool(options + 207)) {
  2084            options_ffi["maxHeight"] = A.load.Int32(options + 136);
  2085          }
  2086          options_ffi["type"] = A.load.Enum(options + 140, ["shell", "panel"]);
  2087          if (A.load.Bool(options + 208)) {
  2088            options_ffi["ime"] = A.load.Bool(options + 144);
  2089          }
  2090          if (A.load.Bool(options + 209)) {
  2091            options_ffi["showInShelf"] = A.load.Bool(options + 145);
  2092          }
  2093          options_ffi["icon"] = A.load.Ref(options + 148, undefined);
  2094          options_ffi["frame"] = A.load.Ref(options + 152, undefined);
  2095          if (A.load.Bool(options + 156 + 20)) {
  2096            options_ffi["bounds"] = {};
  2097            if (A.load.Bool(options + 156 + 16)) {
  2098              options_ffi["bounds"]["left"] = A.load.Int32(options + 156 + 0);
  2099            }
  2100            if (A.load.Bool(options + 156 + 17)) {
  2101              options_ffi["bounds"]["top"] = A.load.Int32(options + 156 + 4);
  2102            }
  2103            if (A.load.Bool(options + 156 + 18)) {
  2104              options_ffi["bounds"]["width"] = A.load.Int32(options + 156 + 8);
  2105            }
  2106            if (A.load.Bool(options + 156 + 19)) {
  2107              options_ffi["bounds"]["height"] = A.load.Int32(options + 156 + 12);
  2108            }
  2109          }
  2110          if (A.load.Bool(options + 210)) {
  2111            options_ffi["alphaEnabled"] = A.load.Bool(options + 177);
  2112          }
  2113          options_ffi["state"] = A.load.Enum(options + 180, ["normal", "fullscreen", "maximized", "minimized"]);
  2114          if (A.load.Bool(options + 211)) {
  2115            options_ffi["hidden"] = A.load.Bool(options + 184);
  2116          }
  2117          if (A.load.Bool(options + 212)) {
  2118            options_ffi["resizable"] = A.load.Bool(options + 185);
  2119          }
  2120          if (A.load.Bool(options + 213)) {
  2121            options_ffi["singleton"] = A.load.Bool(options + 186);
  2122          }
  2123          if (A.load.Bool(options + 214)) {
  2124            options_ffi["alwaysOnTop"] = A.load.Bool(options + 187);
  2125          }
  2126          if (A.load.Bool(options + 215)) {
  2127            options_ffi["focused"] = A.load.Bool(options + 188);
  2128          }
  2129          if (A.load.Bool(options + 216)) {
  2130            options_ffi["visibleOnAllWorkspaces"] = A.load.Bool(options + 189);
  2131          }
  2132          options_ffi["lockScreenAction"] = A.load.Enum(options + 192, ["new_note"]);
  2133  
  2134          const _ret = WEBEXT.app.window.create(A.H.get<object>(url), options_ffi);
  2135          A.store.Ref(retPtr, _ret);
  2136          return A.H.TRUE;
  2137        } catch (err: any) {
  2138          A.store.Ref(errPtr, err);
  2139          return A.H.FALSE;
  2140        }
  2141      },
  2142      "has_Current": (): heap.Ref<boolean> => {
  2143        if (WEBEXT?.app?.window && "current" in WEBEXT?.app?.window) {
  2144          return A.H.TRUE;
  2145        }
  2146        return A.H.FALSE;
  2147      },
  2148      "func_Current": (fn: Pointer): void => {
  2149        A.store.Ref(fn, WEBEXT.app.window.current);
  2150      },
  2151      "call_Current": (retPtr: Pointer): void => {
  2152        const _ret = WEBEXT.app.window.current();
  2153        A.store.Ref(retPtr, _ret);
  2154      },
  2155      "try_Current": (retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => {
  2156        try {
  2157          const _ret = WEBEXT.app.window.current();
  2158          A.store.Ref(retPtr, _ret);
  2159          return A.H.TRUE;
  2160        } catch (err: any) {
  2161          A.store.Ref(errPtr, err);
  2162          return A.H.FALSE;
  2163        }
  2164      },
  2165      "has_Get": (): heap.Ref<boolean> => {
  2166        if (WEBEXT?.app?.window && "get" in WEBEXT?.app?.window) {
  2167          return A.H.TRUE;
  2168        }
  2169        return A.H.FALSE;
  2170      },
  2171      "func_Get": (fn: Pointer): void => {
  2172        A.store.Ref(fn, WEBEXT.app.window.get);
  2173      },
  2174      "call_Get": (retPtr: Pointer, id: heap.Ref<object>): void => {
  2175        const _ret = WEBEXT.app.window.get(A.H.get<object>(id));
  2176        A.store.Ref(retPtr, _ret);
  2177      },
  2178      "try_Get": (retPtr: Pointer, errPtr: Pointer, id: heap.Ref<object>): heap.Ref<boolean> => {
  2179        try {
  2180          const _ret = WEBEXT.app.window.get(A.H.get<object>(id));
  2181          A.store.Ref(retPtr, _ret);
  2182          return A.H.TRUE;
  2183        } catch (err: any) {
  2184          A.store.Ref(errPtr, err);
  2185          return A.H.FALSE;
  2186        }
  2187      },
  2188      "has_GetAll": (): heap.Ref<boolean> => {
  2189        if (WEBEXT?.app?.window && "getAll" in WEBEXT?.app?.window) {
  2190          return A.H.TRUE;
  2191        }
  2192        return A.H.FALSE;
  2193      },
  2194      "func_GetAll": (fn: Pointer): void => {
  2195        A.store.Ref(fn, WEBEXT.app.window.getAll);
  2196      },
  2197      "call_GetAll": (retPtr: Pointer): void => {
  2198        const _ret = WEBEXT.app.window.getAll();
  2199        A.store.Ref(retPtr, _ret);
  2200      },
  2201      "try_GetAll": (retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => {
  2202        try {
  2203          const _ret = WEBEXT.app.window.getAll();
  2204          A.store.Ref(retPtr, _ret);
  2205          return A.H.TRUE;
  2206        } catch (err: any) {
  2207          A.store.Ref(errPtr, err);
  2208          return A.H.FALSE;
  2209        }
  2210      },
  2211      "has_InitializeAppWindow": (): heap.Ref<boolean> => {
  2212        if (WEBEXT?.app?.window && "initializeAppWindow" in WEBEXT?.app?.window) {
  2213          return A.H.TRUE;
  2214        }
  2215        return A.H.FALSE;
  2216      },
  2217      "func_InitializeAppWindow": (fn: Pointer): void => {
  2218        A.store.Ref(fn, WEBEXT.app.window.initializeAppWindow);
  2219      },
  2220      "call_InitializeAppWindow": (retPtr: Pointer, state: heap.Ref<object>): void => {
  2221        const _ret = WEBEXT.app.window.initializeAppWindow(A.H.get<object>(state));
  2222      },
  2223      "try_InitializeAppWindow": (retPtr: Pointer, errPtr: Pointer, state: heap.Ref<object>): heap.Ref<boolean> => {
  2224        try {
  2225          const _ret = WEBEXT.app.window.initializeAppWindow(A.H.get<object>(state));
  2226          return A.H.TRUE;
  2227        } catch (err: any) {
  2228          A.store.Ref(errPtr, err);
  2229          return A.H.FALSE;
  2230        }
  2231      },
  2232      "has_OnAlphaEnabledChanged": (): heap.Ref<boolean> => {
  2233        if (WEBEXT?.app?.window?.onAlphaEnabledChanged && "addListener" in WEBEXT?.app?.window?.onAlphaEnabledChanged) {
  2234          return A.H.TRUE;
  2235        }
  2236        return A.H.FALSE;
  2237      },
  2238      "func_OnAlphaEnabledChanged": (fn: Pointer): void => {
  2239        A.store.Ref(fn, WEBEXT.app.window.onAlphaEnabledChanged.addListener);
  2240      },
  2241      "call_OnAlphaEnabledChanged": (retPtr: Pointer, callback: heap.Ref<object>): void => {
  2242        const _ret = WEBEXT.app.window.onAlphaEnabledChanged.addListener(A.H.get<object>(callback));
  2243      },
  2244      "try_OnAlphaEnabledChanged": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
  2245        try {
  2246          const _ret = WEBEXT.app.window.onAlphaEnabledChanged.addListener(A.H.get<object>(callback));
  2247          return A.H.TRUE;
  2248        } catch (err: any) {
  2249          A.store.Ref(errPtr, err);
  2250          return A.H.FALSE;
  2251        }
  2252      },
  2253      "has_OffAlphaEnabledChanged": (): heap.Ref<boolean> => {
  2254        if (
  2255          WEBEXT?.app?.window?.onAlphaEnabledChanged &&
  2256          "removeListener" in WEBEXT?.app?.window?.onAlphaEnabledChanged
  2257        ) {
  2258          return A.H.TRUE;
  2259        }
  2260        return A.H.FALSE;
  2261      },
  2262      "func_OffAlphaEnabledChanged": (fn: Pointer): void => {
  2263        A.store.Ref(fn, WEBEXT.app.window.onAlphaEnabledChanged.removeListener);
  2264      },
  2265      "call_OffAlphaEnabledChanged": (retPtr: Pointer, callback: heap.Ref<object>): void => {
  2266        const _ret = WEBEXT.app.window.onAlphaEnabledChanged.removeListener(A.H.get<object>(callback));
  2267      },
  2268      "try_OffAlphaEnabledChanged": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
  2269        try {
  2270          const _ret = WEBEXT.app.window.onAlphaEnabledChanged.removeListener(A.H.get<object>(callback));
  2271          return A.H.TRUE;
  2272        } catch (err: any) {
  2273          A.store.Ref(errPtr, err);
  2274          return A.H.FALSE;
  2275        }
  2276      },
  2277      "has_HasOnAlphaEnabledChanged": (): heap.Ref<boolean> => {
  2278        if (WEBEXT?.app?.window?.onAlphaEnabledChanged && "hasListener" in WEBEXT?.app?.window?.onAlphaEnabledChanged) {
  2279          return A.H.TRUE;
  2280        }
  2281        return A.H.FALSE;
  2282      },
  2283      "func_HasOnAlphaEnabledChanged": (fn: Pointer): void => {
  2284        A.store.Ref(fn, WEBEXT.app.window.onAlphaEnabledChanged.hasListener);
  2285      },
  2286      "call_HasOnAlphaEnabledChanged": (retPtr: Pointer, callback: heap.Ref<object>): void => {
  2287        const _ret = WEBEXT.app.window.onAlphaEnabledChanged.hasListener(A.H.get<object>(callback));
  2288        A.store.Bool(retPtr, _ret);
  2289      },
  2290      "try_HasOnAlphaEnabledChanged": (
  2291        retPtr: Pointer,
  2292        errPtr: Pointer,
  2293        callback: heap.Ref<object>
  2294      ): heap.Ref<boolean> => {
  2295        try {
  2296          const _ret = WEBEXT.app.window.onAlphaEnabledChanged.hasListener(A.H.get<object>(callback));
  2297          A.store.Bool(retPtr, _ret);
  2298          return A.H.TRUE;
  2299        } catch (err: any) {
  2300          A.store.Ref(errPtr, err);
  2301          return A.H.FALSE;
  2302        }
  2303      },
  2304      "has_OnBoundsChanged": (): heap.Ref<boolean> => {
  2305        if (WEBEXT?.app?.window?.onBoundsChanged && "addListener" in WEBEXT?.app?.window?.onBoundsChanged) {
  2306          return A.H.TRUE;
  2307        }
  2308        return A.H.FALSE;
  2309      },
  2310      "func_OnBoundsChanged": (fn: Pointer): void => {
  2311        A.store.Ref(fn, WEBEXT.app.window.onBoundsChanged.addListener);
  2312      },
  2313      "call_OnBoundsChanged": (retPtr: Pointer, callback: heap.Ref<object>): void => {
  2314        const _ret = WEBEXT.app.window.onBoundsChanged.addListener(A.H.get<object>(callback));
  2315      },
  2316      "try_OnBoundsChanged": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
  2317        try {
  2318          const _ret = WEBEXT.app.window.onBoundsChanged.addListener(A.H.get<object>(callback));
  2319          return A.H.TRUE;
  2320        } catch (err: any) {
  2321          A.store.Ref(errPtr, err);
  2322          return A.H.FALSE;
  2323        }
  2324      },
  2325      "has_OffBoundsChanged": (): heap.Ref<boolean> => {
  2326        if (WEBEXT?.app?.window?.onBoundsChanged && "removeListener" in WEBEXT?.app?.window?.onBoundsChanged) {
  2327          return A.H.TRUE;
  2328        }
  2329        return A.H.FALSE;
  2330      },
  2331      "func_OffBoundsChanged": (fn: Pointer): void => {
  2332        A.store.Ref(fn, WEBEXT.app.window.onBoundsChanged.removeListener);
  2333      },
  2334      "call_OffBoundsChanged": (retPtr: Pointer, callback: heap.Ref<object>): void => {
  2335        const _ret = WEBEXT.app.window.onBoundsChanged.removeListener(A.H.get<object>(callback));
  2336      },
  2337      "try_OffBoundsChanged": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
  2338        try {
  2339          const _ret = WEBEXT.app.window.onBoundsChanged.removeListener(A.H.get<object>(callback));
  2340          return A.H.TRUE;
  2341        } catch (err: any) {
  2342          A.store.Ref(errPtr, err);
  2343          return A.H.FALSE;
  2344        }
  2345      },
  2346      "has_HasOnBoundsChanged": (): heap.Ref<boolean> => {
  2347        if (WEBEXT?.app?.window?.onBoundsChanged && "hasListener" in WEBEXT?.app?.window?.onBoundsChanged) {
  2348          return A.H.TRUE;
  2349        }
  2350        return A.H.FALSE;
  2351      },
  2352      "func_HasOnBoundsChanged": (fn: Pointer): void => {
  2353        A.store.Ref(fn, WEBEXT.app.window.onBoundsChanged.hasListener);
  2354      },
  2355      "call_HasOnBoundsChanged": (retPtr: Pointer, callback: heap.Ref<object>): void => {
  2356        const _ret = WEBEXT.app.window.onBoundsChanged.hasListener(A.H.get<object>(callback));
  2357        A.store.Bool(retPtr, _ret);
  2358      },
  2359      "try_HasOnBoundsChanged": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
  2360        try {
  2361          const _ret = WEBEXT.app.window.onBoundsChanged.hasListener(A.H.get<object>(callback));
  2362          A.store.Bool(retPtr, _ret);
  2363          return A.H.TRUE;
  2364        } catch (err: any) {
  2365          A.store.Ref(errPtr, err);
  2366          return A.H.FALSE;
  2367        }
  2368      },
  2369      "has_OnClosed": (): heap.Ref<boolean> => {
  2370        if (WEBEXT?.app?.window?.onClosed && "addListener" in WEBEXT?.app?.window?.onClosed) {
  2371          return A.H.TRUE;
  2372        }
  2373        return A.H.FALSE;
  2374      },
  2375      "func_OnClosed": (fn: Pointer): void => {
  2376        A.store.Ref(fn, WEBEXT.app.window.onClosed.addListener);
  2377      },
  2378      "call_OnClosed": (retPtr: Pointer, callback: heap.Ref<object>): void => {
  2379        const _ret = WEBEXT.app.window.onClosed.addListener(A.H.get<object>(callback));
  2380      },
  2381      "try_OnClosed": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
  2382        try {
  2383          const _ret = WEBEXT.app.window.onClosed.addListener(A.H.get<object>(callback));
  2384          return A.H.TRUE;
  2385        } catch (err: any) {
  2386          A.store.Ref(errPtr, err);
  2387          return A.H.FALSE;
  2388        }
  2389      },
  2390      "has_OffClosed": (): heap.Ref<boolean> => {
  2391        if (WEBEXT?.app?.window?.onClosed && "removeListener" in WEBEXT?.app?.window?.onClosed) {
  2392          return A.H.TRUE;
  2393        }
  2394        return A.H.FALSE;
  2395      },
  2396      "func_OffClosed": (fn: Pointer): void => {
  2397        A.store.Ref(fn, WEBEXT.app.window.onClosed.removeListener);
  2398      },
  2399      "call_OffClosed": (retPtr: Pointer, callback: heap.Ref<object>): void => {
  2400        const _ret = WEBEXT.app.window.onClosed.removeListener(A.H.get<object>(callback));
  2401      },
  2402      "try_OffClosed": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
  2403        try {
  2404          const _ret = WEBEXT.app.window.onClosed.removeListener(A.H.get<object>(callback));
  2405          return A.H.TRUE;
  2406        } catch (err: any) {
  2407          A.store.Ref(errPtr, err);
  2408          return A.H.FALSE;
  2409        }
  2410      },
  2411      "has_HasOnClosed": (): heap.Ref<boolean> => {
  2412        if (WEBEXT?.app?.window?.onClosed && "hasListener" in WEBEXT?.app?.window?.onClosed) {
  2413          return A.H.TRUE;
  2414        }
  2415        return A.H.FALSE;
  2416      },
  2417      "func_HasOnClosed": (fn: Pointer): void => {
  2418        A.store.Ref(fn, WEBEXT.app.window.onClosed.hasListener);
  2419      },
  2420      "call_HasOnClosed": (retPtr: Pointer, callback: heap.Ref<object>): void => {
  2421        const _ret = WEBEXT.app.window.onClosed.hasListener(A.H.get<object>(callback));
  2422        A.store.Bool(retPtr, _ret);
  2423      },
  2424      "try_HasOnClosed": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
  2425        try {
  2426          const _ret = WEBEXT.app.window.onClosed.hasListener(A.H.get<object>(callback));
  2427          A.store.Bool(retPtr, _ret);
  2428          return A.H.TRUE;
  2429        } catch (err: any) {
  2430          A.store.Ref(errPtr, err);
  2431          return A.H.FALSE;
  2432        }
  2433      },
  2434      "has_OnFullscreened": (): heap.Ref<boolean> => {
  2435        if (WEBEXT?.app?.window?.onFullscreened && "addListener" in WEBEXT?.app?.window?.onFullscreened) {
  2436          return A.H.TRUE;
  2437        }
  2438        return A.H.FALSE;
  2439      },
  2440      "func_OnFullscreened": (fn: Pointer): void => {
  2441        A.store.Ref(fn, WEBEXT.app.window.onFullscreened.addListener);
  2442      },
  2443      "call_OnFullscreened": (retPtr: Pointer, callback: heap.Ref<object>): void => {
  2444        const _ret = WEBEXT.app.window.onFullscreened.addListener(A.H.get<object>(callback));
  2445      },
  2446      "try_OnFullscreened": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
  2447        try {
  2448          const _ret = WEBEXT.app.window.onFullscreened.addListener(A.H.get<object>(callback));
  2449          return A.H.TRUE;
  2450        } catch (err: any) {
  2451          A.store.Ref(errPtr, err);
  2452          return A.H.FALSE;
  2453        }
  2454      },
  2455      "has_OffFullscreened": (): heap.Ref<boolean> => {
  2456        if (WEBEXT?.app?.window?.onFullscreened && "removeListener" in WEBEXT?.app?.window?.onFullscreened) {
  2457          return A.H.TRUE;
  2458        }
  2459        return A.H.FALSE;
  2460      },
  2461      "func_OffFullscreened": (fn: Pointer): void => {
  2462        A.store.Ref(fn, WEBEXT.app.window.onFullscreened.removeListener);
  2463      },
  2464      "call_OffFullscreened": (retPtr: Pointer, callback: heap.Ref<object>): void => {
  2465        const _ret = WEBEXT.app.window.onFullscreened.removeListener(A.H.get<object>(callback));
  2466      },
  2467      "try_OffFullscreened": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
  2468        try {
  2469          const _ret = WEBEXT.app.window.onFullscreened.removeListener(A.H.get<object>(callback));
  2470          return A.H.TRUE;
  2471        } catch (err: any) {
  2472          A.store.Ref(errPtr, err);
  2473          return A.H.FALSE;
  2474        }
  2475      },
  2476      "has_HasOnFullscreened": (): heap.Ref<boolean> => {
  2477        if (WEBEXT?.app?.window?.onFullscreened && "hasListener" in WEBEXT?.app?.window?.onFullscreened) {
  2478          return A.H.TRUE;
  2479        }
  2480        return A.H.FALSE;
  2481      },
  2482      "func_HasOnFullscreened": (fn: Pointer): void => {
  2483        A.store.Ref(fn, WEBEXT.app.window.onFullscreened.hasListener);
  2484      },
  2485      "call_HasOnFullscreened": (retPtr: Pointer, callback: heap.Ref<object>): void => {
  2486        const _ret = WEBEXT.app.window.onFullscreened.hasListener(A.H.get<object>(callback));
  2487        A.store.Bool(retPtr, _ret);
  2488      },
  2489      "try_HasOnFullscreened": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
  2490        try {
  2491          const _ret = WEBEXT.app.window.onFullscreened.hasListener(A.H.get<object>(callback));
  2492          A.store.Bool(retPtr, _ret);
  2493          return A.H.TRUE;
  2494        } catch (err: any) {
  2495          A.store.Ref(errPtr, err);
  2496          return A.H.FALSE;
  2497        }
  2498      },
  2499      "has_OnMaximized": (): heap.Ref<boolean> => {
  2500        if (WEBEXT?.app?.window?.onMaximized && "addListener" in WEBEXT?.app?.window?.onMaximized) {
  2501          return A.H.TRUE;
  2502        }
  2503        return A.H.FALSE;
  2504      },
  2505      "func_OnMaximized": (fn: Pointer): void => {
  2506        A.store.Ref(fn, WEBEXT.app.window.onMaximized.addListener);
  2507      },
  2508      "call_OnMaximized": (retPtr: Pointer, callback: heap.Ref<object>): void => {
  2509        const _ret = WEBEXT.app.window.onMaximized.addListener(A.H.get<object>(callback));
  2510      },
  2511      "try_OnMaximized": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
  2512        try {
  2513          const _ret = WEBEXT.app.window.onMaximized.addListener(A.H.get<object>(callback));
  2514          return A.H.TRUE;
  2515        } catch (err: any) {
  2516          A.store.Ref(errPtr, err);
  2517          return A.H.FALSE;
  2518        }
  2519      },
  2520      "has_OffMaximized": (): heap.Ref<boolean> => {
  2521        if (WEBEXT?.app?.window?.onMaximized && "removeListener" in WEBEXT?.app?.window?.onMaximized) {
  2522          return A.H.TRUE;
  2523        }
  2524        return A.H.FALSE;
  2525      },
  2526      "func_OffMaximized": (fn: Pointer): void => {
  2527        A.store.Ref(fn, WEBEXT.app.window.onMaximized.removeListener);
  2528      },
  2529      "call_OffMaximized": (retPtr: Pointer, callback: heap.Ref<object>): void => {
  2530        const _ret = WEBEXT.app.window.onMaximized.removeListener(A.H.get<object>(callback));
  2531      },
  2532      "try_OffMaximized": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
  2533        try {
  2534          const _ret = WEBEXT.app.window.onMaximized.removeListener(A.H.get<object>(callback));
  2535          return A.H.TRUE;
  2536        } catch (err: any) {
  2537          A.store.Ref(errPtr, err);
  2538          return A.H.FALSE;
  2539        }
  2540      },
  2541      "has_HasOnMaximized": (): heap.Ref<boolean> => {
  2542        if (WEBEXT?.app?.window?.onMaximized && "hasListener" in WEBEXT?.app?.window?.onMaximized) {
  2543          return A.H.TRUE;
  2544        }
  2545        return A.H.FALSE;
  2546      },
  2547      "func_HasOnMaximized": (fn: Pointer): void => {
  2548        A.store.Ref(fn, WEBEXT.app.window.onMaximized.hasListener);
  2549      },
  2550      "call_HasOnMaximized": (retPtr: Pointer, callback: heap.Ref<object>): void => {
  2551        const _ret = WEBEXT.app.window.onMaximized.hasListener(A.H.get<object>(callback));
  2552        A.store.Bool(retPtr, _ret);
  2553      },
  2554      "try_HasOnMaximized": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
  2555        try {
  2556          const _ret = WEBEXT.app.window.onMaximized.hasListener(A.H.get<object>(callback));
  2557          A.store.Bool(retPtr, _ret);
  2558          return A.H.TRUE;
  2559        } catch (err: any) {
  2560          A.store.Ref(errPtr, err);
  2561          return A.H.FALSE;
  2562        }
  2563      },
  2564      "has_OnMinimized": (): heap.Ref<boolean> => {
  2565        if (WEBEXT?.app?.window?.onMinimized && "addListener" in WEBEXT?.app?.window?.onMinimized) {
  2566          return A.H.TRUE;
  2567        }
  2568        return A.H.FALSE;
  2569      },
  2570      "func_OnMinimized": (fn: Pointer): void => {
  2571        A.store.Ref(fn, WEBEXT.app.window.onMinimized.addListener);
  2572      },
  2573      "call_OnMinimized": (retPtr: Pointer, callback: heap.Ref<object>): void => {
  2574        const _ret = WEBEXT.app.window.onMinimized.addListener(A.H.get<object>(callback));
  2575      },
  2576      "try_OnMinimized": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
  2577        try {
  2578          const _ret = WEBEXT.app.window.onMinimized.addListener(A.H.get<object>(callback));
  2579          return A.H.TRUE;
  2580        } catch (err: any) {
  2581          A.store.Ref(errPtr, err);
  2582          return A.H.FALSE;
  2583        }
  2584      },
  2585      "has_OffMinimized": (): heap.Ref<boolean> => {
  2586        if (WEBEXT?.app?.window?.onMinimized && "removeListener" in WEBEXT?.app?.window?.onMinimized) {
  2587          return A.H.TRUE;
  2588        }
  2589        return A.H.FALSE;
  2590      },
  2591      "func_OffMinimized": (fn: Pointer): void => {
  2592        A.store.Ref(fn, WEBEXT.app.window.onMinimized.removeListener);
  2593      },
  2594      "call_OffMinimized": (retPtr: Pointer, callback: heap.Ref<object>): void => {
  2595        const _ret = WEBEXT.app.window.onMinimized.removeListener(A.H.get<object>(callback));
  2596      },
  2597      "try_OffMinimized": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
  2598        try {
  2599          const _ret = WEBEXT.app.window.onMinimized.removeListener(A.H.get<object>(callback));
  2600          return A.H.TRUE;
  2601        } catch (err: any) {
  2602          A.store.Ref(errPtr, err);
  2603          return A.H.FALSE;
  2604        }
  2605      },
  2606      "has_HasOnMinimized": (): heap.Ref<boolean> => {
  2607        if (WEBEXT?.app?.window?.onMinimized && "hasListener" in WEBEXT?.app?.window?.onMinimized) {
  2608          return A.H.TRUE;
  2609        }
  2610        return A.H.FALSE;
  2611      },
  2612      "func_HasOnMinimized": (fn: Pointer): void => {
  2613        A.store.Ref(fn, WEBEXT.app.window.onMinimized.hasListener);
  2614      },
  2615      "call_HasOnMinimized": (retPtr: Pointer, callback: heap.Ref<object>): void => {
  2616        const _ret = WEBEXT.app.window.onMinimized.hasListener(A.H.get<object>(callback));
  2617        A.store.Bool(retPtr, _ret);
  2618      },
  2619      "try_HasOnMinimized": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
  2620        try {
  2621          const _ret = WEBEXT.app.window.onMinimized.hasListener(A.H.get<object>(callback));
  2622          A.store.Bool(retPtr, _ret);
  2623          return A.H.TRUE;
  2624        } catch (err: any) {
  2625          A.store.Ref(errPtr, err);
  2626          return A.H.FALSE;
  2627        }
  2628      },
  2629      "has_OnRestored": (): heap.Ref<boolean> => {
  2630        if (WEBEXT?.app?.window?.onRestored && "addListener" in WEBEXT?.app?.window?.onRestored) {
  2631          return A.H.TRUE;
  2632        }
  2633        return A.H.FALSE;
  2634      },
  2635      "func_OnRestored": (fn: Pointer): void => {
  2636        A.store.Ref(fn, WEBEXT.app.window.onRestored.addListener);
  2637      },
  2638      "call_OnRestored": (retPtr: Pointer, callback: heap.Ref<object>): void => {
  2639        const _ret = WEBEXT.app.window.onRestored.addListener(A.H.get<object>(callback));
  2640      },
  2641      "try_OnRestored": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
  2642        try {
  2643          const _ret = WEBEXT.app.window.onRestored.addListener(A.H.get<object>(callback));
  2644          return A.H.TRUE;
  2645        } catch (err: any) {
  2646          A.store.Ref(errPtr, err);
  2647          return A.H.FALSE;
  2648        }
  2649      },
  2650      "has_OffRestored": (): heap.Ref<boolean> => {
  2651        if (WEBEXT?.app?.window?.onRestored && "removeListener" in WEBEXT?.app?.window?.onRestored) {
  2652          return A.H.TRUE;
  2653        }
  2654        return A.H.FALSE;
  2655      },
  2656      "func_OffRestored": (fn: Pointer): void => {
  2657        A.store.Ref(fn, WEBEXT.app.window.onRestored.removeListener);
  2658      },
  2659      "call_OffRestored": (retPtr: Pointer, callback: heap.Ref<object>): void => {
  2660        const _ret = WEBEXT.app.window.onRestored.removeListener(A.H.get<object>(callback));
  2661      },
  2662      "try_OffRestored": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
  2663        try {
  2664          const _ret = WEBEXT.app.window.onRestored.removeListener(A.H.get<object>(callback));
  2665          return A.H.TRUE;
  2666        } catch (err: any) {
  2667          A.store.Ref(errPtr, err);
  2668          return A.H.FALSE;
  2669        }
  2670      },
  2671      "has_HasOnRestored": (): heap.Ref<boolean> => {
  2672        if (WEBEXT?.app?.window?.onRestored && "hasListener" in WEBEXT?.app?.window?.onRestored) {
  2673          return A.H.TRUE;
  2674        }
  2675        return A.H.FALSE;
  2676      },
  2677      "func_HasOnRestored": (fn: Pointer): void => {
  2678        A.store.Ref(fn, WEBEXT.app.window.onRestored.hasListener);
  2679      },
  2680      "call_HasOnRestored": (retPtr: Pointer, callback: heap.Ref<object>): void => {
  2681        const _ret = WEBEXT.app.window.onRestored.hasListener(A.H.get<object>(callback));
  2682        A.store.Bool(retPtr, _ret);
  2683      },
  2684      "try_HasOnRestored": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
  2685        try {
  2686          const _ret = WEBEXT.app.window.onRestored.hasListener(A.H.get<object>(callback));
  2687          A.store.Bool(retPtr, _ret);
  2688          return A.H.TRUE;
  2689        } catch (err: any) {
  2690          A.store.Ref(errPtr, err);
  2691          return A.H.FALSE;
  2692        }
  2693      },
  2694    };
  2695  });