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.
5 #ifndef OZONE_WAYLAND_SHELL_SHELL_H_
6 #define OZONE_WAYLAND_SHELL_SHELL_H_
8 #include <wayland-client.h>
10 #include "base/basictypes.h"
11 #include "ozone/wayland/window.h"
14 namespace ozonewayland {
16 class WaylandShellSurface;
23 // Creates shell surface for a given WaylandWindow. This can be either
24 // wl_shell, xdg_shell or any shell which supports wayland protocol.
25 // Ownership is passed to the caller.
26 WaylandShellSurface* CreateShellSurface(WaylandWindow* parent,
27 WaylandWindow::ShellType type);
28 void Initialize(struct wl_registry *registry,
30 const char *interface,
33 wl_shell* GetWLShell() const { return shell_; }
34 xdg_shell* GetXDGShell() const { return xdg_shell_; }
37 #if defined(ENABLE_XDG_SHELL)
38 static void XDGHandlePing(void* data,
39 struct xdg_shell* xdg_shell,
43 xdg_shell* xdg_shell_;
44 DISALLOW_COPY_AND_ASSIGN(WaylandShell);
47 } // namespace ozonewayland
49 #endif // OZONE_WAYLAND_SHELL_H_