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

Unified Diff: ui/events/ozone/evdev/device_event_dispatcher_evdev.h

Issue 2805793002: ozone: evdev: Add gamepad support (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
Index: ui/events/ozone/evdev/device_event_dispatcher_evdev.h
diff --git a/ui/events/ozone/evdev/device_event_dispatcher_evdev.h b/ui/events/ozone/evdev/device_event_dispatcher_evdev.h
index 7d5e634eda19564109490aeb0f1c95166ccfd2d2..500077a28718877a6e78ad15f9354ed870ea5308 100644
--- a/ui/events/ozone/evdev/device_event_dispatcher_evdev.h
+++ b/ui/events/ozone/evdev/device_event_dispatcher_evdev.h
@@ -150,6 +150,19 @@ struct EVENTS_OZONE_EVDEV_EXPORT TouchEventParams {
base::TimeTicks timestamp;
};
+struct EVENTS_OZONE_EVDEV_EXPORT GamepadEventParams {
+ GamepadEventParams(int device_id,
+ EventType type,
+ double value,
+ uint16_t code,
+ const base::TimeTicks timestamp);
+ int device_id;
+ EventType type;
+ double value;
+ uint16_t code;
+ base::TimeTicks timestamp;
+};
+
// Interface used by device objects for event dispatch.
class EVENTS_OZONE_EVDEV_EXPORT DeviceEventDispatcherEvdev {
public:
@@ -157,6 +170,7 @@ class EVENTS_OZONE_EVDEV_EXPORT DeviceEventDispatcherEvdev {
virtual ~DeviceEventDispatcherEvdev() {}
// User input events.
+ virtual void DispatchGamepadEvent(const GamepadEventParams& params) = 0;
virtual void DispatchKeyEvent(const KeyEventParams& params) = 0;
virtual void DispatchMouseMoveEvent(const MouseMoveEventParams& params) = 0;
virtual void DispatchMouseButtonEvent(
@@ -167,6 +181,8 @@ class EVENTS_OZONE_EVDEV_EXPORT DeviceEventDispatcherEvdev {
virtual void DispatchTouchEvent(const TouchEventParams& params) = 0;
// Device lifecycle events.
+ virtual void DispatchGamepadDevicesUpdated(
+ const std::vector<InputDevice>& devices) = 0;
virtual void DispatchKeyboardDevicesUpdated(
const std::vector<InputDevice>& devices) = 0;
virtual void DispatchTouchscreenDevicesUpdated(

Powered by Google App Engine
This is Rietveld 408576698