harmony 鸿蒙多模输入子系统JS API变更

  • 2022-12-22
  • 浏览 (551)

多模输入子系统JS API变更

OpenHarmony 3.2 Beta3版本相较于OpenHarmony 3.2 Beta2版本,多模输入子系统的API变更如下:

接口变更

模块名 类名 方法/属性/枚举/常量 变更类型
ohos.multimodalInput.inputDeviceCooperate inputDeviceCooperate off(type: ‘cooperation’, callback?: AsyncCallback<void>): void; 新增
ohos.multimodalInput.inputDeviceCooperate inputDeviceCooperate on(type: ‘cooperation’, callback: AsyncCallback<{ deviceDescriptor: string, eventMsg: EventMsg }>): void; 新增
ohos.multimodalInput.inputDeviceCooperate inputDeviceCooperate getState(deviceDescriptor: string, callback: AsyncCallback<{ state: boolean }>): void;
getState(deviceDescriptor: string): Promise<{ state: boolean }>;
新增
ohos.multimodalInput.inputDeviceCooperate inputDeviceCooperate stop(callback: AsyncCallback<void>): void;
stop(): Promise<void>;
新增
ohos.multimodalInput.inputDeviceCooperate inputDeviceCooperate start(sinkDeviceDescriptor: string, srcInputDeviceId: number, callback: AsyncCallback<void>): void;
start(sinkDeviceDescriptor: string, srcInputDeviceId: number): Promise<void>;
新增
ohos.multimodalInput.inputDeviceCooperate inputDeviceCooperate enable(enable: boolean, callback: AsyncCallback<void>): void;
enable(enable: boolean): Promise<void>;
新增
ohos.multimodalInput.inputDeviceCooperate EventMsg MSG_COOPERATE_STATE_OFF = 501 新增
ohos.multimodalInput.inputDeviceCooperate EventMsg MSG_COOPERATE_STATE_ON = 500 新增
ohos.multimodalInput.inputDeviceCooperate EventMsg MSG_COOPERATE_INFO_FAIL = 202 新增
ohos.multimodalInput.inputDeviceCooperate EventMsg MSG_COOPERATE_INFO_SUCCESS = 201 新增
ohos.multimodalInput.inputDeviceCooperate EventMsg MSG_COOPERATE_INFO_START = 200 新增
ohos.multimodalInput.pointer pointer isPointerVisible(callback: AsyncCallback<boolean>): void;
isPointerVisible(): Promise<boolean>;
新增
ohos.multimodalInput.pointer pointer setPointerVisible(visible: boolean, callback: AsyncCallback<void>): void;
setPointerVisible(visible: boolean): Promise<void>;
新增
ohos.multimodalInput.pointer pointer getPointerStyle(windowId: number, callback: AsyncCallback<PointerStyle>): void;
getPointerStyle(windowId: number): Promise<PointerStyle>;
新增
ohos.multimodalInput.pointer pointer setPointerStyle(windowId: number, pointerStyle: PointerStyle, callback: AsyncCallback<void>): void;
setPointerStyle(windowId: number, pointerStyle: PointerStyle): Promise<void>;
新增
ohos.multimodalInput.pointer pointer getPointerSpeed(callback: AsyncCallback<number>): void;
getPointerSpeed(): Promise<number>;
新增
ohos.multimodalInput.pointer pointer setPointerSpeed(speed: number, callback: AsyncCallback<void>): void;
setPointerSpeed(speed: number): Promise<void>;
新增
ohos.multimodalInput.pointer PointerStyle MIDDLE_BTN_NORTH_SOUTH_WEST_EAST 新增
ohos.multimodalInput.pointer PointerStyle MIDDLE_BTN_SOUTH_WEST 新增
ohos.multimodalInput.pointer PointerStyle MIDDLE_BTN_SOUTH_EAST 新增
ohos.multimodalInput.pointer PointerStyle MIDDLE_BTN_NORTH_WEST 新增
ohos.multimodalInput.pointer PointerStyle MIDDLE_BTN_NORTH_EAST 新增
ohos.multimodalInput.pointer PointerStyle MIDDLE_BTN_NORTH_SOUTH 新增
ohos.multimodalInput.pointer PointerStyle MIDDLE_BTN_NORTH 新增
ohos.multimodalInput.pointer PointerStyle MIDDLE_BTN_SOUTH 新增
ohos.multimodalInput.pointer PointerStyle MIDDLE_BTN_WEST 新增
ohos.multimodalInput.pointer PointerStyle MIDDLE_BTN_EAST 新增
ohos.multimodalInput.pointer PointerStyle ZOOM_OUT 新增
ohos.multimodalInput.pointer PointerStyle ZOOM_IN 新增
ohos.multimodalInput.pointer PointerStyle TEXT_CURSOR 新增
ohos.multimodalInput.pointer PointerStyle SCREENSHOT_CURSOR 新增
ohos.multimodalInput.pointer PointerStyle SCREENSHOT_CHOOSE 新增
ohos.multimodalInput.pointer PointerStyle RESIZE_UP_DOWN 新增
ohos.multimodalInput.pointer PointerStyle RESIZE_LEFT_RIGHT 新增
ohos.multimodalInput.pointer PointerStyle MOVE 新增
ohos.multimodalInput.pointer PointerStyle HELP 新增
ohos.multimodalInput.pointer PointerStyle HAND_POINTING 新增
ohos.multimodalInput.pointer PointerStyle HAND_OPEN 新增
ohos.multimodalInput.pointer PointerStyle HAND_GRABBING 新增
ohos.multimodalInput.pointer PointerStyle COLOR_SUCKER 新增
ohos.multimodalInput.pointer PointerStyle CURSOR_FORBID 新增
ohos.multimodalInput.pointer PointerStyle CURSOR_COPY 新增
ohos.multimodalInput.pointer PointerStyle CROSS 新增
ohos.multimodalInput.pointer PointerStyle NORTH_WEST_SOUTH_EAST 新增
ohos.multimodalInput.pointer PointerStyle NORTH_EAST_SOUTH_WEST 新增
ohos.multimodalInput.pointer PointerStyle SOUTH_WEST 新增
ohos.multimodalInput.pointer PointerStyle SOUTH_EAST 新增
ohos.multimodalInput.pointer PointerStyle NORTH_WEST 新增
ohos.multimodalInput.pointer PointerStyle NORTH_EAST 新增
ohos.multimodalInput.pointer PointerStyle NORTH_SOUTH 新增
ohos.multimodalInput.pointer PointerStyle WEST_EAST 新增
ohos.multimodalInput.pointer PointerStyle NORTH 新增
ohos.multimodalInput.pointer PointerStyle SOUTH 新增
ohos.multimodalInput.pointer PointerStyle WEST 新增
ohos.multimodalInput.pointer PointerStyle EAST 新增
ohos.multimodalInput.pointer PointerStyle DEFAULT 新增

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Readme

harmony 鸿蒙元能力子系统JS API变更

harmony 鸿蒙无障碍子系统JS API变更

harmony 鸿蒙帐号子系统JS API变更

harmony 鸿蒙ArkUI子系统JS API变更

harmony 鸿蒙电源服务子系统JS API变更

harmony 鸿蒙包管理子系统JS API变更

harmony 鸿蒙基础通信子系统JS API变更

harmony 鸿蒙公共基础库子系统JS API变更

harmony 鸿蒙DFX子系统JS API变更

0  赞