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

Unified Diff: ui/gfx/rect.h

Issue 7464027: Wayland support for views. views_desktop on Wayland. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Merged native_menu_wayland and native_menu_x and styling fixes Created 9 years, 4 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/gfx/rect.h
diff --git a/ui/gfx/rect.h b/ui/gfx/rect.h
index fdb30880e59a451aaa343f35e810b7d6233a20b4..f47456fedc5d9d2623c72c44db0db078fc6151d0 100644
--- a/ui/gfx/rect.h
+++ b/ui/gfx/rect.h
@@ -24,6 +24,10 @@ typedef struct tagRECT RECT;
typedef struct _GdkRectangle GdkRectangle;
#endif
+#if defined(USE_WAYLAND)
+typedef struct _cairo_rectangle_int cairo_rectangle_int_t;
+#endif
+
namespace gfx {
class Insets;
@@ -40,6 +44,9 @@ class UI_EXPORT Rect {
#elif defined(USE_X11)
explicit Rect(const GdkRectangle& r);
#endif
+#if defined(USE_WAYLAND)
+ explicit Rect(const cairo_rectangle_int_t& r);
+#endif
explicit Rect(const gfx::Size& size);
Rect(const gfx::Point& origin, const gfx::Size& size);
@@ -52,6 +59,9 @@ class UI_EXPORT Rect {
#elif defined(USE_X11)
Rect& operator=(const GdkRectangle& r);
#endif
+#if defined(USE_WAYLAND)
+ Rect& operator=(const cairo_rectangle_int_t& r);
+#endif
int x() const { return origin_.x(); }
void set_x(int x) { origin_.set_x(x); }
@@ -119,6 +129,9 @@ class UI_EXPORT Rect {
// Construct an equivalent CoreGraphics object.
CGRect ToCGRect() const;
#endif
+#if defined(USE_WAYLAND)
+ cairo_rectangle_int_t ToCairoRectangle() const;
+#endif
// Returns true if the point identified by point_x and point_y falls inside
// this rectangle. The point (x, y) is inside the rectangle, but the

Powered by Google App Engine
This is Rietveld 408576698