From 183b0df9ce65ed5eecffa691454b763a0754d810 Mon Sep 17 00:00:00 2001 From: zhirong <215782872@qq.com> Date: Sat, 28 May 2022 15:40:44 +0800 Subject: [PATCH] =?UTF-8?q?FA=20Stage=E6=A0=87=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhirong <215782872@qq.com> Change-Id: Ide5c190a4dc5ab1b624321da746f3272e9939353 --- api/@ohos.window.d.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index dbee899f82..7eee323e05 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -28,10 +28,12 @@ declare namespace window { enum WindowType { /** * App. + * @FAModelOnly */ TYPE_APP, /** * System alert. + * @StageModelOnly */ TYPE_SYSTEM_ALERT } @@ -338,6 +340,7 @@ declare namespace window { * @param id Indicates window id. * @param type Indicates window type. * @since 7 + * @FAModelOnly */ function create(id: string, type: WindowType, callback: AsyncCallback): void; @@ -346,6 +349,7 @@ declare namespace window { * @param id Indicates window id. * @param type Indicates window type. * @since 7 + * @FAModelOnly */ function create(id: string, type: WindowType): Promise; @@ -385,12 +389,14 @@ declare namespace window { * Get the final show window. * @param id Indicates window id. * @since 6 + * @FAModelOnly */ function getTopWindow(callback: AsyncCallback): void; /** * Get the final show window. * @since 6 + * @FAModelOnly */ function getTopWindow(): Promise; @@ -398,6 +404,7 @@ declare namespace window { * Get the final show window. * @param ctx Indicates the context on which the window depends * @since 8 + * @StageModelOnly */ function getTopWindow(ctx: Context): Promise; @@ -405,6 +412,7 @@ declare namespace window { * Get the final show window. * @param ctx Indicates the context on which the window depends * @since 8 + * @StageModelOnly */ function getTopWindow(ctx: Context, callback: AsyncCallback): void; @@ -659,6 +667,7 @@ declare namespace window { * @param storage storage The data object shared within the content instance loaded by the window * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 9 + * @StageModelOnly */ loadContent(path: string, storage: LocalStorage, callback: AsyncCallback): void; @@ -668,6 +677,7 @@ declare namespace window { * @param storage storage The data object shared within the content instance loaded by the window * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 9 + * @StageModelOnly */ loadContent(path: string, storage: LocalStorage): Promise; @@ -932,6 +942,7 @@ declare namespace window { * window stage callback event type * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 9 + * @StageModelOnly */ enum WindowStageEventType { FOREGROUND = 1, @@ -948,33 +959,39 @@ declare namespace window { /** * Get main window of the stage. * @since 9 + * @StageModelOnly */ getMainWindow(): Promise; /** * Get main window of the stage. * @since 9 + * @StageModelOnly */ getMainWindow(callback: AsyncCallback): void; /** * Create sub window of the stage. * @param name window name of sub window * @since 9 + * @StageModelOnly */ createSubWindow(name: string): Promise; /** * Create sub window of the stage. * @param name window name of sub window * @since 9 + * @StageModelOnly */ createSubWindow(name: string, callback: AsyncCallback): void; /** * Get sub window of the stage. * @since 9 + * @StageModelOnly */ getSubWindow(): Promise>; /** * Get sub window of the stage. * @since 9 + * @StageModelOnly */ getSubWindow(callback: AsyncCallback>): void; /** @@ -983,6 +1000,7 @@ declare namespace window { * @param storage storage The data object shared within the content instance loaded by the window * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 9 + * @StageModelOnly */ loadContent(path: string, storage: LocalStorage, callback: AsyncCallback): void; /** @@ -991,6 +1009,7 @@ declare namespace window { * @param storage storage The data object shared within the content instance loaded by the window * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 9 + * @StageModelOnly */ loadContent(path: string, storage?: LocalStorage): Promise; /** @@ -998,16 +1017,19 @@ declare namespace window { * @param path path of the page to which the content will be loaded * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 9 + * @StageModelOnly */ loadContent(path: string, callback: AsyncCallback): void; /** * window stage event callback on. * @since 9 + * @StageModelOnly */ on(eventType: 'windowStageEvent', callback: Callback): void; /** * window stage event callback off. * @since 9 + * @StageModelOnly */ off(eventType: 'windowStageEvent', callback?: Callback): void; } -- Gitee