1 | import { ContributionProvider, CommandRegistry, MenuModelRegistry, BackendStopwatch, Stopwatch } from '../common';
|
2 | import { MaybePromise } from '../common/types';
|
3 | import { KeybindingRegistry } from './keybinding';
|
4 | import { ApplicationShell } from './shell/application-shell';
|
5 | import { ShellLayoutRestorer } from './shell/shell-layout-restorer';
|
6 | import { FrontendApplicationStateService } from './frontend-application-state';
|
7 | import { CorePreferences } from './core-preferences';
|
8 | import { WindowService } from './window/window-service';
|
9 | import { TooltipService } from './tooltip-service';
|
10 | import { FrontendApplicationContribution } from './frontend-application-contribution';
|
11 | export declare class FrontendApplication {
|
12 | protected readonly commands: CommandRegistry;
|
13 | protected readonly menus: MenuModelRegistry;
|
14 | protected readonly keybindings: KeybindingRegistry;
|
15 | protected readonly layoutRestorer: ShellLayoutRestorer;
|
16 | protected readonly contributions: ContributionProvider<FrontendApplicationContribution>;
|
17 | protected readonly _shell: ApplicationShell;
|
18 | protected readonly stateService: FrontendApplicationStateService;
|
19 | protected readonly corePreferences: CorePreferences;
|
20 | protected readonly windowsService: WindowService;
|
21 | protected readonly tooltipService: TooltipService;
|
22 | protected readonly stopwatch: Stopwatch;
|
23 | protected readonly backendStopwatch: BackendStopwatch;
|
24 | constructor(commands: CommandRegistry, menus: MenuModelRegistry, keybindings: KeybindingRegistry, layoutRestorer: ShellLayoutRestorer, contributions: ContributionProvider<FrontendApplicationContribution>, _shell: ApplicationShell, stateService: FrontendApplicationStateService);
|
25 | get shell(): ApplicationShell;
|
26 | /**
|
27 | * Start the frontend application.
|
28 | *
|
29 | * Start up consists of the following steps:
|
30 | * - start frontend contributions
|
31 | * - attach the application shell to the host element
|
32 | * - initialize the application shell layout
|
33 | * - reveal the application shell if it was hidden by a startup indicator
|
34 | */
|
35 | start(): Promise<void>;
|
36 | /**
|
37 | * Return a promise to the host element to which the application shell is attached.
|
38 | */
|
39 | protected getHost(): Promise<HTMLElement>;
|
40 | /**
|
41 | * Return an HTML element that indicates the startup phase, e.g. with an animation or a splash screen.
|
42 | */
|
43 | protected getStartupIndicator(host: HTMLElement): HTMLElement | undefined;
|
44 | /**
|
45 | * Register global event listeners.
|
46 | */
|
47 | protected registerEventListeners(): void;
|
48 | /**
|
49 | * Attach the application shell to the host element. If a startup indicator is present, the shell is
|
50 | * inserted before that indicator so it is not visible yet.
|
51 | */
|
52 | protected attachShell(host: HTMLElement): void;
|
53 | /**
|
54 | * Attach the tooltip container to the host element.
|
55 | */
|
56 | protected attachTooltip(host: HTMLElement): void;
|
57 | /**
|
58 | * If a startup indicator is present, it is first hidden with the `theia-hidden` CSS class and then
|
59 | * removed after a while. The delay until removal is taken from the CSS transition duration.
|
60 | */
|
61 | protected revealShell(host: HTMLElement): Promise<void>;
|
62 | /**
|
63 | * Initialize the shell layout either using the layout restorer service or, if no layout has
|
64 | * been stored, by creating the default layout.
|
65 | */
|
66 | protected initializeLayout(): Promise<void>;
|
67 | /**
|
68 | * Try to restore the shell layout from the storage service. Resolves to `true` if successful.
|
69 | */
|
70 | protected restoreLayout(): Promise<boolean>;
|
71 | /**
|
72 | * Let the frontend application contributions initialize the shell layout. Override this
|
73 | * method in order to create an application-specific custom layout.
|
74 | */
|
75 | protected createDefaultLayout(): Promise<void>;
|
76 | protected fireOnDidInitializeLayout(): Promise<void>;
|
77 | /**
|
78 | * Initialize and start the frontend application contributions.
|
79 | */
|
80 | protected startContributions(): Promise<void>;
|
81 | /**
|
82 | * Stop the frontend application contributions. This is called when the window is unloaded.
|
83 | */
|
84 | protected stopContributions(): void;
|
85 | protected measure<T>(name: string, fn: () => MaybePromise<T>, message?: string, threshold?: boolean): Promise<T>;
|
86 | }
|
87 | //# sourceMappingURL=frontend-application.d.ts.map |
\ | No newline at end of file |