diff --git a/zh-cn/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-multimodalinput.md b/zh-cn/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-multimodalinput.md index 34a5ee4634cf9795b262e87781ba951096405fbd..af13fc9c128026574fce2acb3654f5d10af7150e 100755 --- a/zh-cn/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-multimodalinput.md +++ b/zh-cn/release-notes/changelogs/OpenHarmony_3.2.8.1/changelogs-multimodalinput.md @@ -2,22 +2,20 @@ ## cl.multimodalinput.1 API错误信息返回方式变更 -如下原有接口使用业务逻辑返回值表示错误信息,不符合OpenHarmony接口错误码规范。从API9开始作以下变更, -设备管理:三方接口,@ohos.multimodalInput.inputDevice.d.ts +下列模块内部接口使用业务逻辑返回值表示错误信息,不符合OpenHarmony接口错误码规范。在API9进行变更。 + - 输入设备管理模块:三方接口,@ohos.multimodalInput.inputDevice.d.ts -按键订阅:系统接口,@ohos.multimodalInput.inputConsumer.d.ts + - 组合按键订阅模块:系统接口,@ohos.multimodalInput.inputConsumer.d.ts -键鼠穿越:系统接口,@ohos.multimodalInput.inputDeviceCooperate.d.ts + - 键鼠穿越功能模块:系统接口,@ohos.multimodalInput.inputDeviceCooperate.d.ts -按键注入:系统接口,@ohos.multimodalInput.inputEventClient.d.ts + - 按键注入模块:系统接口,@ohos.multimodalInput.inputEventClient.d.ts -事件监听:系统接口,@ohos.multimodalInput.inputMonitor.d.ts + - 输入监听模块:系统接口,@ohos.multimodalInput.inputMonitor.d.ts -指针事件:系统接口和三方接口,@ohos.multimodalInput.pointer.d.t + - 鼠标指针管理模块:系统接口和三方接口,@ohos.multimodalInput.pointer.d.t -异步接口:通过AsyncCallback或Promise的error对象返回错误信息。 - -同步接口:不涉及。 +以上模块中的异步接口变更为参数检查错误同步抛出,业务逻辑错误通过AsyncCallback或Promise的error对象抛出,同步接口不作变更。 **变更影响** @@ -25,74 +23,60 @@ **关键接口/组件变更** -以下接口标记废除: - - - **function** getDeviceIds(callback: AsyncCallback>): **void**; + - supportKeys(deviceId: **number**, keys: Array, callback: AsyncCallback>): **void**; + - supportKeys(deviceId: **number**, keys: Array): Promise>; + - getKeyboardType(deviceId: **number**, callback: AsyncCallback): **void**; > + - getKeyboardType(deviceId: **number**): Promise; + - setPointerSpeed(speed: **number**, callback: AsyncCallback<**void**>): **void**; + - setPointerSpeed(speed: **number**): Promise<**void**>; + - getPointerSpeed(callback: AsyncCallback<**number**>): **void**; + - getPointerSpeed(): Promise<**number**>; + - setPointerStyle(windowId: **number**, pointerStyle: PointerStyle, callback: AsyncCallback<**void**>): **void**; + - setPointerStyle(windowId: **number**, pointerStyle: PointerStyle): Promise<**void**>; + - getPointerStyle(windowId: **number**, callback: AsyncCallback): **void**; + - getPointerStyle(windowId: **number**): Promise; + - setPointerVisible(visible: boolean, callback: AsyncCallback<**void**>): **void**; + - setPointerVisible(visible: boolean): Promise<**void**>; + - isPointerVisible(callback: AsyncCallback): **void**; + - isPointerVisible(): Promise; + - on(**type**:"touch", receiver:TouchEventReceiver):**void**; + - on(**type**:"mouse", receiver:Callback):**void**; + - off(**type**:"touch", receiver?:TouchEventReceiver):**void**; + - off(**type**:"mouse", receiver?:Callback):**void**; + - injectEvent({KeyEvent: KeyEvent}): **void**; + - enable(enable: boolean, callback: AsyncCallback<**void**>): **void**; + - enable(enable: boolean): Promise<**void**>; + - start(sinkDeviceDescriptor: **string**, srcInputDeviceId: **number**, callback: AsyncCallback<**void**>): **void**; + - start(sinkDeviceDescriptor: **string**, srcInputDeviceId: **number**): Promise<**void**>; + - stop(callback: AsyncCallback<**void**>): **void**; + - stop(): Promise<**void**>; + - getState(deviceDescriptor: **string**, callback: AsyncCallback<{ state: boolean }>): **void**; + - getState(deviceDescriptor: **string**): Promise<{ state: boolean }>; + - on(**type**: 'cooperation', callback: AsyncCallback<{ deviceDescriptor: **string**, eventMsg: EventMsg }>): **void**; + - off(**type**: 'cooperation', callback?: AsyncCallback<**void**>): **void**; + - on(**type**: "key", keyOptions: KeyOptions, callback: Callback): **void**; + - off(**type**: "key", keyOptions: KeyOptions, callback?: Callback): **void**; - - **function** getDeviceIds(): Promise>; - - - **function** getDevice(deviceId: **number**, callback: AsyncCallback): **void**; - - **function** getDevice(deviceId: **number**): Promise; +以下接口标记废除: + - getDeviceIds(callback: AsyncCallback>): **void**; + - getDeviceIds(): Promise>; + - getDevice(deviceId: **number**, callback: AsyncCallback): **void**; + - getDevice(deviceId: **number**): Promise; 替代接口如下: + - getDeviceList(callback: AsyncCallback>): **void**; + - getDeviceList(): Promise>; + - getDeviceInfo(deviceId: **number**, callback: AsyncCallback): **void**; + - getDeviceInfo(deviceId: **number**): Promise; - - **function** getDeviceList(callback: AsyncCallback>): **void**; - - - **function** getDeviceList(): Promise>; - - - **function** getDeviceInfo(deviceId: **number**, callback: AsyncCallback): **void**; - - - **function** getDeviceInfo(deviceId: **number**): Promise; - -以下接口增加错误码处理: - - **function** supportKeys(deviceId: **number**, keys: Array, callback: AsyncCallback>): **void**; - - **function** supportKeys(deviceId: **number**, keys: Array): Promise>; - - **function** getKeyboardType(deviceId: **number**, callback: AsyncCallback): **void**; > - - **function** getKeyboardType(deviceId: **number**): Promise; - - **function** setPointerSpeed(speed: **number**, callback: AsyncCallback<**void**>): **void**; - - **function** setPointerSpeed(speed: **number**): Promise<**void**>; - - **function** getPointerSpeed(callback: AsyncCallback<**number**>): **void**; - - **function** getPointerSpeed(): Promise<**number**>; - - **function** setPointerStyle(windowId: **number**, pointerStyle: PointerStyle, callback: AsyncCallback<**void**>): **void**; - - **function** setPointerStyle(windowId: **number**, pointerStyle: PointerStyle): Promise<**void**>; - - **function** getPointerStyle(windowId: **number**, callback: AsyncCallback): **void**; - - **function** getPointerStyle(windowId: **number**): Promise; - - **function** setPointerVisible(visible: boolean, callback: AsyncCallback<**void**>): **void**; - - **function** setPointerVisible(visible: boolean): Promise<**void**>; - - **function** isPointerVisible(callback: AsyncCallback): **void**; - - **function** isPointerVisible(): Promise; - - **function** on(**type**:"touch", receiver:TouchEventReceiver):**void**; - - **function** on(**type**:"mouse", receiver:Callback):**void**; - - **function** off(**type**:"touch", receiver?:TouchEventReceiver):**void**; - - **function** off(**type**:"mouse", receiver?:Callback):**void**; - - **function** injectEvent({KeyEvent: KeyEvent}): **void**; - - **function** enable(enable: boolean, callback: AsyncCallback<**void**>): **void**; - - **function** enable(enable: boolean): Promise<**void**>; - - **function** start(sinkDeviceDescriptor: **string**, srcInputDeviceId: **number**, callback: AsyncCallback<**void**>): **void**; - - **function** start(sinkDeviceDescriptor: **string**, srcInputDeviceId: **number**): Promise<**void**>; - - **function** stop(callback: AsyncCallback<**void**>): **void**; - - **function** stop(): Promise<**void**>; - - **function** getState(deviceDescriptor: **string**, callback: AsyncCallback<{ state: boolean }>): **void**; - - **function** getState(deviceDescriptor: **string**): Promise<{ state: boolean }>; - - **function** on(**type**: 'cooperation', callback: AsyncCallback<{ deviceDescriptor: **string**, eventMsg: EventMsg }>): **void**; - - **function** off(**type**: 'cooperation', callback?: AsyncCallback<**void**>): **void**; - - **function** on(**type**: "key", keyOptions: KeyOptions, callback: Callback): **void**; - - **function** off(**type**: "key", keyOptions: KeyOptions, callback?: Callback): **void**; - -**以下接口发生变更** - +以下接口发生变更 变更前: - -- **function** supportKeys(deviceId: **number**, keys: Array, callback: Callback>): **void**; - -- **function** getKeyboardType(deviceId: **number**, callback: Callback): **void**; + - supportKeys(deviceId: **number**, keys: Array, callback: Callback>): **void**; + - getKeyboardType(deviceId: **number**, callback: Callback): **void**; 变更后: - -- **function** supportKeys(deviceId: **number**, keys: Array, callback: AsyncCallback>): **void**; - -- **function** getKeyboardType(deviceId: **number**, callback: AsyncCallback): **void**; +- supportKeys(deviceId: **number**, keys: Array, callback: AsyncCallback>): **void**; + - getKeyboardType(deviceId: **number**, callback: AsyncCallback): **void**; **适配指导**