1 | import { Menu, MenuItemConstructorOptions, WebContents } from '@theia/electron/shared/electron';
|
2 | import { FrontendApplicationState, StopReason } from '../common/frontend-application-state';
|
3 | import { ElectronSecurityToken } from '../electron-common/electron-token';
|
4 | import { WindowEvent, InternalMenuDto } from '../electron-common/electron-api';
|
5 | import { ElectronMainApplication, ElectronMainApplicationContribution } from './electron-main-application';
|
6 | import { Disposable, MaybePromise } from '../common';
|
7 | export declare class TheiaMainApi implements ElectronMainApplicationContribution {
|
8 | protected electronSecurityToken: ElectronSecurityToken;
|
9 | protected readonly openPopups: Map<number, Menu>;
|
10 | onStart(application: ElectronMainApplication): MaybePromise<void>;
|
11 | fromMenuDto(sender: WebContents, menuId: number, menuDto: InternalMenuDto[]): MenuItemConstructorOptions[];
|
12 | }
|
13 | export declare namespace TheiaRendererAPI {
|
14 | function sendWindowEvent(wc: WebContents, event: WindowEvent): void;
|
15 | function requestClose(wc: WebContents, stopReason: StopReason): Promise<boolean>;
|
16 | function requestSecondaryClose(mainWindow: WebContents, secondaryWindow: WebContents): Promise<boolean>;
|
17 | function onRequestReload(wc: WebContents, handler: () => void): Disposable;
|
18 | function onApplicationStateChanged(wc: WebContents, handler: (state: FrontendApplicationState) => void): Disposable;
|
19 | function onIpcData(handler: (sender: WebContents, data: Uint8Array) => void): Disposable;
|
20 | function sendData(wc: WebContents, data: Uint8Array): void;
|
21 | }
|
22 |
|
\ | No newline at end of file |