simplify color events
This commit is contained in:
Vendored
+12
-9
@@ -348,17 +348,20 @@ export interface IWindowOptions {
|
||||
setWinLines?: boolean;
|
||||
}
|
||||
|
||||
export interface IColorEventColor {
|
||||
index: number;
|
||||
color: [number, number, number] | '?';
|
||||
// color events from common, used for OSC 4/10/11
|
||||
export const enum ColorIndex {
|
||||
FOREGROUND = 256,
|
||||
BACKGROUND = 257
|
||||
}
|
||||
export interface IColorReportRequest {
|
||||
index: ColorIndex;
|
||||
color?: IColorRGB;
|
||||
}
|
||||
export interface IColorSetRequest extends IColorReportRequest {
|
||||
color: IColorRGB;
|
||||
}
|
||||
export type IColorEvent = (IColorReportRequest | IColorSetRequest)[];
|
||||
|
||||
/**
|
||||
* Event fired for OSC 4 command - to change ANSI color based on its index.
|
||||
*/
|
||||
export interface IColorEvent {
|
||||
requests: IColorEventColor[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls the parser and handles actions generated by the parser.
|
||||
|
||||
Reference in New Issue
Block a user