mirror of
https://github.com/brl/mutter.git
synced 2024-12-11 22:10:16 +00:00
95d78acb4c
The ClutterScript parser needs to be extended to parse child properties and apply them after an actor has been added to a container. In order to distinguish child properties from regular GObject properties we can use the "child::" prefix, e.g.: { "type" : "ClutterRectangle", "id" : "child-01", "child::has-focus" : true, ... } Parsing child properties can be deferred to the ClutterScriptable interface, just like regular properties.
22 lines
416 B
JSON
22 lines
416 B
JSON
{
|
|
"type" : "TestGroup",
|
|
"id" : "test-group",
|
|
"children" : [
|
|
{
|
|
"type" : "ClutterRectangle",
|
|
"id" : "test-rect-1",
|
|
"width" : 100.0,
|
|
"height" : 100.0,
|
|
"color" : [ 255, 0, 0, 255 ],
|
|
"child::focus" : true
|
|
},
|
|
{
|
|
"type" : "ClutterRectangle",
|
|
"id" : "test-rect-2",
|
|
"width" : 100.0,
|
|
"height" : 100.0,
|
|
"color" : [ 0, 255, 0, 255 ]
|
|
}
|
|
]
|
|
}
|