objc2_game_controller/generated/
GCControllerInput.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 GCControllerInputState;
13);
14
15#[cfg(feature = "GCDevicePhysicalInputState")]
16unsafe impl GCDevicePhysicalInputState for GCControllerInputState {}
17
18unsafe impl NSObjectProtocol for GCControllerInputState {}
19
20impl GCControllerInputState {
21 extern_methods!();
22}
23
24impl GCControllerInputState {
26 extern_methods!(
27 #[unsafe(method(init))]
28 #[unsafe(method_family = init)]
29 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
30
31 #[unsafe(method(new))]
32 #[unsafe(method_family = new)]
33 pub unsafe fn new() -> Retained<Self>;
34 );
35}
36
37extern_class!(
38 #[unsafe(super(GCControllerInputState, NSObject))]
40 #[derive(Debug, PartialEq, Eq, Hash)]
41 pub struct GCControllerLiveInput;
42);
43
44#[cfg(all(
45 feature = "GCDevicePhysicalInput",
46 feature = "GCDevicePhysicalInputState"
47))]
48unsafe impl GCDevicePhysicalInput for GCControllerLiveInput {}
49
50#[cfg(feature = "GCDevicePhysicalInputState")]
51unsafe impl GCDevicePhysicalInputState for GCControllerLiveInput {}
52
53unsafe impl NSObjectProtocol for GCControllerLiveInput {}
54
55impl GCControllerLiveInput {
56 extern_methods!(
57 #[unsafe(method(unmappedInput))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn unmappedInput(&self) -> Option<Retained<GCControllerLiveInput>>;
69
70 #[unsafe(method(capture))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn capture(&self) -> Retained<GCControllerInputState>;
73
74 #[cfg(feature = "GCDevicePhysicalInputStateDiff")]
75 #[unsafe(method(nextInputState))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn nextInputState(&self) -> Option<Retained<GCControllerInputState>>;
78 );
79}
80
81impl GCControllerLiveInput {
83 extern_methods!(
84 #[unsafe(method(init))]
85 #[unsafe(method_family = init)]
86 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
87
88 #[unsafe(method(new))]
89 #[unsafe(method_family = new)]
90 pub unsafe fn new() -> Retained<Self>;
91 );
92}