use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct GCRacingWheelInputState;
);
#[cfg(feature = "GCDevicePhysicalInputState")]
extern_conformance!(
unsafe impl GCDevicePhysicalInputState for GCRacingWheelInputState {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for GCRacingWheelInputState {}
);
impl GCRacingWheelInputState {
extern_methods!(
#[cfg(feature = "GCSteeringWheelElement")]
#[unsafe(method(wheel))]
#[unsafe(method_family = none)]
pub unsafe fn wheel(&self) -> Retained<GCSteeringWheelElement>;
#[cfg(all(feature = "GCButtonElement", feature = "GCPhysicalInputElement"))]
#[unsafe(method(acceleratorPedal))]
#[unsafe(method_family = none)]
pub unsafe fn acceleratorPedal(
&self,
) -> Option<Retained<ProtocolObject<dyn GCButtonElement>>>;
#[cfg(all(feature = "GCButtonElement", feature = "GCPhysicalInputElement"))]
#[unsafe(method(brakePedal))]
#[unsafe(method_family = none)]
pub unsafe fn brakePedal(&self) -> Option<Retained<ProtocolObject<dyn GCButtonElement>>>;
#[cfg(all(feature = "GCButtonElement", feature = "GCPhysicalInputElement"))]
#[unsafe(method(clutchPedal))]
#[unsafe(method_family = none)]
pub unsafe fn clutchPedal(&self) -> Option<Retained<ProtocolObject<dyn GCButtonElement>>>;
#[cfg(feature = "GCGearShifterElement")]
#[unsafe(method(shifter))]
#[unsafe(method_family = none)]
pub unsafe fn shifter(&self) -> Option<Retained<GCGearShifterElement>>;
);
}
impl GCRacingWheelInputState {
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>;
);
}
extern_class!(
#[unsafe(super(GCRacingWheelInputState, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct GCRacingWheelInput;
);
#[cfg(all(
feature = "GCDevicePhysicalInput",
feature = "GCDevicePhysicalInputState"
))]
extern_conformance!(
unsafe impl GCDevicePhysicalInput for GCRacingWheelInput {}
);
#[cfg(feature = "GCDevicePhysicalInputState")]
extern_conformance!(
unsafe impl GCDevicePhysicalInputState for GCRacingWheelInput {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for GCRacingWheelInput {}
);
impl GCRacingWheelInput {
extern_methods!(
#[unsafe(method(capture))]
#[unsafe(method_family = none)]
pub unsafe fn capture(&self) -> Retained<GCRacingWheelInputState>;
#[cfg(feature = "GCDevicePhysicalInputStateDiff")]
#[unsafe(method(nextInputState))]
#[unsafe(method_family = none)]
pub unsafe fn nextInputState(&self) -> Option<Retained<GCRacingWheelInputState>>;
);
}
impl GCRacingWheelInput {
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>;
);
}