Document IBufferCell members
This commit is contained in:
Vendored
+77
-5
@@ -1008,30 +1008,102 @@ declare module 'xterm' {
|
|||||||
* Represents a single cell in the terminal's buffer.
|
* Represents a single cell in the terminal's buffer.
|
||||||
*/
|
*/
|
||||||
interface IBufferCell {
|
interface IBufferCell {
|
||||||
|
/**
|
||||||
|
* The width of the character. Some examples:
|
||||||
|
*
|
||||||
|
* - `1` for most cells.
|
||||||
|
* - `2` for wide character like CJK glyphs.
|
||||||
|
* - `0` for cells immediately following cells with a width of `2`.
|
||||||
|
*/
|
||||||
getWidth(): number;
|
getWidth(): number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The character(s) within the cell. Examples of what this can contain:
|
||||||
|
*
|
||||||
|
* - A normal width character
|
||||||
|
* - A wide character (eg. CJK)
|
||||||
|
* - An emoji
|
||||||
|
*/
|
||||||
getChars(): string;
|
getChars(): string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the UTF32 codepoint of single characters, if content is a combined
|
||||||
|
* string it returns the codepoint of the last character in the string.
|
||||||
|
*/
|
||||||
getCode(): number;
|
getCode(): number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the number representation of the foreground color mode, this can be
|
||||||
|
* used to perform quick comparisons of 2 cells to see if they're the same.
|
||||||
|
* Use `isFgRGB`, `isFgPalette` and `isFgDefault` to check what color mode
|
||||||
|
* a cell is.
|
||||||
|
*/
|
||||||
getFgColorMode(): number;
|
getFgColorMode(): number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the number representation of the background color mode, this can be
|
||||||
|
* used to perform quick comparisons of 2 cells to see if they're the same.
|
||||||
|
* Use `isBgRGB`, `isBgPalette` and `isBgDefault` to check what color mode
|
||||||
|
* a cell is.
|
||||||
|
*/
|
||||||
getBgColorMode(): number;
|
getBgColorMode(): number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a cell's foreground color number, this differs depending on what the
|
||||||
|
* color mode of the cell is:
|
||||||
|
*
|
||||||
|
* - Default: This should be 0, representing the default foreground color
|
||||||
|
* (CSI 39 m).
|
||||||
|
* - Palette: This is a number from 0 to 255 of ANSI colors (CSI 3(0-7) m,
|
||||||
|
* CSI 9(0-7) m, CSI 38 ; 5 ; 0-255 m).
|
||||||
|
* - RGB: A hex value representing a 'true color': 0xRRGGBB.
|
||||||
|
* (CSI 3 8 ; 2 ; Pi ; Pr ; Pg ; Pb)
|
||||||
|
*/
|
||||||
getFgColor(): number;
|
getFgColor(): number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a cell's background color number, this differs depending on what the
|
||||||
|
* color mode of the cell is:
|
||||||
|
*
|
||||||
|
* - Default: This should be 0, representing the default background color
|
||||||
|
* (CSI 49 m).
|
||||||
|
* - Palette: This is a number from 0 to 255 of ANSI colors
|
||||||
|
* (CSI 4(0-7) m, CSI 10(0-7) m, CSI 48 ; 5 ; 0-255 m).
|
||||||
|
* - RGB: A hex value representing a 'true color': 0xRRGGBB
|
||||||
|
* (CSI 4 8 ; 2 ; Pi ; Pr ; Pg ; Pb)
|
||||||
|
*/
|
||||||
getBgColor(): number;
|
getBgColor(): number;
|
||||||
|
|
||||||
isInverse(): number;
|
/** Whether the cell has the bold attribute (CSI 1 m). */
|
||||||
isBold(): number;
|
isBold(): number;
|
||||||
isUnderline(): number;
|
/** Whether the cell has the inverse attribute (CSI 3 m). */
|
||||||
isBlink(): number;
|
|
||||||
isInvisible(): number;
|
|
||||||
isItalic(): number;
|
isItalic(): number;
|
||||||
|
/** Whether the cell has the inverse attribute (CSI 2 m). */
|
||||||
isDim(): number;
|
isDim(): number;
|
||||||
|
/** Whether the cell has the underline attribute (CSI 4 m). */
|
||||||
|
isUnderline(): number;
|
||||||
|
/** Whether the cell has the inverse attribute (CSI 5 m). */
|
||||||
|
isBlink(): number;
|
||||||
|
/** Whether the cell has the inverse attribute (CSI 7 m). */
|
||||||
|
isInverse(): number;
|
||||||
|
/** Whether the cell has the inverse attribute (CSI 8 m). */
|
||||||
|
isInvisible(): number;
|
||||||
|
|
||||||
|
/** Whether the cell is using the RGB foreground color mode. */
|
||||||
isFgRGB(): boolean;
|
isFgRGB(): boolean;
|
||||||
|
/** Whether the cell is using the RGB background color mode. */
|
||||||
isBgRGB(): boolean;
|
isBgRGB(): boolean;
|
||||||
|
/** Whether the cell is using the palette foreground color mode. */
|
||||||
isFgPalette(): boolean;
|
isFgPalette(): boolean;
|
||||||
|
/** Whether the cell is using the palette background color mode. */
|
||||||
isBgPalette(): boolean;
|
isBgPalette(): boolean;
|
||||||
isAttributeDefault(): boolean;
|
/** Whether the cell is using the default foreground color mode. */
|
||||||
isFgDefault(): boolean;
|
isFgDefault(): boolean;
|
||||||
|
/** Whether the cell is using the default background color mode. */
|
||||||
isBgDefault(): boolean;
|
isBgDefault(): boolean;
|
||||||
|
|
||||||
|
/** Whether the cell has the default attribute (no color or style). */
|
||||||
|
isAttributeDefault(): boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user