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

Side by Side Diff: ui/events/ozone/evdev/event_device_test_util.h

Issue 1287103004: Sync ui/events to chromium @ https://codereview.chromium.org/1210203002 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 years, 4 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
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef UI_EVENTS_OZONE_EVDEV_EVENT_DEVICE_TEST_UTIL_H_
6 #define UI_EVENTS_OZONE_EVDEV_EVENT_DEVICE_TEST_UTIL_H_
7
8 #include <linux/input.h>
9
10 namespace ui {
11
12 class EventDeviceInfo;
13
14 struct DeviceAbsoluteAxis {
15 unsigned int code;
16 input_absinfo absinfo;
17 };
18
19 struct DeviceCapabilities {
20 // Full sysfs path (readlink -f /sys/class/input/event*)
21 const char* path;
22
23 // EVIOCGNAME (/sys/class/input/*/device/name)
24 const char* name;
25
26 // EVIOCGPHYS (/sys/class/input/*/device/phys)
27 const char* phys;
28
29 // EVIOCGUNIQ (/sys/class/input/*/device/uniq)
30 const char* uniq;
31
32 // EVIOCGID (/sys/class/input/*/device/id)
33 const char* bustype;
34 const char* vendor;
35 const char* product;
36 const char* version;
37
38 // EVIOCGPROP (/sys/class/input/*/device/properties)
39 // 64-bit groups.
40 const char* prop;
41
42 // EVIOCGBIT (/sys/class/input/*/device/capabilities)
43 // 64-bit groups.
44 const char* ev;
45 const char* key;
46 const char* rel;
47 const char* abs;
48 const char* msc;
49 const char* sw;
50 const char* led;
51 const char* ff;
52
53 // EVIOCGABS.
54 const DeviceAbsoluteAxis* abs_axis;
55 size_t abs_axis_count;
56 };
57
58 bool CapabilitiesToDeviceInfo(const DeviceCapabilities& capabilities,
59 EventDeviceInfo* devinfo);
60
61 extern const DeviceCapabilities kLinkKeyboard;
62 extern const DeviceCapabilities kLinkTouchscreen;
63 extern const DeviceCapabilities kLinkTouchpad;
64 extern const DeviceCapabilities kHpUsbKeyboard;
65 extern const DeviceCapabilities kHpUsbKeyboard_Extra;
66 extern const DeviceCapabilities kLogitechUsbMouse;
67 extern const DeviceCapabilities kMimoTouch2Touchscreen;
68 extern const DeviceCapabilities kWacomIntuosPtS_Pen;
69 extern const DeviceCapabilities kWacomIntuosPtS_Finger;
70 extern const DeviceCapabilities kLogitechTouchKeyboardK400;
71 extern const DeviceCapabilities kElo_TouchSystems_2700;
72
73 } // namspace ui
74
75 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_DEVICE_TEST_UTIL_H_
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/event_device_info_unittest.cc ('k') | ui/events/ozone/evdev/event_device_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698