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; |
26 class PointerDelegate; | 27 class PointerDelegate; |
27 class Surface; | 28 class Surface; |
28 | 29 |
29 // This class implements a client pointer that represents one or more input | 30 // This class implements a client pointer that represents one or more input |
30 // devices, such as mice, which control the pointer location and pointer focus. | 31 // devices, such as mice, which control the pointer location and pointer focus. |
31 class Pointer : public ui::EventHandler, | 32 class Pointer : public ui::EventHandler, |
32 public SurfaceDelegate, | 33 public SurfaceDelegate, |
33 public SurfaceObserver { | 34 public SurfaceObserver { |
34 public: | 35 public: |
35 explicit Pointer(PointerDelegate* delegate); | 36 explicit Pointer(PointerDelegate* delegate); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 | 72 |
72 // The current focus surface for the pointer. | 73 // The current focus surface for the pointer. |
73 Surface* focus_; | 74 Surface* focus_; |
74 | 75 |
75 // The location of the pointer in the current focus surface. | 76 // The location of the pointer in the current focus surface. |
76 gfx::Point location_; | 77 gfx::Point location_; |
77 | 78 |
78 // The position of the pointer surface relative to the pointer location. | 79 // The position of the pointer surface relative to the pointer location. |
79 gfx::Point hotspot_; | 80 gfx::Point hotspot_; |
80 | 81 |
| 82 // The default cursor surface. |
| 83 scoped_ptr<Surface> default_surface_; |
| 84 scoped_ptr<Buffer> default_cursor_; |
| 85 |
81 DISALLOW_COPY_AND_ASSIGN(Pointer); | 86 DISALLOW_COPY_AND_ASSIGN(Pointer); |
82 }; | 87 }; |
83 | 88 |
84 } // namespace exo | 89 } // namespace exo |
85 | 90 |
86 #endif // COMPONENTS_EXO_POINTER_H_ | 91 #endif // COMPONENTS_EXO_POINTER_H_ |
OLD | NEW |