pub struct MutterInput { /* private fields */ }Expand description
Mutter RemoteDesktop input backend.
Implementations§
Source§impl MutterInput
impl MutterInput
Sourcepub fn new(state: Arc<MutterState>) -> Self
pub fn new(state: Arc<MutterState>) -> Self
Create a new input backend from shared compositor state.
Trait Implementations§
Source§impl InputBackend for MutterInput
impl InputBackend for MutterInput
Source§fn press_keysym<'life0, 'life1, 'async_trait>(
&'life0 self,
keysym: u32,
cancel: &'life1 CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn press_keysym<'life0, 'life1, 'async_trait>(
&'life0 self,
keysym: u32,
cancel: &'life1 CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn key_down<'life0, 'life1, 'async_trait>(
&'life0 self,
keysym: u32,
_cancel: &'life1 CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn key_down<'life0, 'life1, 'async_trait>(
&'life0 self,
keysym: u32,
_cancel: &'life1 CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Press a key and hold it down until a corresponding
key_up fires. Used to build modifier combos — hold
Ctrl down across a target keystroke and release it afterward.Source§fn key_up<'life0, 'life1, 'async_trait>(
&'life0 self,
keysym: u32,
_cancel: &'life1 CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn key_up<'life0, 'life1, 'async_trait>(
&'life0 self,
keysym: u32,
_cancel: &'life1 CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Release a key that was previously pressed with
key_down. Safe to call on a key that isn’t held
(behavior is implementation-defined, but must not panic).Source§fn pointer_motion_relative<'life0, 'life1, 'async_trait>(
&'life0 self,
dx: f64,
dy: f64,
_cancel: &'life1 CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn pointer_motion_relative<'life0, 'life1, 'async_trait>(
&'life0 self,
dx: f64,
dy: f64,
_cancel: &'life1 CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Move the pointer by a relative offset in logical pixels.
Source§fn pointer_motion_absolute<'life0, 'life1, 'async_trait>(
&'life0 self,
x: f64,
y: f64,
_cancel: &'life1 CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn pointer_motion_absolute<'life0, 'life1, 'async_trait>(
&'life0 self,
x: f64,
y: f64,
_cancel: &'life1 CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Move the pointer to a screen-relative absolute position in logical
pixels. Implementations route through whatever channel their
compositor exposes (e.g.
NotifyPointerMotionAbsolute on mutter’s
RemoteDesktop). Backends with no active capture stream to address
should return Err.Press a pointer button and hold it down until a corresponding
pointer_button_up fires. The
PointerButton enum carries either one of the three named
buttons or a raw Linux evdev BTN_* code via Other(u32).
Used to build drag gestures — press, move the pointer across
intermediate coordinates, then release.Release a pointer button that was previously pressed with
pointer_button_down. Safe to call on
a button that isn’t held (behavior is implementation-defined, but
must not panic).Source§fn pointer_axis_discrete<'life0, 'life1, 'async_trait>(
&'life0 self,
axis: PointerAxis,
steps: i32,
cancel: &'life1 CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn pointer_axis_discrete<'life0, 'life1, 'async_trait>(
&'life0 self,
axis: PointerAxis,
steps: i32,
cancel: &'life1 CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Emit a discrete pointer-axis (wheel) event.
axis selects the
direction (PointerAxis::Vertical / Horizontal); steps is
the number of wheel detents; positive scrolls down / right,
negative scrolls up / left. Read morePress and release a pointer button. Default impl composes
pointer_button_down and
pointer_button_up with a short gap so
the compositor distinguishes press from release; backends with a
more efficient combined path can override. Read moreAuto Trait Implementations§
impl Freeze for MutterInput
impl !RefUnwindSafe for MutterInput
impl Send for MutterInput
impl Sync for MutterInput
impl Unpin for MutterInput
impl UnsafeUnpin for MutterInput
impl !UnwindSafe for MutterInput
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