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

Unified Diff: components/exo/pointer.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, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/exo/pointer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/pointer.h
diff --git a/components/exo/pointer.h b/components/exo/pointer.h
index 5723c1f20362b247369c5024e21295b7d1526b29..183ee9401e45052a34be03d3d35abecb42a36ca9 100644
--- a/components/exo/pointer.h
+++ b/components/exo/pointer.h
@@ -27,6 +27,7 @@ class Widget;
namespace exo {
class PointerDelegate;
+class PointerStylusDelegate;
class Surface;
// This class implements a client pointer that represents one or more input
@@ -46,6 +47,9 @@ class Pointer : public ui::EventHandler,
// pointer location, in surface local coordinates.
void SetCursor(Surface* surface, const gfx::Point& hotspot);
+ // Set delegate for stylus events.
+ void SetStylusDelegate(PointerStylusDelegate* delegate);
+
// Overridden from ui::EventHandler:
void OnMouseEvent(ui::MouseEvent* event) override;
void OnScrollEvent(ui::ScrollEvent* event) override;
@@ -73,6 +77,9 @@ class Pointer : public ui::EventHandler,
// The delegate instance that all events are dispatched to.
PointerDelegate* const delegate_;
+ // The delegate instance that all stylus related events are dispatched to.
+ PointerStylusDelegate* stylus_delegate_ = nullptr;
+
// The widget for the pointer cursor.
std::unique_ptr<views::Widget> widget_;
@@ -91,6 +98,15 @@ class Pointer : public ui::EventHandler,
// The position of the pointer surface relative to the pointer location.
gfx::Point hotspot_;
+ // The current pointer type.
+ ui::EventPointerType pointer_type_;
+
+ // The current pointer tilt.
+ gfx::Vector2dF tilt_;
+
+ // The current pointer force.
+ float force_;
+
DISALLOW_COPY_AND_ASSIGN(Pointer);
};
« no previous file with comments | « no previous file | components/exo/pointer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698