actor: Deprecate rotation center properties

The pivot point supercedes the per-axis center of rotation, including
the one based on the gravity enumeration.

https://bugzilla.gnome.org/show_bug.cgi?id=677853
This commit is contained in:
Emmanuele Bassi 2012-07-06 11:58:19 +01:00
parent caf199c732
commit 32b78a41f1
4 changed files with 77 additions and 43 deletions

View File

@ -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)

View File

@ -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);

View File

@ -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

View File

@ -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"