pub struct Input {
pub pointer: Option<[f32; 2]>,
pub pointer_kind: PointerKind,
pub pressed: bool,
pub released: bool,
pub cancelled: bool,
pub blurred: bool,
pub key: Option<KeyInput>,
pub scroll: [f32; 2],
pub time: f64,
pub pinch_scale: f32,
pub pinch_center: Option<[f32; 2]>,
pub touch_count: u8,
}Expand description
One input snapshot. Press/release are edges, time is monotonic seconds.
Fields§
§pointer: Option<[f32; 2]>§pointer_kind: PointerKind§pressed: bool§released: bool§cancelled: bool§blurred: bool§key: Option<KeyInput>§scroll: [f32; 2]Logical pixel scroll delta, positive y scrolls down.
time: f64§pinch_scale: f32Multi-touch pinch scale factor (1.0 = neutral, > 1.0 = zoom in).
pinch_center: Option<[f32; 2]>Optional focal center for a pinch gesture in logical pixels.
touch_count: u8Active touch contact count (0 when no touch contact is active).
Trait Implementations§
Auto Trait Implementations§
impl Forget for Input
impl Freeze for Input
impl Move for Input
impl RefUnwindSafe for Input
impl Send for Input
impl Sync for Input
impl Unpin for Input
impl UnsafeUnpin for Input
impl UnwindSafe for Input
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