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