1 Star 0 Fork 4.9K

罗小黑 / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
InputManager.md 9.91 KB
一键复制 编辑 原始数据 按行查看 历史
wenjun 提交于 2020-09-08 10:08 . add OpenHarmony 1.0 baseline

InputManager

Overview

Related Modules:

Input

Description:

Provides interfaces for managing input devices.

The interfaces can be used to perform basic operations on the input devices, such as opening and closing the device files and querying information about the input device.

Summary

Data Fields

Variable Name

Description

OpenInputDevice )(uint32_t devIndex)

int32_t(* 

Opens a specified input device file.

CloseInputDevice )(uint32_t devIndex)

int32_t(* 

Closes a specified input device file.

GetInputDevice )(uint32_t devIndex, DeviceInfo **devInfo)

int32_t(* 

Gets information about a specified input device.

GetInputDeviceList )(uint32_t *devNum, DeviceInfo **devList, uint32_t size)

int32_t(* 

Gets information about all input devices in the device list.

Details

Field Documentation

CloseInputDevice

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

Description:

Closes a specified input device file.

Parameters:

Name

Description

devIndex Indicates the index of an input device. A maximum of 32 input devices are supported. The value ranges from 0 to 31, and value 0 represents the first input device.

Returns:

Returns 0 if the operation is successful; returns an error code defined in RetStatus otherwise.

GetInputDevice

int32_t(* InputManager::GetInputDevice) (uint32_t devIndex, [DeviceInfo](DeviceInfo.md) **devInfo)

Description:

Gets information about a specified input device.

Parameters:

Name

Description

devIndex Indicates the index of an input device. A maximum of 32 input devices are supported. The value ranges from 0 to 31, and value 0 represents the first input device.
devInfo Indicates the double pointer to information about the specified device. For details, see DeviceInfo.

Returns:

Returns 0 if the operation is successful; returns an error code defined in RetStatus otherwise.

GetInputDeviceList

int32_t(* InputManager::GetInputDeviceList) (uint32_t *devNum, [DeviceInfo](DeviceInfo.md) **devList, uint32_t size)

Description:

Gets information about all input devices in the device list.

Parameters:

Name

Description

devNum Indicates the pointer to the total number of input devices which have been registered.
devList Indicates the double pointer to information about all devices in the device list. For details, see DeviceInfo.
size Indicates the number of elements in the devList array.

Returns:

Returns 0 if the operation is successful; returns an error code defined in RetStatus otherwise.

OpenInputDevice

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

Description:

Opens a specified input device file.

Parameters:

Name

Description

devIndex Indicates the index of an input device. A maximum of 32 input devices are supported. The value ranges from 0 to 31, and value 0 represents the first input device.

Returns:

Returns 0 if the operation is successful; returns an error code defined in RetStatus otherwise.

1
https://gitee.com/lawguiren/docs.git
git@gitee.com:lawguiren/docs.git
lawguiren
docs
docs
master

搜索帮助