[dali_1.9.36] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / animated-vector-image / vector-animation-manager.h
index 510c07e..7fbc3ca 100644 (file)
@@ -43,6 +43,10 @@ class VectorAnimationThread;
 class VectorAnimationManager: public Integration::Processor
 {
 public:
+  struct LifecycleObserver
+  {
+    virtual void VectorAnimationManagerDestroyed() = 0;
+  };
 
   /**
    * @brief Constructor.
@@ -55,6 +59,18 @@ public:
   ~VectorAnimationManager() override;
 
   /**
+   * Add a lifecycle observer
+   * @param[in] observer The object watching this one
+   */
+  void AddObserver( LifecycleObserver& observer );
+
+  /**
+   * Remove a lifecycle observer
+   * @param[in] observer The object watching this one
+   */
+  void RemoveObserver( LifecycleObserver& observer );
+
+  /**
    * Get the vector animation thread.
    * @return A raw pointer pointing to the vector animation thread.
    */
@@ -93,6 +109,7 @@ private:
 private:
 
   std::vector< CallbackBase* >             mEventCallbacks;
+  std::vector<LifecycleObserver*>         mLifecycleObservers;
   std::unique_ptr< VectorAnimationThread > mVectorAnimationThread;
   bool                                     mProcessorRegistered;
 };