OLD | NEW |
(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_ |
OLD | NEW |