| 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 aura { | 17 namespace aura { | 
| 18 class Window; | 18 class Window; | 
| 19 namespace client { | 19 namespace client { | 
| 20 class CursorClientObserver; | 20 class CursorClientObserver; | 
| 21 | 21 | 
| 22 // An interface that receives cursor change events. | 22 // An interface that receives cursor change events. | 
| 23 class AURA_EXPORT CursorClient { | 23 class AURA_EXPORT CursorClient { | 
| 24  public: | 24  public: | 
| 25   // Notes that |window| has requested the change to |cursor|. | 25   // Notes that |window| has requested the change to |cursor|. | 
| 26   virtual void SetCursor(gfx::NativeCursor cursor) = 0; | 26   virtual void SetCursor(gfx::NativeCursor cursor) = 0; | 
| 27 | 27 | 
|  | 28   // Returns the current cursor. | 
|  | 29   virtual gfx::NativeCursor GetCursor() const = 0; | 
|  | 30 | 
| 28   // Shows the cursor. This does not take effect When mouse events are disabled. | 31   // Shows the cursor. This does not take effect When mouse events are disabled. | 
| 29   virtual void ShowCursor() = 0; | 32   virtual void ShowCursor() = 0; | 
| 30 | 33 | 
| 31   // Hides the cursor. Mouse events keep being sent even when the cursor is | 34   // Hides the cursor. Mouse events keep being sent even when the cursor is | 
| 32   // invisible. | 35   // invisible. | 
| 33   virtual void HideCursor() = 0; | 36   virtual void HideCursor() = 0; | 
| 34 | 37 | 
| 35   // Sets the scale of the mouse cursor icon. | 38   // Sets the scale of the mouse cursor icon. | 
| 36   virtual void SetScale(float scale) = 0; | 39   virtual void SetScale(float scale) = 0; | 
| 37 | 40 | 
|  | 41   // Gets the current scale of the mouse cursor icon. | 
|  | 42   virtual float GetScale() const = 0; | 
|  | 43 | 
| 38   // Sets the type of the mouse cursor icon. | 44   // Sets the type of the mouse cursor icon. | 
| 39   virtual void SetCursorSet(ui::CursorSetType cursor_set) = 0; | 45   virtual void SetCursorSet(ui::CursorSetType cursor_set) = 0; | 
| 40 | 46 | 
|  | 47   // Gets the type of the mouse cursor icon. | 
|  | 48   virtual ui::CursorSetType GetCursorSet() const = 0; | 
|  | 49 | 
| 41   // Gets whether the cursor is visible. | 50   // Gets whether the cursor is visible. | 
| 42   virtual bool IsCursorVisible() const = 0; | 51   virtual bool IsCursorVisible() const = 0; | 
| 43 | 52 | 
| 44   // Makes mouse events start being sent and shows the cursor if it was hidden | 53   // Makes mouse events start being sent and shows the cursor if it was hidden | 
| 45   // with DisableMouseEvents. | 54   // with DisableMouseEvents. | 
| 46   virtual void EnableMouseEvents() = 0; | 55   virtual void EnableMouseEvents() = 0; | 
| 47 | 56 | 
| 48   // Makes mouse events stop being sent and hides the cursor if it is visible. | 57   // Makes mouse events stop being sent and hides the cursor if it is visible. | 
| 49   virtual void DisableMouseEvents() = 0; | 58   virtual void DisableMouseEvents() = 0; | 
| 50 | 59 | 
| (...skipping 26 matching lines...) Expand all  Loading... | 
| 77 | 86 | 
| 78 // Sets/Gets the activation client for the specified window. | 87 // Sets/Gets the activation client for the specified window. | 
| 79 AURA_EXPORT void SetCursorClient(Window* window, | 88 AURA_EXPORT void SetCursorClient(Window* window, | 
| 80                                  CursorClient* client); | 89                                  CursorClient* client); | 
| 81 AURA_EXPORT CursorClient* GetCursorClient(Window* window); | 90 AURA_EXPORT CursorClient* GetCursorClient(Window* window); | 
| 82 | 91 | 
| 83 }  // namespace client | 92 }  // namespace client | 
| 84 }  // namespace aura | 93 }  // namespace aura | 
| 85 | 94 | 
| 86 #endif  // UI_AURA_CLIENT_CURSOR_CLIENT_H_ | 95 #endif  // UI_AURA_CLIENT_CURSOR_CLIENT_H_ | 
| OLD | NEW | 
|---|