X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Fanimation%2Fanimation-impl.h;h=fa281011aa848b473af3f44bd832ec1c21ff40fb;hb=641ea9391fdfc25a6836ffaa86b5c74e2a1f425c;hp=51a2be29a3d683990c84100622c40fcab5d3c34d;hpb=3bcb54791a6777e77f02612a1f7916e83ef1c86f;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 51a2be2..fa28101 100644 --- a/dali/internal/event/animation/animation-impl.h +++ b/dali/internal/event/animation/animation-impl.h @@ -2,7 +2,7 @@ #define __DALI_INTERNAL_ANIMATION_H__ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,7 +43,6 @@ class Actor; class Animation; class AnimationPlaylist; class Object; -class ShaderEffect; typedef IntrusivePtr AnimationPtr; typedef std::vector AnimationContainer; @@ -85,7 +84,22 @@ public: /** * @copydoc Dali::Animation::SetLooping() */ - void SetLooping(bool looping); + void SetLooping(bool on); + + /** + * @copydoc Dali::Animation::SetLoopCount() + */ + void SetLoopCount(int count); + + /** + * @copydoc Dali::Animation::GetLoopCount() + */ + int GetLoopCount(); + + /** + * @copydoc Dali::Animation::GetCurrentLoop() + */ + int GetCurrentLoop(); /** * @copydoc Dali::Animation::IsLooping() @@ -144,6 +158,11 @@ public: void Pause(); /** + * @copydoc Dali::Animation::GetState() + */ + Dali::Animation::State GetState() const; + + /** * @copydoc Dali::Animation::Stop() */ void Stop(); @@ -188,7 +207,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. @@ -311,111 +330,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); @@ -425,96 +339,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() */ @@ -624,6 +448,13 @@ private: Animation& operator=(const Animation& rhs); private: + + struct ConnectorTargetValues + { + unsigned int connectorIndex; + Property::Value targetValue; + }; + EventThreadServices& mEventThreadServices; AnimationPlaylist& mPlaylist; @@ -638,14 +469,18 @@ private: AnimatorConnectorContainer mConnectors; ///< Owned by the Animation + std::vector< ConnectorTargetValues > mConnectorTargetValues; //< Used to store animating property target value information + // Cached for public getters float mDurationSeconds; float mSpeedFactor; - bool mIsLooping; + int mLoopCount; + int mCurrentLoop; Vector2 mPlayRange; EndAction mEndAction; EndAction mDisconnectAction; AlphaFunction mDefaultAlpha; + Dali::Animation::State mState; };