Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(272)

Side by Side Diff: ui/events/devices/x11/device_data_manager_x11.h

Issue 1908473002: Split //ui/events/devices into two targets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More deps on new target. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/events/devices/x11/BUILD.gn ('k') | ui/events/devices/x11/device_list_cache_x11.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_DEVICES_X11_DEVICE_DATA_MANAGER_X11_H_ 5 #ifndef UI_EVENTS_DEVICES_X11_DEVICE_DATA_MANAGER_X11_H_
6 #define UI_EVENTS_DEVICES_X11_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 <memory> 20 #include <memory>
21 #include <set> 21 #include <set>
22 #include <vector> 22 #include <vector>
23 23
24 #include "base/event_types.h" 24 #include "base/event_types.h"
25 #include "base/macros.h" 25 #include "base/macros.h"
26 #include "ui/events/devices/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/devices/x11/events_devices_x11_export.h"
28 #include "ui/events/event_constants.h" 28 #include "ui/events/event_constants.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 bitfield describing which scroll axes are enabled for a device. 43 // A bitfield describing which scroll axes are enabled for a device.
44 enum ScrollType { 44 enum ScrollType {
45 SCROLL_TYPE_NO_SCROLL = 0, 45 SCROLL_TYPE_NO_SCROLL = 0,
46 SCROLL_TYPE_HORIZONTAL = 1 << 0, 46 SCROLL_TYPE_HORIZONTAL = 1 << 0,
47 SCROLL_TYPE_VERTICAL = 1 << 1, 47 SCROLL_TYPE_VERTICAL = 1 << 1,
48 }; 48 };
49 49
50 // A class that extracts and tracks the input events data. It currently handles 50 // A class that extracts and tracks the input events data. It currently handles
51 // mouse, touchpad and touchscreen devices. 51 // mouse, touchpad and touchscreen devices.
52 class EVENTS_DEVICES_EXPORT DeviceDataManagerX11 : public DeviceDataManager { 52 class EVENTS_DEVICES_X11_EXPORT DeviceDataManagerX11
53 : public DeviceDataManager {
53 public: 54 public:
54 // Enumerate additional data that one might be interested on an input event, 55 // Enumerate additional data that one might be interested on an input event,
55 // which are usually wrapped in X valuators. If you modify any of this, 56 // which are usually wrapped in X valuators. If you modify any of this,
56 // make sure to update the kCachedAtoms data structure in the source file 57 // make sure to update the kCachedAtoms data structure in the source file
57 // and the k*Type[Start/End] constants used by IsCMTDataType and 58 // and the k*Type[Start/End] constants used by IsCMTDataType and
58 // IsTouchDataType. 59 // IsTouchDataType.
59 enum DataType { 60 enum DataType {
60 // Define the valuators used the CrOS CMT driver. Used by mice and CrOS 61 // Define the valuators used the CrOS CMT driver. Used by mice and CrOS
61 // touchpads. 62 // touchpads.
62 DT_CMT_SCROLL_X = 0, // Scroll amount on the X (horizontal) direction. 63 DT_CMT_SCROLL_X = 0, // Scroll amount on the X (horizontal) direction.
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 390
390 unsigned char button_map_[256]; 391 unsigned char button_map_[256];
391 int button_map_count_; 392 int button_map_count_;
392 393
393 DISALLOW_COPY_AND_ASSIGN(DeviceDataManagerX11); 394 DISALLOW_COPY_AND_ASSIGN(DeviceDataManagerX11);
394 }; 395 };
395 396
396 } // namespace ui 397 } // namespace ui
397 398
398 #endif // UI_EVENTS_DEVICES_X11_DEVICE_DATA_MANAGER_X11_H_ 399 #endif // UI_EVENTS_DEVICES_X11_DEVICE_DATA_MANAGER_X11_H_
OLDNEW
« no previous file with comments | « ui/events/devices/x11/BUILD.gn ('k') | ui/events/devices/x11/device_list_cache_x11.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698