OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_EVENTS_OZONE_EVDEV_TOUCH_EVENT_CONVERTER_EVDEV_H_ | 5 #ifndef UI_EVENTS_OZONE_EVDEV_TOUCH_EVENT_CONVERTER_EVDEV_H_ |
6 #define UI_EVENTS_OZONE_EVDEV_TOUCH_EVENT_CONVERTER_EVDEV_H_ | 6 #define UI_EVENTS_OZONE_EVDEV_TOUCH_EVENT_CONVERTER_EVDEV_H_ |
7 | 7 |
8 #include <bitset> | 8 #include <bitset> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 gfx::Size native_size_; | 86 gfx::Size native_size_; |
87 | 87 |
88 // Touch point currently being updated from the /dev/input/event* stream. | 88 // Touch point currently being updated from the /dev/input/event* stream. |
89 int current_slot_; | 89 int current_slot_; |
90 | 90 |
91 // Bit field tracking which in-progress touch points have been modified | 91 // Bit field tracking which in-progress touch points have been modified |
92 // without a syn event. | 92 // without a syn event. |
93 std::bitset<MAX_FINGERS> altered_slots_; | 93 std::bitset<MAX_FINGERS> altered_slots_; |
94 | 94 |
95 struct InProgressEvents { | 95 struct InProgressEvents { |
| 96 InProgressEvents(); |
| 97 |
96 float x_; | 98 float x_; |
97 float y_; | 99 float y_; |
98 int id_; // Device reported "unique" touch point id; -1 means not active | 100 int id_; // Device reported "unique" touch point id; -1 means not active |
99 int finger_; // "Finger" id starting from 0; -1 means not active | 101 int finger_; // "Finger" id starting from 0; -1 means not active |
100 | 102 |
101 EventType type_; | 103 EventType type_; |
102 float radius_x_; | 104 float radius_x_; |
103 float radius_y_; | 105 float radius_y_; |
104 float pressure_; | 106 float pressure_; |
105 }; | 107 }; |
106 | 108 |
107 // In-progress touch points. | 109 // In-progress touch points. |
108 InProgressEvents events_[MAX_FINGERS]; | 110 InProgressEvents events_[MAX_FINGERS]; |
109 | 111 |
110 DISALLOW_COPY_AND_ASSIGN(TouchEventConverterEvdev); | 112 DISALLOW_COPY_AND_ASSIGN(TouchEventConverterEvdev); |
111 }; | 113 }; |
112 | 114 |
113 } // namespace ui | 115 } // namespace ui |
114 | 116 |
115 #endif // UI_EVENTS_OZONE_EVDEV_TOUCH_EVENT_CONVERTER_EVDEV_H_ | 117 #endif // UI_EVENTS_OZONE_EVDEV_TOUCH_EVENT_CONVERTER_EVDEV_H_ |
OLD | NEW |