(
regionLogical: { x: number; y: number; w: number; h: number },
allowedBundleIds: string[],
displayId?: number,
)
| 492 | }, |
| 493 | |
| 494 | async zoom( |
| 495 | regionLogical: { x: number; y: number; w: number; h: number }, |
| 496 | allowedBundleIds: string[], |
| 497 | displayId?: number, |
| 498 | ): Promise<{ base64: string; width: number; height: number }> { |
| 499 | const d = cu.display.getSize(displayId) |
| 500 | const [outW, outH] = computeTargetDims( |
| 501 | regionLogical.w, |
| 502 | regionLogical.h, |
| 503 | d.scaleFactor, |
| 504 | ) |
| 505 | return drainRunLoop(() => |
| 506 | cu.screenshot.captureRegion( |
| 507 | withoutTerminal(allowedBundleIds), |
| 508 | regionLogical.x, |
| 509 | regionLogical.y, |
| 510 | regionLogical.w, |
| 511 | regionLogical.h, |
| 512 | outW, |
| 513 | outH, |
| 514 | SCREENSHOT_JPEG_QUALITY, |
| 515 | displayId, |
| 516 | ), |
| 517 | ) |
| 518 | }, |
| 519 | |
| 520 | // ── Keyboard ───────────────────────────────────────────────────────── |
| 521 |
nothing calls this directly
no test coverage detected