Struct zng_view_api::config::TouchConfig
source · pub struct TouchConfig {
pub tap_area: DipSize,
pub double_tap_area: DipSize,
pub tap_max_time: Duration,
pub double_tap_max_time: Duration,
pub min_fling_velocity: Dip,
pub max_fling_velocity: Dip,
}Expand description
System settings needed to implementing touch gestures.
Fields§
§tap_area: DipSizeMaximum (x, y) distance between a touch start and end that generates a touch click.
Area can be disregarded if the touch is not ambiguous. This usually defines the initial lag for a single finger drag gesture.
double_tap_area: DipSizeMaximum (x, y) distance that a subsequent touch click is linked with the previous one as a double click.
Area can be disregarded if the touch is not ambiguous.
tap_max_time: DurationMaximum time between start and end in the tap_area that generates a touch click.
Time can be disregarded if the touch is not ambiguous. This usually defines the long press delay.
double_tap_max_time: DurationMaximum time between taps that generates a double click.
min_fling_velocity: DipMinimum velocity that can be considered a fling gesture, in dip per seconds.
max_fling_velocity: DipFling velocity ceiling, in dip per seconds.
Trait Implementations§
source§impl Clone for TouchConfig
impl Clone for TouchConfig
source§fn clone(&self) -> TouchConfig
fn clone(&self) -> TouchConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for TouchConfig
impl Debug for TouchConfig
source§impl Default for TouchConfig
impl Default for TouchConfig
source§impl<'de> Deserialize<'de> for TouchConfig
impl<'de> Deserialize<'de> for TouchConfig
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for TouchConfig
impl PartialEq for TouchConfig
source§fn eq(&self, other: &TouchConfig) -> bool
fn eq(&self, other: &TouchConfig) -> bool
self and other values to be equal, and is used
by ==.