OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef UI_BASE_X_VALUATORS_H_ | 5 #ifndef UI_BASE_X_VALUATORS_H_ |
6 #define UI_BASE_X_VALUATORS_H_ | 6 #define UI_BASE_X_VALUATORS_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 | 9 |
10 template <typename T> struct DefaultSingletonTraits; | 10 template <typename T> struct DefaultSingletonTraits; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 VAL_SLOT_ID, // ID of the finger that triggered a touch event | 47 VAL_SLOT_ID, // ID of the finger that triggered a touch event |
48 // (useful when tracking multiple simultaneous | 48 // (useful when tracking multiple simultaneous |
49 // touches) | 49 // touches) |
50 #endif | 50 #endif |
51 // NOTE for XInput MT: 'Tracking ID' is provided in every touch event to | 51 // NOTE for XInput MT: 'Tracking ID' is provided in every touch event to |
52 // track individual touch. 'Tracking ID' is an unsigned 32-bit value and | 52 // track individual touch. 'Tracking ID' is an unsigned 32-bit value and |
53 // is increased for each new touch. It will wrap back to 0 when reaching | 53 // is increased for each new touch. It will wrap back to 0 when reaching |
54 // the numerical limit. | 54 // the numerical limit. |
55 VAL_TRACKING_ID, // ID of the touch point. | 55 VAL_TRACKING_ID, // ID of the touch point. |
56 | 56 |
| 57 // Kernel timestamp from touch screen (if available). |
| 58 VAL_TOUCH_RAW_TIMESTAMP, |
| 59 |
57 VAL_LAST_ENTRY | 60 VAL_LAST_ENTRY |
58 }; | 61 }; |
59 | 62 |
60 // Returns the ValuatorTracker singleton. | 63 // Returns the ValuatorTracker singleton. |
61 static ValuatorTracker* GetInstance(); | 64 static ValuatorTracker* GetInstance(); |
62 | 65 |
63 // Extract the Valuator from the XEvent. Return true and the value is set | 66 // Extract the Valuator from the XEvent. Return true and the value is set |
64 // if the Valuator is found, false and value unchanged if the Valuator | 67 // if the Valuator is found, false and value unchanged if the Valuator |
65 // is not found. | 68 // is not found. |
66 bool ExtractValuator(const XEvent& xev, Valuator val, float* value); | 69 bool ExtractValuator(const XEvent& xev, Valuator val, float* value); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 // a device. Defaults to 0 if the valuator was not specified in an earlier | 107 // a device. Defaults to 0 if the valuator was not specified in an earlier |
105 // event. | 108 // event. |
106 float last_seen_valuator_[kMaxDeviceNum][VAL_LAST_ENTRY]; | 109 float last_seen_valuator_[kMaxDeviceNum][VAL_LAST_ENTRY]; |
107 | 110 |
108 DISALLOW_COPY_AND_ASSIGN(ValuatorTracker); | 111 DISALLOW_COPY_AND_ASSIGN(ValuatorTracker); |
109 }; | 112 }; |
110 | 113 |
111 } // namespace ui | 114 } // namespace ui |
112 | 115 |
113 #endif // UI_BASE_X_VALUATORS_H_ | 116 #endif // UI_BASE_X_VALUATORS_H_ |
OLD | NEW |