openharmony 鸿蒙 capi-input-input-devicelistener

2026-08-25 浏览 (1)

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

NameDescription
Input_DeviceAddedCallback deviceAddedCallbackDefines a callback used to receive device hot-plug events.
Input_DeviceRemovedCallback deviceRemovedCallbackDefines a callback used to receive device hot-unplug events.

Member Functions

Nametypedef KeywordDescription
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

ParameterDescription
int32_t deviceIdUnique 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

ParameterDescription
int32_t deviceIdUnique 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

openharmony 鸿蒙 js-apis-inputmonitor-sys

openharmony 鸿蒙 js-apis-multimodalinput-gestureevent

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