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

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

Issue 868043003: [PATCH 8/11] ozone: evdev: Plumb device changes to EventFactoryEvdev (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 10 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 | « no previous file | ui/events/ozone/evdev/event_converter_evdev.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 2015 The Chromium Authors. All rights reserved. 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 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_OZONE_EVDEV_DEVICE_EVENT_DISPATCHER_H_ 5 #ifndef UI_EVENTS_OZONE_EVDEV_DEVICE_EVENT_DISPATCHER_H_
6 #define UI_EVENTS_OZONE_EVDEV_DEVICE_EVENT_DISPATCHER_H_ 6 #define UI_EVENTS_OZONE_EVDEV_DEVICE_EVENT_DISPATCHER_H_
7 7
8 #include <vector>
9
8 #include "base/time/time.h" 10 #include "base/time/time.h"
11 #include "ui/events/devices/input_device.h"
12 #include "ui/events/devices/keyboard_device.h"
13 #include "ui/events/devices/touchscreen_device.h"
9 #include "ui/events/event_constants.h" 14 #include "ui/events/event_constants.h"
10 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h" 15 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h"
11 #include "ui/gfx/geometry/point_f.h" 16 #include "ui/gfx/geometry/point_f.h"
12 #include "ui/gfx/geometry/vector2d.h" 17 #include "ui/gfx/geometry/vector2d.h"
13 #include "ui/gfx/geometry/vector2d_f.h" 18 #include "ui/gfx/geometry/vector2d_f.h"
14 19
15 namespace ui { 20 namespace ui {
16 21
17 struct EVENTS_OZONE_EVDEV_EXPORT KeyEventParams { 22 struct EVENTS_OZONE_EVDEV_EXPORT KeyEventParams {
18 KeyEventParams(int device_id, unsigned int code, bool down); 23 KeyEventParams(int device_id, unsigned int code, bool down);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 float pressure; 105 float pressure;
101 base::TimeDelta timestamp; 106 base::TimeDelta timestamp;
102 }; 107 };
103 108
104 // Interface used by device objects for event dispatch. 109 // Interface used by device objects for event dispatch.
105 class EVENTS_OZONE_EVDEV_EXPORT DeviceEventDispatcherEvdev { 110 class EVENTS_OZONE_EVDEV_EXPORT DeviceEventDispatcherEvdev {
106 public: 111 public:
107 DeviceEventDispatcherEvdev() {} 112 DeviceEventDispatcherEvdev() {}
108 virtual ~DeviceEventDispatcherEvdev() {} 113 virtual ~DeviceEventDispatcherEvdev() {}
109 114
115 // User input events.
110 virtual void DispatchKeyEvent(const KeyEventParams& params) = 0; 116 virtual void DispatchKeyEvent(const KeyEventParams& params) = 0;
111 virtual void DispatchMouseMoveEvent(const MouseMoveEventParams& params) = 0; 117 virtual void DispatchMouseMoveEvent(const MouseMoveEventParams& params) = 0;
112 virtual void DispatchMouseButtonEvent( 118 virtual void DispatchMouseButtonEvent(
113 const MouseButtonEventParams& params) = 0; 119 const MouseButtonEventParams& params) = 0;
114 virtual void DispatchMouseWheelEvent(const MouseWheelEventParams& params) = 0; 120 virtual void DispatchMouseWheelEvent(const MouseWheelEventParams& params) = 0;
115 virtual void DispatchScrollEvent(const ScrollEventParams& params) = 0; 121 virtual void DispatchScrollEvent(const ScrollEventParams& params) = 0;
116 virtual void DispatchTouchEvent(const TouchEventParams& params) = 0; 122 virtual void DispatchTouchEvent(const TouchEventParams& params) = 0;
123
124 // Device lifecycle events.
125 virtual void DispatchKeyboardDevicesUpdated(
126 const std::vector<KeyboardDevice>& devices) = 0;
127 virtual void DispatchTouchscreenDevicesUpdated(
128 const std::vector<TouchscreenDevice>& devices) = 0;
129 virtual void DispatchMouseDevicesUpdated(
130 const std::vector<InputDevice>& devices) = 0;
131 virtual void DispatchTouchpadDevicesUpdated(
132 const std::vector<InputDevice>& devices) = 0;
117 }; 133 };
118 134
119 } // namespace ui 135 } // namespace ui
120 136
121 #endif // UI_EVENTS_OZONE_EVDEV_DEVICE_EVENT_DISPATCHER_H_ 137 #endif // UI_EVENTS_OZONE_EVDEV_DEVICE_EVENT_DISPATCHER_H_
OLDNEW
« no previous file with comments | « no previous file | ui/events/ozone/evdev/event_converter_evdev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698