1 // Copyright 2013 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_SURFACE_H_
6 #define OZONE_WAYLAND_SHELL_SHELL_SURFACE_H_
8 #include <wayland-client.h>
10 #include "base/basictypes.h"
11 #include "ozone/wayland/window.h"
13 namespace ozonewayland {
17 class WaylandShellSurface {
19 WaylandShellSurface();
20 virtual ~WaylandShellSurface();
22 struct wl_surface* GetWLSurface() const;
24 // The implementation should initialize the shell and set up all
25 // necessary callbacks.
26 virtual void InitializeShellSurface(WaylandWindow* window) = 0;
27 virtual void UpdateShellSurface(WaylandWindow::ShellType type,
28 WaylandShellSurface* shell_parent,
31 virtual void SetWindowTitle(const base::string16& title) = 0;
32 virtual void Maximize() = 0;
33 virtual void Minimize() = 0;
34 virtual void Unminimize() = 0;
35 virtual bool IsMinimized() const = 0;
38 static void PopupDone();
39 static void WindowResized(void *data, unsigned width, unsigned height);
40 static void WindowActivated(void *data);
43 void FlushDisplay() const;
46 struct wl_surface* surface_;
47 DISALLOW_COPY_AND_ASSIGN(WaylandShellSurface);
50 } // namespace ozonewayland
52 #endif // OZONE_WAYLAND_SHELL_SHELL_SURFACE_H_