From f2543371976d890d1beae426d42fa212d4625fb0 Mon Sep 17 00:00:00 2001 From: yirenjie1 Date: Thu, 10 Feb 2022 06:07:28 +0000 Subject: [PATCH 1/6] Signed-off-by:yirenjie1 Signed-off-by: yirenjie1 --- api/@ohos.multimodalInput.inputMonitor.d.ts | 50 +++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 api/@ohos.multimodalInput.inputMonitor.d.ts diff --git a/api/@ohos.multimodalInput.inputMonitor.d.ts b/api/@ohos.multimodalInput.inputMonitor.d.ts new file mode 100644 index 0000000000..5f3cc0570b --- /dev/null +++ b/api/@ohos.multimodalInput.inputMonitor.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. + */ +/** + * Global Input Event Listener + * System API, available only to system processes + * @since 7 + * @sysCap System Capabilities + * @devices phone, tablet, tv, wearable + * @import import inputMonitor from '@ohos.multimodalInput.inputMonitor'; + * @permission ohos.permission.INPUT_MONITORING + * @systemapi + */ +declare namespace inputMonitor { + /** + * Callback function of the touch input event. If true is returned, the touch input is consumed by the monitor (the system performs the closing action). + * @since 7 + * @sysCap System Capabilities + * @systemapi + */ + interface TouchEventReceiver { + (touchEvent:TouchEvent): Boolean; + } + /** + * Listening for touch input events + * @since 7 + * @sysCap System Capabilities + * @systemapi + */ + function on(type:"touch", receiver:TouchEventReceiver):void; + /** + * Cancels listening for touch input events + * @since 7 + * @sysCap System Capabilities + * @systemapi + */ + function off(type:"touch", receiver:TouchEventReceiver):void; +} +export default inputMonitor; \ No newline at end of file -- Gitee From fd6ca825ddcef15acd49fcb7757c2b78887f1e03 Mon Sep 17 00:00:00 2001 From: yirenjie1 Date: Thu, 10 Feb 2022 06:10:44 +0000 Subject: [PATCH 2/6] Signed-off-by:yirenjie1 Signed-off-by: yirenjie1 --- api/@ohos.multimodalInput.inputMonitor.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/@ohos.multimodalInput.inputMonitor.d.ts b/api/@ohos.multimodalInput.inputMonitor.d.ts index 5f3cc0570b..70af2ad16a 100644 --- a/api/@ohos.multimodalInput.inputMonitor.d.ts +++ b/api/@ohos.multimodalInput.inputMonitor.d.ts @@ -32,6 +32,7 @@ declare namespace inputMonitor { interface TouchEventReceiver { (touchEvent:TouchEvent): Boolean; } + /** * Listening for touch input events * @since 7 @@ -39,6 +40,7 @@ declare namespace inputMonitor { * @systemapi */ function on(type:"touch", receiver:TouchEventReceiver):void; + /** * Cancels listening for touch input events * @since 7 @@ -47,4 +49,4 @@ declare namespace inputMonitor { */ function off(type:"touch", receiver:TouchEventReceiver):void; } -export default inputMonitor; \ No newline at end of file +export default inputMonitor; -- Gitee From 78a36bc2623f91b7d153783f462517a0e77d23a4 Mon Sep 17 00:00:00 2001 From: yirenjie1 Date: Thu, 10 Feb 2022 09:11:53 +0000 Subject: [PATCH 3/6] Signed-off-by:yirenjie1 Signed-off-by: yirenjie1 --- api/@ohos.multimodalInput.inputMonitor.d.ts | 22 +++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/api/@ohos.multimodalInput.inputMonitor.d.ts b/api/@ohos.multimodalInput.inputMonitor.d.ts index 70af2ad16a..a00d2c0cbf 100644 --- a/api/@ohos.multimodalInput.inputMonitor.d.ts +++ b/api/@ohos.multimodalInput.inputMonitor.d.ts @@ -16,18 +16,18 @@ * Global Input Event Listener * System API, available only to system processes * @since 7 - * @sysCap System Capabilities + * @sysCap SystemCapabilities.MultimodalInput.MULTIMODAL_INPUT * @devices phone, tablet, tv, wearable * @import import inputMonitor from '@ohos.multimodalInput.inputMonitor'; * @permission ohos.permission.INPUT_MONITORING - * @systemapi + * @systemapi hide for inner use */ declare namespace inputMonitor { /** * Callback function of the touch input event. If true is returned, the touch input is consumed by the monitor (the system performs the closing action). * @since 7 - * @sysCap System Capabilities - * @systemapi + * @sysCap SystemCapabilities.MultimodalInput.MULTIMODAL_INPUT + * @systemapi hide for inner use */ interface TouchEventReceiver { (touchEvent:TouchEvent): Boolean; @@ -36,16 +36,22 @@ declare namespace inputMonitor { /** * Listening for touch input events * @since 7 - * @sysCap System Capabilities - * @systemapi + * @sysCap SystemCapabilities.MultimodalInput.MULTIMODAL_INPUT + * @devices phone, tablet, tv, wearable + * @systemapi hide for inner use + * @param type register event type + * @param receiver callback function, receive reported data */ function on(type:"touch", receiver:TouchEventReceiver):void; /** * Cancels listening for touch input events * @since 7 - * @sysCap System Capabilities - * @systemapi + * @sysCap SystemCapabilities.MultimodalInput.MULTIMODAL_INPUT + * @devices phone, tablet, tv, wearable + * @systemapi hide for inner use + * @param type register event type + * @param receiver callback function, receive reported data */ function off(type:"touch", receiver:TouchEventReceiver):void; } -- Gitee From 3b3be63a80e785c345b8b266b4dd40da39671824 Mon Sep 17 00:00:00 2001 From: yirenjie1 Date: Thu, 10 Feb 2022 09:31:21 +0000 Subject: [PATCH 4/6] Signed-off-by:yirenjie1 Signed-off-by: yirenjie1 --- api/@ohos.multimodalInput.inputMonitor.d.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/api/@ohos.multimodalInput.inputMonitor.d.ts b/api/@ohos.multimodalInput.inputMonitor.d.ts index a00d2c0cbf..00d9e973bc 100644 --- a/api/@ohos.multimodalInput.inputMonitor.d.ts +++ b/api/@ohos.multimodalInput.inputMonitor.d.ts @@ -16,8 +16,7 @@ * Global Input Event Listener * System API, available only to system processes * @since 7 - * @sysCap SystemCapabilities.MultimodalInput.MULTIMODAL_INPUT - * @devices phone, tablet, tv, wearable + * @sysCap SystemCapabilities.MultimodalInput.Input.InputMonitor * @import import inputMonitor from '@ohos.multimodalInput.inputMonitor'; * @permission ohos.permission.INPUT_MONITORING * @systemapi hide for inner use @@ -26,7 +25,7 @@ declare namespace inputMonitor { /** * Callback function of the touch input event. If true is returned, the touch input is consumed by the monitor (the system performs the closing action). * @since 7 - * @sysCap SystemCapabilities.MultimodalInput.MULTIMODAL_INPUT + * @sysCap SystemCapabilities.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use */ interface TouchEventReceiver { @@ -36,8 +35,7 @@ declare namespace inputMonitor { /** * Listening for touch input events * @since 7 - * @sysCap SystemCapabilities.MultimodalInput.MULTIMODAL_INPUT - * @devices phone, tablet, tv, wearable + * @sysCap SystemCapabilities.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use * @param type register event type * @param receiver callback function, receive reported data @@ -47,12 +45,11 @@ declare namespace inputMonitor { /** * Cancels listening for touch input events * @since 7 - * @sysCap SystemCapabilities.MultimodalInput.MULTIMODAL_INPUT - * @devices phone, tablet, tv, wearable + * @sysCap SystemCapabilities.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use * @param type register event type * @param receiver callback function, receive reported data */ - function off(type:"touch", receiver:TouchEventReceiver):void; + function off(type:"touch", receiver?:TouchEventReceiver):void; } export default inputMonitor; -- Gitee From 8dc634a8ed787551f58e8737b8628562e9942b51 Mon Sep 17 00:00:00 2001 From: yirenjie1 Date: Thu, 10 Feb 2022 09:33:14 +0000 Subject: [PATCH 5/6] Signed-off-by:yirenjie1 Signed-off-by: yirenjie1 --- api/@ohos.multimodalInput.inputMonitor.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/@ohos.multimodalInput.inputMonitor.d.ts b/api/@ohos.multimodalInput.inputMonitor.d.ts index 00d9e973bc..3dac2d4d6f 100644 --- a/api/@ohos.multimodalInput.inputMonitor.d.ts +++ b/api/@ohos.multimodalInput.inputMonitor.d.ts @@ -16,7 +16,7 @@ * Global Input Event Listener * System API, available only to system processes * @since 7 - * @sysCap SystemCapabilities.MultimodalInput.Input.InputMonitor + * @sysCap SystemCapability.MultimodalInput.Input.InputMonitor * @import import inputMonitor from '@ohos.multimodalInput.inputMonitor'; * @permission ohos.permission.INPUT_MONITORING * @systemapi hide for inner use @@ -25,7 +25,7 @@ declare namespace inputMonitor { /** * Callback function of the touch input event. If true is returned, the touch input is consumed by the monitor (the system performs the closing action). * @since 7 - * @sysCap SystemCapabilities.MultimodalInput.Input.InputMonitor + * @sysCap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use */ interface TouchEventReceiver { @@ -35,7 +35,7 @@ declare namespace inputMonitor { /** * Listening for touch input events * @since 7 - * @sysCap SystemCapabilities.MultimodalInput.Input.InputMonitor + * @sysCap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use * @param type register event type * @param receiver callback function, receive reported data @@ -45,7 +45,7 @@ declare namespace inputMonitor { /** * Cancels listening for touch input events * @since 7 - * @sysCap SystemCapabilities.MultimodalInput.Input.InputMonitor + * @sysCap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use * @param type register event type * @param receiver callback function, receive reported data -- Gitee From 84ae08681506e35899ccf549347d06f1e89df2f5 Mon Sep 17 00:00:00 2001 From: yirenjie1 Date: Fri, 11 Feb 2022 01:40:07 +0000 Subject: [PATCH 6/6] Signed-off-by:yirenjie1 Signed-off-by: yirenjie1 --- api/@ohos.multimodalInput.inputMonitor.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/@ohos.multimodalInput.inputMonitor.d.ts b/api/@ohos.multimodalInput.inputMonitor.d.ts index 3dac2d4d6f..d2fca09abb 100644 --- a/api/@ohos.multimodalInput.inputMonitor.d.ts +++ b/api/@ohos.multimodalInput.inputMonitor.d.ts @@ -37,6 +37,7 @@ declare namespace inputMonitor { * @since 7 * @sysCap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use + * @permission ohos.permission.INPUT_MONITORING * @param type register event type * @param receiver callback function, receive reported data */ @@ -47,6 +48,7 @@ declare namespace inputMonitor { * @since 7 * @sysCap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use + * @permission ohos.permission.INPUT_MONITORING * @param type register event type * @param receiver callback function, receive reported data */ -- Gitee