X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Fanimation%2Fanimation-impl.h;h=454b0667163a386e4e358be324c7e62481ef38f0;hb=f73864dc16206017e7c1139e0685c288aa8a81b5;hp=760ef02d5a631dedb4474b828c6fdb1d23b21282;hpb=0a781083e595a2c781b3d6d01dca565f1da0d080;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 760ef02..454b066 100644 --- a/dali/internal/event/animation/animation-impl.h +++ b/dali/internal/event/animation/animation-impl.h @@ -1,8 +1,8 @@ -#ifndef __DALI_INTERNAL_ANIMATION_H__ -#define __DALI_INTERNAL_ANIMATION_H__ +#ifndef DALI_INTERNAL_ANIMATION_H +#define DALI_INTERNAL_ANIMATION_H /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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. @@ -107,17 +107,17 @@ public: /** * @copydoc Dali::Animation::SetLoopCount() */ - void SetLoopCount(int count); + void SetLoopCount(int32_t count); /** * @copydoc Dali::Animation::GetLoopCount() */ - int GetLoopCount(); + int32_t GetLoopCount(); /** * @copydoc Dali::Animation::GetCurrentLoop() */ - int GetCurrentLoop(); + int32_t GetCurrentLoop(); /** * @copydoc Dali::Animation::IsLooping() @@ -283,17 +283,6 @@ public: void AnimateTo(Property& target, Property::Value& destinationValue, AlphaFunction alpha, TimePeriod period); /** - * Animate a property to a destination value. - * @param [in] targetObject The target object to animate. - * @param [in] targetPropertyIndex The index of the target property. - * @param [in] componentIndex Index to a sub component of a property, for use with Vector2, Vector3 and Vector4 - * @param [in] destinationValue The destination value. - * @param [in] alpha The alpha function to apply. - * @param [in] period The effect will occur during this time 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) */ void AnimateBetween(Property target, const KeyFrames& keyFrames); @@ -398,12 +387,12 @@ public: /** * @copydoc Dali::Animation::SetLoopingMode() */ - void SetLoopingMode( Dali::DevelAnimation::LoopingMode loopingMode ); + void SetLoopingMode( Dali::Animation::LoopingMode loopingMode ); /** * @copydoc Dali::Animation::GetLoopingMode() */ - Dali::DevelAnimation::LoopingMode GetLoopingMode(); + Dali::Animation::LoopingMode GetLoopingMode() const; public: // For connecting animators to animations @@ -497,10 +486,17 @@ private: Property::Value targetValue; TimePeriod timePeriod; - unsigned int connectorIndex; + std::size_t connectorIndex; Animation::Type animatorType; }; + enum class Notify + { + USE_CURRENT_VALUE, ///< Set the current value for the property + USE_TARGET_VALUE, ///< Set the animator's target value for the property + FORCE_CURRENT_VALUE, ///< Set the current value for the property even if the end action is to discard + }; + private: /** @@ -513,8 +509,9 @@ private: /** * Notifies all the objects whose properties are being animated. + * @param[in] notifyValueType Whether we should set the current or target value */ - void NotifyObjects(); + void NotifyObjects( Notify notifyValueType ); /** * Sends message to SceneGraph with final progress value @@ -542,9 +539,9 @@ private: float mDurationSeconds; float mSpeedFactor; - int mNotificationCount; ///< Keep track of how many Finished signals have been emitted. - int mLoopCount; - int mCurrentLoop; + int32_t mNotificationCount; ///< Keep track of how many Finished signals have been emitted. + int32_t mLoopCount; + int32_t mCurrentLoop; EndAction mEndAction; EndAction mDisconnectAction; AlphaFunction mDefaultAlpha; @@ -578,4 +575,4 @@ inline const Internal::Animation& GetImplementation(const Dali::Animation& anima } // namespace Dali -#endif // __DALI_INTERNAL_ANIMATION_H__ +#endif // DALI_INTERNAL_ANIMATION_H