OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. 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. |
| 4 |
| 5 #ifndef UI_VIEWS_COREWM_NATIVE_CURSOR_MANAGER_H_ |
| 6 #define UI_VIEWS_COREWM_NATIVE_CURSOR_MANAGER_H_ |
| 7 |
| 8 #include "ui/views/corewm/native_cursor_manager_delegate.h" |
| 9 #include "ui/views/views_export.h" |
| 10 |
| 11 namespace views { |
| 12 namespace corewm { |
| 13 |
| 14 // Interface where platforms such as Ash or Desktop aura are notified of |
| 15 // requested changes to cursor state. When requested, implementer should tell |
| 16 // the CursorManager of any actual state changes performed through the |
| 17 // delegate. |
| 18 class VIEWS_EXPORT NativeCursorManager { |
| 19 public: |
| 20 virtual ~NativeCursorManager() {} |
| 21 |
| 22 // A request to set the screen DPI. Can cause changes in the current cursor. |
| 23 virtual void SetDeviceScaleFactor( |
| 24 float device_scale_factor, |
| 25 views::corewm::NativeCursorManagerDelegate* delegate) = 0; |
| 26 |
| 27 // A request to set the cursor to |cursor|. At minimum, implementer should |
| 28 // call NativeCursorManagerDelegate::CommitCursor() with whatever cursor is |
| 29 // actually used. |
| 30 virtual void SetCursor( |
| 31 gfx::NativeCursor cursor, |
| 32 views::corewm::NativeCursorManagerDelegate* delegate) = 0; |
| 33 |
| 34 // A request to set the visibility of the cursor. At minimum, implementer |
| 35 // should call NativeCursorManagerDelegate::CommitVisibility() with whatever |
| 36 // the visibility is. |
| 37 virtual void SetVisibility( |
| 38 bool visible, |
| 39 views::corewm::NativeCursorManagerDelegate* delegate) = 0; |
| 40 |
| 41 // A request to set whether mouse events are disabled. At minimum, |
| 42 // implementer should call NativeCursorManagerDelegate:: |
| 43 // CommitMouseEventsEnabled() with whether mouse events are actually enabled. |
| 44 virtual void SetMouseEventsEnabled( |
| 45 bool enabled, |
| 46 views::corewm::NativeCursorManagerDelegate* delegate) = 0; |
| 47 }; |
| 48 |
| 49 } // namespace corewm |
| 50 } // namespace views |
| 51 |
| 52 #endif // UI_VIEWS_COREWM_NATIVE_CURSOR_MANAGER_H_ |
OLD | NEW |