Struct wayland_protocols::wp::relative_pointer::zv1::server::zwp_relative_pointer_v1::ZwpRelativePointerV1
source · pub struct ZwpRelativePointerV1 { /* private fields */ }
Expand description
relative pointer object
A wp_relative_pointer object is an extension to the wl_pointer interface used for emitting relative pointer events. It shares the same focus as wl_pointer objects of the same seat and will only emit events when it has focus.
See also the Request enum for this interface.
Implementations§
source§impl ZwpRelativePointerV1
impl ZwpRelativePointerV1
sourcepub fn relative_motion(
&self,
utime_hi: u32,
utime_lo: u32,
dx: f64,
dy: f64,
dx_unaccel: f64,
dy_unaccel: f64,
)
pub fn relative_motion( &self, utime_hi: u32, utime_lo: u32, dx: f64, dy: f64, dx_unaccel: f64, dy_unaccel: f64, )
relative pointer motion
Relative x/y pointer motion from the pointer of the seat associated with this object.
A relative motion is in the same dimension as regular wl_pointer motion events, except they do not represent an absolute position. For example, moving a pointer from (x, y) to (x’, y’) would have the equivalent relative motion (x’ - x, y’ - y). If a pointer motion caused the absolute pointer position to be clipped by for example the edge of the monitor, the relative motion is unaffected by the clipping and will represent the unclipped motion.
This event also contains non-accelerated motion deltas. The non-accelerated delta is, when applicable, the regular pointer motion delta as it was before having applied motion acceleration and other transformations such as normalization.
Note that the non-accelerated delta does not represent ‘raw’ events as they were read from some device. Pointer motion acceleration is device- and configuration-specific and non-accelerated deltas and accelerated deltas may have the same value on some devices.
Relative motions are not coupled to wl_pointer.motion events, and can be sent in combination with such events, but also independently. There may also be scenarios where wl_pointer.motion is sent, but there is no relative motion. The order of an absolute and relative motion event originating from the same physical motion is not guaranteed.
If the client needs button events or focus state, it can receive them from a wl_pointer object of the same seat that the wp_relative_pointer object is associated with.
Trait Implementations§
source§impl Borrow<ObjectId> for ZwpRelativePointerV1
impl Borrow<ObjectId> for ZwpRelativePointerV1
source§impl Clone for ZwpRelativePointerV1
impl Clone for ZwpRelativePointerV1
source§fn clone(&self) -> ZwpRelativePointerV1
fn clone(&self) -> ZwpRelativePointerV1
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ZwpRelativePointerV1
impl Debug for ZwpRelativePointerV1
source§impl Hash for ZwpRelativePointerV1
impl Hash for ZwpRelativePointerV1
source§impl PartialEq for ZwpRelativePointerV1
impl PartialEq for ZwpRelativePointerV1
source§impl Resource for ZwpRelativePointerV1
impl Resource for ZwpRelativePointerV1
source§fn object_data(&self) -> Option<&Arc<dyn Any + Send + Sync>>
fn object_data(&self) -> Option<&Arc<dyn Any + Send + Sync>>
source§fn handle(&self) -> &WeakHandle
fn handle(&self) -> &WeakHandle
source§fn from_id(conn: &DisplayHandle, id: ObjectId) -> Result<Self, InvalidId>
fn from_id(conn: &DisplayHandle, id: ObjectId) -> Result<Self, InvalidId>
source§fn send_event(&self, evt: Self::Event<'_>) -> Result<(), InvalidId>
fn send_event(&self, evt: Self::Event<'_>) -> Result<(), InvalidId>
source§fn parse_request(
conn: &DisplayHandle,
msg: Message<ObjectId, OwnedFd>,
) -> Result<(Self, Self::Request), DispatchError>
fn parse_request( conn: &DisplayHandle, msg: Message<ObjectId, OwnedFd>, ) -> Result<(Self, Self::Request), DispatchError>
source§fn write_event<'a>(
&self,
conn: &DisplayHandle,
msg: Self::Event<'a>,
) -> Result<Message<ObjectId, BorrowedFd<'a>>, InvalidId>
fn write_event<'a>( &self, conn: &DisplayHandle, msg: Self::Event<'a>, ) -> Result<Message<ObjectId, BorrowedFd<'a>>, InvalidId>
source§fn is_alive(&self) -> bool
fn is_alive(&self) -> bool
impl Eq for ZwpRelativePointerV1
Auto Trait Implementations§
impl Freeze for ZwpRelativePointerV1
impl !RefUnwindSafe for ZwpRelativePointerV1
impl Send for ZwpRelativePointerV1
impl Sync for ZwpRelativePointerV1
impl Unpin for ZwpRelativePointerV1
impl !UnwindSafe for ZwpRelativePointerV1
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.