OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_WINDOW_PLATFORM_WINDOW_H_ |
| 6 #define UI_WINDOW_PLATFORM_WINDOW_H_ |
| 7 |
| 8 #include "ui/base/cursor/cursor.h" |
| 9 #include "ui/gfx/geometry/rect.h" |
| 10 #include "ui/gfx/native_widget_types.h" |
| 11 #include "ui/window/window_export.h" |
| 12 |
| 13 namespace gfx { |
| 14 class Point; |
| 15 } |
| 16 |
| 17 namespace ui { |
| 18 |
| 19 // Platform window. |
| 20 // |
| 21 // Each instance of PlatformWindow represents a single window in the |
| 22 // underlying platform windowing system (i.e. X11/Win/OSX). |
| 23 class WINDOW_EXPORT PlatformWindow { |
| 24 public: |
| 25 PlatformWindow() {} |
| 26 virtual ~PlatformWindow() {} |
| 27 |
| 28 // Get the accelerated widget for this window. This identifier |
| 29 // can be used to create a compositing surface. |
| 30 virtual gfx::AcceleratedWidget GetAcceleratedWidget() = 0; |
| 31 |
| 32 // Show the window. |
| 33 virtual void Show() = 0; |
| 34 |
| 35 // Hide the window. |
| 36 virtual void Hide() = 0; |
| 37 |
| 38 // Get the window bounds within the screen. |
| 39 virtual gfx::Rect GetBounds() const = 0; |
| 40 |
| 41 // Set the window bounds within the screen. |
| 42 virtual void SetBounds(const gfx::Rect& bounds) = 0; |
| 43 |
| 44 // Sets the OS capture to the window. |
| 45 virtual void SetCapture() = 0; |
| 46 |
| 47 // Releases OS capture of the root window. |
| 48 virtual void ReleaseCapture() = 0; |
| 49 |
| 50 // Set the platform cursor. |
| 51 virtual void SetCursor(PlatformCursor cursor) = 0; |
| 52 |
| 53 // Move the platform cursor. |
| 54 virtual void MoveCursorTo(const gfx::Point& location) = 0; |
| 55 |
| 56 private: |
| 57 DISALLOW_COPY_AND_ASSIGN(PlatformWindow); |
| 58 }; |
| 59 |
| 60 } // namespace ui |
| 61 |
| 62 #endif // UI_WINDOW_PLATFORM_WINDOW_H_ |
OLD | NEW |