Renamed all properties of behaviours (and related
functions/variables/parameters) to match the pattern something-start, something-end. Fixes bug #577. * clutter/clutter-behaviour-depth.c: * clutter/clutter-behaviour-depth.h: * clutter/clutter-behaviour-ellipse.c: * clutter/clutter-behaviour-ellipse.h: * clutter/clutter-behaviour-path.c: * clutter/clutter-behaviour-rotate.c: * clutter/clutter-behaviour-rotate.h: * clutter/clutter-behaviour-scale.c: * clutter/clutter-behaviour-scale.h: * clutter/clutter-effect.c: * clutter/clutter-effect.h: * clutter/clutter-script.c: * tests/test-depth.c: * tests/test-script.c:
This commit is contained in:
parent
95338ba67b
commit
0dee5eaac3
21
ChangeLog
21
ChangeLog
@ -1,3 +1,24 @@
|
|||||||
|
2007-11-13 Øyvind Kolås <pippin@o-hand.com>
|
||||||
|
|
||||||
|
Renamed all properties of behaviours (and related
|
||||||
|
functions/variables/parameters)
|
||||||
|
to match the pattern something-start, something-end. Fixes bug #577.
|
||||||
|
|
||||||
|
* clutter/clutter-behaviour-depth.c:
|
||||||
|
* clutter/clutter-behaviour-depth.h:
|
||||||
|
* clutter/clutter-behaviour-ellipse.c:
|
||||||
|
* clutter/clutter-behaviour-ellipse.h:
|
||||||
|
* clutter/clutter-behaviour-path.c:
|
||||||
|
* clutter/clutter-behaviour-rotate.c:
|
||||||
|
* clutter/clutter-behaviour-rotate.h:
|
||||||
|
* clutter/clutter-behaviour-scale.c:
|
||||||
|
* clutter/clutter-behaviour-scale.h:
|
||||||
|
* clutter/clutter-effect.c:
|
||||||
|
* clutter/clutter-effect.h:
|
||||||
|
* clutter/clutter-script.c:
|
||||||
|
* tests/test-depth.c:
|
||||||
|
* tests/test-script.c:
|
||||||
|
|
||||||
2007-11-06 Øyvind Kolås <pippin@o-hand.com>
|
2007-11-06 Øyvind Kolås <pippin@o-hand.com>
|
||||||
|
|
||||||
* clutter/clutter-event.h: made ClutterEventAny have a source field,
|
* clutter/clutter-event.h: made ClutterEventAny have a source field,
|
||||||
|
@ -52,16 +52,16 @@ G_DEFINE_TYPE (ClutterBehaviourDepth,
|
|||||||
|
|
||||||
struct _ClutterBehaviourDepthPrivate
|
struct _ClutterBehaviourDepthPrivate
|
||||||
{
|
{
|
||||||
gint start_depth;
|
gint depth_start;
|
||||||
gint end_depth;
|
gint depth_end;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
PROP_0,
|
PROP_0,
|
||||||
|
|
||||||
PROP_START_DEPTH,
|
PROP_DEPTH_START,
|
||||||
PROP_END_DEPTH
|
PROP_DEPTH_END
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -84,9 +84,9 @@ clutter_behaviour_depth_alpha_notify (ClutterBehaviour *behaviour,
|
|||||||
|
|
||||||
/* Need to create factor as to avoid borking signedness */
|
/* Need to create factor as to avoid borking signedness */
|
||||||
factor = CLUTTER_INT_TO_FIXED (alpha_value) / CLUTTER_ALPHA_MAX_ALPHA;
|
factor = CLUTTER_INT_TO_FIXED (alpha_value) / CLUTTER_ALPHA_MAX_ALPHA;
|
||||||
depth = priv->start_depth
|
depth = priv->depth_start
|
||||||
+ CLUTTER_FIXED_TO_INT (factor
|
+ CLUTTER_FIXED_TO_INT (factor
|
||||||
* (priv->end_depth - priv->start_depth));
|
* (priv->depth_end - priv->depth_start));
|
||||||
|
|
||||||
CLUTTER_NOTE (BEHAVIOUR, "alpha: %d, depth: %d", alpha_value, depth);
|
CLUTTER_NOTE (BEHAVIOUR, "alpha: %d, depth: %d", alpha_value, depth);
|
||||||
|
|
||||||
@ -101,7 +101,7 @@ clutter_behaviour_depth_applied (ClutterBehaviour *behaviour,
|
|||||||
{
|
{
|
||||||
ClutterBehaviourDepth *depth = CLUTTER_BEHAVIOUR_DEPTH (behaviour);
|
ClutterBehaviourDepth *depth = CLUTTER_BEHAVIOUR_DEPTH (behaviour);
|
||||||
|
|
||||||
clutter_actor_set_depth (actor, depth->priv->start_depth);
|
clutter_actor_set_depth (actor, depth->priv->depth_start);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -114,11 +114,11 @@ clutter_behaviour_depth_set_property (GObject *gobject,
|
|||||||
|
|
||||||
switch (prop_id)
|
switch (prop_id)
|
||||||
{
|
{
|
||||||
case PROP_START_DEPTH:
|
case PROP_DEPTH_START:
|
||||||
depth->priv->start_depth = g_value_get_int (value);
|
depth->priv->depth_start = g_value_get_int (value);
|
||||||
break;
|
break;
|
||||||
case PROP_END_DEPTH:
|
case PROP_DEPTH_END:
|
||||||
depth->priv->end_depth = g_value_get_int (value);
|
depth->priv->depth_end = g_value_get_int (value);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
|
||||||
@ -136,11 +136,11 @@ clutter_behaviour_depth_get_property (GObject *gobject,
|
|||||||
|
|
||||||
switch (prop_id)
|
switch (prop_id)
|
||||||
{
|
{
|
||||||
case PROP_START_DEPTH:
|
case PROP_DEPTH_START:
|
||||||
g_value_set_int (value, depth->priv->start_depth);
|
g_value_set_int (value, depth->priv->depth_start);
|
||||||
break;
|
break;
|
||||||
case PROP_END_DEPTH:
|
case PROP_DEPTH_END:
|
||||||
g_value_set_int (value, depth->priv->end_depth);
|
g_value_set_int (value, depth->priv->depth_end);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
|
||||||
@ -163,31 +163,31 @@ clutter_behaviour_depth_class_init (ClutterBehaviourDepthClass *klass)
|
|||||||
behaviour_class->applied = clutter_behaviour_depth_applied;
|
behaviour_class->applied = clutter_behaviour_depth_applied;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ClutterBehaviourDepth:start-depth:
|
* ClutterBehaviourDepth:depth-start:
|
||||||
*
|
*
|
||||||
* Start depth level to apply to the actors.
|
* Start depth level to apply to the actors.
|
||||||
*
|
*
|
||||||
* Since: 0.4
|
* Since: 0.4
|
||||||
*/
|
*/
|
||||||
g_object_class_install_property (gobject_class,
|
g_object_class_install_property (gobject_class,
|
||||||
PROP_START_DEPTH,
|
PROP_DEPTH_START,
|
||||||
g_param_spec_int ("start-depth",
|
g_param_spec_int ("depth-start",
|
||||||
"Start Depth",
|
"Start Depth",
|
||||||
"Start depth to apply",
|
"Initial depth to apply",
|
||||||
G_MININT, G_MAXINT, 0,
|
G_MININT, G_MAXINT, 0,
|
||||||
CLUTTER_PARAM_READWRITE));
|
CLUTTER_PARAM_READWRITE));
|
||||||
/**
|
/**
|
||||||
* ClutterBehaviourDepth:end-depth:
|
* ClutterBehaviourDepth:depth-end:
|
||||||
*
|
*
|
||||||
* End depth level to apply to the actors.
|
* End depth level to apply to the actors.
|
||||||
*
|
*
|
||||||
* Since: 0.4
|
* Since: 0.4
|
||||||
*/
|
*/
|
||||||
g_object_class_install_property (gobject_class,
|
g_object_class_install_property (gobject_class,
|
||||||
PROP_END_DEPTH,
|
PROP_DEPTH_END,
|
||||||
g_param_spec_int ("end-depth",
|
g_param_spec_int ("depth-end",
|
||||||
"End Depth",
|
"End Depth",
|
||||||
"End depth to apply",
|
"Final depth to apply",
|
||||||
G_MININT, G_MAXINT, 0,
|
G_MININT, G_MAXINT, 0,
|
||||||
CLUTTER_PARAM_READWRITE));
|
CLUTTER_PARAM_READWRITE));
|
||||||
}
|
}
|
||||||
@ -203,8 +203,8 @@ clutter_behaviour_depth_init (ClutterBehaviourDepth *depth)
|
|||||||
/**
|
/**
|
||||||
* clutter_behaviour_depth_new:
|
* clutter_behaviour_depth_new:
|
||||||
* @alpha: a #ClutterAlpha or %NULL
|
* @alpha: a #ClutterAlpha or %NULL
|
||||||
* @start_depth: start depth
|
* @depth_start: start depth
|
||||||
* @end_depth: end depth
|
* @depth_end: end depth
|
||||||
*
|
*
|
||||||
* Creates a new #ClutterBehaviourDepth which can be used to control
|
* Creates a new #ClutterBehaviourDepth which can be used to control
|
||||||
* the ClutterActor:depth property of a set of #ClutterActor<!-- -->s.
|
* the ClutterActor:depth property of a set of #ClutterActor<!-- -->s.
|
||||||
@ -215,14 +215,14 @@ clutter_behaviour_depth_init (ClutterBehaviourDepth *depth)
|
|||||||
*/
|
*/
|
||||||
ClutterBehaviour *
|
ClutterBehaviour *
|
||||||
clutter_behaviour_depth_new (ClutterAlpha *alpha,
|
clutter_behaviour_depth_new (ClutterAlpha *alpha,
|
||||||
gint start_depth,
|
gint depth_start,
|
||||||
gint end_depth)
|
gint depth_end)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (alpha == NULL || CLUTTER_IS_ALPHA (alpha), NULL);
|
g_return_val_if_fail (alpha == NULL || CLUTTER_IS_ALPHA (alpha), NULL);
|
||||||
|
|
||||||
return g_object_new (CLUTTER_TYPE_BEHAVIOUR_DEPTH,
|
return g_object_new (CLUTTER_TYPE_BEHAVIOUR_DEPTH,
|
||||||
"alpha", alpha,
|
"alpha", alpha,
|
||||||
"start-depth", start_depth,
|
"depth-start", depth_start,
|
||||||
"end-depth", end_depth,
|
"depth-end", depth_end,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
@ -59,8 +59,8 @@ struct _ClutterBehaviourDepthClass
|
|||||||
|
|
||||||
GType clutter_behaviour_depth_get_type (void) G_GNUC_CONST;
|
GType clutter_behaviour_depth_get_type (void) G_GNUC_CONST;
|
||||||
ClutterBehaviour *clutter_behaviour_depth_new (ClutterAlpha *alpha,
|
ClutterBehaviour *clutter_behaviour_depth_new (ClutterAlpha *alpha,
|
||||||
gint start_depth,
|
gint depth_start,
|
||||||
gint end_depth);
|
gint depth_end);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ enum
|
|||||||
PROP_CENTER,
|
PROP_CENTER,
|
||||||
PROP_WIDTH,
|
PROP_WIDTH,
|
||||||
PROP_HEIGHT,
|
PROP_HEIGHT,
|
||||||
PROP_ANGLE_BEGIN,
|
PROP_ANGLE_START,
|
||||||
PROP_ANGLE_END,
|
PROP_ANGLE_END,
|
||||||
PROP_ANGLE_TILT_X,
|
PROP_ANGLE_TILT_X,
|
||||||
PROP_ANGLE_TILT_Y,
|
PROP_ANGLE_TILT_Y,
|
||||||
@ -85,7 +85,7 @@ struct _ClutterBehaviourEllipsePrivate
|
|||||||
gint a;
|
gint a;
|
||||||
gint b;
|
gint b;
|
||||||
|
|
||||||
ClutterAngle angle_begin;
|
ClutterAngle angle_start;
|
||||||
ClutterAngle angle_end;
|
ClutterAngle angle_end;
|
||||||
ClutterAngle angle_tilt_x;
|
ClutterAngle angle_tilt_x;
|
||||||
ClutterAngle angle_tilt_y;
|
ClutterAngle angle_tilt_y;
|
||||||
@ -192,20 +192,20 @@ clutter_behaviour_ellipse_alpha_notify (ClutterBehaviour *behave,
|
|||||||
knot3d knot;
|
knot3d knot;
|
||||||
ClutterAngle angle = 0;
|
ClutterAngle angle = 0;
|
||||||
|
|
||||||
if ((priv->angle_end >= priv->angle_begin &&
|
if ((priv->angle_end >= priv->angle_start &&
|
||||||
priv->direction == CLUTTER_ROTATE_CW) ||
|
priv->direction == CLUTTER_ROTATE_CW) ||
|
||||||
(priv->angle_end < priv->angle_begin &&
|
(priv->angle_end < priv->angle_start &&
|
||||||
priv->direction == CLUTTER_ROTATE_CCW))
|
priv->direction == CLUTTER_ROTATE_CCW))
|
||||||
{
|
{
|
||||||
angle = (priv->angle_end - priv->angle_begin) * alpha
|
angle = (priv->angle_end - priv->angle_start) * alpha
|
||||||
/ CLUTTER_ALPHA_MAX_ALPHA
|
/ CLUTTER_ALPHA_MAX_ALPHA
|
||||||
+ priv->angle_begin;
|
+ priv->angle_start;
|
||||||
}
|
}
|
||||||
else if (priv->angle_end >= priv->angle_begin &&
|
else if (priv->angle_end >= priv->angle_start &&
|
||||||
priv->direction == CLUTTER_ROTATE_CCW)
|
priv->direction == CLUTTER_ROTATE_CCW)
|
||||||
{
|
{
|
||||||
ClutterAngle diff;
|
ClutterAngle diff;
|
||||||
ClutterAngle angle_begin = priv->angle_begin + 256;
|
ClutterAngle angle_start = priv->angle_start + 256;
|
||||||
ClutterAngle angle_end = priv->angle_end + 256;
|
ClutterAngle angle_end = priv->angle_end + 256;
|
||||||
|
|
||||||
/* Work out the angular length of the arch represented by the
|
/* Work out the angular length of the arch represented by the
|
||||||
@ -217,39 +217,39 @@ clutter_behaviour_ellipse_alpha_notify (ClutterBehaviour *behave,
|
|||||||
ClutterAngle a1 = rounds * 1024;
|
ClutterAngle a1 = rounds * 1024;
|
||||||
ClutterAngle a2 = - (angle_end - a1);
|
ClutterAngle a2 = - (angle_end - a1);
|
||||||
|
|
||||||
diff = a1 + a2 + angle_begin;
|
diff = a1 + a2 + angle_start;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
diff = 1024 - angle_end + angle_begin;
|
diff = 1024 - angle_end + angle_start;
|
||||||
}
|
}
|
||||||
|
|
||||||
angle = priv->angle_begin - (diff * alpha / CLUTTER_ALPHA_MAX_ALPHA);
|
angle = priv->angle_start - (diff * alpha / CLUTTER_ALPHA_MAX_ALPHA);
|
||||||
}
|
}
|
||||||
else if (priv->angle_end < priv->angle_begin &&
|
else if (priv->angle_end < priv->angle_start &&
|
||||||
priv->direction == CLUTTER_ROTATE_CW)
|
priv->direction == CLUTTER_ROTATE_CW)
|
||||||
{
|
{
|
||||||
ClutterAngle diff;
|
ClutterAngle diff;
|
||||||
ClutterAngle angle_begin = priv->angle_begin + 256;
|
ClutterAngle angle_start = priv->angle_start + 256;
|
||||||
ClutterAngle angle_end = priv->angle_end + 256;
|
ClutterAngle angle_end = priv->angle_end + 256;
|
||||||
|
|
||||||
/* Work out the angular length of the arch represented by the
|
/* Work out the angular length of the arch represented by the
|
||||||
* begin angle in CW direction
|
* start angle in CW direction
|
||||||
*/
|
*/
|
||||||
if (angle_begin >= 1024)
|
if (angle_start >= 1024)
|
||||||
{
|
{
|
||||||
gint rounds = angle_begin / 1024;
|
gint rounds = angle_start / 1024;
|
||||||
ClutterAngle a1 = rounds * 1024;
|
ClutterAngle a1 = rounds * 1024;
|
||||||
ClutterAngle a2 = - (angle_begin - a1);
|
ClutterAngle a2 = - (angle_start - a1);
|
||||||
|
|
||||||
diff = a1 + a2 + angle_end;
|
diff = a1 + a2 + angle_end;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
diff = 1024 - angle_begin + angle_end;
|
diff = 1024 - angle_start + angle_end;
|
||||||
}
|
}
|
||||||
|
|
||||||
angle = priv->angle_begin + (diff * alpha / CLUTTER_ALPHA_MAX_ALPHA);
|
angle = priv->angle_start + (diff * alpha / CLUTTER_ALPHA_MAX_ALPHA);
|
||||||
}
|
}
|
||||||
|
|
||||||
clutter_behaviour_ellipse_advance (self, angle, &knot);
|
clutter_behaviour_ellipse_advance (self, angle, &knot);
|
||||||
@ -271,8 +271,8 @@ clutter_behaviour_ellipse_set_property (GObject *gobject,
|
|||||||
|
|
||||||
switch (prop_id)
|
switch (prop_id)
|
||||||
{
|
{
|
||||||
case PROP_ANGLE_BEGIN:
|
case PROP_ANGLE_START:
|
||||||
priv->angle_begin =
|
priv->angle_start =
|
||||||
CLUTTER_ANGLE_FROM_DEG (g_value_get_double (value)) - 256;
|
CLUTTER_ANGLE_FROM_DEG (g_value_get_double (value)) - 256;
|
||||||
break;
|
break;
|
||||||
case PROP_ANGLE_END:
|
case PROP_ANGLE_END:
|
||||||
@ -325,9 +325,9 @@ clutter_behaviour_ellipse_get_property (GObject *gobject,
|
|||||||
|
|
||||||
switch (prop_id)
|
switch (prop_id)
|
||||||
{
|
{
|
||||||
case PROP_ANGLE_BEGIN:
|
case PROP_ANGLE_START:
|
||||||
g_value_set_double (value,
|
g_value_set_double (value,
|
||||||
CLUTTER_ANGLE_TO_DEG (priv->angle_begin + 256));
|
CLUTTER_ANGLE_TO_DEG (priv->angle_start + 256));
|
||||||
break;
|
break;
|
||||||
case PROP_ANGLE_END:
|
case PROP_ANGLE_END:
|
||||||
g_value_set_double (value,
|
g_value_set_double (value,
|
||||||
@ -370,7 +370,7 @@ clutter_behaviour_ellipse_applied (ClutterBehaviour *behave,
|
|||||||
ClutterBehaviourEllipse *e = CLUTTER_BEHAVIOUR_ELLIPSE (behave);
|
ClutterBehaviourEllipse *e = CLUTTER_BEHAVIOUR_ELLIPSE (behave);
|
||||||
knot3d knot;
|
knot3d knot;
|
||||||
|
|
||||||
clutter_behaviour_ellipse_advance (e, e->priv->angle_begin, &knot);
|
clutter_behaviour_ellipse_advance (e, e->priv->angle_start, &knot);
|
||||||
|
|
||||||
clutter_actor_set_position (actor, knot.x, knot.y);
|
clutter_actor_set_position (actor, knot.x, knot.y);
|
||||||
clutter_actor_set_depth (actor, knot.z);
|
clutter_actor_set_depth (actor, knot.z);
|
||||||
@ -397,16 +397,16 @@ clutter_behaviour_ellipse_class_init (ClutterBehaviourEllipseClass *klass)
|
|||||||
behave_class->applied = clutter_behaviour_ellipse_applied;
|
behave_class->applied = clutter_behaviour_ellipse_applied;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ClutterBehaviourEllipse:angle-begin:
|
* ClutterBehaviourEllipse:angle-start:
|
||||||
*
|
*
|
||||||
* The initial angle from where the rotation should begin.
|
* The initial angle from where the rotation should start.
|
||||||
*
|
*
|
||||||
* Since: 0.4
|
* Since: 0.4
|
||||||
*/
|
*/
|
||||||
g_object_class_install_property (object_class,
|
g_object_class_install_property (object_class,
|
||||||
PROP_ANGLE_BEGIN,
|
PROP_ANGLE_START,
|
||||||
g_param_spec_double ("angle-begin",
|
g_param_spec_double ("angle-start",
|
||||||
"Angle Begin",
|
"Start Angle",
|
||||||
"Initial angle",
|
"Initial angle",
|
||||||
0.0,
|
0.0,
|
||||||
CLUTTER_ANGLE_MAX_DEG,
|
CLUTTER_ANGLE_MAX_DEG,
|
||||||
@ -422,7 +422,7 @@ clutter_behaviour_ellipse_class_init (ClutterBehaviourEllipseClass *klass)
|
|||||||
g_object_class_install_property (object_class,
|
g_object_class_install_property (object_class,
|
||||||
PROP_ANGLE_END,
|
PROP_ANGLE_END,
|
||||||
g_param_spec_double ("angle-end",
|
g_param_spec_double ("angle-end",
|
||||||
"Angle End",
|
"End Angle",
|
||||||
"Final angle",
|
"Final angle",
|
||||||
0.0,
|
0.0,
|
||||||
CLUTTER_ANGLE_MAX_DEG,
|
CLUTTER_ANGLE_MAX_DEG,
|
||||||
@ -549,11 +549,11 @@ clutter_behaviour_ellipse_init (ClutterBehaviourEllipse * self)
|
|||||||
* @width: width of the ellipse
|
* @width: width of the ellipse
|
||||||
* @height: height of the ellipse
|
* @height: height of the ellipse
|
||||||
* @direction: #ClutterRotateDirection of rotation
|
* @direction: #ClutterRotateDirection of rotation
|
||||||
* @begin: angle in degrees at which movement begins
|
* @start: angle in degrees at which movement starts
|
||||||
* @end: angle in degrees at which movement ends
|
* @end: angle in degrees at which movement ends
|
||||||
*
|
*
|
||||||
* Creates a behaviour that drives actors along an elliptical path with
|
* Creates a behaviour that drives actors along an elliptical path with
|
||||||
* given center, width and height; the movement begins at @angle_begin
|
* given center, width and height; the movement starts at @angle_start
|
||||||
* degrees (with 0 corresponding to 12 o'clock) and ends at @angle_end degrees;
|
* degrees (with 0 corresponding to 12 o'clock) and ends at @angle_end degrees;
|
||||||
* Return value: the newly created #ClutterBehaviourEllipse
|
* Return value: the newly created #ClutterBehaviourEllipse
|
||||||
*
|
*
|
||||||
@ -566,7 +566,7 @@ clutter_behaviour_ellipse_new (ClutterAlpha *alpha,
|
|||||||
gint width,
|
gint width,
|
||||||
gint height,
|
gint height,
|
||||||
ClutterRotateDirection direction,
|
ClutterRotateDirection direction,
|
||||||
gdouble begin,
|
gdouble start,
|
||||||
gdouble end)
|
gdouble end)
|
||||||
{
|
{
|
||||||
ClutterKnot center;
|
ClutterKnot center;
|
||||||
@ -582,7 +582,7 @@ clutter_behaviour_ellipse_new (ClutterAlpha *alpha,
|
|||||||
"width", width,
|
"width", width,
|
||||||
"height", height,
|
"height", height,
|
||||||
"direction", direction,
|
"direction", direction,
|
||||||
"angle-begin", begin,
|
"angle-start", start,
|
||||||
"angle-end", end,
|
"angle-end", end,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
@ -595,7 +595,7 @@ clutter_behaviour_ellipse_new (ClutterAlpha *alpha,
|
|||||||
* @width: width of the ellipse
|
* @width: width of the ellipse
|
||||||
* @height: height of the ellipse
|
* @height: height of the ellipse
|
||||||
* @direction: #ClutterRotateDirection of rotation
|
* @direction: #ClutterRotateDirection of rotation
|
||||||
* @begin: #ClutterFixed angle in degrees at which movement begins
|
* @start: #ClutterFixed angle in degrees at which movement starts
|
||||||
* @end: #ClutterFixed angle in degrees at which movement ends
|
* @end: #ClutterFixed angle in degrees at which movement ends
|
||||||
*
|
*
|
||||||
* Creates a behaviour that drives actors along an elliptical path. This
|
* Creates a behaviour that drives actors along an elliptical path. This
|
||||||
@ -612,7 +612,7 @@ clutter_behaviour_ellipse_newx (ClutterAlpha * alpha,
|
|||||||
gint width,
|
gint width,
|
||||||
gint height,
|
gint height,
|
||||||
ClutterRotateDirection direction,
|
ClutterRotateDirection direction,
|
||||||
ClutterFixed begin,
|
ClutterFixed start,
|
||||||
ClutterFixed end)
|
ClutterFixed end)
|
||||||
{
|
{
|
||||||
ClutterKnot center;
|
ClutterKnot center;
|
||||||
@ -628,7 +628,7 @@ clutter_behaviour_ellipse_newx (ClutterAlpha * alpha,
|
|||||||
"width", width,
|
"width", width,
|
||||||
"height", height,
|
"height", height,
|
||||||
"direction", direction,
|
"direction", direction,
|
||||||
"angle-begin", CLUTTER_ANGLE_FROM_DEGX (begin),
|
"angle-start", CLUTTER_ANGLE_FROM_DEGX (start),
|
||||||
"angle-end", CLUTTER_ANGLE_FROM_DEGX (end),
|
"angle-end", CLUTTER_ANGLE_FROM_DEGX (end),
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
@ -784,86 +784,86 @@ clutter_behaviour_ellipse_get_height (ClutterBehaviourEllipse *self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* clutter_behaviour_ellipse_set_angle_begin
|
* clutter_behaviour_ellipse_set_angle_start
|
||||||
* @self: a #ClutterBehaviourEllipse
|
* @self: a #ClutterBehaviourEllipse
|
||||||
* @angle_begin: angle at which movement begins in degrees
|
* @angle_start: angle at which movement starts in degrees
|
||||||
*
|
*
|
||||||
* Sets the angle at which movement begins.
|
* Sets the angle at which movement starts.
|
||||||
*
|
*
|
||||||
* Since: 0.4
|
* Since: 0.6
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
clutter_behaviour_ellipse_set_angle_begin (ClutterBehaviourEllipse *self,
|
clutter_behaviour_ellipse_set_angle_start (ClutterBehaviourEllipse *self,
|
||||||
gdouble angle_begin)
|
gdouble angle_start)
|
||||||
{
|
{
|
||||||
g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self));
|
g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self));
|
||||||
|
|
||||||
clutter_behaviour_ellipse_set_angle_beginx (self,
|
clutter_behaviour_ellipse_set_angle_startx (self,
|
||||||
CLUTTER_ANGLE_FROM_DEG (angle_begin));
|
CLUTTER_ANGLE_FROM_DEG (angle_start));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* clutter_behaviour_ellipse_set_angle_beginx
|
* clutter_behaviour_ellipse_set_angle_startx
|
||||||
* @self: a #ClutterBehaviourEllipse
|
* @self: a #ClutterBehaviourEllipse
|
||||||
* @angle_begin: #ClutterAngle at which movement begins
|
* @angle_start: #ClutterAngle at which movement starts
|
||||||
*
|
*
|
||||||
* Sets the angle at which movement begins.
|
* Sets the angle at which movement starts.
|
||||||
*
|
*
|
||||||
* Since: 0.4
|
* Since: 0.6
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
clutter_behaviour_ellipse_set_angle_beginx (ClutterBehaviourEllipse *self,
|
clutter_behaviour_ellipse_set_angle_startx (ClutterBehaviourEllipse *self,
|
||||||
ClutterAngle angle_begin)
|
ClutterAngle angle_start)
|
||||||
{
|
{
|
||||||
ClutterBehaviourEllipsePrivate *priv;
|
ClutterBehaviourEllipsePrivate *priv;
|
||||||
ClutterAngle new_angle;
|
ClutterAngle new_angle;
|
||||||
|
|
||||||
g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self));
|
g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self));
|
||||||
|
|
||||||
new_angle = angle_begin - 256;
|
new_angle = angle_start - 256;
|
||||||
|
|
||||||
priv = self->priv;
|
priv = self->priv;
|
||||||
if (priv->angle_begin != new_angle)
|
if (priv->angle_start != new_angle)
|
||||||
{
|
{
|
||||||
priv->angle_begin = new_angle;
|
priv->angle_start = new_angle;
|
||||||
g_object_notify (G_OBJECT (self), "angle-begin");
|
g_object_notify (G_OBJECT (self), "angle-start");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* clutter_behaviour_ellipse_get_angle_begin
|
* clutter_behaviour_ellipse_get_angle_start
|
||||||
* @self: a #ClutterBehaviourEllipse
|
* @self: a #ClutterBehaviourEllipse
|
||||||
*
|
*
|
||||||
* Gets the angle at which movements begins.
|
* Gets the angle at which movements starts.
|
||||||
*
|
*
|
||||||
* Return value: angle in degrees
|
* Return value: angle in degrees
|
||||||
*
|
*
|
||||||
* Since: 0.4
|
* Since: 0.6
|
||||||
*/
|
*/
|
||||||
gdouble
|
gdouble
|
||||||
clutter_behaviour_ellipse_get_angle_begin (ClutterBehaviourEllipse *self)
|
clutter_behaviour_ellipse_get_angle_start (ClutterBehaviourEllipse *self)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self), 0.0);
|
g_return_val_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self), 0.0);
|
||||||
|
|
||||||
return CLUTTER_ANGLE_TO_DEG (self->priv->angle_begin + 256);
|
return CLUTTER_ANGLE_TO_DEG (self->priv->angle_start + 256);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* clutter_behaviour_ellipse_get_angle_beginx
|
* clutter_behaviour_ellipse_get_angle_startx
|
||||||
* @self: a #ClutterBehaviourEllipse
|
* @self: a #ClutterBehaviourEllipse
|
||||||
*
|
*
|
||||||
* Gets the angle at which movements begins.
|
* Gets the angle at which movements starts.
|
||||||
*
|
*
|
||||||
* Return value: a #ClutterAngle
|
* Return value: a #ClutterAngle
|
||||||
*
|
*
|
||||||
* Since: 0.4
|
* Since: 0.6
|
||||||
*/
|
*/
|
||||||
ClutterAngle
|
ClutterAngle
|
||||||
clutter_behaviour_ellipse_get_angle_beginx (ClutterBehaviourEllipse *self)
|
clutter_behaviour_ellipse_get_angle_startx (ClutterBehaviourEllipse *self)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self), 0);
|
g_return_val_if_fail (CLUTTER_IS_BEHAVIOUR_ELLIPSE (self), 0);
|
||||||
|
|
||||||
return self->priv->angle_begin;
|
return self->priv->angle_start;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -100,7 +100,7 @@ ClutterBehaviour * clutter_behaviour_ellipse_new (ClutterAlph
|
|||||||
gint width,
|
gint width,
|
||||||
gint height,
|
gint height,
|
||||||
ClutterRotateDirection direction,
|
ClutterRotateDirection direction,
|
||||||
gdouble begin,
|
gdouble start,
|
||||||
gdouble end);
|
gdouble end);
|
||||||
|
|
||||||
ClutterBehaviour * clutter_behaviour_ellipse_newx (ClutterAlpha *alpha,
|
ClutterBehaviour * clutter_behaviour_ellipse_newx (ClutterAlpha *alpha,
|
||||||
@ -109,7 +109,7 @@ ClutterBehaviour * clutter_behaviour_ellipse_newx (ClutterAlph
|
|||||||
gint width,
|
gint width,
|
||||||
gint height,
|
gint height,
|
||||||
ClutterRotateDirection direction,
|
ClutterRotateDirection direction,
|
||||||
ClutterFixed begin,
|
ClutterFixed start,
|
||||||
ClutterFixed end);
|
ClutterFixed end);
|
||||||
|
|
||||||
void clutter_behaviour_ellipse_set_center (ClutterBehaviourEllipse *self,
|
void clutter_behaviour_ellipse_set_center (ClutterBehaviourEllipse *self,
|
||||||
@ -130,15 +130,15 @@ void clutter_behaviour_ellipse_set_height (ClutterBeha
|
|||||||
|
|
||||||
gint clutter_behaviour_ellipse_get_height (ClutterBehaviourEllipse *self);
|
gint clutter_behaviour_ellipse_get_height (ClutterBehaviourEllipse *self);
|
||||||
|
|
||||||
void clutter_behaviour_ellipse_set_angle_begin (ClutterBehaviourEllipse *self,
|
void clutter_behaviour_ellipse_set_angle_start (ClutterBehaviourEllipse *self,
|
||||||
gdouble angle_begin);
|
gdouble angle_start);
|
||||||
|
|
||||||
void clutter_behaviour_ellipse_set_angle_beginx (ClutterBehaviourEllipse *self,
|
void clutter_behaviour_ellipse_set_angle_startx (ClutterBehaviourEllipse *self,
|
||||||
ClutterAngle angle_begin);
|
ClutterAngle angle_start);
|
||||||
|
|
||||||
ClutterAngle clutter_behaviour_ellipse_get_angle_beginx (ClutterBehaviourEllipse *self);
|
ClutterAngle clutter_behaviour_ellipse_get_angle_startx (ClutterBehaviourEllipse *self);
|
||||||
|
|
||||||
gdouble clutter_behaviour_ellipse_get_angle_begin (ClutterBehaviourEllipse *self);
|
gdouble clutter_behaviour_ellipse_get_angle_start (ClutterBehaviourEllipse *self);
|
||||||
|
|
||||||
void clutter_behaviour_ellipse_set_angle_endx (ClutterBehaviourEllipse *self,
|
void clutter_behaviour_ellipse_set_angle_endx (ClutterBehaviourEllipse *self,
|
||||||
ClutterAngle angle_end);
|
ClutterAngle angle_end);
|
||||||
|
@ -104,29 +104,29 @@ clutter_behaviour_path_finalize (GObject *object)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
interpolate (const ClutterKnot *begin,
|
interpolate (const ClutterKnot *start,
|
||||||
const ClutterKnot *end,
|
const ClutterKnot *end,
|
||||||
ClutterKnot *out,
|
ClutterKnot *out,
|
||||||
ClutterFixed t)
|
ClutterFixed t)
|
||||||
{
|
{
|
||||||
out->x = begin->x + CLUTTER_FIXED_TO_INT (t * (end->x - begin->x));
|
out->x = start->x + CLUTTER_FIXED_TO_INT (t * (end->x - start->x));
|
||||||
out->y = begin->y + CLUTTER_FIXED_TO_INT (t * (end->y - begin->y));
|
out->y = start->y + CLUTTER_FIXED_TO_INT (t * (end->y - start->y));
|
||||||
}
|
}
|
||||||
|
|
||||||
static gint
|
static gint
|
||||||
node_distance (const ClutterKnot *begin,
|
node_distance (const ClutterKnot *start,
|
||||||
const ClutterKnot *end)
|
const ClutterKnot *end)
|
||||||
{
|
{
|
||||||
gint t;
|
gint t;
|
||||||
|
|
||||||
g_return_val_if_fail (begin != NULL, 0);
|
g_return_val_if_fail (start != NULL, 0);
|
||||||
g_return_val_if_fail (end != NULL, 0);
|
g_return_val_if_fail (end != NULL, 0);
|
||||||
|
|
||||||
if (clutter_knot_equal (begin, end))
|
if (clutter_knot_equal (start, end))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
t = (end->x - begin->x) * (end->x - begin->x) +
|
t = (end->x - start->x) * (end->x - start->x) +
|
||||||
(end->y - begin->y) * (end->y - begin->y);
|
(end->y - start->y) * (end->y - start->y);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we are using limited precision sqrti implementation, fallback on
|
* If we are using limited precision sqrti implementation, fallback on
|
||||||
|
@ -54,7 +54,7 @@ G_DEFINE_TYPE (ClutterBehaviourRotate,
|
|||||||
|
|
||||||
struct _ClutterBehaviourRotatePrivate
|
struct _ClutterBehaviourRotatePrivate
|
||||||
{
|
{
|
||||||
ClutterFixed angle_begin;
|
ClutterFixed angle_start;
|
||||||
ClutterFixed angle_end;
|
ClutterFixed angle_end;
|
||||||
|
|
||||||
ClutterRotateAxis axis;
|
ClutterRotateAxis axis;
|
||||||
@ -74,7 +74,7 @@ enum
|
|||||||
{
|
{
|
||||||
PROP_0,
|
PROP_0,
|
||||||
|
|
||||||
PROP_ANGLE_BEGIN,
|
PROP_ANGLE_START,
|
||||||
PROP_ANGLE_END,
|
PROP_ANGLE_END,
|
||||||
PROP_AXIS,
|
PROP_AXIS,
|
||||||
PROP_DIRECTION,
|
PROP_DIRECTION,
|
||||||
@ -134,44 +134,44 @@ clutter_behaviour_rotate_alpha_notify (ClutterBehaviour *behaviour,
|
|||||||
switch (priv->direction)
|
switch (priv->direction)
|
||||||
{
|
{
|
||||||
case CLUTTER_ROTATE_CW:
|
case CLUTTER_ROTATE_CW:
|
||||||
if (priv->angle_end >= priv->angle_begin)
|
if (priv->angle_end >= priv->angle_start)
|
||||||
{
|
{
|
||||||
angle = CLUTTER_FIXED_MUL (factor,
|
angle = CLUTTER_FIXED_MUL (factor,
|
||||||
(priv->angle_end - priv->angle_begin));
|
(priv->angle_end - priv->angle_start));
|
||||||
angle += priv->angle_begin;
|
angle += priv->angle_start;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Work out the angular length of the arch represented by the
|
/* Work out the angular length of the arch represented by the
|
||||||
* end angle in CCW direction
|
* end angle in CCW direction
|
||||||
*/
|
*/
|
||||||
if (priv->angle_begin >= CLUTTER_INT_TO_FIXED (360))
|
if (priv->angle_start >= CLUTTER_INT_TO_FIXED (360))
|
||||||
{
|
{
|
||||||
ClutterFixed rounds, a1, a2;
|
ClutterFixed rounds, a1, a2;
|
||||||
|
|
||||||
rounds = priv->angle_begin / 360;
|
rounds = priv->angle_start / 360;
|
||||||
a1 = rounds * 360;
|
a1 = rounds * 360;
|
||||||
a2 = - (priv->angle_begin - a1);
|
a2 = - (priv->angle_start - a1);
|
||||||
|
|
||||||
diff = a1 + a2 + priv->angle_end;
|
diff = a1 + a2 + priv->angle_end;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
diff = CLUTTER_INT_TO_FIXED (360)
|
diff = CLUTTER_INT_TO_FIXED (360)
|
||||||
- priv->angle_begin
|
- priv->angle_start
|
||||||
+ priv->angle_end;
|
+ priv->angle_end;
|
||||||
}
|
}
|
||||||
|
|
||||||
angle = CLUTTER_FIXED_MUL (diff, factor);
|
angle = CLUTTER_FIXED_MUL (diff, factor);
|
||||||
angle += priv->angle_begin;
|
angle += priv->angle_start;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CLUTTER_ROTATE_CCW:
|
case CLUTTER_ROTATE_CCW:
|
||||||
if (priv->angle_end <= priv->angle_begin)
|
if (priv->angle_end <= priv->angle_start)
|
||||||
{
|
{
|
||||||
angle = CLUTTER_FIXED_MUL (factor,
|
angle = CLUTTER_FIXED_MUL (factor,
|
||||||
(priv->angle_begin - priv->angle_end));
|
(priv->angle_start - priv->angle_end));
|
||||||
angle = priv->angle_begin - angle;
|
angle = priv->angle_start - angle;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -186,15 +186,15 @@ clutter_behaviour_rotate_alpha_notify (ClutterBehaviour *behaviour,
|
|||||||
a1 = rounds * 360;
|
a1 = rounds * 360;
|
||||||
a2 = - (priv->angle_end - a1);
|
a2 = - (priv->angle_end - a1);
|
||||||
|
|
||||||
diff = a1 + a2 + priv->angle_begin;
|
diff = a1 + a2 + priv->angle_start;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
diff = CLUTTER_INT_TO_FIXED (360)
|
diff = CLUTTER_INT_TO_FIXED (360)
|
||||||
- priv->angle_end
|
- priv->angle_end
|
||||||
+ priv->angle_begin;
|
+ priv->angle_start;
|
||||||
}
|
}
|
||||||
angle = priv->angle_begin - CLUTTER_FIXED_MUL (diff, factor);
|
angle = priv->angle_start - CLUTTER_FIXED_MUL (diff, factor);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -218,8 +218,8 @@ clutter_behaviour_rotate_set_property (GObject *gobject,
|
|||||||
|
|
||||||
switch (prop_id)
|
switch (prop_id)
|
||||||
{
|
{
|
||||||
case PROP_ANGLE_BEGIN:
|
case PROP_ANGLE_START:
|
||||||
priv->angle_begin = CLUTTER_FLOAT_TO_FIXED (g_value_get_double (value));
|
priv->angle_start = CLUTTER_FLOAT_TO_FIXED (g_value_get_double (value));
|
||||||
break;
|
break;
|
||||||
case PROP_ANGLE_END:
|
case PROP_ANGLE_END:
|
||||||
priv->angle_end = CLUTTER_FLOAT_TO_FIXED (g_value_get_double (value));
|
priv->angle_end = CLUTTER_FLOAT_TO_FIXED (g_value_get_double (value));
|
||||||
@ -266,8 +266,8 @@ clutter_behaviour_rotate_get_property (GObject *gobject,
|
|||||||
|
|
||||||
switch (prop_id)
|
switch (prop_id)
|
||||||
{
|
{
|
||||||
case PROP_ANGLE_BEGIN:
|
case PROP_ANGLE_START:
|
||||||
g_value_set_double (value, CLUTTER_FIXED_TO_DOUBLE (priv->angle_begin));
|
g_value_set_double (value, CLUTTER_FIXED_TO_DOUBLE (priv->angle_start));
|
||||||
break;
|
break;
|
||||||
case PROP_ANGLE_END:
|
case PROP_ANGLE_END:
|
||||||
g_value_set_double (value, CLUTTER_FIXED_TO_DOUBLE (priv->angle_end));
|
g_value_set_double (value, CLUTTER_FIXED_TO_DOUBLE (priv->angle_end));
|
||||||
@ -305,15 +305,15 @@ clutter_behaviour_rotate_class_init (ClutterBehaviourRotateClass *klass)
|
|||||||
behaviour_class->alpha_notify = clutter_behaviour_rotate_alpha_notify;
|
behaviour_class->alpha_notify = clutter_behaviour_rotate_alpha_notify;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ClutterBehaviourRotate:angle-begin:
|
* ClutterBehaviourRotate:angle-start:
|
||||||
*
|
*
|
||||||
* The initial angle from whence the rotation should begin.
|
* The initial angle from whence the rotation should start.
|
||||||
*
|
*
|
||||||
* Since: 0.4
|
* Since: 0.4
|
||||||
*/
|
*/
|
||||||
g_object_class_install_property (gobject_class,
|
g_object_class_install_property (gobject_class,
|
||||||
PROP_ANGLE_BEGIN,
|
PROP_ANGLE_START,
|
||||||
g_param_spec_double ("angle-begin",
|
g_param_spec_double ("angle-start",
|
||||||
"Angle Begin",
|
"Angle Begin",
|
||||||
"Initial angle",
|
"Initial angle",
|
||||||
0.0,
|
0.0,
|
||||||
@ -423,7 +423,7 @@ clutter_behaviour_rotate_init (ClutterBehaviourRotate *rotate)
|
|||||||
|
|
||||||
rotate->priv = priv = CLUTTER_BEHAVIOUR_ROTATE_GET_PRIVATE (rotate);
|
rotate->priv = priv = CLUTTER_BEHAVIOUR_ROTATE_GET_PRIVATE (rotate);
|
||||||
|
|
||||||
priv->angle_begin = CLUTTER_FLOAT_TO_FIXED (0.0);
|
priv->angle_start = CLUTTER_FLOAT_TO_FIXED (0.0);
|
||||||
priv->angle_end = CLUTTER_FLOAT_TO_FIXED (360.0);
|
priv->angle_end = CLUTTER_FLOAT_TO_FIXED (360.0);
|
||||||
priv->axis = CLUTTER_Z_AXIS;
|
priv->axis = CLUTTER_Z_AXIS;
|
||||||
priv->direction = CLUTTER_ROTATE_CW;
|
priv->direction = CLUTTER_ROTATE_CW;
|
||||||
@ -435,11 +435,11 @@ clutter_behaviour_rotate_init (ClutterBehaviourRotate *rotate)
|
|||||||
* @alpha: a #ClutterAlpha, or %NULL
|
* @alpha: a #ClutterAlpha, or %NULL
|
||||||
* @axis: the rotation axis
|
* @axis: the rotation axis
|
||||||
* @direction: the rotation direction
|
* @direction: the rotation direction
|
||||||
* @angle_begin: the starting angle
|
* @angle_start: the starting angle
|
||||||
* @angle_end: the final angle
|
* @angle_end: the final angle
|
||||||
*
|
*
|
||||||
* Creates a new #ClutterBehaviourRotate. This behaviour will rotate actors
|
* Creates a new #ClutterBehaviourRotate. This behaviour will rotate actors
|
||||||
* bound to it on @axis, following @direction, between @angle_begin and
|
* bound to it on @axis, following @direction, between @angle_start and
|
||||||
* @angle_end.
|
* @angle_end.
|
||||||
*
|
*
|
||||||
* Return value: the newly created #ClutterBehaviourRotate.
|
* Return value: the newly created #ClutterBehaviourRotate.
|
||||||
@ -450,7 +450,7 @@ ClutterBehaviour *
|
|||||||
clutter_behaviour_rotate_new (ClutterAlpha *alpha,
|
clutter_behaviour_rotate_new (ClutterAlpha *alpha,
|
||||||
ClutterRotateAxis axis,
|
ClutterRotateAxis axis,
|
||||||
ClutterRotateDirection direction,
|
ClutterRotateDirection direction,
|
||||||
gdouble angle_begin,
|
gdouble angle_start,
|
||||||
gdouble angle_end)
|
gdouble angle_end)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (alpha == NULL || CLUTTER_IS_ALPHA (alpha), NULL);
|
g_return_val_if_fail (alpha == NULL || CLUTTER_IS_ALPHA (alpha), NULL);
|
||||||
@ -459,7 +459,7 @@ clutter_behaviour_rotate_new (ClutterAlpha *alpha,
|
|||||||
"alpha", alpha,
|
"alpha", alpha,
|
||||||
"axis", axis,
|
"axis", axis,
|
||||||
"direction", direction,
|
"direction", direction,
|
||||||
"angle-begin", angle_begin,
|
"angle-start", angle_start,
|
||||||
"angle-end", angle_end,
|
"angle-end", angle_end,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
@ -469,7 +469,7 @@ clutter_behaviour_rotate_new (ClutterAlpha *alpha,
|
|||||||
* @alpha: a #ClutterAlpha or %NULL
|
* @alpha: a #ClutterAlpha or %NULL
|
||||||
* @axis: the rotation axis
|
* @axis: the rotation axis
|
||||||
* @direction: the rotation direction
|
* @direction: the rotation direction
|
||||||
* @angle_begin: the starting angle, in fixed point notation
|
* @angle_start: the starting angle, in fixed point notation
|
||||||
* @angle_end: the final angle, in fixed point notation
|
* @angle_end: the final angle, in fixed point notation
|
||||||
*
|
*
|
||||||
* Creates a new #ClutterBehaviourRotate. This is the fixed point version
|
* Creates a new #ClutterBehaviourRotate. This is the fixed point version
|
||||||
@ -483,7 +483,7 @@ ClutterBehaviour *
|
|||||||
clutter_behaviour_rotate_newx (ClutterAlpha *alpha,
|
clutter_behaviour_rotate_newx (ClutterAlpha *alpha,
|
||||||
ClutterRotateAxis axis,
|
ClutterRotateAxis axis,
|
||||||
ClutterRotateDirection direction,
|
ClutterRotateDirection direction,
|
||||||
ClutterFixed angle_begin,
|
ClutterFixed angle_start,
|
||||||
ClutterFixed angle_end)
|
ClutterFixed angle_end)
|
||||||
{
|
{
|
||||||
ClutterBehaviour *retval;
|
ClutterBehaviour *retval;
|
||||||
@ -501,7 +501,7 @@ clutter_behaviour_rotate_newx (ClutterAlpha *alpha,
|
|||||||
* and then back again to fixed.
|
* and then back again to fixed.
|
||||||
*/
|
*/
|
||||||
priv = CLUTTER_BEHAVIOUR_ROTATE_GET_PRIVATE (retval);
|
priv = CLUTTER_BEHAVIOUR_ROTATE_GET_PRIVATE (retval);
|
||||||
priv->angle_begin = angle_begin;
|
priv->angle_start = angle_start;
|
||||||
priv->angle_end = angle_end;
|
priv->angle_end = angle_end;
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
@ -601,7 +601,7 @@ clutter_behaviour_rotate_set_direction (ClutterBehaviourRotate *rotate,
|
|||||||
/**
|
/**
|
||||||
* clutter_behaviour_rotate_get_bounds:
|
* clutter_behaviour_rotate_get_bounds:
|
||||||
* @rotate: a #ClutterBehaviourRotate
|
* @rotate: a #ClutterBehaviourRotate
|
||||||
* @angle_begin: return value for the initial angle
|
* @angle_start: return value for the initial angle
|
||||||
* @angle_end: return value for the final angle
|
* @angle_end: return value for the final angle
|
||||||
*
|
*
|
||||||
* Retrieves the rotation boundaries of the rotate behaviour.
|
* Retrieves the rotation boundaries of the rotate behaviour.
|
||||||
@ -610,7 +610,7 @@ clutter_behaviour_rotate_set_direction (ClutterBehaviourRotate *rotate,
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
clutter_behaviour_rotate_get_bounds (ClutterBehaviourRotate *rotate,
|
clutter_behaviour_rotate_get_bounds (ClutterBehaviourRotate *rotate,
|
||||||
gdouble *angle_begin,
|
gdouble *angle_start,
|
||||||
gdouble *angle_end)
|
gdouble *angle_end)
|
||||||
{
|
{
|
||||||
ClutterBehaviourRotatePrivate *priv;
|
ClutterBehaviourRotatePrivate *priv;
|
||||||
@ -619,8 +619,8 @@ clutter_behaviour_rotate_get_bounds (ClutterBehaviourRotate *rotate,
|
|||||||
|
|
||||||
priv = rotate->priv;
|
priv = rotate->priv;
|
||||||
|
|
||||||
if (angle_begin)
|
if (angle_start)
|
||||||
*angle_begin = CLUTTER_FIXED_TO_DOUBLE (priv->angle_begin);
|
*angle_start = CLUTTER_FIXED_TO_DOUBLE (priv->angle_start);
|
||||||
|
|
||||||
if (angle_end)
|
if (angle_end)
|
||||||
*angle_end = CLUTTER_FIXED_TO_DOUBLE (priv->angle_end);
|
*angle_end = CLUTTER_FIXED_TO_DOUBLE (priv->angle_end);
|
||||||
@ -629,7 +629,7 @@ clutter_behaviour_rotate_get_bounds (ClutterBehaviourRotate *rotate,
|
|||||||
/**
|
/**
|
||||||
* clutter_behaviour_rotate_set_bounds:
|
* clutter_behaviour_rotate_set_bounds:
|
||||||
* @rotate: a #ClutterBehaviourRotate
|
* @rotate: a #ClutterBehaviourRotate
|
||||||
* @angle_begin: initial angle
|
* @angle_start: initial angle
|
||||||
* @angle_end: final angle
|
* @angle_end: final angle
|
||||||
*
|
*
|
||||||
* Sets the initial and final angles of a rotation behaviour.
|
* Sets the initial and final angles of a rotation behaviour.
|
||||||
@ -638,20 +638,20 @@ clutter_behaviour_rotate_get_bounds (ClutterBehaviourRotate *rotate,
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
clutter_behaviour_rotate_set_bounds (ClutterBehaviourRotate *rotate,
|
clutter_behaviour_rotate_set_bounds (ClutterBehaviourRotate *rotate,
|
||||||
gdouble angle_begin,
|
gdouble angle_start,
|
||||||
gdouble angle_end)
|
gdouble angle_end)
|
||||||
{
|
{
|
||||||
g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ROTATE (rotate));
|
g_return_if_fail (CLUTTER_IS_BEHAVIOUR_ROTATE (rotate));
|
||||||
|
|
||||||
clutter_behaviour_rotate_set_boundsx (rotate,
|
clutter_behaviour_rotate_set_boundsx (rotate,
|
||||||
CLUTTER_FLOAT_TO_FIXED (angle_begin),
|
CLUTTER_FLOAT_TO_FIXED (angle_start),
|
||||||
CLUTTER_FLOAT_TO_FIXED (angle_end));
|
CLUTTER_FLOAT_TO_FIXED (angle_end));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* clutter_behaviour_rotate_get_boundsx:
|
* clutter_behaviour_rotate_get_boundsx:
|
||||||
* @rotate: a #ClutterBehaviourRotate
|
* @rotate: a #ClutterBehaviourRotate
|
||||||
* @angle_begin: return value for the initial angle
|
* @angle_start: return value for the initial angle
|
||||||
* @angle_end: return value for the final angle
|
* @angle_end: return value for the final angle
|
||||||
*
|
*
|
||||||
* Retrieves the rotation boundaries of the rotate behaviour. This is
|
* Retrieves the rotation boundaries of the rotate behaviour. This is
|
||||||
@ -661,7 +661,7 @@ clutter_behaviour_rotate_set_bounds (ClutterBehaviourRotate *rotate,
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
clutter_behaviour_rotate_get_boundsx (ClutterBehaviourRotate *rotate,
|
clutter_behaviour_rotate_get_boundsx (ClutterBehaviourRotate *rotate,
|
||||||
ClutterFixed *angle_begin,
|
ClutterFixed *angle_start,
|
||||||
ClutterFixed *angle_end)
|
ClutterFixed *angle_end)
|
||||||
{
|
{
|
||||||
ClutterBehaviourRotatePrivate *priv;
|
ClutterBehaviourRotatePrivate *priv;
|
||||||
@ -670,8 +670,8 @@ clutter_behaviour_rotate_get_boundsx (ClutterBehaviourRotate *rotate,
|
|||||||
|
|
||||||
priv = rotate->priv;
|
priv = rotate->priv;
|
||||||
|
|
||||||
if (angle_begin);
|
if (angle_start);
|
||||||
*angle_begin = priv->angle_begin;
|
*angle_start = priv->angle_start;
|
||||||
|
|
||||||
if (angle_end)
|
if (angle_end)
|
||||||
*angle_end = priv->angle_end;
|
*angle_end = priv->angle_end;
|
||||||
@ -680,7 +680,7 @@ clutter_behaviour_rotate_get_boundsx (ClutterBehaviourRotate *rotate,
|
|||||||
/**
|
/**
|
||||||
* clutter_behaviour_rotate_set_boundsx:
|
* clutter_behaviour_rotate_set_boundsx:
|
||||||
* @rotate: a #ClutterBehaviourRotate
|
* @rotate: a #ClutterBehaviourRotate
|
||||||
* @angle_begin: initial angle, in fixed point notation
|
* @angle_start: initial angle, in fixed point notation
|
||||||
* @angle_end: final angle, in fixed point notation
|
* @angle_end: final angle, in fixed point notation
|
||||||
*
|
*
|
||||||
* Fixed point version of clutter_behaviour_rotate_set_bounds().
|
* Fixed point version of clutter_behaviour_rotate_set_bounds().
|
||||||
@ -689,7 +689,7 @@ clutter_behaviour_rotate_get_boundsx (ClutterBehaviourRotate *rotate,
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
clutter_behaviour_rotate_set_boundsx (ClutterBehaviourRotate *rotate,
|
clutter_behaviour_rotate_set_boundsx (ClutterBehaviourRotate *rotate,
|
||||||
ClutterFixed angle_begin,
|
ClutterFixed angle_start,
|
||||||
ClutterFixed angle_end)
|
ClutterFixed angle_end)
|
||||||
{
|
{
|
||||||
ClutterBehaviourRotatePrivate *priv;
|
ClutterBehaviourRotatePrivate *priv;
|
||||||
@ -701,11 +701,11 @@ clutter_behaviour_rotate_set_boundsx (ClutterBehaviourRotate *rotate,
|
|||||||
g_object_ref (rotate);
|
g_object_ref (rotate);
|
||||||
g_object_freeze_notify (G_OBJECT (rotate));
|
g_object_freeze_notify (G_OBJECT (rotate));
|
||||||
|
|
||||||
if (priv->angle_begin != angle_begin)
|
if (priv->angle_start != angle_start)
|
||||||
{
|
{
|
||||||
priv->angle_begin = angle_begin;
|
priv->angle_start = angle_start;
|
||||||
|
|
||||||
g_object_notify (G_OBJECT (rotate), "angle-begin");
|
g_object_notify (G_OBJECT (rotate), "angle-start");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (priv->angle_end != angle_end)
|
if (priv->angle_end != angle_end)
|
||||||
|
@ -61,12 +61,12 @@ GType clutter_behaviour_rotate_get_type (void) G_GNUC_CONST;
|
|||||||
ClutterBehaviour *clutter_behaviour_rotate_new (ClutterAlpha *alpha,
|
ClutterBehaviour *clutter_behaviour_rotate_new (ClutterAlpha *alpha,
|
||||||
ClutterRotateAxis axis,
|
ClutterRotateAxis axis,
|
||||||
ClutterRotateDirection direction,
|
ClutterRotateDirection direction,
|
||||||
gdouble angle_begin,
|
gdouble angle_start,
|
||||||
gdouble angle_end);
|
gdouble angle_end);
|
||||||
ClutterBehaviour *clutter_behaviour_rotate_newx (ClutterAlpha *alpha,
|
ClutterBehaviour *clutter_behaviour_rotate_newx (ClutterAlpha *alpha,
|
||||||
ClutterRotateAxis axis,
|
ClutterRotateAxis axis,
|
||||||
ClutterRotateDirection direction,
|
ClutterRotateDirection direction,
|
||||||
ClutterFixed angle_begin,
|
ClutterFixed angle_start,
|
||||||
ClutterFixed angle_end);
|
ClutterFixed angle_end);
|
||||||
|
|
||||||
void clutter_behaviour_rotate_get_center (ClutterBehaviourRotate *rotate,
|
void clutter_behaviour_rotate_get_center (ClutterBehaviourRotate *rotate,
|
||||||
@ -85,16 +85,16 @@ ClutterRotateDirection clutter_behaviour_rotate_get_direction (ClutterBehaviourR
|
|||||||
void clutter_behaviour_rotate_set_direction (ClutterBehaviourRotate *rotate,
|
void clutter_behaviour_rotate_set_direction (ClutterBehaviourRotate *rotate,
|
||||||
ClutterRotateDirection direction);
|
ClutterRotateDirection direction);
|
||||||
void clutter_behaviour_rotate_get_bounds (ClutterBehaviourRotate *rotate,
|
void clutter_behaviour_rotate_get_bounds (ClutterBehaviourRotate *rotate,
|
||||||
gdouble *angle_begin,
|
gdouble *angle_start,
|
||||||
gdouble *angle_end);
|
gdouble *angle_end);
|
||||||
void clutter_behaviour_rotate_set_bounds (ClutterBehaviourRotate *rotate,
|
void clutter_behaviour_rotate_set_bounds (ClutterBehaviourRotate *rotate,
|
||||||
gdouble angle_begin,
|
gdouble angle_start,
|
||||||
gdouble angle_end);
|
gdouble angle_end);
|
||||||
void clutter_behaviour_rotate_get_boundsx (ClutterBehaviourRotate *rotate,
|
void clutter_behaviour_rotate_get_boundsx (ClutterBehaviourRotate *rotate,
|
||||||
ClutterFixed *angle_begin,
|
ClutterFixed *angle_start,
|
||||||
ClutterFixed *angle_end);
|
ClutterFixed *angle_end);
|
||||||
void clutter_behaviour_rotate_set_boundsx (ClutterBehaviourRotate *rotate,
|
void clutter_behaviour_rotate_set_boundsx (ClutterBehaviourRotate *rotate,
|
||||||
ClutterFixed angle_begin,
|
ClutterFixed angle_start,
|
||||||
ClutterFixed angle_end);
|
ClutterFixed angle_end);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
@ -53,7 +53,7 @@ G_DEFINE_TYPE (ClutterBehaviourScale,
|
|||||||
|
|
||||||
struct _ClutterBehaviourScalePrivate
|
struct _ClutterBehaviourScalePrivate
|
||||||
{
|
{
|
||||||
ClutterFixed scale_begin;
|
ClutterFixed scale_start;
|
||||||
ClutterFixed scale_end;
|
ClutterFixed scale_end;
|
||||||
|
|
||||||
ClutterGravity gravity;
|
ClutterGravity gravity;
|
||||||
@ -68,7 +68,7 @@ enum
|
|||||||
{
|
{
|
||||||
PROP_0,
|
PROP_0,
|
||||||
|
|
||||||
PROP_SCALE_BEGIN,
|
PROP_SCALE_START,
|
||||||
PROP_SCALE_END,
|
PROP_SCALE_END,
|
||||||
PROP_SCALE_GRAVITY
|
PROP_SCALE_GRAVITY
|
||||||
};
|
};
|
||||||
@ -96,8 +96,8 @@ clutter_behaviour_scale_alpha_notify (ClutterBehaviour *behave,
|
|||||||
priv = CLUTTER_BEHAVIOUR_SCALE (behave)->priv;
|
priv = CLUTTER_BEHAVIOUR_SCALE (behave)->priv;
|
||||||
|
|
||||||
factor = CLUTTER_INT_TO_FIXED (alpha_value) / CLUTTER_ALPHA_MAX_ALPHA;
|
factor = CLUTTER_INT_TO_FIXED (alpha_value) / CLUTTER_ALPHA_MAX_ALPHA;
|
||||||
scale = CLUTTER_FIXED_MUL (factor, (priv->scale_end - priv->scale_begin));
|
scale = CLUTTER_FIXED_MUL (factor, (priv->scale_end - priv->scale_start));
|
||||||
scale += priv->scale_begin;
|
scale += priv->scale_start;
|
||||||
|
|
||||||
clutter_behaviour_actors_foreach (behave,
|
clutter_behaviour_actors_foreach (behave,
|
||||||
scale_frame_foreach,
|
scale_frame_foreach,
|
||||||
@ -116,8 +116,8 @@ clutter_behaviour_scale_set_property (GObject *gobject,
|
|||||||
|
|
||||||
switch (prop_id)
|
switch (prop_id)
|
||||||
{
|
{
|
||||||
case PROP_SCALE_BEGIN:
|
case PROP_SCALE_START:
|
||||||
priv->scale_begin = CLUTTER_FLOAT_TO_FIXED (g_value_get_double (value));
|
priv->scale_start = CLUTTER_FLOAT_TO_FIXED (g_value_get_double (value));
|
||||||
break;
|
break;
|
||||||
case PROP_SCALE_END:
|
case PROP_SCALE_END:
|
||||||
priv->scale_end = CLUTTER_FLOAT_TO_FIXED (g_value_get_double (value));
|
priv->scale_end = CLUTTER_FLOAT_TO_FIXED (g_value_get_double (value));
|
||||||
@ -143,8 +143,8 @@ clutter_behaviour_scale_get_property (GObject *gobject,
|
|||||||
|
|
||||||
switch (prop_id)
|
switch (prop_id)
|
||||||
{
|
{
|
||||||
case PROP_SCALE_BEGIN:
|
case PROP_SCALE_START:
|
||||||
g_value_set_double (value, CLUTTER_FIXED_TO_FLOAT (priv->scale_begin));
|
g_value_set_double (value, CLUTTER_FIXED_TO_FLOAT (priv->scale_start));
|
||||||
break;
|
break;
|
||||||
case PROP_SCALE_END:
|
case PROP_SCALE_END:
|
||||||
g_value_set_double (value, CLUTTER_FIXED_TO_FLOAT (priv->scale_end));
|
g_value_set_double (value, CLUTTER_FIXED_TO_FLOAT (priv->scale_end));
|
||||||
@ -168,16 +168,16 @@ clutter_behaviour_scale_class_init (ClutterBehaviourScaleClass *klass)
|
|||||||
gobject_class->get_property = clutter_behaviour_scale_get_property;
|
gobject_class->get_property = clutter_behaviour_scale_get_property;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ClutterBehaviourScale:scale-begin:
|
* ClutterBehaviourScale:scale-start:
|
||||||
*
|
*
|
||||||
* The initial scaling factor for the actors.
|
* The initial scaling factor for the actors.
|
||||||
*
|
*
|
||||||
* Since: 0.2
|
* Since: 0.2
|
||||||
*/
|
*/
|
||||||
g_object_class_install_property (gobject_class,
|
g_object_class_install_property (gobject_class,
|
||||||
PROP_SCALE_BEGIN,
|
PROP_SCALE_START,
|
||||||
g_param_spec_double ("scale-begin",
|
g_param_spec_double ("scale-start",
|
||||||
"Scale Begin",
|
"Start Scale",
|
||||||
"Initial scale",
|
"Initial scale",
|
||||||
0.0, G_MAXDOUBLE,
|
0.0, G_MAXDOUBLE,
|
||||||
1.0,
|
1.0,
|
||||||
@ -192,7 +192,7 @@ clutter_behaviour_scale_class_init (ClutterBehaviourScaleClass *klass)
|
|||||||
g_object_class_install_property (gobject_class,
|
g_object_class_install_property (gobject_class,
|
||||||
PROP_SCALE_END,
|
PROP_SCALE_END,
|
||||||
g_param_spec_double ("scale-end",
|
g_param_spec_double ("scale-end",
|
||||||
"Scale End",
|
"End Scale",
|
||||||
"Final scale",
|
"Final scale",
|
||||||
0.0, G_MAXDOUBLE,
|
0.0, G_MAXDOUBLE,
|
||||||
1.0,
|
1.0,
|
||||||
@ -230,7 +230,7 @@ clutter_behaviour_scale_init (ClutterBehaviourScale *self)
|
|||||||
/**
|
/**
|
||||||
* clutter_behaviour_scale_new:
|
* clutter_behaviour_scale_new:
|
||||||
* @alpha: a #ClutterAlpha
|
* @alpha: a #ClutterAlpha
|
||||||
* @scale_begin: initial scale factor
|
* @scale_start: initial scale factor
|
||||||
* @scale_end: final scale factor
|
* @scale_end: final scale factor
|
||||||
* @gravity: a #ClutterGravity for the scale.
|
* @gravity: a #ClutterGravity for the scale.
|
||||||
*
|
*
|
||||||
@ -242,14 +242,14 @@ clutter_behaviour_scale_init (ClutterBehaviourScale *self)
|
|||||||
*/
|
*/
|
||||||
ClutterBehaviour *
|
ClutterBehaviour *
|
||||||
clutter_behaviour_scale_new (ClutterAlpha *alpha,
|
clutter_behaviour_scale_new (ClutterAlpha *alpha,
|
||||||
gdouble scale_begin,
|
gdouble scale_start,
|
||||||
gdouble scale_end,
|
gdouble scale_end,
|
||||||
ClutterGravity gravity)
|
ClutterGravity gravity)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (alpha == NULL || CLUTTER_IS_ALPHA (alpha), NULL);
|
g_return_val_if_fail (alpha == NULL || CLUTTER_IS_ALPHA (alpha), NULL);
|
||||||
|
|
||||||
return clutter_behaviour_scale_newx (alpha,
|
return clutter_behaviour_scale_newx (alpha,
|
||||||
CLUTTER_FLOAT_TO_FIXED (scale_begin),
|
CLUTTER_FLOAT_TO_FIXED (scale_start),
|
||||||
CLUTTER_FLOAT_TO_FIXED (scale_end),
|
CLUTTER_FLOAT_TO_FIXED (scale_end),
|
||||||
gravity);
|
gravity);
|
||||||
}
|
}
|
||||||
@ -257,7 +257,7 @@ clutter_behaviour_scale_new (ClutterAlpha *alpha,
|
|||||||
/**
|
/**
|
||||||
* clutter_behaviour_scale_newx:
|
* clutter_behaviour_scale_newx:
|
||||||
* @alpha: a #ClutterAlpha
|
* @alpha: a #ClutterAlpha
|
||||||
* @scale_begin: initial scale factor
|
* @scale_start: initial scale factor
|
||||||
* @scale_end: final scale factor
|
* @scale_end: final scale factor
|
||||||
* @gravity: a #ClutterGravity for the scale.
|
* @gravity: a #ClutterGravity for the scale.
|
||||||
*
|
*
|
||||||
@ -269,7 +269,7 @@ clutter_behaviour_scale_new (ClutterAlpha *alpha,
|
|||||||
*/
|
*/
|
||||||
ClutterBehaviour *
|
ClutterBehaviour *
|
||||||
clutter_behaviour_scale_newx (ClutterAlpha *alpha,
|
clutter_behaviour_scale_newx (ClutterAlpha *alpha,
|
||||||
ClutterFixed scale_begin,
|
ClutterFixed scale_start,
|
||||||
ClutterFixed scale_end,
|
ClutterFixed scale_end,
|
||||||
ClutterGravity gravity)
|
ClutterGravity gravity)
|
||||||
{
|
{
|
||||||
@ -281,7 +281,7 @@ clutter_behaviour_scale_newx (ClutterAlpha *alpha,
|
|||||||
"alpha", alpha,
|
"alpha", alpha,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
behave->priv->scale_begin = scale_begin;
|
behave->priv->scale_start = scale_start;
|
||||||
behave->priv->scale_end = scale_end;
|
behave->priv->scale_end = scale_end;
|
||||||
behave->priv->gravity = gravity;
|
behave->priv->gravity = gravity;
|
||||||
|
|
||||||
@ -291,7 +291,7 @@ clutter_behaviour_scale_newx (ClutterAlpha *alpha,
|
|||||||
/**
|
/**
|
||||||
* clutter_behaviour_scale_get_bounds:
|
* clutter_behaviour_scale_get_bounds:
|
||||||
* @scale: a #ClutterBehaviourScale
|
* @scale: a #ClutterBehaviourScale
|
||||||
* @scale_begin: return location for the initial scale factor
|
* @scale_start: return location for the initial scale factor
|
||||||
* @scale_end: return location for the final scale factor
|
* @scale_end: return location for the final scale factor
|
||||||
*
|
*
|
||||||
* Retrieves the bounds used by scale behaviour.
|
* Retrieves the bounds used by scale behaviour.
|
||||||
@ -300,7 +300,7 @@ clutter_behaviour_scale_newx (ClutterAlpha *alpha,
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
clutter_behaviour_scale_get_bounds (ClutterBehaviourScale *scale,
|
clutter_behaviour_scale_get_bounds (ClutterBehaviourScale *scale,
|
||||||
gdouble *scale_begin,
|
gdouble *scale_start,
|
||||||
gdouble *scale_end)
|
gdouble *scale_end)
|
||||||
{
|
{
|
||||||
ClutterBehaviourScalePrivate *priv;
|
ClutterBehaviourScalePrivate *priv;
|
||||||
@ -309,8 +309,8 @@ clutter_behaviour_scale_get_bounds (ClutterBehaviourScale *scale,
|
|||||||
|
|
||||||
priv = scale->priv;
|
priv = scale->priv;
|
||||||
|
|
||||||
if (scale_begin)
|
if (scale_start)
|
||||||
*scale_begin = CLUTTER_FIXED_TO_DOUBLE (priv->scale_begin);
|
*scale_start = CLUTTER_FIXED_TO_DOUBLE (priv->scale_start);
|
||||||
|
|
||||||
if (scale_end)
|
if (scale_end)
|
||||||
*scale_end = CLUTTER_FIXED_TO_DOUBLE (priv->scale_end);
|
*scale_end = CLUTTER_FIXED_TO_DOUBLE (priv->scale_end);
|
||||||
@ -319,7 +319,7 @@ clutter_behaviour_scale_get_bounds (ClutterBehaviourScale *scale,
|
|||||||
/**
|
/**
|
||||||
* clutter_behaviour_scale_get_boundsx:
|
* clutter_behaviour_scale_get_boundsx:
|
||||||
* @scale: a #ClutterBehaviourScale
|
* @scale: a #ClutterBehaviourScale
|
||||||
* @scale_begin: return location for the initial scale factor
|
* @scale_start: return location for the initial scale factor
|
||||||
* @scale_end: return location for the final scale factor
|
* @scale_end: return location for the final scale factor
|
||||||
*
|
*
|
||||||
* Retrieves the bounds used by scale behaviour.
|
* Retrieves the bounds used by scale behaviour.
|
||||||
@ -328,7 +328,7 @@ clutter_behaviour_scale_get_bounds (ClutterBehaviourScale *scale,
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
clutter_behaviour_scale_get_boundsx (ClutterBehaviourScale *scale,
|
clutter_behaviour_scale_get_boundsx (ClutterBehaviourScale *scale,
|
||||||
ClutterFixed *scale_begin,
|
ClutterFixed *scale_start,
|
||||||
ClutterFixed *scale_end)
|
ClutterFixed *scale_end)
|
||||||
{
|
{
|
||||||
ClutterBehaviourScalePrivate *priv;
|
ClutterBehaviourScalePrivate *priv;
|
||||||
@ -337,8 +337,8 @@ clutter_behaviour_scale_get_boundsx (ClutterBehaviourScale *scale,
|
|||||||
|
|
||||||
priv = scale->priv;
|
priv = scale->priv;
|
||||||
|
|
||||||
if (scale_begin)
|
if (scale_start)
|
||||||
*scale_begin = priv->scale_begin;
|
*scale_start = priv->scale_start;
|
||||||
|
|
||||||
if (scale_end)
|
if (scale_end)
|
||||||
*scale_end = priv->scale_end;
|
*scale_end = priv->scale_end;
|
||||||
|
@ -77,19 +77,19 @@ 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 scale_begin,
|
gdouble scale_start,
|
||||||
gdouble scale_end,
|
gdouble scale_end,
|
||||||
ClutterGravity gravity);
|
ClutterGravity gravity);
|
||||||
ClutterBehaviour *clutter_behaviour_scale_newx (ClutterAlpha *alpha,
|
ClutterBehaviour *clutter_behaviour_scale_newx (ClutterAlpha *alpha,
|
||||||
ClutterFixed scale_begin,
|
ClutterFixed scale_start,
|
||||||
ClutterFixed scale_end,
|
ClutterFixed scale_end,
|
||||||
ClutterGravity gravity);
|
ClutterGravity gravity);
|
||||||
|
|
||||||
void clutter_behaviour_scale_get_bounds (ClutterBehaviourScale *scale,
|
void clutter_behaviour_scale_get_bounds (ClutterBehaviourScale *scale,
|
||||||
gdouble *scale_begin,
|
gdouble *scale_start,
|
||||||
gdouble *scale_end);
|
gdouble *scale_end);
|
||||||
void clutter_behaviour_scale_get_boundsx (ClutterBehaviourScale *scale,
|
void clutter_behaviour_scale_get_boundsx (ClutterBehaviourScale *scale,
|
||||||
ClutterFixed *scale_begin,
|
ClutterFixed *scale_start,
|
||||||
ClutterFixed *scale_end);
|
ClutterFixed *scale_end);
|
||||||
|
|
||||||
ClutterGravity clutter_behaviour_scale_get_gravity (ClutterBehaviourScale *scale);
|
ClutterGravity clutter_behaviour_scale_get_gravity (ClutterBehaviourScale *scale);
|
||||||
|
@ -476,8 +476,8 @@ on_effect_complete (ClutterTimeline *timeline,
|
|||||||
* clutter_effect_fade:
|
* clutter_effect_fade:
|
||||||
* @template_: A #ClutterEffectTemplate
|
* @template_: A #ClutterEffectTemplate
|
||||||
* @actor: A #ClutterActor to apply the effect to.
|
* @actor: A #ClutterActor to apply the effect to.
|
||||||
* @start_opacity: Initial opacity value to apply to actor
|
* @opacity_start: Initial opacity value to apply to actor
|
||||||
* @end_opacity: Final opacity value to apply to actor
|
* @opacity_end: Final opacity value to apply to actor
|
||||||
* @completed_func: A #ClutterEffectCompleteFunc to call on effect
|
* @completed_func: A #ClutterEffectCompleteFunc to call on effect
|
||||||
* completion or %NULL
|
* completion or %NULL
|
||||||
* @completed_data: Data to pass to supplied #ClutterEffectCompleteFunc
|
* @completed_data: Data to pass to supplied #ClutterEffectCompleteFunc
|
||||||
@ -493,8 +493,8 @@ on_effect_complete (ClutterTimeline *timeline,
|
|||||||
ClutterTimeline *
|
ClutterTimeline *
|
||||||
clutter_effect_fade (ClutterEffectTemplate *template_,
|
clutter_effect_fade (ClutterEffectTemplate *template_,
|
||||||
ClutterActor *actor,
|
ClutterActor *actor,
|
||||||
guint8 start_opacity,
|
guint8 opacity_start,
|
||||||
guint8 end_opacity,
|
guint8 opacity_end,
|
||||||
ClutterEffectCompleteFunc completed_func,
|
ClutterEffectCompleteFunc completed_func,
|
||||||
gpointer completed_data)
|
gpointer completed_data)
|
||||||
{
|
{
|
||||||
@ -507,11 +507,11 @@ clutter_effect_fade (ClutterEffectTemplate *template_,
|
|||||||
c->completed_func = completed_func;
|
c->completed_func = completed_func;
|
||||||
c->completed_data = completed_data;
|
c->completed_data = completed_data;
|
||||||
|
|
||||||
clutter_actor_set_opacity (actor, start_opacity);
|
clutter_actor_set_opacity (actor, opacity_start);
|
||||||
|
|
||||||
c->behave = clutter_behaviour_opacity_new (c->alpha,
|
c->behave = clutter_behaviour_opacity_new (c->alpha,
|
||||||
start_opacity,
|
opacity_start,
|
||||||
end_opacity);
|
opacity_end);
|
||||||
|
|
||||||
clutter_behaviour_apply (c->behave, actor);
|
clutter_behaviour_apply (c->behave, actor);
|
||||||
clutter_timeline_start (c->timeline);
|
clutter_timeline_start (c->timeline);
|
||||||
@ -523,8 +523,8 @@ clutter_effect_fade (ClutterEffectTemplate *template_,
|
|||||||
* clutter_effect_depth:
|
* clutter_effect_depth:
|
||||||
* @template_: A #ClutterEffectTemplate
|
* @template_: A #ClutterEffectTemplate
|
||||||
* @actor: A #ClutterActor to apply the effect to.
|
* @actor: A #ClutterActor to apply the effect to.
|
||||||
* @start_depth: Initial depth value to apply to actor
|
* @depth_start: Initial depth value to apply to actor
|
||||||
* @end_depth: Final depth value to apply to actor
|
* @depth_end: Final depth value to apply to actor
|
||||||
* @completed_func: A #ClutterEffectCompleteFunc to call on effect
|
* @completed_func: A #ClutterEffectCompleteFunc to call on effect
|
||||||
* completion or %NULL
|
* completion or %NULL
|
||||||
* @completed_data: Data to pass to supplied #ClutterEffectCompleteFunc
|
* @completed_data: Data to pass to supplied #ClutterEffectCompleteFunc
|
||||||
@ -540,8 +540,8 @@ clutter_effect_fade (ClutterEffectTemplate *template_,
|
|||||||
ClutterTimeline *
|
ClutterTimeline *
|
||||||
clutter_effect_depth (ClutterEffectTemplate *template_,
|
clutter_effect_depth (ClutterEffectTemplate *template_,
|
||||||
ClutterActor *actor,
|
ClutterActor *actor,
|
||||||
gint start_depth,
|
gint depth_start,
|
||||||
gint end_depth,
|
gint depth_end,
|
||||||
ClutterEffectCompleteFunc completed_func,
|
ClutterEffectCompleteFunc completed_func,
|
||||||
gpointer completed_data)
|
gpointer completed_data)
|
||||||
{
|
{
|
||||||
@ -554,7 +554,7 @@ clutter_effect_depth (ClutterEffectTemplate *template_,
|
|||||||
c->completed_func = completed_func;
|
c->completed_func = completed_func;
|
||||||
c->completed_data = completed_data;
|
c->completed_data = completed_data;
|
||||||
|
|
||||||
c->behave = clutter_behaviour_depth_new (c->alpha, start_depth, end_depth);
|
c->behave = clutter_behaviour_depth_new (c->alpha, depth_start, depth_end);
|
||||||
|
|
||||||
clutter_behaviour_apply (c->behave, actor);
|
clutter_behaviour_apply (c->behave, actor);
|
||||||
clutter_timeline_start (c->timeline);
|
clutter_timeline_start (c->timeline);
|
||||||
@ -612,7 +612,7 @@ clutter_effect_move (ClutterEffectTemplate *template_,
|
|||||||
* clutter_effect_scale:
|
* clutter_effect_scale:
|
||||||
* @template_: A #ClutterEffectTemplate
|
* @template_: A #ClutterEffectTemplate
|
||||||
* @actor: A #ClutterActor to apply the effect to.
|
* @actor: A #ClutterActor to apply the effect to.
|
||||||
* @scale_begin: Initial scale factor to apply to actor
|
* @scale_start: Initial scale factor to apply to actor
|
||||||
* @scale_end: Final scale factor to apply to actor
|
* @scale_end: Final scale factor to apply to actor
|
||||||
* @gravity: A #ClutterGravity for the scale.
|
* @gravity: A #ClutterGravity for the scale.
|
||||||
* @completed_func: A #ClutterEffectCompleteFunc to call on effect
|
* @completed_func: A #ClutterEffectCompleteFunc to call on effect
|
||||||
@ -630,7 +630,7 @@ clutter_effect_move (ClutterEffectTemplate *template_,
|
|||||||
ClutterTimeline *
|
ClutterTimeline *
|
||||||
clutter_effect_scale (ClutterEffectTemplate *template_,
|
clutter_effect_scale (ClutterEffectTemplate *template_,
|
||||||
ClutterActor *actor,
|
ClutterActor *actor,
|
||||||
gdouble scale_begin,
|
gdouble scale_start,
|
||||||
gdouble scale_end,
|
gdouble scale_end,
|
||||||
ClutterGravity gravity,
|
ClutterGravity gravity,
|
||||||
ClutterEffectCompleteFunc completed_func,
|
ClutterEffectCompleteFunc completed_func,
|
||||||
@ -646,10 +646,10 @@ clutter_effect_scale (ClutterEffectTemplate *template_,
|
|||||||
c->completed_data = completed_data;
|
c->completed_data = completed_data;
|
||||||
|
|
||||||
clutter_actor_set_scale_with_gravity (actor,
|
clutter_actor_set_scale_with_gravity (actor,
|
||||||
scale_begin, scale_begin, gravity);
|
scale_start, scale_start, gravity);
|
||||||
|
|
||||||
c->behave = clutter_behaviour_scale_new (c->alpha,
|
c->behave = clutter_behaviour_scale_new (c->alpha,
|
||||||
scale_begin,
|
scale_start,
|
||||||
scale_end,
|
scale_end,
|
||||||
gravity);
|
gravity);
|
||||||
|
|
||||||
@ -663,7 +663,7 @@ clutter_effect_scale (ClutterEffectTemplate *template_,
|
|||||||
* clutter_effect_rotate_x:
|
* clutter_effect_rotate_x:
|
||||||
* @template_: A #ClutterEffectTemplate
|
* @template_: A #ClutterEffectTemplate
|
||||||
* @actor: A #ClutterActor to apply the effect to.
|
* @actor: A #ClutterActor to apply the effect to.
|
||||||
* @angle_begin: Initial angle to apply to actor
|
* @angle_start: Initial angle to apply to actor
|
||||||
* @angle_end: Final angle to apply to actor
|
* @angle_end: Final angle to apply to actor
|
||||||
* @center_y: Position on Y axis to rotate about.
|
* @center_y: Position on Y axis to rotate about.
|
||||||
* @center_z: Position on Z axis to rotate about.
|
* @center_z: Position on Z axis to rotate about.
|
||||||
@ -683,7 +683,7 @@ clutter_effect_scale (ClutterEffectTemplate *template_,
|
|||||||
ClutterTimeline *
|
ClutterTimeline *
|
||||||
clutter_effect_rotate_x (ClutterEffectTemplate *template_,
|
clutter_effect_rotate_x (ClutterEffectTemplate *template_,
|
||||||
ClutterActor *actor,
|
ClutterActor *actor,
|
||||||
gdouble angle_begin,
|
gdouble angle_start,
|
||||||
gdouble angle_end,
|
gdouble angle_end,
|
||||||
gint center_y,
|
gint center_y,
|
||||||
gint center_z,
|
gint center_z,
|
||||||
@ -701,12 +701,12 @@ clutter_effect_rotate_x (ClutterEffectTemplate *template_,
|
|||||||
c->completed_data = completed_data;
|
c->completed_data = completed_data;
|
||||||
|
|
||||||
|
|
||||||
clutter_actor_rotate_x (actor, angle_begin, center_y, center_y);
|
clutter_actor_rotate_x (actor, angle_start, center_y, center_y);
|
||||||
|
|
||||||
c->behave = clutter_behaviour_rotate_new (c->alpha,
|
c->behave = clutter_behaviour_rotate_new (c->alpha,
|
||||||
CLUTTER_X_AXIS,
|
CLUTTER_X_AXIS,
|
||||||
direction,
|
direction,
|
||||||
angle_begin,
|
angle_start,
|
||||||
angle_end);
|
angle_end);
|
||||||
g_object_set (c->behave,
|
g_object_set (c->behave,
|
||||||
"center-y", center_y,
|
"center-y", center_y,
|
||||||
@ -723,7 +723,7 @@ clutter_effect_rotate_x (ClutterEffectTemplate *template_,
|
|||||||
* clutter_effect_rotate_y:
|
* clutter_effect_rotate_y:
|
||||||
* @template_: A #ClutterEffectTemplate
|
* @template_: A #ClutterEffectTemplate
|
||||||
* @actor: A #ClutterActor to apply the effect to.
|
* @actor: A #ClutterActor to apply the effect to.
|
||||||
* @angle_begin: Initial angle to apply to actor
|
* @angle_start: Initial angle to apply to actor
|
||||||
* @angle_end: Final angle to apply to actor
|
* @angle_end: Final angle to apply to actor
|
||||||
* @center_x: Position on X axis to rotate about.
|
* @center_x: Position on X axis to rotate about.
|
||||||
* @center_z: Position on Z axis to rotate about.
|
* @center_z: Position on Z axis to rotate about.
|
||||||
@ -743,7 +743,7 @@ clutter_effect_rotate_x (ClutterEffectTemplate *template_,
|
|||||||
ClutterTimeline *
|
ClutterTimeline *
|
||||||
clutter_effect_rotate_y (ClutterEffectTemplate *template_,
|
clutter_effect_rotate_y (ClutterEffectTemplate *template_,
|
||||||
ClutterActor *actor,
|
ClutterActor *actor,
|
||||||
gdouble angle_begin,
|
gdouble angle_start,
|
||||||
gdouble angle_end,
|
gdouble angle_end,
|
||||||
gint center_x,
|
gint center_x,
|
||||||
gint center_z,
|
gint center_z,
|
||||||
@ -761,12 +761,12 @@ clutter_effect_rotate_y (ClutterEffectTemplate *template_,
|
|||||||
c->completed_data = completed_data;
|
c->completed_data = completed_data;
|
||||||
|
|
||||||
|
|
||||||
clutter_actor_rotate_y (actor, angle_begin, center_x, center_z);
|
clutter_actor_rotate_y (actor, angle_start, center_x, center_z);
|
||||||
|
|
||||||
c->behave = clutter_behaviour_rotate_new (c->alpha,
|
c->behave = clutter_behaviour_rotate_new (c->alpha,
|
||||||
CLUTTER_Y_AXIS,
|
CLUTTER_Y_AXIS,
|
||||||
direction,
|
direction,
|
||||||
angle_begin,
|
angle_start,
|
||||||
angle_end);
|
angle_end);
|
||||||
g_object_set (c->behave,
|
g_object_set (c->behave,
|
||||||
"center-x", center_x,
|
"center-x", center_x,
|
||||||
@ -783,7 +783,7 @@ clutter_effect_rotate_y (ClutterEffectTemplate *template_,
|
|||||||
* clutter_effect_rotate_z:
|
* clutter_effect_rotate_z:
|
||||||
* @template_: A #ClutterEffectTemplate
|
* @template_: A #ClutterEffectTemplate
|
||||||
* @actor: A #ClutterActor to apply the effect to.
|
* @actor: A #ClutterActor to apply the effect to.
|
||||||
* @angle_begin: Initial angle to apply to actor
|
* @angle_start: Initial angle to apply to actor
|
||||||
* @angle_end: Final angle to apply to actor
|
* @angle_end: Final angle to apply to actor
|
||||||
* @center_x: Position on X axis to rotate about.
|
* @center_x: Position on X axis to rotate about.
|
||||||
* @center_y: Position on Y axis to rotate about.
|
* @center_y: Position on Y axis to rotate about.
|
||||||
@ -803,7 +803,7 @@ clutter_effect_rotate_y (ClutterEffectTemplate *template_,
|
|||||||
ClutterTimeline *
|
ClutterTimeline *
|
||||||
clutter_effect_rotate_z (ClutterEffectTemplate *template_,
|
clutter_effect_rotate_z (ClutterEffectTemplate *template_,
|
||||||
ClutterActor *actor,
|
ClutterActor *actor,
|
||||||
gdouble angle_begin,
|
gdouble angle_start,
|
||||||
gdouble angle_end,
|
gdouble angle_end,
|
||||||
gint center_x,
|
gint center_x,
|
||||||
gint center_y,
|
gint center_y,
|
||||||
@ -821,12 +821,12 @@ clutter_effect_rotate_z (ClutterEffectTemplate *template_,
|
|||||||
c->completed_data = completed_data;
|
c->completed_data = completed_data;
|
||||||
|
|
||||||
|
|
||||||
clutter_actor_rotate_z (actor, angle_begin, center_x, center_y);
|
clutter_actor_rotate_z (actor, angle_start, center_x, center_y);
|
||||||
|
|
||||||
c->behave = clutter_behaviour_rotate_new (c->alpha,
|
c->behave = clutter_behaviour_rotate_new (c->alpha,
|
||||||
CLUTTER_Z_AXIS,
|
CLUTTER_Z_AXIS,
|
||||||
direction,
|
direction,
|
||||||
angle_begin,
|
angle_start,
|
||||||
angle_end);
|
angle_end);
|
||||||
g_object_set (c->behave,
|
g_object_set (c->behave,
|
||||||
"center-x", center_x,
|
"center-x", center_x,
|
||||||
|
@ -112,14 +112,14 @@ gboolean clutter_effect_template_get_timeline_clone (ClutterEffect
|
|||||||
|
|
||||||
ClutterTimeline *clutter_effect_fade (ClutterEffectTemplate *template_,
|
ClutterTimeline *clutter_effect_fade (ClutterEffectTemplate *template_,
|
||||||
ClutterActor *actor,
|
ClutterActor *actor,
|
||||||
guint8 start_opacity,
|
guint8 opacity_start,
|
||||||
guint8 end_opacity,
|
guint8 opacity_end,
|
||||||
ClutterEffectCompleteFunc completed_func,
|
ClutterEffectCompleteFunc completed_func,
|
||||||
gpointer completed_data);
|
gpointer completed_data);
|
||||||
ClutterTimeline *clutter_effect_depth (ClutterEffectTemplate *template_,
|
ClutterTimeline *clutter_effect_depth (ClutterEffectTemplate *template_,
|
||||||
ClutterActor *actor,
|
ClutterActor *actor,
|
||||||
gint start_depth,
|
gint depth_start,
|
||||||
gint end_depth,
|
gint depth_end,
|
||||||
ClutterEffectCompleteFunc completed_func,
|
ClutterEffectCompleteFunc completed_func,
|
||||||
gpointer completed_data);
|
gpointer completed_data);
|
||||||
ClutterTimeline *clutter_effect_move (ClutterEffectTemplate *template_,
|
ClutterTimeline *clutter_effect_move (ClutterEffectTemplate *template_,
|
||||||
@ -130,7 +130,7 @@ ClutterTimeline *clutter_effect_move (ClutterEffectTemplate *template_,
|
|||||||
gpointer completed_data);
|
gpointer completed_data);
|
||||||
ClutterTimeline *clutter_effect_scale (ClutterEffectTemplate *template_,
|
ClutterTimeline *clutter_effect_scale (ClutterEffectTemplate *template_,
|
||||||
ClutterActor *actor,
|
ClutterActor *actor,
|
||||||
gdouble scale_begin,
|
gdouble scale_start,
|
||||||
gdouble scale_end,
|
gdouble scale_end,
|
||||||
ClutterGravity gravity,
|
ClutterGravity gravity,
|
||||||
ClutterEffectCompleteFunc completed_func,
|
ClutterEffectCompleteFunc completed_func,
|
||||||
@ -138,7 +138,7 @@ ClutterTimeline *clutter_effect_scale (ClutterEffectTemplate *template_,
|
|||||||
|
|
||||||
ClutterTimeline *clutter_effect_rotate_x (ClutterEffectTemplate *template_,
|
ClutterTimeline *clutter_effect_rotate_x (ClutterEffectTemplate *template_,
|
||||||
ClutterActor *actor,
|
ClutterActor *actor,
|
||||||
gdouble angle_begin,
|
gdouble angle_start,
|
||||||
gdouble angle_end,
|
gdouble angle_end,
|
||||||
gint center_y,
|
gint center_y,
|
||||||
gint center_z,
|
gint center_z,
|
||||||
@ -147,7 +147,7 @@ ClutterTimeline *clutter_effect_rotate_x (ClutterEffectTemplate *template_,
|
|||||||
gpointer completed_data);
|
gpointer completed_data);
|
||||||
ClutterTimeline *clutter_effect_rotate_y (ClutterEffectTemplate *template_,
|
ClutterTimeline *clutter_effect_rotate_y (ClutterEffectTemplate *template_,
|
||||||
ClutterActor *actor,
|
ClutterActor *actor,
|
||||||
gdouble angle_begin,
|
gdouble angle_start,
|
||||||
gdouble angle_end,
|
gdouble angle_end,
|
||||||
gint center_x,
|
gint center_x,
|
||||||
gint center_z,
|
gint center_z,
|
||||||
@ -157,7 +157,7 @@ ClutterTimeline *clutter_effect_rotate_y (ClutterEffectTemplate *template_,
|
|||||||
|
|
||||||
ClutterTimeline *clutter_effect_rotate_z (ClutterEffectTemplate *template_,
|
ClutterTimeline *clutter_effect_rotate_z (ClutterEffectTemplate *template_,
|
||||||
ClutterActor *actor,
|
ClutterActor *actor,
|
||||||
gdouble angle_begin,
|
gdouble angle_start,
|
||||||
gdouble angle_end,
|
gdouble angle_end,
|
||||||
gint center_x,
|
gint center_x,
|
||||||
gint center_y,
|
gint center_y,
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
* {
|
* {
|
||||||
* "id" : "rotate-behaviour",
|
* "id" : "rotate-behaviour",
|
||||||
* "type" : "ClutterBehaviourRotate",
|
* "type" : "ClutterBehaviourRotate",
|
||||||
* "angle-begin" : 0.0,
|
* "angle-start" : 0.0,
|
||||||
* "angle-end" : 360.0,
|
* "angle-end" : 360.0,
|
||||||
* "axis" : "z-axis",
|
* "axis" : "z-axis",
|
||||||
* "alpha" : {
|
* "alpha" : {
|
||||||
|
@ -8,24 +8,24 @@ static void
|
|||||||
timeline_completed (ClutterTimeline *timeline,
|
timeline_completed (ClutterTimeline *timeline,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
gint start_depth, end_depth;
|
gint depth_start, depth_end;
|
||||||
|
|
||||||
if (zoom_in)
|
if (zoom_in)
|
||||||
{
|
{
|
||||||
start_depth = 100;
|
depth_start = 100;
|
||||||
end_depth = 0;
|
depth_end = 0;
|
||||||
zoom_in = FALSE;
|
zoom_in = FALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
start_depth = 0;
|
depth_start = 0;
|
||||||
end_depth = 100;
|
depth_end = 100;
|
||||||
zoom_in = TRUE;
|
zoom_in = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_object_set (G_OBJECT (d_behave),
|
g_object_set (G_OBJECT (d_behave),
|
||||||
"start-depth", start_depth,
|
"depth-start", depth_start,
|
||||||
"end-depth", end_depth,
|
"depth-end", depth_end,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
clutter_timeline_rewind (timeline);
|
clutter_timeline_rewind (timeline);
|
||||||
|
@ -41,7 +41,7 @@ static const gchar *test_behaviour =
|
|||||||
" {"
|
" {"
|
||||||
" \"id\" : \"rotate-behaviour\","
|
" \"id\" : \"rotate-behaviour\","
|
||||||
" \"type\" : \"ClutterBehaviourRotate\","
|
" \"type\" : \"ClutterBehaviourRotate\","
|
||||||
" \"angle-begin\" : 0.0,"
|
" \"angle-start\" : 0.0,"
|
||||||
" \"angle-end\" : 360.0,"
|
" \"angle-end\" : 360.0,"
|
||||||
" \"axis\" : \"y-axis\","
|
" \"axis\" : \"y-axis\","
|
||||||
" \"alpha\" : {"
|
" \"alpha\" : {"
|
||||||
|
Loading…
Reference in New Issue
Block a user