2019-06-14 23:55:17 -07:00
|
|
|
/**
|
|
|
|
|
* Copyright (c) 2017 The xterm.js authors. All rights reserved.
|
|
|
|
|
* @license MIT
|
|
|
|
|
*/
|
|
|
|
|
|
2023-11-01 06:50:08 -07:00
|
|
|
import { Terminal, ITerminalAddon, IEvent } from '@xterm/xterm';
|
2019-06-14 23:55:17 -07:00
|
|
|
|
2023-11-01 06:44:26 -07:00
|
|
|
declare module '@xterm/addon-webgl' {
|
2019-06-14 23:55:17 -07:00
|
|
|
/**
|
|
|
|
|
* An xterm.js addon that provides search functionality.
|
|
|
|
|
*/
|
2019-06-15 00:11:34 -07:00
|
|
|
export class WebglAddon implements ITerminalAddon {
|
2019-12-11 14:21:09 -08:00
|
|
|
public textureAtlas?: HTMLCanvasElement;
|
|
|
|
|
|
2022-07-31 11:21:27 -07:00
|
|
|
/**
|
|
|
|
|
* An event that is fired when the renderer loses its canvas context.
|
|
|
|
|
*/
|
2022-10-01 07:52:26 -07:00
|
|
|
public readonly onContextLoss: IEvent<void>;
|
2022-07-31 11:21:27 -07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* An event that is fired when the texture atlas of the renderer changes.
|
|
|
|
|
*/
|
2022-10-01 07:52:26 -07:00
|
|
|
public readonly onChangeTextureAtlas: IEvent<HTMLCanvasElement>;
|
2022-07-31 11:21:27 -07:00
|
|
|
|
2022-10-30 18:11:24 -07:00
|
|
|
/**
|
|
|
|
|
* An event that is fired when the a new page is added to the texture atlas.
|
|
|
|
|
*/
|
2022-10-28 19:30:42 -07:00
|
|
|
public readonly onAddTextureAtlasCanvas: IEvent<HTMLCanvasElement>;
|
|
|
|
|
|
2019-06-15 00:11:34 -07:00
|
|
|
constructor(preserveDrawingBuffer?: boolean);
|
|
|
|
|
|
2019-06-14 23:55:17 -07:00
|
|
|
/**
|
2020-09-06 14:50:07 -07:00
|
|
|
* Activates the addon.
|
2019-06-14 23:55:17 -07:00
|
|
|
* @param terminal The terminal the addon is being loaded in.
|
|
|
|
|
*/
|
|
|
|
|
public activate(terminal: Terminal): void;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Disposes the addon.
|
|
|
|
|
*/
|
|
|
|
|
public dispose(): void;
|
2020-09-06 14:50:07 -07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Clears the terminal's texture atlas and triggers a redraw.
|
|
|
|
|
*/
|
|
|
|
|
public clearTextureAtlas(): void;
|
2019-06-14 23:55:17 -07:00
|
|
|
}
|
|
|
|
|
}
|