1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_protocol!(
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcphysicalinputelementname?language=objc)
pub unsafe trait GCPhysicalInputElementName {}
);
extern_protocol!(
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcbuttonelementname?language=objc)
pub unsafe trait GCButtonElementName: GCPhysicalInputElementName {}
);
extern_protocol!(
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcaxiselementname?language=objc)
pub unsafe trait GCAxisElementName: GCPhysicalInputElementName {}
);
extern_protocol!(
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcswitchelementname?language=objc)
pub unsafe trait GCSwitchElementName: GCPhysicalInputElementName {}
);
extern_protocol!(
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcdirectionpadelementname?language=objc)
pub unsafe trait GCDirectionPadElementName: GCPhysicalInputElementName {}
);
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputelementname?language=objc)
// NS_TYPED_EXTENSIBLE_ENUM
pub type GCInputElementName = NSString;
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputbuttonname?language=objc)
// NS_TYPED_EXTENSIBLE_ENUM
pub type GCInputButtonName = NSString;
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputaxisname?language=objc)
// NS_TYPED_EXTENSIBLE_ENUM
pub type GCInputAxisName = NSString;
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputswitchname?language=objc)
// NS_TYPED_EXTENSIBLE_ENUM
pub type GCInputSwitchName = NSString;
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputdirectionpadname?language=objc)
// NS_TYPED_EXTENSIBLE_ENUM
pub type GCInputDirectionPadName = NSString;
extern "C" {
/// A set of commonly used strings that can be used to access controller buttons
///
///
/// See: GCController.h
///
/// See: GCPhysicalInputProfile.h
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputbuttona?language=objc)
pub static GCInputButtonA: Option<&'static GCInputButtonName>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputbuttonb?language=objc)
pub static GCInputButtonB: Option<&'static GCInputButtonName>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputbuttonx?language=objc)
pub static GCInputButtonX: Option<&'static GCInputButtonName>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputbuttony?language=objc)
pub static GCInputButtonY: Option<&'static GCInputButtonName>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputdirectionpad?language=objc)
pub static GCInputDirectionPad: Option<&'static GCInputDirectionPadName>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputthumbstick?language=objc)
pub static GCInputThumbstick: Option<&'static GCInputDirectionPadName>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputleftthumbstick?language=objc)
pub static GCInputLeftThumbstick: Option<&'static GCInputDirectionPadName>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputrightthumbstick?language=objc)
pub static GCInputRightThumbstick: Option<&'static GCInputDirectionPadName>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputthumbstickbutton?language=objc)
pub static GCInputThumbstickButton: Option<&'static GCInputButtonName>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputleftthumbstickbutton?language=objc)
pub static GCInputLeftThumbstickButton: Option<&'static GCInputButtonName>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputrightthumbstickbutton?language=objc)
pub static GCInputRightThumbstickButton: Option<&'static GCInputButtonName>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputgripbutton?language=objc)
pub static GCInputGripButton: Option<&'static GCInputButtonName>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputleftshoulder?language=objc)
pub static GCInputLeftShoulder: Option<&'static GCInputButtonName>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputrightshoulder?language=objc)
pub static GCInputRightShoulder: Option<&'static GCInputButtonName>;
}
extern "C" {
/// Identifies the button element located at the top-left/right of a gamepad,
/// between the left/right shoulder button and the gamepad's horizontal center.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputleftbumper?language=objc)
pub static GCInputLeftBumper: Option<&'static GCInputButtonName>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputrightbumper?language=objc)
pub static GCInputRightBumper: Option<&'static GCInputButtonName>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputtrigger?language=objc)
pub static GCInputTrigger: Option<&'static GCInputButtonName>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputlefttrigger?language=objc)
pub static GCInputLeftTrigger: Option<&'static GCInputButtonName>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputrighttrigger?language=objc)
pub static GCInputRightTrigger: Option<&'static GCInputButtonName>;
}
#[inline]
pub unsafe extern "C-unwind" fn GCInputBackLeftButton(
position: NSInteger,
) -> Option<Retained<GCInputButtonName>> {
extern "C-unwind" {
fn GCInputBackLeftButton(position: NSInteger) -> *mut GCInputButtonName;
}
let ret = unsafe { GCInputBackLeftButton(position) };
unsafe { Retained::retain_autoreleased(ret) }
}
#[inline]
pub unsafe extern "C-unwind" fn GCInputBackRightButton(
position: NSInteger,
) -> Option<Retained<GCInputButtonName>> {
extern "C-unwind" {
fn GCInputBackRightButton(position: NSInteger) -> *mut GCInputButtonName;
}
let ret = unsafe { GCInputBackRightButton(position) };
unsafe { Retained::retain_autoreleased(ret) }
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputbuttonhome?language=objc)
pub static GCInputButtonHome: Option<&'static GCInputButtonName>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputbuttonmenu?language=objc)
pub static GCInputButtonMenu: Option<&'static GCInputButtonName>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputbuttonoptions?language=objc)
pub static GCInputButtonOptions: Option<&'static GCInputButtonName>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputbuttonshare?language=objc)
pub static GCInputButtonShare: Option<&'static GCInputButtonName>;
}
extern "C" {
/// A set of strings commonly used to access Xbox buttons
///
///
/// See: GCController.h
///
/// See: GCPhysicalInputProfile.h
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputxboxpaddleone?language=objc)
pub static GCInputXboxPaddleOne: Option<&'static GCInputButtonName>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputxboxpaddletwo?language=objc)
pub static GCInputXboxPaddleTwo: Option<&'static GCInputButtonName>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputxboxpaddlethree?language=objc)
pub static GCInputXboxPaddleThree: Option<&'static GCInputButtonName>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputxboxpaddlefour?language=objc)
pub static GCInputXboxPaddleFour: Option<&'static GCInputButtonName>;
}
extern "C" {
/// A set of strings commonly used to access DualShock buttons
///
///
/// See: GCController.h
///
/// See: GCPhysicalInputProfile.h
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputdualshocktouchpadone?language=objc)
pub static GCInputDualShockTouchpadOne: Option<&'static GCInputDirectionPadName>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputdualshocktouchpadtwo?language=objc)
pub static GCInputDualShockTouchpadTwo: Option<&'static GCInputDirectionPadName>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputdualshocktouchpadbutton?language=objc)
pub static GCInputDualShockTouchpadButton: Option<&'static GCInputButtonName>;
}
extern "C" {
/// A set of strings commonly used by racing wheels.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputsteeringwheel?language=objc)
pub static GCInputSteeringWheel: Option<&'static GCInputAxisName>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputshifter?language=objc)
pub static GCInputShifter: Option<&'static GCInputElementName>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputpedalaccelerator?language=objc)
pub static GCInputPedalAccelerator: Option<&'static GCInputButtonName>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputpedalbrake?language=objc)
pub static GCInputPedalBrake: Option<&'static GCInputButtonName>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputpedalclutch?language=objc)
pub static GCInputPedalClutch: Option<&'static GCInputButtonName>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputleftpaddle?language=objc)
pub static GCInputLeftPaddle: Option<&'static GCInputButtonName>;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputrightpaddle?language=objc)
pub static GCInputRightPaddle: Option<&'static GCInputButtonName>;
}
/// Gets the name of an arcade button at a certain position.
#[inline]
pub unsafe extern "C-unwind" fn GCInputArcadeButtonName(
row: NSInteger,
column: NSInteger,
) -> Option<Retained<GCInputButtonName>> {
extern "C-unwind" {
fn GCInputArcadeButtonName(row: NSInteger, column: NSInteger) -> *mut GCInputButtonName;
}
let ret = unsafe { GCInputArcadeButtonName(row, column) };
unsafe { Retained::retain_autoreleased(ret) }
}
extern "C" {
/// The stylus tip button used to detect contact with a surface.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputstylustip?language=objc)
pub static GCInputStylusTip: Option<&'static GCInputButtonName>;
}
extern "C" {
/// The stylus button used for interacting with virtual objects.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputstylusprimarybutton?language=objc)
pub static GCInputStylusPrimaryButton: Option<&'static GCInputButtonName>;
}
extern "C" {
/// The stylus button used for drawing and writing in air.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputstylussecondarybutton?language=objc)
pub static GCInputStylusSecondaryButton: Option<&'static GCInputButtonName>;
}