pub struct WinitPointer {
    pointer: ThemedPointer,
    pointer_constraints: Option<Attached<ZwpPointerConstraintsV1>>,
    confined_pointer: Weak<RefCell<Option<ZwpConfinedPointerV1>>>,
    locked_pointer: Weak<RefCell<Option<ZwpLockedPointerV1>>>,
    latest_serial: Rc<Cell<u32>>,
    latest_enter_serial: Rc<Cell<u32>>,
    seat: WlSeat,
}
Expand description

A proxy to Wayland pointer, which serves requests from a WindowHandle.

Fields§

§pointer: ThemedPointer§pointer_constraints: Option<Attached<ZwpPointerConstraintsV1>>

Create confined pointers.

§confined_pointer: Weak<RefCell<Option<ZwpConfinedPointerV1>>>

Cursor to handle confine requests.

§locked_pointer: Weak<RefCell<Option<ZwpLockedPointerV1>>>

Cursor to handle locked requests.

§latest_serial: Rc<Cell<u32>>

Latest observed serial in pointer events. used by Window::start_interactive_move()

§latest_enter_serial: Rc<Cell<u32>>

Latest observed serial in pointer enter events. used by Window::set_cursor()

§seat: WlSeat

Seat.

Implementations§

source§

impl WinitPointer

source

pub fn set_cursor(&self, cursor_icon: Option<CursorIcon>)

Set the cursor icon.

Providing None will hide the cursor.

source

pub fn confine(&self, surface: &WlSurface)

Confine the pointer to a surface.

source

pub fn unconfine(&self)

Tries to unconfine the pointer if the current pointer is confined.

source

pub fn lock(&self, surface: &WlSurface)

source

pub fn unlock(&self)

source

pub fn set_cursor_position(&self, surface_x: u32, surface_y: u32)

source

pub fn drag_window(&self, window: &Window<AdwaitaFrame>)

Trait Implementations§

source§

impl PartialEq<WinitPointer> for WinitPointer

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for WinitPointer

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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, U> Into<U> for Twhere 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, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.