Merge branch 'master' into feat/serialize-addon
This commit is contained in:
Vendored
+28
@@ -258,3 +258,31 @@ export interface ICoreMouseProtocol {
|
||||
* (DEFAULT only supports up to 223 1-based as coord value).
|
||||
*/
|
||||
export type CoreMouseEncoding = (event: ICoreMouseEvent) => string;
|
||||
|
||||
/**
|
||||
* windowOptions
|
||||
*/
|
||||
export interface IWindowOptions {
|
||||
restoreWin?: boolean;
|
||||
minimizeWin?: boolean;
|
||||
setWinPosition?: boolean;
|
||||
setWinSizePixels?: boolean;
|
||||
raiseWin?: boolean;
|
||||
lowerWin?: boolean;
|
||||
refreshWin?: boolean;
|
||||
setWinSizeChars?: boolean;
|
||||
maximizeWin?: boolean;
|
||||
fullscreenWin?: boolean;
|
||||
getWinState?: boolean;
|
||||
getWinPosition?: boolean;
|
||||
getWinSizePixels?: boolean;
|
||||
getScreenSizePixels?: boolean;
|
||||
getCellSizePixels?: boolean;
|
||||
getWinSizeChars?: boolean;
|
||||
getScreenSizeChars?: boolean;
|
||||
getIconTitle?: boolean;
|
||||
getWinTitle?: boolean;
|
||||
pushTitle?: boolean;
|
||||
popTitle?: boolean;
|
||||
setWinLines?: boolean;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ export class ServiceCollection {
|
||||
return this._entries.has(id);
|
||||
}
|
||||
|
||||
get<T>(id: IServiceIdentifier<T>): T {
|
||||
get<T>(id: IServiceIdentifier<T>): T | undefined {
|
||||
return this._entries.get(id);
|
||||
}
|
||||
}
|
||||
@@ -52,6 +52,10 @@ export class InstantiationService implements IInstantiationService {
|
||||
this._services.set(id, instance);
|
||||
}
|
||||
|
||||
public getService<T>(id: IServiceIdentifier<T>): T | undefined {
|
||||
return this._services.get(id);
|
||||
}
|
||||
|
||||
public createInstance<T>(ctor: any, ...args: any[]): any {
|
||||
const serviceDependencies = getServiceDependencies(ctor).sort((a, b) => a.index - b.index);
|
||||
|
||||
|
||||
@@ -45,12 +45,13 @@ export const DEFAULT_OPTIONS: ITerminalOptions = Object.freeze({
|
||||
theme: {},
|
||||
rightClickSelectsWord: isMac,
|
||||
rendererType: 'canvas',
|
||||
windowOptions: {},
|
||||
windowsMode: false,
|
||||
wordSeparator: ' ()[]{}\',"`',
|
||||
|
||||
convertEol: false,
|
||||
termName: 'xterm',
|
||||
cancelEvents: false,
|
||||
wordSeparator: ' ()[]{}\',"`'
|
||||
cancelEvents: false
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import { IEvent } from 'common/EventEmitter';
|
||||
import { IBuffer, IBufferSet } from 'common/buffer/Types';
|
||||
import { IDecPrivateModes, ICoreMouseEvent, CoreMouseEncoding, ICoreMouseProtocol, CoreMouseEventType, ICharset } from 'common/Types';
|
||||
import { IDecPrivateModes, ICoreMouseEvent, CoreMouseEncoding, ICoreMouseProtocol, CoreMouseEventType, ICharset, IWindowOptions } from 'common/Types';
|
||||
import { createDecorator } from 'common/services/ServiceRegistry';
|
||||
|
||||
export const IBufferService = createDecorator<IBufferService>('BufferService');
|
||||
@@ -171,6 +171,7 @@ export interface IConstructorSignature8<A1, A2, A3, A4, A5, A6, A7, A8, T> {
|
||||
export const IInstantiationService = createDecorator<IInstantiationService>('InstantiationService');
|
||||
export interface IInstantiationService {
|
||||
setService<T>(id: IServiceIdentifier<T>, instance: T): void;
|
||||
getService<T>(id: IServiceIdentifier<T>): T | undefined;
|
||||
|
||||
createInstance<T>(ctor: IConstructorSignature0<T>): T;
|
||||
createInstance<A1, T>(ctor: IConstructorSignature1<A1, T>, first: A1): T;
|
||||
@@ -240,6 +241,7 @@ export interface IPartialTerminalOptions {
|
||||
theme?: ITheme;
|
||||
windowsMode?: boolean;
|
||||
wordSeparator?: string;
|
||||
windowOptions?: IWindowOptions;
|
||||
}
|
||||
|
||||
export interface ITerminalOptions {
|
||||
@@ -273,6 +275,7 @@ export interface ITerminalOptions {
|
||||
tabStopWidth: number;
|
||||
theme: ITheme;
|
||||
windowsMode: boolean;
|
||||
windowOptions: IWindowOptions;
|
||||
wordSeparator: string;
|
||||
|
||||
[key: string]: any;
|
||||
|
||||
Reference in New Issue
Block a user