From 2752e5465cded4f4f195f9d86e65da39c82903d3 Mon Sep 17 00:00:00 2001 From: xuhangqi Date: Wed, 30 Jul 2025 17:53:46 +0800 Subject: [PATCH] refactor_overload_window7 Issue: https://gitee.com/openharmony/interface_sdk-js/issues/ICPVGS Signed-off-by: xuhangqi Change-Id: Id9408e018c5faaad27e4c926c2d39b3f7dc41256 --- .../window_stage_ani/ets/@ohos.window.ets | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/interfaces/kits/ani/window_runtime/window_stage_ani/ets/@ohos.window.ets b/interfaces/kits/ani/window_runtime/window_stage_ani/ets/@ohos.window.ets index 2b198a334f..c777bb65bc 100644 --- a/interfaces/kits/ani/window_runtime/window_stage_ani/ets/@ohos.window.ets +++ b/interfaces/kits/ani/window_runtime/window_stage_ani/ets/@ohos.window.ets @@ -2738,7 +2738,7 @@ export class WindowInternal implements Window { this.keepKeyboardOnFocusSync(this.nativeObj, keepKeyboardFlag); } - public setWindowTouchable(isTouchable: boolean): Promise { + public setWindowTouchableReturnPromise(isTouchable: boolean): Promise { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void): void => { taskpool.execute((): void => { this.setWindowTouchableSync(this.nativeObj, isTouchable); @@ -2750,7 +2750,7 @@ export class WindowInternal implements Window { }); } - public setWindowTouchable(isTouchable: boolean, callback: AsyncCallback): void { + public setWindowTouchableWithCallback(isTouchable: boolean, callback: AsyncCallback): void { taskpool.execute((): void => { this.setWindowTouchableSync(this.nativeObj, isTouchable); }).then((ret: NullishType) => { @@ -2760,6 +2760,8 @@ export class WindowInternal implements Window { }); } + overload setWindowTouchable { setWindowTouchableReturnPromise, setWindowTouchableWithCallback }; + public opacity(opacity: double): void { this.opacity(this.nativeObj, opacity); } @@ -2969,8 +2971,9 @@ export interface Window { setWindowFocusable(isFocusable: boolean): Promise; setWindowFocusable(isFocusable: boolean, callback: AsyncCallback): void; keepKeyboardOnFocus(enable: boolean): void; - setWindowTouchable(isTouchable: boolean): Promise - setWindowTouchable(isTouchable: boolean, callback: AsyncCallback): void + setWindowTouchableReturnPromise(isTouchable: boolean): Promise + setWindowTouchableWithCallback(isTouchable: boolean, callback: AsyncCallback): void + overload setWindowTouchable { setWindowTouchableReturnPromise, setWindowTouchableWithCallback }; opacity(opacity: double): void; scale(scaleOptions: ScaleOptions): void; translate(translateOptions: TranslateOptions): void; -- Gitee