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
//! 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
/// `GCButtonElement`represents a momentary switch,
/// such as a push button. A button's input only asserts while the user is
/// interacting with it, and then returns to a preferred state (not pressed, not
/// touched).
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/gamecontroller/gcbuttonelement?language=objc)
#[cfg(feature = "GCPhysicalInputElement")]
pub unsafe trait GCButtonElement: GCPhysicalInputElement {
#[cfg(all(feature = "GCLinearInput", feature = "GCPressedStateInput"))]
/// Get the input containing the pressed state of the button.
#[unsafe(method(pressedInput))]
#[unsafe(method_family = none)]
unsafe fn pressedInput(
&self,
) -> Retained<AnyObject /* GCPressedStateInput+ GCLinearInput */>;
#[cfg(feature = "GCTouchedStateInput")]
/// Get the input containing the touched state of the button.
///
/// Some buttons feature capacitive touch capabilities where the user can touch the
/// button without pressing it.
#[unsafe(method(touchedInput))]
#[unsafe(method_family = none)]
unsafe fn touchedInput(&self) -> Option<Retained<ProtocolObject<dyn GCTouchedStateInput>>>;
#[cfg(feature = "GCLinearInput")]
/// Get the input containing the measured force applied to the button.
///
/// Some buttons feature load cells (also known as button force transducers)
/// capable of measuring applied mechanical force.
#[unsafe(method(forceInput))]
#[unsafe(method_family = none)]
unsafe fn forceInput(&self) -> Option<Retained<ProtocolObject<dyn GCLinearInput>>>;
}
);