764013f8f8574a997d293017e1ffbb8ae4d64c09
[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   virtual void InitializeShellSurface(WaylandWindow* window) OVERRIDE;
24   virtual void UpdateShellSurface(WaylandWindow::ShellType type,
25                                   WaylandShellSurface* shell_parent,
26                                   unsigned x,
27                                   unsigned y) OVERRIDE;
28   virtual void SetWindowTitle(const base::string16& title) OVERRIDE;
29   virtual void Maximize() OVERRIDE;
30   virtual void Minimize() OVERRIDE;
31
32   static void HandleConfigure(void* data,
33                               struct xdg_surface* xdg_surface,
34                               int32_t width,
35                               int32_t height);
36   static void HandleChangeState(void* data,
37                                 struct xdg_surface* xdg_surface,
38                                 uint32_t state,
39                                 uint32_t value,
40                                 uint32_t serial);
41   static void HandleActivate(void* data,
42                              struct xdg_surface* xdg_surface);
43   static void HandleDeactivate(void* data,
44                                struct xdg_surface* xdg_surface);
45   static void HandleDelete(void* data,
46                            struct xdg_surface* xdg_surface);
47
48   static void HandlePopupPopupDone(void* data,
49                                    struct xdg_popup* xdg_popup,
50                                    uint32_t serial);
51
52  private:
53   xdg_surface* xdg_surface_;
54   xdg_popup* xdg_popup_;
55   bool maximized_;
56   DISALLOW_COPY_AND_ASSIGN(XDGShellSurface);
57 };
58
59
60 }  // namespace ozonewayland
61
62 #endif  // OZONE_WAYLAND_SHELL_XDG_SURFACE_H_