#[non_exhaustive]pub enum Event<'a> {
Enter,
Leave,
Position {
x: i32,
y: i32,
},
Hotspot {
x: i32,
y: i32,
},
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Enter
cursor entered captured area
Sent when a cursor enters the captured area. It shall be generated before the “position” and “hotspot” events when and only when a cursor enters the area.
The cursor enters the captured area when the cursor image intersects with the captured area. Note, this is different from e.g. wl_pointer.enter.
Leave
cursor left captured area
Sent when a cursor leaves the captured area. No “position” or “hotspot” event is generated for the cursor until the cursor enters the captured area again.
Position
position changed
Cursors outside the image source do not get captured and no event will be generated for them.
The given position is the position of the cursor’s hotspot and it is relative to the main buffer’s top left corner in transformed buffer pixel coordinates.
The position coordinates are relative to the main buffer’s upper left corner. The coordinates may be negative or greater than the main buffer size.
Hotspot
hotspot changed
The hotspot describes the offset between the cursor image and the position of the input device.
The given coordinates are the hotspot’s offset from the origin in buffer coordinates.
Clients should not apply the hotspot immediately: the hotspot becomes effective when the next zcosmic_screencopy_frame_v2.ready event is received.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Event<'a>
impl<'a> RefUnwindSafe for Event<'a>
impl<'a> Send for Event<'a>
impl<'a> Sync for Event<'a>
impl<'a> Unpin for Event<'a>
impl<'a> UnwindSafe for Event<'a>
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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
.Source§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
.Source§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.Source§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.