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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: ui/events/ozone/evdev/event_device_test_util.h
diff --git a/ui/events/ozone/evdev/event_device_test_util.h b/ui/events/ozone/evdev/event_device_test_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..b02f74a3cf6146557e62a1a7d51742158339c111
--- /dev/null
+++ b/ui/events/ozone/evdev/event_device_test_util.h
@@ -0,0 +1,75 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_EVENTS_OZONE_EVDEV_EVENT_DEVICE_TEST_UTIL_H_
+#define UI_EVENTS_OZONE_EVDEV_EVENT_DEVICE_TEST_UTIL_H_
+
+#include <linux/input.h>
+
+namespace ui {
+
+class EventDeviceInfo;
+
+struct DeviceAbsoluteAxis {
+ unsigned int code;
+ input_absinfo absinfo;
+};
+
+struct DeviceCapabilities {
+ // Full sysfs path (readlink -f /sys/class/input/event*)
+ const char* path;
+
+ // EVIOCGNAME (/sys/class/input/*/device/name)
+ const char* name;
+
+ // EVIOCGPHYS (/sys/class/input/*/device/phys)
+ const char* phys;
+
+ // EVIOCGUNIQ (/sys/class/input/*/device/uniq)
+ const char* uniq;
+
+ // EVIOCGID (/sys/class/input/*/device/id)
+ const char* bustype;
+ const char* vendor;
+ const char* product;
+ const char* version;
+
+ // EVIOCGPROP (/sys/class/input/*/device/properties)
+ // 64-bit groups.
+ const char* prop;
+
+ // EVIOCGBIT (/sys/class/input/*/device/capabilities)
+ // 64-bit groups.
+ const char* ev;
+ const char* key;
+ const char* rel;
+ const char* abs;
+ const char* msc;
+ const char* sw;
+ const char* led;
+ const char* ff;
+
+ // EVIOCGABS.
+ const DeviceAbsoluteAxis* abs_axis;
+ size_t abs_axis_count;
+};
+
+bool CapabilitiesToDeviceInfo(const DeviceCapabilities& capabilities,
+ EventDeviceInfo* devinfo);
+
+extern const DeviceCapabilities kLinkKeyboard;
+extern const DeviceCapabilities kLinkTouchscreen;
+extern const DeviceCapabilities kLinkTouchpad;
+extern const DeviceCapabilities kHpUsbKeyboard;
+extern const DeviceCapabilities kHpUsbKeyboard_Extra;
+extern const DeviceCapabilities kLogitechUsbMouse;
+extern const DeviceCapabilities kMimoTouch2Touchscreen;
+extern const DeviceCapabilities kWacomIntuosPtS_Pen;
+extern const DeviceCapabilities kWacomIntuosPtS_Finger;
+extern const DeviceCapabilities kLogitechTouchKeyboardK400;
+extern const DeviceCapabilities kElo_TouchSystems_2700;
+
+} // namspace ui
+
+#endif // UI_EVENTS_OZONE_EVDEV_EVENT_DEVICE_TEST_UTIL_H_
« 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