Input_DeviceListener
typedef struct Input_DeviceListener {...} Input_DeviceListener
Overview
Defines a listener for device hot swap events.
Since: 13
Related module: input
Header file: oh_input_manager.h
Summary
Member Variables
| Name | Description |
|---|---|
| Input_DeviceAddedCallback deviceAddedCallback | Defines a callback used to receive device hot-plug events. |
| Input_DeviceRemovedCallback deviceRemovedCallback | Defines a callback used to receive device hot-unplug events. |
Member Functions
| Name | typedef Keyword | Description |
|---|---|---|
| typedef void (*Input_DeviceAddedCallback)(int32_t deviceId) | Input_DeviceAddedCallback() | Callback used to receive input device hot-plug events. |
| typedef void (*Input_DeviceRemovedCallback)(int32_t deviceId) | Input_DeviceRemovedCallback() | Callback used to receive input device hot-unplug events. |
Member Function Description
Input_DeviceAddedCallback()
typedef void (*Input_DeviceAddedCallback)(int32_t deviceId)
Description
Callback used to receive input device hot-plug events.
Since: 13
Parameters
| Parameter | Description |
|---|---|
| int32_t deviceId | Unique ID of the input device. If a physical device is repeatedly plugged and unplugged or restarted, its ID may change. |
Input_DeviceRemovedCallback()
typedef void (*Input_DeviceRemovedCallback)(int32_t deviceId)
Description
Callback used to receive input device hot-unplug events.
Since: 13
Parameters
| Parameter | Description |
|---|---|
| int32_t deviceId | Unique ID of the input device. If a physical device is repeatedly plugged and unplugged or restarted, its ID may change. |
你可能感兴趣的鸿蒙文章
openharmony 鸿蒙 capi-input-input-cursorinfo
openharmony 鸿蒙 js-apis-inputevent
openharmony 鸿蒙 js-apis-infraredemitter
openharmony 鸿蒙 js-apis-inputeventclient-sys
openharmony 鸿蒙 capi-input-input-keystate
openharmony 鸿蒙 js-apis-keycode
openharmony 鸿蒙 capi-input-input-axisevent
openharmony 鸿蒙 js-apis-pointer-sys