summaryrefslogtreecommitdiff
path: root/gdk/gdkregion-generic.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-06-28 14:44:12 +0200
committerBenjamin Otte <otte@redhat.com>2010-06-29 16:06:38 +0200
commit3e96cfe8fcfeedabc09b2a8b3aa87007a3b5a2a0 (patch)
treea5b8a39ad674b77e2d1beeb234c0cdd48d218b20 /gdk/gdkregion-generic.c
parent52200eee01cc055adaefb678d6c6f04455d1a593 (diff)
downloadgtk+-3e96cfe8fcfeedabc09b2a8b3aa87007a3b5a2a0.tar.gz
Deprecate the GdkRegion API
Includes fixing all callers to use the cairo region API instead. This is usually just replacing the function names, the only difference is gdk_region_get_rectangles() being replaced by cairo_region_num_rectangles() and cairo_region_get_rectangle() which required a bit more work. https://bugzilla.gnome.org/show_bug.cgi?id=613284
Diffstat (limited to 'gdk/gdkregion-generic.c')
-rw-r--r--gdk/gdkregion-generic.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/gdk/gdkregion-generic.c b/gdk/gdkregion-generic.c
index ff66adcd44..5fe743c0e3 100644
--- a/gdk/gdkregion-generic.c
+++ b/gdk/gdkregion-generic.c
@@ -10,6 +10,8 @@
* Creates a new empty #GdkRegion.
*
* Returns: a new empty #GdkRegion
+ *
+ * Deprecated: 2.22: Use cairo_region_create() instead.
*/
GdkRegion *
gdk_region_new (void)
@@ -24,6 +26,8 @@ gdk_region_new (void)
* Creates a new region containing the area @rectangle.
*
* Return value: a new region
+ *
+ * Deprecated: 2.22: Use cairo_region_create_rectangle()
**/
GdkRegion *
gdk_region_rectangle (const GdkRectangle *rectangle)
@@ -43,6 +47,8 @@ gdk_region_rectangle (const GdkRectangle *rectangle)
* Copies @region, creating an identical new region.
*
* Return value: a new region identical to @region
+ *
+ * Deprecated: 2.22: Use cairo_region_copy()
**/
GdkRegion *
gdk_region_copy (const GdkRegion *region)
@@ -57,6 +63,7 @@ gdk_region_copy (const GdkRegion *region)
*
* Obtains the smallest rectangle which includes the entire #GdkRegion.
*
+ * Deprecated: 2.22: Use cairo_region_get_extents()
*/
void
gdk_region_get_clipbox (const GdkRegion *region,
@@ -77,6 +84,8 @@ gdk_region_get_clipbox (const GdkRegion *region,
*
* Obtains the area covered by the region as a list of rectangles.
* The array returned in @rectangles must be freed with g_free().
+ *
+ * Deprecated: 2.22: Use cairo_region_num_rectangles() and cairo_region_get_rectangle() instead.
**/
void
gdk_region_get_rectangles (const GdkRegion *region,
@@ -110,6 +119,8 @@ gdk_region_get_rectangles (const GdkRegion *region,
* Sets the area of @region to the union of the areas of @region and
* @rect. The resulting area is the set of pixels contained in
* either @region or @rect.
+ *
+ * Deprecated: 2.22: Use cairo_region_union_rectangle() instead.
**/
void
gdk_region_union_with_rect (GdkRegion *region,
@@ -129,6 +140,8 @@ gdk_region_union_with_rect (GdkRegion *region,
* @region: a #GdkRegion
*
* Destroys a #GdkRegion.
+ *
+ * Deprecated: 2.22: Use cairo_region_destroy() instead.
*/
void
gdk_region_destroy (GdkRegion *region)
@@ -146,6 +159,8 @@ gdk_region_destroy (GdkRegion *region)
* @dy: the distance to move the region vertically
*
* Moves a region the specified distance.
+ *
+ * Deprecated: 2.22: Use cairo_region_translate() instead.
*/
void
gdk_region_offset (GdkRegion *region,
@@ -163,6 +178,8 @@ gdk_region_offset (GdkRegion *region,
*
* Resizes a region by the specified amount.
* Positive values shrink the region. Negative values expand it.
+ *
+ * Deprecated: 2.22: There is no replacement for this function.
*/
void
gdk_region_shrink (GdkRegion *region,
@@ -198,6 +215,8 @@ gdk_region_shrink (GdkRegion *region,
* Sets the area of @source1 to the intersection of the areas of @source1
* and @source2. The resulting area is the set of pixels contained in
* both @source1 and @source2.
+ *
+ * Deprecated: 2.22: Use cairo_region_intersect() instead.
**/
void
gdk_region_intersect (GdkRegion *source1,
@@ -217,6 +236,8 @@ gdk_region_intersect (GdkRegion *source1,
* Sets the area of @source1 to the union of the areas of @source1 and
* @source2. The resulting area is the set of pixels contained in
* either @source1 or @source2.
+ *
+ * Deprecated: 2.22: Use cairo_region_union() instead.
**/
void
gdk_region_union (GdkRegion *source1,
@@ -235,6 +256,8 @@ gdk_region_union (GdkRegion *source1,
*
* Subtracts the area of @source2 from the area @source1. The resulting
* area is the set of pixels contained in @source1 but not in @source2.
+ *
+ * Deprecated: 2.22: Use cairo_region_subtract() instead.
**/
void
gdk_region_subtract (GdkRegion *source1,
@@ -254,6 +277,10 @@ gdk_region_subtract (GdkRegion *source1,
* Sets the area of @source1 to the exclusive-OR of the areas of @source1
* and @source2. The resulting area is the set of pixels contained in one
* or the other of the two sources but not in both.
+ *
+ * Deprecated: 2.22: There is no replacement, but the function can be
+ * reimplemented using cairo_region_intersect() and
+ * cairo_region_subract() easily.
**/
void
gdk_region_xor (GdkRegion *source1,
@@ -281,6 +308,8 @@ gdk_region_xor (GdkRegion *source1,
* Finds out if the #GdkRegion is empty.
*
* Returns: %TRUE if @region is empty.
+ *
+ * Deprecated: 2.22: Use cairo_region_is_empty() instead.
*/
gboolean
gdk_region_empty (const GdkRegion *region)
@@ -298,6 +327,8 @@ gdk_region_empty (const GdkRegion *region)
* Finds out if the two regions are the same.
*
* Returns: %TRUE if @region1 and @region2 are equal.
+ *
+ * Deprecated: 2.22: Use cairo_region_equal() instead.
*/
gboolean
gdk_region_equal (const GdkRegion *region1,
@@ -347,6 +378,8 @@ gdk_region_rect_equal (const GdkRegion *region,
* Finds out if a point is in a region.
*
* Returns: %TRUE if the point is in @region.
+ *
+ * Deprecated: 2.22: Use cairo_region_contains_point() instead.
*/
gboolean
gdk_region_point_in (const GdkRegion *region,
@@ -368,6 +401,8 @@ gdk_region_point_in (const GdkRegion *region,
* Returns: %GDK_OVERLAP_RECTANGLE_IN, %GDK_OVERLAP_RECTANGLE_OUT, or
* %GDK_OVERLAP_RECTANGLE_PART, depending on whether the rectangle is inside,
* outside, or partly inside the #GdkRegion, respectively.
+ *
+ * Deprecated: 2.22: Use cairo_region_contains_rectangle() instead.
*/
GdkOverlapType
gdk_region_rect_in (const GdkRegion *region,
@@ -445,6 +480,8 @@ gdk_region_unsorted_spans_intersect_foreach (GdkRegion *region,
* @data: data to pass to @function
*
* Calls a function on each span in the intersection of @region and @spans.
+ *
+ * Deprecated: 2.22: There is no replacement.
*/
void
gdk_region_spans_intersect_foreach (GdkRegion *region,