From e2643d097a8b9b19c7671b0c1450815daa0addd5 Mon Sep 17 00:00:00 2001 From: hsdhebbd Date: Sat, 19 Jul 2025 17:23:12 +0800 Subject: [PATCH] modify number to int/long/double Signed-off-by: hsdhebbd --- .../window_stage_ani/ets/@ohos.window.ets | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 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 c2eabec758..6187be9753 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 @@ -443,13 +443,13 @@ namespace window { /** * The left of the Rect. * - * @type { number } + * @type { int } * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @atomicservice * @since 11 */ - left: number; + left: int; /** * The top of the Rect. @@ -467,13 +467,13 @@ namespace window { /** * The top of the Rect. * - * @type { number } + * @type { int } * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @atomicservice * @since 11 */ - top: number; + top: int; /** * The width of the Rect. @@ -491,13 +491,13 @@ namespace window { /** * The width of the Rect. * - * @type { number } + * @type { int } * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @atomicservice * @since 11 */ - width: number; + width: int; /** * The height of the Rect. @@ -515,13 +515,13 @@ namespace window { /** * The height of the Rect. * - * @type { number } + * @type { int } * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @atomicservice * @since 11 */ - height: number; + height: int; } export class RectInternal implements Rect { @@ -1257,7 +1257,7 @@ export class ConfigurationInternal implements Configuration { } export interface MoveConfiguration { - displayId: number; + displayId: long; } export interface WindowDensityInfo { @@ -1301,70 +1301,70 @@ export interface WindowLimits { /** * The maximum width of the window. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Window.SessionManager * @since 11 */ /** * The maximum width of the window. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Window.SessionManager * @atomicservice * @since 12 */ - maxWidth: number; + maxWidth: int; /** * The maximum height of the window. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Window.SessionManager * @since 11 */ /** * The maximum height of the window. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Window.SessionManager * @atomicservice * @since 12 */ - maxHeight: number; + maxHeight: int; /** * The minimum width of the window. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Window.SessionManager * @since 11 */ /** * The minimum width of the window. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Window.SessionManager * @atomicservice * @since 12 */ - minWidth: number; + minWidth: int; /** * The minimum height of the window. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Window.SessionManager * @since 11 */ /** * The minimum height of the window. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Window.SessionManager * @atomicservice * @since 12 */ - minHeight: number; + minHeight: int; } /** @@ -1939,8 +1939,8 @@ export class WindowInternal implements Window { private native getWindowStatus(nativeObj: long): int; private native minimize(nativeObj: long): void; private native maximize(nativeObj: long, presentation: int): void; - private native resize(nativeObj: long, width: double, height: double): int; - private native moveWindowTo(nativeObj: long, x: double, y: double): int; + private native resize(nativeObj: long, width: int, height: int): int; + private native moveWindowTo(nativeObj: long, x: int, y: int): int; private native getGlobalRect(nativeObj:long): Rect; private native getWindowDecorHeight(nativeObj:long): double; @@ -2198,7 +2198,7 @@ export class WindowInternal implements Window { }); } - public resize(width: double, height: double): Promise { + public resize(width: int, height: int): Promise { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void) :void => { taskpool.execute((): void => { this.resize(this.nativeObj, width, height); @@ -2210,7 +2210,7 @@ export class WindowInternal implements Window { }); } - public moveWindowTo(x: double, y: double): Promise { + public moveWindowTo(x: int, y: int): Promise { return new Promise((resolve: (value: undefined) => void, reject: (error: BusinessError) => void) :void => { taskpool.execute((): void => { this.moveWindowTo(this.nativeObj, x, y); @@ -2222,7 +2222,7 @@ export class WindowInternal implements Window { }); } - public resize(width: double, height: double, callback: AsyncCallback): void { + public resize(width: int, height: int, callback: AsyncCallback): void { taskpool.execute((): void => { this.resize(this.nativeObj, width, height); }).then((ret: NullishType) => { @@ -2232,7 +2232,7 @@ export class WindowInternal implements Window { }); } - public moveWindowTo(x: double, y: double, callback: AsyncCallback): void { + public moveWindowTo(x: int, y: int, callback: AsyncCallback): void { taskpool.execute((): void => { this.moveWindowTo(this.nativeObj, x, y); }).then((ret: NullishType) => { @@ -2862,10 +2862,10 @@ export interface Window { minimize(callback: AsyncCallback): void; minimize(): Promise; maximize(presentation?: MaximizePresentation): Promise; - resize(width: double, height: double): Promise; - moveWindowTo(x: double, y: double): Promise; - resize(width: double, height: double, callback: AsyncCallback): void; - moveWindowTo(x: double, y: double, callback: AsyncCallback): void; + resize(width: int, height: int): Promise; + moveWindowTo(x: int, y: int): Promise; + resize(width: int, height: int, callback: AsyncCallback): void; + moveWindowTo(x: int, y: int, callback: AsyncCallback): void; getGlobalRect(): Rect; getWindowDecorHeight(): double; setWindowBackgroundColor(color: string | ColorMetrics): void; -- Gitee