game_device_event.h
Overview
Defines APIs for game device events.
File to include: <GameControllerKit/game_device_event.h>
Library: libohgame_controller.z.so
System capability: SystemCapability.Game.GameController
Since: 21
Related module: GameController
Summary
Types
| Name | Description |
|---|---|
| typedef enum GameDevice_StatusChangedType GameDevice_StatusChangedType | Defines status change types of devices. |
| typedef enum GameDevice_DeviceType GameDevice_DeviceType | Defines device types. |
| typedef struct GameDevice_DeviceInfo GameDevice_DeviceInfo | Defines the device information. |
| typedef struct GameDevice_DeviceEvent GameDevice_DeviceEvent | Defines device status change events. |
| typedef void(*GameDevice_DeviceMonitorCallback) (const struct GameDevice_DeviceEvent *deviceEvent) | Defines the callback function used in OH_GameDevice_RegisterDeviceMonitor. The callback function is triggered when the device goes online or offline. |
Enumeration
| Name | Description |
|---|---|
| GameDevice_StatusChangedType { OFFLINE = 0, ONLINE = 1 } | Device status change types. |
| GameDevice_DeviceType { UNKNOWN = 0, GAME_PAD = 1 } | Device types. |
Functions
你可能感兴趣的鸿蒙文章
openharmony 鸿蒙 capi-game-device
openharmony 鸿蒙 capi-game-pad-event
openharmony 鸿蒙 capi-game-controller