/usr/share/clutter-1.0/cookbook/examples/script-states.json is in libclutter-1.0-doc 1.20.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | [
{
"id" : "stage",
"type" : "ClutterStage",
"width" : 300,
"height" : 300,
"color" : "#335",
"signals" : [
{ "name" : "destroy", "handler" : "clutter_main_quit" }
],
"children" : [ "rectangle" ]
},
{
"id" : "rectangle-states",
"type" : "ClutterState",
"duration" : 1000,
"transitions" : [
{
"source" : null,
"target" : "base",
"keys" : [
[ "rectangle", "scale-x", "ease-in-cubic", 0.7 ],
[ "rectangle", "scale-y", "ease-in-cubic", 0.7 ],
[ "rectangle", "rotation-angle-z", "ease-out-cubic", 0.0 ]
]
},
{
"source" : null,
"target" : "hover",
"keys" : [
[ "rectangle", "scale-x", "ease-in-cubic", 1.2 ],
[ "rectangle", "scale-y", "ease-in-cubic", 1.2 ]
]
},
{
"source" : null,
"target" : "clicked",
"keys" : [
[ "rectangle", "rotation-angle-z", "ease-out-bounce", 90.0 ]
]
}
]
},
{
"id" : "rectangle",
"type" : "ClutterRectangle",
"width" : 200,
"height" : 200,
"x" : 50,
"y" : 50,
"color" : "#a90",
"rotation-center-z-gravity" : "center",
"scale-gravity" : "center",
"scale-x" : 0.7,
"scale-y" : 0.7,
"reactive" : true,
"signals" : [
{
"name" : "enter-event",
"states" : "rectangle-states",
"target-state" : "hover"
},
{
"name" : "leave-event",
"states" : "rectangle-states",
"target-state" : "base"
}
],
"actions" : [
{
"type" : "ClutterClickAction",
"signals" : [
{
"name" : "clicked",
"states" : "rectangle-states",
"target-state" : "clicked"
}
]
}
]
}
]
|