remove mention of buffer

This commit is contained in:
meganrogge
2022-02-08 11:45:22 -06:00
parent 8b540c5f3b
commit cae9f44f5c
12 changed files with 30 additions and 43 deletions
@@ -13,7 +13,7 @@ import { IWebGL2RenderingContext } from './Types';
import { RenderModel, COMBINED_CHAR_BIT_MASK, RENDER_MODEL_BG_OFFSET, RENDER_MODEL_FG_OFFSET, RENDER_MODEL_INDICIES_PER_CELL } from './RenderModel';
import { Disposable } from 'common/Lifecycle';
import { Content, NULL_CELL_CHAR, NULL_CELL_CODE } from 'common/buffer/Constants';
import { Terminal, IEvent, IBufferDecorationOptions, IDecoration } from 'xterm';
import { Terminal, IEvent, IDecorationOptions, IDecoration } from 'xterm';
import { IRenderLayer } from './renderLayer/Types';
import { IRenderDimensions, IRenderer, IRequestRedrawEvent } from 'browser/renderer/Types';
import { ITerminal, IColorSet } from 'browser/Types';
+2 -2
View File
@@ -37,7 +37,7 @@ import * as Strings from 'browser/LocalizableStrings';
import { SoundService } from 'browser/services/SoundService';
import { MouseZoneManager } from 'browser/MouseZoneManager';
import { AccessibilityManager } from './AccessibilityManager';
import { ITheme, IMarker, IDisposable, ISelectionPosition, ILinkProvider, IBufferDecorationOptions, IDecoration } from 'xterm';
import { ITheme, IMarker, IDisposable, ISelectionPosition, ILinkProvider, IDecorationOptions, IDecoration } from 'xterm';
import { DomRenderer } from 'browser/renderer/dom/DomRenderer';
import { KeyboardResultType, CoreMouseEventType, CoreMouseButton, CoreMouseAction, ITerminalOptions, ScrollSource, IColorEvent, ColorIndex, ColorRequestType } from 'common/Types';
import { evaluateKeyboardEvent } from 'common/input/Keyboard';
@@ -1006,7 +1006,7 @@ export class Terminal extends CoreTerminal implements ITerminal {
return this.buffer.addMarker(this.buffer.ybase + this.buffer.y + cursorYOffset);
}
public registerDecoration(decorationOptions: IBufferDecorationOptions): IDecoration | undefined {
public registerDecoration(decorationOptions: IDecorationOptions): IDecoration | undefined {
if (!this._decorationsService) {
throw new Error('cannot register a decoration without a decorations service');
}
+4 -4
View File
@@ -3,7 +3,7 @@
* @license MIT
*/
import { IDisposable, IMarker, ISelectionPosition, ILinkProvider, IBufferDecorationOptions, IDecoration } from 'xterm';
import { IDisposable, IMarker, ISelectionPosition, ILinkProvider, IDecorationOptions, IDecoration } from 'xterm';
import { IEvent, EventEmitter } from 'common/EventEmitter';
import { ICharacterJoinerService, ICharSizeService, IMouseService, IRenderService, ISelectionService } from 'browser/services/Services';
import { IRenderDimensions, IRenderer, IRequestRedrawEvent } from 'browser/renderer/Types';
@@ -102,7 +102,7 @@ export class MockTerminal implements ITerminal {
public registerLinkProvider(linkProvider: ILinkProvider): IDisposable {
throw new Error('Method not implemented.');
}
public registerDecoration(decorationOptions: IBufferDecorationOptions): IDecoration | undefined {
public registerDecoration(decorationOptions: IDecorationOptions): IDecoration | undefined {
throw new Error('Method not implemented.');
}
public hasSelection(): boolean {
@@ -296,7 +296,7 @@ export class MockRenderer implements IRenderer {
public onDevicePixelRatioChange(): void { }
public clear(): void { }
public renderRows(start: number, end: number): void { }
public registerDecoration(decorationOptions: IBufferDecorationOptions): IDecoration {
public registerDecoration(decorationOptions: IDecorationOptions): IDecoration {
throw new Error('Method not implemented.');
}
}
@@ -428,7 +428,7 @@ export class MockRenderService implements IRenderService {
public dispose(): void {
throw new Error('Method not implemented.');
}
public registerDecoration(decorationOptions: IBufferDecorationOptions): IDecoration {
public registerDecoration(decorationOptions: IDecorationOptions): IDecoration {
throw new Error('Method not implemented.');
}
}
+2 -2
View File
@@ -3,7 +3,7 @@
* @license MIT
*/
import { IBufferDecorationOptions, IDecoration, IDisposable, IMarker, ISelectionPosition } from 'xterm';
import { IDecorationOptions, IDecoration, IDisposable, IMarker, ISelectionPosition } from 'xterm';
import { IEvent } from 'common/EventEmitter';
import { ICoreTerminal, CharData, ITerminalOptions } from 'common/Types';
import { IMouseService, IRenderService } from './services/Services';
@@ -61,7 +61,7 @@ export interface IPublicTerminal extends IDisposable {
registerCharacterJoiner(handler: (text: string) => [number, number][]): number;
deregisterCharacterJoiner(joinerId: number): void;
addMarker(cursorYOffset: number): IMarker | undefined;
registerDecoration(decorationOptions: IBufferDecorationOptions): IDecoration | undefined;
registerDecoration(decorationOptions: IDecorationOptions): IDecoration | undefined;
hasSelection(): boolean;
getSelection(): string;
getSelectionPosition(): ISelectionPosition | undefined;
+2 -2
View File
@@ -3,7 +3,7 @@
* @license MIT
*/
import { Terminal as ITerminalApi, IMarker, IDisposable, ILinkMatcherOptions, ITheme, ILocalizableStrings, ITerminalAddon, ISelectionPosition, IBufferNamespace as IBufferNamespaceApi, IParser, ILinkProvider, IUnicodeHandling, FontWeight, IModes, IBufferDecorationOptions, IDecoration } from 'xterm';
import { Terminal as ITerminalApi, IMarker, IDisposable, ILinkMatcherOptions, ITheme, ILocalizableStrings, ITerminalAddon, ISelectionPosition, IBufferNamespace as IBufferNamespaceApi, IParser, ILinkProvider, IUnicodeHandling, FontWeight, IModes, IDecorationOptions, IDecoration } from 'xterm';
import { ITerminal } from 'browser/Types';
import { Terminal as TerminalCore } from 'browser/Terminal';
import * as Strings from 'browser/LocalizableStrings';
@@ -171,7 +171,7 @@ export class Terminal implements ITerminalApi {
this._verifyIntegers(cursorYOffset);
return this._core.addMarker(cursorYOffset);
}
public registerDecoration(decorationOptions: IBufferDecorationOptions): IDecoration | undefined {
public registerDecoration(decorationOptions: IDecorationOptions): IDecoration | undefined {
this._checkProposedApi();
return this._core.registerDecoration(decorationOptions);
}
+1 -1
View File
@@ -14,7 +14,7 @@ import { ICharSizeService } from 'browser/services/Services';
import { IBufferService, IOptionsService, IInstantiationService } from 'common/services/Services';
import { removeTerminalFromCache } from 'browser/renderer/atlas/CharAtlasCache';
import { EventEmitter, IEvent } from 'common/EventEmitter';
import { IBufferDecorationOptions, IDecoration } from 'xterm';
import { IDecorationOptions, IDecoration } from 'xterm';
let nextRendererId = 1;
+1 -1
View File
@@ -6,7 +6,7 @@
import { IDisposable } from 'common/Types';
import { IColorSet } from 'browser/Types';
import { IEvent } from 'common/EventEmitter';
import { IBufferDecorationOptions, IDecoration } from 'xterm';
import { IDecorationOptions, IDecoration } from 'xterm';
export interface IRenderDimensions {
scaledCharWidth: number;
+2 -2
View File
@@ -13,7 +13,7 @@ import { IOptionsService, IBufferService, IInstantiationService } from 'common/s
import { EventEmitter, IEvent } from 'common/EventEmitter';
import { color } from 'browser/Color';
import { removeElementFromParent } from 'browser/Dom';
import { IBufferDecorationOptions, IDecoration } from 'xterm';
import { IDecorationOptions, IDecoration } from 'xterm';
const TERMINAL_CLASS_PREFIX = 'xterm-dom-renderer-owner-';
const ROW_CONTAINER_CLASS = 'xterm-rows';
@@ -152,7 +152,7 @@ export class DomRenderer extends Disposable implements IRenderer {
this._injectCss();
}
public registerDecoration(decorationOptions: IBufferDecorationOptions): IDecoration {
public registerDecoration(decorationOptions: IDecorationOptions): IDecoration {
// const decorationLayer = this._renderLayers.find(l => l instanceof DecorationRenderLayer);
// if (decorationLayer instanceof DecorationRenderLayer) {
// return decorationLayer.registerDecoration(decorationOptions);
+11 -11
View File
@@ -7,19 +7,19 @@ import { IRenderService } from 'browser/services/Services';
import { EventEmitter, IEvent } from 'common/EventEmitter';
import { Disposable } from 'common/Lifecycle';
import { createDecorator } from 'common/services/ServiceRegistry';
import { IBufferService, ILogService } from 'common/services/Services';
import { IBufferService } from 'common/services/Services';
import { IDisposable } from 'common/Types';
import { IBufferDecorationOptions, IDecoration, IMarker } from 'xterm';
import { IDecorationOptions, IDecoration, IMarker } from 'xterm';
export interface IDecorationsService extends IDisposable {
registerDecoration(decorationOptions: IBufferDecorationOptions): IDecoration | undefined;
registerDecoration(decorationOptions: IDecorationOptions): IDecoration | undefined;
refresh(): void;
dispose(): void;
}
export class DecorationsService extends Disposable implements IDecorationsService {
private _decorations: BufferDecoration[] = [];
private _decorations: Decoration[] = [];
private _animationFrame: number | undefined;
constructor(
@@ -30,13 +30,13 @@ export class DecorationsService extends Disposable implements IDecorationsServic
super();
}
public registerDecoration(decorationOptions: IBufferDecorationOptions): IDecoration | undefined {
public registerDecoration(decorationOptions: IDecorationOptions): IDecoration | undefined {
if (decorationOptions.marker.isDisposed) {
return undefined;
}
const bufferDecoration = new BufferDecoration(decorationOptions, this._screenElement, this._renderService, this._bufferService);
this._decorations.push(bufferDecoration);
return bufferDecoration;
const decoration = new Decoration(decorationOptions, this._screenElement, this._renderService, this._bufferService);
this._decorations.push(decoration);
return decoration;
}
public refresh(): void {
@@ -68,11 +68,11 @@ export class DecorationsService extends Disposable implements IDecorationsServic
}
export const IDecorationsService = createDecorator<IDecorationsService>('DecorationsService');
class BufferDecoration extends Disposable implements IDecoration {
class Decoration extends Disposable implements IDecoration {
private static _nextId = 1;
private _marker: IMarker;
private _element: HTMLElement | undefined;
private _id: number = BufferDecoration._nextId++;
private _id: number = Decoration._nextId++;
public isDisposed: boolean = false;
public get id(): number { return this._id; }
@@ -86,7 +86,7 @@ class BufferDecoration extends Disposable implements IDecoration {
public get onRender(): IEvent<HTMLElement> { return this._onRender.event; }
constructor(
private readonly _decorationOptions: IBufferDecorationOptions,
private readonly _decorationOptions: IDecorationOptions,
private readonly _screenElement: HTMLElement,
private readonly _renderService: IRenderService,
private readonly _bufferService: IBufferService
+1 -1
View File
@@ -12,7 +12,7 @@ import { addDisposableDomListener } from 'browser/Lifecycle';
import { IColorSet, IRenderDebouncer } from 'browser/Types';
import { IOptionsService, IBufferService } from 'common/services/Services';
import { ICharSizeService, IRenderService } from 'browser/services/Services';
import { IDecoration, IBufferDecorationOptions } from 'xterm';
import { IDecoration, IDecorationOptions } from 'xterm';
interface ISelectionState {
start: [number, number] | undefined;
+1 -1
View File
@@ -9,7 +9,7 @@ import { IColorSet } from 'browser/Types';
import { ISelectionRedrawRequestEvent as ISelectionRequestRedrawEvent, ISelectionRequestScrollLinesEvent } from 'browser/selection/Types';
import { createDecorator } from 'common/services/ServiceRegistry';
import { IDisposable } from 'common/Types';
import { IBufferDecorationOptions, IDecoration } from 'xterm';
import { IDecorationOptions, IDecoration } from 'xterm';
export const ICharSizeService = createDecorator<ICharSizeService>('CharSizeService');
export interface ICharSizeService {
+2 -15
View File
@@ -434,7 +434,7 @@ declare module 'xterm' {
readonly element: HTMLElement | undefined;
}
export interface IBufferDecorationOptions {
export interface IDecorationOptions {
/**
* The line in the terminal where
* the decoration will be displayed
@@ -467,19 +467,6 @@ declare module 'xterm' {
}
export interface IGutterDecorationOptions {
/**
* The line in the terminal where
* the decoration will be displayed
*/
startMarker: IMarker;
/**
* The end line in the terminal for
* the decoration
*/
endMarker: IMarker;
}
/**
* The set of localizable strings.
*/
@@ -951,7 +938,7 @@ declare module 'xterm' {
* width, height, and x offset from the anchor. Returns the decoration or
* undefined if the marker has already been disposed of.
*/
registerDecoration(decorationOptions: IBufferDecorationOptions): IDecoration | undefined;
registerDecoration(decorationOptions: IDecorationOptions): IDecoration | undefined;
/**
* Gets whether the terminal has an active selection.