Emmanuele Bassi
dd8cf63a62
script: Allow connecting signal to ClutterState states
...
One of the uses of a ClutterState state machine along with ClutterScript
is to provide a quick way to transition from state to state in response
to signal emitted on specific instances.
Connecting a real function, in code, to a specific signal does not
improve the ease of use of ClutterScript to define scenes.
By adding a new signal definition to the current one we can have both a
simple way to define application logic in code and in the UI definition
file.
The new syntax is trivial:
{
"name" : <signal name>,
"state" : <state machine script id>,
"target-state" : <target state>
}
The ClutterState instance is identified by its script id, and the target
state is resolved at run-time, so it can be defined both in
ClutterScript or in code. Ideally, we should find a way to associate a
default ClutterState instance to the ClutterScript one that parses the
definition; this way we would be able to remove the "state" member, or
even "style" the behaviour of an object by replacing the ClutterState
instance.
The implementation uses a signal emission hook, to avoid knowing the
signal signature; we check the emitter of the signal against the object
that defined the signal, to avoid erroneous state changes.
2011-06-13 13:47:08 +01:00
..
2011-06-07 16:06:24 +01:00
2011-06-07 16:06:24 +01:00
2011-04-18 16:24:27 +01:00
2011-06-09 15:28:39 +01:00
2011-06-07 14:39:01 +01:00
2011-05-06 15:44:08 +01:00
2011-06-07 16:06:24 +01:00
2011-06-07 16:06:24 +01:00
2010-05-26 14:09:24 +01:00
2010-05-20 11:19:51 +01:00
2010-10-25 23:44:53 +01:00
2011-06-07 16:06:24 +01:00
2011-06-07 16:06:24 +01:00
2011-06-07 16:06:24 +01:00
2011-06-07 16:06:24 +01:00
2011-06-07 16:06:24 +01:00
2011-06-07 16:06:24 +01:00
2011-04-01 15:36:22 +01:00
2011-01-20 16:35:26 +00:00
2011-03-03 11:47:49 +00:00
2010-10-18 11:26:44 +01:00
2010-07-31 10:56:09 +01:00
2011-04-16 10:22:01 +01:00
2010-09-10 11:18:53 +01:00
2011-06-07 16:06:24 +01:00
2011-06-07 16:06:24 +01:00
2011-04-11 17:54:36 +01:00
2011-06-07 16:06:24 +01:00
2011-06-07 16:06:24 +01:00
2011-01-20 13:29:37 +00:00
2011-01-20 13:29:37 +00:00
2011-03-03 11:47:49 +00:00
2011-01-20 13:29:37 +00:00
2011-03-03 11:47:49 +00:00
2011-01-20 13:29:37 +00:00
2011-03-03 11:47:49 +00:00
2011-01-20 13:29:37 +00:00
2011-03-03 11:47:49 +00:00
2011-01-20 13:29:37 +00:00
2011-03-03 11:47:49 +00:00
2011-01-20 13:29:37 +00:00
2011-03-03 11:47:49 +00:00
2011-01-20 13:29:37 +00:00
2010-06-01 12:08:18 +01:00
2011-03-03 11:47:49 +00:00
2011-03-03 11:47:49 +00:00
2011-01-25 11:14:37 +00:00
2011-06-07 16:06:24 +01:00
2011-06-07 16:06:24 +01:00
2011-01-20 16:35:26 +00:00
2011-01-20 16:35:26 +00:00
2011-06-07 14:43:52 +01:00
2010-03-25 09:41:54 +00:00
2011-03-08 19:27:07 +00:00
2010-03-02 11:12:32 +00:00
2011-05-06 15:06:06 +01:00
2011-05-06 15:06:06 +01:00
2011-03-03 11:47:49 +00:00
2011-06-09 15:12:41 +01:00
2011-06-09 15:12:41 +01:00
2011-05-13 01:46:32 +01:00
2010-11-11 13:14:23 +00:00
2011-06-07 16:06:24 +01:00
2011-06-07 16:06:24 +01:00
2011-03-03 11:47:49 +00:00
2011-02-16 14:11:59 +00:00
2011-01-19 14:33:27 +00:00
2011-03-01 19:04:31 +00:00
2010-09-17 12:17:50 +01:00
2011-02-15 12:40:12 +00:00
2011-02-11 16:45:45 +00:00
2011-03-07 13:26:20 +00:00
2011-03-03 11:47:49 +00:00
2010-11-18 18:23:49 +00:00
2011-03-03 11:47:49 +00:00
2011-01-20 16:35:26 +00:00
2011-01-28 18:19:49 +00:00
2011-03-03 11:47:49 +00:00
2011-01-21 10:25:43 +00:00
2011-03-21 12:41:40 +00:00
2011-03-09 14:21:01 +00:00
2011-05-13 01:46:31 +01:00
2011-05-13 01:46:32 +01:00
2011-05-13 01:46:32 +01:00
2011-02-28 14:16:23 +00:00
2011-01-21 10:25:43 +00:00
2011-01-21 10:25:43 +00:00
2011-06-07 16:06:24 +01:00
2011-06-09 15:40:26 +01:00
2010-10-21 12:22:17 +01:00
2010-02-15 19:03:37 +00:00
2010-06-07 22:40:34 +01:00
2010-09-08 17:04:21 +01:00
2010-12-10 17:15:39 +00:00
2011-05-13 01:46:32 +01:00
2011-05-13 01:46:32 +01:00
2011-03-03 11:47:49 +00:00
2010-11-17 16:19:10 +00:00
2011-01-20 13:29:37 +00:00
2010-09-29 15:12:57 +01:00
2011-05-26 08:48:13 -04:00
2011-02-18 15:53:27 +00:00
2011-06-07 16:06:24 +01:00
2011-06-07 16:06:24 +01:00
2011-06-07 16:06:24 +01:00
2011-06-07 16:06:24 +01:00
2010-12-02 09:53:00 +00:00
2011-02-28 14:16:24 +00:00
2010-09-10 17:54:52 +01:00
2010-12-02 09:53:00 +00:00
2010-10-18 11:26:45 +01:00
2010-12-09 12:36:50 +00:00
2010-08-10 17:12:06 +01:00
2009-12-02 11:36:25 +00:00
2011-01-10 21:22:22 +00:00
2011-05-16 16:04:27 +01:00
2011-02-28 14:10:05 +00:00
2011-06-09 15:12:41 +01:00
2010-11-17 16:19:10 +00:00
2011-06-02 22:16:45 +02:00
2010-05-19 16:10:05 +01:00
2011-06-07 16:06:24 +01:00
2011-06-07 16:06:24 +01:00
2011-02-28 14:34:36 +00:00
2011-05-20 13:27:01 +02:00
2011-02-28 14:34:36 +00:00
2011-03-03 11:47:49 +00:00
2011-01-20 16:35:26 +00:00
2011-03-07 13:26:20 +00:00
2011-06-02 21:02:11 +01:00
2011-03-03 11:47:49 +00:00
2011-01-20 16:35:26 +00:00
2010-10-21 12:22:17 +01:00
2011-06-07 16:06:24 +01:00
2010-09-14 12:43:16 +01:00
2010-09-14 12:43:16 +01:00
2011-05-13 01:46:32 +01:00
2011-02-15 12:40:11 +00:00
2011-02-15 12:40:11 +00:00
2011-06-13 13:47:08 +01:00
2011-06-13 13:47:08 +01:00
2011-06-13 13:47:08 +01:00
2011-06-07 16:06:24 +01:00
2011-06-07 16:06:24 +01:00
2011-06-07 16:06:24 +01:00
2011-06-09 14:43:34 +01:00
2011-01-20 16:35:26 +00:00
2011-06-07 14:09:53 +01:00
2011-06-07 14:09:53 +01:00
2011-06-07 16:06:24 +01:00
2011-06-07 16:06:24 +01:00
2011-06-07 16:06:24 +01:00
2011-06-07 16:06:24 +01:00
2011-03-03 11:47:49 +00:00
2011-01-20 16:35:26 +00:00
2010-10-21 13:13:00 +01:00
2010-10-21 11:30:19 +01:00
2010-05-19 16:10:05 +01:00
2011-05-06 17:47:41 +01:00
2011-04-11 15:28:53 +01:00
2011-04-11 15:28:53 +01:00
2011-06-10 17:57:18 +01:00
2011-06-07 16:06:24 +01:00
2011-06-07 16:06:24 +01:00
2011-06-07 16:06:24 +01:00
2011-02-19 16:47:20 +00:00
2010-09-23 15:17:58 +01:00
2011-06-10 14:02:07 +01:00
2011-06-07 16:06:24 +01:00
2011-05-13 01:46:32 +01:00
2010-11-18 18:23:49 +00:00
2011-03-03 11:47:49 +00:00
2011-01-24 11:52:47 +00:00
2010-11-17 16:19:10 +00:00
2010-11-17 16:19:10 +00:00
2011-02-15 12:40:11 +00:00
2011-02-15 12:40:11 +00:00
2011-06-07 14:09:53 +01:00
2011-06-07 16:06:24 +01:00
2011-06-07 16:06:24 +01:00
2011-06-07 16:06:24 +01:00
2010-02-06 10:49:33 +00:00
2010-03-02 11:12:32 +00:00
2011-01-19 14:33:27 +00:00
2010-09-29 14:40:15 +01:00
2011-05-13 01:46:32 +01:00