pub struct LinuxInputProvider { /* private fields */ }Expand description
XTest-backed InputProvider.
Implementations§
Source§impl LinuxInputProvider
impl LinuxInputProvider
Sourcepub fn new() -> Result<Self>
pub fn new() -> Result<Self>
Connect to $DISPLAY and initialise XTest state.
Returns Error::Unsupported if the session is Wayland-only
(WAYLAND_DISPLAY is set and DISPLAY is not). Returns
Error::Platform for any X protocol / connection failure.
Trait Implementations§
Source§impl InputProvider for LinuxInputProvider
impl InputProvider for LinuxInputProvider
Source§fn pointer_move(&self, to: Point) -> Result<()>
fn pointer_move(&self, to: Point) -> Result<()>
Move the pointer to
to without pressing any buttons.Source§fn pointer_down(&self, button: MouseButton) -> Result<()>
fn pointer_down(&self, button: MouseButton) -> Result<()>
Press
button at the current pointer location (no release).Source§fn pointer_up(&self, button: MouseButton) -> Result<()>
fn pointer_up(&self, button: MouseButton) -> Result<()>
Release
button at the current pointer location.Source§fn pointer_click(
&self,
at: Point,
button: MouseButton,
count: u32,
) -> Result<()>
fn pointer_click( &self, at: Point, button: MouseButton, count: u32, ) -> Result<()>
Click
button at at, repeated count times. The backend is
responsible for honouring the OS double-click interval when
count > 1 and for any platform-specific click-state bookkeeping
(e.g. kCGMouseEventClickState on macOS).Source§fn pointer_scroll(&self, at: Point, delta: ScrollDelta) -> Result<()>
fn pointer_scroll(&self, at: Point, delta: ScrollDelta) -> Result<()>
Scroll by
delta ticks at at.Auto Trait Implementations§
impl !Freeze for LinuxInputProvider
impl RefUnwindSafe for LinuxInputProvider
impl Send for LinuxInputProvider
impl Sync for LinuxInputProvider
impl Unpin for LinuxInputProvider
impl UnsafeUnpin for LinuxInputProvider
impl UnwindSafe for LinuxInputProvider
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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