X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Fanimation%2Fanimation-impl.h;h=760ef02d5a631dedb4474b828c6fdb1d23b21282;hb=adebd834c4f7ec4762f16ca8672d4adba128bfac;hp=92dff74d422047493867303dc46a70cef9709db2;hpb=f69222d4812124d8788917283a41dac859b309cc;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 92dff74..760ef02 100644 --- a/dali/internal/event/animation/animation-impl.h +++ b/dali/internal/event/animation/animation-impl.h @@ -23,9 +23,10 @@ #include #include #include -#include +#include +#include #include -#include +#include namespace Dali { @@ -42,7 +43,9 @@ class UpdateManager; class Actor; class Animation; class AnimationPlaylist; +class AnimatorConnectorBase; class Object; +class Path; typedef IntrusivePtr AnimationPtr; typedef std::vector AnimationContainer; @@ -59,6 +62,13 @@ class Animation : public BaseObject { public: + enum Type + { + TO, ///< Animating TO the given value + BY, ///< Animating BY the given value + BETWEEN ///< Animating BETWEEN key-frames + }; + typedef Dali::Animation::EndAction EndAction; typedef Dali::Animation::Interpolation Interpolation; @@ -75,6 +85,16 @@ public: void SetDuration(float seconds); /** + * @copydoc Dali::DevelAnimation::SetProgressNotification() + */ + void SetProgressNotification( float progress ); + + /** + * @copydoc Dali::DevelAnimation::GetProgressNotification() + */ + float GetProgressNotification(); + + /** * @copydoc Dali::Animation::GetDuration() */ float GetDuration() const; @@ -151,6 +171,11 @@ public: void PlayFrom( float progress ); /** + * @copydoc Dali::Animation::PlayAfter() + */ + void PlayAfter( float delaySeconds ); + + /** * @copydoc Dali::Animation::Pause() */ void Pause(); @@ -183,11 +208,21 @@ public: Dali::Animation::AnimationSignalType& FinishedSignal(); /** + * @copydoc Dali::DevelAnimation::ProgressHasBeenReachedSignal() + */ + Dali::Animation::AnimationSignalType& ProgressReachedSignal(); + + /** * Emit the Finished signal */ void EmitSignalFinish(); /** + * Emit the ProgressReached signal + */ + void EmitSignalProgressReached(); + + /** * Connects a callback function with the object's signals. * @param[in] object The object providing the signal. * @param[in] tracker Used to disconnect the signal. @@ -330,36 +365,46 @@ public: */ void Hide(Actor& actor, float delaySeconds); - /* + /** * @copydoc Dali::Animation::SetCurrentProgress() */ void SetCurrentProgress(float progress); - /* + /** * @copydoc Dali::Animation::GetCurrentProgress() */ float GetCurrentProgress(); - /* + /** * @copydoc Dali::Animation::SetSpeedFactor() */ void SetSpeedFactor( float factor ); - /* + /** * @copydoc Dali::Animation::GetSpeedFactor() */ float GetSpeedFactor() const; - /* + /** * @copydoc Dali::Animation::SetPlayRange() */ void SetPlayRange( const Vector2& range ); - /* - * @copydoc Dali::Animation::GetPlayRange + /** + * @copydoc Dali::Animation::GetPlayRange() */ Vector2 GetPlayRange() const; + /** + * @copydoc Dali::Animation::SetLoopingMode() + */ + void SetLoopingMode( Dali::DevelAnimation::LoopingMode loopingMode ); + + /** + * @copydoc Dali::Animation::GetLoopingMode() + */ + Dali::DevelAnimation::LoopingMode GetLoopingMode(); + public: // For connecting animators to animations /** @@ -445,13 +490,15 @@ private: ConnectorTargetValues() : targetValue(), timePeriod( 0.0f ), - connectorIndex( 0 ) + connectorIndex( 0 ), + animatorType( TO ) { } Property::Value targetValue; TimePeriod timePeriod; unsigned int connectorIndex; + Animation::Type animatorType; }; private: @@ -464,6 +511,16 @@ private: */ static bool CompareConnectorEndTimes( const ConnectorTargetValues& lhs, const ConnectorTargetValues& rhs ); + /** + * Notifies all the objects whose properties are being animated. + */ + void NotifyObjects(); + + /** + * Sends message to SceneGraph with final progress value + */ + void SendFinalProgressNotificationMessage(); + private: const SceneGraph::Animation* mAnimation; @@ -473,6 +530,9 @@ private: Dali::Animation::AnimationSignalType mFinishedSignal; + Dali::Animation::AnimationSignalType mProgressReachedSignal; + + typedef OwnerContainer< AnimatorConnectorBase* > AnimatorConnectorContainer; AnimatorConnectorContainer mConnectors; ///< Owned by the Animation typedef std::vector< ConnectorTargetValues > ConnectorTargetValuesContainer; @@ -489,6 +549,9 @@ private: EndAction mDisconnectAction; AlphaFunction mDefaultAlpha; Dali::Animation::State mState; + float mProgressReachedMarker; + float mDelaySeconds; + bool mAutoReverseEnabled; ///< Flag to identify that the looping mode is auto reverse. }; } // namespace Internal