mirror of
https://github.com/brl/mutter.git
synced 2024-11-10 07:56:14 -05:00
67113ed690
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. |
||
---|---|---|
.. | ||
cally | ||
cex100 | ||
cogl | ||
deprecated | ||
egl | ||
evdev | ||
gdk | ||
osx | ||
tslib | ||
wayland | ||
win32 | ||
x11 | ||
abicheck.sh | ||
clutter-action.c | ||
clutter-action.h | ||
clutter-actor-box.c | ||
clutter-actor-meta-private.h | ||
clutter-actor-meta.c | ||
clutter-actor-meta.h | ||
clutter-actor-private.h | ||
clutter-actor.c | ||
clutter-actor.h | ||
clutter-align-constraint.c | ||
clutter-align-constraint.h | ||
clutter-alpha.c | ||
clutter-alpha.h | ||
clutter-animatable.c | ||
clutter-animatable.h | ||
clutter-animation.c | ||
clutter-animation.h | ||
clutter-animator.c | ||
clutter-animator.h | ||
clutter-backend-private.h | ||
clutter-backend.c | ||
clutter-backend.h | ||
clutter-bezier.c | ||
clutter-bezier.h | ||
clutter-bin-layout.c | ||
clutter-bin-layout.h | ||
clutter-bind-constraint.c | ||
clutter-bind-constraint.h | ||
clutter-binding-pool.c | ||
clutter-binding-pool.h | ||
clutter-blur-effect.c | ||
clutter-blur-effect.h | ||
clutter-box-layout.c | ||
clutter-box-layout.h | ||
clutter-brightness-contrast-effect.c | ||
clutter-brightness-contrast-effect.h | ||
clutter-cairo-texture.c | ||
clutter-cairo-texture.h | ||
clutter-child-meta.c | ||
clutter-child-meta.h | ||
clutter-click-action.c | ||
clutter-click-action.h | ||
clutter-clone.c | ||
clutter-clone.h | ||
clutter-cogl-compat.h | ||
clutter-color-static.h | ||
clutter-color.c | ||
clutter-color.h | ||
clutter-colorize-effect.c | ||
clutter-colorize-effect.h | ||
clutter-config.h.in | ||
clutter-config.h.win32 | ||
clutter-constraint.c | ||
clutter-constraint.h | ||
clutter-container.c | ||
clutter-container.h | ||
clutter-debug.h | ||
clutter-deform-effect.c | ||
clutter-deform-effect.h | ||
clutter-deprecated.h | ||
clutter-desaturate-effect.c | ||
clutter-desaturate-effect.h | ||
clutter-device-manager-private.h | ||
clutter-device-manager.c | ||
clutter-device-manager.h | ||
clutter-drag-action.c | ||
clutter-drag-action.h | ||
clutter-drop-action.c | ||
clutter-drop-action.h | ||
clutter-easing.c | ||
clutter-easing.h | ||
clutter-effect-private.h | ||
clutter-effect.c | ||
clutter-effect.h | ||
clutter-enum-types.c.in | ||
clutter-enum-types.h.in | ||
clutter-enums.h | ||
clutter-event-private.h | ||
clutter-event-translator.c | ||
clutter-event-translator.h | ||
clutter-event.c | ||
clutter-event.h | ||
clutter-feature.c | ||
clutter-feature.h | ||
clutter-fixed-layout.c | ||
clutter-fixed-layout.h | ||
clutter-flatten-effect.c | ||
clutter-flatten-effect.h | ||
clutter-flow-layout.c | ||
clutter-flow-layout.h | ||
clutter-gesture-action.c | ||
clutter-gesture-action.h | ||
clutter-group.h | ||
clutter-id-pool.c | ||
clutter-id-pool.h | ||
clutter-input-device.c | ||
clutter-input-device.h | ||
clutter-interval.c | ||
clutter-interval.h | ||
clutter-keysyms-table.c | ||
clutter-keysyms-update.pl | ||
clutter-keysyms.h | ||
clutter-layout-manager.c | ||
clutter-layout-manager.h | ||
clutter-layout-meta.c | ||
clutter-layout-meta.h | ||
clutter-list-model.c | ||
clutter-list-model.h | ||
clutter-macros.h | ||
clutter-main.c | ||
clutter-main.h | ||
clutter-marshal.list | ||
clutter-master-clock.c | ||
clutter-master-clock.h | ||
clutter-media.c | ||
clutter-media.h | ||
clutter-model-private.h | ||
clutter-model.c | ||
clutter-model.h | ||
clutter-offscreen-effect-private.h | ||
clutter-offscreen-effect.c | ||
clutter-offscreen-effect.h | ||
clutter-page-turn-effect.c | ||
clutter-page-turn-effect.h | ||
clutter-paint-volume-private.h | ||
clutter-paint-volume.c | ||
clutter-path-constraint.c | ||
clutter-path-constraint.h | ||
clutter-path.c | ||
clutter-path.h | ||
clutter-private.h | ||
clutter-profile.c | ||
clutter-profile.h | ||
clutter-property-transition.c | ||
clutter-property-transition.h | ||
clutter-script-parser.c | ||
clutter-script-private.h | ||
clutter-script.c | ||
clutter-script.h | ||
clutter-scriptable.c | ||
clutter-scriptable.h | ||
clutter-settings-private.h | ||
clutter-settings.c | ||
clutter-settings.h | ||
clutter-shader-effect.c | ||
clutter-shader-effect.h | ||
clutter-shader-types.c | ||
clutter-shader-types.h | ||
clutter-snap-constraint.c | ||
clutter-snap-constraint.h | ||
clutter-stage-manager-private.h | ||
clutter-stage-manager.c | ||
clutter-stage-manager.h | ||
clutter-stage-private.h | ||
clutter-stage-window.c | ||
clutter-stage-window.h | ||
clutter-stage.c | ||
clutter-stage.h | ||
clutter-state.c | ||
clutter-state.h | ||
clutter-swipe-action.c | ||
clutter-swipe-action.h | ||
clutter-table-layout.c | ||
clutter-table-layout.h | ||
clutter-text-buffer.c | ||
clutter-text-buffer.h | ||
clutter-text.c | ||
clutter-text.h | ||
clutter-texture.c | ||
clutter-texture.h | ||
clutter-timeline.c | ||
clutter-timeline.h | ||
clutter-transition.c | ||
clutter-transition.h | ||
clutter-types.h | ||
clutter-units.c | ||
clutter-units.h | ||
clutter-util.c | ||
clutter-version.h.in | ||
clutter.h | ||
clutter.pc.in | ||
clutter.symbols | ||
Makefile.am |