Tag all deprecated symbols using CLUTTER_DEPRECATED

This requires some minor surgery in the build to disable the deprecation
warnings in the deprecated classes.
This commit is contained in:
Emmanuele Bassi
2011-10-14 11:34:38 +01:00
parent d93e6ef6b9
commit 7f3363e1db
27 changed files with 209 additions and 122 deletions

View File

@ -1582,3 +1582,65 @@ clutter_path_node_equal (const ClutterPathNode *node_a,
return TRUE;
}
G_DEFINE_BOXED_TYPE (ClutterKnot, clutter_knot,
clutter_knot_copy,
clutter_knot_free);
/**
* clutter_knot_copy:
* @knot: a #ClutterKnot
*
* Makes an allocated copy of a knot.
*
* Return value: the copied knot.
*
* Since: 0.2
*/
ClutterKnot *
clutter_knot_copy (const ClutterKnot *knot)
{
if (G_UNLIKELY (knot == NULL))
return NULL;
return g_slice_dup (ClutterKnot, knot);
}
/**
* clutter_knot_free:
* @knot: a #ClutterKnot
*
* Frees the memory of an allocated knot.
*
* Since: 0.2
*/
void
clutter_knot_free (ClutterKnot *knot)
{
if (G_LIKELY (knot != NULL))
g_slice_free (ClutterKnot, knot);
}
/**
* clutter_knot_equal:
* @knot_a: First knot
* @knot_b: Second knot
*
* Compares to knot and checks if the point to the same location.
*
* Return value: %TRUE if the knots point to the same location.
*
* Since: 0.2
*/
gboolean
clutter_knot_equal (const ClutterKnot *knot_a,
const ClutterKnot *knot_b)
{
g_return_val_if_fail (knot_a != NULL, FALSE);
g_return_val_if_fail (knot_b != NULL, FALSE);
if (knot_a == knot_b)
return TRUE;
return knot_a->x == knot_b->x && knot_a->y == knot_b->y;
}