OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_EXO_POINTER_H_ | 5 #ifndef COMPONENTS_EXO_POINTER_H_ |
6 #define COMPONENTS_EXO_POINTER_H_ | 6 #define COMPONENTS_EXO_POINTER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "components/exo/surface_delegate.h" | 10 #include "components/exo/surface_delegate.h" |
11 #include "components/exo/surface_observer.h" | 11 #include "components/exo/surface_observer.h" |
12 #include "ui/events/event_handler.h" | 12 #include "ui/events/event_handler.h" |
13 #include "ui/gfx/geometry/point.h" | 13 #include "ui/gfx/geometry/point.h" |
14 | 14 |
15 namespace ui { | 15 namespace ui { |
16 class Event; | 16 class Event; |
17 class MouseEvent; | 17 class MouseEvent; |
18 class MouseWheelEvent; | 18 class MouseWheelEvent; |
19 } | 19 } |
20 | 20 |
21 namespace views { | 21 namespace views { |
22 class Widget; | 22 class Widget; |
23 } | 23 } |
24 | 24 |
25 namespace exo { | 25 namespace exo { |
26 class Buffer; | |
27 class PointerDelegate; | 26 class PointerDelegate; |
28 class Surface; | 27 class Surface; |
29 | 28 |
30 // This class implements a client pointer that represents one or more input | 29 // This class implements a client pointer that represents one or more input |
31 // devices, such as mice, which control the pointer location and pointer focus. | 30 // devices, such as mice, which control the pointer location and pointer focus. |
32 class Pointer : public ui::EventHandler, | 31 class Pointer : public ui::EventHandler, |
33 public SurfaceDelegate, | 32 public SurfaceDelegate, |
34 public SurfaceObserver { | 33 public SurfaceObserver { |
35 public: | 34 public: |
36 explicit Pointer(PointerDelegate* delegate); | 35 explicit Pointer(PointerDelegate* delegate); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 | 71 |
73 // The current focus surface for the pointer. | 72 // The current focus surface for the pointer. |
74 Surface* focus_; | 73 Surface* focus_; |
75 | 74 |
76 // The location of the pointer in the current focus surface. | 75 // The location of the pointer in the current focus surface. |
77 gfx::Point location_; | 76 gfx::Point location_; |
78 | 77 |
79 // The position of the pointer surface relative to the pointer location. | 78 // The position of the pointer surface relative to the pointer location. |
80 gfx::Point hotspot_; | 79 gfx::Point hotspot_; |
81 | 80 |
82 // The default cursor surface. | |
83 scoped_ptr<Surface> default_surface_; | |
84 scoped_ptr<Buffer> default_cursor_; | |
85 | |
86 DISALLOW_COPY_AND_ASSIGN(Pointer); | 81 DISALLOW_COPY_AND_ASSIGN(Pointer); |
87 }; | 82 }; |
88 | 83 |
89 } // namespace exo | 84 } // namespace exo |
90 | 85 |
91 #endif // COMPONENTS_EXO_POINTER_H_ | 86 #endif // COMPONENTS_EXO_POINTER_H_ |
OLD | NEW |