@owdproject/nuxt 0.0.0-stage → 4.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -0
- package/README.md +77 -2
- package/dist/kit/authoring.d.ts +96 -0
- package/dist/kit/authoring.js +260 -0
- package/dist/kit/defineDesktopApp.d.ts +1 -0
- package/dist/kit/defineDesktopApp.js +1 -0
- package/dist/kit/defineDesktopPlugin.d.ts +1 -0
- package/dist/kit/defineDesktopPlugin.js +1 -0
- package/dist/module.d.mts +239 -0
- package/dist/module.json +12 -0
- package/dist/module.mjs +681 -0
- package/dist/runtime/components/Application/DesktopCoreApplicationRender.d.vue.ts +6 -0
- package/dist/runtime/components/Application/DesktopCoreApplicationRender.vue +18 -0
- package/dist/runtime/components/Application/DesktopCoreApplicationRender.vue.d.ts +6 -0
- package/dist/runtime/components/Application/DesktopCoreApplicationWindowsRender.d.vue.ts +9 -0
- package/dist/runtime/components/Application/DesktopCoreApplicationWindowsRender.vue +31 -0
- package/dist/runtime/components/Application/DesktopCoreApplicationWindowsRender.vue.d.ts +9 -0
- package/dist/runtime/components/DesktopCore.d.vue.ts +19 -0
- package/dist/runtime/components/DesktopCore.vue +37 -0
- package/dist/runtime/components/DesktopCore.vue.d.ts +19 -0
- package/dist/runtime/components/background/DesktopCoreBackground.d.vue.ts +13 -0
- package/dist/runtime/components/background/DesktopCoreBackground.vue +16 -0
- package/dist/runtime/components/background/DesktopCoreBackground.vue.d.ts +13 -0
- package/dist/runtime/components/time/DesktopCoreTime.d.vue.ts +3 -0
- package/dist/runtime/components/time/DesktopCoreTime.vue +44 -0
- package/dist/runtime/components/time/DesktopCoreTime.vue.d.ts +3 -0
- package/dist/runtime/components/window/DesktopCoreWindow.d.vue.ts +49 -0
- package/dist/runtime/components/window/DesktopCoreWindow.vue +403 -0
- package/dist/runtime/components/window/DesktopCoreWindow.vue.d.ts +49 -0
- package/dist/runtime/components/window/DesktopCoreWindowContent.d.vue.ts +13 -0
- package/dist/runtime/components/window/DesktopCoreWindowContent.vue +34 -0
- package/dist/runtime/components/window/DesktopCoreWindowContent.vue.d.ts +13 -0
- package/dist/runtime/components/window/DesktopCoreWindowNav.d.vue.ts +13 -0
- package/dist/runtime/components/window/DesktopCoreWindowNav.vue +54 -0
- package/dist/runtime/components/window/DesktopCoreWindowNav.vue.d.ts +13 -0
- package/dist/runtime/components/window/DesktopCoreWindowSnapHintsBase.d.vue.ts +19 -0
- package/dist/runtime/components/window/DesktopCoreWindowSnapHintsBase.vue +46 -0
- package/dist/runtime/components/window/DesktopCoreWindowSnapHintsBase.vue.d.ts +19 -0
- package/dist/runtime/components/workspace/DesktopCoreWorkspaceEdgeHintsBase.d.vue.ts +24 -0
- package/dist/runtime/components/workspace/DesktopCoreWorkspaceEdgeHintsBase.vue +50 -0
- package/dist/runtime/components/workspace/DesktopCoreWorkspaceEdgeHintsBase.vue.d.ts +24 -0
- package/dist/runtime/composables/application/state.d.ts +1 -0
- package/dist/runtime/composables/application/state.js +2 -0
- package/dist/runtime/composables/application/useDesktopApplicationDefine.d.ts +4 -0
- package/dist/runtime/composables/application/useDesktopApplicationDefine.js +36 -0
- package/dist/runtime/composables/application/useDesktopApplicationExec.d.ts +3 -0
- package/dist/runtime/composables/application/useDesktopApplicationExec.js +26 -0
- package/dist/runtime/composables/application/useDesktopApplicationProcess.d.ts +24 -0
- package/dist/runtime/composables/application/useDesktopApplicationProcess.js +140 -0
- package/dist/runtime/composables/application/useDesktopApplicationRegistry.d.ts +11 -0
- package/dist/runtime/composables/application/useDesktopApplicationRegistry.js +60 -0
- package/dist/runtime/composables/useApplicationEntries.d.ts +5 -0
- package/dist/runtime/composables/useApplicationEntries.js +10 -0
- package/dist/runtime/composables/useApplicationManager.d.ts +16 -0
- package/dist/runtime/composables/useApplicationManager.js +30 -0
- package/dist/runtime/composables/useBlockNonInputContextMenu.d.ts +5 -0
- package/dist/runtime/composables/useBlockNonInputContextMenu.js +19 -0
- package/dist/runtime/composables/useDesktop.d.ts +210 -0
- package/dist/runtime/composables/useDesktop.js +52 -0
- package/dist/runtime/composables/useDesktopApplication.d.ts +34 -0
- package/dist/runtime/composables/useDesktopApplication.js +17 -0
- package/dist/runtime/composables/useDesktopCommands.d.ts +12 -0
- package/dist/runtime/composables/useDesktopCommands.js +348 -0
- package/dist/runtime/composables/useDesktopConfig.d.ts +3 -0
- package/dist/runtime/composables/useDesktopConfig.js +10 -0
- package/dist/runtime/composables/useDesktopDefaultApps.d.ts +15 -0
- package/dist/runtime/composables/useDesktopDefaultApps.js +21 -0
- package/dist/runtime/composables/useDesktopDialogs.d.ts +5 -0
- package/dist/runtime/composables/useDesktopDialogs.js +8 -0
- package/dist/runtime/composables/useDesktopDrag.d.ts +1 -0
- package/dist/runtime/composables/useDesktopDrag.js +1 -0
- package/dist/runtime/composables/useDesktopHooks.d.ts +15 -0
- package/dist/runtime/composables/useDesktopHooks.js +12 -0
- package/dist/runtime/composables/useDesktopIPC.d.ts +35 -0
- package/dist/runtime/composables/useDesktopIPC.js +72 -0
- package/dist/runtime/composables/useDesktopIdentity.d.ts +22 -0
- package/dist/runtime/composables/useDesktopIdentity.js +65 -0
- package/dist/runtime/composables/useDesktopManifest.d.ts +6 -0
- package/dist/runtime/composables/useDesktopManifest.js +17 -0
- package/dist/runtime/composables/useDesktopNotification.d.ts +13 -0
- package/dist/runtime/composables/useDesktopNotification.js +13 -0
- package/dist/runtime/composables/useDesktopResize.d.ts +1 -0
- package/dist/runtime/composables/useDesktopResize.js +1 -0
- package/dist/runtime/composables/useDesktopSession.d.ts +4 -0
- package/dist/runtime/composables/useDesktopSession.js +17 -0
- package/dist/runtime/composables/useDesktopShellIdentity.d.ts +1 -0
- package/dist/runtime/composables/useDesktopShellIdentity.js +3 -0
- package/dist/runtime/composables/useDesktopShellOptions.d.ts +5 -0
- package/dist/runtime/composables/useDesktopShellOptions.js +18 -0
- package/dist/runtime/composables/useDesktopTray.d.ts +5 -0
- package/dist/runtime/composables/useDesktopTray.js +10 -0
- package/dist/runtime/composables/useDesktopVolume.d.ts +4 -0
- package/dist/runtime/composables/useDesktopVolume.js +9 -0
- package/dist/runtime/composables/useDesktopWorkArea.d.ts +1 -0
- package/dist/runtime/composables/useDesktopWorkArea.js +3 -0
- package/dist/runtime/composables/useDesktopWorkarea.d.ts +12 -0
- package/dist/runtime/composables/useDesktopWorkarea.js +72 -0
- package/dist/runtime/composables/useTerminalManager.d.ts +15 -0
- package/dist/runtime/composables/useTerminalManager.js +9 -0
- package/dist/runtime/composables/useToggleWindowMaximize.d.ts +1 -0
- package/dist/runtime/composables/useToggleWindowMaximize.js +12 -0
- package/dist/runtime/composables/useWindowDragHandlers.d.ts +7 -0
- package/dist/runtime/composables/useWindowDragHandlers.js +7 -0
- package/dist/runtime/composables/window/useDesktopWindow.d.ts +14 -0
- package/dist/runtime/composables/window/useDesktopWindow.js +192 -0
- package/dist/runtime/composables/window/useDesktopWindowSnapDrop.d.ts +13 -0
- package/dist/runtime/composables/window/useDesktopWindowSnapDrop.js +78 -0
- package/dist/runtime/composables/workspace/useDesktopWorkspaceEdgeDrop.d.ts +25 -0
- package/dist/runtime/composables/workspace/useDesktopWorkspaceEdgeDrop.js +119 -0
- package/dist/runtime/composables/workspace/useDesktopWorkspaceManager.d.ts +8 -0
- package/dist/runtime/composables/workspace/useDesktopWorkspaceManager.js +46 -0
- package/dist/runtime/composables/workspace/useDesktopWorkspaceOverviewCapture.d.ts +20 -0
- package/dist/runtime/composables/workspace/useDesktopWorkspaceOverviewCapture.js +60 -0
- package/dist/runtime/composables/workspace/useDesktopWorkspaceOverviewLiveScale.d.ts +31 -0
- package/dist/runtime/composables/workspace/useDesktopWorkspaceOverviewLiveScale.js +92 -0
- package/dist/runtime/constants/desktopShellKeys.d.ts +5 -0
- package/dist/runtime/constants/desktopShellKeys.js +2 -0
- package/dist/runtime/constants/shellLayout.d.ts +4 -0
- package/dist/runtime/constants/shellLayout.js +2 -0
- package/dist/runtime/dialogs/desktopDialogProvider.d.ts +6 -0
- package/dist/runtime/dialogs/desktopDialogProvider.js +12 -0
- package/dist/runtime/internal/controllers/ApplicationController.d.ts +37 -0
- package/dist/runtime/internal/controllers/ApplicationController.js +434 -0
- package/dist/runtime/internal/controllers/WindowController.d.ts +83 -0
- package/dist/runtime/internal/controllers/WindowController.js +435 -0
- package/dist/runtime/plugins/01.desktop-shell-init.client.d.ts +2 -0
- package/dist/runtime/plugins/01.desktop-shell-init.client.js +18 -0
- package/dist/runtime/plugins/02.desktop-register-desktop-apps.client.d.ts +2 -0
- package/dist/runtime/plugins/02.desktop-register-desktop-apps.client.js +7 -0
- package/dist/runtime/stores/storeApplicationMeta.d.ts +2 -0
- package/dist/runtime/stores/storeApplicationMeta.js +20 -0
- package/dist/runtime/stores/storeApplicationWindows.d.ts +2 -0
- package/dist/runtime/stores/storeApplicationWindows.js +33 -0
- package/dist/runtime/stores/storeDesktop.d.ts +17 -0
- package/dist/runtime/stores/storeDesktop.js +16 -0
- package/dist/runtime/stores/storeDesktopDefaultApps.d.ts +8 -0
- package/dist/runtime/stores/storeDesktopDefaultApps.js +21 -0
- package/dist/runtime/stores/storeDesktopTray.d.ts +6 -0
- package/dist/runtime/stores/storeDesktopTray.js +21 -0
- package/dist/runtime/stores/storeDesktopVolume.d.ts +4 -0
- package/dist/runtime/stores/storeDesktopVolume.js +12 -0
- package/dist/runtime/stores/storeDesktopWorkspace.d.ts +26 -0
- package/dist/runtime/stores/storeDesktopWorkspace.js +91 -0
- package/dist/runtime/stores/storeNotification.d.ts +27 -0
- package/dist/runtime/stores/storeNotification.js +55 -0
- package/dist/runtime/types/index.d.ts +1 -0
- package/dist/runtime/types/index.js +1 -0
- package/dist/runtime/utils/defineDesktopApp.d.ts +2 -0
- package/dist/runtime/utils/defineDesktopApp.js +5 -0
- package/dist/runtime/utils/defineDesktopPlugin.d.ts +19 -0
- package/dist/runtime/utils/defineDesktopPlugin.js +29 -0
- package/dist/runtime/utils/utilApp.d.ts +2 -0
- package/dist/runtime/utils/utilApp.js +9 -0
- package/dist/runtime/utils/utilCaptureElementToCanvas.d.ts +1 -0
- package/dist/runtime/utils/utilCaptureElementToCanvas.js +21 -0
- package/dist/runtime/utils/utilDebug.d.ts +4 -0
- package/dist/runtime/utils/utilDebug.js +24 -0
- package/dist/runtime/utils/utilDetectSnapZone.d.ts +1 -0
- package/dist/runtime/utils/utilDetectSnapZone.js +5 -0
- package/dist/runtime/utils/utilWindowControllerAdapter.d.ts +2 -0
- package/dist/runtime/utils/utilWindowControllerAdapter.js +151 -0
- package/dist/runtime/utils/utilWindowLayout.d.ts +4 -0
- package/dist/runtime/utils/utilWindowLayout.js +34 -0
- package/dist/runtime/utils/utilWorkspaceWindows.d.ts +2 -0
- package/dist/runtime/utils/utilWorkspaceWindows.js +12 -0
- package/dist/types/index.d.ts +156 -0
- package/dist/types/index.js +1 -0
- package/dist/types.d.mts +2 -0
- package/package.json +145 -4
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import {
|
|
2
|
+
nextTick,
|
|
3
|
+
onScopeDispose,
|
|
4
|
+
readonly,
|
|
5
|
+
shallowRef,
|
|
6
|
+
watch
|
|
7
|
+
} from "vue";
|
|
8
|
+
import { useDesktopWorkspaceStore } from "../../stores/storeDesktopWorkspace.js";
|
|
9
|
+
export function computeScaleToFit(panelWidth, panelHeight, stageWidth, stageHeight, options) {
|
|
10
|
+
if (panelWidth <= 0 || panelHeight <= 0 || stageWidth <= 0 || stageHeight <= 0) {
|
|
11
|
+
return 1;
|
|
12
|
+
}
|
|
13
|
+
const scale = Math.min(panelWidth / stageWidth, panelHeight / stageHeight);
|
|
14
|
+
const maxScale = options?.maxScale ?? 1;
|
|
15
|
+
return Math.min(scale, maxScale);
|
|
16
|
+
}
|
|
17
|
+
export function useDesktopWorkspaceOverviewLiveScale(shellStageRef) {
|
|
18
|
+
const desktopWorkspaceStore = useDesktopWorkspaceStore();
|
|
19
|
+
const stageSize = shallowRef({ width: 0, height: 0 });
|
|
20
|
+
let resizeObserver = null;
|
|
21
|
+
function readStageSize() {
|
|
22
|
+
const el = shellStageRef.value;
|
|
23
|
+
if (!el) {
|
|
24
|
+
stageSize.value = { width: 0, height: 0 };
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
stageSize.value = {
|
|
28
|
+
width: el.clientWidth,
|
|
29
|
+
height: el.clientHeight
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function stopObserving() {
|
|
33
|
+
resizeObserver?.disconnect();
|
|
34
|
+
resizeObserver = null;
|
|
35
|
+
}
|
|
36
|
+
function startObserving() {
|
|
37
|
+
stopObserving();
|
|
38
|
+
const el = shellStageRef.value;
|
|
39
|
+
if (!el || typeof ResizeObserver === "undefined") return;
|
|
40
|
+
readStageSize();
|
|
41
|
+
resizeObserver = new ResizeObserver(() => readStageSize());
|
|
42
|
+
resizeObserver.observe(el);
|
|
43
|
+
}
|
|
44
|
+
watch(
|
|
45
|
+
() => desktopWorkspaceStore.overview,
|
|
46
|
+
(open) => {
|
|
47
|
+
if (open) {
|
|
48
|
+
void nextTick(() => startObserving());
|
|
49
|
+
} else {
|
|
50
|
+
stopObserving();
|
|
51
|
+
stageSize.value = { width: 0, height: 0 };
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
watch(shellStageRef, (el) => {
|
|
56
|
+
if (desktopWorkspaceStore.overview && el) {
|
|
57
|
+
void nextTick(() => startObserving());
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
onScopeDispose(stopObserving);
|
|
61
|
+
function scaleToFit(panelEl, options) {
|
|
62
|
+
if (!panelEl) return 1;
|
|
63
|
+
const { width: stageWidth, height: stageHeight } = stageSize.value;
|
|
64
|
+
if (stageWidth <= 0 || stageHeight <= 0) return 1;
|
|
65
|
+
return computeScaleToFit(
|
|
66
|
+
panelEl.clientWidth,
|
|
67
|
+
panelEl.clientHeight,
|
|
68
|
+
stageWidth,
|
|
69
|
+
stageHeight,
|
|
70
|
+
options
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
function innerOverviewStyle(panelEl, options) {
|
|
74
|
+
if (!desktopWorkspaceStore.overview) return void 0;
|
|
75
|
+
const { width: stageWidth, height: stageHeight } = stageSize.value;
|
|
76
|
+
if (stageWidth <= 0 || stageHeight <= 0) return void 0;
|
|
77
|
+
const scale = scaleToFit(panelEl, options);
|
|
78
|
+
const transformOrigin = options?.transformOrigin ?? "top left";
|
|
79
|
+
return {
|
|
80
|
+
width: `${stageWidth}px`,
|
|
81
|
+
height: `${stageHeight}px`,
|
|
82
|
+
transform: `scale(${scale})`,
|
|
83
|
+
transformOrigin
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
stageSize: readonly(stageSize),
|
|
88
|
+
scaleToFit,
|
|
89
|
+
innerOverviewStyle,
|
|
90
|
+
refreshStageSize: readStageSize
|
|
91
|
+
};
|
|
92
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { InjectionKey } from 'vue';
|
|
2
|
+
import type { DesktopDialogProvider } from '../dialogs/desktopDialogProvider.js';
|
|
3
|
+
export type DesktopToggleWindowMaximizeFn = (win: IWindowController | undefined) => boolean;
|
|
4
|
+
export declare const DESKTOP_DIALOG_PROVIDER_KEY: InjectionKey<DesktopDialogProvider>;
|
|
5
|
+
export declare const DESKTOP_TOGGLE_WINDOW_MAXIMIZE_KEY: InjectionKey<DesktopToggleWindowMaximizeFn>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface DesktopDialogProvider {
|
|
2
|
+
alert(message: string, title?: string): Promise<void>;
|
|
3
|
+
confirm(message: string, title?: string): Promise<boolean>;
|
|
4
|
+
prompt(message: string, defaultValue?: string, title?: string): Promise<string | null>;
|
|
5
|
+
}
|
|
6
|
+
export declare function createBrowserFallbackDialogProvider(): DesktopDialogProvider;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type ApplicationConfig, type CommandOutput, type WindowStoredState } from '@owdproject/core';
|
|
2
|
+
import type { IApplicationController, IWindowController } from '../../../types/index.js';
|
|
3
|
+
import { useApplicationWindowsStore } from '../../stores/storeApplicationWindows.js';
|
|
4
|
+
export declare class ApplicationController implements IApplicationController {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly config: ApplicationConfig;
|
|
7
|
+
readonly windows: Map<string, IWindowController>;
|
|
8
|
+
readonly openWindowCount: import("vue").ShallowRef<number, number>;
|
|
9
|
+
storeWindows: ReturnType<typeof useApplicationWindowsStore> | undefined;
|
|
10
|
+
storeMeta: any;
|
|
11
|
+
private readonly _pid;
|
|
12
|
+
private readonly _startedAt;
|
|
13
|
+
private readonly _stateValue;
|
|
14
|
+
private readonly _isRunning;
|
|
15
|
+
private readonly _isSuspended;
|
|
16
|
+
private appActor;
|
|
17
|
+
constructor(id: string, config: ApplicationConfig);
|
|
18
|
+
get windowsOpened(): Map<string, IWindowController>;
|
|
19
|
+
getFirstWindowByModel(model: string): IWindowController | undefined;
|
|
20
|
+
get pid(): number | null;
|
|
21
|
+
get startedAt(): number | null;
|
|
22
|
+
get stateValue(): string;
|
|
23
|
+
get isRunning(): boolean;
|
|
24
|
+
get isSuspended(): boolean;
|
|
25
|
+
get isInitializing(): boolean;
|
|
26
|
+
get isReady(): boolean;
|
|
27
|
+
initApplication(): Promise<void>;
|
|
28
|
+
focusWindow(targetWin: IWindowController): void;
|
|
29
|
+
openWindow(model: string, storedState?: WindowStoredState, meta?: Record<string, any>): IWindowController | undefined;
|
|
30
|
+
closeWindow(windowId: string): void;
|
|
31
|
+
closeAllWindows(): void;
|
|
32
|
+
setRunning(value: boolean): void;
|
|
33
|
+
suspend(): void;
|
|
34
|
+
resume(): void;
|
|
35
|
+
sendSignal(signal?: 'SIGTERM' | 'SIGKILL' | 'SIGSTOP' | 'SIGCONT'): void;
|
|
36
|
+
execCommand(command: string): Promise<CommandOutput | void>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,434 @@
|
|
|
1
|
+
import { markRaw, reactive, shallowRef } from "vue";
|
|
2
|
+
import { createActor } from "xstate";
|
|
3
|
+
import { nanoid } from "nanoid";
|
|
4
|
+
import {
|
|
5
|
+
applicationMachine,
|
|
6
|
+
computeSnapRect
|
|
7
|
+
} from "@owdproject/core";
|
|
8
|
+
import { WindowController } from "./WindowController.js";
|
|
9
|
+
import { apps } from "../../composables/application/state.js";
|
|
10
|
+
import { useDesktopCommands } from "../../composables/useDesktopCommands.js";
|
|
11
|
+
import { useDesktopDefaultApps } from "../../composables/useDesktopDefaultApps.js";
|
|
12
|
+
import { useDesktopHooks } from "../../composables/useDesktopHooks.js";
|
|
13
|
+
import { useDesktopIPC } from "../../composables/useDesktopIPC.js";
|
|
14
|
+
import { useDesktopStore } from "../../stores/storeDesktop.js";
|
|
15
|
+
import { useDesktopWorkspaceStore } from "../../stores/storeDesktopWorkspace.js";
|
|
16
|
+
import { useApplicationWindowsStore } from "../../stores/storeApplicationWindows.js";
|
|
17
|
+
import { useApplicationMetaStore } from "../../stores/storeApplicationMeta.js";
|
|
18
|
+
let globalPidCounter = 1e3;
|
|
19
|
+
function formatAppSnapshotValue(value) {
|
|
20
|
+
if (typeof value === "string") return value;
|
|
21
|
+
if (value && typeof value === "object") {
|
|
22
|
+
const entries = Object.entries(value);
|
|
23
|
+
if (entries.length > 0) {
|
|
24
|
+
const [k, v] = entries[0];
|
|
25
|
+
return `${k}.${formatAppSnapshotValue(v)}`;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return "idle";
|
|
29
|
+
}
|
|
30
|
+
export class ApplicationController {
|
|
31
|
+
id;
|
|
32
|
+
config;
|
|
33
|
+
windows = /* @__PURE__ */ new Map();
|
|
34
|
+
openWindowCount = shallowRef(0);
|
|
35
|
+
storeWindows;
|
|
36
|
+
storeMeta;
|
|
37
|
+
_pid = shallowRef(null);
|
|
38
|
+
_startedAt = shallowRef(null);
|
|
39
|
+
_stateValue = shallowRef("idle");
|
|
40
|
+
_isRunning = shallowRef(false);
|
|
41
|
+
_isSuspended = shallowRef(false);
|
|
42
|
+
appActor;
|
|
43
|
+
constructor(id, config) {
|
|
44
|
+
this.id = id;
|
|
45
|
+
this.config = config;
|
|
46
|
+
this.appActor = createActor(applicationMachine, {
|
|
47
|
+
input: {
|
|
48
|
+
id,
|
|
49
|
+
config
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
this.appActor.subscribe((snapshot) => {
|
|
53
|
+
const stateStr = formatAppSnapshotValue(snapshot.value);
|
|
54
|
+
const prevRunning = this._isRunning.value;
|
|
55
|
+
const nextRunning = snapshot.matches("running");
|
|
56
|
+
const nextSuspended = snapshot.matches({ running: "suspended" });
|
|
57
|
+
this._stateValue.value = stateStr;
|
|
58
|
+
this._isRunning.value = nextRunning;
|
|
59
|
+
this._isSuspended.value = nextSuspended;
|
|
60
|
+
if (nextRunning && !prevRunning) {
|
|
61
|
+
if (!this._pid.value) {
|
|
62
|
+
globalPidCounter += 1;
|
|
63
|
+
this._pid.value = globalPidCounter;
|
|
64
|
+
this._startedAt.value = Date.now();
|
|
65
|
+
}
|
|
66
|
+
void useDesktopHooks().callHook("app:launched", {
|
|
67
|
+
app: this,
|
|
68
|
+
pid: this._pid.value
|
|
69
|
+
});
|
|
70
|
+
useDesktopIPC().emit(
|
|
71
|
+
"process:launched",
|
|
72
|
+
{ id: this.id, title: this.config.title, pid: this._pid.value },
|
|
73
|
+
{ source: "kernel", severity: "info" }
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
if (snapshot.matches("terminating")) {
|
|
77
|
+
const oldPid = this._pid.value;
|
|
78
|
+
this._pid.value = null;
|
|
79
|
+
this._startedAt.value = null;
|
|
80
|
+
this._isRunning.value = false;
|
|
81
|
+
this._isSuspended.value = false;
|
|
82
|
+
try {
|
|
83
|
+
void this.config.onClose?.(this);
|
|
84
|
+
} catch {
|
|
85
|
+
}
|
|
86
|
+
this.appActor.send({ type: "TERMINATED" });
|
|
87
|
+
void useDesktopHooks().callHook("app:terminated", {
|
|
88
|
+
id: this.id,
|
|
89
|
+
title: this.config.title,
|
|
90
|
+
pid: oldPid
|
|
91
|
+
});
|
|
92
|
+
useDesktopIPC().emit(
|
|
93
|
+
"process:terminated",
|
|
94
|
+
{ id: this.id, title: this.config.title, pid: oldPid },
|
|
95
|
+
{ source: "kernel", severity: "warn" }
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
this.appActor.start();
|
|
100
|
+
}
|
|
101
|
+
get windowsOpened() {
|
|
102
|
+
return this.windows;
|
|
103
|
+
}
|
|
104
|
+
getFirstWindowByModel(model) {
|
|
105
|
+
for (const window2 of this.windows.values()) {
|
|
106
|
+
if (window2.model === model) return window2;
|
|
107
|
+
}
|
|
108
|
+
return void 0;
|
|
109
|
+
}
|
|
110
|
+
get pid() {
|
|
111
|
+
return this._pid.value;
|
|
112
|
+
}
|
|
113
|
+
get startedAt() {
|
|
114
|
+
return this._startedAt.value;
|
|
115
|
+
}
|
|
116
|
+
get stateValue() {
|
|
117
|
+
return this._stateValue.value;
|
|
118
|
+
}
|
|
119
|
+
get isRunning() {
|
|
120
|
+
return this._isRunning.value;
|
|
121
|
+
}
|
|
122
|
+
get isSuspended() {
|
|
123
|
+
return this._isSuspended.value;
|
|
124
|
+
}
|
|
125
|
+
get isInitializing() {
|
|
126
|
+
return this._stateValue.value === "initializing";
|
|
127
|
+
}
|
|
128
|
+
get isReady() {
|
|
129
|
+
return this._stateValue.value === "ready";
|
|
130
|
+
}
|
|
131
|
+
async initApplication() {
|
|
132
|
+
this.appActor.send({ type: "LAUNCH" });
|
|
133
|
+
try {
|
|
134
|
+
this.storeWindows = useApplicationWindowsStore(this.id);
|
|
135
|
+
const metaFactory = useApplicationMetaStore(this.id);
|
|
136
|
+
this.storeMeta = metaFactory();
|
|
137
|
+
const commandsService = useDesktopCommands();
|
|
138
|
+
if (this.config.commands) {
|
|
139
|
+
for (const cmdName of Object.keys(this.config.commands)) {
|
|
140
|
+
const termMeta = this.config.terminal?.[cmdName];
|
|
141
|
+
commandsService.register({
|
|
142
|
+
name: cmdName,
|
|
143
|
+
applicationId: this.id,
|
|
144
|
+
description: termMeta?.description ?? this.config.description,
|
|
145
|
+
usage: termMeta?.usage ?? cmdName,
|
|
146
|
+
args: termMeta?.args,
|
|
147
|
+
options: termMeta?.options
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
if (this.config.provides) {
|
|
152
|
+
const defaultApps = useDesktopDefaultApps();
|
|
153
|
+
defaultApps.setDefaultApp(
|
|
154
|
+
this.config.provides.name,
|
|
155
|
+
this,
|
|
156
|
+
this.config.provides.entry
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
this.appActor.send({ type: "INITIALIZED" });
|
|
160
|
+
await this.config.onReady?.(this);
|
|
161
|
+
} catch (err) {
|
|
162
|
+
this.appActor.send({ type: "INIT_FAILED" });
|
|
163
|
+
console.error(`[@owdproject/nuxt] Failed to init app "${this.id}":`, err);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
focusWindow(targetWin) {
|
|
167
|
+
const desktopStore = useDesktopStore();
|
|
168
|
+
let previousFocused;
|
|
169
|
+
for (const app of apps.values()) {
|
|
170
|
+
for (const win of app.windows.values()) {
|
|
171
|
+
if (win.state.id !== targetWin.state.id && win.state.focused) {
|
|
172
|
+
previousFocused = win;
|
|
173
|
+
win.setFocus(false);
|
|
174
|
+
void useDesktopHooks().callHook("window:blurred", { window: win });
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
const nextZ = desktopStore.incrementPositionZ();
|
|
179
|
+
if (!targetWin.state.position) {
|
|
180
|
+
targetWin.state.position = { x: 100, y: 80, z: nextZ };
|
|
181
|
+
} else {
|
|
182
|
+
targetWin.state.position.z = nextZ;
|
|
183
|
+
}
|
|
184
|
+
targetWin.setFocus(true);
|
|
185
|
+
void useDesktopHooks().callHook("window:focused", {
|
|
186
|
+
window: targetWin,
|
|
187
|
+
previousWindow: previousFocused
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
openWindow(model, storedState, meta) {
|
|
191
|
+
const modelConfig = this.config.windows?.[model];
|
|
192
|
+
if (!modelConfig) {
|
|
193
|
+
console.warn(
|
|
194
|
+
`[@owdproject/nuxt] Window model "${model}" is not defined in app "${this.id}".`
|
|
195
|
+
);
|
|
196
|
+
return void 0;
|
|
197
|
+
}
|
|
198
|
+
if (this.config.singleton && this.windows.size > 0) {
|
|
199
|
+
const existing = Array.from(this.windows.values()).find((w) => w.model === model) ?? Array.from(this.windows.values())[0];
|
|
200
|
+
if (meta && existing.meta && typeof existing.meta === "object") {
|
|
201
|
+
Object.assign(existing.meta, meta);
|
|
202
|
+
}
|
|
203
|
+
const workspaceStore2 = useDesktopWorkspaceStore();
|
|
204
|
+
if (existing.state.workspace && existing.state.workspace !== workspaceStore2.active) {
|
|
205
|
+
workspaceStore2.setWorkspace(existing.state.workspace);
|
|
206
|
+
}
|
|
207
|
+
existing.actions.setActive(true);
|
|
208
|
+
existing.actions.bringToFront();
|
|
209
|
+
return existing;
|
|
210
|
+
}
|
|
211
|
+
const openCtx = {
|
|
212
|
+
app: this,
|
|
213
|
+
model,
|
|
214
|
+
config: { ...modelConfig },
|
|
215
|
+
meta,
|
|
216
|
+
cancel: false
|
|
217
|
+
};
|
|
218
|
+
void useDesktopHooks().callHook("window:before-open", openCtx);
|
|
219
|
+
if (openCtx.cancel) {
|
|
220
|
+
return void 0;
|
|
221
|
+
}
|
|
222
|
+
const desktopStore = useDesktopStore();
|
|
223
|
+
const workspaceStore = useDesktopWorkspaceStore();
|
|
224
|
+
const cascadeIndex = this.windows.size;
|
|
225
|
+
const cascadeOffset = cascadeIndex * 28;
|
|
226
|
+
const baseX = openCtx.config.position?.x ?? 120;
|
|
227
|
+
const baseY = openCtx.config.position?.y ?? 90;
|
|
228
|
+
const windowId = storedState?.state?.id || `${this.id}-${model}-${nanoid(6)}`;
|
|
229
|
+
const resolvedStoredState = storedState ?? reactive({
|
|
230
|
+
model,
|
|
231
|
+
meta: reactive({ ...openCtx.meta ?? {} }),
|
|
232
|
+
state: {
|
|
233
|
+
id: windowId,
|
|
234
|
+
createdAt: Date.now(),
|
|
235
|
+
category: openCtx.config.category ?? this.config.category,
|
|
236
|
+
workspace: workspaceStore.active || "workspace-1",
|
|
237
|
+
position: {
|
|
238
|
+
x: baseX + cascadeOffset,
|
|
239
|
+
y: baseY + cascadeOffset,
|
|
240
|
+
z: desktopStore.incrementPositionZ()
|
|
241
|
+
},
|
|
242
|
+
size: {
|
|
243
|
+
width: openCtx.config.size?.width ?? 520,
|
|
244
|
+
height: openCtx.config.size?.height ?? 380,
|
|
245
|
+
minWidth: openCtx.config.size?.minWidth,
|
|
246
|
+
minHeight: openCtx.config.size?.minHeight,
|
|
247
|
+
maxWidth: openCtx.config.size?.maxWidth,
|
|
248
|
+
maxHeight: openCtx.config.size?.maxHeight
|
|
249
|
+
},
|
|
250
|
+
focused: true,
|
|
251
|
+
active: true,
|
|
252
|
+
maximized: Boolean(openCtx.config.maximized),
|
|
253
|
+
minimizable: openCtx.config.minimizable !== false,
|
|
254
|
+
maximizable: openCtx.config.maximizable !== false,
|
|
255
|
+
destroyable: openCtx.config.destroyable !== false,
|
|
256
|
+
draggable: openCtx.config.draggable !== false,
|
|
257
|
+
resizable: openCtx.config.resizable !== false,
|
|
258
|
+
layout: openCtx.config.maximized ? "maximize" : "normal"
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
const controller = new WindowController(
|
|
262
|
+
this,
|
|
263
|
+
model,
|
|
264
|
+
openCtx.config,
|
|
265
|
+
resolvedStoredState,
|
|
266
|
+
{
|
|
267
|
+
getWorkarea: () => workspaceStore.workarea
|
|
268
|
+
}
|
|
269
|
+
);
|
|
270
|
+
const origSetLayout = controller.actions.setLayout;
|
|
271
|
+
const enhancedActions = {
|
|
272
|
+
...controller.actions,
|
|
273
|
+
setLayout: (layout) => {
|
|
274
|
+
const ok = origSetLayout(layout);
|
|
275
|
+
if (ok && layout !== "normal" && layout !== "maximize") {
|
|
276
|
+
const workarea = workspaceStore.workarea;
|
|
277
|
+
const fallbackWorkarea = workarea.width > 0 && workarea.height > 0 ? workarea : {
|
|
278
|
+
x: 0,
|
|
279
|
+
y: 48,
|
|
280
|
+
width: typeof window !== "undefined" ? window.innerWidth : 1280,
|
|
281
|
+
height: typeof window !== "undefined" ? window.innerHeight - 48 : 752
|
|
282
|
+
};
|
|
283
|
+
const rect = computeSnapRect(layout, fallbackWorkarea);
|
|
284
|
+
controller.actions.setPosition({ x: rect.x, y: rect.y });
|
|
285
|
+
controller.actions.setSize({ width: rect.width, height: rect.height });
|
|
286
|
+
}
|
|
287
|
+
if (ok) {
|
|
288
|
+
void useDesktopHooks().callHook("window:layout-change", {
|
|
289
|
+
window: controller,
|
|
290
|
+
layout
|
|
291
|
+
});
|
|
292
|
+
useDesktopIPC().emit(
|
|
293
|
+
"window:layout-change",
|
|
294
|
+
{ windowId: controller.state.id, title: controller.title, layout },
|
|
295
|
+
{ source: this.id, severity: "info" }
|
|
296
|
+
);
|
|
297
|
+
}
|
|
298
|
+
return ok;
|
|
299
|
+
}
|
|
300
|
+
};
|
|
301
|
+
controller.actions = Object.freeze(enhancedActions);
|
|
302
|
+
const rawWindow = markRaw(controller);
|
|
303
|
+
this.windows.set(windowId, rawWindow);
|
|
304
|
+
this.openWindowCount.value = this.windows.size;
|
|
305
|
+
this.storeWindows?.setWindowState(windowId, resolvedStoredState);
|
|
306
|
+
this.appActor.send({ type: "OPEN_WINDOW" });
|
|
307
|
+
this.focusWindow(rawWindow);
|
|
308
|
+
void useDesktopHooks().callHook("window:opened", {
|
|
309
|
+
window: rawWindow,
|
|
310
|
+
app: this
|
|
311
|
+
});
|
|
312
|
+
useDesktopIPC().emit(
|
|
313
|
+
"window:opened",
|
|
314
|
+
{
|
|
315
|
+
windowId,
|
|
316
|
+
appId: this.id,
|
|
317
|
+
title: rawWindow.title,
|
|
318
|
+
workspace: rawWindow.state.workspace
|
|
319
|
+
},
|
|
320
|
+
{ source: this.id, severity: "info" }
|
|
321
|
+
);
|
|
322
|
+
return rawWindow;
|
|
323
|
+
}
|
|
324
|
+
closeWindow(windowId) {
|
|
325
|
+
const win = this.windows.get(windowId);
|
|
326
|
+
if (!win) return;
|
|
327
|
+
const closeCtx = {
|
|
328
|
+
window: win,
|
|
329
|
+
app: this,
|
|
330
|
+
cancel: false
|
|
331
|
+
};
|
|
332
|
+
void useDesktopHooks().callHook("window:before-close", closeCtx);
|
|
333
|
+
if (closeCtx.cancel) return;
|
|
334
|
+
win.dispose();
|
|
335
|
+
this.windows.delete(windowId);
|
|
336
|
+
this.openWindowCount.value = this.windows.size;
|
|
337
|
+
this.storeWindows?.removeWindowState(windowId);
|
|
338
|
+
this.appActor.send({ type: "CLOSE_WINDOW" });
|
|
339
|
+
void useDesktopHooks().callHook("window:closed", {
|
|
340
|
+
windowId,
|
|
341
|
+
app: this
|
|
342
|
+
});
|
|
343
|
+
useDesktopIPC().emit(
|
|
344
|
+
"window:closed",
|
|
345
|
+
{ windowId, appId: this.id },
|
|
346
|
+
{ source: this.id, severity: "info" }
|
|
347
|
+
);
|
|
348
|
+
}
|
|
349
|
+
closeAllWindows() {
|
|
350
|
+
for (const windowId of Array.from(this.windows.keys())) {
|
|
351
|
+
this.closeWindow(windowId);
|
|
352
|
+
}
|
|
353
|
+
this.storeWindows?.clearWindows();
|
|
354
|
+
}
|
|
355
|
+
setRunning(value) {
|
|
356
|
+
if (value) {
|
|
357
|
+
if (!this.isRunning) {
|
|
358
|
+
this.appActor.send({ type: "LAUNCH" });
|
|
359
|
+
}
|
|
360
|
+
} else if (this.isRunning) {
|
|
361
|
+
this.appActor.send({ type: "CLOSE_APP" });
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
suspend() {
|
|
365
|
+
if (!this.isRunning || this.isSuspended) return;
|
|
366
|
+
const ctx = {
|
|
367
|
+
app: this,
|
|
368
|
+
signal: "SIGSTOP",
|
|
369
|
+
cancel: false
|
|
370
|
+
};
|
|
371
|
+
void useDesktopHooks().callHook("app:before-suspend", ctx);
|
|
372
|
+
if (ctx.cancel) return;
|
|
373
|
+
for (const win of this.windows.values()) {
|
|
374
|
+
win.minimize();
|
|
375
|
+
}
|
|
376
|
+
this.appActor.send({ type: "SIGSTOP" });
|
|
377
|
+
void useDesktopHooks().callHook("app:suspended", { app: this });
|
|
378
|
+
useDesktopIPC().emit(
|
|
379
|
+
"process:suspended",
|
|
380
|
+
{ id: this.id, pid: this.pid },
|
|
381
|
+
{ source: "kernel", severity: "warn" }
|
|
382
|
+
);
|
|
383
|
+
}
|
|
384
|
+
resume() {
|
|
385
|
+
if (!this.isRunning || !this.isSuspended) return;
|
|
386
|
+
const ctx = {
|
|
387
|
+
app: this,
|
|
388
|
+
signal: "SIGCONT",
|
|
389
|
+
cancel: false
|
|
390
|
+
};
|
|
391
|
+
void useDesktopHooks().callHook("app:before-resume", ctx);
|
|
392
|
+
if (ctx.cancel) return;
|
|
393
|
+
this.appActor.send({ type: "SIGCONT" });
|
|
394
|
+
for (const win of this.windows.values()) {
|
|
395
|
+
win.unminimize();
|
|
396
|
+
win.focus();
|
|
397
|
+
}
|
|
398
|
+
void useDesktopHooks().callHook("app:resumed", { app: this });
|
|
399
|
+
useDesktopIPC().emit(
|
|
400
|
+
"process:resumed",
|
|
401
|
+
{ id: this.id, pid: this.pid },
|
|
402
|
+
{ source: "kernel", severity: "info" }
|
|
403
|
+
);
|
|
404
|
+
}
|
|
405
|
+
sendSignal(signal = "SIGTERM") {
|
|
406
|
+
if (signal === "SIGSTOP") {
|
|
407
|
+
this.suspend();
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
410
|
+
if (signal === "SIGCONT") {
|
|
411
|
+
this.resume();
|
|
412
|
+
return;
|
|
413
|
+
}
|
|
414
|
+
const terminateCtx = {
|
|
415
|
+
app: this,
|
|
416
|
+
signal,
|
|
417
|
+
cancel: false
|
|
418
|
+
};
|
|
419
|
+
void useDesktopHooks().callHook("app:before-terminate", terminateCtx);
|
|
420
|
+
if (terminateCtx.cancel && signal !== "SIGKILL") {
|
|
421
|
+
return;
|
|
422
|
+
}
|
|
423
|
+
for (const win of this.windows.values()) {
|
|
424
|
+
win.dispose();
|
|
425
|
+
}
|
|
426
|
+
this.windows.clear();
|
|
427
|
+
this.openWindowCount.value = 0;
|
|
428
|
+
this.storeWindows?.clearWindows();
|
|
429
|
+
this.appActor.send({ type: signal });
|
|
430
|
+
}
|
|
431
|
+
async execCommand(command) {
|
|
432
|
+
return useDesktopCommands().exec(command);
|
|
433
|
+
}
|
|
434
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { type WindowConfig, type WindowLayout, type WindowOverride, type WindowSizeValue, type WindowState, type WindowStoredState } from '@owdproject/core';
|
|
2
|
+
import type { IDesktopWindowActions, IDesktopWindowController } from '../../../types/index.js';
|
|
3
|
+
export declare class WindowController implements IDesktopWindowController {
|
|
4
|
+
readonly application: any;
|
|
5
|
+
readonly instanced: boolean;
|
|
6
|
+
readonly model: string;
|
|
7
|
+
private readonly _stateValue;
|
|
8
|
+
get stateValue(): string;
|
|
9
|
+
config: WindowConfig;
|
|
10
|
+
override: WindowOverride;
|
|
11
|
+
private storedState;
|
|
12
|
+
private windowActor;
|
|
13
|
+
private isDisposed;
|
|
14
|
+
readonly actions: IDesktopWindowActions;
|
|
15
|
+
constructor(application: any, model: string, windowConfig: WindowConfig, windowStoredState: WindowStoredState, options?: {
|
|
16
|
+
onFocus?: (win: WindowController) => void;
|
|
17
|
+
onLayoutChange?: (win: WindowController, layout: WindowLayout) => void;
|
|
18
|
+
getWorkarea?: () => {
|
|
19
|
+
x: number;
|
|
20
|
+
y: number;
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
};
|
|
24
|
+
incrementPositionZ?: () => number;
|
|
25
|
+
getWindows?: () => WindowController[];
|
|
26
|
+
});
|
|
27
|
+
private setConfig;
|
|
28
|
+
get state(): WindowState;
|
|
29
|
+
private restoreState;
|
|
30
|
+
get meta(): any;
|
|
31
|
+
setPosition(data: {
|
|
32
|
+
x: number;
|
|
33
|
+
y: number;
|
|
34
|
+
}): void;
|
|
35
|
+
setActive(value: boolean): void;
|
|
36
|
+
setFocus(value: boolean): void;
|
|
37
|
+
focus(): void;
|
|
38
|
+
get title(): string;
|
|
39
|
+
get windowTitle(): string;
|
|
40
|
+
get icon(): any;
|
|
41
|
+
get position(): import("@owdproject/core").WindowPosition | undefined;
|
|
42
|
+
get size(): {
|
|
43
|
+
width: WindowSizeValue;
|
|
44
|
+
height: WindowSizeValue;
|
|
45
|
+
minWidth: WindowSizeValue;
|
|
46
|
+
maxWidth: WindowSizeValue;
|
|
47
|
+
minHeight: WindowSizeValue;
|
|
48
|
+
maxHeight: WindowSizeValue;
|
|
49
|
+
};
|
|
50
|
+
setSize(data: {
|
|
51
|
+
width: number;
|
|
52
|
+
height: number;
|
|
53
|
+
}): void;
|
|
54
|
+
get isMinimizable(): boolean;
|
|
55
|
+
minimize(): boolean;
|
|
56
|
+
unminimize(): boolean;
|
|
57
|
+
toggleMinimize(): void;
|
|
58
|
+
get isMaximizable(): boolean;
|
|
59
|
+
get isMaximized(): boolean;
|
|
60
|
+
private parseSizeValue;
|
|
61
|
+
saveBoundsBeforeLayout(): void;
|
|
62
|
+
setLayout(layout: WindowLayout): boolean;
|
|
63
|
+
clearLayout(): boolean;
|
|
64
|
+
toggleMaximize(): boolean;
|
|
65
|
+
maximize(): boolean;
|
|
66
|
+
unmaximize(): boolean;
|
|
67
|
+
get isDestroyable(): boolean;
|
|
68
|
+
dispose(): void;
|
|
69
|
+
destroy(): boolean;
|
|
70
|
+
get isDraggable(): boolean;
|
|
71
|
+
get isResizable(): boolean;
|
|
72
|
+
setWorkspace(workspaceId: string): void;
|
|
73
|
+
startDrag(): void;
|
|
74
|
+
stopDrag(): void;
|
|
75
|
+
startResize(): void;
|
|
76
|
+
stopResize(): void;
|
|
77
|
+
setTitleOverride(value: undefined | string): void;
|
|
78
|
+
resetTitleOverride(): void;
|
|
79
|
+
setWindowTitleOverride(value: undefined | string): void;
|
|
80
|
+
resetWindowTitleOverride(): void;
|
|
81
|
+
menu: any[];
|
|
82
|
+
setMenu(menu: any[]): void;
|
|
83
|
+
}
|