diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index 1710a7c236e89c8e05f5fa02263ed4d57cf1da37..510894ab88ec3c309da02783b8af41a568f0f278 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -2628,9 +2628,31 @@ declare namespace window { * @throws { BusinessError } 1300009 - The parent window is invalid. * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + /** + * Create a window with a specific configuration + * When config.windowType == TYPE_FLOAT, the "ohos.permission.SYSTEM_FLOAT_WINDOW" permission is required + * + * @permission ohos.permission.SYSTEM_FLOAT_WINDOW + * @param { Configuration } config - Parameters for window creation. + * @param { AsyncCallback } callback - Callback used to return the window created. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported.createWindow can not work correctly due to limited device capabilities. + * @throws { BusinessError } 1300001 - Repeated operation. + * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300004 - Unauthorized operation. + * @throws { BusinessError } 1300006 - This window context is abnormal. + * @throws { BusinessError } 1300009 - The parent window is invalid. + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @atomicservice + * @since arkts{'1.1':'17', '1.2':'20'} + * @arkts 1.1&1.2 */ - export function createWindow(config: Configuration, callback: AsyncCallback): void; + function createWindow(config: Configuration, callback: AsyncCallback): void; /** * Create a window with a specific configuration @@ -2666,9 +2688,31 @@ declare namespace window { * @throws { BusinessError } 1300009 - The parent window is invalid. * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + /** + * Create a window with a specific configuration + * When config.windowType == TYPE_FLOAT, the "ohos.permission.SYSTEM_FLOAT_WINDOW" permission is required + * + * @permission ohos.permission.SYSTEM_FLOAT_WINDOW + * @param { Configuration } config - Parameters for window creation. + * @returns { Promise } Promise used to return the window created. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter types. + * @throws { BusinessError } 801 - Capability not supported.createWindow can not work correctly due to limited device capabilities. + * @throws { BusinessError } 1300001 - Repeated operation. + * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300004 - Unauthorized operation. + * @throws { BusinessError } 1300006 - This window context is abnormal. + * @throws { BusinessError } 1300009 - The parent window is invalid. + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @atomicservice + * @since arkts{'1.1':'17', '1.2':'20'} + * @arkts 1.1&1.2 */ - export function createWindow(config: Configuration): Promise; + function createWindow(config: Configuration): Promise; /** * Create a sub window with a specific id and type, only support 7. @@ -6427,7 +6471,8 @@ declare namespace window { * @throws { BusinessError } 1300004 - Unauthorized operation. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'subWindowClose', callback: Callback): void; @@ -6443,7 +6488,8 @@ declare namespace window { * @throws { BusinessError } 1300004 - Unauthorized operation. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'subWindowClose', callback?: Callback): void; @@ -9757,7 +9803,8 @@ declare namespace window { * @StageModelOnly * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ createSubWindow(name: string): Promise; /** @@ -9797,7 +9844,8 @@ declare namespace window { * @StageModelOnly * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ createSubWindow(name: string, callback: AsyncCallback): void; /**