From e6febbeb7725f42e83e404a3222ad049de72a9e3 Mon Sep 17 00:00:00 2001 From: wuliangdong Date: Thu, 12 Jun 2025 10:09:00 +0800 Subject: [PATCH 1/3] Feat:Add Property globalX/globalY For TouchEvent and MouseEvent Signed-off-by: wuliangdong Change-Id: Ib1ef859a55a63c0aa6a3ce952fdff322ff9e6053 --- api/@ohos.multimodalInput.mouseEvent.d.ts | 4 ++++ api/@ohos.multimodalInput.touchEvent.d.ts | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/api/@ohos.multimodalInput.mouseEvent.d.ts b/api/@ohos.multimodalInput.mouseEvent.d.ts index 29c7d1936b..4736e272ad 100644 --- a/api/@ohos.multimodalInput.mouseEvent.d.ts +++ b/api/@ohos.multimodalInput.mouseEvent.d.ts @@ -444,4 +444,8 @@ export declare interface MouseEvent extends InputEvent { * @since 11 */ toolType: ToolType; + +globalX?: number; + + globalY?: number; } \ No newline at end of file diff --git a/api/@ohos.multimodalInput.touchEvent.d.ts b/api/@ohos.multimodalInput.touchEvent.d.ts index 502dc81171..3fe844d21e 100644 --- a/api/@ohos.multimodalInput.touchEvent.d.ts +++ b/api/@ohos.multimodalInput.touchEvent.d.ts @@ -364,6 +364,10 @@ export declare interface Touch { * @since 19 */ fixedDisplayY?: number; + + globalX?: number; + + globalY?: number; } /** -- Gitee From 08943c9d6992c1ae3cbe7d6add2ec9e00dfc0de5 Mon Sep 17 00:00:00 2001 From: wuliangdong Date: Thu, 12 Jun 2025 02:26:51 +0000 Subject: [PATCH 2/3] update api/@ohos.multimodalInput.mouseEvent.d.ts. Signed-off-by: wuliangdong --- api/@ohos.multimodalInput.mouseEvent.d.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/api/@ohos.multimodalInput.mouseEvent.d.ts b/api/@ohos.multimodalInput.mouseEvent.d.ts index 4736e272ad..bb5a3ea512 100644 --- a/api/@ohos.multimodalInput.mouseEvent.d.ts +++ b/api/@ohos.multimodalInput.mouseEvent.d.ts @@ -445,7 +445,21 @@ export declare interface MouseEvent extends InputEvent { */ toolType: ToolType; -globalX?: number; + /** + * globalX - Global X coordinate. + * @type { ?number } + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 20 + * @arkts 1.1&1.2 + */ + globalX?: number; + /** + * globalY - Global Y coordinate. + * @type { ?number } + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 20 + * @arkts 1.1&1.2 + */ globalY?: number; } \ No newline at end of file -- Gitee From 3c9720362d530ecbe86d4d5de8a623c55348f078 Mon Sep 17 00:00:00 2001 From: wuliangdong Date: Thu, 12 Jun 2025 02:28:00 +0000 Subject: [PATCH 3/3] update api/@ohos.multimodalInput.touchEvent.d.ts. Signed-off-by: wuliangdong Change-Id: I15a9b8a1e9059ce075b1d691d53005b1daa9fdcf --- api/@ohos.multimodalInput.mouseEvent.d.ts | 2 +- api/@ohos.multimodalInput.touchEvent.d.ts | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/api/@ohos.multimodalInput.mouseEvent.d.ts b/api/@ohos.multimodalInput.mouseEvent.d.ts index bb5a3ea512..827bbc5f60 100644 --- a/api/@ohos.multimodalInput.mouseEvent.d.ts +++ b/api/@ohos.multimodalInput.mouseEvent.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/api/@ohos.multimodalInput.touchEvent.d.ts b/api/@ohos.multimodalInput.touchEvent.d.ts index 3fe844d21e..b64684e519 100644 --- a/api/@ohos.multimodalInput.touchEvent.d.ts +++ b/api/@ohos.multimodalInput.touchEvent.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -365,8 +365,22 @@ export declare interface Touch { */ fixedDisplayY?: number; + /** + * globalX - Global X coordinate. + * @type { ?number } + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 20 + * @arkts 1.1&1.2 + */ globalX?: number; + /** + * globalY - Global Y coordinate. + * @type { ?number } + * @syscap SystemCapability.MultimodalInput.Input.Core + * @since 20 + * @arkts 1.1&1.2 + */ globalY?: number; } -- Gitee