pub struct LinuxTouchEventParser { /* private fields */ }Expand description
A state machine accepts uapi::input_event, produces fir::InputReport when (Touch Event.. + Sync Event) received.
This parser currently only supports “Type B” protocol in: https://www.kernel.org/doc/Documentation/input/multi-touch-protocol.txt
Each event report contains a sequence of packets (uapi::input_event). EV_EYN means the report is completed.
There may be multiple contacts inside the sequence of packets, each contact data started by a MT_SLOT event with slot_id.
In the initiated contact, slot (X) will include a ABS_MT_TRACKING_ID event. In following events in slot (X) will continue use the same TRACKING_ID. Slot (X) with TRACKING_ID (-1) means the contact is lifted.
Warning output, clean state and return errno when received events:
- unknown events type / code.
- “Type A” events: SYN_MT_REPORT.
- invalid event.
- not follow “Type B” pattern.
Implementations§
Trait Implementations§
Source§impl Debug for LinuxTouchEventParser
impl Debug for LinuxTouchEventParser
Source§impl Default for LinuxTouchEventParser
impl Default for LinuxTouchEventParser
Source§fn default() -> LinuxTouchEventParser
fn default() -> LinuxTouchEventParser
Returns the “default value” for a type. Read more
Source§impl PartialEq for LinuxTouchEventParser
impl PartialEq for LinuxTouchEventParser
impl StructuralPartialEq for LinuxTouchEventParser
Auto Trait Implementations§
impl Freeze for LinuxTouchEventParser
impl RefUnwindSafe for LinuxTouchEventParser
impl Send for LinuxTouchEventParser
impl Sync for LinuxTouchEventParser
impl Unpin for LinuxTouchEventParser
impl UnsafeUnpin for LinuxTouchEventParser
impl UnwindSafe for LinuxTouchEventParser
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
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
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 more