Chromium Code Reviews| Index: ui/aura/client/cursor_client.h |
| diff --git a/ui/aura/client/cursor_client.h b/ui/aura/client/cursor_client.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..855e1f82931782a3780b5a31fee88c9f4a5abbcd |
| --- /dev/null |
| +++ b/ui/aura/client/cursor_client.h |
| @@ -0,0 +1,39 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef UI_AURA_CLIENT_CURSOR_CLIENT_H_ |
| +#define UI_AURA_CLIENT_CURSOR_CLIENT_H_ |
| + |
| +#include "ui/aura/aura_export.h" |
| +#include "ui/gfx/native_widget_types.h" |
| + |
| +namespace aura { |
| +class Window; |
| +namespace client { |
| + |
| +// An interface that receives cursor change events. |
| +class AURA_EXPORT CursorClient { |
| + public: |
| + // Notes that |window| has requested the change to |cursor|. |
| + virtual void SetCursor(gfx::NativeCursor cursor) = 0; |
| + |
| + // Changes the visibility of the cursor. |
| + virtual void ShowCursor(bool show) = 0; |
| + |
| + // Gets whether the cursor is visible. |
| + virtual bool GetVisible() const = 0; |
|
oshima
2012/07/11 23:32:08
I slightly prefer Is{Cursor}Visible, but I'll leav
|
| + |
| + protected: |
| + virtual ~CursorClient() {} |
| +}; |
| + |
| +// Sets/Gets the activation client for the specified window. |
| +AURA_EXPORT void SetCursorClient(Window* window, |
| + CursorClient* client); |
| +AURA_EXPORT CursorClient* GetCursorClient(Window* window); |
| + |
| +} // namespace client |
| +} // namespace aura |
| + |
| +#endif // UI_AURA_CLIENT_CURSOR_CLIENT_H_ |