diff options
author | Emmanuele Bassi <ebassi@openedhand.com> | 2006-12-08 16:12:52 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@openedhand.com> | 2006-12-08 16:12:52 +0000 |
commit | aa623df78fafd4305953220537037b4d5b00ce2b (patch) | |
tree | 60132bd7f3cdbbefc51c55bd7ff228934ba6091b /clutter/clutter-behaviour-path.c | |
parent | a56ea84dd5c2a5c6df9a987347371bc681d940bb (diff) | |
download | clutter-aa623df78fafd4305953220537037b4d5b00ce2b.tar.gz |
2006-12-08 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour.h: Add a function prototype
for the foreach function: we need something more specific
than GFunc; add clutter_behaviour_get_actors(), used to
get a list of the actors.
* clutter/clutter-behaviour.c: Add debugging notes; add
a warning for behaviour implementations missing the
alpha_notify vfunc; add api documentation
* clutter/clutter-behaviour-opacity.c:
* clutter/clutter-behaviour-path.c:
* clutter/clutter-behaviour-scale.c: Reimplement the
alpha_notify functions using the new foreach function
and, where possible, by directly iterating on the
actors: this shaves off the number of recalculations
of the property/alpha values, and the number of
functions.
Diffstat (limited to 'clutter/clutter-behaviour-path.c')
-rw-r--r-- | clutter/clutter-behaviour-path.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/clutter/clutter-behaviour-path.c b/clutter/clutter-behaviour-path.c index d787a3244..41eecd2e7 100644 --- a/clutter/clutter-behaviour-path.c +++ b/clutter/clutter-behaviour-path.c @@ -184,9 +184,12 @@ path_total_length (ClutterBehaviourPath *behave) } static void -actor_apply_knot_foreach (ClutterActor *actor, - ClutterKnot *knot) +actor_apply_knot_foreach (ClutterBehaviour *behaviour, + ClutterActor *actor, + gpointer data) { + ClutterKnot *knot = data; + clutter_actor_set_position (actor, knot->x, knot->y); } @@ -217,7 +220,7 @@ path_alpha_to_position (ClutterBehaviourPath *behave, if (offset == 0) { clutter_behaviour_actors_foreach (behaviour, - (GFunc) actor_apply_knot_foreach, + actor_apply_knot_foreach, priv->knots->data); g_signal_emit (behave, path_signals[KNOT_REACHED], 0, @@ -245,7 +248,7 @@ path_alpha_to_position (ClutterBehaviourPath *behave, interpolate (knot, next, &new, t); clutter_behaviour_actors_foreach (behaviour, - (GFunc)actor_apply_knot_foreach, + actor_apply_knot_foreach, &new); g_signal_emit (behave, path_signals[KNOT_REACHED], 0, &new); |