github.com/primecitizens/pcz/std@v0.2.1/plat/js/webext/automationinternal/bindings/ffi_bindings.ts (about) 1 import { importModule, Application, heap, Pointer } from "@ffi"; 2 3 importModule("plat/js/webext/automationinternal", (A: Application) => { 4 const WEBEXT = typeof globalThis.browser === "undefined" ? globalThis.chrome : globalThis.browser; 5 6 return { 7 "store_AXEventParams": (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 + 40, false); 12 A.store.Ref(ptr + 0, undefined); 13 A.store.Bool(ptr + 36, false); 14 A.store.Int32(ptr + 4, 0); 15 A.store.Ref(ptr + 8, undefined); 16 A.store.Ref(ptr + 12, undefined); 17 A.store.Bool(ptr + 37, false); 18 A.store.Float64(ptr + 16, 0); 19 A.store.Bool(ptr + 38, false); 20 A.store.Float64(ptr + 24, 0); 21 A.store.Bool(ptr + 39, false); 22 A.store.Int32(ptr + 32, 0); 23 } else { 24 A.store.Bool(ptr + 40, true); 25 A.store.Ref(ptr + 0, x["treeID"]); 26 A.store.Bool(ptr + 36, "targetID" in x ? true : false); 27 A.store.Int32(ptr + 4, x["targetID"] === undefined ? 0 : (x["targetID"] as number)); 28 A.store.Ref(ptr + 8, x["eventType"]); 29 A.store.Ref(ptr + 12, x["eventFrom"]); 30 A.store.Bool(ptr + 37, "mouseX" in x ? true : false); 31 A.store.Float64(ptr + 16, x["mouseX"] === undefined ? 0 : (x["mouseX"] as number)); 32 A.store.Bool(ptr + 38, "mouseY" in x ? true : false); 33 A.store.Float64(ptr + 24, x["mouseY"] === undefined ? 0 : (x["mouseY"] as number)); 34 A.store.Bool(ptr + 39, "actionRequestID" in x ? true : false); 35 A.store.Int32(ptr + 32, x["actionRequestID"] === undefined ? 0 : (x["actionRequestID"] as number)); 36 } 37 }, 38 "load_AXEventParams": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 39 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 40 41 x["treeID"] = A.load.Ref(ptr + 0, undefined); 42 if (A.load.Bool(ptr + 36)) { 43 x["targetID"] = A.load.Int32(ptr + 4); 44 } else { 45 delete x["targetID"]; 46 } 47 x["eventType"] = A.load.Ref(ptr + 8, undefined); 48 x["eventFrom"] = A.load.Ref(ptr + 12, undefined); 49 if (A.load.Bool(ptr + 37)) { 50 x["mouseX"] = A.load.Float64(ptr + 16); 51 } else { 52 delete x["mouseX"]; 53 } 54 if (A.load.Bool(ptr + 38)) { 55 x["mouseY"] = A.load.Float64(ptr + 24); 56 } else { 57 delete x["mouseY"]; 58 } 59 if (A.load.Bool(ptr + 39)) { 60 x["actionRequestID"] = A.load.Int32(ptr + 32); 61 } else { 62 delete x["actionRequestID"]; 63 } 64 return create === A.H.TRUE ? A.H.push(x) : ref; 65 }, 66 67 "store_AXTextLocationParams": (ptr: Pointer, ref: heap.Ref<any>) => { 68 const x = A.H.get<any>(ref); 69 70 if (typeof x === "undefined") { 71 A.store.Bool(ptr + 39, false); 72 A.store.Ref(ptr + 0, undefined); 73 A.store.Bool(ptr + 32, false); 74 A.store.Int32(ptr + 4, 0); 75 A.store.Bool(ptr + 33, false); 76 A.store.Bool(ptr + 8, false); 77 A.store.Bool(ptr + 34, false); 78 A.store.Int32(ptr + 12, 0); 79 A.store.Bool(ptr + 35, false); 80 A.store.Int32(ptr + 16, 0); 81 A.store.Bool(ptr + 36, false); 82 A.store.Int32(ptr + 20, 0); 83 A.store.Bool(ptr + 37, false); 84 A.store.Int32(ptr + 24, 0); 85 A.store.Bool(ptr + 38, false); 86 A.store.Int32(ptr + 28, 0); 87 } else { 88 A.store.Bool(ptr + 39, true); 89 A.store.Ref(ptr + 0, x["treeID"]); 90 A.store.Bool(ptr + 32, "nodeID" in x ? true : false); 91 A.store.Int32(ptr + 4, x["nodeID"] === undefined ? 0 : (x["nodeID"] as number)); 92 A.store.Bool(ptr + 33, "result" in x ? true : false); 93 A.store.Bool(ptr + 8, x["result"] ? true : false); 94 A.store.Bool(ptr + 34, "left" in x ? true : false); 95 A.store.Int32(ptr + 12, x["left"] === undefined ? 0 : (x["left"] as number)); 96 A.store.Bool(ptr + 35, "top" in x ? true : false); 97 A.store.Int32(ptr + 16, x["top"] === undefined ? 0 : (x["top"] as number)); 98 A.store.Bool(ptr + 36, "width" in x ? true : false); 99 A.store.Int32(ptr + 20, x["width"] === undefined ? 0 : (x["width"] as number)); 100 A.store.Bool(ptr + 37, "height" in x ? true : false); 101 A.store.Int32(ptr + 24, x["height"] === undefined ? 0 : (x["height"] as number)); 102 A.store.Bool(ptr + 38, "requestID" in x ? true : false); 103 A.store.Int32(ptr + 28, x["requestID"] === undefined ? 0 : (x["requestID"] as number)); 104 } 105 }, 106 "load_AXTextLocationParams": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 107 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 108 109 x["treeID"] = A.load.Ref(ptr + 0, undefined); 110 if (A.load.Bool(ptr + 32)) { 111 x["nodeID"] = A.load.Int32(ptr + 4); 112 } else { 113 delete x["nodeID"]; 114 } 115 if (A.load.Bool(ptr + 33)) { 116 x["result"] = A.load.Bool(ptr + 8); 117 } else { 118 delete x["result"]; 119 } 120 if (A.load.Bool(ptr + 34)) { 121 x["left"] = A.load.Int32(ptr + 12); 122 } else { 123 delete x["left"]; 124 } 125 if (A.load.Bool(ptr + 35)) { 126 x["top"] = A.load.Int32(ptr + 16); 127 } else { 128 delete x["top"]; 129 } 130 if (A.load.Bool(ptr + 36)) { 131 x["width"] = A.load.Int32(ptr + 20); 132 } else { 133 delete x["width"]; 134 } 135 if (A.load.Bool(ptr + 37)) { 136 x["height"] = A.load.Int32(ptr + 24); 137 } else { 138 delete x["height"]; 139 } 140 if (A.load.Bool(ptr + 38)) { 141 x["requestID"] = A.load.Int32(ptr + 28); 142 } else { 143 delete x["requestID"]; 144 } 145 return create === A.H.TRUE ? A.H.push(x) : ref; 146 }, 147 148 "store_GetImageDataParams": (ptr: Pointer, ref: heap.Ref<any>) => { 149 const x = A.H.get<any>(ref); 150 151 if (typeof x === "undefined") { 152 A.store.Bool(ptr + 10, false); 153 A.store.Bool(ptr + 8, false); 154 A.store.Int32(ptr + 0, 0); 155 A.store.Bool(ptr + 9, false); 156 A.store.Int32(ptr + 4, 0); 157 } else { 158 A.store.Bool(ptr + 10, true); 159 A.store.Bool(ptr + 8, "maxWidth" in x ? true : false); 160 A.store.Int32(ptr + 0, x["maxWidth"] === undefined ? 0 : (x["maxWidth"] as number)); 161 A.store.Bool(ptr + 9, "maxHeight" in x ? true : false); 162 A.store.Int32(ptr + 4, x["maxHeight"] === undefined ? 0 : (x["maxHeight"] as number)); 163 } 164 }, 165 "load_GetImageDataParams": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 166 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 167 168 if (A.load.Bool(ptr + 8)) { 169 x["maxWidth"] = A.load.Int32(ptr + 0); 170 } else { 171 delete x["maxWidth"]; 172 } 173 if (A.load.Bool(ptr + 9)) { 174 x["maxHeight"] = A.load.Int32(ptr + 4); 175 } else { 176 delete x["maxHeight"]; 177 } 178 return create === A.H.TRUE ? A.H.push(x) : ref; 179 }, 180 181 "store_GetTextLocationDataParams": (ptr: Pointer, ref: heap.Ref<any>) => { 182 const x = A.H.get<any>(ref); 183 184 if (typeof x === "undefined") { 185 A.store.Bool(ptr + 10, false); 186 A.store.Bool(ptr + 8, false); 187 A.store.Int32(ptr + 0, 0); 188 A.store.Bool(ptr + 9, false); 189 A.store.Int32(ptr + 4, 0); 190 } else { 191 A.store.Bool(ptr + 10, true); 192 A.store.Bool(ptr + 8, "startIndex" in x ? true : false); 193 A.store.Int32(ptr + 0, x["startIndex"] === undefined ? 0 : (x["startIndex"] as number)); 194 A.store.Bool(ptr + 9, "endIndex" in x ? true : false); 195 A.store.Int32(ptr + 4, x["endIndex"] === undefined ? 0 : (x["endIndex"] as number)); 196 } 197 }, 198 "load_GetTextLocationDataParams": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 199 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 200 201 if (A.load.Bool(ptr + 8)) { 202 x["startIndex"] = A.load.Int32(ptr + 0); 203 } else { 204 delete x["startIndex"]; 205 } 206 if (A.load.Bool(ptr + 9)) { 207 x["endIndex"] = A.load.Int32(ptr + 4); 208 } else { 209 delete x["endIndex"]; 210 } 211 return create === A.H.TRUE ? A.H.push(x) : ref; 212 }, 213 214 "store_HitTestParams": (ptr: Pointer, ref: heap.Ref<any>) => { 215 const x = A.H.get<any>(ref); 216 217 if (typeof x === "undefined") { 218 A.store.Bool(ptr + 14, false); 219 A.store.Bool(ptr + 12, false); 220 A.store.Int32(ptr + 0, 0); 221 A.store.Bool(ptr + 13, false); 222 A.store.Int32(ptr + 4, 0); 223 A.store.Ref(ptr + 8, undefined); 224 } else { 225 A.store.Bool(ptr + 14, true); 226 A.store.Bool(ptr + 12, "x" in x ? true : false); 227 A.store.Int32(ptr + 0, x["x"] === undefined ? 0 : (x["x"] as number)); 228 A.store.Bool(ptr + 13, "y" in x ? true : false); 229 A.store.Int32(ptr + 4, x["y"] === undefined ? 0 : (x["y"] as number)); 230 A.store.Ref(ptr + 8, x["eventToFire"]); 231 } 232 }, 233 "load_HitTestParams": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 234 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 235 236 if (A.load.Bool(ptr + 12)) { 237 x["x"] = A.load.Int32(ptr + 0); 238 } else { 239 delete x["x"]; 240 } 241 if (A.load.Bool(ptr + 13)) { 242 x["y"] = A.load.Int32(ptr + 4); 243 } else { 244 delete x["y"]; 245 } 246 x["eventToFire"] = A.load.Ref(ptr + 8, undefined); 247 return create === A.H.TRUE ? A.H.push(x) : ref; 248 }, 249 250 "store_PerformActionRequiredParams": (ptr: Pointer, ref: heap.Ref<any>) => { 251 const x = A.H.get<any>(ref); 252 253 if (typeof x === "undefined") { 254 A.store.Bool(ptr + 18, false); 255 A.store.Ref(ptr + 0, undefined); 256 A.store.Bool(ptr + 16, false); 257 A.store.Int32(ptr + 4, 0); 258 A.store.Ref(ptr + 8, undefined); 259 A.store.Bool(ptr + 17, false); 260 A.store.Int32(ptr + 12, 0); 261 } else { 262 A.store.Bool(ptr + 18, true); 263 A.store.Ref(ptr + 0, x["treeID"]); 264 A.store.Bool(ptr + 16, "automationNodeID" in x ? true : false); 265 A.store.Int32(ptr + 4, x["automationNodeID"] === undefined ? 0 : (x["automationNodeID"] as number)); 266 A.store.Ref(ptr + 8, x["actionType"]); 267 A.store.Bool(ptr + 17, "requestID" in x ? true : false); 268 A.store.Int32(ptr + 12, x["requestID"] === undefined ? 0 : (x["requestID"] as number)); 269 } 270 }, 271 "load_PerformActionRequiredParams": ( 272 ptr: Pointer, 273 create: heap.Ref<boolean>, 274 ref: heap.Ref<any> 275 ): heap.Ref<any> => { 276 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 277 278 x["treeID"] = A.load.Ref(ptr + 0, undefined); 279 if (A.load.Bool(ptr + 16)) { 280 x["automationNodeID"] = A.load.Int32(ptr + 4); 281 } else { 282 delete x["automationNodeID"]; 283 } 284 x["actionType"] = A.load.Ref(ptr + 8, undefined); 285 if (A.load.Bool(ptr + 17)) { 286 x["requestID"] = A.load.Int32(ptr + 12); 287 } else { 288 delete x["requestID"]; 289 } 290 return create === A.H.TRUE ? A.H.push(x) : ref; 291 }, 292 293 "store_PerformCustomActionParams": (ptr: Pointer, ref: heap.Ref<any>) => { 294 const x = A.H.get<any>(ref); 295 296 if (typeof x === "undefined") { 297 A.store.Bool(ptr + 5, false); 298 A.store.Bool(ptr + 4, false); 299 A.store.Int32(ptr + 0, 0); 300 } else { 301 A.store.Bool(ptr + 5, true); 302 A.store.Bool(ptr + 4, "customActionID" in x ? true : false); 303 A.store.Int32(ptr + 0, x["customActionID"] === undefined ? 0 : (x["customActionID"] as number)); 304 } 305 }, 306 "load_PerformCustomActionParams": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 307 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 308 309 if (A.load.Bool(ptr + 4)) { 310 x["customActionID"] = A.load.Int32(ptr + 0); 311 } else { 312 delete x["customActionID"]; 313 } 314 return create === A.H.TRUE ? A.H.push(x) : ref; 315 }, 316 317 "store_ReplaceSelectedTextParams": (ptr: Pointer, ref: heap.Ref<any>) => { 318 const x = A.H.get<any>(ref); 319 320 if (typeof x === "undefined") { 321 A.store.Bool(ptr + 4, false); 322 A.store.Ref(ptr + 0, undefined); 323 } else { 324 A.store.Bool(ptr + 4, true); 325 A.store.Ref(ptr + 0, x["value"]); 326 } 327 }, 328 "load_ReplaceSelectedTextParams": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 329 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 330 331 x["value"] = A.load.Ref(ptr + 0, undefined); 332 return create === A.H.TRUE ? A.H.push(x) : ref; 333 }, 334 335 "store_ScrollToPointParams": (ptr: Pointer, ref: heap.Ref<any>) => { 336 const x = A.H.get<any>(ref); 337 338 if (typeof x === "undefined") { 339 A.store.Bool(ptr + 10, false); 340 A.store.Bool(ptr + 8, false); 341 A.store.Int32(ptr + 0, 0); 342 A.store.Bool(ptr + 9, false); 343 A.store.Int32(ptr + 4, 0); 344 } else { 345 A.store.Bool(ptr + 10, true); 346 A.store.Bool(ptr + 8, "x" in x ? true : false); 347 A.store.Int32(ptr + 0, x["x"] === undefined ? 0 : (x["x"] as number)); 348 A.store.Bool(ptr + 9, "y" in x ? true : false); 349 A.store.Int32(ptr + 4, x["y"] === undefined ? 0 : (x["y"] as number)); 350 } 351 }, 352 "load_ScrollToPointParams": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 353 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 354 355 if (A.load.Bool(ptr + 8)) { 356 x["x"] = A.load.Int32(ptr + 0); 357 } else { 358 delete x["x"]; 359 } 360 if (A.load.Bool(ptr + 9)) { 361 x["y"] = A.load.Int32(ptr + 4); 362 } else { 363 delete x["y"]; 364 } 365 return create === A.H.TRUE ? A.H.push(x) : ref; 366 }, 367 368 "store_ScrollToPositionAtRowColumnParams": (ptr: Pointer, ref: heap.Ref<any>) => { 369 const x = A.H.get<any>(ref); 370 371 if (typeof x === "undefined") { 372 A.store.Bool(ptr + 10, false); 373 A.store.Bool(ptr + 8, false); 374 A.store.Int32(ptr + 0, 0); 375 A.store.Bool(ptr + 9, false); 376 A.store.Int32(ptr + 4, 0); 377 } else { 378 A.store.Bool(ptr + 10, true); 379 A.store.Bool(ptr + 8, "row" in x ? true : false); 380 A.store.Int32(ptr + 0, x["row"] === undefined ? 0 : (x["row"] as number)); 381 A.store.Bool(ptr + 9, "column" in x ? true : false); 382 A.store.Int32(ptr + 4, x["column"] === undefined ? 0 : (x["column"] as number)); 383 } 384 }, 385 "load_ScrollToPositionAtRowColumnParams": ( 386 ptr: Pointer, 387 create: heap.Ref<boolean>, 388 ref: heap.Ref<any> 389 ): heap.Ref<any> => { 390 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 391 392 if (A.load.Bool(ptr + 8)) { 393 x["row"] = A.load.Int32(ptr + 0); 394 } else { 395 delete x["row"]; 396 } 397 if (A.load.Bool(ptr + 9)) { 398 x["column"] = A.load.Int32(ptr + 4); 399 } else { 400 delete x["column"]; 401 } 402 return create === A.H.TRUE ? A.H.push(x) : ref; 403 }, 404 405 "store_SetScrollOffsetParams": (ptr: Pointer, ref: heap.Ref<any>) => { 406 const x = A.H.get<any>(ref); 407 408 if (typeof x === "undefined") { 409 A.store.Bool(ptr + 10, false); 410 A.store.Bool(ptr + 8, false); 411 A.store.Int32(ptr + 0, 0); 412 A.store.Bool(ptr + 9, false); 413 A.store.Int32(ptr + 4, 0); 414 } else { 415 A.store.Bool(ptr + 10, true); 416 A.store.Bool(ptr + 8, "x" in x ? true : false); 417 A.store.Int32(ptr + 0, x["x"] === undefined ? 0 : (x["x"] as number)); 418 A.store.Bool(ptr + 9, "y" in x ? true : false); 419 A.store.Int32(ptr + 4, x["y"] === undefined ? 0 : (x["y"] as number)); 420 } 421 }, 422 "load_SetScrollOffsetParams": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 423 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 424 425 if (A.load.Bool(ptr + 8)) { 426 x["x"] = A.load.Int32(ptr + 0); 427 } else { 428 delete x["x"]; 429 } 430 if (A.load.Bool(ptr + 9)) { 431 x["y"] = A.load.Int32(ptr + 4); 432 } else { 433 delete x["y"]; 434 } 435 return create === A.H.TRUE ? A.H.push(x) : ref; 436 }, 437 438 "store_SetSelectionParams": (ptr: Pointer, ref: heap.Ref<any>) => { 439 const x = A.H.get<any>(ref); 440 441 if (typeof x === "undefined") { 442 A.store.Bool(ptr + 15, false); 443 A.store.Bool(ptr + 12, false); 444 A.store.Int32(ptr + 0, 0); 445 A.store.Bool(ptr + 13, false); 446 A.store.Int32(ptr + 4, 0); 447 A.store.Bool(ptr + 14, false); 448 A.store.Int32(ptr + 8, 0); 449 } else { 450 A.store.Bool(ptr + 15, true); 451 A.store.Bool(ptr + 12, "focusNodeID" in x ? true : false); 452 A.store.Int32(ptr + 0, x["focusNodeID"] === undefined ? 0 : (x["focusNodeID"] as number)); 453 A.store.Bool(ptr + 13, "anchorOffset" in x ? true : false); 454 A.store.Int32(ptr + 4, x["anchorOffset"] === undefined ? 0 : (x["anchorOffset"] as number)); 455 A.store.Bool(ptr + 14, "focusOffset" in x ? true : false); 456 A.store.Int32(ptr + 8, x["focusOffset"] === undefined ? 0 : (x["focusOffset"] as number)); 457 } 458 }, 459 "load_SetSelectionParams": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 460 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 461 462 if (A.load.Bool(ptr + 12)) { 463 x["focusNodeID"] = A.load.Int32(ptr + 0); 464 } else { 465 delete x["focusNodeID"]; 466 } 467 if (A.load.Bool(ptr + 13)) { 468 x["anchorOffset"] = A.load.Int32(ptr + 4); 469 } else { 470 delete x["anchorOffset"]; 471 } 472 if (A.load.Bool(ptr + 14)) { 473 x["focusOffset"] = A.load.Int32(ptr + 8); 474 } else { 475 delete x["focusOffset"]; 476 } 477 return create === A.H.TRUE ? A.H.push(x) : ref; 478 }, 479 480 "store_SetValueParams": (ptr: Pointer, ref: heap.Ref<any>) => { 481 const x = A.H.get<any>(ref); 482 483 if (typeof x === "undefined") { 484 A.store.Bool(ptr + 4, false); 485 A.store.Ref(ptr + 0, undefined); 486 } else { 487 A.store.Bool(ptr + 4, true); 488 A.store.Ref(ptr + 0, x["value"]); 489 } 490 }, 491 "load_SetValueParams": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => { 492 const x = create === A.H.TRUE ? {} : A.H.get<any>(ref); 493 494 x["value"] = A.load.Ref(ptr + 0, undefined); 495 return create === A.H.TRUE ? A.H.push(x) : ref; 496 }, 497 "has_DisableDesktop": (): heap.Ref<boolean> => { 498 if (WEBEXT?.automationInternal && "disableDesktop" in WEBEXT?.automationInternal) { 499 return A.H.TRUE; 500 } 501 return A.H.FALSE; 502 }, 503 "func_DisableDesktop": (fn: Pointer): void => { 504 A.store.Ref(fn, WEBEXT.automationInternal.disableDesktop); 505 }, 506 "call_DisableDesktop": (retPtr: Pointer, callback: heap.Ref<object>): void => { 507 const _ret = WEBEXT.automationInternal.disableDesktop(A.H.get<object>(callback)); 508 }, 509 "try_DisableDesktop": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => { 510 try { 511 const _ret = WEBEXT.automationInternal.disableDesktop(A.H.get<object>(callback)); 512 return A.H.TRUE; 513 } catch (err: any) { 514 A.store.Ref(errPtr, err); 515 return A.H.FALSE; 516 } 517 }, 518 "has_EnableDesktop": (): heap.Ref<boolean> => { 519 if (WEBEXT?.automationInternal && "enableDesktop" in WEBEXT?.automationInternal) { 520 return A.H.TRUE; 521 } 522 return A.H.FALSE; 523 }, 524 "func_EnableDesktop": (fn: Pointer): void => { 525 A.store.Ref(fn, WEBEXT.automationInternal.enableDesktop); 526 }, 527 "call_EnableDesktop": (retPtr: Pointer): void => { 528 const _ret = WEBEXT.automationInternal.enableDesktop(); 529 A.store.Ref(retPtr, _ret); 530 }, 531 "try_EnableDesktop": (retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => { 532 try { 533 const _ret = WEBEXT.automationInternal.enableDesktop(); 534 A.store.Ref(retPtr, _ret); 535 return A.H.TRUE; 536 } catch (err: any) { 537 A.store.Ref(errPtr, err); 538 return A.H.FALSE; 539 } 540 }, 541 "has_EnableTree": (): heap.Ref<boolean> => { 542 if (WEBEXT?.automationInternal && "enableTree" in WEBEXT?.automationInternal) { 543 return A.H.TRUE; 544 } 545 return A.H.FALSE; 546 }, 547 "func_EnableTree": (fn: Pointer): void => { 548 A.store.Ref(fn, WEBEXT.automationInternal.enableTree); 549 }, 550 "call_EnableTree": (retPtr: Pointer, tree_id: heap.Ref<object>): void => { 551 const _ret = WEBEXT.automationInternal.enableTree(A.H.get<object>(tree_id)); 552 }, 553 "try_EnableTree": (retPtr: Pointer, errPtr: Pointer, tree_id: heap.Ref<object>): heap.Ref<boolean> => { 554 try { 555 const _ret = WEBEXT.automationInternal.enableTree(A.H.get<object>(tree_id)); 556 return A.H.TRUE; 557 } catch (err: any) { 558 A.store.Ref(errPtr, err); 559 return A.H.FALSE; 560 } 561 }, 562 "has_OnAccessibilityEvent": (): heap.Ref<boolean> => { 563 if ( 564 WEBEXT?.automationInternal?.onAccessibilityEvent && 565 "addListener" in WEBEXT?.automationInternal?.onAccessibilityEvent 566 ) { 567 return A.H.TRUE; 568 } 569 return A.H.FALSE; 570 }, 571 "func_OnAccessibilityEvent": (fn: Pointer): void => { 572 A.store.Ref(fn, WEBEXT.automationInternal.onAccessibilityEvent.addListener); 573 }, 574 "call_OnAccessibilityEvent": (retPtr: Pointer, callback: heap.Ref<object>): void => { 575 const _ret = WEBEXT.automationInternal.onAccessibilityEvent.addListener(A.H.get<object>(callback)); 576 }, 577 "try_OnAccessibilityEvent": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => { 578 try { 579 const _ret = WEBEXT.automationInternal.onAccessibilityEvent.addListener(A.H.get<object>(callback)); 580 return A.H.TRUE; 581 } catch (err: any) { 582 A.store.Ref(errPtr, err); 583 return A.H.FALSE; 584 } 585 }, 586 "has_OffAccessibilityEvent": (): heap.Ref<boolean> => { 587 if ( 588 WEBEXT?.automationInternal?.onAccessibilityEvent && 589 "removeListener" in WEBEXT?.automationInternal?.onAccessibilityEvent 590 ) { 591 return A.H.TRUE; 592 } 593 return A.H.FALSE; 594 }, 595 "func_OffAccessibilityEvent": (fn: Pointer): void => { 596 A.store.Ref(fn, WEBEXT.automationInternal.onAccessibilityEvent.removeListener); 597 }, 598 "call_OffAccessibilityEvent": (retPtr: Pointer, callback: heap.Ref<object>): void => { 599 const _ret = WEBEXT.automationInternal.onAccessibilityEvent.removeListener(A.H.get<object>(callback)); 600 }, 601 "try_OffAccessibilityEvent": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => { 602 try { 603 const _ret = WEBEXT.automationInternal.onAccessibilityEvent.removeListener(A.H.get<object>(callback)); 604 return A.H.TRUE; 605 } catch (err: any) { 606 A.store.Ref(errPtr, err); 607 return A.H.FALSE; 608 } 609 }, 610 "has_HasOnAccessibilityEvent": (): heap.Ref<boolean> => { 611 if ( 612 WEBEXT?.automationInternal?.onAccessibilityEvent && 613 "hasListener" in WEBEXT?.automationInternal?.onAccessibilityEvent 614 ) { 615 return A.H.TRUE; 616 } 617 return A.H.FALSE; 618 }, 619 "func_HasOnAccessibilityEvent": (fn: Pointer): void => { 620 A.store.Ref(fn, WEBEXT.automationInternal.onAccessibilityEvent.hasListener); 621 }, 622 "call_HasOnAccessibilityEvent": (retPtr: Pointer, callback: heap.Ref<object>): void => { 623 const _ret = WEBEXT.automationInternal.onAccessibilityEvent.hasListener(A.H.get<object>(callback)); 624 A.store.Bool(retPtr, _ret); 625 }, 626 "try_HasOnAccessibilityEvent": ( 627 retPtr: Pointer, 628 errPtr: Pointer, 629 callback: heap.Ref<object> 630 ): heap.Ref<boolean> => { 631 try { 632 const _ret = WEBEXT.automationInternal.onAccessibilityEvent.hasListener(A.H.get<object>(callback)); 633 A.store.Bool(retPtr, _ret); 634 return A.H.TRUE; 635 } catch (err: any) { 636 A.store.Ref(errPtr, err); 637 return A.H.FALSE; 638 } 639 }, 640 "has_OnAccessibilityTreeDestroyed": (): heap.Ref<boolean> => { 641 if ( 642 WEBEXT?.automationInternal?.onAccessibilityTreeDestroyed && 643 "addListener" in WEBEXT?.automationInternal?.onAccessibilityTreeDestroyed 644 ) { 645 return A.H.TRUE; 646 } 647 return A.H.FALSE; 648 }, 649 "func_OnAccessibilityTreeDestroyed": (fn: Pointer): void => { 650 A.store.Ref(fn, WEBEXT.automationInternal.onAccessibilityTreeDestroyed.addListener); 651 }, 652 "call_OnAccessibilityTreeDestroyed": (retPtr: Pointer, callback: heap.Ref<object>): void => { 653 const _ret = WEBEXT.automationInternal.onAccessibilityTreeDestroyed.addListener(A.H.get<object>(callback)); 654 }, 655 "try_OnAccessibilityTreeDestroyed": ( 656 retPtr: Pointer, 657 errPtr: Pointer, 658 callback: heap.Ref<object> 659 ): heap.Ref<boolean> => { 660 try { 661 const _ret = WEBEXT.automationInternal.onAccessibilityTreeDestroyed.addListener(A.H.get<object>(callback)); 662 return A.H.TRUE; 663 } catch (err: any) { 664 A.store.Ref(errPtr, err); 665 return A.H.FALSE; 666 } 667 }, 668 "has_OffAccessibilityTreeDestroyed": (): heap.Ref<boolean> => { 669 if ( 670 WEBEXT?.automationInternal?.onAccessibilityTreeDestroyed && 671 "removeListener" in WEBEXT?.automationInternal?.onAccessibilityTreeDestroyed 672 ) { 673 return A.H.TRUE; 674 } 675 return A.H.FALSE; 676 }, 677 "func_OffAccessibilityTreeDestroyed": (fn: Pointer): void => { 678 A.store.Ref(fn, WEBEXT.automationInternal.onAccessibilityTreeDestroyed.removeListener); 679 }, 680 "call_OffAccessibilityTreeDestroyed": (retPtr: Pointer, callback: heap.Ref<object>): void => { 681 const _ret = WEBEXT.automationInternal.onAccessibilityTreeDestroyed.removeListener(A.H.get<object>(callback)); 682 }, 683 "try_OffAccessibilityTreeDestroyed": ( 684 retPtr: Pointer, 685 errPtr: Pointer, 686 callback: heap.Ref<object> 687 ): heap.Ref<boolean> => { 688 try { 689 const _ret = WEBEXT.automationInternal.onAccessibilityTreeDestroyed.removeListener(A.H.get<object>(callback)); 690 return A.H.TRUE; 691 } catch (err: any) { 692 A.store.Ref(errPtr, err); 693 return A.H.FALSE; 694 } 695 }, 696 "has_HasOnAccessibilityTreeDestroyed": (): heap.Ref<boolean> => { 697 if ( 698 WEBEXT?.automationInternal?.onAccessibilityTreeDestroyed && 699 "hasListener" in WEBEXT?.automationInternal?.onAccessibilityTreeDestroyed 700 ) { 701 return A.H.TRUE; 702 } 703 return A.H.FALSE; 704 }, 705 "func_HasOnAccessibilityTreeDestroyed": (fn: Pointer): void => { 706 A.store.Ref(fn, WEBEXT.automationInternal.onAccessibilityTreeDestroyed.hasListener); 707 }, 708 "call_HasOnAccessibilityTreeDestroyed": (retPtr: Pointer, callback: heap.Ref<object>): void => { 709 const _ret = WEBEXT.automationInternal.onAccessibilityTreeDestroyed.hasListener(A.H.get<object>(callback)); 710 A.store.Bool(retPtr, _ret); 711 }, 712 "try_HasOnAccessibilityTreeDestroyed": ( 713 retPtr: Pointer, 714 errPtr: Pointer, 715 callback: heap.Ref<object> 716 ): heap.Ref<boolean> => { 717 try { 718 const _ret = WEBEXT.automationInternal.onAccessibilityTreeDestroyed.hasListener(A.H.get<object>(callback)); 719 A.store.Bool(retPtr, _ret); 720 return A.H.TRUE; 721 } catch (err: any) { 722 A.store.Ref(errPtr, err); 723 return A.H.FALSE; 724 } 725 }, 726 "has_OnAccessibilityTreeSerializationError": (): heap.Ref<boolean> => { 727 if ( 728 WEBEXT?.automationInternal?.onAccessibilityTreeSerializationError && 729 "addListener" in WEBEXT?.automationInternal?.onAccessibilityTreeSerializationError 730 ) { 731 return A.H.TRUE; 732 } 733 return A.H.FALSE; 734 }, 735 "func_OnAccessibilityTreeSerializationError": (fn: Pointer): void => { 736 A.store.Ref(fn, WEBEXT.automationInternal.onAccessibilityTreeSerializationError.addListener); 737 }, 738 "call_OnAccessibilityTreeSerializationError": (retPtr: Pointer, callback: heap.Ref<object>): void => { 739 const _ret = WEBEXT.automationInternal.onAccessibilityTreeSerializationError.addListener( 740 A.H.get<object>(callback) 741 ); 742 }, 743 "try_OnAccessibilityTreeSerializationError": ( 744 retPtr: Pointer, 745 errPtr: Pointer, 746 callback: heap.Ref<object> 747 ): heap.Ref<boolean> => { 748 try { 749 const _ret = WEBEXT.automationInternal.onAccessibilityTreeSerializationError.addListener( 750 A.H.get<object>(callback) 751 ); 752 return A.H.TRUE; 753 } catch (err: any) { 754 A.store.Ref(errPtr, err); 755 return A.H.FALSE; 756 } 757 }, 758 "has_OffAccessibilityTreeSerializationError": (): heap.Ref<boolean> => { 759 if ( 760 WEBEXT?.automationInternal?.onAccessibilityTreeSerializationError && 761 "removeListener" in WEBEXT?.automationInternal?.onAccessibilityTreeSerializationError 762 ) { 763 return A.H.TRUE; 764 } 765 return A.H.FALSE; 766 }, 767 "func_OffAccessibilityTreeSerializationError": (fn: Pointer): void => { 768 A.store.Ref(fn, WEBEXT.automationInternal.onAccessibilityTreeSerializationError.removeListener); 769 }, 770 "call_OffAccessibilityTreeSerializationError": (retPtr: Pointer, callback: heap.Ref<object>): void => { 771 const _ret = WEBEXT.automationInternal.onAccessibilityTreeSerializationError.removeListener( 772 A.H.get<object>(callback) 773 ); 774 }, 775 "try_OffAccessibilityTreeSerializationError": ( 776 retPtr: Pointer, 777 errPtr: Pointer, 778 callback: heap.Ref<object> 779 ): heap.Ref<boolean> => { 780 try { 781 const _ret = WEBEXT.automationInternal.onAccessibilityTreeSerializationError.removeListener( 782 A.H.get<object>(callback) 783 ); 784 return A.H.TRUE; 785 } catch (err: any) { 786 A.store.Ref(errPtr, err); 787 return A.H.FALSE; 788 } 789 }, 790 "has_HasOnAccessibilityTreeSerializationError": (): heap.Ref<boolean> => { 791 if ( 792 WEBEXT?.automationInternal?.onAccessibilityTreeSerializationError && 793 "hasListener" in WEBEXT?.automationInternal?.onAccessibilityTreeSerializationError 794 ) { 795 return A.H.TRUE; 796 } 797 return A.H.FALSE; 798 }, 799 "func_HasOnAccessibilityTreeSerializationError": (fn: Pointer): void => { 800 A.store.Ref(fn, WEBEXT.automationInternal.onAccessibilityTreeSerializationError.hasListener); 801 }, 802 "call_HasOnAccessibilityTreeSerializationError": (retPtr: Pointer, callback: heap.Ref<object>): void => { 803 const _ret = WEBEXT.automationInternal.onAccessibilityTreeSerializationError.hasListener( 804 A.H.get<object>(callback) 805 ); 806 A.store.Bool(retPtr, _ret); 807 }, 808 "try_HasOnAccessibilityTreeSerializationError": ( 809 retPtr: Pointer, 810 errPtr: Pointer, 811 callback: heap.Ref<object> 812 ): heap.Ref<boolean> => { 813 try { 814 const _ret = WEBEXT.automationInternal.onAccessibilityTreeSerializationError.hasListener( 815 A.H.get<object>(callback) 816 ); 817 A.store.Bool(retPtr, _ret); 818 return A.H.TRUE; 819 } catch (err: any) { 820 A.store.Ref(errPtr, err); 821 return A.H.FALSE; 822 } 823 }, 824 "has_OnActionResult": (): heap.Ref<boolean> => { 825 if (WEBEXT?.automationInternal?.onActionResult && "addListener" in WEBEXT?.automationInternal?.onActionResult) { 826 return A.H.TRUE; 827 } 828 return A.H.FALSE; 829 }, 830 "func_OnActionResult": (fn: Pointer): void => { 831 A.store.Ref(fn, WEBEXT.automationInternal.onActionResult.addListener); 832 }, 833 "call_OnActionResult": (retPtr: Pointer, callback: heap.Ref<object>): void => { 834 const _ret = WEBEXT.automationInternal.onActionResult.addListener(A.H.get<object>(callback)); 835 }, 836 "try_OnActionResult": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => { 837 try { 838 const _ret = WEBEXT.automationInternal.onActionResult.addListener(A.H.get<object>(callback)); 839 return A.H.TRUE; 840 } catch (err: any) { 841 A.store.Ref(errPtr, err); 842 return A.H.FALSE; 843 } 844 }, 845 "has_OffActionResult": (): heap.Ref<boolean> => { 846 if ( 847 WEBEXT?.automationInternal?.onActionResult && 848 "removeListener" in WEBEXT?.automationInternal?.onActionResult 849 ) { 850 return A.H.TRUE; 851 } 852 return A.H.FALSE; 853 }, 854 "func_OffActionResult": (fn: Pointer): void => { 855 A.store.Ref(fn, WEBEXT.automationInternal.onActionResult.removeListener); 856 }, 857 "call_OffActionResult": (retPtr: Pointer, callback: heap.Ref<object>): void => { 858 const _ret = WEBEXT.automationInternal.onActionResult.removeListener(A.H.get<object>(callback)); 859 }, 860 "try_OffActionResult": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => { 861 try { 862 const _ret = WEBEXT.automationInternal.onActionResult.removeListener(A.H.get<object>(callback)); 863 return A.H.TRUE; 864 } catch (err: any) { 865 A.store.Ref(errPtr, err); 866 return A.H.FALSE; 867 } 868 }, 869 "has_HasOnActionResult": (): heap.Ref<boolean> => { 870 if (WEBEXT?.automationInternal?.onActionResult && "hasListener" in WEBEXT?.automationInternal?.onActionResult) { 871 return A.H.TRUE; 872 } 873 return A.H.FALSE; 874 }, 875 "func_HasOnActionResult": (fn: Pointer): void => { 876 A.store.Ref(fn, WEBEXT.automationInternal.onActionResult.hasListener); 877 }, 878 "call_HasOnActionResult": (retPtr: Pointer, callback: heap.Ref<object>): void => { 879 const _ret = WEBEXT.automationInternal.onActionResult.hasListener(A.H.get<object>(callback)); 880 A.store.Bool(retPtr, _ret); 881 }, 882 "try_HasOnActionResult": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => { 883 try { 884 const _ret = WEBEXT.automationInternal.onActionResult.hasListener(A.H.get<object>(callback)); 885 A.store.Bool(retPtr, _ret); 886 return A.H.TRUE; 887 } catch (err: any) { 888 A.store.Ref(errPtr, err); 889 return A.H.FALSE; 890 } 891 }, 892 "has_OnAllAutomationEventListenersRemoved": (): heap.Ref<boolean> => { 893 if ( 894 WEBEXT?.automationInternal?.onAllAutomationEventListenersRemoved && 895 "addListener" in WEBEXT?.automationInternal?.onAllAutomationEventListenersRemoved 896 ) { 897 return A.H.TRUE; 898 } 899 return A.H.FALSE; 900 }, 901 "func_OnAllAutomationEventListenersRemoved": (fn: Pointer): void => { 902 A.store.Ref(fn, WEBEXT.automationInternal.onAllAutomationEventListenersRemoved.addListener); 903 }, 904 "call_OnAllAutomationEventListenersRemoved": (retPtr: Pointer, callback: heap.Ref<object>): void => { 905 const _ret = WEBEXT.automationInternal.onAllAutomationEventListenersRemoved.addListener( 906 A.H.get<object>(callback) 907 ); 908 }, 909 "try_OnAllAutomationEventListenersRemoved": ( 910 retPtr: Pointer, 911 errPtr: Pointer, 912 callback: heap.Ref<object> 913 ): heap.Ref<boolean> => { 914 try { 915 const _ret = WEBEXT.automationInternal.onAllAutomationEventListenersRemoved.addListener( 916 A.H.get<object>(callback) 917 ); 918 return A.H.TRUE; 919 } catch (err: any) { 920 A.store.Ref(errPtr, err); 921 return A.H.FALSE; 922 } 923 }, 924 "has_OffAllAutomationEventListenersRemoved": (): heap.Ref<boolean> => { 925 if ( 926 WEBEXT?.automationInternal?.onAllAutomationEventListenersRemoved && 927 "removeListener" in WEBEXT?.automationInternal?.onAllAutomationEventListenersRemoved 928 ) { 929 return A.H.TRUE; 930 } 931 return A.H.FALSE; 932 }, 933 "func_OffAllAutomationEventListenersRemoved": (fn: Pointer): void => { 934 A.store.Ref(fn, WEBEXT.automationInternal.onAllAutomationEventListenersRemoved.removeListener); 935 }, 936 "call_OffAllAutomationEventListenersRemoved": (retPtr: Pointer, callback: heap.Ref<object>): void => { 937 const _ret = WEBEXT.automationInternal.onAllAutomationEventListenersRemoved.removeListener( 938 A.H.get<object>(callback) 939 ); 940 }, 941 "try_OffAllAutomationEventListenersRemoved": ( 942 retPtr: Pointer, 943 errPtr: Pointer, 944 callback: heap.Ref<object> 945 ): heap.Ref<boolean> => { 946 try { 947 const _ret = WEBEXT.automationInternal.onAllAutomationEventListenersRemoved.removeListener( 948 A.H.get<object>(callback) 949 ); 950 return A.H.TRUE; 951 } catch (err: any) { 952 A.store.Ref(errPtr, err); 953 return A.H.FALSE; 954 } 955 }, 956 "has_HasOnAllAutomationEventListenersRemoved": (): heap.Ref<boolean> => { 957 if ( 958 WEBEXT?.automationInternal?.onAllAutomationEventListenersRemoved && 959 "hasListener" in WEBEXT?.automationInternal?.onAllAutomationEventListenersRemoved 960 ) { 961 return A.H.TRUE; 962 } 963 return A.H.FALSE; 964 }, 965 "func_HasOnAllAutomationEventListenersRemoved": (fn: Pointer): void => { 966 A.store.Ref(fn, WEBEXT.automationInternal.onAllAutomationEventListenersRemoved.hasListener); 967 }, 968 "call_HasOnAllAutomationEventListenersRemoved": (retPtr: Pointer, callback: heap.Ref<object>): void => { 969 const _ret = WEBEXT.automationInternal.onAllAutomationEventListenersRemoved.hasListener( 970 A.H.get<object>(callback) 971 ); 972 A.store.Bool(retPtr, _ret); 973 }, 974 "try_HasOnAllAutomationEventListenersRemoved": ( 975 retPtr: Pointer, 976 errPtr: Pointer, 977 callback: heap.Ref<object> 978 ): heap.Ref<boolean> => { 979 try { 980 const _ret = WEBEXT.automationInternal.onAllAutomationEventListenersRemoved.hasListener( 981 A.H.get<object>(callback) 982 ); 983 A.store.Bool(retPtr, _ret); 984 return A.H.TRUE; 985 } catch (err: any) { 986 A.store.Ref(errPtr, err); 987 return A.H.FALSE; 988 } 989 }, 990 "has_OnChildTreeID": (): heap.Ref<boolean> => { 991 if (WEBEXT?.automationInternal?.onChildTreeID && "addListener" in WEBEXT?.automationInternal?.onChildTreeID) { 992 return A.H.TRUE; 993 } 994 return A.H.FALSE; 995 }, 996 "func_OnChildTreeID": (fn: Pointer): void => { 997 A.store.Ref(fn, WEBEXT.automationInternal.onChildTreeID.addListener); 998 }, 999 "call_OnChildTreeID": (retPtr: Pointer, callback: heap.Ref<object>): void => { 1000 const _ret = WEBEXT.automationInternal.onChildTreeID.addListener(A.H.get<object>(callback)); 1001 }, 1002 "try_OnChildTreeID": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => { 1003 try { 1004 const _ret = WEBEXT.automationInternal.onChildTreeID.addListener(A.H.get<object>(callback)); 1005 return A.H.TRUE; 1006 } catch (err: any) { 1007 A.store.Ref(errPtr, err); 1008 return A.H.FALSE; 1009 } 1010 }, 1011 "has_OffChildTreeID": (): heap.Ref<boolean> => { 1012 if (WEBEXT?.automationInternal?.onChildTreeID && "removeListener" in WEBEXT?.automationInternal?.onChildTreeID) { 1013 return A.H.TRUE; 1014 } 1015 return A.H.FALSE; 1016 }, 1017 "func_OffChildTreeID": (fn: Pointer): void => { 1018 A.store.Ref(fn, WEBEXT.automationInternal.onChildTreeID.removeListener); 1019 }, 1020 "call_OffChildTreeID": (retPtr: Pointer, callback: heap.Ref<object>): void => { 1021 const _ret = WEBEXT.automationInternal.onChildTreeID.removeListener(A.H.get<object>(callback)); 1022 }, 1023 "try_OffChildTreeID": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => { 1024 try { 1025 const _ret = WEBEXT.automationInternal.onChildTreeID.removeListener(A.H.get<object>(callback)); 1026 return A.H.TRUE; 1027 } catch (err: any) { 1028 A.store.Ref(errPtr, err); 1029 return A.H.FALSE; 1030 } 1031 }, 1032 "has_HasOnChildTreeID": (): heap.Ref<boolean> => { 1033 if (WEBEXT?.automationInternal?.onChildTreeID && "hasListener" in WEBEXT?.automationInternal?.onChildTreeID) { 1034 return A.H.TRUE; 1035 } 1036 return A.H.FALSE; 1037 }, 1038 "func_HasOnChildTreeID": (fn: Pointer): void => { 1039 A.store.Ref(fn, WEBEXT.automationInternal.onChildTreeID.hasListener); 1040 }, 1041 "call_HasOnChildTreeID": (retPtr: Pointer, callback: heap.Ref<object>): void => { 1042 const _ret = WEBEXT.automationInternal.onChildTreeID.hasListener(A.H.get<object>(callback)); 1043 A.store.Bool(retPtr, _ret); 1044 }, 1045 "try_HasOnChildTreeID": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => { 1046 try { 1047 const _ret = WEBEXT.automationInternal.onChildTreeID.hasListener(A.H.get<object>(callback)); 1048 A.store.Bool(retPtr, _ret); 1049 return A.H.TRUE; 1050 } catch (err: any) { 1051 A.store.Ref(errPtr, err); 1052 return A.H.FALSE; 1053 } 1054 }, 1055 "has_OnGetTextLocationResult": (): heap.Ref<boolean> => { 1056 if ( 1057 WEBEXT?.automationInternal?.onGetTextLocationResult && 1058 "addListener" in WEBEXT?.automationInternal?.onGetTextLocationResult 1059 ) { 1060 return A.H.TRUE; 1061 } 1062 return A.H.FALSE; 1063 }, 1064 "func_OnGetTextLocationResult": (fn: Pointer): void => { 1065 A.store.Ref(fn, WEBEXT.automationInternal.onGetTextLocationResult.addListener); 1066 }, 1067 "call_OnGetTextLocationResult": (retPtr: Pointer, callback: heap.Ref<object>): void => { 1068 const _ret = WEBEXT.automationInternal.onGetTextLocationResult.addListener(A.H.get<object>(callback)); 1069 }, 1070 "try_OnGetTextLocationResult": ( 1071 retPtr: Pointer, 1072 errPtr: Pointer, 1073 callback: heap.Ref<object> 1074 ): heap.Ref<boolean> => { 1075 try { 1076 const _ret = WEBEXT.automationInternal.onGetTextLocationResult.addListener(A.H.get<object>(callback)); 1077 return A.H.TRUE; 1078 } catch (err: any) { 1079 A.store.Ref(errPtr, err); 1080 return A.H.FALSE; 1081 } 1082 }, 1083 "has_OffGetTextLocationResult": (): heap.Ref<boolean> => { 1084 if ( 1085 WEBEXT?.automationInternal?.onGetTextLocationResult && 1086 "removeListener" in WEBEXT?.automationInternal?.onGetTextLocationResult 1087 ) { 1088 return A.H.TRUE; 1089 } 1090 return A.H.FALSE; 1091 }, 1092 "func_OffGetTextLocationResult": (fn: Pointer): void => { 1093 A.store.Ref(fn, WEBEXT.automationInternal.onGetTextLocationResult.removeListener); 1094 }, 1095 "call_OffGetTextLocationResult": (retPtr: Pointer, callback: heap.Ref<object>): void => { 1096 const _ret = WEBEXT.automationInternal.onGetTextLocationResult.removeListener(A.H.get<object>(callback)); 1097 }, 1098 "try_OffGetTextLocationResult": ( 1099 retPtr: Pointer, 1100 errPtr: Pointer, 1101 callback: heap.Ref<object> 1102 ): heap.Ref<boolean> => { 1103 try { 1104 const _ret = WEBEXT.automationInternal.onGetTextLocationResult.removeListener(A.H.get<object>(callback)); 1105 return A.H.TRUE; 1106 } catch (err: any) { 1107 A.store.Ref(errPtr, err); 1108 return A.H.FALSE; 1109 } 1110 }, 1111 "has_HasOnGetTextLocationResult": (): heap.Ref<boolean> => { 1112 if ( 1113 WEBEXT?.automationInternal?.onGetTextLocationResult && 1114 "hasListener" in WEBEXT?.automationInternal?.onGetTextLocationResult 1115 ) { 1116 return A.H.TRUE; 1117 } 1118 return A.H.FALSE; 1119 }, 1120 "func_HasOnGetTextLocationResult": (fn: Pointer): void => { 1121 A.store.Ref(fn, WEBEXT.automationInternal.onGetTextLocationResult.hasListener); 1122 }, 1123 "call_HasOnGetTextLocationResult": (retPtr: Pointer, callback: heap.Ref<object>): void => { 1124 const _ret = WEBEXT.automationInternal.onGetTextLocationResult.hasListener(A.H.get<object>(callback)); 1125 A.store.Bool(retPtr, _ret); 1126 }, 1127 "try_HasOnGetTextLocationResult": ( 1128 retPtr: Pointer, 1129 errPtr: Pointer, 1130 callback: heap.Ref<object> 1131 ): heap.Ref<boolean> => { 1132 try { 1133 const _ret = WEBEXT.automationInternal.onGetTextLocationResult.hasListener(A.H.get<object>(callback)); 1134 A.store.Bool(retPtr, _ret); 1135 return A.H.TRUE; 1136 } catch (err: any) { 1137 A.store.Ref(errPtr, err); 1138 return A.H.FALSE; 1139 } 1140 }, 1141 "has_OnNodesRemoved": (): heap.Ref<boolean> => { 1142 if (WEBEXT?.automationInternal?.onNodesRemoved && "addListener" in WEBEXT?.automationInternal?.onNodesRemoved) { 1143 return A.H.TRUE; 1144 } 1145 return A.H.FALSE; 1146 }, 1147 "func_OnNodesRemoved": (fn: Pointer): void => { 1148 A.store.Ref(fn, WEBEXT.automationInternal.onNodesRemoved.addListener); 1149 }, 1150 "call_OnNodesRemoved": (retPtr: Pointer, callback: heap.Ref<object>): void => { 1151 const _ret = WEBEXT.automationInternal.onNodesRemoved.addListener(A.H.get<object>(callback)); 1152 }, 1153 "try_OnNodesRemoved": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => { 1154 try { 1155 const _ret = WEBEXT.automationInternal.onNodesRemoved.addListener(A.H.get<object>(callback)); 1156 return A.H.TRUE; 1157 } catch (err: any) { 1158 A.store.Ref(errPtr, err); 1159 return A.H.FALSE; 1160 } 1161 }, 1162 "has_OffNodesRemoved": (): heap.Ref<boolean> => { 1163 if ( 1164 WEBEXT?.automationInternal?.onNodesRemoved && 1165 "removeListener" in WEBEXT?.automationInternal?.onNodesRemoved 1166 ) { 1167 return A.H.TRUE; 1168 } 1169 return A.H.FALSE; 1170 }, 1171 "func_OffNodesRemoved": (fn: Pointer): void => { 1172 A.store.Ref(fn, WEBEXT.automationInternal.onNodesRemoved.removeListener); 1173 }, 1174 "call_OffNodesRemoved": (retPtr: Pointer, callback: heap.Ref<object>): void => { 1175 const _ret = WEBEXT.automationInternal.onNodesRemoved.removeListener(A.H.get<object>(callback)); 1176 }, 1177 "try_OffNodesRemoved": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => { 1178 try { 1179 const _ret = WEBEXT.automationInternal.onNodesRemoved.removeListener(A.H.get<object>(callback)); 1180 return A.H.TRUE; 1181 } catch (err: any) { 1182 A.store.Ref(errPtr, err); 1183 return A.H.FALSE; 1184 } 1185 }, 1186 "has_HasOnNodesRemoved": (): heap.Ref<boolean> => { 1187 if (WEBEXT?.automationInternal?.onNodesRemoved && "hasListener" in WEBEXT?.automationInternal?.onNodesRemoved) { 1188 return A.H.TRUE; 1189 } 1190 return A.H.FALSE; 1191 }, 1192 "func_HasOnNodesRemoved": (fn: Pointer): void => { 1193 A.store.Ref(fn, WEBEXT.automationInternal.onNodesRemoved.hasListener); 1194 }, 1195 "call_HasOnNodesRemoved": (retPtr: Pointer, callback: heap.Ref<object>): void => { 1196 const _ret = WEBEXT.automationInternal.onNodesRemoved.hasListener(A.H.get<object>(callback)); 1197 A.store.Bool(retPtr, _ret); 1198 }, 1199 "try_HasOnNodesRemoved": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => { 1200 try { 1201 const _ret = WEBEXT.automationInternal.onNodesRemoved.hasListener(A.H.get<object>(callback)); 1202 A.store.Bool(retPtr, _ret); 1203 return A.H.TRUE; 1204 } catch (err: any) { 1205 A.store.Ref(errPtr, err); 1206 return A.H.FALSE; 1207 } 1208 }, 1209 "has_OnTreeChange": (): heap.Ref<boolean> => { 1210 if (WEBEXT?.automationInternal?.onTreeChange && "addListener" in WEBEXT?.automationInternal?.onTreeChange) { 1211 return A.H.TRUE; 1212 } 1213 return A.H.FALSE; 1214 }, 1215 "func_OnTreeChange": (fn: Pointer): void => { 1216 A.store.Ref(fn, WEBEXT.automationInternal.onTreeChange.addListener); 1217 }, 1218 "call_OnTreeChange": (retPtr: Pointer, callback: heap.Ref<object>): void => { 1219 const _ret = WEBEXT.automationInternal.onTreeChange.addListener(A.H.get<object>(callback)); 1220 }, 1221 "try_OnTreeChange": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => { 1222 try { 1223 const _ret = WEBEXT.automationInternal.onTreeChange.addListener(A.H.get<object>(callback)); 1224 return A.H.TRUE; 1225 } catch (err: any) { 1226 A.store.Ref(errPtr, err); 1227 return A.H.FALSE; 1228 } 1229 }, 1230 "has_OffTreeChange": (): heap.Ref<boolean> => { 1231 if (WEBEXT?.automationInternal?.onTreeChange && "removeListener" in WEBEXT?.automationInternal?.onTreeChange) { 1232 return A.H.TRUE; 1233 } 1234 return A.H.FALSE; 1235 }, 1236 "func_OffTreeChange": (fn: Pointer): void => { 1237 A.store.Ref(fn, WEBEXT.automationInternal.onTreeChange.removeListener); 1238 }, 1239 "call_OffTreeChange": (retPtr: Pointer, callback: heap.Ref<object>): void => { 1240 const _ret = WEBEXT.automationInternal.onTreeChange.removeListener(A.H.get<object>(callback)); 1241 }, 1242 "try_OffTreeChange": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => { 1243 try { 1244 const _ret = WEBEXT.automationInternal.onTreeChange.removeListener(A.H.get<object>(callback)); 1245 return A.H.TRUE; 1246 } catch (err: any) { 1247 A.store.Ref(errPtr, err); 1248 return A.H.FALSE; 1249 } 1250 }, 1251 "has_HasOnTreeChange": (): heap.Ref<boolean> => { 1252 if (WEBEXT?.automationInternal?.onTreeChange && "hasListener" in WEBEXT?.automationInternal?.onTreeChange) { 1253 return A.H.TRUE; 1254 } 1255 return A.H.FALSE; 1256 }, 1257 "func_HasOnTreeChange": (fn: Pointer): void => { 1258 A.store.Ref(fn, WEBEXT.automationInternal.onTreeChange.hasListener); 1259 }, 1260 "call_HasOnTreeChange": (retPtr: Pointer, callback: heap.Ref<object>): void => { 1261 const _ret = WEBEXT.automationInternal.onTreeChange.hasListener(A.H.get<object>(callback)); 1262 A.store.Bool(retPtr, _ret); 1263 }, 1264 "try_HasOnTreeChange": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => { 1265 try { 1266 const _ret = WEBEXT.automationInternal.onTreeChange.hasListener(A.H.get<object>(callback)); 1267 A.store.Bool(retPtr, _ret); 1268 return A.H.TRUE; 1269 } catch (err: any) { 1270 A.store.Ref(errPtr, err); 1271 return A.H.FALSE; 1272 } 1273 }, 1274 "has_PerformAction": (): heap.Ref<boolean> => { 1275 if (WEBEXT?.automationInternal && "performAction" in WEBEXT?.automationInternal) { 1276 return A.H.TRUE; 1277 } 1278 return A.H.FALSE; 1279 }, 1280 "func_PerformAction": (fn: Pointer): void => { 1281 A.store.Ref(fn, WEBEXT.automationInternal.performAction); 1282 }, 1283 "call_PerformAction": (retPtr: Pointer, args: Pointer, opt_args: heap.Ref<object>): void => { 1284 const args_ffi = {}; 1285 1286 args_ffi["treeID"] = A.load.Ref(args + 0, undefined); 1287 if (A.load.Bool(args + 16)) { 1288 args_ffi["automationNodeID"] = A.load.Int32(args + 4); 1289 } 1290 args_ffi["actionType"] = A.load.Ref(args + 8, undefined); 1291 if (A.load.Bool(args + 17)) { 1292 args_ffi["requestID"] = A.load.Int32(args + 12); 1293 } 1294 1295 const _ret = WEBEXT.automationInternal.performAction(args_ffi, A.H.get<object>(opt_args)); 1296 }, 1297 "try_PerformAction": ( 1298 retPtr: Pointer, 1299 errPtr: Pointer, 1300 args: Pointer, 1301 opt_args: heap.Ref<object> 1302 ): heap.Ref<boolean> => { 1303 try { 1304 const args_ffi = {}; 1305 1306 args_ffi["treeID"] = A.load.Ref(args + 0, undefined); 1307 if (A.load.Bool(args + 16)) { 1308 args_ffi["automationNodeID"] = A.load.Int32(args + 4); 1309 } 1310 args_ffi["actionType"] = A.load.Ref(args + 8, undefined); 1311 if (A.load.Bool(args + 17)) { 1312 args_ffi["requestID"] = A.load.Int32(args + 12); 1313 } 1314 1315 const _ret = WEBEXT.automationInternal.performAction(args_ffi, A.H.get<object>(opt_args)); 1316 return A.H.TRUE; 1317 } catch (err: any) { 1318 A.store.Ref(errPtr, err); 1319 return A.H.FALSE; 1320 } 1321 }, 1322 }; 1323 });