From 01a6a78aab2945c21e759a3170e90a9cf1136309 Mon Sep 17 00:00:00 2001 From: xuhangqi Date: Wed, 30 Jul 2025 20:33:24 +0800 Subject: [PATCH] refactor_overload_window8 Issue: https://gitee.com/openharmony/interface_sdk-js/issues/ICPWIJ Signed-off-by: xuhangqi Change-Id: I91eddf9113e84e857b7e3f78bf04a7e5212a7cc4 --- api/@ohos.window.d.ts | 88 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 80 insertions(+), 8 deletions(-) diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index d3fffd2bfd..d6c324344c 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -4858,11 +4858,26 @@ declare namespace window { * @throws { BusinessError } 1300004 - Unauthorized operation. * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 + * */ hideWithAnimation(callback: AsyncCallback): void; + /** + * Hide window with animation. + * + * @param { AsyncCallback } callback - Callback used to return the result. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300003 - This window manager service works abnormally. + * @throws { BusinessError } 1300004 - Unauthorized operation. + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + hideWithAnimationWithCallback(callback: AsyncCallback): void; + /** * Hide window with animation. * @@ -4884,11 +4899,32 @@ declare namespace window { * @throws { BusinessError } 1300004 - Unauthorized operation. * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 + * */ hideWithAnimation(): Promise; + /** + * Hide window with animation. + * + * @returns { Promise } Promise that returns no value. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300003 - This window manager service works abnormally. + * @throws { BusinessError } 1300004 - Unauthorized operation. + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + hideWithAnimationReturnPromise(): Promise; + + /** + * @since 20 + * @arkts 1.2 + */ + overload hideWithAnimation { hideWithAnimationWithCallback, hideWithAnimationReturnPromise }; + /** * Show window. * @@ -5013,11 +5049,26 @@ declare namespace window { * @throws { BusinessError } 1300004 - Unauthorized operation. * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 + * */ showWithAnimation(callback: AsyncCallback): void; + /** + * Show window with animation. + * + * @param { AsyncCallback } callback - Callback used to return the result. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300003 - This window manager service works abnormally. + * @throws { BusinessError } 1300004 - Unauthorized operation. + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + showWithAnimationWithCallback(callback: AsyncCallback): void; + /** * Show window with animation. * @@ -5039,11 +5090,32 @@ declare namespace window { * @throws { BusinessError } 1300004 - Unauthorized operation. * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 + * */ showWithAnimation(): Promise; + /** + * Show window with animation. + * + * @returns { Promise } Promise that returns no value. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300003 - This window manager service works abnormally. + * @throws { BusinessError } 1300004 - Unauthorized operation. + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + showWithAnimationReturnPromise(): Promise; + + /** + * @since 20 + * @arkts 1.2 + */ + overload showWithAnimation { showWithAnimationWithCallback, showWithAnimationReturnPromise }; + /** * Destroy the window. * -- Gitee