summaryrefslogtreecommitdiffstats
path: root/native/src/input/touch.rs
blob: 7c4a62100c04da2be8abadf60b2808bd0f656cef (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! Build touch events.
/// The touch of a mobile device.
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum Touch {
    /// The touch cursor was started
    Started {
        /// The X coordinate of the touch position
        x: f32,

        /// The Y coordinate of the touch position
        y: f32,
    },
    /// The touch cursor was ended
    Ended {
        /// The X coordinate of the touch position
        x: f32,

        /// The Y coordinate of the touch position
        y: f32,
    },

    /// The touch was moved.
    Moved {
        /// The X coordinate of the touch position
        x: f32,

        /// The Y coordinate of the touch position
        y: f32,
    },

    /// Some canceled button.
    Cancelled {
        /// The X coordinate of the touch position
        x: f32,

        /// The Y coordinate of the touch position
        y: f32,
    },
}