Trait smithay::backend::input::TabletToolEvent [−][src]
pub trait TabletToolEvent<B: InputBackend> {}Show 27 methods
fn tool(&self) -> TabletToolDescriptor; fn delta_x(&self) -> f64; fn delta_y(&self) -> f64; fn x(&self) -> f64; fn y(&self) -> f64; fn x_transformed(&self, width: i32) -> f64; fn y_transformed(&self, height: i32) -> f64; fn distance(&self) -> f64; fn distance_has_changed(&self) -> bool; fn pressure(&self) -> f64; fn pressure_has_changed(&self) -> bool; fn slider_position(&self) -> f64; fn slider_has_changed(&self) -> bool; fn tilt_x(&self) -> f64; fn tilt_x_has_changed(&self) -> bool; fn tilt_y(&self) -> f64; fn tilt_y_has_changed(&self) -> bool; fn rotation(&self) -> f64; fn rotation_has_changed(&self) -> bool; fn wheel_delta(&self) -> f64; fn wheel_delta_discrete(&self) -> i32; fn wheel_has_changed(&self) -> bool; fn delta(&self) -> Point<f64, Logical> { ... } fn position(&self) -> Point<f64, Raw> { ... } fn position_transformed(
&self,
coordinate_space: Size<i32, Logical>
) -> Point<f64, Logical> { ... } fn tilt(&self) -> (f64, f64) { ... } fn tilt_has_changed(&self) -> bool { ... }
Expand description
Tablet tool event
Required methods
fn tool(&self) -> TabletToolDescriptor
fn tool(&self) -> TabletToolDescriptor
Get tablet tool that caused this event
Delta on the x axis between the last and new pointer device position interpreted as pixel movement
Delta on the y axis between the last and new pointer device position interpreted as pixel movement
Returns the x coordinate of the tablet tool, in mm from the top left corner of the tablet in its current logical orientation.
Returns the y coordinate of the tablet tool, in mm from the top left corner of the tablet in its current logical orientation.
fn x_transformed(&self, width: i32) -> f64
fn x_transformed(&self, width: i32) -> f64
Return the current absolute X coordinate of the tablet tool event, transformed to screen coordinates.
fn y_transformed(&self, height: i32) -> f64
fn y_transformed(&self, height: i32) -> f64
Return the current absolute Y coordinate of the tablet tool event, transformed to screen coordinates.
Returns the current distance from the tablet’s sensor, normalized to the range [0, 1]
If this axis does not exist on the current tool, this function returns 0.
fn distance_has_changed(&self) -> bool
fn distance_has_changed(&self) -> bool
Check if the distance axis was updated in this event.
Returns the current pressure being applied on the tool in use, normalized to the range [0, 1].
If this axis does not exist on the current tool, this function returns 0.
fn pressure_has_changed(&self) -> bool
fn pressure_has_changed(&self) -> bool
Check if the pressure axis was updated in this event.
fn slider_position(&self) -> f64
fn slider_position(&self) -> f64
Returns the current position of the slider on the tool, normalized to the range [-1, 1].
The logical zero is the neutral position of the slider, or the logical center of the axis. This axis is available on e.g. the Wacom Airbrush.
If this axis does not exist on the current tool, this function returns 0.
fn slider_has_changed(&self) -> bool
fn slider_has_changed(&self) -> bool
Check if the slider axis was updated in this event.
Returns the current tilt along the X axis of the tablet’s current logical orientation, in degrees off the tablet’s z axis.
That is, if the tool is perfectly orthogonal to the tablet, the tilt angle is 0. When the top tilts towards the logical top/left of the tablet, the x/y tilt angles are negative, if the top tilts towards the logical bottom/right of the tablet, the x/y tilt angles are positive.
If this axis does not exist on the current tool, this function returns 0.
fn tilt_x_has_changed(&self) -> bool
fn tilt_x_has_changed(&self) -> bool
Check if the tilt x axis was updated in this event.
Returns the current tilt along the Y axis of the tablet’s current logical orientation, in degrees off the tablet’s z axis.
That is, if the tool is perfectly orthogonal to the tablet, the tilt angle is 0. When the top tilts towards the logical top/left of the tablet, the x/y tilt angles are negative, if the top tilts towards the logical bottom/right of the tablet, the x/y tilt angles are positive.
If this axis does not exist on the current tool, this function returns 0.
fn tilt_y_has_changed(&self) -> bool
fn tilt_y_has_changed(&self) -> bool
Check if the tilt y axis was updated in this event.
Returns the current z rotation of the tool in degrees, clockwise from the tool’s logical neutral position.
For tools of type Mouse and Lens the logical neutral position is pointing to the current logical north of the tablet. For tools of type Brush, the logical neutral position is with the buttons pointing up.
If this axis does not exist on the current tool, this function returns 0.
fn rotation_has_changed(&self) -> bool
fn rotation_has_changed(&self) -> bool
Check if the z-rotation axis was updated in this event.
fn wheel_delta(&self) -> f64
fn wheel_delta(&self) -> f64
Return the delta for the wheel in degrees.
fn wheel_delta_discrete(&self) -> i32
fn wheel_delta_discrete(&self) -> i32
Return the delta for the wheel in discrete steps (e.g. wheel clicks).
fn wheel_has_changed(&self) -> bool
fn wheel_has_changed(&self) -> bool
Check if the wheel axis was updated in this event.
Provided methods
Delta between the last and new pointer device position interpreted as pixel movement
Tool position converted into the target coordinate space.
Returns the current tilt along the (X,Y) axis of the tablet’s current logical orientation, in degrees off the tablet’s z axis.
That is, if the tool is perfectly orthogonal to the tablet, the tilt angle is 0. When the top tilts towards the logical top/left of the tablet, the x/y tilt angles are negative, if the top tilts towards the logical bottom/right of the tablet, the x/y tilt angles are positive.
If this axis does not exist on the current tool, this function returns (0,0).
fn tilt_has_changed(&self) -> bool
fn tilt_has_changed(&self) -> bool
Check if the tilt was updated in this event.