docs
Docs
C++ API
C API
Search API
Ctrl K
1.4
2.0
latest
1.4
Ultralight C API
1.4.0
Toggle main menu visibility
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
23
#include <
Ultralight/CAPI/CAPI_Defines.h
>
24
25
#ifdef __cplusplus
26
extern
"C"
{
27
#endif
28
29
/******************************************************************************
30
* Gamepad Event
31
*****************************************************************************/
32
33
///
34
/// Create a gamepad event, see GamepadEvent for help using this function.
35
///
36
ULExport
ULGamepadEvent
ulCreateGamepadEvent
(
unsigned
int
index,
ULGamepadEventType
type);
37
38
///
39
/// Destroy a gamepad event.
40
///
41
ULExport
void
ulDestroyGamepadEvent
(
ULGamepadEvent
evt);
42
43
/******************************************************************************
44
* Gamepad Axis Event
45
*****************************************************************************/
46
47
///
48
/// Create a gamepad axis event, see GamepadAxisEvent for help using this function.
49
///
50
ULExport
ULGamepadAxisEvent
ulCreateGamepadAxisEvent
(
unsigned
int
index,
unsigned
int
axis_index,
51
double
value);
52
53
///
54
/// Destroy a gamepad axis event.
55
///
56
ULExport
void
ulDestroyGamepadAxisEvent
(
ULGamepadAxisEvent
evt);
57
58
/******************************************************************************
59
* Gamepad Button Event
60
*****************************************************************************/
61
62
///
63
/// Create a gamepad button event, see GamepadButtonEvent for help using this function.
64
///
65
ULExport
ULGamepadButtonEvent
ulCreateGamepadButtonEvent
(
unsigned
int
index,
66
unsigned
int
button_index,
double
value);
67
68
///
69
/// Destroy a gamepad button event.
70
///
71
ULExport
void
ulDestroyGamepadButtonEvent
(
ULGamepadButtonEvent
evt);
72
73
#ifdef __cplusplus
74
}
// extern "C"
75
#endif
76
77
#endif
// ULTRALIGHT_CAPI_GAMEPADEVENT_H
CAPI_Defines.h
Various defines and utility functions for the C API.
ULGamepadButtonEvent
struct C_GamepadButtonEvent * ULGamepadButtonEvent
Definition
CAPI_Defines.h:72
ULGamepadEventType
ULGamepadEventType
Definition
CAPI_Defines.h:218
ULExport
#define ULExport
Definition
CAPI_Defines.h:38
ULGamepadAxisEvent
struct C_GamepadAxisEvent * ULGamepadAxisEvent
Definition
CAPI_Defines.h:71
ULGamepadEvent
struct C_GamepadEvent * ULGamepadEvent
Definition
CAPI_Defines.h:70
ulDestroyGamepadEvent
void ulDestroyGamepadEvent(ULGamepadEvent evt)
Destroy a gamepad event.
ulCreateGamepadButtonEvent
ULGamepadButtonEvent ulCreateGamepadButtonEvent(unsigned int index, unsigned int button_index, double value)
Create a gamepad button event, see GamepadButtonEvent for help using this function.
ulDestroyGamepadButtonEvent
void ulDestroyGamepadButtonEvent(ULGamepadButtonEvent evt)
Destroy a gamepad button event.
ulCreateGamepadEvent
ULGamepadEvent ulCreateGamepadEvent(unsigned int index, ULGamepadEventType type)
Create a gamepad event, see GamepadEvent for help using this function.
ulCreateGamepadAxisEvent
ULGamepadAxisEvent ulCreateGamepadAxisEvent(unsigned int index, unsigned int axis_index, double value)
Create a gamepad axis event, see GamepadAxisEvent for help using this function.
ulDestroyGamepadAxisEvent
void ulDestroyGamepadAxisEvent(ULGamepadAxisEvent evt)
Destroy a gamepad axis event.
Ultralight
CAPI
CAPI_GamepadEvent.h
Docs
C++ API
C API
Version
1.4
2.0
latest
1.4