Remove the last few fixed-point entry points

The last fixed-point entry points are just a few, and trivial. The
end user is expected to do the conversion using the CoglFixed type
and macros.
This commit is contained in:
Emmanuele Bassi 2009-06-19 16:38:35 +01:00
parent cb4e5c9083
commit a79d6228aa
10 changed files with 94 additions and 628 deletions

View File

@ -5,9 +5,10 @@
* *
* An OpenGL based 'interactive canvas' library. * An OpenGL based 'interactive canvas' library.
* *
* Authored By Tomas Frydrych <tf@openedhand.com> * Authored By Tomas Frydrych <tf@openedhand.com>
* *
* 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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * 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: * clutter_behaviour_ellipse_set_center:
* @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", &center,
"width", width,
"height", height,
"direction", direction,
"angle-start", real_start,
"angle-end", real_end,
NULL);
}
/**
* clutter_behaviour_ellipse_set_center
* @self: a #ClutterBehaviourEllipse * @self: a #ClutterBehaviourEllipse
* @x: x coordinace of centre * @x: x coordinace of centre
* @y: y 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 * @self: a #ClutterBehaviourEllipse
* @x: return location for the X coordinate of the center, or %NULL * @x: return location for the X coordinate of the center, or %NULL
* @y: return location for the Y 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 * @self: a #ClutterBehaviourEllipse
* @width: width of the ellipse * @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 * @self: a #ClutterBehaviourEllipse
* *
* Gets the width of the elliptical path. * 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 * @self: a #ClutterBehaviourEllipse
* @height: height of the ellipse * @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 * @self: a #ClutterBehaviourEllipse
* *
* Gets the height of the elliptical path. * 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 * @self: a #ClutterBehaviourEllipse
* @angle_start: angle at which movement starts in degrees, between 0 and 360. * @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 * clutter_behaviour_ellipse_get_angle_start:
* @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
* @self: a #ClutterBehaviourEllipse * @self: a #ClutterBehaviourEllipse
* *
* Gets the angle at which movements starts. * 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 * clutter_behaviour_ellipse_set_angle_end:
* @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
* @self: a #ClutterBehaviourEllipse * @self: a #ClutterBehaviourEllipse
* @angle_end: angle at which movement ends in degrees, between 0 and 360. * @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 * clutter_behaviour_ellipse_get_angle_end:
* @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
* @self: a #ClutterBehaviourEllipse * @self: a #ClutterBehaviourEllipse
* *
* Gets the at which movements ends. * Gets the at which movements ends.
@ -942,25 +834,7 @@ clutter_behaviour_ellipse_get_angle_end (ClutterBehaviourEllipse *self)
} }
/** /**
* clutter_behaviour_ellipse_get_angle_endx * clutter_behaviour_ellipse_set_angle_tilt:
* @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
* @self: a #ClutterBehaviourEllipse * @self: a #ClutterBehaviourEllipse
* @axis: a #ClutterRotateAxis * @axis: a #ClutterRotateAxis
* @angle_tilt: tilt of the elipse around the center in the given axis in * @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 * clutter_behaviour_ellipse_get_angle_tilt:
* @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
* @self: a #ClutterBehaviourEllipse * @self: a #ClutterBehaviourEllipse
* @axis: a #ClutterRotateAxis * @axis: a #ClutterRotateAxis
* *
@ -1066,39 +919,7 @@ clutter_behaviour_ellipse_get_angle_tilt (ClutterBehaviourEllipse *self,
} }
/** /**
* clutter_behaviour_ellipse_get_angle_tiltx * clutter_behaviour_ellipse_set_tilt:
* @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
* @self: a #ClutterBehaviourEllipse * @self: a #ClutterBehaviourEllipse
* @angle_tilt_x: tilt of the elipse around the center in X axis in degrees. * @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. * @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 * clutter_behaviour_ellipse_get_tilt:
* @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
* @self: a #ClutterBehaviourEllipse * @self: a #ClutterBehaviourEllipse
* @angle_tilt_x: return location for tilt angle on the X axis, or %NULL. * @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. * @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; *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: * clutter_behaviour_ellipse_get_direction:
* @self: a #ClutterBehaviourEllipse * @self: a #ClutterBehaviourEllipse

View File

@ -91,100 +91,48 @@ struct _ClutterBehaviourEllipseClass
GType clutter_behaviour_ellipse_get_type (void) G_GNUC_CONST; GType clutter_behaviour_ellipse_get_type (void) G_GNUC_CONST;
ClutterBehaviour * clutter_behaviour_ellipse_new (ClutterAlpha *alpha, ClutterBehaviour * clutter_behaviour_ellipse_new (ClutterAlpha *alpha,
gint x, gint x,
gint y, gint y,
gint width, gint width,
gint height, gint height,
ClutterRotateDirection direction, ClutterRotateDirection direction,
gdouble start, gdouble start,
gdouble end); gdouble end);
void clutter_behaviour_ellipse_set_center (ClutterBehaviourEllipse *self,
ClutterBehaviour * clutter_behaviour_ellipse_newx (ClutterAlpha *alpha, gint x,
gint x, gint y);
gint y, void clutter_behaviour_ellipse_get_center (ClutterBehaviourEllipse *self,
gint width, gint *x,
gint height, gint *y);
ClutterRotateDirection direction, void clutter_behaviour_ellipse_set_width (ClutterBehaviourEllipse *self,
CoglFixed start, gint width);
CoglFixed end); gint clutter_behaviour_ellipse_get_width (ClutterBehaviourEllipse *self);
void clutter_behaviour_ellipse_set_height (ClutterBehaviourEllipse *self,
void clutter_behaviour_ellipse_set_center (ClutterBehaviourEllipse *self, gint height);
gint x, gint clutter_behaviour_ellipse_get_height (ClutterBehaviourEllipse *self);
gint y); void clutter_behaviour_ellipse_set_angle_start (ClutterBehaviourEllipse *self,
gdouble angle_start);
void clutter_behaviour_ellipse_get_center (ClutterBehaviourEllipse *self, gdouble clutter_behaviour_ellipse_get_angle_start (ClutterBehaviourEllipse *self);
gint *x, void clutter_behaviour_ellipse_set_angle_end (ClutterBehaviourEllipse *self,
gint *y); gdouble angle_end);
gdouble clutter_behaviour_ellipse_get_angle_end (ClutterBehaviourEllipse *self);
void clutter_behaviour_ellipse_set_width (ClutterBehaviourEllipse *self, void clutter_behaviour_ellipse_set_angle_tilt (ClutterBehaviourEllipse *self,
gint width); ClutterRotateAxis axis,
gdouble angle_tilt);
gint clutter_behaviour_ellipse_get_width (ClutterBehaviourEllipse *self); gdouble clutter_behaviour_ellipse_get_angle_tilt (ClutterBehaviourEllipse *self,
ClutterRotateAxis axis);
void clutter_behaviour_ellipse_set_height (ClutterBehaviourEllipse *self, void clutter_behaviour_ellipse_set_tilt (ClutterBehaviourEllipse *self,
gint height); gdouble angle_tilt_x,
gdouble angle_tilt_y,
gint clutter_behaviour_ellipse_get_height (ClutterBehaviourEllipse *self); gdouble angle_tilt_z);
void clutter_behaviour_ellipse_get_tilt (ClutterBehaviourEllipse *self,
void clutter_behaviour_ellipse_set_angle_start (ClutterBehaviourEllipse *self, gdouble *angle_tilt_x,
gdouble angle_start); gdouble *angle_tilt_y,
gdouble *angle_tilt_z);
void clutter_behaviour_ellipse_set_angle_startx (ClutterBehaviourEllipse *self, ClutterRotateDirection clutter_behaviour_ellipse_get_direction (ClutterBehaviourEllipse *self);
CoglFixed angle_start); void clutter_behaviour_ellipse_set_direction (ClutterBehaviourEllipse *self,
ClutterRotateDirection direction);
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);
G_END_DECLS G_END_DECLS

View File

@ -436,51 +436,6 @@ clutter_behaviour_rotate_new (ClutterAlpha *alpha,
NULL); 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: * clutter_behaviour_rotate_get_axis:
* @rotate: a #ClutterBehaviourRotate * @rotate: a #ClutterBehaviourRotate
@ -641,57 +596,6 @@ clutter_behaviour_rotate_set_bounds (ClutterBehaviourRotate *rotate,
g_object_thaw_notify (G_OBJECT (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: * clutter_behaviour_rotate_set_center:
* @rotate: a #ClutterBehaviourRotate * @rotate: a #ClutterBehaviourRotate

View File

@ -81,11 +81,6 @@ ClutterBehaviour * clutter_behaviour_rotate_new (ClutterAlpha
ClutterRotateDirection direction, ClutterRotateDirection direction,
gdouble angle_start, gdouble angle_start,
gdouble angle_end); 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, void clutter_behaviour_rotate_get_center (ClutterBehaviourRotate *rotate,
gint *x, gint *x,
gint *y, gint *y,
@ -106,12 +101,6 @@ void clutter_behaviour_rotate_get_bounds (ClutterBehaviourR
void clutter_behaviour_rotate_set_bounds (ClutterBehaviourRotate *rotate, void clutter_behaviour_rotate_set_bounds (ClutterBehaviourRotate *rotate,
gdouble angle_start, gdouble angle_start,
gdouble angle_end); 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 G_END_DECLS

View File

@ -314,38 +314,6 @@ clutter_behaviour_scale_new (ClutterAlpha *alpha,
NULL); 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: * clutter_behaviour_scale_set_bounds:
* @scale: a #ClutterBehaviourScale * @scale: a #ClutterBehaviourScale
@ -441,75 +409,3 @@ clutter_behaviour_scale_get_bounds (ClutterBehaviourScale *scale,
if (y_scale_end) if (y_scale_end)
*y_scale_end = priv->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);
}

View File

@ -76,38 +76,21 @@ struct _ClutterBehaviourScaleClass
GType clutter_behaviour_scale_get_type (void) G_GNUC_CONST; GType clutter_behaviour_scale_get_type (void) G_GNUC_CONST;
ClutterBehaviour *clutter_behaviour_scale_new (ClutterAlpha *alpha, ClutterBehaviour *clutter_behaviour_scale_new (ClutterAlpha *alpha,
gdouble x_scale_start, gdouble x_scale_start,
gdouble y_scale_start, gdouble y_scale_start,
gdouble x_scale_end, gdouble x_scale_end,
gdouble y_scale_end); gdouble y_scale_end);
ClutterBehaviour *clutter_behaviour_scale_newx (ClutterAlpha *alpha, void clutter_behaviour_scale_set_bounds (ClutterBehaviourScale *scale,
CoglFixed x_scale_start, gdouble x_scale_start,
CoglFixed y_scale_start, gdouble y_scale_start,
CoglFixed x_scale_end, gdouble x_scale_end,
CoglFixed y_scale_end); gdouble y_scale_end);
void clutter_behaviour_scale_get_bounds (ClutterBehaviourScale *scale,
void clutter_behaviour_scale_set_bounds (ClutterBehaviourScale *scale, gdouble *x_scale_start,
gdouble x_scale_start, gdouble *y_scale_start,
gdouble y_scale_start, gdouble *x_scale_end,
gdouble x_scale_end, gdouble *y_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);
G_END_DECLS G_END_DECLS

View File

@ -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_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 */ #endif /* CLUTTER_DEPRECATED_H */

View File

@ -1114,22 +1114,6 @@ clutter_timeline_get_progress (ClutterTimeline *timeline)
return (gdouble) priv->elapsed_time / (gdouble) priv->duration; 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: * clutter_timeline_get_direction:
* @timeline: a #ClutterTimeline * @timeline: a #ClutterTimeline

View File

@ -134,7 +134,6 @@ void clutter_timeline_advance (ClutterTimeline *timeli
guint msecs); guint msecs);
guint clutter_timeline_get_elapsed_time (ClutterTimeline *timeline); guint clutter_timeline_get_elapsed_time (ClutterTimeline *timeline);
gdouble clutter_timeline_get_progress (ClutterTimeline *timeline); gdouble clutter_timeline_get_progress (ClutterTimeline *timeline);
CoglFixed clutter_timeline_get_progressx (ClutterTimeline *timeline);
gboolean clutter_timeline_is_playing (ClutterTimeline *timeline); gboolean clutter_timeline_is_playing (ClutterTimeline *timeline);
void clutter_timeline_set_delay (ClutterTimeline *timeline, void clutter_timeline_set_delay (ClutterTimeline *timeline,
guint msecs); guint msecs);

View File

@ -575,7 +575,6 @@ clutter_timeline_advance
clutter_timeline_get_elapsed_time clutter_timeline_get_elapsed_time
clutter_timeline_get_delta clutter_timeline_get_delta
clutter_timeline_get_progress clutter_timeline_get_progress
clutter_timeline_get_progressx
clutter_timeline_is_playing clutter_timeline_is_playing
<SUBSECTION> <SUBSECTION>
@ -715,15 +714,12 @@ ClutterRotateDirection
ClutterBehaviourRotate ClutterBehaviourRotate
ClutterBehaviourRotateClass ClutterBehaviourRotateClass
clutter_behaviour_rotate_new clutter_behaviour_rotate_new
clutter_behaviour_rotate_newx
clutter_behaviour_rotate_set_axis clutter_behaviour_rotate_set_axis
clutter_behaviour_rotate_get_axis clutter_behaviour_rotate_get_axis
clutter_behaviour_rotate_set_direction clutter_behaviour_rotate_set_direction
clutter_behaviour_rotate_get_direction clutter_behaviour_rotate_get_direction
clutter_behaviour_rotate_set_bounds clutter_behaviour_rotate_set_bounds
clutter_behaviour_rotate_set_boundsx
clutter_behaviour_rotate_get_bounds clutter_behaviour_rotate_get_bounds
clutter_behaviour_rotate_get_boundsx
clutter_behaviour_rotate_set_center clutter_behaviour_rotate_set_center
clutter_behaviour_rotate_get_center clutter_behaviour_rotate_get_center
<SUBSECTION Standard> <SUBSECTION Standard>
@ -745,11 +741,8 @@ ClutterGravity
ClutterBehaviourScale ClutterBehaviourScale
ClutterBehaviourScaleClass ClutterBehaviourScaleClass
clutter_behaviour_scale_new clutter_behaviour_scale_new
clutter_behaviour_scale_newx
clutter_behaviour_scale_set_bounds clutter_behaviour_scale_set_bounds
clutter_behaviour_scale_get_bounds clutter_behaviour_scale_get_bounds
clutter_behaviour_scale_set_boundsx
clutter_behaviour_scale_get_boundsx
<SUBSECTION Standard> <SUBSECTION Standard>
CLUTTER_BEHAVIOUR_SCALE CLUTTER_BEHAVIOUR_SCALE
CLUTTER_IS_BEHAVIOUR_SCALE CLUTTER_IS_BEHAVIOUR_SCALE
@ -768,29 +761,20 @@ clutter_behaviour_scale_get_type
ClutterBehaviourEllipse ClutterBehaviourEllipse
ClutterBehaviourEllipseClass ClutterBehaviourEllipseClass
clutter_behaviour_ellipse_new clutter_behaviour_ellipse_new
clutter_behaviour_ellipse_newx
clutter_behaviour_ellipse_set_center clutter_behaviour_ellipse_set_center
clutter_behaviour_ellipse_get_center clutter_behaviour_ellipse_get_center
clutter_behaviour_ellipse_set_angle_start clutter_behaviour_ellipse_set_angle_start
clutter_behaviour_ellipse_get_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_set_angle_end
clutter_behaviour_ellipse_get_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_set_angle_tilt
clutter_behaviour_ellipse_get_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_set_height
clutter_behaviour_ellipse_get_height clutter_behaviour_ellipse_get_height
clutter_behaviour_ellipse_set_width clutter_behaviour_ellipse_set_width
clutter_behaviour_ellipse_get_width clutter_behaviour_ellipse_get_width
clutter_behaviour_ellipse_set_tilt clutter_behaviour_ellipse_set_tilt
clutter_behaviour_ellipse_get_tilt clutter_behaviour_ellipse_get_tilt
clutter_behaviour_ellipse_set_tiltx
clutter_behaviour_ellipse_get_tiltx
clutter_behaviour_ellipse_set_direction clutter_behaviour_ellipse_set_direction
clutter_behaviour_ellipse_get_direction clutter_behaviour_ellipse_get_direction
<SUBSECTION Standard> <SUBSECTION Standard>