pub struct InputSynchronousProxy { /* private fields */ }
Implementations§
Source§impl InputSynchronousProxy
impl InputSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<InputEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<InputEvent, 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 watch(
&self,
___deadline: MonotonicInstant,
) -> Result<InputSettings, Error>
pub fn watch( &self, ___deadline: MonotonicInstant, ) -> Result<InputSettings, Error>
Gets the current |InputSettings|. Returns immediately on first call; subsequent calls return when the value changes.
When any of the input devices’ states change, this will return the full InputSettings object, containing the states for all the available input devices on the target device.
To find the state of a specific input device, the devices vector contained in settings can be iterated through to find a specific DeviceType. If there are multiple devices of the same DeviceType, the InputDevice’s device_name can be examined in conjunction with the DeviceType to find the desired input device. Together, the device_name and DeviceType uniquely identify an InputDevice.
If this call fails, it is considered a fatal error and the channel will be closed.
Sourcepub fn set(
&self,
input_states: &[InputState],
___deadline: MonotonicInstant,
) -> Result<InputSetResult, Error>
pub fn set( &self, input_states: &[InputState], ___deadline: MonotonicInstant, ) -> Result<InputSetResult, Error>
Requests software input devices to set their software state. May not necessarily change the overall state of the device, depending on the hardware state. Will modify the software state of the existing device if a known device_name and device_type are passed. Otherwise it will add a new input device. Devices not included in input_states will not be modified.
Trait Implementations§
Source§impl Debug for InputSynchronousProxy
impl Debug for InputSynchronousProxy
Source§impl SynchronousProxy for InputSynchronousProxy
impl SynchronousProxy for InputSynchronousProxy
Source§type Proxy = InputProxy
type Proxy = InputProxy
Source§type Protocol = InputMarker
type Protocol = InputMarker
Proxy
controls.