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")]
16extern_conformance!(
17 unsafe impl GCDevicePhysicalInputState for GCControllerInputState {}
18);
19
20extern_conformance!(
21 unsafe impl NSObjectProtocol for GCControllerInputState {}
22);
23
24impl GCControllerInputState {
25 extern_methods!();
26}
27
28impl GCControllerInputState {
30 extern_methods!(
31 #[unsafe(method(init))]
32 #[unsafe(method_family = init)]
33 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
34
35 #[unsafe(method(new))]
36 #[unsafe(method_family = new)]
37 pub unsafe fn new() -> Retained<Self>;
38 );
39}
40
41extern_class!(
42 #[unsafe(super(GCControllerInputState, NSObject))]
44 #[derive(Debug, PartialEq, Eq, Hash)]
45 pub struct GCControllerLiveInput;
46);
47
48#[cfg(all(
49 feature = "GCDevicePhysicalInput",
50 feature = "GCDevicePhysicalInputState"
51))]
52extern_conformance!(
53 unsafe impl GCDevicePhysicalInput for GCControllerLiveInput {}
54);
55
56#[cfg(feature = "GCDevicePhysicalInputState")]
57extern_conformance!(
58 unsafe impl GCDevicePhysicalInputState for GCControllerLiveInput {}
59);
60
61extern_conformance!(
62 unsafe impl NSObjectProtocol for GCControllerLiveInput {}
63);
64
65impl GCControllerLiveInput {
66 extern_methods!(
67 #[unsafe(method(unmappedInput))]
77 #[unsafe(method_family = none)]
78 pub unsafe fn unmappedInput(&self) -> Option<Retained<GCControllerLiveInput>>;
79
80 #[unsafe(method(capture))]
81 #[unsafe(method_family = none)]
82 pub unsafe fn capture(&self) -> Retained<GCControllerInputState>;
83
84 #[cfg(feature = "GCDevicePhysicalInputStateDiff")]
85 #[unsafe(method(nextInputState))]
86 #[unsafe(method_family = none)]
87 pub unsafe fn nextInputState(&self) -> Option<Retained<GCControllerInputState>>;
88 );
89}
90
91impl GCControllerLiveInput {
93 extern_methods!(
94 #[unsafe(method(init))]
95 #[unsafe(method_family = init)]
96 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
97
98 #[unsafe(method(new))]
99 #[unsafe(method_family = new)]
100 pub unsafe fn new() -> Retained<Self>;
101 );
102}