ObjFW  Diff

Differences From Artifact [90ee305e31]:

To Artifact [174eaaf8eb]:


24
25
26
27
28
29
30






























































































































































31
32
33
34
35
36
37

/** @file */

@class OFArray OF_GENERIC(ObjectType);
@class OFMutableSet OF_GENERIC(ObjectType);
@class OFSet OF_GENERIC(ObjectType);































































































































































/**
 * @brief A class for reading state from a game controller.
 */
OF_SUBCLASSING_RESTRICTED
@interface OFGameController: OFObject
{
#ifdef OF_LINUX







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195

/** @file */

@class OFArray OF_GENERIC(ObjectType);
@class OFMutableSet OF_GENERIC(ObjectType);
@class OFSet OF_GENERIC(ObjectType);

/**
 * @brief A button on a controller.
 *
 * Possible values are:
 *
 *   * @ref OFGameControllerButtonA
 *   * @ref OFGameControllerButtonB
 *   * @ref OFGameControllerButtonC
 *   * @ref OFGameControllerButtonX
 *   * @ref OFGameControllerButtonY
 *   * @ref OFGameControllerButtonZ
 *   * @ref OFGameControllerButtonL
 *   * @ref OFGameControllerButtonR
 *   * @ref OFGameControllerButtonZL
 *   * @ref OFGameControllerButtonZR
 *   * @ref OFGameControllerButtonSelect
 *   * @ref OFGameControllerButtonStart
 *   * @ref OFGameControllerButtonHome
 *   * @ref OFGameControllerButtonLeftStick
 *   * @ref OFGameControllerButtonRightStick
 *   * @ref OFGameControllerButtonDPadUp
 *   * @ref OFGameControllerButtonDPadDown
 *   * @ref OFGameControllerButtonDPadLeft
 *   * @ref OFGameControllerButtonDPadRight
 *   * @ref OFGameControllerButtonCPadUp
 *   * @ref OFGameControllerButtonCPadDown
 *   * @ref OFGameControllerButtonCPadLeft
 *   * @ref OFGameControllerButtonCPadRight
 */
typedef OFConstantString *OFGameControllerButton;

#ifdef __cplusplus
extern "C" {
#endif
/**
 * @brief The A button on a game controller.
 */
extern const OFGameControllerButton OFGameControllerButtonA;

/**
 * @brief The B button on a game controller.
 */
extern const OFGameControllerButton OFGameControllerButtonB;

/**
 * @brief The C button on a game controller.
 */
extern const OFGameControllerButton OFGameControllerButtonC;

/**
 * @brief The X button on a game controller.
 */
extern const OFGameControllerButton OFGameControllerButtonX;

/**
 * @brief The Y button on a game controller.
 */
extern const OFGameControllerButton OFGameControllerButtonY;

/**
 * @brief The Z button on a game controller.
 */
extern const OFGameControllerButton OFGameControllerButtonZ;

/**
 * @brief The L button on a game controller.
 */
extern const OFGameControllerButton OFGameControllerButtonL;

/**
 * @brief The R button on a game controller.
 */
extern const OFGameControllerButton OFGameControllerButtonR;

/**
 * @brief The ZL button on a game controller.
 */
extern const OFGameControllerButton OFGameControllerButtonZL;

/**
 * @brief The ZR button on a game controller.
 */
extern const OFGameControllerButton OFGameControllerButtonZR;

/**
 * @brief The Select button on a game controller.
 */
extern const OFGameControllerButton OFGameControllerButtonSelect;

/**
 * @brief The Start button on a game controller.
 */
extern const OFGameControllerButton OFGameControllerButtonStart;

/**
 * @brief The Home button on a game controller.
 */
extern const OFGameControllerButton OFGameControllerButtonHome;

/**
 * @brief The Capture button on a game controller.
 */
extern const OFGameControllerButton OFGameControllerButtonCapture;

/**
 * @brief The left stick button (pressing the left stick) on a game controller.
 */
extern const OFGameControllerButton OFGameControllerButtonLeftStick;

/**
 * @brief The right stick button (pressing the right stick) on a game
 *	  controller.
 */
extern const OFGameControllerButton OFGameControllerButtonRightStick;

/**
 * @brief The D-Pad Up button on a game controller.
 */
extern const OFGameControllerButton OFGameControllerButtonDPadUp;

/**
 * @brief The D-Pad Down button on a game controller.
 */
extern const OFGameControllerButton OFGameControllerButtonDPadDown;

/**
 * @brief The D-Pad Left button on a game controller.
 */
extern const OFGameControllerButton OFGameControllerButtonDPadLeft;

/**
 * @brief The D-Pad Right button on a game controller.
 */
extern const OFGameControllerButton OFGameControllerButtonDPadRight;

/**
 * @brief The C-Pad Up button on a game controller.
 */
extern const OFGameControllerButton OFGameControllerButtonCPadUp;

/**
 * @brief The C-Pad Down button on a game controller.
 */
extern const OFGameControllerButton OFGameControllerButtonCPadDown;

/**
 * @brief The C-Pad Left button on a game controller.
 */
extern const OFGameControllerButton OFGameControllerButtonCPadLeft;

/**
 * @brief The C-Pad Right button on a game controller.
 */
extern const OFGameControllerButton OFGameControllerButtonCPadRight;
#ifdef __cplusplus
}
#endif

/**
 * @brief A class for reading state from a game controller.
 */
OF_SUBCLASSING_RESTRICTED
@interface OFGameController: OFObject
{
#ifdef OF_LINUX