UNPKG

@wasmer/io-devices

Version:

Isomorphic library to implement the experimental Wasmer I/O devices for wasmfs instances 🖼️🎮

21 lines (20 loc) 801 B
import { WasmFs } from "../../wasmfs/src/index"; export { IO_DEVICES_CONSTANTS } from "./constants"; export default class IoDevicesDefault { wasmFs: WasmFs; fdFrameBuffer: number; fdWindowSize: number; fdBufferIndexDisplay: number; fdInput: number; windowSizeCallback: Function; bufferIndexDisplayCallback: Function; inputCallback: Function; constructor(wasmFs: WasmFs); getFrameBuffer(): Uint8Array; getWindowSize(): Array<number>; setWindowSizeCallback(windowSizeCallback: Function): void; setBufferIndexDisplayCallback(bufferIndexDisplayCallback: Function): void; setInputCallback(inputCallback: Function): void; } export declare const IoDevices: typeof IoDevicesDefault; export declare type IoDevices = IoDevicesDefault;