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"
11 namespace ozonewayland {
14 class WaylandDispatcher;
17 class WaylandPointer {
22 void OnSeatCapabilities(wl_seat *seat, uint32_t caps);
23 WaylandCursor* Cursor() { return cursor_; }
26 static void OnMotionNotify(
28 wl_pointer* input_pointer,
33 static void OnButtonNotify(
35 wl_pointer* input_pointer,
41 static void OnAxisNotify(
43 wl_pointer* input_pointer,
48 static void OnPointerEnter(
50 wl_pointer* input_pointer,
56 static void OnPointerLeave(
58 wl_pointer* input_pointer,
62 WaylandCursor* cursor_;
63 WaylandDispatcher* dispatcher_;
64 // Keeps track of current focused window.
65 unsigned focused_window_handle_;
66 // Keeps track of the last position for the motion event. We want to
67 // dispatch this with events such as wheel or button which don't have a
68 // position associated on Wayland.
69 gfx::Point pointer_position_;
71 DISALLOW_COPY_AND_ASSIGN(WaylandPointer);
74 } // namespace ozonewayland
76 #endif // OZONE_WAYLAND_INPUT_POINTER_H_