From 7215349066991822211d2466d75dcfc37dfbdc12 Mon Sep 17 00:00:00 2001 From: xuhangqi Date: Wed, 30 Jul 2025 17:49:31 +0800 Subject: [PATCH] refactor_overload_window7 Issue: https://gitee.com/openharmony/interface_sdk-js/issues/ICPVGS Signed-off-by: xuhangqi Change-Id: I50c66acfa1961870bbcd977da9c4c1685fe40068 --- api/@ohos.window.d.ts | 42 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index d3fffd2bfd..07bd14148a 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -8773,11 +8773,26 @@ declare namespace window { * @throws { BusinessError } 1300003 - This window manager service works abnormally. * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 + * */ setWindowTouchable(isTouchable: boolean): Promise; + /** + * Sets whether is touchable or not. + * + * @param { boolean } isTouchable is touchable if true, or not if false. + * @returns { Promise } Promise that returns no value. + * @throws { BusinessError } 401 - Parameter error. Possible cause: 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter types. + * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300003 - This window manager service works abnormally. + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @since 20 + * @arkts 1.2 + */ + setWindowTouchableReturnPromise(isTouchable: boolean): Promise; + /** * Sets whether is touchable or not. * @@ -8801,11 +8816,30 @@ declare namespace window { * @throws { BusinessError } 1300003 - This window manager service works abnormally. * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 + * */ setWindowTouchable(isTouchable: boolean, callback: AsyncCallback): void; + /** + * Sets whether is touchable or not. + * + * @param { boolean } isTouchable is touchable if true, or not if false. + * @param { AsyncCallback } callback Callback used to return the result. + * @throws { BusinessError } 1300002 - This window state is abnormal. + * @throws { BusinessError } 1300003 - This window manager service works abnormally. + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @since 20 + * @arkts 1.2 + */ + setWindowTouchableWithCallback(isTouchable: boolean, callback: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload setWindowTouchable { setWindowTouchableReturnPromise, setWindowTouchableWithCallback }; + /** * Set handwrite flag on the window. This flag means only response handwrite event. * -- Gitee