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 docs: Description fixes for Action and Constraint 2010-05-26 14:09:24 +01:00
clutter-action.h ClutterActor: Add clutter_actor_has_actions 2011-09-29 19:34:32 +02:00
clutter-actor-box.c Merge branch 'private-cleanup' 2010-10-25 23:44:53 +01:00
clutter-actor-meta-private.h ClutterActor: Add clutter_actor_has_effects 2011-09-29 19:34:24 +02:00
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 align-constraint: Add CLUTTER_ALIGN_BOTH 2011-10-15 18:36:27 +01:00
clutter-align-constraint.h Move all enumerations to a separate file 2011-10-11 17:59:46 +01:00
clutter-alpha.c docs: "Soft" deprecation of ClutterAlpha 2012-02-23 11:23:15 +00:00
clutter-alpha.h Fix duplicate typedef of ClutterAlpha 2011-10-11 23:02:17 +01:00
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 script: Hide private symbols 2011-09-07 16:14:10 +01:00
clutter-animator.h Move all enumerations to a separate file 2011-10-11 17:59:46 +01:00
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 Move all enumerations to a separate file 2011-10-11 17:59:46 +01:00
clutter-bind-constraint.c ClutterBindConstraint: Add CLUTTER_BIND_ALL coordinate 2012-02-15 17:57:18 +01:00
clutter-bind-constraint.h Move all enumerations to a separate file 2011-10-11 17:59:46 +01:00
clutter-binding-pool.c Eliminate G_CONST_RETURN 2011-06-07 16:06:24 +01:00
clutter-binding-pool.h Eliminate G_CONST_RETURN 2011-06-07 16:06:24 +01:00
clutter-blur-effect.c Pass a CoglContext when calling cogl_pipeline_new 2012-02-21 17:46:11 +00:00
clutter-blur-effect.h Appease the gods in introspection 2011-01-20 16:35:26 +00:00
clutter-box-layout.c Fix missing/redundant declarations 2012-03-07 12:36:43 +00:00
clutter-box-layout.h Move all enumerations to a separate file 2011-10-11 17:59:46 +01:00
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 Remove private helper #define's 2011-03-03 11:47:49 +00:00
clutter-child-meta.h docs: Fixes for cross-references 2011-09-12 13:12:14 +01:00
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 Move all enumerations to a separate file 2011-10-11 17:59:46 +01:00
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 static-colors: Simplify the defines 2011-09-05 17:22:14 +01:00
clutter-color.c color: Validate hex formats 2011-11-10 14:13:45 +00:00
clutter-color.h Move all enumerations to a separate file 2011-10-11 17:59:46 +01:00
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-color-size-effect: Fix a minor typo in the docs 2011-02-16 14:11:59 +00:00
clutter-config.h.in build: Generate an instealled config header 2011-01-19 14:33:27 +00:00
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 ClutterActor: Add clutter_actor_has_contraints 2011-09-29 19:34:31 +02:00
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 build: Re-arrange headers 2010-11-18 18:23:49 +00:00
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 event/x11: Rework the way we translate X11 events 2011-01-21 10:25:43 +00:00
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 Move all enumerations to a separate file 2011-10-11 17:59:46 +01:00
clutter-drop-action.c clutter-drop-action: annotation fixes for some signals 2012-02-20 13:26:15 +01:00
clutter-drop-action.h docs: Document ClutterDropAction 2011-06-20 15:25:54 +01:00
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 effect: Rename RunFlags to PaintFlags 2011-06-13 16:00:45 +01:00
clutter-effect.c docs: Fixes for cross-references 2011-09-12 13:12:14 +01:00
clutter-effect.h Move all enumerations to a separate file 2011-10-11 17:59:46 +01:00
clutter-enum-types.c.in Use g_once when registering enumeration types 2009-05-29 12:40:23 +01:00
clutter-enum-types.h.in
clutter-enums.h Improve repaint functions 2012-03-06 12:09:00 +00:00
clutter-event-private.h event: Add setters for ClutterEvent members 2011-02-28 14:16:23 +00:00
clutter-event-translator.c event/x11: Rework the way we translate X11 events 2011-01-21 10:25:43 +00:00
clutter-event-translator.h event/x11: Rework the way we translate X11 events 2011-01-21 10:25:43 +00:00
clutter-event.c Eliminate G_CONST_RETURN 2011-06-07 16:06:24 +01:00
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 Move all enumerations to a separate file 2011-10-11 17:59:46 +01:00
clutter-fixed-layout.c fixed-layout: Remove the NO_LAYOUT flag set 2012-01-27 15:45:11 +00:00
clutter-fixed-layout.h [layout, docs] Document FixedLayout 2009-10-14 11:31:29 +01:00
clutter-flatten-effect.c clutter-actor: Add a 'has_overlaps' virtual 2011-05-13 01:46:32 +01:00
clutter-flatten-effect.h clutter-actor: Add a 'has_overlaps' virtual 2011-05-13 01:46:32 +01:00
clutter-flow-layout.c docs: Refresh the layout managers example image 2012-02-29 15:20:58 +00:00
clutter-flow-layout.h Move all enumerations to a separate file 2011-10-11 17:59:46 +01:00
clutter-gesture-action.c gesture-action: Protect against NULL pointers 2012-01-12 10:49:16 +00:00
clutter-gesture-action.h docs: Fix Clutter API reference 2011-06-13 15:36:07 +01:00
clutter-group.h Deprecate ClutterGroup 2012-01-16 23:35:16 +00:00
clutter-id-pool.c clutter-id-pool: fix warning on bad pick 2011-05-26 08:48:13 -04:00
clutter-id-pool.h Privatize all ClutterIdPool functions 2011-02-18 15:53:27 +00:00
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 Conditionally use g_object_notify_by_pspec 2010-08-10 17:12:06 +01:00
clutter-layout-meta.h layout: Add padding to LayoutMeta 2009-12-02 11:36:25 +00:00
clutter-list-model.c Fix missing/redundant declarations 2012-03-07 12:36:43 +00:00
clutter-list-model.h [list-model] Make ClutterListModel subclassable 2009-02-14 11:31:00 +00:00
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: mention the asynchronous behavior of set_playing() in the doc. 2011-07-04 15:58:08 +01:00
clutter-media.h Miscellaneous documentation fixes 2010-05-19 16:10:05 +01:00
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 Eliminate G_CONST_RETURN 2011-06-07 16:06:24 +01:00
clutter-offscreen-effect-private.h offscreen-effect: Add public accessor for target size 2011-02-28 14:34:36 +00:00
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 Remove private helper #define's 2011-03-03 11:47:49 +00:00
clutter-page-turn-effect.h Appease the gods in introspection 2011-01-20 16:35:26 +00:00
clutter-paint-volume-private.h Optimize culling by doing culling in eye-coordinates 2011-03-07 13:26:20 +00:00
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 Appease the gods in introspection 2011-01-20 16:35:26 +00:00
clutter-path.c Reduce our internal dependence on the Cogl 1.x api 2012-02-21 17:46:11 +00:00
clutter-path.h Move all enumerations to a separate file 2011-10-11 17:59:46 +01:00
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 Eliminate G_CONST_RETURN 2011-06-07 16:06:24 +01:00
clutter-scriptable.h Eliminate G_CONST_RETURN 2011-06-07 16:06:24 +01:00
clutter-settings-private.h Add more sections to the Clutter configuration file 2011-10-11 17:52:17 +01:00
clutter-settings.c Fix missing/redundant declarations 2012-03-07 12:36:43 +00:00
clutter-settings.h Appease the gods in introspection 2011-01-20 16:35:26 +00:00
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-effect: Add a get_static_shader_source virtual 2011-09-30 11:51:37 +01:00
clutter-shader-types.c Eliminate G_CONST_RETURN 2011-06-07 16:06:24 +01:00
clutter-shader-types.h Eliminate G_CONST_RETURN 2011-06-07 16:06:24 +01:00
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 Move all enumerations to a separate file 2011-10-11 17:59:46 +01:00
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 Move more typedefs into clutter-types.h 2011-10-11 17:59:50 +01:00
clutter-swipe-action.c swipe-action: Remove the required devices call 2011-06-10 15:15:15 +01:00
clutter-swipe-action.h Move all enumerations to a separate file 2011-10-11 17:59:46 +01:00
clutter-table-layout.c Fix missing/redundant declarations 2012-03-07 12:36:43 +00:00
clutter-table-layout.h Move all enumerations to a separate file 2011-10-11 17:59:46 +01:00
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 Eliminate G_CONST_RETURN 2011-06-07 16:06:24 +01:00
clutter-units.h Move all enumerations to a separate file 2011-10-11 17:59:46 +01:00
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