OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 module sky; | 5 module sky; |
6 | 6 |
7 enum EventType { | 7 enum EventType { |
8 UNKNOWN, | 8 UNKNOWN, |
| 9 POINTER_CANCEL, |
9 POINTER_DOWN, | 10 POINTER_DOWN, |
| 11 POINTER_MOVE, |
10 POINTER_UP, | 12 POINTER_UP, |
11 POINTER_MOVE, | 13 GESTURE_FLING_CANCEL, |
12 POINTER_CANCEL, | 14 GESTURE_FLING_START, |
| 15 GESTURE_LONG_PRESS, |
13 GESTURE_SCROLL_BEGIN, | 16 GESTURE_SCROLL_BEGIN, |
| 17 GESTURE_SCROLL_END, |
14 GESTURE_SCROLL_UPDATE, | 18 GESTURE_SCROLL_UPDATE, |
15 GESTURE_SCROLL_END, | 19 GESTURE_SHOW_PRESS, |
16 GESTURE_FLING_START, | 20 GESTURE_TAP, |
17 GESTURE_FLING_CANCEL, | 21 GESTURE_TAP_DOWN, |
18 }; | 22 }; |
19 | 23 |
20 enum PointerKind { | 24 enum PointerKind { |
21 TOUCH, | 25 TOUCH, |
22 }; | 26 }; |
23 | 27 |
24 struct PointerData { | 28 struct PointerData { |
25 int32 pointer; | 29 int32 pointer; |
26 PointerKind kind; | 30 PointerKind kind; |
27 float x; | 31 float x; |
28 float y; | 32 float y; |
29 int32 buttons; | 33 int32 buttons; |
30 float pressure; | 34 float pressure; |
31 float pressure_min; | 35 float pressure_min; |
32 float pressure_max; | 36 float pressure_max; |
33 float distance; | 37 float distance; |
34 float distance_min; | 38 float distance_min; |
35 float distance_max; | 39 float distance_max; |
36 float radius_major; | 40 float radius_major; |
37 float radius_minor; | 41 float radius_minor; |
38 float radius_min; | 42 float radius_min; |
39 float radius_max; | 43 float radius_max; |
40 float orientation; | 44 float orientation; |
41 float tilt; | 45 float tilt; |
42 }; | 46 }; |
43 | 47 |
44 struct GestureData { | 48 struct GestureData { |
45 float x; | 49 float x; |
46 float y; | 50 float y; |
47 float dx; | 51 float dx; |
48 float dy; | 52 float dy; |
49 float velocityX; | 53 float velocityX; |
50 float velocityY; | 54 float velocityY; |
51 }; | 55 }; |
52 | 56 |
53 struct InputEvent { | 57 struct InputEvent { |
54 EventType type; | 58 EventType type; |
55 int64 time_stamp; | 59 int64 time_stamp; |
56 PointerData? pointer_data; | 60 PointerData? pointer_data; |
57 GestureData? gesture_data; | 61 GestureData? gesture_data; |
58 }; | 62 }; |
OLD | NEW |