Hey guys,
I've been spending what spare time I have looking at clutter and
attempting to port the astro-desktop toy to the newer API.
One of the issues is the replacement of ClutterEffectTemplate. Some of
the astro widgets have show/hide and move animations for user events.
In replacing these, I've changed the code to use ClutterAnimations.
I'd like some clarification if the follow approach is correct for the
new API.
Here's a sample from src/astro-appview.c::astro_appview_show
static void
astro_appview_show (ClutterActor *view)
{
AstroAppviewPrivate *priv;
static ClutterTimeline *show_time = NULL;
g_return_if_fail (ASTRO_IS_APPVIEW (view));
priv = ASTRO_APPVIEW (view)->priv;
if (CLUTTER_IS_ANIMATION (priv->show_temp))
show_time = clutter_animation_get_timeline (priv->show_temp);
if (CLUTTER_IS_TIMELINE (show_time) &&clutter_timeline_is_playing
(show_time))
{
//clutter_timeline_stop (show_time);
//g_object_unref (show_time);
clutter_animation_completed (priv->show_temp);
}
clutter_actor_set_x (view, -1* clutter_actor_get_width (view));
CLUTTER_ACTOR_CLASS (astro_appview_parent_class)->show (view);
gint xval = (int)(CSW()/2) - (priv->active*ASTRO_APPICON_SPACING());
priv->show_temp = clutter_actor_animate (CLUTTER_ACTOR (view),
CLUTTER_LINEAR,
600,
"x", xval,
"y", clutter_actor_get_y (CLUTTER_ACTOR (view)),
"signal::new-frame",
on_move_timeline_new_frame, view,
NULL);
if (CLUTTER_IS_ANIMATION (priv->show_temp)) {
show_time = clutter_animation_get_timeline (priv->show_temp);
g_signal_connect (show_time, "new-frame",
G_CALLBACK (on_move_timeline_new_frame), view);
}
}
--
Glen Gray <[email protected]> Digital Depot, Thomas Street
Software Engineering Manager Dublin 8, Ireland
Lincor Solutions Ltd. Ph: +353 (0) 1 4893682
--
To unsubscribe send a mail to [email protected]