From 634935f044216317ca2ea761a7233d997caa60ce Mon Sep 17 00:00:00 2001 From: liuwei Date: Wed, 13 Jul 2022 10:53:53 +0800 Subject: [PATCH 1/8] add mouse related interfaces Signed-off-by: liuwei --- api/@ohos.multimodalInput.mouse.d.ts | 50 ++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 api/@ohos.multimodalInput.mouse.d.ts diff --git a/api/@ohos.multimodalInput.mouse.d.ts b/api/@ohos.multimodalInput.mouse.d.ts new file mode 100644 index 0000000000..18974afcef --- /dev/null +++ b/api/@ohos.multimodalInput.mouse.d.ts @@ -0,0 +1,50 @@ +/* +* Copyright (c) 2022 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 +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +import { AsyncCallback } from "./basic"; + +/** +* 鼠标指针相关属性接口 +* +* @since 9 +* @syscap SystemCapability.MultimodalInput.Input.Mouse +* @import import mouse from '@ohos.multimodalInput.mouse'; +*/ + +declare namespace mouse { + + /** + * Sets whether the pointer icon is visible. + * + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.InputDevice + * @param visible Whether the pointer icon is visible. The value true indicates that the pointer icon is visible, + * and the value false indicates the opposite. + */ + function setPointerVisible(visible: boolean, callback: AsyncCallback) : void; + function setPointerVisible(visible: boolean) : Promise; + + /** + * Checks whether the pointer icon is visible. + * + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.InputDevice + * @return Returns true if the pointer icon is visible; returns false otherwise. + */ + function isPointerVisible(callback: AsyncCallback) : void; + function isPointerVisible() : Promise; +} + +export default mouse; \ No newline at end of file -- Gitee From d836e508f11695fdae2e6dc854c4907c953c3e67 Mon Sep 17 00:00:00 2001 From: liuwei Date: Wed, 20 Jul 2022 14:21:05 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=BC=A0=E6=A0=87?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liuwei --- api/@ohos.multimodalInput.mouse.d.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/api/@ohos.multimodalInput.mouse.d.ts b/api/@ohos.multimodalInput.mouse.d.ts index 18974afcef..6c7d327f03 100644 --- a/api/@ohos.multimodalInput.mouse.d.ts +++ b/api/@ohos.multimodalInput.mouse.d.ts @@ -29,7 +29,7 @@ declare namespace mouse { * Sets whether the pointer icon is visible. * * @since 9 - * @syscap SystemCapability.MultimodalInput.Input.InputDevice + * @syscap SystemCapability.MultimodalInput.Input.Mouse * @param visible Whether the pointer icon is visible. The value true indicates that the pointer icon is visible, * and the value false indicates the opposite. */ @@ -40,11 +40,22 @@ declare namespace mouse { * Checks whether the pointer icon is visible. * * @since 9 - * @syscap SystemCapability.MultimodalInput.Input.InputDevice + * @syscap SystemCapability.MultimodalInput.Input.Mouse * @return Returns true if the pointer icon is visible; returns false otherwise. */ function isPointerVisible(callback: AsyncCallback) : void; function isPointerVisible() : Promise; + + /** + * 设置鼠标捕获模式是否开启 + * + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.Mouse + * @param capture whether the mouse capture mode is on.The value true indicates that + * the capture mode is on, and the value false indicates that the capture mode is off. + */ + function setCaptureMode(capture: boolean, callback: AsyncCallback) : void; + function setCaptureMode(capture: boolean) : Promise; } export default mouse; \ No newline at end of file -- Gitee From 8aacfd3eef49700679d64574f74a449250242a16 Mon Sep 17 00:00:00 2001 From: liuwei Date: Fri, 22 Jul 2022 15:23:06 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liuwei --- api/@ohos.multimodalInput.mouse.d.ts | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/api/@ohos.multimodalInput.mouse.d.ts b/api/@ohos.multimodalInput.mouse.d.ts index 6c7d327f03..55f2557653 100644 --- a/api/@ohos.multimodalInput.mouse.d.ts +++ b/api/@ohos.multimodalInput.mouse.d.ts @@ -14,6 +14,7 @@ */ import { AsyncCallback } from "./basic"; +import AbilityContext from "./application/AbilityContext"; /** * 鼠标指针相关属性接口 @@ -47,15 +48,22 @@ declare namespace mouse { function isPointerVisible() : Promise; /** - * 设置鼠标捕获模式是否开启 + * 进入鼠标捕获模式 * * @since 9 * @syscap SystemCapability.MultimodalInput.Input.Mouse - * @param capture whether the mouse capture mode is on.The value true indicates that - * the capture mode is on, and the value false indicates that the capture mode is off. + * @param The context of an ability. */ - function setCaptureMode(capture: boolean, callback: AsyncCallback) : void; - function setCaptureMode(capture: boolean) : Promise; + function enterCaptureMode(abilityContext: AbilityContext) : Promise; + + /** + * 退出鼠标捕获模式 + * + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.Mouse + * @param The context of an ability. + */ + function leaveCaptureMode(abilityContext: AbilityContext) : Promise; } export default mouse; \ No newline at end of file -- Gitee From ef310804a193770859643932bd90e923c2b1fe63 Mon Sep 17 00:00:00 2001 From: liuwei Date: Mon, 25 Jul 2022 09:59:27 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=BAwindowId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liuwei --- api/@ohos.multimodalInput.mouse.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/@ohos.multimodalInput.mouse.d.ts b/api/@ohos.multimodalInput.mouse.d.ts index 55f2557653..4d3eb1065a 100644 --- a/api/@ohos.multimodalInput.mouse.d.ts +++ b/api/@ohos.multimodalInput.mouse.d.ts @@ -52,18 +52,18 @@ declare namespace mouse { * * @since 9 * @syscap SystemCapability.MultimodalInput.Input.Mouse - * @param The context of an ability. + * @param windowId. */ - function enterCaptureMode(abilityContext: AbilityContext) : Promise; + function enterCaptureMode(windowId: number) : Promise; /** * 退出鼠标捕获模式 * * @since 9 * @syscap SystemCapability.MultimodalInput.Input.Mouse - * @param The context of an ability. + * @param windowId. */ - function leaveCaptureMode(abilityContext: AbilityContext) : Promise; + function leaveCaptureMode(windowId : number) : Promise; } export default mouse; \ No newline at end of file -- Gitee From 45188041c6385abee33287fd8f18951e8a030563 Mon Sep 17 00:00:00 2001 From: liuwei Date: Wed, 27 Jul 2022 10:40:14 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=92=8C=E5=88=A0=E9=99=A4AbilityContext?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liuwei --- api/@ohos.multimodalInput.mouse.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api/@ohos.multimodalInput.mouse.d.ts b/api/@ohos.multimodalInput.mouse.d.ts index 4d3eb1065a..afa248fd2e 100644 --- a/api/@ohos.multimodalInput.mouse.d.ts +++ b/api/@ohos.multimodalInput.mouse.d.ts @@ -14,7 +14,6 @@ */ import { AsyncCallback } from "./basic"; -import AbilityContext from "./application/AbilityContext"; /** * 鼠标指针相关属性接口 @@ -46,14 +45,14 @@ declare namespace mouse { */ function isPointerVisible(callback: AsyncCallback) : void; function isPointerVisible() : Promise; - /** * 进入鼠标捕获模式 * * @since 9 * @syscap SystemCapability.MultimodalInput.Input.Mouse - * @param windowId. + * @param windowId 窗口id */ + function enterCaptureMode(windowId: number, callback: AsyncCallback) : void; function enterCaptureMode(windowId: number) : Promise; /** @@ -61,9 +60,10 @@ declare namespace mouse { * * @since 9 * @syscap SystemCapability.MultimodalInput.Input.Mouse - * @param windowId. + * @param windowId 窗口id */ - function leaveCaptureMode(windowId : number) : Promise; + function leaveCaptureMode(windowId: number, callback: AsyncCallback) : void; + function leaveCaptureMode(windowId: number) : Promise; } export default mouse; \ No newline at end of file -- Gitee From b5462722a2df914767fb3c10e85c8f1f75ed4157 Mon Sep 17 00:00:00 2001 From: liuwei Date: Wed, 27 Jul 2022 11:38:10 +0800 Subject: [PATCH 6/8] =?UTF-8?q?mouse=E4=BF=AE=E6=94=B9=E4=B8=BApointer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liuwei --- ...e.d.ts => @ohos.multimodalInput.pointer.d.ts} | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename api/{@ohos.multimodalInput.mouse.d.ts => @ohos.multimodalInput.pointer.d.ts} (81%) diff --git a/api/@ohos.multimodalInput.mouse.d.ts b/api/@ohos.multimodalInput.pointer.d.ts similarity index 81% rename from api/@ohos.multimodalInput.mouse.d.ts rename to api/@ohos.multimodalInput.pointer.d.ts index afa248fd2e..e8f1e1e3a4 100644 --- a/api/@ohos.multimodalInput.mouse.d.ts +++ b/api/@ohos.multimodalInput.pointer.d.ts @@ -19,17 +19,17 @@ import { AsyncCallback } from "./basic"; * 鼠标指针相关属性接口 * * @since 9 -* @syscap SystemCapability.MultimodalInput.Input.Mouse -* @import import mouse from '@ohos.multimodalInput.mouse'; +* @syscap SystemCapability.MultimodalInput.Input.Pointer +* @import import pointer from '@ohos.multimodalInput.pointer'; */ -declare namespace mouse { +declare namespace pointer { /** * Sets whether the pointer icon is visible. * * @since 9 - * @syscap SystemCapability.MultimodalInput.Input.Mouse + * @syscap SystemCapability.MultimodalInput.Input.Pointer * @param visible Whether the pointer icon is visible. The value true indicates that the pointer icon is visible, * and the value false indicates the opposite. */ @@ -40,7 +40,7 @@ declare namespace mouse { * Checks whether the pointer icon is visible. * * @since 9 - * @syscap SystemCapability.MultimodalInput.Input.Mouse + * @syscap SystemCapability.MultimodalInput.Input.Pointer * @return Returns true if the pointer icon is visible; returns false otherwise. */ function isPointerVisible(callback: AsyncCallback) : void; @@ -49,7 +49,7 @@ declare namespace mouse { * 进入鼠标捕获模式 * * @since 9 - * @syscap SystemCapability.MultimodalInput.Input.Mouse + * @syscap SystemCapability.MultimodalInput.Input.Pointer * @param windowId 窗口id */ function enterCaptureMode(windowId: number, callback: AsyncCallback) : void; @@ -59,11 +59,11 @@ declare namespace mouse { * 退出鼠标捕获模式 * * @since 9 - * @syscap SystemCapability.MultimodalInput.Input.Mouse + * @syscap SystemCapability.MultimodalInput.Input.Pointer * @param windowId 窗口id */ function leaveCaptureMode(windowId: number, callback: AsyncCallback) : void; function leaveCaptureMode(windowId: number) : Promise; } -export default mouse; \ No newline at end of file +export default pointer; \ No newline at end of file -- Gitee From 227ba2bda4e68ea3f73c6059ce970f239297d598 Mon Sep 17 00:00:00 2001 From: liuwei Date: Thu, 28 Jul 2022 10:42:48 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8E=A5=E5=8F=A3setWind?= =?UTF-8?q?owPointerVisible=E5=92=8CisWindowPointerVisible?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liuwei --- api/@ohos.multimodalInput.pointer.d.ts | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/api/@ohos.multimodalInput.pointer.d.ts b/api/@ohos.multimodalInput.pointer.d.ts index e8f1e1e3a4..057cbd1022 100644 --- a/api/@ohos.multimodalInput.pointer.d.ts +++ b/api/@ohos.multimodalInput.pointer.d.ts @@ -45,6 +45,27 @@ declare namespace pointer { */ function isPointerVisible(callback: AsyncCallback) : void; function isPointerVisible() : Promise; + + /** + * 设置窗口鼠标图标是否显示 + * + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.Pointer + * @param visible 为 true 鼠标图标显示; false 鼠标图标隐藏 + */ + function setWindowPointerVisible(visible: boolean, callback: AsyncCallback) : void; + function setWindowPointerVisible(visible: boolean) : Promise; + + /** + * 判断窗口鼠标图标是否显示 + * + * @since 9 + * @syscap SystemCapability.MultimodalInput.Input.Pointer + * @return 返回true 鼠标图标显示; false 鼠标图标隐藏 + */ + function isWindowPointerVisible(callback: AsyncCallback) : void; + function isWindowPointerVisible() : Promise; + /** * 进入鼠标捕获模式 * @@ -54,7 +75,7 @@ declare namespace pointer { */ function enterCaptureMode(windowId: number, callback: AsyncCallback) : void; function enterCaptureMode(windowId: number) : Promise; - + /** * 退出鼠标捕获模式 * -- Gitee From e320eea4adb1b0073897d3281ebcefec1bbba27e Mon Sep 17 00:00:00 2001 From: liuwei Date: Thu, 28 Jul 2022 10:44:49 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liuwei --- api/@ohos.multimodalInput.pointer.d.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/api/@ohos.multimodalInput.pointer.d.ts b/api/@ohos.multimodalInput.pointer.d.ts index 057cbd1022..a6a42da260 100644 --- a/api/@ohos.multimodalInput.pointer.d.ts +++ b/api/@ohos.multimodalInput.pointer.d.ts @@ -52,19 +52,21 @@ declare namespace pointer { * @since 9 * @syscap SystemCapability.MultimodalInput.Input.Pointer * @param visible 为 true 鼠标图标显示; false 鼠标图标隐藏 + * @param windowId 窗口id */ - function setWindowPointerVisible(visible: boolean, callback: AsyncCallback) : void; - function setWindowPointerVisible(visible: boolean) : Promise; + function setWindowPointerVisible(windowId: number, visible: boolean, callback: AsyncCallback) : void; + function setWindowPointerVisible(windowId: number, visible: boolean) : Promise; /** * 判断窗口鼠标图标是否显示 * * @since 9 * @syscap SystemCapability.MultimodalInput.Input.Pointer + * @param windowId 窗口id * @return 返回true 鼠标图标显示; false 鼠标图标隐藏 */ - function isWindowPointerVisible(callback: AsyncCallback) : void; - function isWindowPointerVisible() : Promise; + function isWindowPointerVisible(windowId: number, callback: AsyncCallback) : void; + function isWindowPointerVisible(windowId: number) : Promise; /** * 进入鼠标捕获模式 -- Gitee