diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index aded7ac14a9e909f31d5f3c4cb82881c1d8b7c33..2ebc8c646df8aa29b3f790cbbeb5a858028b9542 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -442,6 +442,48 @@ declare namespace window { */ WIDE_GAMUT, } + /** + * Configuration parameters for window creation. + * @since 9 + */ + interface Configuration { + /** + * Indicates window id. + */ + id: string + /** + * Indicates display ID. + */ + displayId: number + /** + * Indicates window type + */ + windowType?: WindowType + /** + * In private mode if true, or not if false. + */ + privacyMode?: boolean + /** + * Indicates Parent window id + */ + parentId?: string + } + + /** + * Create a window with a specific configuration + * @param ctx Indicates the context on which the window depends + * @param Configuration Configuration parameters for window creation. + * @since 9 + */ + function create(ctx: Context, { id, displayId, windowType = TYPE_APP, privacyMode = false, parentId = "" }: Configuration, callback: AsyncCallback): void; + + /** + * Create a window with a specific configuration + * @param ctx Indicates the context on which the window depends + * @param Configuration Configuration parameters for window creation. + * @since 9 + */ + function create(ctx: Context, { id, displayId, windowType = TYPE_APP, privacyMode = false, parentId = "" }: Configuration): Promise; /** * Create a sub window with a specific id and type, only support 7.