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

Unified Diff: ui/ozone/platform/wayland/wayland_pointer.h

Issue 1712103002: ozone/platform/wayland: Implement pointer handling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 9 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 | « ui/ozone/platform/wayland/wayland_object.cc ('k') | ui/ozone/platform/wayland/wayland_pointer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/wayland/wayland_pointer.h
diff --git a/ui/ozone/platform/wayland/wayland_pointer.h b/ui/ozone/platform/wayland/wayland_pointer.h
new file mode 100644
index 0000000000000000000000000000000000000000..bee75a9e4bb479b2c51a94a0a6d762144ae1bc6b
--- /dev/null
+++ b/ui/ozone/platform/wayland/wayland_pointer.h
@@ -0,0 +1,56 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_OZONE_PLATFORM_WAYLAND_WAYLAND_POINTER_H_
+#define UI_OZONE_PLATFORM_WAYLAND_WAYLAND_POINTER_H_
+
+#include "ui/events/ozone/evdev/event_dispatch_callback.h"
+#include "ui/gfx/geometry/point_f.h"
+#include "ui/ozone/platform/wayland/wayland_object.h"
+
+namespace ui {
+
+class WaylandPointer {
+ public:
+ WaylandPointer(wl_pointer* pointer, const EventDispatchCallback& callback);
+ virtual ~WaylandPointer();
+
+ private:
+ // wl_pointer_listener
+ static void Enter(void* data,
+ wl_pointer* obj,
+ uint32_t serial,
+ wl_surface* surface,
+ wl_fixed_t surface_x,
+ wl_fixed_t surface_y);
+ static void Leave(void* data,
+ wl_pointer* obj,
+ uint32_t serial,
+ wl_surface* surface);
+ static void Motion(void* data,
+ wl_pointer* obj,
+ uint32_t time,
+ wl_fixed_t surface_x,
+ wl_fixed_t surface_y);
+ static void Button(void* data,
+ wl_pointer* obj,
+ uint32_t serial,
+ uint32_t time,
+ uint32_t button,
+ uint32_t state);
+ static void Axis(void* data,
+ wl_pointer* obj,
+ uint32_t time,
+ uint32_t axis,
+ wl_fixed_t value);
+
+ wl::Object<wl_pointer> obj_;
+ EventDispatchCallback callback_;
+ gfx::PointF location_;
+ int flags_ = 0;
+};
+
+} // namespace ui
+
+#endif // UI_OZONE_PLATFORM_WAYLAND_WAYLAND_POINTER_H_
« no previous file with comments | « ui/ozone/platform/wayland/wayland_object.cc ('k') | ui/ozone/platform/wayland/wayland_pointer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698