use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct GCControllerInputState;
);
#[cfg(feature = "GCDevicePhysicalInputState")]
extern_conformance!(
unsafe impl GCDevicePhysicalInputState for GCControllerInputState {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for GCControllerInputState {}
);
impl GCControllerInputState {
extern_methods!();
}
impl GCControllerInputState {
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(GCControllerInputState, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct GCControllerLiveInput;
);
#[cfg(all(
feature = "GCDevicePhysicalInput",
feature = "GCDevicePhysicalInputState"
))]
extern_conformance!(
unsafe impl GCDevicePhysicalInput for GCControllerLiveInput {}
);
#[cfg(feature = "GCDevicePhysicalInputState")]
extern_conformance!(
unsafe impl GCDevicePhysicalInputState for GCControllerLiveInput {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for GCControllerLiveInput {}
);
impl GCControllerLiveInput {
extern_methods!(
#[unsafe(method(unmappedInput))]
#[unsafe(method_family = none)]
pub unsafe fn unmappedInput(&self) -> Option<Retained<GCControllerLiveInput>>;
#[unsafe(method(capture))]
#[unsafe(method_family = none)]
pub unsafe fn capture(&self) -> Retained<GCControllerInputState>;
#[cfg(feature = "GCDevicePhysicalInputStateDiff")]
#[unsafe(method(nextInputState))]
#[unsafe(method_family = none)]
pub unsafe fn nextInputState(&self) -> Option<Retained<GCControllerInputState>>;
);
}
impl GCControllerLiveInput {
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>;
);
}