Re: [Freevo-devel] kaa.candy changes proposal (was: Kaa r3378 - in trunk/candy: . src/libcandy src/widgets)
On Mon, 2008-08-04 at 18:24 +0200, Dirk Meyer wrote: > So I propose that a kaa.candy.Widget HAS a clutter.Actor. I see the > following advantages: > > - Thread-safe because we do not modify a real clutter actor. One > single now_render function could be created to calculate stuff and > create the actors in the gobject mainloop > - Hide clutter API the user should no use > - Support layout Yes, and this is basically how kaa.canvas worked. In fact, the actual underlying evas object creation was deferred, as was applying properties to the object. For evas, the deferring was done because you couldn't create evas objects without immediately tying them to a canvas, which worked against our earlier requirement of being able to move objects between canvases. You could do something similar here with candy, further abstracting and deferring object creation, which will let you more conveniently take care of all that in the clutter thread. I'm a bit surprised you didn't do it this way to begin with. I should have been paying attention to the candy check-ins, I would have said something. :) > I have no idea what the code does. It was copied from tidy. Maybe tidy > is already updated to 0.8 I found that code in toys/ but I didn't check tidy. It would be nice if that was updated to 0.8. My changes work fine for non-tiled textures, and it sounds like tiled textures didn't work right even with 0.6. > > -import clutter.cluttercairo > > +try: > > +import cluttercairo > > +except ImportError: > > +# 0.6 > > +import clutter.cluttercairo as cluttercairo > > There is clutter.__version__ Not really needed I think. Eventually we'll just remove that code anyway, once 0.6 is old enough. - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Freevo-devel mailing list Freevo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-devel
[Freevo-devel] kaa.candy changes proposal (was: Kaa r3378 - in trunk/candy: . src/libcandy src/widgets)
Jason Tackaberry wrote: > Author: tack > Date: Sun Aug 3 17:39:57 2008 > New Revision: 3378 > > Log: > Support for clutter 0.8 and pyclutter 0.8 (changes not tested against > 0.6 though). Thanks. While looking at your changes I see again a design flaw in kaa.candy. I noticed it before when you proposed the layout stuff you did for kaa.canvas. Right now a kaa.candy.Widget IS a clutter.Actor. This exposes the clutter API to the kaa.candy user making some stuff impossible. E.g. widget.get_width() will return the real object width and can not respect alignments. And set_width could never support '100%' as value. So I propose that a kaa.candy.Widget HAS a clutter.Actor. I see the following advantages: - Thread-safe because we do not modify a real clutter actor. One single now_render function could be created to calculate stuff and create the actors in the gobject mainloop - Hide clutter API the user should no use - Support layout What do you think? > - /* FIXME: Below wont actually render the corrent graduated effect. */ > + /* FIXME: Below wont actually render the corrent graduated effect. > + * The code below is disabled for clutter 0.7+ as porting it is > + * non-trivial. > + */ > + > + g_warning("ClutterReflectTexture doesn't support tiled textures."); I have no idea what the code does. It was copied from tidy. Maybe tidy is already updated to 0.8 > -import clutter.cluttercairo > +try: > +import cluttercairo > +except ImportError: > +# 0.6 > +import clutter.cluttercairo as cluttercairo There is clutter.__version__ Dischi -- Only Irish coffee provides in a single glass all four essential food groups -- alcohol, caffeine, sugar, and fat. -- Alex Levine - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Freevo-devel mailing list Freevo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-devel