import { Job, JobSource } from './job'; import maa from './maa'; export type ControllerNotify = ({ adb: string; address: string; } & ({ msg: 'UUIDGot'; uuid: string; } | { msg: 'UUIDGetFailed'; } | { msg: 'ConnectSuccess'; } | { msg: 'ConnectFailed'; why: 'ConnectFailed' | 'UUIDGetFailed'; } | { msg: 'ScreencapInited' | 'ScreencapInitFailed' | 'TouchinputInited' | 'TouchinputInitFailed'; })) | { msg: 'Action.Started' | 'Action.Completed' | 'Action.Failed'; ctrl_id: maa.CtrlId; uuid: string; }; export declare class ControllerBase { #private; handle: maa.ControllerHandle; notify(message: string, details_json: string): maa.MaybePromise; set parsed_notify(cb: (msg: ControllerNotify) => maa.MaybePromise); constructor(handle: maa.ControllerHandle); destroy(): void; set screenshot_target_long_side(value: number); set screenshot_target_short_side(value: number); set screenshot_use_raw_size(value: boolean); set recording(value: boolean); post_connection(): Job>; post_click(x: number, y: number): Job>; post_swipe(x1: number, y1: number, x2: number, y2: number, duration: number): Job>; post_press_key(keycode: number): Job>; post_input_text(text: string): Job>; post_start_app(intent: string): Job>; post_stop_app(intent: string): Job>; post_touch_down(contact: number, x: number, y: number, pressure: number): Job>; post_touch_move(contact: number, x: number, y: number, pressure: number): Job>; post_touch_up(contact: number): Job>; post_screencap(): Job>; get connected(): boolean; get cached_image(): ArrayBuffer | null; get uuid(): string | null; } export declare class AdbController extends ControllerBase { constructor(adb_path: string, address: string, screencap_methods: maa.ScreencapOrInputMethods, input_methods: maa.ScreencapOrInputMethods, config: string, agent?: string); static agent_path(): string; static find(adb?: string): Promise<[name: string, adb_path: string, address: string, screencap_methods: maa.Uint64, input_methods: maa.Uint64, config: string][] | null>; } export declare class Win32Controller extends ControllerBase { constructor(hwnd: maa.DesktopHandle | null, screencap_methods: maa.ScreencapOrInputMethods, input_methods: maa.ScreencapOrInputMethods); static find(): Promise<[handle: maa.DesktopHandle, class_name: string, window_name: string][] | null>; } export declare class DbgController extends ControllerBase { constructor(read_path: string, write_path: string, type: maa.Uint64, config: string); }