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 "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 #include "ui/aura/aura_export.h" | 9 #include "ui/aura/aura_export.h" |
10 #include "ui/base/cursor/cursor.h" | 10 #include "ui/base/cursor/cursor.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 54 |
55 // Makes mouse events stop being sent and hides the cursor if it is visible. | 55 // Makes mouse events stop being sent and hides the cursor if it is visible. |
56 virtual void DisableMouseEvents() = 0; | 56 virtual void DisableMouseEvents() = 0; |
57 | 57 |
58 // Returns true if mouse events are enabled. | 58 // Returns true if mouse events are enabled. |
59 virtual bool IsMouseEventsEnabled() const = 0; | 59 virtual bool IsMouseEventsEnabled() const = 0; |
60 | 60 |
61 // Sets the display for the cursor. | 61 // Sets the display for the cursor. |
62 virtual void SetDisplay(const display::Display& display) = 0; | 62 virtual void SetDisplay(const display::Display& display) = 0; |
63 | 63 |
| 64 // Returns the display where the cursor is located. |
| 65 virtual const display::Display& GetDisplay() const = 0; |
| 66 |
64 // Locks the cursor change. The cursor type, cursor visibility, and mouse | 67 // Locks the cursor change. The cursor type, cursor visibility, and mouse |
65 // events enable state never change as long as lock is held by anyone. | 68 // events enable state never change as long as lock is held by anyone. |
66 virtual void LockCursor() = 0; | 69 virtual void LockCursor() = 0; |
67 | 70 |
68 // Unlocks the cursor change. If all the locks are released, the cursor type, | 71 // Unlocks the cursor change. If all the locks are released, the cursor type, |
69 // cursor visibility, and mouse events enable state are restored to the ones | 72 // cursor visibility, and mouse events enable state are restored to the ones |
70 // set by the lastest call of SetCursor, ShowCursor/HideCursor, and | 73 // set by the lastest call of SetCursor, ShowCursor/HideCursor, and |
71 // EnableMouseEvents/DisableMouseEvents. | 74 // EnableMouseEvents/DisableMouseEvents. |
72 virtual void UnlockCursor() = 0; | 75 virtual void UnlockCursor() = 0; |
73 | 76 |
(...skipping 13 matching lines...) Expand all Loading... |
87 | 90 |
88 // Sets/Gets the activation client for the specified window. | 91 // Sets/Gets the activation client for the specified window. |
89 AURA_EXPORT void SetCursorClient(Window* window, | 92 AURA_EXPORT void SetCursorClient(Window* window, |
90 CursorClient* client); | 93 CursorClient* client); |
91 AURA_EXPORT CursorClient* GetCursorClient(Window* window); | 94 AURA_EXPORT CursorClient* GetCursorClient(Window* window); |
92 | 95 |
93 } // namespace client | 96 } // namespace client |
94 } // namespace aura | 97 } // namespace aura |
95 | 98 |
96 #endif // UI_AURA_CLIENT_CURSOR_CLIENT_H_ | 99 #endif // UI_AURA_CLIENT_CURSOR_CLIENT_H_ |
OLD | NEW |