Loading...
Searching...
No Matches
CAPI_GamepadEvent.h
Go to the documentation of this file.
1/**************************************************************************************************
2 * This file is a part of Ultralight. *
3 * *
4 * See <https://ultralig.ht> for licensing and more. *
5 * *
6 * (C) 2024 Ultralight, Inc. *
7 **************************************************************************************************/
8
9///
10/// @file CAPI_GamepadEvent.h
11///
12/// Gamepad event interface.
13///
14/// `#include <Ultralight/CAPI/CAPI_GamepadEvent.h>`
15///
16/// This file defines the C API for gamepad events.
17///
18/// @see ulFireGamepadEvent
19///
20#ifndef ULTRALIGHT_CAPI_GAMEPADEVENT_H
21#define ULTRALIGHT_CAPI_GAMEPADEVENT_H
22
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29/******************************************************************************
30 * Gamepad Event
31 *****************************************************************************/
32
33///
34/// Create a gamepad event, see GamepadEvent for help using this function.
35///
37
38///
39/// Destroy a gamepad event.
40///
42
43/******************************************************************************
44 * Gamepad Axis Event
45 *****************************************************************************/
46
47///
48/// Create a gamepad axis event, see GamepadAxisEvent for help using this function.
49///
50ULExport ULGamepadAxisEvent ulCreateGamepadAxisEvent(unsigned int index, unsigned int axis_index,
51 double value);
52
53///
54/// Destroy a gamepad axis event.
55///
57
58/******************************************************************************
59 * Gamepad Button Event
60 *****************************************************************************/
61
62///
63/// Create a gamepad button event, see GamepadButtonEvent for help using this function.
64///
66 unsigned int button_index, double value);
67
68///
69/// Destroy a gamepad button event.
70///
72
73#ifdef __cplusplus
74} // extern "C"
75#endif
76
77#endif // ULTRALIGHT_CAPI_GAMEPADEVENT_H
Various defines and utility functions for the C API.
struct C_GamepadButtonEvent * ULGamepadButtonEvent
Definition CAPI_Defines.h:72
ULGamepadEventType
Definition CAPI_Defines.h:218
#define ULExport
Definition CAPI_Defines.h:38
struct C_GamepadAxisEvent * ULGamepadAxisEvent
Definition CAPI_Defines.h:71
struct C_GamepadEvent * ULGamepadEvent
Definition CAPI_Defines.h:70
ULExport void ulDestroyGamepadButtonEvent(ULGamepadButtonEvent evt)
Destroy a gamepad button event.
ULExport ULGamepadAxisEvent ulCreateGamepadAxisEvent(unsigned int index, unsigned int axis_index, double value)
Create a gamepad axis event, see GamepadAxisEvent for help using this function.
ULExport ULGamepadButtonEvent ulCreateGamepadButtonEvent(unsigned int index, unsigned int button_index, double value)
Create a gamepad button event, see GamepadButtonEvent for help using this function.
ULExport void ulDestroyGamepadEvent(ULGamepadEvent evt)
Destroy a gamepad event.
ULExport void ulDestroyGamepadAxisEvent(ULGamepadAxisEvent evt)
Destroy a gamepad axis event.
ULExport ULGamepadEvent ulCreateGamepadEvent(unsigned int index, ULGamepadEventType type)
Create a gamepad event, see GamepadEvent for help using this function.