Hi Emmanuele,
the more I think about this, the more: set_alpha(NULL) set_timeline(NULL) for creating defaults are something that I would not want to expose in the API.
Exactly! This ugliness is what got me started on all this in the first place!
let's assume allowing to unset the alpha -- to what would map: set_mode(CLUTTER_LINEAR); set_timeline(NULL); ? I guess it would just call alpha_set_timeline(NULL), which is a valid behaviour. oh well, it wouldn't hurt, I guess, even though it would be pretty much insane.
That's right. Of course, this is insane... but the model allows for it. I think it's better to have a consistent model that's easy to understand than to always try to prevent the user from doing stupid things. In the above case, the animation is still usable because get_timeline does the dirty work.
so, apart from the extra-rambly email, I went through three iterations of the patch and at the end I have something similar to your initial approach - plus the removal of the automagic creation of alpha and timeline if NULL is passed to set_alpha() and set_timeline() respectively and some more documentation. you can find it inside the 1.0-integration branch, which will be merged into master before the API frozen release.
I've gone through your code line by line... you've now got exactly what I submitted! Thanks! I'm glad I was able to make my ideas clear to you.
I found two small details to fix up in your version... I'll just submit them to the list as a single patch (trivial stuff).
Thanks for the discussion! Best regards, Jonas Bonn South Pole AB -- To unsubscribe send a mail to clutter+unsubscr...@o-hand.com