[−][src]Trait wayland_protocols::unstable::tablet::v2::client::zwp_tablet_pad_ring_v2::EventHandler
An interface for handling events.
Provided methods
fn source(&mut self, object: ZwpTabletPadRingV2, source: Source)
ring event source
Source information for ring events.
This event does not occur on its own. It is sent before a wp_tablet_pad_ring.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_ring.source.finger, a wp_tablet_pad_ring.stop event will be sent when the user lifts the finger off the device.
This event is optional. If the source is unknown for an interaction, no event is sent.
fn angle(&mut self, object: ZwpTabletPadRingV2, degrees: f64)
angle changed
Sent whenever the angle on a ring changes.
The angle is provided in degrees clockwise from the logical north of the ring in the pad's current rotation.
fn stop(&mut self, object: ZwpTabletPadRingV2)
interaction stopped
Stop notification for ring events.
For some wp_tablet_pad_ring.source types, a wp_tablet_pad_ring.stop event is sent to notify a client that the interaction with the ring has terminated. This enables the client to implement kinetic scrolling. See the wp_tablet_pad_ring.source documentation for information on when this event may be generated.
Any wp_tablet_pad_ring.angle events with the same source after this event should be considered as the start of a new interaction.
fn frame(&mut self, object: ZwpTabletPadRingV2, time: u32)
end of a ring event sequence
Indicates the end of a set of ring events that logically belong together. A client is expected to accumulate the data in all events within the frame before proceeding.
All wp_tablet_pad_ring events before a wp_tablet_pad_ring.frame event belong logically together. For example, on termination of a finger interaction on a ring the compositor will send a wp_tablet_pad_ring.source event, a wp_tablet_pad_ring.stop event and a wp_tablet_pad_ring.frame event.
A wp_tablet_pad_ring.frame event is sent for every logical event group, even if the group only contains a single wp_tablet_pad_ring event. Specifically, a client may get a sequence: angle, frame, angle, frame, etc.