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
//! 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_protocol!(
/// An object conforming to
/// `GCDirectionPadElement`represents a four-way
/// directional control element.
///
/// A direction pad element contains a common grouping of 2 axis inputs, which can
/// also be interpreted as 2 sets of mutually exclusive button pairs. Only one
/// button in each pair, {up, down} and {left, right}, can be pressed at any
/// given time.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcdirectionpadelement?language=objc)
#[cfg(feature = "GCPhysicalInputElement")]
pub unsafe trait GCDirectionPadElement: GCPhysicalInputElement {
#[cfg(feature = "GCAxis2DInput")]
/// The x,y position of the dpad input.
#[unsafe(method(xyAxes))]
#[unsafe(method_family = none)]
unsafe fn xyAxes(&self) -> Retained<ProtocolObject<dyn GCAxis2DInput>>;
#[cfg(feature = "GCAxisInput")]
/// The horizontal/x-component of the dpad input.
#[unsafe(method(xAxis))]
#[unsafe(method_family = none)]
unsafe fn xAxis(&self) -> Retained<ProtocolObject<dyn GCAxisInput>>;
#[cfg(feature = "GCAxisInput")]
/// The vertical/y-component of the dpad input.
#[unsafe(method(yAxis))]
#[unsafe(method_family = none)]
unsafe fn yAxis(&self) -> Retained<ProtocolObject<dyn GCAxisInput>>;
#[cfg(all(feature = "GCLinearInput", feature = "GCPressedStateInput"))]
/// The positive y-component of the dpad input.
#[unsafe(method(up))]
#[unsafe(method_family = none)]
unsafe fn up(&self) -> Retained<AnyObject /* GCLinearInput+ GCPressedStateInput */>;
#[cfg(all(feature = "GCLinearInput", feature = "GCPressedStateInput"))]
/// The negative y-component of the dpad input.
#[unsafe(method(down))]
#[unsafe(method_family = none)]
unsafe fn down(&self) -> Retained<AnyObject /* GCLinearInput+ GCPressedStateInput */>;
#[cfg(all(feature = "GCLinearInput", feature = "GCPressedStateInput"))]
/// The negative x-component of the dpad input.
#[unsafe(method(left))]
#[unsafe(method_family = none)]
unsafe fn left(&self) -> Retained<AnyObject /* GCLinearInput+ GCPressedStateInput */>;
#[cfg(all(feature = "GCLinearInput", feature = "GCPressedStateInput"))]
/// The positive x-component of the dpad input.
#[unsafe(method(right))]
#[unsafe(method_family = none)]
unsafe fn right(&self) -> Retained<AnyObject /* GCLinearInput+ GCPressedStateInput */>;
}
);