diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index ec2222ebf60a044bee242f9d6c4e6941772632dd..9220d905ed8dcedbb96d9cc02387f18f57617ed5 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -28,88 +28,103 @@ declare namespace window { enum WindowType { /** * App. + * @FAModelOnly */ TYPE_APP, /** * System alert. + * @StageModelOnly */ TYPE_SYSTEM_ALERT, /** * input method. * @systemapi Hide this for inner system use. * @since 9 + * @StageModelOnly */ TYPE_INPUT_METHOD, /** * status bar. * @systemapi Hide this for inner system use. * @since 9 + * @StageModelOnly */ TYPE_STATUS_BAR, /** * panel. * @systemapi Hide this for inner system use. * @since 9 + * @StageModelOnly */ TYPE_PANEL, /** * keyguard. * @systemapi Hide this for inner system use. * @since 9 + * @StageModelOnly */ TYPE_KEYGUARD, /** * volume. * @systemapi Hide this for inner system use. * @since 9 + * @StageModelOnly */ TYPE_VOLUME_OVERLAY, /** * navigation bar. * @systemapi Hide this for inner system use. * @since 9 + * @StageModelOnly */ TYPE_NAVIGATION_BAR, /** * float. * @permission ohos.permission.SYSTEM_FLOAT_WINDOW * @since 9 + * @StageModelOnly */ TYPE_FLOAT, /** * wallpaper. * @systemapi Hide this for inner system use. * @since 9 + * @StageModelOnly */ TYPE_WALLPAPER, /** * desktop. * @systemapi Hide this for inner system use. * @since 9 + * @StageModelOnly */ TYPE_DESKTOP, /** * recent. * @systemapi Hide this for inner system use. * @since 9 + * @StageModelOnly */ TYPE_LAUNCHER_RECENT, /** * dock. * @systemapi Hide this for inner system use. * @since 9 + * @StageModelOnly */ TYPE_LAUNCHER_DOCK, /** * voice interaction. * @systemapi Hide this for inner system use. * @since 9 + * @StageModelOnly */ TYPE_VOICE_INTERACTION, /** * pointer. * @systemapi Hide this for inner system use. * @since 9 + * @StageModelOnly */ TYPE_POINTER } @@ -409,6 +424,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; @@ -417,6 +433,7 @@ declare namespace window { * @param id Indicates window id. * @param type Indicates window type. * @since 7 + * @FAModelOnly */ function create(id: string, type: WindowType): Promise; @@ -456,12 +473,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; @@ -469,6 +488,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; @@ -476,6 +496,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; @@ -730,6 +751,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; @@ -739,6 +761,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; @@ -985,6 +1008,7 @@ declare namespace window { * window stage callback event type * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 9 + * @StageModelOnly */ enum WindowStageEventType { FOREGROUND = 1, @@ -1001,33 +1025,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; /** @@ -1036,6 +1066,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; /** @@ -1044,6 +1075,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; /** @@ -1051,16 +1083,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; @@ -1068,6 +1103,7 @@ declare namespace window { * disable window decoration. It must be called before loadContent. * @systemapi * @since 9 + * @StageModelOnly */ disableWindowDecor(): void; @@ -1076,6 +1112,7 @@ declare namespace window { * @param showOnLockScreen can show on lock screen if true, or not if false * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 9 + * @StageModelOnly */ setShowOnLockScreen(showOnLockScreen: boolean): void; }