mirror of
https://github.com/kunkundi/crossdesk.git
synced 2026-10-18 18:03:08 +08:00
13 lines
468 B
Plaintext
13 lines
468 B
Plaintext
import { UIAbility } from '@kit.AbilityKit';
|
|
import { window } from '@kit.ArkUI';
|
|
import { DesktopHost } from '../pages/DesktopHost';
|
|
|
|
export default class EntryAbility extends UIAbility {
|
|
onPrepareToTerminate(): boolean { return DesktopHost.requestExit(); }
|
|
onNewWant(): void { DesktopHost.restore(); }
|
|
onForeground(): void { DesktopHost.foreground(); }
|
|
onWindowStageCreate(stage: window.WindowStage): void {
|
|
DesktopHost.start(stage, this.context);
|
|
}
|
|
}
|