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

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

Issue 867803004: [PATCH 4/11] ozone: evdev: Move EventModifiersEvdev usage to EventFactoryEvdev (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update per comments on previous patches 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
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_OZONE_EVDEV_EVENT_DISPATCH_CALLBACK_H_ 5 #ifndef UI_EVENTS_OZONE_EVDEV_EVENT_DISPATCH_CALLBACK_H_
6 #define UI_EVENTS_OZONE_EVDEV_EVENT_DISPATCH_CALLBACK_H_ 6 #define UI_EVENTS_OZONE_EVDEV_EVENT_DISPATCH_CALLBACK_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "ui/events/event_constants.h" 10 #include "ui/events/event_constants.h"
11 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h" 11 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h"
12 #include "ui/gfx/geometry/point_f.h" 12 #include "ui/gfx/geometry/point_f.h"
13 #include "ui/gfx/geometry/vector2d.h"
13 #include "ui/gfx/geometry/vector2d_f.h" 14 #include "ui/gfx/geometry/vector2d_f.h"
14 15
15 namespace base { 16 namespace base {
16 class TimeDelta; 17 class TimeDelta;
17 } 18 }
18 19
19 namespace gfx { 20 namespace gfx {
20 class PointF; 21 class PointF;
22 class Vector2d;
21 class Vector2dF; 23 class Vector2dF;
22 } 24 }
23 25
24 namespace ui { 26 namespace ui {
25 27
26 class Event; 28 class Event;
27 29
28 typedef base::Callback<void(scoped_ptr<Event>)> EventDispatchCallback; 30 typedef base::Callback<void(scoped_ptr<Event>)> EventDispatchCallback;
29 31
30 struct EVENTS_OZONE_EVDEV_EXPORT KeyEventParams { 32 struct EVENTS_OZONE_EVDEV_EXPORT KeyEventParams {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 int device_id; 66 int device_id;
65 gfx::PointF location; 67 gfx::PointF location;
66 unsigned int button; 68 unsigned int button;
67 bool down; 69 bool down;
68 bool allow_remap; 70 bool allow_remap;
69 }; 71 };
70 72
71 typedef base::Callback<void(const MouseButtonEventParams& params)> 73 typedef base::Callback<void(const MouseButtonEventParams& params)>
72 MouseButtonEventDispatchCallback; 74 MouseButtonEventDispatchCallback;
73 75
76 struct EVENTS_OZONE_EVDEV_EXPORT MouseWheelEventParams {
77 MouseWheelEventParams(int device_id,
78 const gfx::PointF& location,
79 const gfx::Vector2d& delta);
80 MouseWheelEventParams(const MouseWheelEventParams& other);
81 ~MouseWheelEventParams();
82
83 int device_id;
84 gfx::PointF location;
85 gfx::Vector2d delta;
86 };
87
88 typedef base::Callback<void(const MouseWheelEventParams& params)>
89 MouseWheelEventDispatchCallback;
90
91 struct EVENTS_OZONE_EVDEV_EXPORT ScrollEventParams {
92 ScrollEventParams(int device_id,
93 EventType type,
94 const gfx::PointF location,
95 const gfx::Vector2dF delta,
96 const gfx::Vector2dF ordinal_delta,
97 int finger_count,
98 const base::TimeDelta timestamp);
99 ScrollEventParams(const ScrollEventParams& other);
100 ~ScrollEventParams();
101
102 int device_id;
103 EventType type;
104 const gfx::PointF location;
105 const gfx::Vector2dF delta;
106 const gfx::Vector2dF ordinal_delta;
107 int finger_count;
108 const base::TimeDelta timestamp;
109 };
110
111 typedef base::Callback<void(const ScrollEventParams& params)>
112 ScrollEventDispatchCallback;
113
74 struct EVENTS_OZONE_EVDEV_EXPORT TouchEventParams { 114 struct EVENTS_OZONE_EVDEV_EXPORT TouchEventParams {
75 TouchEventParams(int device_id, 115 TouchEventParams(int device_id,
76 int touch_id, 116 int touch_id,
77 EventType type, 117 EventType type,
78 const gfx::PointF& location, 118 const gfx::PointF& location,
79 const gfx::Vector2dF& radii, 119 const gfx::Vector2dF& radii,
80 float pressure, 120 float pressure,
81 const base::TimeDelta& timestamp); 121 const base::TimeDelta& timestamp);
82 TouchEventParams(const TouchEventParams& other); 122 TouchEventParams(const TouchEventParams& other);
83 ~TouchEventParams(); 123 ~TouchEventParams();
84 124
85 int device_id; 125 int device_id;
86 int touch_id; 126 int touch_id;
87 EventType type; 127 EventType type;
88 gfx::PointF location; 128 gfx::PointF location;
89 gfx::Vector2dF radii; 129 gfx::Vector2dF radii;
90 float pressure; 130 float pressure;
91 base::TimeDelta timestamp; 131 base::TimeDelta timestamp;
92 }; 132 };
93 133
94 typedef base::Callback<void(const TouchEventParams& params)> 134 typedef base::Callback<void(const TouchEventParams& params)>
95 TouchEventDispatchCallback; 135 TouchEventDispatchCallback;
96 136
97 } // namspace ui 137 } // namspace ui
98 138
99 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_DISPATCH_CALLBACK_H_ 139 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_DISPATCH_CALLBACK_H_
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/event_converter_evdev_impl_unittest.cc ('k') | ui/events/ozone/evdev/event_dispatch_callback.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698