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" |
11 #include "ui/gfx/native_widget_types.h" | 11 #include "ui/gfx/native_widget_types.h" |
12 | 12 |
13 namespace gfx { | 13 namespace gfx { |
14 class Display; | 14 class Display; |
15 } | 15 } |
16 | 16 |
17 namespace display { | |
18 using Display = gfx::Display; | |
19 } | |
oshima
2016/04/26 07:20:47
This is temporary and will be merged when this con
| |
20 | |
17 namespace ui { | 21 namespace ui { |
18 class KeyEvent; | 22 class KeyEvent; |
19 } | 23 } |
20 | 24 |
21 namespace aura { | 25 namespace aura { |
22 class Window; | 26 class Window; |
23 namespace client { | 27 namespace client { |
24 class CursorClientObserver; | 28 class CursorClientObserver; |
25 | 29 |
26 // An interface that receives cursor change events. | 30 // An interface that receives cursor change events. |
(...skipping 25 matching lines...) Expand all Loading... | |
52 // with DisableMouseEvents. | 56 // with DisableMouseEvents. |
53 virtual void EnableMouseEvents() = 0; | 57 virtual void EnableMouseEvents() = 0; |
54 | 58 |
55 // Makes mouse events stop being sent and hides the cursor if it is visible. | 59 // Makes mouse events stop being sent and hides the cursor if it is visible. |
56 virtual void DisableMouseEvents() = 0; | 60 virtual void DisableMouseEvents() = 0; |
57 | 61 |
58 // Returns true if mouse events are enabled. | 62 // Returns true if mouse events are enabled. |
59 virtual bool IsMouseEventsEnabled() const = 0; | 63 virtual bool IsMouseEventsEnabled() const = 0; |
60 | 64 |
61 // Sets the display for the cursor. | 65 // Sets the display for the cursor. |
62 virtual void SetDisplay(const gfx::Display& display) = 0; | 66 virtual void SetDisplay(const display::Display& display) = 0; |
63 | 67 |
64 // Locks the cursor change. The cursor type, cursor visibility, and mouse | 68 // 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. | 69 // events enable state never change as long as lock is held by anyone. |
66 virtual void LockCursor() = 0; | 70 virtual void LockCursor() = 0; |
67 | 71 |
68 // Unlocks the cursor change. If all the locks are released, the cursor type, | 72 // 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 | 73 // cursor visibility, and mouse events enable state are restored to the ones |
70 // set by the lastest call of SetCursor, ShowCursor/HideCursor, and | 74 // set by the lastest call of SetCursor, ShowCursor/HideCursor, and |
71 // EnableMouseEvents/DisableMouseEvents. | 75 // EnableMouseEvents/DisableMouseEvents. |
72 virtual void UnlockCursor() = 0; | 76 virtual void UnlockCursor() = 0; |
(...skipping 14 matching lines...) Expand all Loading... | |
87 | 91 |
88 // Sets/Gets the activation client for the specified window. | 92 // Sets/Gets the activation client for the specified window. |
89 AURA_EXPORT void SetCursorClient(Window* window, | 93 AURA_EXPORT void SetCursorClient(Window* window, |
90 CursorClient* client); | 94 CursorClient* client); |
91 AURA_EXPORT CursorClient* GetCursorClient(Window* window); | 95 AURA_EXPORT CursorClient* GetCursorClient(Window* window); |
92 | 96 |
93 } // namespace client | 97 } // namespace client |
94 } // namespace aura | 98 } // namespace aura |
95 | 99 |
96 #endif // UI_AURA_CLIENT_CURSOR_CLIENT_H_ | 100 #endif // UI_AURA_CLIENT_CURSOR_CLIENT_H_ |
OLD | NEW |