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.
5 #ifndef UI_VIEWS_COREWM_NATIVE_CURSOR_MANAGER_H_
6 #define UI_VIEWS_COREWM_NATIVE_CURSOR_MANAGER_H_
8 #include "base/strings/string16.h"
9 #include "ui/views/corewm/native_cursor_manager_delegate.h"
10 #include "ui/views/views_export.h"
19 // Interface where platforms such as Ash or Desktop aura are notified of
20 // requested changes to cursor state. When requested, implementer should tell
21 // the CursorManager of any actual state changes performed through the
23 class VIEWS_EXPORT NativeCursorManager {
25 virtual ~NativeCursorManager() {}
27 // A request to set the screen DPI. Can cause changes in the current cursor.
28 virtual void SetDisplay(
29 const gfx::Display& display,
30 views::corewm::NativeCursorManagerDelegate* delegate) = 0;
32 // A request to set the cursor to |cursor|. At minimum, implementer should
33 // call NativeCursorManagerDelegate::CommitCursor() with whatever cursor is
35 virtual void SetCursor(
36 gfx::NativeCursor cursor,
37 views::corewm::NativeCursorManagerDelegate* delegate) = 0;
39 // A request to set the visibility of the cursor. At minimum, implementer
40 // should call NativeCursorManagerDelegate::CommitVisibility() with whatever
42 virtual void SetVisibility(
44 views::corewm::NativeCursorManagerDelegate* delegate) = 0;
46 // A request to set the scale of the cursor icon.
47 virtual void SetScale(
49 views::corewm::NativeCursorManagerDelegate* delegate) = 0;
51 // A request to set the scale of the cursor icon.
52 virtual void SetCursorSet(
53 ui::CursorSetType cursor_set,
54 views::corewm::NativeCursorManagerDelegate* delegate) = 0;
56 // A request to set whether mouse events are disabled. At minimum,
57 // implementer should call NativeCursorManagerDelegate::
58 // CommitMouseEventsEnabled() with whether mouse events are actually enabled.
59 virtual void SetMouseEventsEnabled(
61 views::corewm::NativeCursorManagerDelegate* delegate) = 0;
67 #endif // UI_VIEWS_COREWM_NATIVE_CURSOR_MANAGER_H_