Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1496)

Unified Diff: ui/wayland/wayland_window.h

Issue 7457023: Adding a Wayland basic toolkit (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/wayland/wayland_window.h
diff --git a/ui/wayland/wayland_window.h b/ui/wayland/wayland_window.h
new file mode 100644
index 0000000000000000000000000000000000000000..d320a7bcd5658ff822080028627513e258b45a3d
--- /dev/null
+++ b/ui/wayland/wayland_window.h
@@ -0,0 +1,57 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WAYLAND_WINDOW_H_
+#define WAYLAND_WINDOW_H_
+
+#include <stdint.h>
+
+#include "wayland_geometry_utils.h"
+
+class WaylandDisplay;
+class WaylandWidget;
+struct wl_surface;
+
+/*
+WaylandWindow wraps a wl_surface and some basic operations for the surface.
+WaylandWindow also keeps track of the WaylandWidget that will process all
+events related to the window.
+*/
+class WaylandWindow {
+ public:
+ // Creates a toplevel window
+ WaylandWindow(WaylandWidget* widget, WaylandDisplay* display);
+ // Creates a transient window
+ WaylandWindow(WaylandWidget* widget, WaylandDisplay* display,
+ WaylandWindow* parent, int32_t x, int32_t y);
+ virtual ~WaylandWindow();
+
+ void SetVisible(bool visible);
+ bool IsVisible() const;
+
+ void SetFullscreen(bool fullscreen);
+ bool IsFullscreen() const;
+
+ WaylandWindow* GetParentWindow() const;
+
+ WaylandWidget* GetWidget() const;
+ struct wl_surface* GetSurface() const;
+
+ void Configure(uint32_t time, uint32_t edges, int32_t x, int32_t y,
+ int32_t width, int32_t height);
+ private:
+ WaylandWidget* widget_;
+ WaylandDisplay* display_;
+
+ struct wl_surface* surface_;
+
+ bool fullscreen_;
+
+ WaylandWindow* parent_window_;
+ // Position relative to parent window. This is only used by
+ // a transient window.
+ Point relative_position_;
+};
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698