import { Plugin, WebviewsExt, WebviewPanelViewState, WebviewsMain, WebviewInitData } from '../common/plugin-api-rpc'; import * as theia from '@theia/plugin'; import { RPCProtocol } from '../common/rpc-protocol'; import { Emitter, Event } from '@theia/core/lib/common/event'; import { WebviewPanelTargetArea } from './types-impl'; import { WorkspaceExtImpl } from './workspace'; import { PluginModel } from '../common'; export declare class WebviewsExtImpl implements WebviewsExt { protected readonly rpc: RPCProtocol; protected readonly workspace: WorkspaceExtImpl; private proxy; private readonly webviewPanels; private readonly webviews; private readonly serializers; private initData; readonly onDidDisposeEmitter: Emitter; readonly onDidDispose: Event; initialize(): void; init(initData: WebviewInitData): void; $onMessage(handle: string, message: any): void; $onDidChangeWebviewPanelViewState(handle: string, newState: WebviewPanelViewState): void; $onDidDisposeWebviewPanel(handle: string): PromiseLike; $deserializeWebviewPanel(viewId: string, viewType: string, title: string, state: any, viewState: WebviewPanelViewState, options: theia.WebviewOptions & theia.WebviewPanelOptions): PromiseLike; createWebview(viewType: string, title: string, showOptions: theia.ViewColumn | theia.WebviewPanelShowOptions, options: theia.WebviewPanelOptions & theia.WebviewOptions, plugin: Plugin): theia.WebviewPanel; /** * Creates a new webview panel. * * @param viewType Identifies the type of the webview panel. * @param title Title of the panel. * @param showOptions Where webview panel will be reside. * @param options Settings for the new panel. * @param plugin The plugin contributing the webview. * @param viewId The identifier of the webview instance. * @param originBasedOnType true if a stable origin based on the viewType shall be used, false if the viewId should be used. * @returns The new webview panel. */ createWebviewPanel(viewType: string, title: string, showOptions: theia.ViewColumn | theia.WebviewPanelShowOptions, options: theia.WebviewPanelOptions & theia.WebviewOptions, plugin: Plugin, viewId: string, originBasedOnType?: boolean): WebviewPanelImpl; createNewWebview(options: theia.WebviewPanelOptions & theia.WebviewOptions, plugin: Plugin, viewId: string, origin?: string): WebviewImpl; registerWebviewPanelSerializer(viewType: string, serializer: theia.WebviewPanelSerializer, plugin: Plugin): theia.Disposable; getWebviewPanel(viewId: string): WebviewPanelImpl | undefined; toGeneralWebviewResource(extension: PluginModel, resource: theia.Uri): theia.Uri; deleteWebview(handle: string): void; getWebview(handle: string): WebviewImpl | undefined; getResourceRoot(): string | undefined; } export declare class WebviewImpl implements theia.Webview { private readonly viewId; private readonly proxy; private readonly initData; private readonly workspace; readonly plugin: Plugin; private readonly origin?; private isDisposed; private _html; private _options; readonly onMessageEmitter: Emitter; readonly onDidReceiveMessage: Event; constructor(viewId: string, proxy: WebviewsMain, options: theia.WebviewOptions, initData: WebviewInitData, workspace: WorkspaceExtImpl, plugin: Plugin, origin?: string | undefined); dispose(): void; asWebviewUri(resource: theia.Uri): theia.Uri; get cspSource(): string; get html(): string; set html(value: string); get options(): theia.WebviewOptions; set options(newOptions: theia.WebviewOptions); postMessage(message: any): PromiseLike; private checkIsDisposed; static toWebviewOptions(options: theia.WebviewOptions, workspace: WorkspaceExtImpl, plugin: Plugin): theia.WebviewOptions; } export declare class WebviewPanelImpl implements theia.WebviewPanel { private readonly viewId; private readonly proxy; private readonly _viewType; private _title; private readonly _options; private readonly _webview; private isDisposed; private _active; private _visible; private _showOptions; private _iconPath; readonly onDisposeEmitter: Emitter; readonly onDidDispose: Event; readonly onDidChangeViewStateEmitter: Emitter; readonly onDidChangeViewState: Event; constructor(viewId: string, proxy: WebviewsMain, _viewType: string, _title: string, showOptions: theia.ViewColumn | theia.WebviewPanelShowOptions, _options: theia.WebviewPanelOptions, _webview: WebviewImpl); dispose(): void; get viewType(): string; get title(): string; set title(newTitle: string); get iconPath(): theia.IconPath | undefined; set iconPath(iconPath: theia.IconPath | undefined); get webview(): WebviewImpl; get options(): theia.WebviewPanelOptions; get viewColumn(): theia.ViewColumn | undefined; setViewColumn(value: theia.ViewColumn | undefined): void; get showOptions(): theia.WebviewPanelShowOptions; setShowOptions(value: theia.WebviewPanelShowOptions): void; get active(): boolean; setActive(value: boolean): void; get visible(): boolean; setVisible(value: boolean): void; reveal(arg0?: theia.ViewColumn | WebviewPanelTargetArea, arg1?: theia.ViewColumn | boolean, arg2?: boolean): void; postMessage(message: any): PromiseLike; private checkIsDisposed; } //# sourceMappingURL=webviews.d.ts.map