Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / ozone / wayland / shell / xdg_shell_surface.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_WAYLAND_SHELL_XDG_SURFACE_H_
6 #define OZONE_WAYLAND_SHELL_XDG_SURFACE_H_
7
8 #include "ozone/wayland/shell/shell_surface.h"
9
10 struct xdg_surface;
11 struct xdg_popup;
12
13 namespace ozonewayland {
14
15 class WaylandSurface;
16 class WaylandWindow;
17
18 class XDGShellSurface : public WaylandShellSurface {
19  public:
20   XDGShellSurface();
21   virtual ~XDGShellSurface();
22
23   void InitializeShellSurface(WaylandWindow* window,
24                               WaylandWindow::ShellType type) override;
25   void UpdateShellSurface(WaylandWindow::ShellType type,
26                           WaylandShellSurface* shell_parent,
27                           unsigned x,
28                           unsigned y) override;
29   void SetWindowTitle(const base::string16& title) override;
30   void Maximize() override;
31   void Minimize() override;
32   void Unminimize() override;
33   bool IsMinimized() const override;
34
35   static void HandleConfigure(void* data,
36                               struct xdg_surface* xdg_surface,
37                               int32_t width,
38                               int32_t height);
39   static void HandleChangeState(void* data,
40                                 struct xdg_surface* xdg_surface,
41                                 uint32_t state,
42                                 uint32_t value,
43                                 uint32_t serial);
44   static void HandleActivate(void* data,
45                              struct xdg_surface* xdg_surface);
46   static void HandleDeactivate(void* data,
47                                struct xdg_surface* xdg_surface);
48   static void HandleDelete(void* data,
49                            struct xdg_surface* xdg_surface);
50
51   static void HandlePopupPopupDone(void* data,
52                                    struct xdg_popup* xdg_popup,
53                                    uint32_t serial);
54
55  private:
56   xdg_surface* xdg_surface_;
57   xdg_popup* xdg_popup_;
58   bool maximized_;
59   bool minimized_;
60   DISALLOW_COPY_AND_ASSIGN(XDGShellSurface);
61 };
62
63
64 }  // namespace ozonewayland
65
66 #endif  // OZONE_WAYLAND_SHELL_XDG_SURFACE_H_