| Index: ui/window/platform_window.h
|
| diff --git a/ui/window/platform_window.h b/ui/window/platform_window.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..0f35ddb1080cc4fa6659fbca6eabec77bc54dd3e
|
| --- /dev/null
|
| +++ b/ui/window/platform_window.h
|
| @@ -0,0 +1,62 @@
|
| +// Copyright (c) 2014 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_WINDOW_PLATFORM_WINDOW_H_
|
| +#define UI_WINDOW_PLATFORM_WINDOW_H_
|
| +
|
| +#include "ui/base/cursor/cursor.h"
|
| +#include "ui/gfx/geometry/rect.h"
|
| +#include "ui/gfx/native_widget_types.h"
|
| +#include "ui/window/window_export.h"
|
| +
|
| +namespace gfx {
|
| +class Point;
|
| +}
|
| +
|
| +namespace ui {
|
| +
|
| +// Platform window.
|
| +//
|
| +// Each instance of PlatformWindow represents a single window in the
|
| +// underlying platform windowing system (i.e. X11/Win/OSX).
|
| +class WINDOW_EXPORT PlatformWindow {
|
| + public:
|
| + PlatformWindow() {}
|
| + virtual ~PlatformWindow() {}
|
| +
|
| + // Get the accelerated widget for this window. This identifier
|
| + // can be used to create a compositing surface.
|
| + virtual gfx::AcceleratedWidget GetAcceleratedWidget() = 0;
|
| +
|
| + // Show the window.
|
| + virtual void Show() = 0;
|
| +
|
| + // Hide the window.
|
| + virtual void Hide() = 0;
|
| +
|
| + // Get the window bounds within the screen.
|
| + virtual gfx::Rect GetBounds() const = 0;
|
| +
|
| + // Set the window bounds within the screen.
|
| + virtual void SetBounds(const gfx::Rect& bounds) = 0;
|
| +
|
| + // Sets the OS capture to the window.
|
| + virtual void SetCapture() = 0;
|
| +
|
| + // Releases OS capture of the root window.
|
| + virtual void ReleaseCapture() = 0;
|
| +
|
| + // Set the platform cursor.
|
| + virtual void SetCursor(PlatformCursor cursor) = 0;
|
| +
|
| + // Move the platform cursor.
|
| + virtual void MoveCursorTo(const gfx::Point& location) = 0;
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(PlatformWindow);
|
| +};
|
| +
|
| +} // namespace ui
|
| +
|
| +#endif // UI_WINDOW_PLATFORM_WINDOW_H_
|
|
|