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

Side by Side 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 unified diff | Download patch
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 UI_OZONE_PLATFORM_WAYLAND_WAYLAND_POINTER_H_
6 #define UI_OZONE_PLATFORM_WAYLAND_WAYLAND_POINTER_H_
7
8 #include "ui/events/ozone/evdev/event_dispatch_callback.h"
9 #include "ui/gfx/geometry/point_f.h"
10 #include "ui/ozone/platform/wayland/wayland_object.h"
11
12 namespace ui {
13
14 class WaylandPointer {
15 public:
16 WaylandPointer(wl_pointer* pointer, const EventDispatchCallback& callback);
17 virtual ~WaylandPointer();
18
19 private:
20 // wl_pointer_listener
21 static void Enter(void* data,
22 wl_pointer* obj,
23 uint32_t serial,
24 wl_surface* surface,
25 wl_fixed_t surface_x,
26 wl_fixed_t surface_y);
27 static void Leave(void* data,
28 wl_pointer* obj,
29 uint32_t serial,
30 wl_surface* surface);
31 static void Motion(void* data,
32 wl_pointer* obj,
33 uint32_t time,
34 wl_fixed_t surface_x,
35 wl_fixed_t surface_y);
36 static void Button(void* data,
37 wl_pointer* obj,
38 uint32_t serial,
39 uint32_t time,
40 uint32_t button,
41 uint32_t state);
42 static void Axis(void* data,
43 wl_pointer* obj,
44 uint32_t time,
45 uint32_t axis,
46 wl_fixed_t value);
47
48 wl::Object<wl_pointer> obj_;
49 EventDispatchCallback callback_;
50 gfx::PointF location_;
51 int flags_ = 0;
52 };
53
54 } // namespace ui
55
56 #endif // UI_OZONE_PLATFORM_WAYLAND_WAYLAND_POINTER_H_
OLDNEW
« 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