X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Fanimation%2Fanimation-impl.h;h=6272042910b161dd841907e965e18d55fec3c54d;hb=b1ce4d4fcd7c85330c5fe99465c78bb8b9c42244;hp=7d10295bf4991d3a2bc52ec09a5b770a19471208;hpb=21323ae7927921f044c123a0c5d459e17588396e;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/event/animation/animation-impl.h b/dali/internal/event/animation/animation-impl.h index 7d10295..6272042 100644 --- a/dali/internal/event/animation/animation-impl.h +++ b/dali/internal/event/animation/animation-impl.h @@ -42,7 +42,7 @@ class UpdateManager; class Actor; class Animation; class AnimationPlaylist; -class ProxyObject; +class Object; class ShaderEffect; typedef IntrusivePtr AnimationPtr; @@ -61,6 +61,7 @@ class Animation : public BaseObject public: typedef Dali::Animation::EndAction EndAction; + typedef Dali::Animation::Interpolation Interpolation; typedef void (*FinishedCallback)(Object* object); @@ -162,7 +163,7 @@ public: /** * @copydoc Dali::Animation::FinishedSignal() */ - Dali::Animation::AnimationSignalV2& FinishedSignal(); + Dali::Animation::AnimationSignalType& FinishedSignal(); /** * Emit the Finished signal @@ -187,7 +188,7 @@ public: * @param[in] attributes The attributes with which to perfrom this action. * @return true if action was done */ - static bool DoAction(BaseObject* object, const std::string& actionName, const std::vector& attributes); + static bool DoAction(BaseObject* object, const std::string& actionName, const Property::Map& attributes); /** * This callback is intended for internal use only, to avoid the overhead of using a signal. @@ -245,7 +246,7 @@ public: * @param [in] alpha The alpha function to apply. * @param [in] period The effect will occur during this time period. */ - void AnimateTo(ProxyObject& targetObject, Property::Index targetPropertyIndex, int componentIndex, Property::Value& destinationValue, AlphaFunction alpha, TimePeriod period); + void AnimateTo(Object& targetObject, Property::Index targetPropertyIndex, int componentIndex, Property::Value& destinationValue, AlphaFunction alpha, TimePeriod period); /** * @copydoc Dali::Animation::AnimateBetween(Property target, KeyFrames& keyFrames) @@ -253,20 +254,40 @@ public: void AnimateBetween(Property target, const KeyFrames& keyFrames); /** + * @copydoc Dali::Animation::AnimateBetween(Property target, KeyFrames& keyFrames, Interpolation interpolation) + */ + void AnimateBetween(Property target, const KeyFrames& keyFrames, Interpolation interpolation ); + + /** * @copydoc Dali::Animation::AnimateBetween(Property target, KeyFrames& keyFrames, TimePeriod period) */ void AnimateBetween(Property target, const KeyFrames& keyFrames, TimePeriod period); /** + * @copydoc Dali::Animation::AnimateBetween(Property target, KeyFrames& keyFrames, TimePeriod period, Interpolation interpolation) + */ + void AnimateBetween(Property target, const KeyFrames& keyFrames, TimePeriod period, Interpolation interpolation); + + /** * @copydoc Dali::Animation::AnimateBetween(Property target, KeyFrames& keyFrames, AlphaFunction alpha) */ void AnimateBetween(Property target, const KeyFrames& keyFrames, AlphaFunction alpha); /** + * @copydoc Dali::Animation::AnimateBetween(Property target, KeyFrames& keyFrames, AlphaFunction alpha, Interpolation interpolation) + */ + void AnimateBetween(Property target, const KeyFrames& keyFrames, AlphaFunction alpha, Interpolation interpolation); + + /** * @copydoc Dali::Animation::AnimateBetween(Property target, KeyFrames& keyFrames, AlphaFunction alpha, TimePeriod period) */ void AnimateBetween(Property target, const KeyFrames& keyFrames, AlphaFunction alpha, TimePeriod period); + /** + * @copydoc Dali::Animation::AnimateBetween(Property target, KeyFrames& keyFrames, AlphaFunction alpha, TimePeriod period, Interpolation interpolation ) + */ + void AnimateBetween(Property target, const KeyFrames& keyFrames, AlphaFunction alpha, TimePeriod period, Interpolation interpolation ); + // Actor-specific convenience functions /** @@ -290,111 +311,6 @@ public: void Animate( Actor& actor, const Path& path, const Vector3& forward, AlphaFunction alpha, TimePeriod period); /** - * @copydoc Dali::Animation::MoveBy(Actor actor, float x, float y, float z) - */ - void MoveBy(Actor& actor, float x, float y, float z); - - /** - * @copydoc Dali::Animation::MoveBy(Actor actor, Vector3 displacement, AlphaFunction alpha) - */ - void MoveBy(Actor& actor, const Vector3& translation, AlphaFunction alpha); - - /** - * @copydoc Dali::Animation::MoveBy(Actor actor, Vector3 displacement, AlphaFunction alpha, float delaySeconds, float durationSeconds) - */ - void MoveBy(Actor& actor, const Vector3& translation, AlphaFunction alpha, float delaySeconds, float durationSeconds); - - /** - * @copydoc Dali::Animation::MoveTo(Actor actor, float x, float y, float z) - */ - void MoveTo(Actor& actor, float x, float y, float z); - - /** - * @copydoc Dali::Animation::MoveTo(Actor actor, Vector3 position, AlphaFunction alpha) - */ - void MoveTo(Actor& actor, const Vector3& translation, AlphaFunction alpha); - - /** - * @copydoc Dali::Animation::MoveTo(Actor actor, Vector3 position, AlphaFunction alpha, float delaySeconds, float durationSeconds) - */ - void MoveTo(Actor& actor, const Vector3& translation, AlphaFunction alpha, float delaySeconds, float durationSeconds); - - /** - * @copydoc Dali::Animation::RotateBy(Actor actor, Radian angle, Vector3 axis) - */ - void RotateBy(Actor& actor, Radian angle, const Vector3& axis); - - /** - * @copydoc Dali::Animation::RotateBy(Actor actor, Radian angle, Vector3 axis, AlphaFunction alpha)() - */ - void RotateBy(Actor& actor, Radian angle, const Vector3& axis, AlphaFunction alpha); - - /** - * @copydoc Dali::Animation::RotateBy(Actor actor, Radian angle, Vector3 axis, AlphaFunction alpha, float delaySeconds, float durationSeconds) - */ - void RotateBy(Actor& actor, Radian angle, const Vector3& axis, AlphaFunction alpha, float delaySeconds, float durationSeconds); - - /** - * @copydoc Dali::Animation::RotateTo(Actor actor, Radian angle, Vector3 axis) - */ - void RotateTo(Actor& actor, Radian angle, const Vector3& axis); - - /** - * @copydoc Dali::Animation::RotateTo(Actor actor, Quaternion orientation) - */ - void RotateTo(Actor& actor, const Quaternion& orientation); - - /** - * @copydoc Dali::Animation::RotateTo(Actor actor, Radian angle, Vector3 axis, AlphaFunction alpha) - */ - void RotateTo(Actor& actor, Radian angle, const Vector3& axis, AlphaFunction alpha); - - /** - * @copydoc Dali::Animation::RotateTo(Actor actor, Quaternion orientation, AlphaFunction alpha) - */ - void RotateTo(Actor& actor, const Quaternion& orientation, AlphaFunction alpha); - - /** - * @copydoc Dali::Animation::RotateTo(Actor actor, Quaternion orientation, AlphaFunction alpha, float delaySeconds, float durationSeconds) - */ - void RotateTo(Actor& actor, const Quaternion& orientation, AlphaFunction alpha, float delaySeconds, float durationSeconds); - - /** - * @copydoc Dali::Animation::RotateTo(Actor actor, Radian angle, Vector3 axis, AlphaFunction alpha, float delaySeconds, float durationSeconds)() - */ - void RotateTo(Actor& actor, Radian angle, const Vector3& axis, AlphaFunction alpha, float delaySeconds, float durationSeconds); - - /** - * @copydoc Dali::Animation::ScaleBy(Actor actor, float x, float y, float z)() - */ - void ScaleBy(Actor& actor, float x, float y, float z); - - /** - * @copydoc Dali::Animation::ScaleBy(Actor actor, Vector3 scale, AlphaFunction alpha) - */ - void ScaleBy(Actor& actor, const Vector3& scale, AlphaFunction alpha); - - /** - * @copydoc Dali::Animation::ScaleBy(Actor actor, Vector3 scale, AlphaFunction alpha, float delaySeconds, float durationSeconds) - */ - void ScaleBy(Actor& actor, const Vector3& scale, AlphaFunction alpha, float delaySeconds, float durationSeconds); - - /** - * @copydoc Dali::Animation::ScaleTo(Actor actor, float x, float y, float z) - */ - void ScaleTo(Actor& actor, float x, float y, float z); - - /** - * @copydoc Dali::Animation::ScaleTo(Actor actor, Vector3 scale, AlphaFunction alpha) - */ - void ScaleTo(Actor& actor, const Vector3& scale, AlphaFunction alpha); - - /** - * @copydoc Dali::Animation::ScaleTo(Actor actor, Vector3 scale, AlphaFunction alpha, float delaySeconds, float durationSeconds) - */ - void ScaleTo(Actor& actor, const Vector3& scale, AlphaFunction alpha, float delaySeconds, float durationSeconds); - - /** * @copydoc Dali::Animation::Show() */ void Show(Actor& actor, float delaySeconds); @@ -404,96 +320,6 @@ public: */ void Hide(Actor& actor, float delaySeconds); - /** - * @copydoc Dali::Animation::OpacityBy(Actor actor, float opacity) - */ - void OpacityBy(Actor& actor, float opacity); - - /** - * @copydoc Dali::Animation::OpacityBy(Actor actor, float opacity, AlphaFunction alpha) - */ - void OpacityBy(Actor& actor, float opacity, AlphaFunction alpha); - - /** - * @copydoc Dali::Animation::OpacityBy(Actor actor, float opacity, AlphaFunction alpha, float delaySeconds, float durationSeconds)() - */ - void OpacityBy(Actor& actor, float opacity, AlphaFunction alpha, float delaySeconds, float durationSeconds); - - /** - * @copydoc Dali::Animation::OpacityTo(Actor actor, float opacity) - */ - void OpacityTo(Actor& actor, float opacity); - - /** - * @copydoc Dali::Animation::OpacityTo(Actor actor, float opacity, AlphaFunction alpha) - */ - void OpacityTo(Actor& actor, float opacity, AlphaFunction alpha); - - /** - * @copydoc Dali::Animation::OpacityTo(Actor actor, float opacity, AlphaFunction alpha, float delaySeconds, float durationSeconds) - */ - void OpacityTo(Actor& actor, float opacity, AlphaFunction alpha, float delaySeconds, float durationSeconds); - - /** - * @copydoc Dali::Animation::ColorBy(Actor actor, Vector4 color) - */ - void ColorBy(Actor& actor, const Vector4& color); - - /** - * @copydoc Dali::Animation::ColorBy(Actor actor, Vector4 color, AlphaFunction alpha) - */ - void ColorBy(Actor& actor, const Vector4& color, AlphaFunction alpha); - - /** - * @copydoc Dali::Animation::ColorBy(Actor actor, Vector4 color, AlphaFunction alpha, float delaySeconds, float durationSeconds) - */ - void ColorBy(Actor& actor, const Vector4& color, AlphaFunction alpha, float delaySeconds, float durationSeconds); - - /** - * @copydoc Dali::Animation::ColorTo(Actor actor, Vector4 color) - */ - void ColorTo(Actor& actor, const Vector4& color); - - /** - * @copydoc Dali::Animation::ColorTo(Actor actor, Vector4 color, AlphaFunction alpha) - */ - void ColorTo(Actor& actor, const Vector4& color, AlphaFunction alpha); - - /** - * @copydoc Dali::Animation::ColorTo(Actor actor, Vector4 color, AlphaFunction alpha, float delaySeconds, float durationSeconds) - */ - void ColorTo(Actor& actor, const Vector4& color, AlphaFunction alpha, float delaySeconds, float durationSeconds); - - /** - * @copydoc Dali::Animation::Resize(Actor actor, float width, float height) - */ - void Resize(Actor& actor, float width, float height); - - /** - * @copydoc Dali::Animation::Resize(Actor actor, float width, float height, AlphaFunction alpha) - */ - void Resize(Actor& actor, float width, float height, AlphaFunction alpha); - - /** - * @copydoc Dali::Animation::Resize(Actor actor, float width, float height, AlphaFunction alpha, float delaySeconds, float durationSeconds) - */ - void Resize(Actor& actor, float width, float height, AlphaFunction alpha, float delaySeconds, float durationSeconds); - - /** - * @copydoc Dali::Animation::Resize(Actor actor, Vector3 size) - */ - void Resize(Actor& actor, const Vector3& size); - - /** - * @copydoc Dali::Animation::Resize(Actor actor, Vector3 size, AlphaFunction alpha) - */ - void Resize(Actor& actor, const Vector3& size, AlphaFunction alpha); - - /** - * @copydoc Dali::Animation::Resize(Actor actor, Vector3 size, AlphaFunction alpha, float delaySeconds, float durationSeconds) - */ - void Resize(Actor& actor, const Vector3& size, AlphaFunction alpha, float delaySeconds, float durationSeconds); - /* * @copydoc Dali::Animation::SetCurrentProgress() */ @@ -542,26 +368,26 @@ public: // For connecting animators to animations } /** - * Retrieve the UpdateManager associated with this animation. - * @return The UpdateManager. + * Retrieve the event thread services object + * @return The interface for sending messages to the scene graph */ - SceneGraph::UpdateManager& GetUpdateManager() + EventThreadServices& GetEventThreadServices() { - return mUpdateManager; + return mEventThreadServices; } protected: /** * Construct a new Animation. - * @param[in] updateManager The UpdateManager associated with this animation. + * @param[in] eventThreadServices The interface for sending messages to the scene graph * @param[in] playlist The list of currently playing animations. * @param[in] durationSeconds The duration of the animation in seconds. * @param[in] endAction The action to perform when the animation ends. * @param[in] disconnectAction The action to perform when the property owner of an animator is disconnected. * @param[in] defaultAlpha The default alpha function to apply to animators. */ - Animation( SceneGraph::UpdateManager& updateManager, + Animation( EventThreadServices& eventThreadServices, AnimationPlaylist& playlist, float durationSeconds, EndAction endAction, @@ -603,15 +429,14 @@ private: Animation& operator=(const Animation& rhs); private: - - SceneGraph::UpdateManager& mUpdateManager; + EventThreadServices& mEventThreadServices; AnimationPlaylist& mPlaylist; const SceneGraph::Animation* mAnimation; int mNotificationCount; ///< Keep track of how many Finished signals have been emitted. - Dali::Animation::AnimationSignalV2 mFinishedSignal; + Dali::Animation::AnimationSignalType mFinishedSignal; FinishedCallback mFinishedCallback; Object* mFinishedCallbackObject;