pub struct TouchHandler {
pub current_sequence_id: TouchSequenceId,
touch_sequence_map: FxHashMap<TouchSequenceId, TouchSequenceInfo>,
pub(crate) pending_touch_input_events: RefCell<FxHashMap<InputEventId, PendingTouchInputEvent>>,
}Fields§
§current_sequence_id: TouchSequenceId§touch_sequence_map: FxHashMap<TouchSequenceId, TouchSequenceInfo>§pending_touch_input_events: RefCell<FxHashMap<InputEventId, PendingTouchInputEvent>>A set of InputEventIds for touch events that have been sent to the Constellation
and have not been handled yet.
Implementations§
Source§impl TouchHandler
impl TouchHandler
pub fn new() -> Self
pub(crate) fn currently_in_touch_sequence(&self) -> bool
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 take_pending_touch_move_actions( &mut self, sequence_id: TouchSequenceId, ) -> Vec<ScrollZoomEvent>
pub(crate) fn remove_pending_touch_move_actions( &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 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 notify_new_frame_start(&mut self) -> Option<FlingAction>
pub fn on_touch_move( &mut self, id: TouchId, point: Point2D<f32, DevicePixel>, ) -> Option<ScrollZoomEvent>
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>, )
pub(crate) fn get_hit_test_result_cache_value( &self, ) -> Option<CompositorHitTestResult>
pub(crate) fn set_hit_test_result_cache_value( &mut self, value: CompositorHitTestResult, device_pixels_per_page: Scale<f32, CSSPixel, DevicePixel>, )
pub(crate) fn add_pending_touch_input_event( &self, id: InputEventId, event_type: TouchEventType, )
pub(crate) fn take_pending_touch_input_event( &self, id: InputEventId, ) -> Option<PendingTouchInputEvent>
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