Files
xterm.js/src/Interfaces.ts
T

57 lines
1.2 KiB
TypeScript

/**
* @license MIT
*/
export interface IBrowser {
isNode: boolean;
userAgent: string;
platform: string;
isFirefox: boolean;
isMSIE: boolean;
isMac: boolean;
isIpad: boolean;
isIphone: boolean;
isMSWindows: boolean;
}
export interface ITerminal {
element: HTMLElement;
rowContainer: HTMLElement;
textarea: HTMLTextAreaElement;
ydisp: number;
lines: string[];
rows: number;
browser: IBrowser;
/**
* Emit the 'data' event and populate the given data.
* @param data The data to populate in the event.
*/
handler(data: string);
on(event: string, callback: () => void);
scrollDisp(disp: number, suppressScrollEvent: boolean);
cancel(ev: Event, force?: boolean);
}
/**
* Handles actions generated by the parser.
*/
export interface IInputHandler {
bell(): void;
lineFeed(): void;
carriageReturn(): void;
backspace(): void;
tab(): void;
shiftOut(): void;
shiftIn(): void;
cursorUp(params: number[]): void;
cursorDown(params: number[]);
cursorForward(params: number[]);
cursorBackward(params: number[]);
cursorPosition(params: number[]);
eraseInDisplay(params: number[]);
eraseInLine(params: number[]);
charAttributes(params: number[]);
deviceStatus(params: number[]);
}