1 // Copyright 2013 Intel Corporation. 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.
5 #ifndef OZONE_WAYLAND_INPUT_POINTER_H_
6 #define OZONE_WAYLAND_INPUT_POINTER_H_
8 #include "ozone/wayland/display.h"
9 #include "ui/gfx/point.h"
12 class EventConverterOzoneWayland;
15 namespace ozonewayland {
20 class WaylandPointer {
25 void OnSeatCapabilities(wl_seat *seat, uint32_t caps);
26 WaylandCursor* Cursor() const { return cursor_; }
29 static void OnMotionNotify(
31 wl_pointer* input_pointer,
36 static void OnButtonNotify(
38 wl_pointer* input_pointer,
44 static void OnAxisNotify(
46 wl_pointer* input_pointer,
51 static void OnPointerEnter(
53 wl_pointer* input_pointer,
59 static void OnPointerLeave(
61 wl_pointer* input_pointer,
65 WaylandCursor* cursor_;
66 ui::EventConverterOzoneWayland* dispatcher_;
67 // Keeps track of the last position for the motion event. We want to
68 // dispatch this with events such as wheel or button which don't have a
69 // position associated on Wayland.
70 gfx::Point pointer_position_;
71 struct wl_pointer *input_pointer_;
73 DISALLOW_COPY_AND_ASSIGN(WaylandPointer);
76 } // namespace ozonewayland
78 #endif // OZONE_WAYLAND_INPUT_POINTER_H_