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 |