Deprecate GdkRegion symbols that have no Cairo equivalent

https://bugzilla.gnome.org/show_bug.cgi?id=613284
This commit is contained in:
Benjamin Otte 2010-06-30 16:25:03 +02:00
parent b404a437c7
commit 807c14741f
4 changed files with 36 additions and 0 deletions

View File

@ -220,7 +220,9 @@ gdk_extension_mode_get_type G_GNUC_CONST
gdk_event_mask_get_type G_GNUC_CONST
gdk_event_type_get_type G_GNUC_CONST
gdk_fill_get_type G_GNUC_CONST
#ifndef GDK_DISABLE_DEPRECATED
gdk_fill_rule_get_type G_GNUC_CONST
#endif
gdk_filter_return_get_type G_GNUC_CONST
gdk_function_get_type G_GNUC_CONST
gdk_grab_status_get_type G_GNUC_CONST
@ -1015,7 +1017,9 @@ gdk_region_copy
gdk_region_destroy
gdk_region_empty
gdk_region_equal
#ifndef GDK_DISABLE_DEPRECATED
gdk_region_rect_equal
#endif
gdk_region_get_clipbox
gdk_region_get_rectangles
gdk_region_intersect
@ -1024,20 +1028,26 @@ gdk_region_offset
gdk_region_point_in
gdk_region_rectangle
gdk_region_rect_in
#ifndef GDK_DISABLE_DEPRECATED
gdk_region_shrink
gdk_region_spans_intersect_foreach
#endif
gdk_region_subtract
gdk_region_union
gdk_region_union_with_rect
#ifndef GDK_DISABLE_DEPRECATED
gdk_region_xor
#endif
#endif
#endif
#if IN_HEADER(__GDK_REGION_H__)
#if IN_FILE(__GDK_POLYREG_GENERIC_C__)
#ifndef GDK_DISABLE_DEPRECATED
gdk_region_polygon
#endif
#endif
#endif
#if IN_HEADER(__GDK_RGB_H__)
#if IN_FILE(__GDK_RGB_C__)

View File

@ -458,6 +458,9 @@ PtsToRegion (int numFullPtBlocks,
* number of points.
*
* Returns: a new #GdkRegion based on the given polygon
*
* Deprecated: 2.22: There is no replacement. For working with paths, please
* use Cairo.
*/
GdkRegion *
gdk_region_polygon (const GdkPoint *points,

View File

@ -469,6 +469,8 @@ Compress(GdkRegion *r,
*
* 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,
@ -1507,6 +1509,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 gdk_region_intersect() and
* gdk_region_subract() easily.
**/
void
gdk_region_xor (GdkRegion *source1,
@ -1591,6 +1597,9 @@ gdk_region_equal (const GdkRegion *region1,
* Returns: %TRUE if @region and @rectangle are equal.
*
* Since: 2.18
*
* Deprecated: 2.22: Use gdk_region_new_rect() and gdk_region_equal() to
* achieve the same effect.
*/
gboolean
gdk_region_rect_equal (const GdkRegion *region,
@ -1804,6 +1813,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,

View File

@ -35,6 +35,7 @@
G_BEGIN_DECLS
#ifndef GDK_DISABLE_DEPRECATED
/* GC fill rule for polygons
* EvenOddRule
* WindingRule
@ -44,6 +45,7 @@ typedef enum
GDK_EVEN_ODD_RULE,
GDK_WINDING_RULE
} GdkFillRule;
#endif
/* Types of overlapping between a rectangle and a region
* GDK_OVERLAP_RECTANGLE_IN: rectangle is in region
@ -57,13 +59,17 @@ typedef enum
GDK_OVERLAP_RECTANGLE_PART
} GdkOverlapType;
#ifndef GDK_DISABLE_DEPRECATED
typedef void (* GdkSpanFunc) (GdkSpan *span,
gpointer data);
#endif
GdkRegion * gdk_region_new (void);
#ifndef GDK_DISABLE_DEPRECATED
GdkRegion * gdk_region_polygon (const GdkPoint *points,
gint n_points,
GdkFillRule fill_rule);
#endif
GdkRegion * gdk_region_copy (const GdkRegion *region);
GdkRegion * gdk_region_rectangle (const GdkRectangle *rectangle);
void gdk_region_destroy (GdkRegion *region);
@ -77,8 +83,10 @@ void gdk_region_get_rectangles (const GdkRegion *region,
gboolean gdk_region_empty (const GdkRegion *region);
gboolean gdk_region_equal (const GdkRegion *region1,
const GdkRegion *region2);
#ifndef GDK_DISABLE_DEPRECATED
gboolean gdk_region_rect_equal (const GdkRegion *region,
const GdkRectangle *rectangle);
#endif
gboolean gdk_region_point_in (const GdkRegion *region,
int x,
int y);
@ -88,9 +96,11 @@ GdkOverlapType gdk_region_rect_in (const GdkRegion *region,
void gdk_region_offset (GdkRegion *region,
gint dx,
gint dy);
#ifndef GDK_DISABLE_DEPRECATED
void gdk_region_shrink (GdkRegion *region,
gint dx,
gint dy);
#endif
void gdk_region_union_with_rect (GdkRegion *region,
const GdkRectangle *rect);
void gdk_region_intersect (GdkRegion *source1,
@ -99,6 +109,7 @@ void gdk_region_union (GdkRegion *source1,
const GdkRegion *source2);
void gdk_region_subtract (GdkRegion *source1,
const GdkRegion *source2);
#ifndef GDK_DISABLE_DEPRECATED
void gdk_region_xor (GdkRegion *source1,
const GdkRegion *source2);
@ -108,6 +119,7 @@ void gdk_region_spans_intersect_foreach (GdkRegion *region,
gboolean sorted,
GdkSpanFunc function,
gpointer data);
#endif
G_END_DECLS