Commit Graph

21 Commits

Author SHA1 Message Date
Neil Roberts
e2dcd7e852 clutter-stage: Use g_array_free instead of g_array_unref
g_array_unref was only added in GLib 2.22 so we should really update
the requirements in the configure script if we want to use that
function. However the array doesn't appear to have any extra reference
taken on it anywhere so it should be safe to use g_array_free instead.
2010-06-18 16:03:07 +01:00
Øyvind Kolås
52d2e7d25d state: add a duration property
Adding a duration property to ClutterState allows the json parsing
to parse the default transition duration with the generic code paths.
2010-06-16 17:45:46 +01:00
Øyvind Kolås
351b6c0543 state: avoid walking off empty list
When removing the last key in a list, the last part of the for statement
could cause dereferencing (NULL)->next and thus segfaulting.
2010-06-16 17:45:13 +01:00
Øyvind Kolås
2cee8b648e state: consistently use clutter_state_get_state where possible
The previous commit reimplemented logic for creating states, this - and
other parts of the code should be using clutter_state_get_state.
2010-06-14 17:29:34 +01:00
Øyvind Kolås
d5c93f6d55 state: make null source state encounterd in json treated as wildcard
To be properly useful the state machine needs to be able to specify the
default transitions to a target state with no specified source state.
2010-06-14 15:49:20 +01:00
Emmanuele Bassi
b2c905ff50 Hide the marshallers
The marshallers we use for the signals are declared in a private header,
and it stands to reason that they should also be hidden in the shared
object by using the common '_' prefix. We are also using some direct
g_cclosure_marshal_* symbol from GLib, instead of consistently use the
clutter_marshal_* symbol.
2010-06-11 16:09:36 +01:00
Emmanuele Bassi
9510cbbad2 state: Minor fixes and documentation additions
Clean up the code a bit, and move common code paths into separate
function. Also, document clutter_state_set() with examples.
2010-05-26 13:43:42 +01:00
Øyvind Kolås
49a4c62319 state: fix clutter_state_change (state, "state-name", FALSE)
Properties were not being updated correctly.
2010-05-24 16:29:04 +01:00
Emmanuele Bassi
173e497ff4 state: Use Interval.compute() instead of compute_value()
Use the newly-added compute() variant to avoid creating a GValue only
for getting it copied by g_object_set_property().
2010-05-24 15:14:09 +01:00
Emmanuele Bassi
489c16c6a6 docs: Align parameter names between header and source code 2010-05-24 14:20:23 +01:00
Emmanuele Bassi
6ca425679e script: Implement State deserialization
It should be possible to describe ClutterState transitions using
ClutterScript in a similar way as ClutterAnimator.
2010-05-21 14:13:14 +01:00
Øyvind Kolås
d156550633 state: added a "target-state" property
When set the ClutterState transitions to the new state.
2010-05-21 10:37:42 +01:00
Øyvind Kolås
9c4467707f state: documented data structures 2010-05-21 10:34:13 +01:00
Emmanuele Bassi
ae3dc9bd5e state: Documentation and introspection annotation fixes 2010-05-20 18:59:22 +01:00
Emmanuele Bassi
c2abb827a3 state: Minor coding style fixes 2010-05-20 18:34:34 +01:00
Emmanuele Bassi
3f36b4a841 state: Constify StateKey accessors
Since the accessors do not modify the StateKey we should constify the
argument.
2010-05-20 17:34:36 +01:00
Emmanuele Bassi
5c74f990d6 Do not include clutter.h from a Clutter header file
Clutter header files should just include the needed headers.
2010-05-20 17:34:02 +01:00
Øyvind Kolås
1dc8c0ff05 state-machine: made clutter_state_change take a boolean animate argument
Most of the time this will be TRUE, pass FALSE to change to the target
state immediately.
2010-05-20 16:24:29 +01:00
Øyvind Kolås
54bd541270 state-machine: use clutter_timeline_get_progress 2010-05-20 16:24:29 +01:00
Øyvind Kolås
8761b279a7 state-machine: add completed signal
Added a completed signal to the animator
2010-05-20 16:24:29 +01:00
Øyvind Kolås
fcdc3a8989 state machine: added state machine 2010-05-20 16:24:29 +01:00