pub struct TouchHandler { /* private fields */ }Expand description
Tracks touch contact state and turns wire contact updates into host touch events.
Implementations§
Source§impl TouchHandler
impl TouchHandler
pub fn new() -> Self
Sourcepub fn handle_contact(
&mut self,
contact_id: u8,
x: i32,
y: i32,
flags: TouchContactFlags,
transformer: &mut CoordinateTransformer,
) -> Result<Option<TouchEvent>>
pub fn handle_contact( &mut self, contact_id: u8, x: i32, y: i32, flags: TouchContactFlags, transformer: &mut CoordinateTransformer, ) -> Result<Option<TouchEvent>>
Process one contact update from an MS-RDPEI touch frame.
Returns Ok(None) for updates that don’t produce a host event
(hover-only motion, an illegal flag combination, or a position that
couldn’t be mapped to any stream) — none of these are propagated as
errors, since a single bad contact in a multi-touch frame must not
abort processing the rest of the frame’s contacts.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TouchHandler
impl RefUnwindSafe for TouchHandler
impl Send for TouchHandler
impl Sync for TouchHandler
impl Unpin for TouchHandler
impl UnsafeUnpin 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