| 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_X_DEVICE_DATA_MANAGER_X11_H_ | 5 #ifndef UI_EVENTS_DEVICES_X11_DEVICE_DATA_MANAGER_X11_H_ |
| 6 #define UI_EVENTS_X_DEVICE_DATA_MANAGER_X11_H_ | 6 #define UI_EVENTS_DEVICES_X11_DEVICE_DATA_MANAGER_X11_H_ |
| 7 | 7 |
| 8 // Generically-named #defines from Xlib is conflicting with symbols in GTest. | 8 // Generically-named #defines from Xlib is conflicting with symbols in GTest. |
| 9 // So many tests .cc file #undef Bool before including device_data_manager.h, | 9 // So many tests .cc file #undef Bool before including device_data_manager.h, |
| 10 // which makes Bool unrecognized in XInput2.h. | 10 // which makes Bool unrecognized in XInput2.h. |
| 11 #ifndef Bool | 11 #ifndef Bool |
| 12 #define Bool int | 12 #define Bool int |
| 13 #endif | 13 #endif |
| 14 | 14 |
| 15 #include <X11/extensions/XInput2.h> | 15 #include <X11/extensions/XInput2.h> |
| 16 | 16 |
| 17 #include <bitset> | 17 #include <bitset> |
| 18 #include <functional> | 18 #include <functional> |
| 19 #include <map> | 19 #include <map> |
| 20 #include <set> | 20 #include <set> |
| 21 #include <vector> | 21 #include <vector> |
| 22 | 22 |
| 23 #include "base/basictypes.h" | 23 #include "base/basictypes.h" |
| 24 #include "base/event_types.h" | 24 #include "base/event_types.h" |
| 25 #include "base/memory/scoped_ptr.h" | 25 #include "base/memory/scoped_ptr.h" |
| 26 #include "ui/events/device_data_manager.h" | 26 #include "ui/events/devices/device_data_manager.h" |
| 27 #include "ui/events/devices/events_devices_export.h" |
| 27 #include "ui/events/event_constants.h" | 28 #include "ui/events/event_constants.h" |
| 28 #include "ui/events/events_base_export.h" | |
| 29 #include "ui/events/keycodes/keyboard_codes.h" | 29 #include "ui/events/keycodes/keyboard_codes.h" |
| 30 #include "ui/gfx/geometry/rect.h" | 30 #include "ui/gfx/geometry/rect.h" |
| 31 #include "ui/gfx/x/x11_atom_cache.h" | 31 #include "ui/gfx/x/x11_atom_cache.h" |
| 32 | 32 |
| 33 typedef union _XEvent XEvent; | 33 typedef union _XEvent XEvent; |
| 34 | 34 |
| 35 namespace ui { | 35 namespace ui { |
| 36 | 36 |
| 37 // CrOS touchpad metrics gesture types | 37 // CrOS touchpad metrics gesture types |
| 38 enum GestureMetricsType { | 38 enum GestureMetricsType { |
| 39 kGestureMetricsTypeNoisyGround = 0, | 39 kGestureMetricsTypeNoisyGround = 0, |
| 40 kGestureMetricsTypeUnknown, | 40 kGestureMetricsTypeUnknown, |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 // A class that extracts and tracks the input events data. It currently handles | 43 // A class that extracts and tracks the input events data. It currently handles |
| 44 // mouse, touchpad and touchscreen devices. | 44 // mouse, touchpad and touchscreen devices. |
| 45 class EVENTS_BASE_EXPORT DeviceDataManagerX11 : public DeviceDataManager { | 45 class EVENTS_DEVICES_EXPORT DeviceDataManagerX11 : public DeviceDataManager { |
| 46 public: | 46 public: |
| 47 // Enumerate additional data that one might be interested on an input event, | 47 // Enumerate additional data that one might be interested on an input event, |
| 48 // which are usually wrapped in X valuators. If you modify any of this, | 48 // which are usually wrapped in X valuators. If you modify any of this, |
| 49 // make sure to update the kCachedAtoms data structure in the source file | 49 // make sure to update the kCachedAtoms data structure in the source file |
| 50 // and the k*Type[Start/End] constants used by IsCMTDataType and | 50 // and the k*Type[Start/End] constants used by IsCMTDataType and |
| 51 // IsTouchDataType. | 51 // IsTouchDataType. |
| 52 enum DataType { | 52 enum DataType { |
| 53 // Define the valuators used the CrOS CMT driver. Used by mice and CrOS | 53 // Define the valuators used the CrOS CMT driver. Used by mice and CrOS |
| 54 // touchpads. | 54 // touchpads. |
| 55 DT_CMT_SCROLL_X = 0, // Scroll amount on the X (horizontal) direction. | 55 DT_CMT_SCROLL_X = 0, // Scroll amount on the X (horizontal) direction. |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 X11AtomCache atom_cache_; | 314 X11AtomCache atom_cache_; |
| 315 | 315 |
| 316 unsigned char button_map_[256]; | 316 unsigned char button_map_[256]; |
| 317 int button_map_count_; | 317 int button_map_count_; |
| 318 | 318 |
| 319 DISALLOW_COPY_AND_ASSIGN(DeviceDataManagerX11); | 319 DISALLOW_COPY_AND_ASSIGN(DeviceDataManagerX11); |
| 320 }; | 320 }; |
| 321 | 321 |
| 322 } // namespace ui | 322 } // namespace ui |
| 323 | 323 |
| 324 #endif // UI_EVENTS_X_DEVICE_DATA_MANAGER_X11_H_ | 324 #endif // UI_EVENTS_DEVICES_X11_DEVICE_DATA_MANAGER_X11_H_ |
| OLD | NEW |