objc2_game_controller/generated/
GCRacingWheelInput.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5
6use crate::*;
7
8extern_class!(
9 #[unsafe(super(NSObject))]
11 #[derive(Debug, PartialEq, Eq, Hash)]
12 pub struct GCRacingWheelInputState;
13);
14
15#[cfg(feature = "GCDevicePhysicalInputState")]
16unsafe impl GCDevicePhysicalInputState for GCRacingWheelInputState {}
17
18unsafe impl NSObjectProtocol for GCRacingWheelInputState {}
19
20impl GCRacingWheelInputState {
21 extern_methods!(
22 #[cfg(feature = "GCSteeringWheelElement")]
23 #[unsafe(method(wheel))]
25 #[unsafe(method_family = none)]
26 pub unsafe fn wheel(&self) -> Retained<GCSteeringWheelElement>;
27
28 #[cfg(all(feature = "GCButtonElement", feature = "GCPhysicalInputElement"))]
29 #[unsafe(method(acceleratorPedal))]
30 #[unsafe(method_family = none)]
31 pub unsafe fn acceleratorPedal(
32 &self,
33 ) -> Option<Retained<ProtocolObject<dyn GCButtonElement>>>;
34
35 #[cfg(all(feature = "GCButtonElement", feature = "GCPhysicalInputElement"))]
36 #[unsafe(method(brakePedal))]
37 #[unsafe(method_family = none)]
38 pub unsafe fn brakePedal(&self) -> Option<Retained<ProtocolObject<dyn GCButtonElement>>>;
39
40 #[cfg(all(feature = "GCButtonElement", feature = "GCPhysicalInputElement"))]
41 #[unsafe(method(clutchPedal))]
42 #[unsafe(method_family = none)]
43 pub unsafe fn clutchPedal(&self) -> Option<Retained<ProtocolObject<dyn GCButtonElement>>>;
44
45 #[cfg(feature = "GCGearShifterElement")]
46 #[unsafe(method(shifter))]
54 #[unsafe(method_family = none)]
55 pub unsafe fn shifter(&self) -> Option<Retained<GCGearShifterElement>>;
56 );
57}
58
59impl GCRacingWheelInputState {
61 extern_methods!(
62 #[unsafe(method(init))]
63 #[unsafe(method_family = init)]
64 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
65
66 #[unsafe(method(new))]
67 #[unsafe(method_family = new)]
68 pub unsafe fn new() -> Retained<Self>;
69 );
70}
71
72extern_class!(
73 #[unsafe(super(GCRacingWheelInputState, NSObject))]
75 #[derive(Debug, PartialEq, Eq, Hash)]
76 pub struct GCRacingWheelInput;
77);
78
79#[cfg(all(
80 feature = "GCDevicePhysicalInput",
81 feature = "GCDevicePhysicalInputState"
82))]
83unsafe impl GCDevicePhysicalInput for GCRacingWheelInput {}
84
85#[cfg(feature = "GCDevicePhysicalInputState")]
86unsafe impl GCDevicePhysicalInputState for GCRacingWheelInput {}
87
88unsafe impl NSObjectProtocol for GCRacingWheelInput {}
89
90impl GCRacingWheelInput {
91 extern_methods!(
92 #[unsafe(method(capture))]
95 #[unsafe(method_family = none)]
96 pub unsafe fn capture(&self) -> Retained<GCRacingWheelInputState>;
97
98 #[cfg(feature = "GCDevicePhysicalInputStateDiff")]
99 #[unsafe(method(nextInputState))]
100 #[unsafe(method_family = none)]
101 pub unsafe fn nextInputState(&self) -> Option<Retained<GCRacingWheelInputState>>;
102 );
103}
104
105impl GCRacingWheelInput {
107 extern_methods!(
108 #[unsafe(method(init))]
109 #[unsafe(method_family = init)]
110 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
111
112 #[unsafe(method(new))]
113 #[unsafe(method_family = new)]
114 pub unsafe fn new() -> Retained<Self>;
115 );
116}