Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / ozone / platform / ozone_wayland_window.h
1 // Copyright 2014 Intel Corporation. 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 OZONE_PLATFORM_OZONE_WAYLAND_WINDOW_H_
6 #define OZONE_PLATFORM_OZONE_WAYLAND_WINDOW_H_
7
8 #include "ui/gfx/geometry/rect.h"
9 #include "ui/gfx/native_widget_types.h"
10 #include "ui/platform_window/platform_window.h"
11
12 namespace views {
13 class WindowTreeHostDelegateWayland;
14 }
15
16 namespace ui {
17
18 class PlatformWindowDelegate;
19
20 class OzoneWaylandWindow : public PlatformWindow {
21  public:
22   OzoneWaylandWindow(PlatformWindowDelegate* delegate,
23                      const gfx::Rect& bounds);
24   virtual ~OzoneWaylandWindow();
25
26   unsigned GetHandle() const { return handle_; }
27   PlatformWindowDelegate* GetDelegate() const { return delegate_; }
28
29   // PlatformWindow:
30   void InitPlatformWindow(PlatformWindowType type,
31                           gfx::AcceleratedWidget parent_window) override;
32   gfx::Rect GetBounds() override;
33   void SetBounds(const gfx::Rect& bounds) override;
34   void Show() override;
35   void Hide() override;
36   void Close() override;
37   void SetCapture() override;
38   void ReleaseCapture() override;
39   void ToggleFullscreen() override;
40   void Maximize() override;
41   void Minimize() override;
42   void Restore() override;
43   void SetCursor(PlatformCursor cursor) override;
44   void MoveCursorTo(const gfx::Point& location) override;
45
46  private:
47   PlatformWindowDelegate* delegate_;
48   gfx::Rect bounds_;
49   unsigned handle_;
50
51   static views::WindowTreeHostDelegateWayland* g_delegate_ozone_wayland_;
52   DISALLOW_COPY_AND_ASSIGN(OzoneWaylandWindow);
53 };
54
55 }  // namespace ui
56
57 #endif  // OZONE_PLATFORM_OZONE_WAYLAND_WINDOW_H_