Skip to main content

MutterInput

Struct MutterInput 

Source
pub struct MutterInput { /* private fields */ }
Expand description

Mutter RemoteDesktop input backend.

Implementations§

Source§

impl MutterInput

Source

pub fn new(state: Arc<MutterState>) -> Self

Create a new input backend from shared compositor state.

Trait Implementations§

Source§

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,

Press and release a single X11 keysym. Implementations handle any inter-event timing required by the transport. Equivalent to key_down immediately followed by key_up.
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,

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,

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,

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,

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.
Source§

fn pointer_button_down<'life0, 'life1, 'async_trait>( &'life0 self, button: PointerButton, _cancel: &'life1 CancellationToken, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

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.
Source§

fn pointer_button_up<'life0, 'life1, 'async_trait>( &'life0 self, button: PointerButton, cancel: &'life1 CancellationToken, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

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,

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 more
Source§

fn pointer_button<'life0, 'life1, 'async_trait>( &'life0 self, button: PointerButton, cancel: &'life1 CancellationToken, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Press 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 more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more