pub struct TouchHandler {
pub current_sequence_id: TouchSequenceId,
touch_sequence_map: HashMap<TouchSequenceId, TouchSequenceInfo>,
}
Fields§
§current_sequence_id: TouchSequenceId
§touch_sequence_map: HashMap<TouchSequenceId, TouchSequenceInfo>
Implementations§
Source§impl TouchHandler
impl TouchHandler
pub fn new() -> Self
pub(crate) fn set_handling_touch_move( &mut self, sequence_id: TouchSequenceId, flag: bool, )
pub(crate) fn is_handling_touch_move( &self, sequence_id: TouchSequenceId, ) -> bool
pub(crate) fn prevent_click(&mut self, sequence_id: TouchSequenceId)
pub(crate) fn prevent_move(&mut self, sequence_id: TouchSequenceId)
Sourcepub(crate) fn move_allowed(&mut self, sequence_id: TouchSequenceId) -> bool
pub(crate) fn move_allowed(&mut self, sequence_id: TouchSequenceId) -> bool
Returns true if default move actions are allowed, false if prevented or the result is still pending.,
pub(crate) fn pending_touch_move_action( &mut self, sequence_id: TouchSequenceId, ) -> Option<TouchMoveAction>
pub(crate) fn remove_pending_touch_move_action( &mut self, sequence_id: TouchSequenceId, )
pub(crate) fn try_remove_touch_sequence(&mut self, sequence_id: TouchSequenceId)
pub(crate) fn remove_touch_sequence(&mut self, sequence_id: TouchSequenceId)
pub fn try_get_current_touch_sequence(&self) -> Option<&TouchSequenceInfo>
pub fn get_current_touch_sequence_mut(&mut self) -> &mut TouchSequenceInfo
fn try_get_current_touch_sequence_mut( &mut self, ) -> Option<&mut TouchSequenceInfo>
pub(crate) fn get_touch_sequence( &self, sequence_id: TouchSequenceId, ) -> &TouchSequenceInfo
pub(crate) fn get_touch_sequence_mut( &mut self, sequence_id: TouchSequenceId, ) -> Option<&mut TouchSequenceInfo>
pub fn on_touch_down(&mut self, id: TouchId, point: Point2D<f32, DevicePixel>)
pub fn on_vsync(&mut self) -> Option<FlingAction>
pub fn on_touch_move( &mut self, id: TouchId, point: Point2D<f32, DevicePixel>, ) -> TouchMoveAction
pub fn on_touch_up(&mut self, id: TouchId, point: Point2D<f32, DevicePixel>)
pub fn on_touch_cancel( &mut self, id: TouchId, _point: Point2D<f32, DevicePixel>, )
Auto Trait Implementations§
impl Freeze for TouchHandler
impl RefUnwindSafe for TouchHandler
impl Send for TouchHandler
impl Sync for TouchHandler
impl Unpin for TouchHandler
impl UnwindSafe for TouchHandler
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
Converts
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>
Converts
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 moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert