@yume-chan/scrcpy
Version:
TypeScript implementation of Scrcpy.
33 lines • 1.76 kB
TypeScript
import type { WritableStreamDefaultWriter } from "@yume-chan/stream-extra";
import { Consumable } from "@yume-chan/stream-extra";
import type { ScrcpyOptions } from "../options/index.js";
import type { AndroidKeyEventAction, ScrcpyInjectKeyCodeControlMessage } from "./inject-keycode.js";
import type { ScrcpyInjectScrollControlMessage } from "./inject-scroll.js";
import type { ScrcpyInjectTouchControlMessage } from "./inject-touch.js";
import type { ScrcpySetClipboardControlMessage } from "./set-clipboard.js";
import type { AndroidScreenPowerMode } from "./set-screen-power-mode.js";
export declare class ScrcpyControlMessageWriter {
#private;
constructor(writer: WritableStreamDefaultWriter<Consumable<Uint8Array>>, options: ScrcpyOptions<object>);
write(message: Uint8Array): Promise<void>;
injectKeyCode(message: Omit<ScrcpyInjectKeyCodeControlMessage, "type">): Promise<void>;
injectText(text: string): Promise<void>;
/**
* `pressure` is a float value between 0 and 1.
*/
injectTouch(message: Omit<ScrcpyInjectTouchControlMessage, "type">): Promise<void>;
/**
* `scrollX` and `scrollY` are float values between 0 and 1.
*/
injectScroll(message: Omit<ScrcpyInjectScrollControlMessage, "type">): Promise<void>;
backOrScreenOn(action: AndroidKeyEventAction): Promise<void>;
setScreenPowerMode(mode: AndroidScreenPowerMode): Promise<void>;
expandNotificationPanel(): Promise<void>;
expandSettingPanel(): Promise<void>;
collapseNotificationPanel(): Promise<void>;
rotateDevice(): Promise<void>;
setClipboard(message: Omit<ScrcpySetClipboardControlMessage, "type">): Promise<void>;
releaseLock(): void;
close(): Promise<void>;
}
//# sourceMappingURL=writer.d.ts.map