mutter/clutter
Emmanuele Bassi 67113ed690 actor: Implement implicit animatable properties
Clutter is meant to be, and I quote from the README, a toolkit:

  for creating fast, compelling, portable, and dynamic graphical
  user interfaces

and yet the default mode of operation for setting an actor's state on
the scene graph (position, size, opacity, rotation, scaling, depth,
etc.) is *not* dynamic. We assume a static UI, and then animate it.

This is the wrong way to design an API for a toolkit meant to be used to
create animated user interfaces. The default mode of operation should be
to implicitly animate every state transition, and only allow skipping
the animation if the user consciously decides to do so — i.e. the design
tenet of the API should be to make The Right Thing™ by default, and make
it really hard (or even impossible) to do The Wrong Thing™.

So we should identify "animatable" properties, i.e. those properties
that should be implicitly animated by ClutterActor, and use the
animation framework we provide to tween the transitions between the
current state and the desired state; the implicit animation should
happen when setting these properties using the public accessors, and not
through some added functionality. For instance, the following:

  clutter_actor_set_position (actor, newX, newY);

should not make the actor jump to the (newX, newY) point; it should
tween the actor's position between the current point and the desired
point.

Since we have to maintain backward compatibility with existing
applications, we still need to mark the transitions explicitly, but we
can be smart about it, and treat transition states as a stack that can
be pushed and popped, e.g.:

  clutter_actor_save_easing_state (actor);

    clutter_actor_set_easing_duration (actor, 500);
    clutter_actor_set_position (actor, newX, newY);
    clutter_actor_set_opacity (actor, newOpacity);

  clutter_actor_restore_easing_state (actor);

And we can even start stacking animations, e.g.:

  clutter_actor_save_easing_state (actor);

    clutter_actor_set_easing_duration (actor, 500);
    clutter_actor_set_position (actor, newX, newY);

    clutter_actor_save_easing_state (actor);

      clutter_actor_set_easing_duration (actor, 500);
      clutter_actor_set_easing_mode (actor, CLUTTER_LINEAR);
      clutter_actor_set_opacity (actor, newOpacity);
      clutter_actor_set_depth (actor, newDepth);

    clutter_actor_restore_easing_state (actor);

  clutter_actor_restore_easing_state (actor);

And so on, and so forth.

The implementation takes advantage of the newly added Transition API,
which uses only ClutterTimeline sub-classes and ClutterInterval, to cut
down the amount of signal emissions and memory management of object
instances; as well of using the ClutterAnimatable interface for custom
properties and interpolation of values.
2012-03-15 17:01:12 +00:00
..
cally cally/text: Constify string members 2012-03-07 12:59:25 +00:00
cex100 docs: fix some headers paths 2011-11-10 19:05:39 +01:00
cogl Rename cogl_framebuffer_swap_* apis to cogl_onscreen_swap_* 2012-02-21 17:46:11 +00:00
deprecated Fix missing/redundant declarations 2012-03-07 12:36:43 +00:00
egl eglnative: fix building eglnative BE with evdev support 2011-12-08 16:13:37 +00:00
evdev evdev: Adds api to release/reclaim the evdev devices 2012-03-01 11:41:51 +00:00
gdk gdk: add new device types (GDK_SOURCE_TOUCHSCREEN, GDK_SOURCE_TOUCHPAD) 2012-03-12 13:19:34 +01:00
osx osx: Call finishLaunching on post-parse 2012-03-06 15:44:57 +00:00
tslib egl: First attempt at cleaning up the EGL native backend 2011-11-03 13:45:20 +00:00
wayland docs: Updates to the API reference 2012-03-05 23:45:40 +00:00
win32 Rename cogl_framebuffer_swap_* apis to cogl_onscreen_swap_* 2012-02-21 17:46:11 +00:00
x11 x11/device-manager-core: Avoid a signed/unsigned comparison 2012-03-07 12:36:43 +00:00
abicheck.sh build: Make abicheck.sh backend-aware 2012-02-23 17:32:32 +00:00
clutter-action.c
clutter-action.h
clutter-actor-box.c
clutter-actor-meta-private.h
clutter-actor-meta.c clutter-actor-meta: Fix _clutter_meta_group_has_metas_no_internal 2011-10-01 12:40:11 +02:00
clutter-actor-meta.h docs: Documentation fixes 2012-02-23 12:01:11 +00:00
clutter-actor-private.h actor: Implement implicit animatable properties 2012-03-15 17:01:12 +00:00
clutter-actor.c actor: Implement implicit animatable properties 2012-03-15 17:01:12 +00:00
clutter-actor.h actor: Implement implicit animatable properties 2012-03-15 17:01:12 +00:00
clutter-align-constraint.c
clutter-align-constraint.h
clutter-alpha.c docs: "Soft" deprecation of ClutterAlpha 2012-02-23 11:23:15 +00:00
clutter-alpha.h
clutter-animatable.c Fix missing/redundant declarations 2012-03-07 12:36:43 +00:00
clutter-animatable.h Add a deprecated header for ClutterAnimatable 2012-02-27 15:21:32 +00:00
clutter-animation.c Fixed leaking GValue content in clutter_animation_setup_valist(). 2012-03-10 02:11:19 +09:00
clutter-animation.h Add deprecated header for ClutterAnimation 2012-02-27 15:38:11 +00:00
clutter-animator.c
clutter-animator.h
clutter-backend-private.h clutter-backend: Use the Cogl main loop mechanism 2012-02-09 16:34:25 +00:00
clutter-backend.c Fix missing/redundant declarations 2012-03-07 12:36:43 +00:00
clutter-backend.h Loosen the guard around clutter_backend_get_cogl_context 2012-02-21 17:46:11 +00:00
clutter-bezier.c debug: Clean up debugging notes 2011-10-17 10:24:25 +01:00
clutter-bezier.h
clutter-bin-layout.c Fix missing/redundant declarations 2012-03-07 12:36:43 +00:00
clutter-bin-layout.h
clutter-bind-constraint.c ClutterBindConstraint: Add CLUTTER_BIND_ALL coordinate 2012-02-15 17:57:18 +01:00
clutter-bind-constraint.h
clutter-binding-pool.c
clutter-binding-pool.h
clutter-blur-effect.c Pass a CoglContext when calling cogl_pipeline_new 2012-02-21 17:46:11 +00:00
clutter-blur-effect.h
clutter-box-layout.c Fix missing/redundant declarations 2012-03-07 12:36:43 +00:00
clutter-box-layout.h
clutter-brightness-contrast-effect.c Add brightness/contrast effect 2012-03-07 14:02:55 +00:00
clutter-brightness-contrast-effect.h Add brightness/contrast effect 2012-03-07 14:02:55 +00:00
clutter-cairo-texture.c Fix missing/redundant declarations 2012-03-07 12:36:43 +00:00
clutter-cairo-texture.h Add a deprecated header for ClutterCairoTexture 2012-02-27 15:49:58 +00:00
clutter-child-meta.c
clutter-child-meta.h
clutter-click-action.c click-action: Use the new symbolic event propagation macros 2012-01-12 10:27:17 +00:00
clutter-click-action.h
clutter-clone.c Avoid the shadowing of 'clone' 2011-10-19 15:23:55 +01:00
clutter-clone.h Avoid the shadowing of 'clone' 2011-10-19 15:23:55 +01:00
clutter-cogl-compat.h Reduce our internal dependence on the Cogl 1.x api 2012-02-21 17:46:11 +00:00
clutter-color-static.h
clutter-color.c color: Validate hex formats 2011-11-10 14:13:45 +00:00
clutter-color.h
clutter-colorize-effect.c Pass a CoglContext when calling cogl_pipeline_new 2012-02-21 17:46:11 +00:00
clutter-colorize-effect.h
clutter-config.h.in
clutter-config.h.win32 clutter-config.h.win32: Add CLUTTER_INPUT_NULL 2011-11-14 13:33:04 +08:00
clutter-constraint.c Fix missing/redundant declarations 2012-03-07 12:36:43 +00:00
clutter-constraint.h
clutter-container.c docs: Update the Container interface documentation 2012-02-09 15:38:11 +00:00
clutter-container.h Deprecate the old raise/lower API 2012-01-16 23:37:13 +00:00
clutter-debug.h debug: Simple whitespace cleanups 2011-11-18 17:54:19 +00:00
clutter-deform-effect.c Fix missing/redundant declarations 2012-03-07 12:36:43 +00:00
clutter-deform-effect.h
clutter-deprecated.h Move clutter-util.h into the deprecated section 2012-02-27 15:56:12 +00:00
clutter-desaturate-effect.c Pass a CoglContext when calling cogl_pipeline_new 2012-02-21 17:46:11 +00:00
clutter-desaturate-effect.h Appease the gods in introspection 2011-01-20 16:35:26 +00:00
clutter-device-manager-private.h Add an input device function to convert keycodes to evdev codes 2012-03-01 11:41:51 +00:00
clutter-device-manager.c backend: Clean up the device manager creation 2011-11-10 14:55:03 +00:00
clutter-device-manager.h
clutter-drag-action.c drag-action: Use the motion event when passing the drag threshold 2012-02-23 10:51:08 +00:00
clutter-drag-action.h
clutter-drop-action.c clutter-drop-action: annotation fixes for some signals 2012-02-20 13:26:15 +01:00
clutter-drop-action.h
clutter-easing.c Move the easing functions to their own file 2012-02-23 11:23:15 +00:00
clutter-easing.h Move the easing functions to their own file 2012-02-23 11:23:15 +00:00
clutter-effect-private.h
clutter-effect.c
clutter-effect.h
clutter-enum-types.c.in
clutter-enum-types.h.in
clutter-enums.h Improve repaint functions 2012-03-06 12:09:00 +00:00
clutter-event-private.h
clutter-event-translator.c
clutter-event-translator.h
clutter-event.c
clutter-event.h Annotate all functions available since 1.10 2012-02-27 16:35:09 +00:00
clutter-feature.c Fix missing/redundant declarations 2012-03-07 12:36:43 +00:00
clutter-feature.h
clutter-fixed-layout.c fixed-layout: Remove the NO_LAYOUT flag set 2012-01-27 15:45:11 +00:00
clutter-fixed-layout.h
clutter-flatten-effect.c
clutter-flatten-effect.h
clutter-flow-layout.c docs: Refresh the layout managers example image 2012-02-29 15:20:58 +00:00
clutter-flow-layout.h
clutter-gesture-action.c gesture-action: Protect against NULL pointers 2012-01-12 10:49:16 +00:00
clutter-gesture-action.h
clutter-group.h Deprecate ClutterGroup 2012-01-16 23:35:16 +00:00
clutter-id-pool.c
clutter-id-pool.h
clutter-input-device.c input: Add a check on the argument 2012-03-01 15:11:59 +00:00
clutter-input-device.h Add an input device function to convert keycodes to evdev codes 2012-03-01 11:41:51 +00:00
clutter-interval.c interval: Add variadic arguments for initial/final setters 2012-03-15 17:01:12 +00:00
clutter-interval.h interval: Add variadic arguments for initial/final setters 2012-03-15 17:01:12 +00:00
clutter-keysyms-table.c Fix missing/redundant declarations 2012-03-07 12:36:43 +00:00
clutter-keysyms-update.pl Move clutter-keysyms-compat.h to the deprecated section 2011-11-03 14:42:39 +00:00
clutter-keysyms.h Move clutter-keysyms-compat.h to the deprecated section 2011-11-03 14:42:39 +00:00
clutter-layout-manager.c actor: Remove automagic "expand" flag 2012-01-16 23:37:13 +00:00
clutter-layout-manager.h actor: Remove automagic "expand" flag 2012-01-16 23:37:13 +00:00
clutter-layout-meta.c
clutter-layout-meta.h
clutter-list-model.c Fix missing/redundant declarations 2012-03-07 12:36:43 +00:00
clutter-list-model.h
clutter-macros.h Add flexible versioning scheme 2012-02-27 15:21:31 +00:00
clutter-main.c Fix missing/redundant declarations 2012-03-07 12:36:43 +00:00
clutter-main.h Annotate clutter_threads_add_repaint_func_full() 2012-03-06 14:22:43 +00:00
clutter-marshal.list text: Implement ClutterTextBuffer 2012-01-17 14:29:44 +00:00
clutter-master-clock.c clutter-master-clock.c: Set frame_budget conditionally 2012-03-13 23:19:52 +08:00
clutter-master-clock.h master-clock: Clean up the frame processing 2012-03-06 12:55:27 +00:00
clutter-media.c
clutter-media.h
clutter-model-private.h Mark internal symbol as private 2012-02-09 18:40:03 +00:00
clutter-model.c Mark internal symbol as private 2012-02-09 18:40:03 +00:00
clutter-model.h
clutter-offscreen-effect-private.h
clutter-offscreen-effect.c Reduce our internal dependence on the Cogl 1.x api 2012-02-21 17:46:11 +00:00
clutter-offscreen-effect.h Annotate all functions available since 1.10 2012-02-27 16:35:09 +00:00
clutter-page-turn-effect.c
clutter-page-turn-effect.h
clutter-paint-volume-private.h
clutter-paint-volume.c paint-volume: Add a union method for boxes 2012-02-27 11:24:08 +00:00
clutter-path-constraint.c Remove private helper #define's 2011-03-03 11:47:49 +00:00
clutter-path-constraint.h
clutter-path.c Reduce our internal dependence on the Cogl 1.x api 2012-02-21 17:46:11 +00:00
clutter-path.h
clutter-private.h actor: Implement implicit animatable properties 2012-03-15 17:01:12 +00:00
clutter-profile.c debug: Clean up profile/debug symbols 2011-11-18 17:44:42 +00:00
clutter-profile.h Try to avoid duplicate declarations for profile macros 2012-03-07 12:36:42 +00:00
clutter-property-transition.c Add ClutterPropertyTransition 2012-03-15 17:01:12 +00:00
clutter-property-transition.h Add ClutterPropertyTransition 2012-03-15 17:01:12 +00:00
clutter-script-parser.c script: Support translatable strings for properties 2012-03-06 14:23:33 +00:00
clutter-script-private.h script: Support translatable strings for properties 2012-03-06 14:23:33 +00:00
clutter-script.c Fix missing/redundant declarations 2012-03-07 12:36:43 +00:00
clutter-script.h script: Support translatable strings for properties 2012-03-06 14:23:33 +00:00
clutter-scriptable.c
clutter-scriptable.h
clutter-settings-private.h
clutter-settings.c Fix missing/redundant declarations 2012-03-07 12:36:43 +00:00
clutter-settings.h
clutter-shader-effect.c Reduce our internal dependence on the Cogl 1.x api 2012-02-21 17:46:11 +00:00
clutter-shader-effect.h
clutter-shader-types.c
clutter-shader-types.h
clutter-snap-constraint.c snap-constraint: Fix typo that broke the get_edges() method 2012-03-07 12:36:43 +00:00
clutter-snap-constraint.h
clutter-stage-manager-private.h Add copyright notices 2010-10-21 13:13:00 +01:00
clutter-stage-manager.c Fix missing/redundant declarations 2012-03-07 12:36:43 +00:00
clutter-stage-manager.h Add deprecated header for ClutterStageManager 2012-02-27 15:21:32 +00:00
clutter-stage-private.h stage: Add state tracking 2012-01-26 08:30:47 +00:00
clutter-stage-window.c Make clutter-stage-window.h a private header 2012-03-01 15:07:44 +00:00
clutter-stage-window.h Make clutter-stage-window.h a private header 2012-03-01 15:07:44 +00:00
clutter-stage.c stage: Fix up a copy-and-paste train wreck 2012-03-05 17:38:27 +00:00
clutter-stage.h Clean up the included headers 2012-02-23 17:21:57 +00:00
clutter-state.c Fixed clutter_state_remove_key_internal() to propagate the is_inert state 2012-02-06 15:42:23 +00:00
clutter-state.h
clutter-swipe-action.c
clutter-swipe-action.h
clutter-table-layout.c Fix missing/redundant declarations 2012-03-07 12:36:43 +00:00
clutter-table-layout.h
clutter-text-buffer.c text-buffer: Fix the Since annotations 2012-01-17 14:29:45 +00:00
clutter-text-buffer.h Annotate all functions available since 1.10 2012-02-27 16:35:09 +00:00
clutter-text.c text: Use CoglFramebuffer API for the path-based clip 2012-03-09 16:26:53 +00:00
clutter-text.h Annotate all functions available since 1.10 2012-02-27 16:35:09 +00:00
clutter-texture.c Fix missing/redundant declarations 2012-03-07 12:36:43 +00:00
clutter-texture.h Add a deprecated header for ClutterTexture 2012-02-27 15:44:38 +00:00
clutter-timeline.c Fix missing/redundant declarations 2012-03-07 12:36:43 +00:00
clutter-timeline.h Annotate all functions available since 1.10 2012-02-27 16:35:09 +00:00
clutter-transition.c Add ClutterTransition 2012-03-15 17:01:12 +00:00
clutter-transition.h Add ClutterTransition 2012-03-15 17:01:12 +00:00
clutter-types.h types: Declare new Transition classes 2012-03-15 17:01:12 +00:00
clutter-units.c
clutter-units.h
clutter-util.c interval: Add variadic arguments for initial/final setters 2012-03-15 17:01:12 +00:00
clutter-version.h.in Annotate the exported version variables 2012-02-29 15:20:57 +00:00
clutter.h Add ClutterPropertyTransition 2012-03-15 17:01:12 +00:00
clutter.pc.in build: Add infrastructure for inserting Requires.private into pkg-config files 2012-01-11 12:23:46 +00:00
clutter.symbols Add brightness/contrast effect 2012-03-07 14:02:55 +00:00
Makefile.am Add ClutterPropertyTransition 2012-03-15 17:01:12 +00:00