pub struct MouseSynchronousProxy { /* private fields */ }
Implementations§
source§impl MouseSynchronousProxy
impl MouseSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
sourcepub fn wait_for_event(&self, deadline: Time) -> Result<MouseEvent, Error>
pub fn wait_for_event(&self, deadline: Time) -> Result<MouseEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
sourcepub fn add_device(&self, ___deadline: Time) -> Result<u32, Error>
pub fn add_device(&self, ___deadline: Time) -> Result<u32, Error>
Add a new device for testing.
sourcepub fn send_input_report(
&self,
device_id: u32,
report: MouseInputReport,
event_time: u64,
___deadline: Time
) -> Result<MouseSendInputReportResult, Error>
pub fn send_input_report( &self, device_id: u32, report: MouseInputReport, event_time: u64, ___deadline: Time ) -> Result<MouseSendInputReportResult, Error>
Send input report to specified device. Returning empty tuple will block
the caller until the input report is dispatched. event_time
used as
the timestamp in the InputReport
, it doesn’t change the timing of
when the report is dispatched to the input pipeline.