]> git.proxmox.com Git - mirror_xterm.js.git/blob - src/Interfaces.ts
Add CSI @, E, F, G
[mirror_xterm.js.git] / src / Interfaces.ts
1 /**
2 * @license MIT
3 */
4
5 export interface IBrowser {
6 isNode: boolean;
7 userAgent: string;
8 platform: string;
9 isFirefox: boolean;
10 isMSIE: boolean;
11 isMac: boolean;
12 isIpad: boolean;
13 isIphone: boolean;
14 isMSWindows: boolean;
15 }
16
17 export interface ITerminal {
18 element: HTMLElement;
19 rowContainer: HTMLElement;
20 textarea: HTMLTextAreaElement;
21 ydisp: number;
22 lines: string[];
23 rows: number;
24 browser: IBrowser;
25
26 /**
27 * Emit the 'data' event and populate the given data.
28 * @param data The data to populate in the event.
29 */
30 handler(data: string);
31 on(event: string, callback: () => void);
32 scrollDisp(disp: number, suppressScrollEvent: boolean);
33 cancel(ev: Event, force?: boolean);
34 }
35
36 /**
37 * Handles actions generated by the parser.
38 */
39 export interface IInputHandler {
40 bell(): void;
41 lineFeed(): void;
42 carriageReturn(): void;
43 backspace(): void;
44 tab(): void;
45 shiftOut(): void;
46 shiftIn(): void;
47 insertChars(params);
48 cursorUp(params: number[]): void;
49 cursorDown(params: number[]): void;
50 cursorForward(params: number[]): void;
51 cursorBackward(params: number[]): void;
52 cursorNextLine(params: number[]): void;
53 cursorPrecedingLine(params: number[]): void;
54 cursorCharAbsolute(params: number[]): void;
55 cursorPosition(params: number[]): void;
56 eraseInDisplay(params: number[]): void;
57 eraseInLine(params: number[]): void;
58 charAttributes(params: number[]): void;
59 deviceStatus(params: number[]): void;
60 }