From 8c32637eea2bf23e171041cc24e2f354ad60ad44 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 26 Mar 2013 22:16:55 +0000 Subject: [PATCH] Deprecate ClutterGeometry It's a bad rectangle type, with caveats and gotchas. We have better types, courtesy of Cairo, as well as our own (ClutterRect). https://bugzilla.gnome.org/show_bug.cgi?id=682789 --- clutter/clutter-base-types.c | 4 ++++ clutter/clutter-types.h | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/clutter/clutter-base-types.c b/clutter/clutter-base-types.c index f5af8f138..53d57b29e 100644 --- a/clutter/clutter-base-types.c +++ b/clutter/clutter-base-types.c @@ -69,6 +69,8 @@ clutter_geometry_free (ClutterGeometry *geometry) * Find the union of two rectangles represented as #ClutterGeometry. * * Since: 1.4 + * + * Deprecated: 1.16: Use #ClutterRect and clutter_rect_union() */ void clutter_geometry_union (const ClutterGeometry *geometry_a, @@ -101,6 +103,8 @@ clutter_geometry_union (const ClutterGeometry *geometry_a, * %FALSE. * * Since: 1.4 + * + * Deprecated: 1.16: Use #ClutterRect and clutter_rect_intersection() */ gboolean clutter_geometry_intersects (const ClutterGeometry *geometry0, diff --git a/clutter/clutter-types.h b/clutter/clutter-types.h index 431964acd..9a66394e2 100644 --- a/clutter/clutter-types.h +++ b/clutter/clutter-types.h @@ -78,7 +78,7 @@ typedef struct _ClutterPathNode ClutterPathNode; typedef struct _ClutterActorBox ClutterActorBox; typedef struct _ClutterColor ClutterColor; -typedef struct _ClutterGeometry ClutterGeometry; +typedef struct _ClutterGeometry ClutterGeometry; /* XXX:2.0 - remove */ typedef struct _ClutterKnot ClutterKnot; typedef struct _ClutterMargin ClutterMargin; typedef struct _ClutterPerspective ClutterPerspective; @@ -540,6 +540,8 @@ void clutter_actor_box_set_size (ClutterActorBox *box, * You should not use #ClutterGeometry, or operate on its fields * directly; you should use #cairo_rectangle_int_t or #ClutterRect if you * need a rectangle type, depending on the precision required. + * + * Deprecated: 1.16 */ struct _ClutterGeometry { @@ -552,9 +554,11 @@ struct _ClutterGeometry GType clutter_geometry_get_type (void) G_GNUC_CONST; +CLUTTER_DEPRECATED_IN_1_16 void clutter_geometry_union (const ClutterGeometry *geometry_a, const ClutterGeometry *geometry_b, ClutterGeometry *result); +CLUTTER_DEPRECATED_IN_1_16 gboolean clutter_geometry_intersects (const ClutterGeometry *geometry0, const ClutterGeometry *geometry1);