]> git.proxmox.com Git - mirror_xterm.js.git/blob - src/Interfaces.ts
Migrate Clipboard handler to TypeScript
[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 }