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 <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 explicit Pointer(PointerDelegate* delegate); | 39 explicit Pointer(PointerDelegate* delegate); |
40 ~Pointer() override; | 40 ~Pointer() override; |
41 | 41 |
42 // Set the pointer surface, i.e., the surface that contains the pointer image | 42 // Set the pointer surface, i.e., the surface that contains the pointer image |
43 // (cursor). The |hotspot| argument defines the position of the pointer | 43 // (cursor). The |hotspot| argument defines the position of the pointer |
44 // surface relative to the pointer location. Its top-left corner is always at | 44 // surface relative to the pointer location. Its top-left corner is always at |
45 // (x, y) - (hotspot.x, hotspot.y), where (x, y) are the coordinates of the | 45 // (x, y) - (hotspot.x, hotspot.y), where (x, y) are the coordinates of the |
46 // pointer location, in surface local coordinates. | 46 // pointer location, in surface local coordinates. |
47 void SetCursor(Surface* surface, const gfx::Point& hotspot); | 47 void SetCursor(Surface* surface, const gfx::Point& hotspot); |
48 | 48 |
| 49 bool HasStylusDelegate() const; |
49 // Set delegate for stylus events. | 50 // Set delegate for stylus events. |
50 void SetStylusDelegate(PointerStylusDelegate* delegate); | 51 void SetStylusDelegate(PointerStylusDelegate* delegate); |
51 | 52 |
52 // Overridden from ui::EventHandler: | 53 // Overridden from ui::EventHandler: |
53 void OnMouseEvent(ui::MouseEvent* event) override; | 54 void OnMouseEvent(ui::MouseEvent* event) override; |
54 void OnScrollEvent(ui::ScrollEvent* event) override; | 55 void OnScrollEvent(ui::ScrollEvent* event) override; |
55 | 56 |
56 // Overridden from WMHelper::CursorObserver: | 57 // Overridden from WMHelper::CursorObserver: |
57 void OnCursorSetChanged(ui::CursorSetType cursor_set) override; | 58 void OnCursorSetChanged(ui::CursorSetType cursor_set) override; |
58 | 59 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 109 |
109 // True if the pointer is controlled via direct input. | 110 // True if the pointer is controlled via direct input. |
110 bool is_direct_input_ = false; | 111 bool is_direct_input_ = false; |
111 | 112 |
112 DISALLOW_COPY_AND_ASSIGN(Pointer); | 113 DISALLOW_COPY_AND_ASSIGN(Pointer); |
113 }; | 114 }; |
114 | 115 |
115 } // namespace exo | 116 } // namespace exo |
116 | 117 |
117 #endif // COMPONENTS_EXO_POINTER_H_ | 118 #endif // COMPONENTS_EXO_POINTER_H_ |
OLD | NEW |