pub struct TouchScreenEvent {
pub contacts: HashMap<PointerEventPhase, Vec<TouchContact>>,
pub injector_contacts: HashMap<EventPhase, Vec<TouchContact>>,
}
Expand description
A TouchScreenEvent
represents a set of contacts and the phase those contacts are in.
For example, when a user touches a touch screen with two fingers, there will be two
TouchContact
s. When a user removes one finger, there will still be two contacts
but one will be reported as removed.
The expected sequence for any given contact is:
fidl_fuchsia_ui_input::PointerEventPhase::Add
fidl_fuchsia_ui_input::PointerEventPhase::Down
- 0 or more
fidl_fuchsia_ui_input::PointerEventPhase::Move
fidl_fuchsia_ui_input::PointerEventPhase::Up
fidl_fuchsia_ui_input::PointerEventPhase::Remove
Additionally, a fidl_fuchsia_ui_input::PointerEventPhase::Cancel
may be sent at any time
signalling that the event is no longer directed towards the receiver.
Fields§
§contacts: HashMap<PointerEventPhase, Vec<TouchContact>>
Deprecated. To be removed with https://fxbug.dev/42155652.
The contacts associated with the touch event. For example, a two-finger touch would result
in one touch event with two TouchContact
s.
Contacts are grouped based on their current phase (e.g., down, move).
injector_contacts: HashMap<EventPhase, Vec<TouchContact>>
The contacts associated with the touch event. For example, a two-finger touch would result
in one touch event with two TouchContact
s.
Contacts are grouped based on their current phase (e.g., add, change).
Implementations§
Source§impl TouchScreenEvent
impl TouchScreenEvent
pub fn record_inspect(&self, node: &Node)
Trait Implementations§
Source§impl Clone for TouchScreenEvent
impl Clone for TouchScreenEvent
Source§fn clone(&self) -> TouchScreenEvent
fn clone(&self) -> TouchScreenEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for TouchScreenEvent
impl Debug for TouchScreenEvent
Source§impl PartialEq for TouchScreenEvent
impl PartialEq for TouchScreenEvent
impl StructuralPartialEq for TouchScreenEvent
Auto Trait Implementations§
impl Freeze for TouchScreenEvent
impl RefUnwindSafe for TouchScreenEvent
impl Send for TouchScreenEvent
impl Sync for TouchScreenEvent
impl Unpin for TouchScreenEvent
impl UnwindSafe for TouchScreenEvent
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
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
)