Struct zng_ext_input::touch::TouchConfig
source · pub struct TouchConfig {
pub tap_area: Size2D<Dip, Dip>,
pub double_tap_area: Size2D<Dip, Dip>,
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: Size2D<Dip, Dip>
Maximum (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: Size2D<Dip, Dip>
Maximum (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: Duration
Maximum 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: Duration
Maximum time between taps that generates a double click.
min_fling_velocity: Dip
Minimum velocity that can be considered a fling gesture, in dip per seconds.
max_fling_velocity: Dip
Fling 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§fn default() -> TouchConfig
fn default() -> TouchConfig
source§impl<'de> Deserialize<'de> for TouchConfig
impl<'de> Deserialize<'de> for TouchConfig
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TouchConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TouchConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for TouchConfig
impl PartialEq for TouchConfig
source§impl Serialize for TouchConfig
impl Serialize for TouchConfig
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Copy for TouchConfig
impl Eq for TouchConfig
impl StructuralPartialEq for TouchConfig
Auto Trait Implementations§
impl Freeze for TouchConfig
impl RefUnwindSafe for TouchConfig
impl Send for TouchConfig
impl Sync for TouchConfig
impl Unpin for TouchConfig
impl UnwindSafe for TouchConfig
Blanket Implementations§
source§impl<T> AnyVarValue for Twhere
T: VarValue,
impl<T> AnyVarValue for Twhere
T: VarValue,
source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
dyn Any
methods.source§fn clone_boxed(&self) -> Box<dyn AnyVarValue>
fn clone_boxed(&self) -> Box<dyn AnyVarValue>
source§fn clone_boxed_var(&self) -> Box<dyn AnyVar>
fn clone_boxed_var(&self) -> Box<dyn AnyVar>
LocalVar<Self>
.source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
self
equals other
.source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more