[clutter/wip/master-next: 11/23] actor: Deprecate rotation center properties
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/wip/master-next: 11/23] actor: Deprecate rotation center properties
- Date: Mon, 9 Jul 2012 16:49:19 +0000 (UTC)
commit 5cbed2ec14f3c763e9894cc9aeeb79131b3510d3
Author: Emmanuele Bassi <ebassi gnome org>
Date: Fri Jul 6 11:58:19 2012 +0100
actor: Deprecate rotation center properties
The pivot point supercedes the per-axis center of rotation, including
the one based on the gravity enumeration.
clutter/clutter-actor.c | 36 ++++++++++++--
clutter/clutter-actor.h | 15 ------
clutter/deprecated/clutter-actor.h | 68 ++++++++++++++++---------
clutter/deprecated/clutter-behaviour-rotate.c | 1 +
4 files changed, 77 insertions(+), 43 deletions(-)
---
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
index e3e5e09..3dd0560 100644
--- a/clutter/clutter-actor.c
+++ b/clutter/clutter-actor.c
@@ -6508,13 +6508,17 @@ clutter_actor_class_init (ClutterActorClass *klass)
* The rotation center on the X axis.
*
* Since: 0.6
+ *
+ * Deprecated: 1.12: Use #ClutterActor:pivot-point instead
*/
obj_props[PROP_ROTATION_CENTER_X] =
g_param_spec_boxed ("rotation-center-x",
P_("Rotation Center X"),
P_("The rotation center on the X axis"),
CLUTTER_TYPE_VERTEX,
- CLUTTER_PARAM_READWRITE);
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS |
+ G_PARAM_DEPRECATED);
/**
* ClutterActor:rotation-center-y:
@@ -6522,13 +6526,17 @@ clutter_actor_class_init (ClutterActorClass *klass)
* The rotation center on the Y axis.
*
* Since: 0.6
+ *
+ * Deprecated: 1.12: Use #ClutterActor:pivot-point instead
*/
obj_props[PROP_ROTATION_CENTER_Y] =
g_param_spec_boxed ("rotation-center-y",
P_("Rotation Center Y"),
P_("The rotation center on the Y axis"),
CLUTTER_TYPE_VERTEX,
- CLUTTER_PARAM_READWRITE);
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS |
+ G_PARAM_DEPRECATED);
/**
* ClutterActor:rotation-center-z:
@@ -6536,13 +6544,17 @@ clutter_actor_class_init (ClutterActorClass *klass)
* The rotation center on the Z axis.
*
* Since: 0.6
+ *
+ * Deprecated: 1.12: Use #ClutterActor:pivot-point instead
*/
obj_props[PROP_ROTATION_CENTER_Z] =
g_param_spec_boxed ("rotation-center-z",
P_("Rotation Center Z"),
P_("The rotation center on the Z axis"),
CLUTTER_TYPE_VERTEX,
- CLUTTER_PARAM_READWRITE);
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS |
+ G_PARAM_DEPRECATED);
/**
* ClutterActor:rotation-center-z-gravity:
@@ -6550,6 +6562,8 @@ clutter_actor_class_init (ClutterActorClass *klass)
* The rotation center on the Z axis expressed as a #ClutterGravity.
*
* Since: 1.0
+ *
+ * Deprecated: 1.12: Use #ClutterActor:pivot-point instead
*/
obj_props[PROP_ROTATION_CENTER_Z_GRAVITY] =
g_param_spec_enum ("rotation-center-z-gravity",
@@ -6557,7 +6571,9 @@ clutter_actor_class_init (ClutterActorClass *klass)
P_("Center point for rotation around the Z axis"),
CLUTTER_TYPE_GRAVITY,
CLUTTER_GRAVITY_NONE,
- CLUTTER_PARAM_READWRITE);
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS |
+ G_PARAM_DEPRECATED);
/**
* ClutterActor:anchor-x:
@@ -11221,6 +11237,9 @@ clutter_actor_get_depth (ClutterActor *self)
* point is set, the upper left corner is assumed as the origin.
*
* Since: 0.8
+ *
+ * Deprecated: 1.12: Use clutter_actor_set_rotation_angle() and
+ * clutter_actor_set_pivot_point() instead.
*/
void
clutter_actor_set_rotation (ClutterActor *self,
@@ -11259,6 +11278,9 @@ clutter_actor_set_rotation (ClutterActor *self,
* will move accordingly.
*
* Since: 1.0
+ *
+ * Deprecated: 1.12: Use clutter_actor_set_rotation_angle() and
+ * clutter_actor_set_pivot_point() instead.
*/
void
clutter_actor_set_z_rotation_from_gravity (ClutterActor *self,
@@ -11302,6 +11324,9 @@ clutter_actor_set_z_rotation_from_gravity (ClutterActor *self,
* Return value: the angle of rotation
*
* Since: 0.8
+ *
+ * Deprecated: 1.12: Use clutter_actor_get_rotation_angle() and
+ * clutter_actor_get_pivot_point() instead.
*/
gdouble
clutter_actor_get_rotation (ClutterActor *self,
@@ -11357,6 +11382,9 @@ clutter_actor_get_rotation (ClutterActor *self,
* Return value: the Z rotation center
*
* Since: 1.0
+ *
+ * Deprecated: 1.12: Use the #ClutterActor:pivot-point instead of
+ * a #ClutterGravity
*/
ClutterGravity
clutter_actor_get_z_rotation_gravity (ClutterActor *self)
diff --git a/clutter/clutter-actor.h b/clutter/clutter-actor.h
index b91875f..6a2d80d 100644
--- a/clutter/clutter-actor.h
+++ b/clutter/clutter-actor.h
@@ -640,21 +640,6 @@ void clutter_actor_set_rotation_angle
CLUTTER_AVAILABLE_IN_1_12
gdouble clutter_actor_get_rotation_angle (ClutterActor *self,
ClutterRotateAxis axis);
-void clutter_actor_set_rotation (ClutterActor *self,
- ClutterRotateAxis axis,
- gdouble angle,
- gfloat x,
- gfloat y,
- gfloat z);
-void clutter_actor_set_z_rotation_from_gravity (ClutterActor *self,
- gdouble angle,
- ClutterGravity gravity);
-gdouble clutter_actor_get_rotation (ClutterActor *self,
- ClutterRotateAxis axis,
- gfloat *x,
- gfloat *y,
- gfloat *z);
-ClutterGravity clutter_actor_get_z_rotation_gravity (ClutterActor *self);
void clutter_actor_set_scale (ClutterActor *self,
gdouble scale_x,
gdouble scale_y);
diff --git a/clutter/deprecated/clutter-actor.h b/clutter/deprecated/clutter-actor.h
index e7581a3..a3f6d5b 100644
--- a/clutter/deprecated/clutter-actor.h
+++ b/clutter/deprecated/clutter-actor.h
@@ -34,61 +34,81 @@
G_BEGIN_DECLS
CLUTTER_DEPRECATED_IN_1_10
-void clutter_actor_set_geometry (ClutterActor *self,
- const ClutterGeometry *geometry);
+void clutter_actor_set_geometry (ClutterActor *self,
+ const ClutterGeometry *geometry);
CLUTTER_DEPRECATED_IN_1_10_FOR(clutter_actor_get_allocation_geometry)
-void clutter_actor_get_geometry (ClutterActor *self,
- ClutterGeometry *geometry);
+void clutter_actor_get_geometry (ClutterActor *self,
+ ClutterGeometry *geometry);
CLUTTER_DEPRECATED_IN_1_8
-guint32 clutter_actor_get_gid (ClutterActor *self);
+guint32 clutter_actor_get_gid (ClutterActor *self);
CLUTTER_DEPRECATED_IN_1_8
-ClutterActor * clutter_get_actor_by_gid (guint32 id_);
+ClutterActor * clutter_get_actor_by_gid (guint32 id_);
CLUTTER_DEPRECATED_IN_1_10_FOR(clutter_actor_remove_child() and clutter_actor_add_child())
-void clutter_actor_reparent (ClutterActor *self,
- ClutterActor *new_parent);
+void clutter_actor_reparent (ClutterActor *self,
+ ClutterActor *new_parent);
CLUTTER_DEPRECATED_IN_1_10_FOR(clutter_actor_add_child)
-void clutter_actor_set_parent (ClutterActor *self,
- ClutterActor *parent);
+void clutter_actor_set_parent (ClutterActor *self,
+ ClutterActor *parent);
CLUTTER_DEPRECATED_IN_1_10_FOR(clutter_actor_remove_child)
-void clutter_actor_unparent (ClutterActor *self);
+void clutter_actor_unparent (ClutterActor *self);
CLUTTER_DEPRECATED_IN_1_10_FOR(clutter_actor_set_child_above_sibling)
-void clutter_actor_raise (ClutterActor *self,
- ClutterActor *below);
+void clutter_actor_raise (ClutterActor *self,
+ ClutterActor *below);
CLUTTER_DEPRECATED_IN_1_10_FOR(clutter_actor_set_child_below_sibling)
-void clutter_actor_lower (ClutterActor *self,
- ClutterActor *above);
+void clutter_actor_lower (ClutterActor *self,
+ ClutterActor *above);
CLUTTER_DEPRECATED_IN_1_10_FOR(clutter_actor_set_child_above_sibling() with NULL sibling)
-void clutter_actor_raise_top (ClutterActor *self);
+void clutter_actor_raise_top (ClutterActor *self);
CLUTTER_DEPRECATED_IN_1_10_FOR(clutter_actor_set_child_below_sibling() with NULL sibling)
-void clutter_actor_lower_bottom (ClutterActor *self);
+void clutter_actor_lower_bottom (ClutterActor *self);
CLUTTER_DEPRECATED_IN_1_10
-void clutter_actor_push_internal (ClutterActor *self);
+void clutter_actor_push_internal (ClutterActor *self);
CLUTTER_DEPRECATED_IN_1_10
-void clutter_actor_pop_internal (ClutterActor *self);
+void clutter_actor_pop_internal (ClutterActor *self);
CLUTTER_DEPRECATED_IN_1_10
-void clutter_actor_show_all (ClutterActor *self);
+void clutter_actor_show_all (ClutterActor *self);
CLUTTER_DEPRECATED_IN_1_10
-void clutter_actor_hide_all (ClutterActor *self);
+void clutter_actor_hide_all (ClutterActor *self);
CLUTTER_DEPRECATED_IN_1_12_FOR(clutter_actor_set_z_position)
-void clutter_actor_set_depth (ClutterActor *self,
- gfloat depth);
+void clutter_actor_set_depth (ClutterActor *self,
+ gfloat depth);
CLUTTER_DEPRECATED_IN_1_12_FOR(clutter_actor_get_z_position)
-gfloat clutter_actor_get_depth (ClutterActor *self);
+gfloat clutter_actor_get_depth (ClutterActor *self);
+
+CLUTTER_DEPRECATED_IN_1_12_FOR(clutter_actor_set_rotation_angle)
+void clutter_actor_set_rotation (ClutterActor *self,
+ ClutterRotateAxis axis,
+ gdouble angle,
+ gfloat x,
+ gfloat y,
+ gfloat z);
+CLUTTER_DEPRECATED_IN_1_12_FOR(clutter_actor_set_rotation_angle and clutter_actor_set_pivot_point)
+void clutter_actor_set_z_rotation_from_gravity (ClutterActor *self,
+ gdouble angle,
+ ClutterGravity gravity);
+CLUTTER_DEPRECATED_IN_1_12_FOR(clutter_actor_get_rotation_angle)
+gdouble clutter_actor_get_rotation (ClutterActor *self,
+ ClutterRotateAxis axis,
+ gfloat *x,
+ gfloat *y,
+ gfloat *z);
+CLUTTER_DEPRECATED_IN_1_12
+ClutterGravity clutter_actor_get_z_rotation_gravity (ClutterActor *self);
G_END_DECLS
diff --git a/clutter/deprecated/clutter-behaviour-rotate.c b/clutter/deprecated/clutter-behaviour-rotate.c
index e319f4b..9ba0f42 100644
--- a/clutter/deprecated/clutter-behaviour-rotate.c
+++ b/clutter/deprecated/clutter-behaviour-rotate.c
@@ -42,6 +42,7 @@
#include <math.h>
#define CLUTTER_DISABLE_DEPRECATION_WARNINGS
+#include "deprecated/clutter-actor.h"
#include "clutter-alpha.h"
#include "clutter-behaviour.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]