objc2_game_controller/generated/GCAxisElement.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 /// [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcaxiselement?language=objc)
10 #[cfg(feature = "GCPhysicalInputElement")]
11 pub unsafe trait GCAxisElement: GCPhysicalInputElement {
12 #[cfg(feature = "GCAxisInput")]
13 /// The input reporting the value of the axis as the position between a lower and
14 /// upper bound, if available.
15 #[unsafe(method(absoluteInput))]
16 #[unsafe(method_family = none)]
17 unsafe fn absoluteInput(&self) -> Option<Retained<ProtocolObject<dyn GCAxisInput>>>;
18
19 #[cfg(feature = "GCRelativeInput")]
20 /// The input reporting axis values as the change (delta) since the last event.
21 ///
22 /// Certain kinds of axis elements are only able to report relative values. The
23 /// tracking of a computer mouse, for example, has no fixed origin - only the
24 /// change in position since the last event is reported. Some freely-rotating
25 /// dials may also only report a value indicating which direction the dial was
26 /// turned.
27 #[unsafe(method(relativeInput))]
28 #[unsafe(method_family = none)]
29 unsafe fn relativeInput(&self) -> Retained<ProtocolObject<dyn GCRelativeInput>>;
30 }
31);