diff --git a/clutter/clutter-behaviour-ellipse.c b/clutter/clutter-behaviour-ellipse.c index 3955f7ab5..dc9ac03a0 100644 --- a/clutter/clutter-behaviour-ellipse.c +++ b/clutter/clutter-behaviour-ellipse.c @@ -5,9 +5,10 @@ * * An OpenGL based 'interactive canvas' library. * - * Authored By Tomas Frydrych + * Authored By Tomas Frydrych * - * Copyright (C) 2007 OpenedHand + * Copyright (C) 2007 OpenedHand Ltd + * Copyright (C) 2009 Intel Corp. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -587,58 +588,7 @@ clutter_behaviour_ellipse_new (ClutterAlpha *alpha, } /** - * clutter_behaviour_ellipse_newx: - * @alpha: a #ClutterAlpha, or %NULL - * @x: x coordinace of the center - * @y: y coordiance of the center - * @width: width of the ellipse - * @height: height of the ellipse - * @direction: #ClutterRotateDirection of rotation - * @start: #CoglFixed angle in degrees at which movement starts - * @end: #CoglFixed angle in degrees at which movement ends - * - * Creates a behaviour that drives actors along an elliptical path. This - * is the fixed point variant of clutter_behaviour_ellipse_new(). - * - * Return value: the newly created #ClutterBehaviourEllipse - * - * Since: 0.4 - */ -ClutterBehaviour * -clutter_behaviour_ellipse_newx (ClutterAlpha *alpha, - gint x, - gint y, - gint width, - gint height, - ClutterRotateDirection direction, - CoglFixed start, - CoglFixed end) -{ - ClutterKnot center; - gdouble real_start, real_end; - - g_return_val_if_fail (alpha == NULL || CLUTTER_IS_ALPHA (alpha), NULL); - - center.x = x; - center.y = y; - - real_start = COGL_FIXED_TO_DOUBLE (start); - real_end = COGL_FIXED_TO_DOUBLE (end); - - return g_object_new (CLUTTER_TYPE_BEHAVIOUR_ELLIPSE, - "alpha", alpha, - "center", ¢er, - "width", width, - "height", height, - "direction", direction, - "angle-start", real_start, - "angle-end", real_end, - NULL); -} - - -/** - * clutter_behaviour_ellipse_set_center + * clutter_behaviour_ellipse_set_center: * @self: a #ClutterBehaviourEllipse * @x: x coordinace of centre * @y: y coordinace of centre @@ -668,7 +618,7 @@ clutter_behaviour_ellipse_set_center (ClutterBehaviourEllipse *self, } /** - * clutter_behaviour_ellipse_get_center + * clutter_behaviour_ellipse_get_center: * @self: a #ClutterBehaviourEllipse * @x: return location for the X coordinate of the center, or %NULL * @y: return location for the Y coordinate of the center, or %NULL @@ -697,7 +647,7 @@ clutter_behaviour_ellipse_get_center (ClutterBehaviourEllipse *self, /** - * clutter_behaviour_ellipse_set_width + * clutter_behaviour_ellipse_set_width: * @self: a #ClutterBehaviourEllipse * @width: width of the ellipse * @@ -724,7 +674,7 @@ clutter_behaviour_ellipse_set_width (ClutterBehaviourEllipse *self, } /** - * clutter_behaviour_ellipse_get_width + * clutter_behaviour_ellipse_get_width: * @self: a #ClutterBehaviourEllipse * * Gets the width of the elliptical path. @@ -742,7 +692,7 @@ clutter_behaviour_ellipse_get_width (ClutterBehaviourEllipse *self) } /** - * clutter_behaviour_ellipse_set_height + * clutter_behaviour_ellipse_set_height: * @self: a #ClutterBehaviourEllipse * @height: height of the ellipse * @@ -769,7 +719,7 @@ clutter_behaviour_ellipse_set_height (ClutterBehaviourEllipse *self, } /** - * clutter_behaviour_ellipse_get_height + * clutter_behaviour_ellipse_get_height: * @self: a #ClutterBehaviourEllipse * * Gets the height of the elliptical path. @@ -787,7 +737,7 @@ clutter_behaviour_ellipse_get_height (ClutterBehaviourEllipse *self) } /** - * clutter_behaviour_ellipse_set_angle_start + * clutter_behaviour_ellipse_set_angle_start: * @self: a #ClutterBehaviourEllipse * @angle_start: angle at which movement starts in degrees, between 0 and 360. * @@ -817,27 +767,7 @@ clutter_behaviour_ellipse_set_angle_start (ClutterBehaviourEllipse *self, } /** - * clutter_behaviour_ellipse_set_angle_startx - * @self: a #ClutterBehaviourEllipse - * @angle_start: An angle, as #CoglFixed, at which movement starts, in - * degrees, between 0 and 360. - * - * Sets the angle at which movement starts; angles >= 360 degress get clamped - * to the canonical interval <0, 360). - * - * Since: 0.6 - */ -void -clutter_behaviour_ellipse_set_angle_startx (ClutterBehaviourEllipse *self, - CoglFixed angle_start) -{ - gdouble angle = COGL_FIXED_TO_DOUBLE (angle_start); - - clutter_behaviour_ellipse_set_angle_start (self, angle); -} - -/** - * clutter_behaviour_ellipse_get_angle_start + * clutter_behaviour_ellipse_get_angle_start: * @self: a #ClutterBehaviourEllipse * * Gets the angle at which movements starts. @@ -855,25 +785,7 @@ clutter_behaviour_ellipse_get_angle_start (ClutterBehaviourEllipse *self) } /** - * clutter_behaviour_ellipse_get_angle_startx - * @self: a #ClutterBehaviourEllipse - * - * Gets the angle at which movements starts. - * - * Return value: angle, as #CoglFixed, in degrees. - * - * Since: 0.6 - */ -CoglFixed -clutter_behaviour_ellipse_get_angle_startx (ClutterBehaviourEllipse *self) -{ - g_return_val_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self), 0); - - return COGL_FIXED_FROM_DOUBLE (self->priv->angle_start); -} - -/** - * clutter_behaviour_ellipse_set_angle_end + * clutter_behaviour_ellipse_set_angle_end: * @self: a #ClutterBehaviourEllipse * @angle_end: angle at which movement ends in degrees, between 0 and 360. * @@ -904,27 +816,7 @@ clutter_behaviour_ellipse_set_angle_end (ClutterBehaviourEllipse *self, } /** - * clutter_behaviour_ellipse_set_angle_endx - * @self: a #ClutterBehaviourEllipse - * @angle_end: angle, as #CoglFixed, at which movement ends, in degrees, - * between 0 and 360. - * - * Sets the angle at which movement ends; angles >= 360 degress get clamped - * to the canonical interval <0, 360). - * - * Since: 0.4 - */ -void -clutter_behaviour_ellipse_set_angle_endx (ClutterBehaviourEllipse *self, - CoglFixed angle_end) -{ - gdouble angle = COGL_FIXED_TO_DOUBLE (angle_end); - - clutter_behaviour_ellipse_set_angle_end (self, angle); -} - -/** - * clutter_behaviour_ellipse_get_angle_end + * clutter_behaviour_ellipse_get_angle_end: * @self: a #ClutterBehaviourEllipse * * Gets the at which movements ends. @@ -942,25 +834,7 @@ clutter_behaviour_ellipse_get_angle_end (ClutterBehaviourEllipse *self) } /** - * clutter_behaviour_ellipse_get_angle_endx - * @self: a #ClutterBehaviourEllipse - * - * Gets the angle at which movements ends. - * - * Return value: angle, as #CoglFixed, in degrees - * - * Since: 0.4 - */ -CoglFixed -clutter_behaviour_ellipse_get_angle_endx (ClutterBehaviourEllipse *self) -{ - g_return_val_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self), 0); - - return COGL_FIXED_FROM_DOUBLE (self->priv->angle_end); -} - -/** - * clutter_behaviour_ellipse_set_angle_tilt + * clutter_behaviour_ellipse_set_angle_tilt: * @self: a #ClutterBehaviourEllipse * @axis: a #ClutterRotateAxis * @angle_tilt: tilt of the elipse around the center in the given axis in @@ -1013,28 +887,7 @@ clutter_behaviour_ellipse_set_angle_tilt (ClutterBehaviourEllipse *self, } /** - * clutter_behaviour_ellipse_set_angle_tiltx - * @self: a #ClutterBehaviourEllipse - * @axis: a #ClutterRoateAxis - * @angle_tilt: the tilt of the ellipse, in degrees as a fixed point - * value, around the center on the given axis - * - * Sets the angle at which the ellipse should be tilted around it's center. - * - * Since: 0.4 - */ -void -clutter_behaviour_ellipse_set_angle_tiltx (ClutterBehaviourEllipse *self, - ClutterRotateAxis axis, - CoglFixed angle_tilt) -{ - gdouble angle = COGL_FIXED_TO_DOUBLE (angle_tilt); - - clutter_behaviour_ellipse_set_angle_tilt (self, axis, angle); -} - -/** - * clutter_behaviour_ellipse_get_angle_tilt + * clutter_behaviour_ellipse_get_angle_tilt: * @self: a #ClutterBehaviourEllipse * @axis: a #ClutterRotateAxis * @@ -1066,39 +919,7 @@ clutter_behaviour_ellipse_get_angle_tilt (ClutterBehaviourEllipse *self, } /** - * clutter_behaviour_ellipse_get_angle_tiltx - * @self: a #ClutterBehaviourEllipse - * @axis: a #ClutterRotateAxis - * - * Gets the tilt of the ellipse around the center in the given axis - * - * Return value: the tilt angle in degrees, as a fixed point value - * - * Since: 0.4 - */ -CoglFixed -clutter_behaviour_ellipse_get_angle_tiltx (ClutterBehaviourEllipse *self, - ClutterRotateAxis axis) -{ - g_return_val_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self), 0); - - switch (axis) - { - case CLUTTER_X_AXIS: - return COGL_FIXED_FROM_DOUBLE (self->priv->angle_tilt_x); - - case CLUTTER_Y_AXIS: - return COGL_FIXED_FROM_DOUBLE (self->priv->angle_tilt_y); - - case CLUTTER_Z_AXIS: - return COGL_FIXED_FROM_DOUBLE (self->priv->angle_tilt_z); - } - - return 0; -} - -/** - * clutter_behaviour_ellipse_set_tilt + * clutter_behaviour_ellipse_set_tilt: * @self: a #ClutterBehaviourEllipse * @angle_tilt_x: tilt of the elipse around the center in X axis in degrees. * @angle_tilt_y: tilt of the elipse around the center in Y axis in degrees. @@ -1147,33 +968,7 @@ clutter_behaviour_ellipse_set_tilt (ClutterBehaviourEllipse *self, } /** - * clutter_behaviour_ellipse_set_tiltx - * @self: a #ClutterBehaviourEllipse - * @angle_tilt_x: tilt of the elipse in degrees, as #CoglFixed, around - * the center in X axis - * @angle_tilt_y: tilt of the elipse in degrees, as #CoglFixed, around - * the center in Y axis - * @angle_tilt_z: tilt of the elipse in degrees, as #CoglFixed, around - * the center in Z axis - * - * Sets the angle at which the ellipse should be tilted around it's center. - * - * Since: 0.4 - */ -void -clutter_behaviour_ellipse_set_tiltx (ClutterBehaviourEllipse *self, - CoglFixed angle_tilt_x, - CoglFixed angle_tilt_y, - CoglFixed angle_tilt_z) -{ - clutter_behaviour_ellipse_set_tilt (self, - COGL_FIXED_TO_DOUBLE (angle_tilt_x), - COGL_FIXED_TO_DOUBLE (angle_tilt_y), - COGL_FIXED_TO_DOUBLE (angle_tilt_z)); -} - -/** - * clutter_behaviour_ellipse_get_tilt + * clutter_behaviour_ellipse_get_tilt: * @self: a #ClutterBehaviourEllipse * @angle_tilt_x: return location for tilt angle on the X axis, or %NULL. * @angle_tilt_y: return location for tilt angle on the Y axis, or %NULL. @@ -1205,42 +1000,6 @@ clutter_behaviour_ellipse_get_tilt (ClutterBehaviourEllipse *self, *angle_tilt_z = priv->angle_tilt_z; } -/** - * clutter_behaviour_ellipse_get_tiltx - * @self: a #ClutterBehaviourEllipse - * @angle_tilt_x: location for tilt of the elipse, as #CoglFixed, around - * the center in X axis in degrees, or %NULL. - * @angle_tilt_y: location for tilt of the elipse, as #CoglFixed, around - * the center in Y axis in degress, or %NULL. - * @angle_tilt_z: location for tilt of the elipse, as #CoglFixed, around - * the center in Z axis in degrees, or %NULL. - * - * Gets the tilt of the ellipse around the center in Y axis. - * - * Since: 0.4 - */ -void -clutter_behaviour_ellipse_get_tiltx (ClutterBehaviourEllipse *self, - CoglFixed *angle_tilt_x, - CoglFixed *angle_tilt_y, - CoglFixed *angle_tilt_z) -{ - ClutterBehaviourEllipsePrivate *priv; - - g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self)); - - priv = self->priv; - - if (angle_tilt_x) - *angle_tilt_x = COGL_FIXED_FROM_DOUBLE (priv->angle_tilt_x); - - if (angle_tilt_y) - *angle_tilt_y = COGL_FIXED_FROM_DOUBLE (priv->angle_tilt_y); - - if (angle_tilt_z) - *angle_tilt_z = COGL_FIXED_FROM_DOUBLE (priv->angle_tilt_z); -} - /** * clutter_behaviour_ellipse_get_direction: * @self: a #ClutterBehaviourEllipse diff --git a/clutter/clutter-behaviour-ellipse.h b/clutter/clutter-behaviour-ellipse.h index df1d259d1..dca99385d 100644 --- a/clutter/clutter-behaviour-ellipse.h +++ b/clutter/clutter-behaviour-ellipse.h @@ -91,100 +91,48 @@ struct _ClutterBehaviourEllipseClass GType clutter_behaviour_ellipse_get_type (void) G_GNUC_CONST; -ClutterBehaviour * clutter_behaviour_ellipse_new (ClutterAlpha *alpha, - gint x, - gint y, - gint width, - gint height, - ClutterRotateDirection direction, - gdouble start, - gdouble end); - -ClutterBehaviour * clutter_behaviour_ellipse_newx (ClutterAlpha *alpha, - gint x, - gint y, - gint width, - gint height, - ClutterRotateDirection direction, - CoglFixed start, - CoglFixed end); - -void clutter_behaviour_ellipse_set_center (ClutterBehaviourEllipse *self, - gint x, - gint y); - -void clutter_behaviour_ellipse_get_center (ClutterBehaviourEllipse *self, - gint *x, - gint *y); - -void clutter_behaviour_ellipse_set_width (ClutterBehaviourEllipse *self, - gint width); - -gint clutter_behaviour_ellipse_get_width (ClutterBehaviourEllipse *self); - -void clutter_behaviour_ellipse_set_height (ClutterBehaviourEllipse *self, - gint height); - -gint clutter_behaviour_ellipse_get_height (ClutterBehaviourEllipse *self); - -void clutter_behaviour_ellipse_set_angle_start (ClutterBehaviourEllipse *self, - gdouble angle_start); - -void clutter_behaviour_ellipse_set_angle_startx (ClutterBehaviourEllipse *self, - CoglFixed angle_start); - -CoglFixed clutter_behaviour_ellipse_get_angle_startx (ClutterBehaviourEllipse *self); - -gdouble clutter_behaviour_ellipse_get_angle_start (ClutterBehaviourEllipse *self); - -void clutter_behaviour_ellipse_set_angle_endx (ClutterBehaviourEllipse *self, - CoglFixed angle_end); - -void clutter_behaviour_ellipse_set_angle_end (ClutterBehaviourEllipse *self, - gdouble angle_end); - -CoglFixed clutter_behaviour_ellipse_get_angle_endx (ClutterBehaviourEllipse *self); - -gdouble clutter_behaviour_ellipse_get_angle_end (ClutterBehaviourEllipse *self); - -void clutter_behaviour_ellipse_set_angle_tiltx (ClutterBehaviourEllipse *self, - ClutterRotateAxis axis, - CoglFixed angle_tilt); - -void clutter_behaviour_ellipse_set_angle_tilt (ClutterBehaviourEllipse *self, - ClutterRotateAxis axis, - gdouble angle_tilt); - -CoglFixed clutter_behaviour_ellipse_get_angle_tiltx (ClutterBehaviourEllipse *self, - ClutterRotateAxis axis); - -gdouble clutter_behaviour_ellipse_get_angle_tilt (ClutterBehaviourEllipse *self, - ClutterRotateAxis axis); - -void clutter_behaviour_ellipse_set_tilt (ClutterBehaviourEllipse *self, - gdouble angle_tilt_x, - gdouble angle_tilt_y, - gdouble angle_tilt_z); - -void clutter_behaviour_ellipse_set_tiltx (ClutterBehaviourEllipse *self, - CoglFixed angle_tilt_x, - CoglFixed angle_tilt_y, - CoglFixed angle_tilt_z); - -void clutter_behaviour_ellipse_get_tilt (ClutterBehaviourEllipse *self, - gdouble *angle_tilt_x, - gdouble *angle_tilt_y, - gdouble *angle_tilt_z); - -void clutter_behaviour_ellipse_get_tiltx (ClutterBehaviourEllipse *self, - CoglFixed *angle_tilt_x, - CoglFixed *angle_tilt_y, - CoglFixed *angle_tilt_z); - -ClutterRotateDirection clutter_behaviour_ellipse_get_direction (ClutterBehaviourEllipse *self); - -void clutter_behaviour_ellipse_set_direction (ClutterBehaviourEllipse *self, - ClutterRotateDirection direction); +ClutterBehaviour * clutter_behaviour_ellipse_new (ClutterAlpha *alpha, + gint x, + gint y, + gint width, + gint height, + ClutterRotateDirection direction, + gdouble start, + gdouble end); +void clutter_behaviour_ellipse_set_center (ClutterBehaviourEllipse *self, + gint x, + gint y); +void clutter_behaviour_ellipse_get_center (ClutterBehaviourEllipse *self, + gint *x, + gint *y); +void clutter_behaviour_ellipse_set_width (ClutterBehaviourEllipse *self, + gint width); +gint clutter_behaviour_ellipse_get_width (ClutterBehaviourEllipse *self); +void clutter_behaviour_ellipse_set_height (ClutterBehaviourEllipse *self, + gint height); +gint clutter_behaviour_ellipse_get_height (ClutterBehaviourEllipse *self); +void clutter_behaviour_ellipse_set_angle_start (ClutterBehaviourEllipse *self, + gdouble angle_start); +gdouble clutter_behaviour_ellipse_get_angle_start (ClutterBehaviourEllipse *self); +void clutter_behaviour_ellipse_set_angle_end (ClutterBehaviourEllipse *self, + gdouble angle_end); +gdouble clutter_behaviour_ellipse_get_angle_end (ClutterBehaviourEllipse *self); +void clutter_behaviour_ellipse_set_angle_tilt (ClutterBehaviourEllipse *self, + ClutterRotateAxis axis, + gdouble angle_tilt); +gdouble clutter_behaviour_ellipse_get_angle_tilt (ClutterBehaviourEllipse *self, + ClutterRotateAxis axis); +void clutter_behaviour_ellipse_set_tilt (ClutterBehaviourEllipse *self, + gdouble angle_tilt_x, + gdouble angle_tilt_y, + gdouble angle_tilt_z); +void clutter_behaviour_ellipse_get_tilt (ClutterBehaviourEllipse *self, + gdouble *angle_tilt_x, + gdouble *angle_tilt_y, + gdouble *angle_tilt_z); +ClutterRotateDirection clutter_behaviour_ellipse_get_direction (ClutterBehaviourEllipse *self); +void clutter_behaviour_ellipse_set_direction (ClutterBehaviourEllipse *self, + ClutterRotateDirection direction); G_END_DECLS diff --git a/clutter/clutter-behaviour-rotate.c b/clutter/clutter-behaviour-rotate.c index 3e9d849e2..814c727ba 100644 --- a/clutter/clutter-behaviour-rotate.c +++ b/clutter/clutter-behaviour-rotate.c @@ -436,51 +436,6 @@ clutter_behaviour_rotate_new (ClutterAlpha *alpha, NULL); } -/** - * clutter_behaviour_rotate_newx: - * @alpha: a #ClutterAlpha or %NULL - * @axis: the rotation axis - * @direction: the rotation direction - * @angle_start: the starting angle, in fixed point notation in degrees, - * between 0 and 360. - * @angle_end: the final angle, in fixed point notation in degrees, between 0 - * and 360. - * - * Creates a new #ClutterBehaviourRotate. This is the fixed point version - * of clutter_behaviour_rotate_new(). - * - * Return value: the newly created #ClutterBehaviourRotate. - * - * Since: 0.4 - */ -ClutterBehaviour * -clutter_behaviour_rotate_newx (ClutterAlpha *alpha, - ClutterRotateAxis axis, - ClutterRotateDirection direction, - CoglFixed angle_start, - CoglFixed angle_end) -{ - ClutterBehaviour *retval; - ClutterBehaviourRotatePrivate *priv; - - g_return_val_if_fail (alpha == NULL || CLUTTER_IS_ALPHA (alpha), NULL); - - retval = g_object_new (CLUTTER_TYPE_BEHAVIOUR_ROTATE, - "alpha", alpha, - "axis", axis, - "direction", direction, - NULL); - - /* we don't want to convert the angles from fixed to boolean - * and then back again to fixed. - */ - priv = CLUTTER_BEHAVIOUR_ROTATE_GET_PRIVATE (retval); - priv->angle_start = clamp_angle (angle_start); - priv->angle_end = clamp_angle (angle_end); - - return retval; -} - /** * clutter_behaviour_rotate_get_axis: * @rotate: a #ClutterBehaviourRotate @@ -641,57 +596,6 @@ clutter_behaviour_rotate_set_bounds (ClutterBehaviourRotate *rotate, g_object_thaw_notify (G_OBJECT (rotate)); } -/** - * clutter_behaviour_rotate_get_boundsx: - * @rotate: a #ClutterBehaviourRotate - * @angle_start: return value for the initial angle - * @angle_end: return value for the final angle - * - * Retrieves the rotation boundaries of the rotate behaviour. This is - * the fixed point notation version of clutter_behaviour_rotate_get_bounds(). - * - * Since: 0.4 - */ -void -clutter_behaviour_rotate_get_boundsx (ClutterBehaviourRotate *rotate, - CoglFixed *angle_start, - CoglFixed *angle_end) -{ - ClutterBehaviourRotatePrivate *priv; - - g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ROTATE (rotate)); - - priv = rotate->priv; - - if (angle_start) - *angle_start = COGL_FIXED_FROM_DOUBLE (priv->angle_start); - - if (angle_end) - *angle_end = COGL_FIXED_FROM_DOUBLE (priv->angle_end); -} - -/** - * clutter_behaviour_rotate_set_boundsx: - * @rotate: a #ClutterBehaviourRotate - * @angle_start: initial angle, in fixed point notation in degrees, between 0 - * and 360. - * @angle_end: final angle, in fixed point notation in degress, between 0 and - * 360. - * - * Fixed point version of clutter_behaviour_rotate_set_bounds(). - * - * Since: 0.4 - */ -void -clutter_behaviour_rotate_set_boundsx (ClutterBehaviourRotate *rotate, - CoglFixed angle_start, - CoglFixed angle_end) -{ - clutter_behaviour_rotate_set_bounds (rotate, - COGL_FIXED_TO_DOUBLE (angle_start), - COGL_FIXED_TO_DOUBLE (angle_end)); -} - /** * clutter_behaviour_rotate_set_center: * @rotate: a #ClutterBehaviourRotate diff --git a/clutter/clutter-behaviour-rotate.h b/clutter/clutter-behaviour-rotate.h index e9109524d..f8a180312 100644 --- a/clutter/clutter-behaviour-rotate.h +++ b/clutter/clutter-behaviour-rotate.h @@ -81,11 +81,6 @@ ClutterBehaviour * clutter_behaviour_rotate_new (ClutterAlpha ClutterRotateDirection direction, gdouble angle_start, gdouble angle_end); -ClutterBehaviour * clutter_behaviour_rotate_newx (ClutterAlpha *alpha, - ClutterRotateAxis axis, - ClutterRotateDirection direction, - CoglFixed angle_start, - CoglFixed angle_end); void clutter_behaviour_rotate_get_center (ClutterBehaviourRotate *rotate, gint *x, gint *y, @@ -106,12 +101,6 @@ void clutter_behaviour_rotate_get_bounds (ClutterBehaviourR void clutter_behaviour_rotate_set_bounds (ClutterBehaviourRotate *rotate, gdouble angle_start, gdouble angle_end); -void clutter_behaviour_rotate_get_boundsx (ClutterBehaviourRotate *rotate, - CoglFixed *angle_start, - CoglFixed *angle_end); -void clutter_behaviour_rotate_set_boundsx (ClutterBehaviourRotate *rotate, - CoglFixed angle_start, - CoglFixed angle_end); G_END_DECLS diff --git a/clutter/clutter-behaviour-scale.c b/clutter/clutter-behaviour-scale.c index 45aa8a1e2..a4c285a63 100644 --- a/clutter/clutter-behaviour-scale.c +++ b/clutter/clutter-behaviour-scale.c @@ -314,38 +314,6 @@ clutter_behaviour_scale_new (ClutterAlpha *alpha, NULL); } -/** - * clutter_behaviour_scale_newx: - * @alpha: a #ClutterAlpha - * @x_scale_start: initial scale factor on the X axis - * @y_scale_start: initial scale factor on the Y axis - * @x_scale_end: final scale factor on the X axis - * @y_scale_end: final scale factor on the Y axis - * - * A fixed point implementation of clutter_behaviour_scale_new() - * - * Return value: the newly created #ClutterBehaviourScale - * - * Since: 0.2 - */ -ClutterBehaviour * -clutter_behaviour_scale_newx (ClutterAlpha *alpha, - CoglFixed x_scale_start, - CoglFixed y_scale_start, - CoglFixed x_scale_end, - CoglFixed y_scale_end) -{ - g_return_val_if_fail (alpha == NULL || CLUTTER_IS_ALPHA (alpha), NULL); - - return g_object_new (CLUTTER_TYPE_BEHAVIOUR_SCALE, - "alpha", alpha, - "x-scale-start", COGL_FIXED_TO_DOUBLE (x_scale_start), - "y-scale-start", COGL_FIXED_TO_DOUBLE (y_scale_start), - "x-scale-end", COGL_FIXED_TO_DOUBLE (x_scale_end), - "y-scale-end", COGL_FIXED_TO_DOUBLE (y_scale_end), - NULL); -} - /** * clutter_behaviour_scale_set_bounds: * @scale: a #ClutterBehaviourScale @@ -441,75 +409,3 @@ clutter_behaviour_scale_get_bounds (ClutterBehaviourScale *scale, if (y_scale_end) *y_scale_end = priv->y_scale_end; } - -/** - * clutter_behaviour_scale_set_boundsx: - * @scale: a #ClutterBehaviourScale - * @x_scale_start: initial scale factor on the X axis - * @y_scale_start: initial scale factor on the Y axis - * @x_scale_end: final scale factor on the X axis - * @y_scale_end: final scale factor on the Y axis - * - * Fixed point version of clutter_behaviour_scale_set_bounds(). - * - * Sets the bounds used by scale behaviour. - * - * Since: 0.6 - */ -void -clutter_behaviour_scale_set_boundsx (ClutterBehaviourScale *scale, - CoglFixed x_scale_start, - CoglFixed y_scale_start, - CoglFixed x_scale_end, - CoglFixed y_scale_end) -{ - clutter_behaviour_scale_set_bounds (scale, - COGL_FIXED_TO_DOUBLE (x_scale_start), - COGL_FIXED_TO_DOUBLE (y_scale_start), - COGL_FIXED_TO_DOUBLE (x_scale_end), - COGL_FIXED_TO_DOUBLE (y_scale_end)); -} - -/** - * clutter_behaviour_scale_get_boundsx: - * @scale: a #ClutterBehaviourScale - * @x_scale_start: return location for the initial scale factor on the X - * axis, or %NULL - * @y_scale_start: return location for the initial scale factor on the Y - * axis, or %NULL - * @x_scale_end: return location for the final scale factor on the X axis, - * or %NULL - * @y_scale_end: return location for the final scale factor on the Y axis, - * or %NULL - * - * Fixed point version of clutter_behaviour_scale_get_bounds(). - * - * Retrieves the bounds used by scale behaviour. - * - * Since: 0.4 - */ -void -clutter_behaviour_scale_get_boundsx (ClutterBehaviourScale *scale, - CoglFixed *x_scale_start, - CoglFixed *y_scale_start, - CoglFixed *x_scale_end, - CoglFixed *y_scale_end) -{ - ClutterBehaviourScalePrivate *priv; - - g_return_if_fail (CLUTTER_IS_BEHAVIOUR_SCALE (scale)); - - priv = scale->priv; - - if (x_scale_start) - *x_scale_start = COGL_FIXED_FROM_DOUBLE (priv->x_scale_start); - - if (x_scale_end) - *x_scale_end = COGL_FIXED_FROM_DOUBLE (priv->x_scale_end); - - if (y_scale_start) - *y_scale_start = COGL_FIXED_FROM_DOUBLE (priv->y_scale_start); - - if (y_scale_end) - *y_scale_end = COGL_FIXED_FROM_DOUBLE (priv->y_scale_end); -} diff --git a/clutter/clutter-behaviour-scale.h b/clutter/clutter-behaviour-scale.h index b82fed567..65dd297cc 100644 --- a/clutter/clutter-behaviour-scale.h +++ b/clutter/clutter-behaviour-scale.h @@ -76,38 +76,21 @@ struct _ClutterBehaviourScaleClass GType clutter_behaviour_scale_get_type (void) G_GNUC_CONST; -ClutterBehaviour *clutter_behaviour_scale_new (ClutterAlpha *alpha, - gdouble x_scale_start, - gdouble y_scale_start, - gdouble x_scale_end, - gdouble y_scale_end); -ClutterBehaviour *clutter_behaviour_scale_newx (ClutterAlpha *alpha, - CoglFixed x_scale_start, - CoglFixed y_scale_start, - CoglFixed x_scale_end, - CoglFixed y_scale_end); - -void clutter_behaviour_scale_set_bounds (ClutterBehaviourScale *scale, - gdouble x_scale_start, - gdouble y_scale_start, - gdouble x_scale_end, - gdouble y_scale_end); -void clutter_behaviour_scale_get_bounds (ClutterBehaviourScale *scale, - gdouble *x_scale_start, - gdouble *y_scale_start, - gdouble *x_scale_end, - gdouble *y_scale_end); - -void clutter_behaviour_scale_set_boundsx (ClutterBehaviourScale *scale, - CoglFixed x_scale_start, - CoglFixed y_scale_start, - CoglFixed x_scale_end, - CoglFixed y_scale_end); -void clutter_behaviour_scale_get_boundsx (ClutterBehaviourScale *scale, - CoglFixed *x_scale_start, - CoglFixed *y_scale_start, - CoglFixed *x_scale_end, - CoglFixed *y_scale_end); +ClutterBehaviour *clutter_behaviour_scale_new (ClutterAlpha *alpha, + gdouble x_scale_start, + gdouble y_scale_start, + gdouble x_scale_end, + gdouble y_scale_end); +void clutter_behaviour_scale_set_bounds (ClutterBehaviourScale *scale, + gdouble x_scale_start, + gdouble y_scale_start, + gdouble x_scale_end, + gdouble y_scale_end); +void clutter_behaviour_scale_get_bounds (ClutterBehaviourScale *scale, + gdouble *x_scale_start, + gdouble *y_scale_start, + gdouble *x_scale_end, + gdouble *y_scale_end); G_END_DECLS diff --git a/clutter/clutter-deprecated.h b/clutter/clutter-deprecated.h index f27b81536..69a069e41 100644 --- a/clutter/clutter-deprecated.h +++ b/clutter/clutter-deprecated.h @@ -178,4 +178,24 @@ #define clutter_actor_get_box_from_vertices clutter_actor_get_box_from_vertices_REPLACED_BY_clutter_actor_box_from_vertices +#define clutter_behaviour_ellipse_newx clutter_behaviour_ellipse_newx_DEPRECATED_BY_clutter_behaviour_ellipse_new +#define clutter_behaviour_ellipse_set_angle_startx clutter_behaviour_ellipse_set_angle_startx_DEPRECATED_BY_clutter_behaviour_ellipse_set_angle_start +#define clutter_behaviour_ellipse_get_angle_startx clutter_behaviour_ellipse_get_angle_startx_DEPRECATED_BY_clutter_behaviour_ellipse_get_angle_start +#define clutter_behaviour_ellipse_set_angle_endx clutter_behaviour_ellipse_set_angle_endx_DEPRECATED_BY_clutter_behaviour_ellipse_set_angle_end +#define clutter_behaviour_ellipse_get_angle_endx clutter_behaviour_ellipse_get_angle_endx_DEPRECATED_BY_clutter_behaviour_ellipse_get_angle_end +#define clutter_behaviour_ellipse_set_angle_tiltx clutter_behaviour_ellipse_set_angle_tiltx_DEPRECATED_BY_clutter_behaviour_ellipse_set_angle_tilt +#define clutter_behaviour_ellipse_get_angle_tiltx clutter_behaviour_ellipse_get_angle_tiltx_DEPRECATED_BY_clutter_behaviour_ellipse_get_angle_tilt +#define clutter_behaviour_ellipse_set_tiltx clutter_behaviour_ellipse_set_tiltx_DEPRECATED_BY_clutter_behaviour_ellipse_set_tilt +#define clutter_behaviour_ellipse_get_tiltx clutter_behaviour_ellipse_get_tiltx_DEPRECATED_BY_clutter_behaviour_ellipse_get_tilt + +#define clutter_behaviour_rotate_newx clutter_behaviour_rotate_newx_DEPRECATED_BY_clutter_behaviour_rotate_new +#define clutter_behaviour_rotate_get_boundsx clutter_behaviour_rotate_get_boundsx_DEPRECATED_BY_clutter_behaviour_rotate_get_bounds +#define clutter_behaviour_rotate_set_boundsx clutter_behaviour_rotate_set_boundsx_DEPRECATED_BY_clutter_behaviour_rotate_set_bounds + +#define clutter_behaviour_scale_newx clutter_behaviour_scale_newx_DEPRECATED_BY_clutter_behaviour_scale_new +#define clutter_behaviour_scale_set_boundsx clutter_behaviour_scale_set_boundsx_DEPRECATED_BY_clutter_behaviour_scale_set_bounds +#define clutter_behaviour_scale_get_boundsx clutter_behaviour_scale_get_boundsx_DEPRECATED_BY_clutter_behaviour_scale_get_bounds + +#define clutter_timeline_get_progressx clutter_timeline_get_progressx_DEPRECATED_BY_clutter_timeline_get_progress + #endif /* CLUTTER_DEPRECATED_H */ diff --git a/clutter/clutter-timeline.c b/clutter/clutter-timeline.c index 98cff0b43..e254f4598 100644 --- a/clutter/clutter-timeline.c +++ b/clutter/clutter-timeline.c @@ -1114,22 +1114,6 @@ clutter_timeline_get_progress (ClutterTimeline *timeline) return (gdouble) priv->elapsed_time / (gdouble) priv->duration; } -/** - * clutter_timeline_get_progressx: - * @timeline: a #ClutterTimeline - * - * Fixed point version of clutter_timeline_get_progress(). - * - * Return value: the position of the timeline as a fixed point value - * - * Since: 0.6 - */ -CoglFixed -clutter_timeline_get_progressx (ClutterTimeline *timeline) -{ - return COGL_FIXED_FROM_DOUBLE (clutter_timeline_get_progress (timeline)); -} - /** * clutter_timeline_get_direction: * @timeline: a #ClutterTimeline diff --git a/clutter/clutter-timeline.h b/clutter/clutter-timeline.h index 2cb83e7d5..f3ab6247f 100644 --- a/clutter/clutter-timeline.h +++ b/clutter/clutter-timeline.h @@ -134,7 +134,6 @@ void clutter_timeline_advance (ClutterTimeline *timeli guint msecs); guint clutter_timeline_get_elapsed_time (ClutterTimeline *timeline); gdouble clutter_timeline_get_progress (ClutterTimeline *timeline); -CoglFixed clutter_timeline_get_progressx (ClutterTimeline *timeline); gboolean clutter_timeline_is_playing (ClutterTimeline *timeline); void clutter_timeline_set_delay (ClutterTimeline *timeline, guint msecs); diff --git a/doc/reference/clutter/clutter-sections.txt b/doc/reference/clutter/clutter-sections.txt index 2bb70e88c..43d0ee77f 100644 --- a/doc/reference/clutter/clutter-sections.txt +++ b/doc/reference/clutter/clutter-sections.txt @@ -575,7 +575,6 @@ clutter_timeline_advance clutter_timeline_get_elapsed_time clutter_timeline_get_delta clutter_timeline_get_progress -clutter_timeline_get_progressx clutter_timeline_is_playing @@ -715,15 +714,12 @@ ClutterRotateDirection ClutterBehaviourRotate ClutterBehaviourRotateClass clutter_behaviour_rotate_new -clutter_behaviour_rotate_newx clutter_behaviour_rotate_set_axis clutter_behaviour_rotate_get_axis clutter_behaviour_rotate_set_direction clutter_behaviour_rotate_get_direction clutter_behaviour_rotate_set_bounds -clutter_behaviour_rotate_set_boundsx clutter_behaviour_rotate_get_bounds -clutter_behaviour_rotate_get_boundsx clutter_behaviour_rotate_set_center clutter_behaviour_rotate_get_center @@ -745,11 +741,8 @@ ClutterGravity ClutterBehaviourScale ClutterBehaviourScaleClass clutter_behaviour_scale_new -clutter_behaviour_scale_newx clutter_behaviour_scale_set_bounds clutter_behaviour_scale_get_bounds -clutter_behaviour_scale_set_boundsx -clutter_behaviour_scale_get_boundsx CLUTTER_BEHAVIOUR_SCALE CLUTTER_IS_BEHAVIOUR_SCALE @@ -768,29 +761,20 @@ clutter_behaviour_scale_get_type ClutterBehaviourEllipse ClutterBehaviourEllipseClass clutter_behaviour_ellipse_new -clutter_behaviour_ellipse_newx clutter_behaviour_ellipse_set_center clutter_behaviour_ellipse_get_center clutter_behaviour_ellipse_set_angle_start clutter_behaviour_ellipse_get_angle_start -clutter_behaviour_ellipse_set_angle_startx -clutter_behaviour_ellipse_get_angle_startx clutter_behaviour_ellipse_set_angle_end clutter_behaviour_ellipse_get_angle_end -clutter_behaviour_ellipse_set_angle_endx -clutter_behaviour_ellipse_get_angle_endx clutter_behaviour_ellipse_set_angle_tilt clutter_behaviour_ellipse_get_angle_tilt -clutter_behaviour_ellipse_set_angle_tiltx -clutter_behaviour_ellipse_get_angle_tiltx clutter_behaviour_ellipse_set_height clutter_behaviour_ellipse_get_height clutter_behaviour_ellipse_set_width clutter_behaviour_ellipse_get_width clutter_behaviour_ellipse_set_tilt clutter_behaviour_ellipse_get_tilt -clutter_behaviour_ellipse_set_tiltx -clutter_behaviour_ellipse_get_tiltx clutter_behaviour_ellipse_set_direction clutter_behaviour_ellipse_get_direction