objc2_game_controller/generated/GCInputNames.rs
1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use objc2::__framework_prelude::*;
4use objc2_foundation::*;
5
6use crate::*;
7
8extern_protocol!(
9 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcphysicalinputelementname?language=objc)
10 pub unsafe trait GCPhysicalInputElementName {}
11);
12
13extern_protocol!(
14 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcbuttonelementname?language=objc)
15 pub unsafe trait GCButtonElementName: GCPhysicalInputElementName {}
16);
17
18extern_protocol!(
19 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcaxiselementname?language=objc)
20 pub unsafe trait GCAxisElementName: GCPhysicalInputElementName {}
21);
22
23extern_protocol!(
24 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcswitchelementname?language=objc)
25 pub unsafe trait GCSwitchElementName: GCPhysicalInputElementName {}
26);
27
28extern_protocol!(
29 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcdirectionpadelementname?language=objc)
30 pub unsafe trait GCDirectionPadElementName: GCPhysicalInputElementName {}
31);
32
33/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputelementname?language=objc)
34// NS_TYPED_EXTENSIBLE_ENUM
35pub type GCInputElementName = NSString;
36
37/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputbuttonname?language=objc)
38// NS_TYPED_EXTENSIBLE_ENUM
39pub type GCInputButtonName = NSString;
40
41/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputaxisname?language=objc)
42// NS_TYPED_EXTENSIBLE_ENUM
43pub type GCInputAxisName = NSString;
44
45/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputswitchname?language=objc)
46// NS_TYPED_EXTENSIBLE_ENUM
47pub type GCInputSwitchName = NSString;
48
49/// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputdirectionpadname?language=objc)
50// NS_TYPED_EXTENSIBLE_ENUM
51pub type GCInputDirectionPadName = NSString;
52
53extern "C" {
54 /// A set of commonly used strings that can be used to access controller buttons
55 ///
56 ///
57 /// See: GCController.h
58 ///
59 /// See: GCPhysicalInputProfile.h
60 ///
61 /// See also [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputbuttona?language=objc)
62 pub static GCInputButtonA: Option<&'static GCInputButtonName>;
63}
64
65extern "C" {
66 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputbuttonb?language=objc)
67 pub static GCInputButtonB: Option<&'static GCInputButtonName>;
68}
69
70extern "C" {
71 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputbuttonx?language=objc)
72 pub static GCInputButtonX: Option<&'static GCInputButtonName>;
73}
74
75extern "C" {
76 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputbuttony?language=objc)
77 pub static GCInputButtonY: Option<&'static GCInputButtonName>;
78}
79
80extern "C" {
81 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputdirectionpad?language=objc)
82 pub static GCInputDirectionPad: Option<&'static GCInputDirectionPadName>;
83}
84
85extern "C" {
86 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputthumbstick?language=objc)
87 pub static GCInputThumbstick: Option<&'static GCInputDirectionPadName>;
88}
89
90extern "C" {
91 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputleftthumbstick?language=objc)
92 pub static GCInputLeftThumbstick: Option<&'static GCInputDirectionPadName>;
93}
94
95extern "C" {
96 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputrightthumbstick?language=objc)
97 pub static GCInputRightThumbstick: Option<&'static GCInputDirectionPadName>;
98}
99
100extern "C" {
101 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputthumbstickbutton?language=objc)
102 pub static GCInputThumbstickButton: Option<&'static GCInputButtonName>;
103}
104
105extern "C" {
106 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputleftthumbstickbutton?language=objc)
107 pub static GCInputLeftThumbstickButton: Option<&'static GCInputButtonName>;
108}
109
110extern "C" {
111 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputrightthumbstickbutton?language=objc)
112 pub static GCInputRightThumbstickButton: Option<&'static GCInputButtonName>;
113}
114
115extern "C" {
116 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputgripbutton?language=objc)
117 pub static GCInputGripButton: Option<&'static GCInputButtonName>;
118}
119
120extern "C" {
121 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputleftshoulder?language=objc)
122 pub static GCInputLeftShoulder: Option<&'static GCInputButtonName>;
123}
124
125extern "C" {
126 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputrightshoulder?language=objc)
127 pub static GCInputRightShoulder: Option<&'static GCInputButtonName>;
128}
129
130extern "C" {
131 /// Identifies the button element located at the top-left/right of a gamepad,
132 /// between the left/right shoulder button and the gamepad's horizontal center.
133 ///
134 /// See also [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputleftbumper?language=objc)
135 pub static GCInputLeftBumper: Option<&'static GCInputButtonName>;
136}
137
138extern "C" {
139 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputrightbumper?language=objc)
140 pub static GCInputRightBumper: Option<&'static GCInputButtonName>;
141}
142
143extern "C" {
144 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputtrigger?language=objc)
145 pub static GCInputTrigger: Option<&'static GCInputButtonName>;
146}
147
148extern "C" {
149 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputlefttrigger?language=objc)
150 pub static GCInputLeftTrigger: Option<&'static GCInputButtonName>;
151}
152
153extern "C" {
154 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputrighttrigger?language=objc)
155 pub static GCInputRightTrigger: Option<&'static GCInputButtonName>;
156}
157
158#[inline]
159pub unsafe extern "C-unwind" fn GCInputBackLeftButton(
160 position: NSInteger,
161) -> Option<Retained<GCInputButtonName>> {
162 extern "C-unwind" {
163 fn GCInputBackLeftButton(position: NSInteger) -> *mut GCInputButtonName;
164 }
165 let ret = unsafe { GCInputBackLeftButton(position) };
166 unsafe { Retained::retain_autoreleased(ret) }
167}
168
169#[inline]
170pub unsafe extern "C-unwind" fn GCInputBackRightButton(
171 position: NSInteger,
172) -> Option<Retained<GCInputButtonName>> {
173 extern "C-unwind" {
174 fn GCInputBackRightButton(position: NSInteger) -> *mut GCInputButtonName;
175 }
176 let ret = unsafe { GCInputBackRightButton(position) };
177 unsafe { Retained::retain_autoreleased(ret) }
178}
179
180extern "C" {
181 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputbuttonhome?language=objc)
182 pub static GCInputButtonHome: Option<&'static GCInputButtonName>;
183}
184
185extern "C" {
186 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputbuttonmenu?language=objc)
187 pub static GCInputButtonMenu: Option<&'static GCInputButtonName>;
188}
189
190extern "C" {
191 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputbuttonoptions?language=objc)
192 pub static GCInputButtonOptions: Option<&'static GCInputButtonName>;
193}
194
195extern "C" {
196 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputbuttonshare?language=objc)
197 pub static GCInputButtonShare: Option<&'static GCInputButtonName>;
198}
199
200extern "C" {
201 /// A set of strings commonly used to access Xbox buttons
202 ///
203 ///
204 /// See: GCController.h
205 ///
206 /// See: GCPhysicalInputProfile.h
207 ///
208 /// See also [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputxboxpaddleone?language=objc)
209 pub static GCInputXboxPaddleOne: Option<&'static GCInputButtonName>;
210}
211
212extern "C" {
213 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputxboxpaddletwo?language=objc)
214 pub static GCInputXboxPaddleTwo: Option<&'static GCInputButtonName>;
215}
216
217extern "C" {
218 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputxboxpaddlethree?language=objc)
219 pub static GCInputXboxPaddleThree: Option<&'static GCInputButtonName>;
220}
221
222extern "C" {
223 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputxboxpaddlefour?language=objc)
224 pub static GCInputXboxPaddleFour: Option<&'static GCInputButtonName>;
225}
226
227extern "C" {
228 /// A set of strings commonly used to access DualShock buttons
229 ///
230 ///
231 /// See: GCController.h
232 ///
233 /// See: GCPhysicalInputProfile.h
234 ///
235 /// See also [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputdualshocktouchpadone?language=objc)
236 pub static GCInputDualShockTouchpadOne: Option<&'static GCInputDirectionPadName>;
237}
238
239extern "C" {
240 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputdualshocktouchpadtwo?language=objc)
241 pub static GCInputDualShockTouchpadTwo: Option<&'static GCInputDirectionPadName>;
242}
243
244extern "C" {
245 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputdualshocktouchpadbutton?language=objc)
246 pub static GCInputDualShockTouchpadButton: Option<&'static GCInputButtonName>;
247}
248
249extern "C" {
250 /// A set of strings commonly used by racing wheels.
251 ///
252 /// See also [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputsteeringwheel?language=objc)
253 pub static GCInputSteeringWheel: Option<&'static GCInputAxisName>;
254}
255
256extern "C" {
257 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputshifter?language=objc)
258 pub static GCInputShifter: Option<&'static GCInputElementName>;
259}
260
261extern "C" {
262 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputpedalaccelerator?language=objc)
263 pub static GCInputPedalAccelerator: Option<&'static GCInputButtonName>;
264}
265
266extern "C" {
267 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputpedalbrake?language=objc)
268 pub static GCInputPedalBrake: Option<&'static GCInputButtonName>;
269}
270
271extern "C" {
272 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputpedalclutch?language=objc)
273 pub static GCInputPedalClutch: Option<&'static GCInputButtonName>;
274}
275
276extern "C" {
277 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputleftpaddle?language=objc)
278 pub static GCInputLeftPaddle: Option<&'static GCInputButtonName>;
279}
280
281extern "C" {
282 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputrightpaddle?language=objc)
283 pub static GCInputRightPaddle: Option<&'static GCInputButtonName>;
284}
285
286/// Gets the name of an arcade button at a certain position.
287#[inline]
288pub unsafe extern "C-unwind" fn GCInputArcadeButtonName(
289 row: NSInteger,
290 column: NSInteger,
291) -> Option<Retained<GCInputButtonName>> {
292 extern "C-unwind" {
293 fn GCInputArcadeButtonName(row: NSInteger, column: NSInteger) -> *mut GCInputButtonName;
294 }
295 let ret = unsafe { GCInputArcadeButtonName(row, column) };
296 unsafe { Retained::retain_autoreleased(ret) }
297}
298
299extern "C" {
300 /// The stylus tip button used to detect contact with a surface.
301 ///
302 /// See also [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputstylustip?language=objc)
303 pub static GCInputStylusTip: Option<&'static GCInputButtonName>;
304}
305
306extern "C" {
307 /// The stylus button used for interacting with virtual objects.
308 ///
309 /// See also [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputstylusprimarybutton?language=objc)
310 pub static GCInputStylusPrimaryButton: Option<&'static GCInputButtonName>;
311}
312
313extern "C" {
314 /// The stylus button used for drawing and writing in air.
315 ///
316 /// See also [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputstylussecondarybutton?language=objc)
317 pub static GCInputStylusSecondaryButton: Option<&'static GCInputButtonName>;
318}