diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index b1bfab22e63b472223f30a57d5c8b8bcb1a7781e..868d38934dcaecbf529b13934f6d49f7003b2166 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -64,6 +64,22 @@ declare namespace window { FLOATING } + /** + * Create a sub window with a specific id and type, only support 7. + * @param id Indicates window id. + * @param type Indicates window type. + * @since 7 + */ + function create(id: string, type: WindowType, callback: AsyncCallback): void; + + /** + * Create a sub window with a specific id and type, only support 7. + * @param id Indicates window id. + * @param type Indicates window type. + * @since 7 + */ + function create(id: string, type: WindowType): Promise; + /** * Create a system window with a specific id and type. * @param ctx Indicates the context on which the window depends @@ -556,7 +572,7 @@ declare namespace window { * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 7 */ - isShowing(callback: AsyncCallback): void; + isShowing(callback: AsyncCallback): void; /** * Checks whether the window is displayed @@ -649,34 +665,34 @@ declare namespace window { interface WindowStage { /** * Get main window of the stage. - * @since 8 + * @since 9 */ getMainWindow(): Promise; /** * Get main window of the stage. - * @since 8 + * @since 9 */ getMainWindow(callback: AsyncCallback): void; /** * Create sub window of the stage. * @param name window name of sub window - * @since 8 + * @since 9 */ createSubWindow(name: string): Promise; /** * Create sub window of the stage. * @param name window name of sub window - * @since 8 + * @since 9 */ createSubWindow(name: string, callback: AsyncCallback): void; /** * Get sub window of the stage. - * @since 8 + * @since 9 */ getSubWindow(): Promise>; /** * Get sub window of the stage. - * @since 8 + * @since 9 */ getSubWindow(callback: AsyncCallback>): void; /** @@ -684,31 +700,31 @@ declare namespace window { * @param path path Path of the page to which the content will be loaded * @param storage storage The data object shared within the content instance loaded by the window * @syscap SystemCapability.WindowManager.WindowManager.Core - * @since 8 + * @since 9 */ loadContent(path: string, storage: ContenStorage, callback: AsyncCallback): void; /** * Loads content * @param path path of the page to which the content will be loaded * @syscap SystemCapability.WindowManager.WindowManager.Core - * @since 8 + * @since 9 */ loadContent(path: string, callback: AsyncCallback): void; /** * Loads content * @param path path of the page to which the content will be loaded * @syscap SystemCapability.WindowManager.WindowManager.Core - * @since 8 + * @since 9 */ loadContent(path: string, storage?: ContenStorage): Promise; /** * window stage event callback on. - * @since 8 + * @since 9 */ on(eventType: 'windowStageEvent', callback: Callback): void; /** * window stage event callback off. - * @since 8 + * @since 9 */ off(eventType: 'windowStageEvent', callback?: Callback): void; }