OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_AURA_CLIENT_CURSOR_CLIENT_H_ | 5 #ifndef UI_AURA_CLIENT_CURSOR_CLIENT_H_ |
6 #define UI_AURA_CLIENT_CURSOR_CLIENT_H_ | 6 #define UI_AURA_CLIENT_CURSOR_CLIENT_H_ |
7 | 7 |
8 #include "ui/aura/aura_export.h" | 8 #include "ui/aura/aura_export.h" |
9 #include "ui/gfx/native_widget_types.h" | 9 #include "ui/gfx/native_widget_types.h" |
10 | 10 |
11 namespace aura { | 11 namespace aura { |
12 class Window; | 12 class Window; |
13 namespace client { | 13 namespace client { |
14 | 14 |
15 // An interface that receives cursor change events. | 15 // An interface that receives cursor change events. |
16 class AURA_EXPORT CursorClient { | 16 class AURA_EXPORT CursorClient { |
17 public: | 17 public: |
18 // Notes that |window| has requested the change to |cursor|. | 18 // Notes that |window| has requested the change to |cursor|. |
19 virtual void SetCursor(gfx::NativeCursor cursor) = 0; | 19 virtual void SetCursor(gfx::NativeCursor cursor) = 0; |
20 | 20 |
21 // Changes the visibility of the cursor. | 21 // Changes the visibility of the cursor. |
22 virtual void ShowCursor(bool show) = 0; | 22 virtual void ShowCursor(bool show) = 0; |
23 | 23 |
24 // Gets whether the cursor is visible. | 24 // Gets whether the cursor is visible. |
25 virtual bool IsCursorVisible() const = 0; | 25 virtual bool IsCursorVisible() const = 0; |
26 | 26 |
| 27 // Sets the device scale factor of the cursor. |
| 28 virtual void SetDeviceScaleFactor(float scale_factor) = 0; |
| 29 |
27 protected: | 30 protected: |
28 virtual ~CursorClient() {} | 31 virtual ~CursorClient() {} |
29 }; | 32 }; |
30 | 33 |
31 // Sets/Gets the activation client for the specified window. | 34 // Sets/Gets the activation client for the specified window. |
32 AURA_EXPORT void SetCursorClient(Window* window, | 35 AURA_EXPORT void SetCursorClient(Window* window, |
33 CursorClient* client); | 36 CursorClient* client); |
34 AURA_EXPORT CursorClient* GetCursorClient(Window* window); | 37 AURA_EXPORT CursorClient* GetCursorClient(Window* window); |
35 | 38 |
36 } // namespace client | 39 } // namespace client |
37 } // namespace aura | 40 } // namespace aura |
38 | 41 |
39 #endif // UI_AURA_CLIENT_CURSOR_CLIENT_H_ | 42 #endif // UI_AURA_CLIENT_CURSOR_CLIENT_H_ |
OLD | NEW |