Hi
I am building a simple template based screen mechanism using JSON files
and loading them into clutter script object. I am wondering whether
there is any way to create arbitrary name-value pairs in JSON file that
can be queried using clutter script api functions.
Below is an example of a JSON file that I have. I was able to query for
"screen" and get the ClutterGroup object just fine. But I like to query
for "screenname" and "nextscreen" and get their values. I don't see any
errors when I merge this file into a script object. But I get NULL
object when I do clutter_get_object().
I appreciate if you can point me to any tricks/workarounds for this.
Thanks
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
{
"screenname" : "makeacall",
"nextscreen" : "callprogress",
"Screen" : {
"id" : "screen",
"type" : "ClutterGroup",
"x" : 20, "y" : 20,
"behaviours" : [ "fade-behaviour"],
"children" : [
{
"id" : "dialfield-bk",
"type" : "ClutterRectangle",
"x" : 46,
"y" : 44,
"color" : "black",
"width" : "400px",
"height" : "50px",
"has-border" : true,
"border-width" : 5,
"border-color" : "blue",
"opacity" : 100,
"visible" : true
},
{
"id" : "dialfield",
"type" : "ClutterEntry",
"color" : "white",
"x" : 50, "y" : 50,
"visible" : true,
"reactive" : true,
"text" : "172.26.48.123",
"font-name" : "Sans 32px"
}
]
}
}
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++