Struct wayland_protocols::wp::tablet::zv2::server::zwp_tablet_pad_strip_v2::ZwpTabletPadStripV2
source · pub struct ZwpTabletPadStripV2 { /* private fields */ }
Expand description
pad strip
A linear interaction area, such as the strips found in Wacom Cintiq models.
Events on a strip are logically grouped by the wl_tablet_pad_strip.frame event.
See also the Request enum for this interface.
Implementations§
source§impl ZwpTabletPadStripV2
impl ZwpTabletPadStripV2
sourcepub fn source(&self, source: Source)
pub fn source(&self, source: Source)
strip event source
Source information for strip events.
This event does not occur on its own. It is sent before a wp_tablet_pad_strip.frame event and carries the source information for all events within that frame.
The source specifies how this event was generated. If the source is wp_tablet_pad_strip.source.finger, a wp_tablet_pad_strip.stop event will be sent when the user lifts their finger off the device.
This event is optional. If the source is unknown for an interaction, no event is sent.
sourcepub fn position(&self, position: u32)
pub fn position(&self, position: u32)
position changed
Sent whenever the position on a strip changes.
The position is normalized to a range of [0, 65535], the 0-value represents the top-most and/or left-most position of the strip in the pad’s current rotation.
sourcepub fn stop(&self)
pub fn stop(&self)
interaction stopped
Stop notification for strip events.
For some wp_tablet_pad_strip.source types, a wp_tablet_pad_strip.stop event is sent to notify a client that the interaction with the strip has terminated. This enables the client to implement kinetic scrolling. See the wp_tablet_pad_strip.source documentation for information on when this event may be generated.
Any wp_tablet_pad_strip.position events with the same source after this event should be considered as the start of a new interaction.
sourcepub fn frame(&self, time: u32)
pub fn frame(&self, time: u32)
end of a strip event sequence
Indicates the end of a set of events that represent one logical hardware strip event. A client is expected to accumulate the data in all events within the frame before proceeding.
All wp_tablet_pad_strip events before a wp_tablet_pad_strip.frame event belong logically together. For example, on termination of a finger interaction on a strip the compositor will send a wp_tablet_pad_strip.source event, a wp_tablet_pad_strip.stop event and a wp_tablet_pad_strip.frame event.
A wp_tablet_pad_strip.frame event is sent for every logical event group, even if the group only contains a single wp_tablet_pad_strip event. Specifically, a client may get a sequence: position, frame, position, frame, etc.
Trait Implementations§
source§impl Borrow<ObjectId> for ZwpTabletPadStripV2
impl Borrow<ObjectId> for ZwpTabletPadStripV2
source§impl Clone for ZwpTabletPadStripV2
impl Clone for ZwpTabletPadStripV2
source§fn clone(&self) -> ZwpTabletPadStripV2
fn clone(&self) -> ZwpTabletPadStripV2
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ZwpTabletPadStripV2
impl Debug for ZwpTabletPadStripV2
source§impl Hash for ZwpTabletPadStripV2
impl Hash for ZwpTabletPadStripV2
source§impl PartialEq for ZwpTabletPadStripV2
impl PartialEq for ZwpTabletPadStripV2
source§impl Resource for ZwpTabletPadStripV2
impl Resource for ZwpTabletPadStripV2
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 ZwpTabletPadStripV2
Auto Trait Implementations§
impl Freeze for ZwpTabletPadStripV2
impl !RefUnwindSafe for ZwpTabletPadStripV2
impl Send for ZwpTabletPadStripV2
impl Sync for ZwpTabletPadStripV2
impl Unpin for ZwpTabletPadStripV2
impl !UnwindSafe for ZwpTabletPadStripV2
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.