diff options
Diffstat (limited to 'ui/gfx/rect.h')
-rw-r--r-- | ui/gfx/rect.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ui/gfx/rect.h b/ui/gfx/rect.h index fdb3088..f47456f 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 |