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

Side by Side Diff: components/exo/touch_stylus_delegate.h

Issue 2562803002: exo: Replace pointer based stylus and replace with touch based stylus (Closed)
Patch Set: updated deps in gn file Created 4 years 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 | « components/exo/touch.cc ('k') | components/exo/touch_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_EXO_TOUCH_STYLUS_DELEGATE_H_
6 #define COMPONENTS_EXO_TOUCH_STYLUS_DELEGATE_H_
7
8 #include "base/time/time.h"
9 #include "ui/events/event_constants.h"
10
11 namespace gfx {
12 class Vector2dF;
13 }
14
15 namespace exo {
16 class Touch;
17
18 // Handles stylus specific events as an extension to TouchDelegate.
19 class TouchStylusDelegate {
20 public:
21 // Called at the top of the touch's destructor, to give observers a
22 // chance to remove themselves.
23 virtual void OnTouchDestroying(Touch* pointer) = 0;
24
25 // Called to set the tool type of a touch. Only called once with the down
26 // event. A tool type cannot change afterwards.
27 virtual void OnTouchTool(int touch_id, ui::EventPointerType type) = 0;
28
29 // Called when the force (pressure) of the touch changes.
30 // Normalized to be [0, 1].
31 virtual void OnTouchForce(base::TimeTicks time_stamp,
32 int touch_id,
33 float force) = 0;
34
35 // Called when the tilt of a pen/stylus changes. Measured from surface normal
36 // as plane angle in degrees, values lie in [-90,90]. A positive x is to the
37 // right and a positive y is towards the user.
38 virtual void OnTouchTilt(base::TimeTicks time_stamp,
39 int touch_id,
40 const gfx::Vector2dF& tilt) = 0;
41
42 protected:
43 virtual ~TouchStylusDelegate() {}
44 };
45
46 } // namespace exo
47
48 #endif // COMPONENTS_EXO_TOUCH_STYLUS_DELEGATE_H_
OLDNEW
« no previous file with comments | « components/exo/touch.cc ('k') | components/exo/touch_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698