use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use crate::*;
#[cfg(all(
feature = "GCControllerElement",
feature = "GCPhysicalInputProfile",
feature = "block2"
))]
pub type GCExtendedGamepadValueChangedHandler =
*mut block2::DynBlock<dyn Fn(NonNull<GCExtendedGamepad>, NonNull<GCControllerElement>)>;
extern_class!(
#[unsafe(super(GCPhysicalInputProfile, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "GCPhysicalInputProfile")]
pub struct GCExtendedGamepad;
);
#[cfg(feature = "GCPhysicalInputProfile")]
extern_conformance!(
unsafe impl NSObjectProtocol for GCExtendedGamepad {}
);
#[cfg(feature = "GCPhysicalInputProfile")]
impl GCExtendedGamepad {
extern_methods!(
#[cfg(feature = "GCController")]
#[unsafe(method(controller))]
#[unsafe(method_family = none)]
pub unsafe fn controller(&self) -> Option<Retained<GCController>>;
#[cfg(all(feature = "GCControllerElement", feature = "block2"))]
#[unsafe(method(valueChangedHandler))]
#[unsafe(method_family = none)]
pub unsafe fn valueChangedHandler(&self) -> GCExtendedGamepadValueChangedHandler;
#[cfg(all(feature = "GCControllerElement", feature = "block2"))]
#[unsafe(method(setValueChangedHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn setValueChangedHandler(
&self,
value_changed_handler: GCExtendedGamepadValueChangedHandler,
);
#[cfg(feature = "GCExtendedGamepadSnapshot")]
#[deprecated = "Use the -[GCController capture] method instead"]
#[unsafe(method(saveSnapshot))]
#[unsafe(method_family = none)]
pub unsafe fn saveSnapshot(&self) -> Retained<GCExtendedGamepadSnapshot>;
#[cfg(all(feature = "GCControllerDirectionPad", feature = "GCControllerElement"))]
#[unsafe(method(dpad))]
#[unsafe(method_family = none)]
pub unsafe fn dpad(&self) -> Retained<GCControllerDirectionPad>;
#[cfg(all(feature = "GCControllerButtonInput", feature = "GCControllerElement"))]
#[unsafe(method(buttonA))]
#[unsafe(method_family = none)]
pub unsafe fn buttonA(&self) -> Retained<GCControllerButtonInput>;
#[cfg(all(feature = "GCControllerButtonInput", feature = "GCControllerElement"))]
#[unsafe(method(buttonB))]
#[unsafe(method_family = none)]
pub unsafe fn buttonB(&self) -> Retained<GCControllerButtonInput>;
#[cfg(all(feature = "GCControllerButtonInput", feature = "GCControllerElement"))]
#[unsafe(method(buttonX))]
#[unsafe(method_family = none)]
pub unsafe fn buttonX(&self) -> Retained<GCControllerButtonInput>;
#[cfg(all(feature = "GCControllerButtonInput", feature = "GCControllerElement"))]
#[unsafe(method(buttonY))]
#[unsafe(method_family = none)]
pub unsafe fn buttonY(&self) -> Retained<GCControllerButtonInput>;
#[cfg(all(feature = "GCControllerButtonInput", feature = "GCControllerElement"))]
#[unsafe(method(buttonMenu))]
#[unsafe(method_family = none)]
pub unsafe fn buttonMenu(&self) -> Retained<GCControllerButtonInput>;
#[cfg(all(feature = "GCControllerButtonInput", feature = "GCControllerElement"))]
#[unsafe(method(buttonOptions))]
#[unsafe(method_family = none)]
pub unsafe fn buttonOptions(&self) -> Option<Retained<GCControllerButtonInput>>;
#[cfg(all(feature = "GCControllerButtonInput", feature = "GCControllerElement"))]
#[unsafe(method(buttonHome))]
#[unsafe(method_family = none)]
pub unsafe fn buttonHome(&self) -> Option<Retained<GCControllerButtonInput>>;
#[cfg(all(feature = "GCControllerDirectionPad", feature = "GCControllerElement"))]
#[unsafe(method(leftThumbstick))]
#[unsafe(method_family = none)]
pub unsafe fn leftThumbstick(&self) -> Retained<GCControllerDirectionPad>;
#[cfg(all(feature = "GCControllerDirectionPad", feature = "GCControllerElement"))]
#[unsafe(method(rightThumbstick))]
#[unsafe(method_family = none)]
pub unsafe fn rightThumbstick(&self) -> Retained<GCControllerDirectionPad>;
#[cfg(all(feature = "GCControllerButtonInput", feature = "GCControllerElement"))]
#[unsafe(method(leftShoulder))]
#[unsafe(method_family = none)]
pub unsafe fn leftShoulder(&self) -> Retained<GCControllerButtonInput>;
#[cfg(all(feature = "GCControllerButtonInput", feature = "GCControllerElement"))]
#[unsafe(method(rightShoulder))]
#[unsafe(method_family = none)]
pub unsafe fn rightShoulder(&self) -> Retained<GCControllerButtonInput>;
#[cfg(all(feature = "GCControllerButtonInput", feature = "GCControllerElement"))]
#[unsafe(method(leftTrigger))]
#[unsafe(method_family = none)]
pub unsafe fn leftTrigger(&self) -> Retained<GCControllerButtonInput>;
#[cfg(all(feature = "GCControllerButtonInput", feature = "GCControllerElement"))]
#[unsafe(method(rightTrigger))]
#[unsafe(method_family = none)]
pub unsafe fn rightTrigger(&self) -> Retained<GCControllerButtonInput>;
#[cfg(all(feature = "GCControllerButtonInput", feature = "GCControllerElement"))]
#[unsafe(method(leftThumbstickButton))]
#[unsafe(method_family = none)]
pub unsafe fn leftThumbstickButton(&self) -> Option<Retained<GCControllerButtonInput>>;
#[cfg(all(feature = "GCControllerButtonInput", feature = "GCControllerElement"))]
#[unsafe(method(rightThumbstickButton))]
#[unsafe(method_family = none)]
pub unsafe fn rightThumbstickButton(&self) -> Option<Retained<GCControllerButtonInput>>;
#[unsafe(method(setStateFromExtendedGamepad:))]
#[unsafe(method_family = none)]
pub unsafe fn setStateFromExtendedGamepad(&self, extended_gamepad: &GCExtendedGamepad);
);
}
#[cfg(feature = "GCPhysicalInputProfile")]
impl GCExtendedGamepad {
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>;
);
}