objc2_game_controller/generated/GCSwitchElement.rs
1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5
6use crate::*;
7
8extern_protocol!(
9 /// An object conforming to
10 /// `GCSwitchElement`represents a latching switch.
11 /// A switch may be in one of several positions, and remains in its last position
12 /// after the user stops interacting with it.
13 ///
14 /// See also [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcswitchelement?language=objc)
15 #[cfg(feature = "GCPhysicalInputElement")]
16 pub unsafe trait GCSwitchElement: GCPhysicalInputElement {
17 #[cfg(feature = "GCSwitchPositionInput")]
18 /// Get the input containing the absolute position of the switch.
19 #[unsafe(method(positionInput))]
20 #[unsafe(method_family = none)]
21 unsafe fn positionInput(&self) -> Retained<ProtocolObject<dyn GCSwitchPositionInput>>;
22 }
23);