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

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

Issue 2153503005: exo: Implement support for zwp_stylus_v1 protocol (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@protocol
Patch Set: 2nd try Created 4 years, 4 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 | « components/exo/pointer.cc ('k') | components/exo/wayland/BUILD.gn » ('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_POINTER_STYLUS_DELEGATE_H_
6 #define COMPONENTS_EXO_POINTER_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 Pointer;
17
18 // Handles tool-specific event details on pointers. Used as an extension to the
19 // PointerDelegate.
20 class PointerStylusDelegate {
21 public:
22 // Called at the top of the pointer's destructor, to give observers a
23 // chance to remove themselves.
24 virtual void OnPointerDestroying(Pointer* pointer) = 0;
25
26 // Called when the type of pointer device changes.
27 virtual void OnPointerToolChange(ui::EventPointerType type) = 0;
28
29 // Called when the force (pressure) of the pointer changes.
30 // Normalized to be [0, 1].
31 virtual void OnPointerForce(base::TimeTicks time_stamp, float force) = 0;
32
33 // Called when the tilt of a pen/stylus changes. Measured from surface normal
34 // as plane angle in degrees, values lie in [-90,90]. A positive x is to the
35 // right and a positive y is towards the user.
36 virtual void OnPointerTilt(base::TimeTicks time_stamp,
37 gfx::Vector2dF tilt) = 0;
38
39 protected:
40 virtual ~PointerStylusDelegate() {}
41 };
42
43 } // namespace exo
44
45 #endif // COMPONENTS_EXO_POINTER_STYLUS_DELEGATE_H_
OLDNEW
« no previous file with comments | « components/exo/pointer.cc ('k') | components/exo/wayland/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698