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 | |
98 float x_; | 96 float x_; |
99 float y_; | 97 float y_; |
100 int id_; // Device reported "unique" touch point id; -1 means not active | 98 int id_; // Device reported "unique" touch point id; -1 means not active |
101 int finger_; // "Finger" id starting from 0; -1 means not active | 99 int finger_; // "Finger" id starting from 0; -1 means not active |
102 | 100 |
103 EventType type_; | 101 EventType type_; |
104 float radius_x_; | 102 float radius_x_; |
105 float radius_y_; | 103 float radius_y_; |
106 float pressure_; | 104 float pressure_; |
107 }; | 105 }; |
108 | 106 |
109 // In-progress touch points. | 107 // In-progress touch points. |
110 InProgressEvents events_[MAX_FINGERS]; | 108 InProgressEvents events_[MAX_FINGERS]; |
111 | 109 |
112 DISALLOW_COPY_AND_ASSIGN(TouchEventConverterEvdev); | 110 DISALLOW_COPY_AND_ASSIGN(TouchEventConverterEvdev); |
113 }; | 111 }; |
114 | 112 |
115 } // namespace ui | 113 } // namespace ui |
116 | 114 |
117 #endif // UI_EVENTS_OZONE_EVDEV_TOUCH_EVENT_CONVERTER_EVDEV_H_ | 115 #endif // UI_EVENTS_OZONE_EVDEV_TOUCH_EVENT_CONVERTER_EVDEV_H_ |
OLD | NEW |