[dali_2.3.42] Merge branch 'devel/master'
[platform/core/uifw/dali-core.git] / dali / devel-api / animation / animation-devel.cpp
index 0840ae7..83a442a 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.
 // INTERNAL INCLUDES
 #include <dali/devel-api/animation/animation-devel.h>
 #include <dali/internal/event/animation/animation-impl.h>
+#include <dali/internal/event/animation/animation-playlist.h>
+#include <dali/internal/event/common/thread-local-storage.h>
 
 namespace Dali
 {
-
 namespace DevelAnimation
 {
-
-void SetProgressNotification( Animation animation, float progress )
+void SetProgressNotification(Animation animation, float progress)
 {
-  GetImplementation(animation).SetProgressNotification( progress );
+  GetImplementation(animation).SetProgressNotification(progress);
 }
 
-float GetProgressNotification( Animation animation )
+float GetProgressNotification(Animation animation)
 {
   return GetImplementation(animation).GetProgressNotification();
 }
 
-Animation::AnimationSignalType& ProgressReachedSignal( Animation animation )
+Animation::AnimationSignalType& ProgressReachedSignal(Animation animation)
+{
+  return GetImplementation(animation).ProgressReachedSignal();
+}
+
+uint32_t GetAnimationCount()
+{
+  Dali::Internal::ThreadLocalStorage& tls = Dali::Internal::ThreadLocalStorage::Get();
+  return tls.GetAnimationPlaylist().GetAnimationCount();
+}
+
+Animation GetAnimationAt(uint32_t index)
 {
-  return GetImplementation( animation ).ProgressReachedSignal();
+  Dali::Internal::ThreadLocalStorage& tls = Dali::Internal::ThreadLocalStorage::Get();
+  return tls.GetAnimationPlaylist().GetAnimationAt(index);
 }
 
 } // namespace DevelAnimation