/** * MCP tool: capture a screenshot from the running CrossPad simulator. * The simulator encodes PNG natively via stb_image_write. * * When saving to file, the simulator writes the PNG directly to disk * (no base64 round-trip over TCP). Otherwise returns inline base64. */ /** What to capture: the whole emulator window, or only the 320x240 panel. */ export type ScreenshotRegion = "full" | "lcd"; /** * Where the LCD panel sits inside the emulator window, from * Stm32EmuWindow.hpp: LCD_X = (490 - 320) / 2, LCD_Y = 58, at zoom 1. * * A current simulator reports its own geometry in every screenshot reply * (`lcd_origin`, `lcd_size`, `scale`) and that is what the crop uses; this * constant is the fallback for a simulator that predates the field, whose own * `region: "lcd"` also cropped 18 rows too high — which is why the panel is * always cut out of a full-window capture here rather than requested. */ export declare const LCD_RECT: { readonly x: 85; readonly y: 58; readonly width: 320; readonly height: 240; }; /** The panel's place in a full-window capture, in capture pixels. */ export interface LcdGeometry { x: number; y: number; width: number; height: number; scale: number; } /** Geometry the simulator reported, or the zoom-1 layout if it reported none. */ export declare function lcdGeometryOf(resp: Record): LcdGeometry; export interface ScreenshotResult { success: boolean; width?: number; height?: number; format?: string; file_path?: string; data_base64?: string; size?: number; region?: ScreenshotRegion; /** Where the panel's top-left pixel is in the returned image ([0, 0] for region "lcd"). */ lcd_origin?: [number, number]; /** Capture pixels per LCD pixel (the SDL window zoom). */ scale?: number; error?: string; } /** * Take a screenshot of the simulator window. * @param save_to_file If true, simulator writes PNG directly to disk (fast path). * @param filename Custom filename (default: screenshot_.png) * @param region "full" = whole window; "lcd" = the 320x240 panel only. */ export declare function crosspadScreenshot(saveToFile?: boolean, filename?: string, region?: ScreenshotRegion): Promise;