#[repr(transparent)]pub struct GCSystemGestureState(pub NSInteger);
GCControllerElement
only.Expand description
Elements on a GCDevice can be used for system gestures. The system gesture state represents how input is handled in the app for a controller element that is bound to a system gesture.
the control of the app. If a user presses the Options button, the system gesture recognizer will run by default. If a long press is detected, input will not be forwarded to your app (your application won’t see the Options button was pressed at all). If a long press is not detected, input will be forwared to your app, with a delay.
If you do not want any delay in receiving input for this element, you have two options
- Set the preferred state of the element to GCSystemGestureStateAlwaysReceive. The system gesture recognize will run concurrently with input being sent to your app. This removes input delay, but can lead to system gestures being triggered simulatenously with in-app actions.
- Set the preferred state of the element to GCSystemGestureStateDisabled. This will disable the system gesture recognizer - your app will receive full control of the input for this element.
See: GCControllerElement.boundToSystemGesture
See: GCControllerElement.preferredSystemGestureState
See also Apple’s documentation
Tuple Fields§
§0: NSInteger
Implementations§
Source§impl GCSystemGestureState
impl GCSystemGestureState
Sourcepub const Enabled: Self
pub const Enabled: Self
System gesture recognizers will run before input is sent to app, this is the default state
Sourcepub const AlwaysReceive: Self
pub const AlwaysReceive: Self
Input is sent to app and processed by system gesture recognizers simultaneously
Trait Implementations§
Source§impl Clone for GCSystemGestureState
impl Clone for GCSystemGestureState
Source§fn clone(&self) -> GCSystemGestureState
fn clone(&self) -> GCSystemGestureState
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more