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
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern "C" {
/// The primary directional input surface for the directional gamepad
///
///
/// Note: Equivalent to microgamepad.dpad
///
///
/// Note: For the 2021 2nd generation Siri Remote, this represents touching anywhere on the entire touch surface - including the inner and outer rings.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputdirectionaldpad?language=objc)
pub static GCInputDirectionalDpad: &'static NSString;
}
extern "C" {
/// The button corresponding to pressing anywhere on the primary directional input surface for the directional gamepad
///
///
/// Note: Equivalent to microgamepad.buttonA
///
///
/// Note: For the 2021 2nd generation Siri Remote, this represents pressing anywhere the entire touch surface - including the inner and outer rings.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputdirectionaltouchsurfacebutton?language=objc)
pub static GCInputDirectionalTouchSurfaceButton: &'static NSString;
}
extern "C" {
/// An optional secondary directional input surface for the directional gamepad. This input is guaranteed to be an 8-way digital dpad with physical Up, Down, Left, Right butttons.
///
///
/// Note: For the 2021 2nd generation Siri Remote, this represents pressing on the outer ring of the touch surface.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputdirectionalcardinaldpad?language=objc)
pub static GCInputDirectionalCardinalDpad: &'static NSString;
}
extern "C" {
/// An optional button for the directional gamepad. This input represents the center button of the cardinal dpad.
///
///
/// Note: For the 2021 2nd generation Siri Remote, this represents pressing anywhere on the inner ring of the touch surface.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcinputdirectionalcenterbutton?language=objc)
pub static GCInputDirectionalCenterButton: &'static NSString;
}
extern_class!(
/// Directional Gamepad profile.
///
/// All controller profiles provide a base level of information about the controller they belong to. A directional gamepad
/// features a subset of the possible inputs on a micro gamepad. It guarantees:
/// - The gamepad does not support motion, meaning
/// - -[GCController motion] is always nil
/// - -[GCDirectionalGamepad allowsRotation] is always NO
///
/// Additionally, the gamepad may have a digital or analog dpad.
/// - -[GCDirectionalGamepad dpad].analog may be YES or NO
/// - If -[GCDirectionalGamepad dpad].analog is NO, then -[GCDirectionalGamepad reportsAbsoluteDpadValues] is always YES
///
/// A profile maps the hardware notion of a controller into a logical controller. One that a developer can design for
/// and depend on, no matter the underlying hardware. If your game supports GCMicroGamepad, but does not need
/// the motion and analog dpad functionality of GCMicroGamepad, be sure to add Directional Gamepad to your project's
/// supported Game Controller capabilities.
///
///
/// See: GCMicroGamepad
///
///
/// Note: If you want to use the additional functionality of GCDirectionalGamepad, you should set GCSupportsMultipleMicroGamepads to YES and handle microgamepad connections separately.
///
///
/// Note: This profile represents the 2021 2nd generation Siri Remote. Make sure you set GCSupportsMultipleMicroGamepads to YES to properly support the remote.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcdirectionalgamepad?language=objc)
#[unsafe(super(GCMicroGamepad, GCPhysicalInputProfile, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "GCMicroGamepad", feature = "GCPhysicalInputProfile"))]
pub struct GCDirectionalGamepad;
);
#[cfg(all(feature = "GCMicroGamepad", feature = "GCPhysicalInputProfile"))]
extern_conformance!(
unsafe impl NSObjectProtocol for GCDirectionalGamepad {}
);
#[cfg(all(feature = "GCMicroGamepad", feature = "GCPhysicalInputProfile"))]
impl GCDirectionalGamepad {
extern_methods!();
}
/// Methods declared on superclass `NSObject`.
#[cfg(all(feature = "GCMicroGamepad", feature = "GCPhysicalInputProfile"))]
impl GCDirectionalGamepad {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}