]>
Commit | Line | Data |
---|---|---|
e0d98711 | 1 | /** |
1d300911 | 2 | * @license MIT |
e0d98711 DI |
3 | */ |
4 | ||
824a9c6d PK |
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 | ||
e0d98711 | 17 | export interface ITerminal { |
30fcdd6c | 18 | element: HTMLElement; |
e0d98711 | 19 | rowContainer: HTMLElement; |
824a9c6d | 20 | textarea: HTMLTextAreaElement; |
e0d98711 DI |
21 | ydisp: number; |
22 | lines: string[]; | |
23 | rows: number; | |
824a9c6d | 24 | browser: IBrowser; |
e0d98711 | 25 | |
30fcdd6c DI |
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); | |
e0d98711 DI |
31 | on(event: string, callback: () => void); |
32 | scrollDisp(disp: number, suppressScrollEvent: boolean); | |
824a9c6d | 33 | cancel(ev: Event, force?: boolean); |
e0d98711 | 34 | } |
04b1ebf1 DI |
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; | |
411b80cd | 47 | insertChars(params); |
9942477b | 48 | cursorUp(params: number[]): void; |
411b80cd DI |
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; | |
04b1ebf1 | 60 | } |