ClutterScript is Clutter's implementation of a JSON-based scene graph file. It's based on JSON-GLib. It's not unusual in how it's implemented, but it handles a lot of little things like color parsing, construction properties and so on, in a way that requires a fair amount of code. No doubt you could write something similar with very similar functionality, but it'd take a fair bit of code. It's worth scanning clutter-script.[ch] and clutter-script-parser.[ch] to get an idea of exactly how much.
There's not a lot of good documentation on ClutterScript. I've wound up mostly reading through clutter-script.c mostly, which also has some basic examples in its comments. I believe one of those examples includes a ClutterBehavior, so you can see how to do basic animation. It's possible to write ClutterScores in ClutterScript as well, though I don't remember any good examples of that offhand. You may need to try until you get it right, or read the parsing code to figure out how it works. Of course, one nice thing about JSON-GLib over writing your own is that it *does* handle type names and property names for you pretty well. If you write your own JSON-based parser, consider using the existing GLib properties and type names rather than coming up with your own. In fact, you might want to start from JSON-GLib as well. --- On Wed, 10/22/08, dilip devaraj <[EMAIL PROTECTED]> wrote: > From: dilip devaraj <[EMAIL PROTECTED]> > Subject: [clutter] Using JSON with Clutter > To: "clutter" <[email protected]> > Date: Wednesday, October 22, 2008, 6:14 AM > Hello Clutter Team > > I have the following queries wrt json's use in clutter > > 1)How is jason backend differeent from other similar > backends .Is there any specific advantage of using Json with > Clutter ? > 2)How json- binding can be used with clutter applications > for animations .I was not able to gather much info from > test-script.c program > > Regards > Dilip > > > > Connect with friends all over the world. Get Yahoo! > India Messenger at http://in.messenger.yahoo.com/?wm=n/ -- To unsubscribe send a mail to [EMAIL PROTECTED]
