xterm-private.d.ts 1.1 KB
Newer Older
1 2 3 4 5
/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

C
wip  
Connor Peet 已提交
6 7 8 9
import { IBufferCell } from 'xterm';

export type XTermAttributes = Omit<IBufferCell, 'getWidth' | 'getChars' | 'getCode'> & { clone?(): XTermAttributes };

10 11 12 13 14 15 16 17 18 19 20
export interface XTermCore {
	_onScroll: IEventEmitter<number>;
	_onKey: IEventEmitter<{ key: string }>;

	_charSizeService: {
		width: number;
		height: number;
	};

	_coreService: {
		triggerDataEvent(data: string, wasUserInput?: boolean): void;
21
	};
C
wip  
Connor Peet 已提交
22

23 24
	_inputHandler: {
		_curAttrData: XTermAttributes;
D
Daniel Imms 已提交
25
	};
26 27

	_renderService: {
28 29 30 31
		dimensions: {
			actualCellWidth: number;
			actualCellHeight: number;
		},
32 33 34 35 36
		_renderer: {
			_renderLayers: any[];
		};
		_onIntersectionChange: any;
	};
A
Alex Dima 已提交
37 38

	writeSync(data: string | Uint8Array): void;
39 40 41 42 43
}

export interface IEventEmitter<T> {
	fire(e: T): void;
}