harmony 鸿蒙InputManager

2022-08-09 浏览 (944)

InputManager

概述

提供Input设备管理相关的接口。

此类接口包含Input设备的扫描、打开和关闭、特定设备信息查询,以及所有设备列表信息获取等接口。

相关模块:

Input

汇总

Public 属性

名称描述
(* ScanInputDevice )(InputDevDesc *staArr, uint32_t arrLen)int32_t
Input服务用于扫描所有在线设备。
(* OpenInputDevice )(uint32_t devIndex)int32_t
Input服务打开对应设备的设备文件。
(* CloseInputDevice )(uint32_t devIndex)int32_t
Input服务关闭对应设备的设备文件。
(* GetInputDevice )(uint32_t devIndex, InputDeviceInfo **devInfo)int32_t
Input服务获取对应ID的设备信息。
(* GetInputDeviceList )(uint32_t *devNum, InputDeviceInfo **devList, uint32_t size)int32_t
Input服务获取所有Input设备列表的设备信息。

类成员变量说明

CloseInputDevice

int32_t(* InputManager::CloseInputDevice) (uint32_t devIndex)

描述:

Input服务关闭对应设备的设备文件。

参数:

名称描述
devIndex输入参数,Input设备索引,用于标志多个Input设备,取值从0开始,最多支持32个设备。

返回:

INPUT_SUCCESS 表示执行成功。

其他值表示执行失败,具体错误码查看RetStatus

GetInputDevice

int32_t(* InputManager::GetInputDevice) (uint32_t devIndex, InputDeviceInfo **devInfo)

描述:

Input服务获取对应ID的设备信息。

参数:

名称描述
devIndex输入参数,Input设备索引,用于标志多个Input设备,取值从0开始,最多支持32个设备。
devInfo输出参数,即devIndex对应的设备的设备信息,具体参考InputDeviceInfo

返回:

INPUT_SUCCESS 表示执行成功。

其他值表示执行失败,具体错误码查看RetStatus

GetInputDeviceList

int32_t(* InputManager::GetInputDeviceList) (uint32_t *devNum, InputDeviceInfo **devList, uint32_t size)

描述:

Input服务获取所有Input设备列表的设备信息。

参数:

名称描述
devNum输出参数,当前已经注册过的所有Input设备的总数。
devList输出参数,Input设备列表所对应的设备信息,具体参考InputDeviceInfo
size输入参数,即指定deviceList数组对应的元素个数。

返回:

INPUT_SUCCESS 表示执行成功。

其他值表示执行失败,具体错误码查看RetStatus

OpenInputDevice

int32_t(* InputManager::OpenInputDevice) (uint32_t devIndex)

描述:

Input服务打开对应设备的设备文件。

参数:

名称描述
devIndex输入参数,Input设备索引,用于标志多个Input设备,取值从0开始,最多支持32个设备。

返回:

INPUT_SUCCESS 表示执行成功。

其他值表示执行失败,具体错误码查看RetStatus

ScanInputDevice

int32_t(* InputManager::ScanInputDevice) (InputDevDesc *staArr, uint32_t arrLen)

描述:

Input服务用于扫描所有在线设备。

参数:

名称描述
staArr输出参数,存放Input设备扫描信息的数组,信息包含设备索引以及设备类型。
arrLen输入参数,staArr数组的长度信息。

返回:

INPUT_SUCCESS 表示执行成功。

其他值表示执行失败,具体错误码查看RetStatus

你可能感兴趣的鸿蒙文章

harmony 鸿蒙HDI 参数参考

harmony 鸿蒙ActRecognitionEvent

harmony 鸿蒙Activation

harmony 鸿蒙ActivityRecognitionTypes.idl

harmony 鸿蒙AddFusion

harmony 鸿蒙Alignment

harmony 鸿蒙AllocInfo

harmony 鸿蒙ApduSimIORequestInfo

harmony 鸿蒙ArgMaxFusion

harmony 鸿蒙Audio

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/85f87e34c20b40ceb0b57a046793377d