From 46048d4f7c6e888337fa7c4e66e85ac3cf4fae52 Mon Sep 17 00:00:00 2001 From: wanghao1717 Date: Thu, 26 Jun 2025 15:41:14 +0800 Subject: [PATCH 1/3] del ets Signed-off-by: wanghao1717 --- api/@ohos.multimodalInput.intentionCode.d.ets | 246 ------------------ 1 file changed, 246 deletions(-) delete mode 100644 api/@ohos.multimodalInput.intentionCode.d.ets diff --git a/api/@ohos.multimodalInput.intentionCode.d.ets b/api/@ohos.multimodalInput.intentionCode.d.ets deleted file mode 100644 index 7625a5d198..0000000000 --- a/api/@ohos.multimodalInput.intentionCode.d.ets +++ /dev/null @@ -1,246 +0,0 @@ -/* - * Copyright (c) 2023 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. - */ - -/** - * @file - * @kit InputKit - */ - -/** - * IntentionCode - * - * @enum { number } - * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 20 - */ -/** - * IntentionCode - * - * @enum { number } - * @syscap SystemCapability.MultimodalInput.Input.Core - * @atomicservice - * @since 20 - */ -export declare enum IntentionCode { - /** - * INTENTION_UNKNOWN - * - * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 20 - */ - /** - * INTENTION_UNKNOWN - * - * @syscap SystemCapability.MultimodalInput.Input.Core - * @atomicservice - * @since 20 - */ - INTENTION_UNKNOWN = -1, - - /** - * INTENTION_UP - * - * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 20 - */ - /** - * INTENTION_UP - * - * @syscap SystemCapability.MultimodalInput.Input.Core - * @atomicservice - * @since 20 - */ - INTENTION_UP = 1, - - /** - * INTENTION_DOWN - * - * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 20 - */ - /** - * INTENTION_DOWN - * - * @syscap SystemCapability.MultimodalInput.Input.Core - * @atomicservice - * @since 20 - */ - INTENTION_DOWN = 2, - - /** - * INTENTION_LEFT - * - * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 20 - */ - /** - * INTENTION_LEFT - * - * @syscap SystemCapability.MultimodalInput.Input.Core - * @atomicservice - * @since 20 - */ - INTENTION_LEFT = 3, - - /** - * INTENTION_RIGHT - * - * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 20 - */ - /** - * INTENTION_RIGHT - * - * @syscap SystemCapability.MultimodalInput.Input.Core - * @atomicservice - * @since 20 - */ - INTENTION_RIGHT = 4, - - /** - * INTENTION_SELECT - * - * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 20 - */ - /** - * INTENTION_SELECT - * - * @syscap SystemCapability.MultimodalInput.Input.Core - * @atomicservice - * @since 20 - */ - INTENTION_SELECT = 5, - - /** - * INTENTION_ESCAPE - * - * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 20 - */ - /** - * INTENTION_ESCAPE - * - * @syscap SystemCapability.MultimodalInput.Input.Core - * @atomicservice - * @since 20 - */ - INTENTION_ESCAPE = 6, - - /** - * INTENTION_BACK - * - * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 20 - */ - /** - * INTENTION_BACK - * - * @syscap SystemCapability.MultimodalInput.Input.Core - * @atomicservice - * @since 20 - */ - INTENTION_BACK = 7, - - /** - * INTENTION_FORWARD - * - * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 20 - */ - /** - * INTENTION_FORWARD - * - * @syscap SystemCapability.MultimodalInput.Input.Core - * @atomicservice - * @since 20 - */ - INTENTION_FORWARD = 8, - - /** - * INTENTION_MENU - * - * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 20 - */ - /** - * INTENTION_MENU - * - * @syscap SystemCapability.MultimodalInput.Input.Core - * @atomicservice - * @since 20 - */ - INTENTION_MENU = 9, - - /** - * INTENTION_PAGE_UP - * - * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 20 - */ - /** - * INTENTION_PAGE_UP - * - * @syscap SystemCapability.MultimodalInput.Input.Core - * @atomicservice - * @since 20 - */ - INTENTION_PAGE_UP = 11, - - /** - * INTENTION_PAGE_DOWN - * - * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 20 - */ - /** - * INTENTION_PAGE_DOWN - * - * @syscap SystemCapability.MultimodalInput.Input.Core - * @atomicservice - * @since 20 - */ - INTENTION_PAGE_DOWN = 12, - - /** - * INTENTION_ZOOM_OUT - * - * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 20 - */ - /** - * INTENTION_ZOOM_OUT - * - * @syscap SystemCapability.MultimodalInput.Input.Core - * @atomicservice - * @since 20 - */ - INTENTION_ZOOM_OUT = 13, - - /** - * INTENTION_ZOOM_IN - * - * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 20 - */ - /** - * INTENTION_ZOOM_IN - * - * @syscap SystemCapability.MultimodalInput.Input.Core - * @atomicservice - * @since 20 - */ - INTENTION_ZOOM_IN = 14 -} -- Gitee From a590e94320733f5b97bc90c26938c16806b04d75 Mon Sep 17 00:00:00 2001 From: wanghao1717 Date: Thu, 26 Jun 2025 15:42:12 +0800 Subject: [PATCH 2/3] fix Signed-off-by: wanghao1717 --- ...multimodalInput.inputDeviceCooperate.d.ets | 341 ++++++++++++++++++ 1 file changed, 341 insertions(+) create mode 100644 api/@ohos.multimodalInput.inputDeviceCooperate.d.ets diff --git a/api/@ohos.multimodalInput.inputDeviceCooperate.d.ets b/api/@ohos.multimodalInput.inputDeviceCooperate.d.ets new file mode 100644 index 0000000000..49fba86e0b --- /dev/null +++ b/api/@ohos.multimodalInput.inputDeviceCooperate.d.ets @@ -0,0 +1,341 @@ +/* +* Copyright (c) 2022-2023 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. +*/ + +/** + * @file + * @kit InputKit + */ + +import { AsyncCallback } from "./@ohos.base"; + +/** + * Events for input devices + * + * @namespace inputDeviceCooperate + * @syscap SystemCapability.MultimodalInput.Input.Cooperator + * @since 9 + */ + + +declare namespace inputDeviceCooperate { + /** + * Enumerates mouse traversal events. + * @enum { number } + * @syscap SystemCapability.MultimodalInput.Input.Cooperator + * @systemapi hide for inner use. + * @since 9 + */ + enum EventMsg { + /** + * Mouse traversal message: mouse traversal is enabled. + * @syscap SystemCapability.MultimodalInput.Input.Cooperator + * @systemapi hide for inner use + * @since 9 + */ + MSG_COOPERATE_INFO_START = 200, + + /** + * Mouse traversal message: mouse traversal is successful. + * + * @syscap SystemCapability.MultimodalInput.Input.Cooperator + * @systemapi hide for inner use + * @since 9 + */ + MSG_COOPERATE_INFO_SUCCESS = 201, + + /** + * Mouse traversal message: mouse traversal fails. + * @syscap SystemCapability.MultimodalInput.Input.Cooperator + * @systemapi hide for inner use + * @since 9 + */ + MSG_COOPERATE_INFO_FAIL = 202, + + /** + * Mouse traversal status: mouse traversal is enabled. + * + * @syscap SystemCapability.MultimodalInput.Input.Cooperator + * @systemapi hide for inner use + * @since 9 + */ + MSG_COOPERATE_STATE_ON = 500, + + /** + * Mouse traversal status: mouse traversal is disabled. + * + * @syscap SystemCapability.MultimodalInput.Input.Cooperator + * @systemapi hide for inner use + * @since 9 + */ + MSG_COOPERATE_STATE_OFF = 501, + } + + /** + * Enable or disable the mouse traversal. + * + * @param { boolean } enable Whether to enable mouse traversal. + * @param { AsyncCallback } callback Asynchronous callback function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.MultimodalInput.Input.Cooperator + * @systemapi hide for inner use + * @since 9 + */ + /** + * Enable or disable the mouse traversal. + * + * @param { boolean } enable Whether to enable mouse traversal. + * @param { AsyncCallback } callback Asynchronous callback function. + * @throws { BusinessError } 202 - Permission denied, non-system app called system api. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.MultimodalInput.Input.Cooperator + * @systemapi hide for inner use + * @since 12 + */ + function enable(enable: boolean, callback: AsyncCallback): void; + + /** + * Enable or disable the mouse traversal. + * + * @param enable Whether to enable mouse traversal. + * @returns { Promise } Promise returned by this function + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.MultimodalInput.Input.Cooperator + * @systemapi hide for inner use + * @since 9 + */ + /** + * Enable or disable the mouse traversal. + * + * @param enable Whether to enable mouse traversal. + * @returns { Promise } Promise returned by this function + * @throws { BusinessError } 202 - Permission denied, non-system app called system api. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.MultimodalInput.Input.Cooperator + * @systemapi hide for inner use + * @since 12 + */ + function enable(enable: boolean): Promise; + + /** + * Starts mouse traversal. + * + * @param { string } sinkDeviceDescriptor Descriptor of the target network for mouse traversal. + * @param { number } srcInputDeviceId Identifier of the peripheral device for mouse traversal. + * @param { AsyncCallback } callback Asynchronous callback function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @throws { BusinessError } 4400001 - Incorrect descriptor for the target device. + * @throws { BusinessError } 4400002 - Screen hop failed. + * @syscap SystemCapability.MultimodalInput.Input.Cooperator + * @systemapi hide for inner use + * @since 9 + */ + /** + * Starts mouse traversal. + * + * @param { string } sinkDeviceDescriptor Descriptor of the target network for mouse traversal. + * @param { number } srcInputDeviceId Identifier of the peripheral device for mouse traversal. + * @param { AsyncCallback } callback Asynchronous callback function. + * @throws { BusinessError } 202 - Permission denied, non-system app called system api. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @throws { BusinessError } 4400001 - Incorrect descriptor for the target device. + * @throws { BusinessError } 4400002 - Screen hop failed. + * @syscap SystemCapability.MultimodalInput.Input.Cooperator + * @systemapi hide for inner use + * @since 12 + */ + function start(sinkDeviceDescriptor: string, srcInputDeviceId: number, callback: AsyncCallback): void; + + /** + * Starts mouse traversal. + * + * @param { string } sinkDeviceDescriptor Descriptor of the target network for mouse traversal. + * @param { number } srcInputDeviceId Identifier of the peripheral device for mouse traversal. + * @returns { Promise } Promise returned by this function + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @throws { BusinessError } 4400001 - Incorrect descriptor for the target device. + * @throws { BusinessError } 4400002 - Screen hop failed. + * @syscap SystemCapability.MultimodalInput.Input.Cooperator + * @systemapi hide for inner use + * @since 9 + */ + /** + * Starts mouse traversal. + * + * @param { string } sinkDeviceDescriptor Descriptor of the target network for mouse traversal. + * @param { number } srcInputDeviceId Identifier of the peripheral device for mouse traversal. + * @returns { Promise } Promise returned by this function + * @throws { BusinessError } 202 - Permission denied, non-system app called system api. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @throws { BusinessError } 4400001 - Incorrect descriptor for the target device. + * @throws { BusinessError } 4400002 - Screen hop failed. + * @syscap SystemCapability.MultimodalInput.Input.Cooperator + * @systemapi hide for inner use + * @since 12 + */ + function start(sinkDeviceDescriptor: string, srcInputDeviceId: number): Promise; + + /** + * Stops mouse traversal. + * + * @param { AsyncCallback } callback Asynchronous callback function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.MultimodalInput.Input.Cooperator + * @systemapi hide for inner use + * @since 9 + */ + /** + * Stops mouse traversal. + * + * @param { AsyncCallback } callback Asynchronous callback function. + * @throws { BusinessError } 202 - Permission denied, non-system app called system api. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.MultimodalInput.Input.Cooperator + * @systemapi hide for inner use + * @since 12 + */ + function stop(callback: AsyncCallback): void; + + /** + * Stops mouse traversal. + * + * @returns { Promise } Promise returned by this function + * @syscap SystemCapability.MultimodalInput.Input.Cooperator + * @systemapi hide for inner use + * @since 9 + */ + /** + * Stops mouse traversal. + * + * @returns { Promise } Promise returned by this function + * @throws { BusinessError } 202 - Permission denied, non-system app called system api. + * @syscap SystemCapability.MultimodalInput.Input.Cooperator + * @systemapi hide for inner use + * @since 12 + */ + function stop(): Promise; + + /** + * Obtains the status of the mouse traversal switch. + * + * @param {string} deviceDescriptor Descriptor of the target network for mouse traversal. + * @param {AsyncCallback<{ state: boolean }>} callback Asynchronous callback used to receive the status of the mouse traversal switch. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.MultimodalInput.Input.Cooperator + * @systemapi hide for inner use + * @since 9 + */ + /** + * Obtains the status of the mouse traversal switch. + * + * @param {string} deviceDescriptor Descriptor of the target network for mouse traversal. + * @param {AsyncCallback<{ state: boolean }>} callback Asynchronous callback used to receive the status of the mouse traversal switch. + * @throws { BusinessError } 202 - Permission denied, non-system app called system api. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.MultimodalInput.Input.Cooperator + * @systemapi hide for inner use + * @since 12 + */ + function getState(deviceDescriptor: string, callback: AsyncCallback<{ state: boolean }>): void; + + /** + * Obtains the status of the mouse traversal switch. + * + * @param deviceDescriptor Descriptor of the target network for mouse traversal. + * @returns { Promise<{ state: boolean }> } A promise used by returning state + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.MultimodalInput.Input.Cooperator + * @systemapi hide for inner use + * @since 9 + */ + /** + * Obtains the status of the mouse traversal switch. + * + * @param deviceDescriptor Descriptor of the target network for mouse traversal. + * @returns { Promise<{ state: boolean }> } A promise used by returning state + * @throws { BusinessError } 202 - Permission denied, non-system app called system api. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.MultimodalInput.Input.Cooperator + * @systemapi hide for inner use + * @since 12 + */ + function getState(deviceDescriptor: string): Promise<{ state: boolean }>; + + /** + * Enables listening for mouse traversal events. + * + * @param { 'cooperation' } type Registration type. + * @param { AsyncCallback<{ deviceDescriptor: string, eventMsg: EventMsg }> } callback Asynchronous callback used to receive mouse traversal events. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.MultimodalInput.Input.Cooperator + * @systemapi hide for inner use + * @since 9 + */ + /** + * Enables listening for mouse traversal events. + * + * @param { 'cooperation' } type Registration type. + * @param { AsyncCallback<{ deviceDescriptor: string, eventMsg: EventMsg }> } callback Asynchronous callback used to receive mouse traversal events. + * @throws { BusinessError } 202 - Permission denied, non-system app called system api. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.MultimodalInput.Input.Cooperator + * @systemapi hide for inner use + * @since 12 + */ + function on(type: 'cooperation', callback: AsyncCallback<{ deviceDescriptor: string, eventMsg: EventMsg }>): void; + + /** + * Disables listening for mouse traversal events. + * + * @param { 'cooperation' } type Registration type. + * @param { AsyncCallback } callback Asynchronous callback used to return the result. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.MultimodalInput.Input.Cooperator + * @systemapi hide for inner use + * @since 9 + */ + /** + * Disables listening for mouse traversal events. + * + * @param { 'cooperation' } type Registration type. + * @param { AsyncCallback } callback Asynchronous callback used to return the result. + * @throws { BusinessError } 202 - Permission denied, non-system app called system api. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @syscap SystemCapability.MultimodalInput.Input.Cooperator + * @systemapi hide for inner use + * @since 12 + */ + function off(type: 'cooperation', callback?: AsyncCallback): void; + +} + +export default inputDeviceCooperate; \ No newline at end of file -- Gitee From ae0f6a3fbfdb67c05f0a8f8d1362b597fdf470df Mon Sep 17 00:00:00 2001 From: wanghao1717 Date: Thu, 26 Jun 2025 15:42:42 +0800 Subject: [PATCH 3/3] del ets Signed-off-by: wanghao1717 --- ...multimodalInput.inputDeviceCooperate.d.ets | 341 ------------------ 1 file changed, 341 deletions(-) delete mode 100644 api/@ohos.multimodalInput.inputDeviceCooperate.d.ets diff --git a/api/@ohos.multimodalInput.inputDeviceCooperate.d.ets b/api/@ohos.multimodalInput.inputDeviceCooperate.d.ets deleted file mode 100644 index 49fba86e0b..0000000000 --- a/api/@ohos.multimodalInput.inputDeviceCooperate.d.ets +++ /dev/null @@ -1,341 +0,0 @@ -/* -* Copyright (c) 2022-2023 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. -*/ - -/** - * @file - * @kit InputKit - */ - -import { AsyncCallback } from "./@ohos.base"; - -/** - * Events for input devices - * - * @namespace inputDeviceCooperate - * @syscap SystemCapability.MultimodalInput.Input.Cooperator - * @since 9 - */ - - -declare namespace inputDeviceCooperate { - /** - * Enumerates mouse traversal events. - * @enum { number } - * @syscap SystemCapability.MultimodalInput.Input.Cooperator - * @systemapi hide for inner use. - * @since 9 - */ - enum EventMsg { - /** - * Mouse traversal message: mouse traversal is enabled. - * @syscap SystemCapability.MultimodalInput.Input.Cooperator - * @systemapi hide for inner use - * @since 9 - */ - MSG_COOPERATE_INFO_START = 200, - - /** - * Mouse traversal message: mouse traversal is successful. - * - * @syscap SystemCapability.MultimodalInput.Input.Cooperator - * @systemapi hide for inner use - * @since 9 - */ - MSG_COOPERATE_INFO_SUCCESS = 201, - - /** - * Mouse traversal message: mouse traversal fails. - * @syscap SystemCapability.MultimodalInput.Input.Cooperator - * @systemapi hide for inner use - * @since 9 - */ - MSG_COOPERATE_INFO_FAIL = 202, - - /** - * Mouse traversal status: mouse traversal is enabled. - * - * @syscap SystemCapability.MultimodalInput.Input.Cooperator - * @systemapi hide for inner use - * @since 9 - */ - MSG_COOPERATE_STATE_ON = 500, - - /** - * Mouse traversal status: mouse traversal is disabled. - * - * @syscap SystemCapability.MultimodalInput.Input.Cooperator - * @systemapi hide for inner use - * @since 9 - */ - MSG_COOPERATE_STATE_OFF = 501, - } - - /** - * Enable or disable the mouse traversal. - * - * @param { boolean } enable Whether to enable mouse traversal. - * @param { AsyncCallback } callback Asynchronous callback function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types; 3. Parameter verification failed. - * @syscap SystemCapability.MultimodalInput.Input.Cooperator - * @systemapi hide for inner use - * @since 9 - */ - /** - * Enable or disable the mouse traversal. - * - * @param { boolean } enable Whether to enable mouse traversal. - * @param { AsyncCallback } callback Asynchronous callback function. - * @throws { BusinessError } 202 - Permission denied, non-system app called system api. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types; 3. Parameter verification failed. - * @syscap SystemCapability.MultimodalInput.Input.Cooperator - * @systemapi hide for inner use - * @since 12 - */ - function enable(enable: boolean, callback: AsyncCallback): void; - - /** - * Enable or disable the mouse traversal. - * - * @param enable Whether to enable mouse traversal. - * @returns { Promise } Promise returned by this function - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types; 3. Parameter verification failed. - * @syscap SystemCapability.MultimodalInput.Input.Cooperator - * @systemapi hide for inner use - * @since 9 - */ - /** - * Enable or disable the mouse traversal. - * - * @param enable Whether to enable mouse traversal. - * @returns { Promise } Promise returned by this function - * @throws { BusinessError } 202 - Permission denied, non-system app called system api. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types; 3. Parameter verification failed. - * @syscap SystemCapability.MultimodalInput.Input.Cooperator - * @systemapi hide for inner use - * @since 12 - */ - function enable(enable: boolean): Promise; - - /** - * Starts mouse traversal. - * - * @param { string } sinkDeviceDescriptor Descriptor of the target network for mouse traversal. - * @param { number } srcInputDeviceId Identifier of the peripheral device for mouse traversal. - * @param { AsyncCallback } callback Asynchronous callback function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types; 3. Parameter verification failed. - * @throws { BusinessError } 4400001 - Incorrect descriptor for the target device. - * @throws { BusinessError } 4400002 - Screen hop failed. - * @syscap SystemCapability.MultimodalInput.Input.Cooperator - * @systemapi hide for inner use - * @since 9 - */ - /** - * Starts mouse traversal. - * - * @param { string } sinkDeviceDescriptor Descriptor of the target network for mouse traversal. - * @param { number } srcInputDeviceId Identifier of the peripheral device for mouse traversal. - * @param { AsyncCallback } callback Asynchronous callback function. - * @throws { BusinessError } 202 - Permission denied, non-system app called system api. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types; 3. Parameter verification failed. - * @throws { BusinessError } 4400001 - Incorrect descriptor for the target device. - * @throws { BusinessError } 4400002 - Screen hop failed. - * @syscap SystemCapability.MultimodalInput.Input.Cooperator - * @systemapi hide for inner use - * @since 12 - */ - function start(sinkDeviceDescriptor: string, srcInputDeviceId: number, callback: AsyncCallback): void; - - /** - * Starts mouse traversal. - * - * @param { string } sinkDeviceDescriptor Descriptor of the target network for mouse traversal. - * @param { number } srcInputDeviceId Identifier of the peripheral device for mouse traversal. - * @returns { Promise } Promise returned by this function - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types; 3. Parameter verification failed. - * @throws { BusinessError } 4400001 - Incorrect descriptor for the target device. - * @throws { BusinessError } 4400002 - Screen hop failed. - * @syscap SystemCapability.MultimodalInput.Input.Cooperator - * @systemapi hide for inner use - * @since 9 - */ - /** - * Starts mouse traversal. - * - * @param { string } sinkDeviceDescriptor Descriptor of the target network for mouse traversal. - * @param { number } srcInputDeviceId Identifier of the peripheral device for mouse traversal. - * @returns { Promise } Promise returned by this function - * @throws { BusinessError } 202 - Permission denied, non-system app called system api. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types; 3. Parameter verification failed. - * @throws { BusinessError } 4400001 - Incorrect descriptor for the target device. - * @throws { BusinessError } 4400002 - Screen hop failed. - * @syscap SystemCapability.MultimodalInput.Input.Cooperator - * @systemapi hide for inner use - * @since 12 - */ - function start(sinkDeviceDescriptor: string, srcInputDeviceId: number): Promise; - - /** - * Stops mouse traversal. - * - * @param { AsyncCallback } callback Asynchronous callback function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types; 3. Parameter verification failed. - * @syscap SystemCapability.MultimodalInput.Input.Cooperator - * @systemapi hide for inner use - * @since 9 - */ - /** - * Stops mouse traversal. - * - * @param { AsyncCallback } callback Asynchronous callback function. - * @throws { BusinessError } 202 - Permission denied, non-system app called system api. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types; 3. Parameter verification failed. - * @syscap SystemCapability.MultimodalInput.Input.Cooperator - * @systemapi hide for inner use - * @since 12 - */ - function stop(callback: AsyncCallback): void; - - /** - * Stops mouse traversal. - * - * @returns { Promise } Promise returned by this function - * @syscap SystemCapability.MultimodalInput.Input.Cooperator - * @systemapi hide for inner use - * @since 9 - */ - /** - * Stops mouse traversal. - * - * @returns { Promise } Promise returned by this function - * @throws { BusinessError } 202 - Permission denied, non-system app called system api. - * @syscap SystemCapability.MultimodalInput.Input.Cooperator - * @systemapi hide for inner use - * @since 12 - */ - function stop(): Promise; - - /** - * Obtains the status of the mouse traversal switch. - * - * @param {string} deviceDescriptor Descriptor of the target network for mouse traversal. - * @param {AsyncCallback<{ state: boolean }>} callback Asynchronous callback used to receive the status of the mouse traversal switch. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types; 3. Parameter verification failed. - * @syscap SystemCapability.MultimodalInput.Input.Cooperator - * @systemapi hide for inner use - * @since 9 - */ - /** - * Obtains the status of the mouse traversal switch. - * - * @param {string} deviceDescriptor Descriptor of the target network for mouse traversal. - * @param {AsyncCallback<{ state: boolean }>} callback Asynchronous callback used to receive the status of the mouse traversal switch. - * @throws { BusinessError } 202 - Permission denied, non-system app called system api. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types; 3. Parameter verification failed. - * @syscap SystemCapability.MultimodalInput.Input.Cooperator - * @systemapi hide for inner use - * @since 12 - */ - function getState(deviceDescriptor: string, callback: AsyncCallback<{ state: boolean }>): void; - - /** - * Obtains the status of the mouse traversal switch. - * - * @param deviceDescriptor Descriptor of the target network for mouse traversal. - * @returns { Promise<{ state: boolean }> } A promise used by returning state - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types; 3. Parameter verification failed. - * @syscap SystemCapability.MultimodalInput.Input.Cooperator - * @systemapi hide for inner use - * @since 9 - */ - /** - * Obtains the status of the mouse traversal switch. - * - * @param deviceDescriptor Descriptor of the target network for mouse traversal. - * @returns { Promise<{ state: boolean }> } A promise used by returning state - * @throws { BusinessError } 202 - Permission denied, non-system app called system api. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types; 3. Parameter verification failed. - * @syscap SystemCapability.MultimodalInput.Input.Cooperator - * @systemapi hide for inner use - * @since 12 - */ - function getState(deviceDescriptor: string): Promise<{ state: boolean }>; - - /** - * Enables listening for mouse traversal events. - * - * @param { 'cooperation' } type Registration type. - * @param { AsyncCallback<{ deviceDescriptor: string, eventMsg: EventMsg }> } callback Asynchronous callback used to receive mouse traversal events. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types; 3. Parameter verification failed. - * @syscap SystemCapability.MultimodalInput.Input.Cooperator - * @systemapi hide for inner use - * @since 9 - */ - /** - * Enables listening for mouse traversal events. - * - * @param { 'cooperation' } type Registration type. - * @param { AsyncCallback<{ deviceDescriptor: string, eventMsg: EventMsg }> } callback Asynchronous callback used to receive mouse traversal events. - * @throws { BusinessError } 202 - Permission denied, non-system app called system api. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types; 3. Parameter verification failed. - * @syscap SystemCapability.MultimodalInput.Input.Cooperator - * @systemapi hide for inner use - * @since 12 - */ - function on(type: 'cooperation', callback: AsyncCallback<{ deviceDescriptor: string, eventMsg: EventMsg }>): void; - - /** - * Disables listening for mouse traversal events. - * - * @param { 'cooperation' } type Registration type. - * @param { AsyncCallback } callback Asynchronous callback used to return the result. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types; 3. Parameter verification failed. - * @syscap SystemCapability.MultimodalInput.Input.Cooperator - * @systemapi hide for inner use - * @since 9 - */ - /** - * Disables listening for mouse traversal events. - * - * @param { 'cooperation' } type Registration type. - * @param { AsyncCallback } callback Asynchronous callback used to return the result. - * @throws { BusinessError } 202 - Permission denied, non-system app called system api. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types; 3. Parameter verification failed. - * @syscap SystemCapability.MultimodalInput.Input.Cooperator - * @systemapi hide for inner use - * @since 12 - */ - function off(type: 'cooperation', callback?: AsyncCallback): void; - -} - -export default inputDeviceCooperate; \ No newline at end of file -- Gitee