| 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_EVENTS_DEVICES_X11_TOUCH_FACTORY_X11_H_ | 5 #ifndef UI_EVENTS_DEVICES_X11_TOUCH_FACTORY_X11_H_ |
| 6 #define UI_EVENTS_DEVICES_X11_TOUCH_FACTORY_X11_H_ | 6 #define UI_EVENTS_DEVICES_X11_TOUCH_FACTORY_X11_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <bitset> | 10 #include <bitset> |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 // and instead of having the lookup table and the list, there will be a single | 114 // and instead of having the lookup table and the list, there will be a single |
| 115 // identifier for the touch device. This can be completed after enough testing | 115 // identifier for the touch device. This can be completed after enough testing |
| 116 // on real touch devices. | 116 // on real touch devices. |
| 117 | 117 |
| 118 static const int kMaxDeviceNum = 128; | 118 static const int kMaxDeviceNum = 128; |
| 119 | 119 |
| 120 // A quick lookup table for determining if events from the pointer device | 120 // A quick lookup table for determining if events from the pointer device |
| 121 // should be processed. | 121 // should be processed. |
| 122 std::bitset<kMaxDeviceNum> pointer_device_lookup_; | 122 std::bitset<kMaxDeviceNum> pointer_device_lookup_; |
| 123 | 123 |
| 124 // A quick lookup table for determining if a device is a touch device. | |
| 125 std::bitset<kMaxDeviceNum> touch_device_lookup_; | |
| 126 | |
| 127 // The list of touch devices. For testing/debugging purposes, a single-pointer | 124 // The list of touch devices. For testing/debugging purposes, a single-pointer |
| 128 // device (mouse or touch screen without sufficient X/driver support for MT) | 125 // device (mouse or touch screen without sufficient X/driver support for MT) |
| 129 // can sometimes be treated as a touch device. The key in the map represents | 126 // can sometimes be treated as a touch device. The key in the map represents |
| 130 // the device id, and the value represents if the device is multi-touch | 127 // the device id, and the value represents if the device is multi-touch |
| 131 // capable. | 128 // capable. |
| 132 std::map<int, bool> touch_device_list_; | 129 std::map<int, bool> touch_device_list_; |
| 133 | 130 |
| 134 // Touch screen <vid, pid>s. | 131 // Touch screen <vid, pid>s. |
| 135 std::set<std::pair<int, int> > touchscreen_ids_; | 132 std::set<std::pair<int, int> > touchscreen_ids_; |
| 136 | 133 |
| 137 // Device ID of the virtual core keyboard. | 134 // Device ID of the virtual core keyboard. |
| 138 int virtual_core_keyboard_device_; | 135 int virtual_core_keyboard_device_; |
| 139 | 136 |
| 140 SequentialIDGenerator id_generator_; | 137 SequentialIDGenerator id_generator_; |
| 141 | 138 |
| 142 // Associate each device ID with its master device ID. | 139 // Associate each device ID with its master device ID. |
| 143 std::map<int, int> device_master_id_list_; | 140 std::map<int, int> device_master_id_list_; |
| 144 | 141 |
| 145 // The status of the touch screens devices themselves. | 142 // The status of the touch screens devices themselves. |
| 146 bool touch_screens_enabled_; | 143 bool touch_screens_enabled_; |
| 147 | 144 |
| 148 DISALLOW_COPY_AND_ASSIGN(TouchFactory); | 145 DISALLOW_COPY_AND_ASSIGN(TouchFactory); |
| 149 }; | 146 }; |
| 150 | 147 |
| 151 } // namespace ui | 148 } // namespace ui |
| 152 | 149 |
| 153 #endif // UI_EVENTS_DEVICES_X11_TOUCH_FACTORY_X11_H_ | 150 #endif // UI_EVENTS_DEVICES_X11_TOUCH_FACTORY_X11_H_ |
| OLD | NEW |