Return Animation information
[platform/core/uifw/dali-core.git] / dali / devel-api / animation / animation-devel.cpp
index 79ebbb3..4fba68b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -18,6 +18,8 @@
 // INTERNAL INCLUDES
 #include <dali/devel-api/animation/animation-devel.h>
 #include <dali/internal/event/animation/animation-impl.h>
+#include <dali/internal/event/common/thread-local-storage.h>
+#include <dali/internal/event/animation/animation-playlist.h>
 
 namespace Dali
 {
@@ -40,19 +42,16 @@ Animation::AnimationSignalType& ProgressReachedSignal( Animation animation )
   return GetImplementation( animation ).ProgressReachedSignal();
 }
 
-void PlayAfter( Animation animation, float delaySeconds )
+uint32_t GetAnimationCount()
 {
-  GetImplementation( animation ).PlayAfter( delaySeconds );
+  Dali::Internal::ThreadLocalStorage& tls = Dali::Internal::ThreadLocalStorage::Get();
+  return tls.GetAnimationPlaylist().GetAnimationCount();
 }
 
-void SetLoopingMode( Animation animation, LoopingMode loopingMode )
+Animation GetAnimationAt( uint32_t index )
 {
-  GetImplementation( animation ).SetLoopingMode( loopingMode );
-}
-
-LoopingMode GetLoopingMode( Animation animation )
-{
-  return GetImplementation(animation).GetLoopingMode();
+  Dali::Internal::ThreadLocalStorage& tls = Dali::Internal::ThreadLocalStorage::Get();
+  return tls.GetAnimationPlaylist().GetAnimationAt( index );
 }
 
 } // namespace DevelAnimation