summaryrefslogtreecommitdiff
path: root/gdk/gdkrectangle.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdk/gdkrectangle.c')
-rw-r--r--gdk/gdkrectangle.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/gdk/gdkrectangle.c b/gdk/gdkrectangle.c
index 404ffcad79..84abd2ffd7 100644
--- a/gdk/gdkrectangle.c
+++ b/gdk/gdkrectangle.c
@@ -133,6 +133,27 @@ gdk_rectangle_intersect (const GdkRectangle *src1,
return return_val;
}
+/**
+ * gdk_rectangle_equal:
+ * @rect1: a #GdkRectangle
+ * @rect2: a #GdkRectangle
+ *
+ * Checks if the two given rectangles are equal.
+ *
+ * Returns: %TRUE if the rectangles are equal.
+ *
+ * Since: 3.20
+ */
+gboolean
+gdk_rectangle_equal (const GdkRectangle *rect1,
+ const GdkRectangle *rect2)
+{
+ return rect1->x == rect2->x
+ && rect1->y == rect2->y
+ && rect1->width == rect2->width
+ && rect1->height == rect2->height;
+}
+
static GdkRectangle *
gdk_rectangle_copy (const GdkRectangle *rectangle)
{