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

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

Issue 874713002: [PATCH 1/11] ozone: evdev: Move touch ui::Event transformation to EventFactoryEvdev (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update comment & add missing export 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 | « ui/events/ozone/BUILD.gn ('k') | ui/events/ozone/evdev/event_dispatch_callback.cc » ('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 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"
10 #include "ui/events/event_constants.h"
11 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h"
12 #include "ui/gfx/geometry/point_f.h"
13 #include "ui/gfx/geometry/vector2d_f.h"
14
15 namespace base {
16 class TimeDelta;
17 }
18
19 namespace gfx {
20 class PointF;
21 class Vector2dF;
22 }
9 23
10 namespace ui { 24 namespace ui {
11 25
12 class Event; 26 class Event;
13 27
14 typedef base::Callback<void(scoped_ptr<Event>)> EventDispatchCallback; 28 typedef base::Callback<void(scoped_ptr<Event>)> EventDispatchCallback;
15 29
30 struct EVENTS_OZONE_EVDEV_EXPORT TouchEventParams {
31 TouchEventParams(int device_id,
32 int touch_id,
33 EventType type,
34 const gfx::PointF& location,
35 const gfx::Vector2dF& radii,
36 float pressure,
37 const base::TimeDelta& timestamp);
38 TouchEventParams(const TouchEventParams& other);
39 ~TouchEventParams();
40
41 int device_id;
42 int touch_id;
43 EventType type;
44 gfx::PointF location;
45 gfx::Vector2dF radii;
46 float pressure;
47 base::TimeDelta timestamp;
48 };
49
50 typedef base::Callback<void(const TouchEventParams& params)>
51 TouchEventDispatchCallback;
52
16 } // namspace ui 53 } // namspace ui
17 54
18 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_DISPATCH_CALLBACK_H_ 55 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_DISPATCH_CALLBACK_H_
OLDNEW
« no previous file with comments | « ui/events/ozone/BUILD.gn ('k') | ui/events/ozone/evdev/event_dispatch_callback.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698