pub struct ButtonMapping {
pub button_id: u32,
pub x: i32,
pub y: i32,
}Expand description
A hardware button mapped to a screen point.
When the button is pressed, synthesizes a PointerDown at (x, y).
When released, synthesizes a PointerUp at (x, y). These are fed
through the same PointerDevice path, so all recognizer logic (tap,
drag, long-press) applies identically (LPAR-04 §8.1: “Identical to Pointer
after synthesis”).
Fields§
Hardware button index (application-defined).
x: i32Screen x coordinate to synthesize pointer events at.
y: i32Screen y coordinate to synthesize pointer events at.
Trait Implementations§
Source§impl Clone for ButtonMapping
impl Clone for ButtonMapping
Source§fn clone(&self) -> ButtonMapping
fn clone(&self) -> ButtonMapping
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ButtonMapping
Auto Trait Implementations§
impl Freeze for ButtonMapping
impl RefUnwindSafe for ButtonMapping
impl Send for ButtonMapping
impl Sync for ButtonMapping
impl Unpin for ButtonMapping
impl UnsafeUnpin for ButtonMapping
impl UnwindSafe for ButtonMapping
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
Mutably borrows from an owned value. Read more