pub struct SlotWriter<'a>(/* private fields */);Expand description
Writes events to a selected multitouch slot.
Returned by EventWriter::slot.
Implementations§
Source§impl<'a> SlotWriter<'a>
impl<'a> SlotWriter<'a>
Sourcepub fn set_position(self, x: i32, y: i32) -> Result<Self>
pub fn set_position(self, x: i32, y: i32) -> Result<Self>
Sets the X and Y positions of this MT slot.
This will emit Abs::MT_POSITION_X and Abs::MT_POSITION_Y events.
Sourcepub fn set_tracking_id(self, id: i32) -> Result<Self>
pub fn set_tracking_id(self, id: i32) -> Result<Self>
Set the tracking ID of this MT slot.
Sourcepub fn write(self, events: &[InputEvent]) -> Result<Self>
pub fn write(self, events: &[InputEvent]) -> Result<Self>
Write raw events to the device.
Any ABS_MT_* events will be associated with this MT slot.
Sourcepub fn finish_slot(self) -> Result<EventWriter<'a>>
pub fn finish_slot(self) -> Result<EventWriter<'a>>
Finishes updating this multitouch slot and returns the original EventWriter.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for SlotWriter<'a>
impl<'a> RefUnwindSafe for SlotWriter<'a>
impl<'a> Send for SlotWriter<'a>
impl<'a> Sync for SlotWriter<'a>
impl<'a> Unpin for SlotWriter<'a>
impl<'a> UnwindSafe for SlotWriter<'a>
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