1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use crate::*;
extern_class!(
/// A
/// `GCGearShifterElement`object represents an attached gear shifter. Both
/// pattern and sequential gear shifters are supported.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcgearshifterelement?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct GCGearShifterElement;
);
#[cfg(feature = "GCPhysicalInputElement")]
extern_conformance!(
unsafe impl GCPhysicalInputElement for GCGearShifterElement {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for GCGearShifterElement {}
);
impl GCGearShifterElement {
extern_methods!(
#[cfg(feature = "GCSwitchPositionInput")]
/// Get the input reporting the position of the pattern gear shifter. If this
/// property is
/// `nil,`the gear shifter is not a pattern gear shifter.
///
/// In the returned input, a position of
/// `-1`corresponds to the "reverse gear".
/// A position of
/// `0`corresponds to the neutral gear.
#[unsafe(method(patternInput))]
#[unsafe(method_family = none)]
pub unsafe fn patternInput(
&self,
) -> Option<Retained<ProtocolObject<dyn GCSwitchPositionInput>>>;
#[cfg(feature = "GCRelativeInput")]
/// Get the input reporting changes to the sequential gear shifter. If this
/// property is
/// `nil,`the gear shifter is not a sequential gear shifter.
#[unsafe(method(sequentialInput))]
#[unsafe(method_family = none)]
pub unsafe fn sequentialInput(
&self,
) -> Option<Retained<ProtocolObject<dyn GCRelativeInput>>>;
);
}
/// Methods declared on superclass `NSObject`.
impl GCGearShifterElement {
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>;
);
}