pub struct ZcosmicScreencopyCursorSessionV2 { /* private fields */ }
Expand description
cursor capture session
This object represents a cursor capture session. It extends the base capture session with cursor-specific metadata.
See also the Request enum for this interface.
Implementations§
Source§impl ZcosmicScreencopyCursorSessionV2
impl ZcosmicScreencopyCursorSessionV2
Sourcepub fn enter(&self)
pub fn enter(&self)
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.
Sourcepub fn leave(&self)
pub fn leave(&self)
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.
Sourcepub fn position(&self, x: i32, y: i32)
pub fn position(&self, x: i32, y: i32)
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.
Sourcepub fn hotspot(&self, x: i32, y: i32)
pub fn hotspot(&self, x: i32, y: i32)
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.
Trait Implementations§
Source§impl Clone for ZcosmicScreencopyCursorSessionV2
impl Clone for ZcosmicScreencopyCursorSessionV2
Source§fn clone(&self) -> ZcosmicScreencopyCursorSessionV2
fn clone(&self) -> ZcosmicScreencopyCursorSessionV2
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl PartialEq<Weak<ZcosmicScreencopyCursorSessionV2>> for ZcosmicScreencopyCursorSessionV2
impl PartialEq<Weak<ZcosmicScreencopyCursorSessionV2>> for ZcosmicScreencopyCursorSessionV2
Source§impl PartialEq for ZcosmicScreencopyCursorSessionV2
impl PartialEq for ZcosmicScreencopyCursorSessionV2
Source§fn eq(&self, other: &ZcosmicScreencopyCursorSessionV2) -> bool
fn eq(&self, other: &ZcosmicScreencopyCursorSessionV2) -> bool
self
and other
values to be equal, and is used by ==
.Source§impl Resource for ZcosmicScreencopyCursorSessionV2
impl Resource for ZcosmicScreencopyCursorSessionV2
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 ZcosmicScreencopyCursorSessionV2
Auto Trait Implementations§
impl Freeze for ZcosmicScreencopyCursorSessionV2
impl !RefUnwindSafe for ZcosmicScreencopyCursorSessionV2
impl Send for ZcosmicScreencopyCursorSessionV2
impl Sync for ZcosmicScreencopyCursorSessionV2
impl Unpin for ZcosmicScreencopyCursorSessionV2
impl !UnwindSafe for ZcosmicScreencopyCursorSessionV2
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§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.