@visactor/vrender-kits
Version:
```typescript import { xxx } from '@visactor/vrender-kits'; ```
40 lines (39 loc) • 1.96 kB
TypeScript
import { BaseWindowHandlerContribution, ContainerModule } from '@visactor/vrender-core';
import type { EnvType, IGlobal, IContext2d, ICanvas, IDomRectLike, IWindowHandlerContribution, IWindowParams } from '@visactor/vrender-core';
export declare class NodeWindowHandlerContribution extends BaseWindowHandlerContribution implements IWindowHandlerContribution {
private readonly global;
static env: EnvType;
type: EnvType;
canvas: ICanvas;
get container(): HTMLElement | null;
constructor(global: IGlobal);
getTitle(): string;
getWH(): {
width: number;
height: number;
};
getXY(): {
x: number;
y: number;
};
createWindow(params: IWindowParams): void;
private createWindowByConfig;
private createWindowByCanvas;
releaseWindow(): void;
resizeWindow(width: number, height: number): void;
setDpr(dpr: number): void;
getContext(): IContext2d;
getNativeHandler(): ICanvas;
getDpr(): number;
getImageBuffer(type?: string): any;
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
dispatchEvent(event: any): boolean;
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
getStyle(): CSSStyleDeclaration | Record<string, any>;
setStyle(style: CSSStyleDeclaration | Record<string, any>): void;
getBoundingClientRect(): IDomRectLike;
clearViewBox(color?: string): void;
}
export declare const nodeWindowModule: ContainerModule;