#define DALI_TOOLKIT_INTERNAL_VECTOR_ANIMATION_MANAGER_H
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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.
*/
// EXTERNAL INCLUDES
+#include <dali/integration-api/ordered-set.h>
#include <dali/integration-api/processor-interface.h>
#include <dali/public-api/common/vector-wrapper.h>
#include <dali/public-api/signals/callback.h>
class VectorAnimationManager : public Integration::Processor
{
public:
- struct LifecycleObserver
- {
- virtual void VectorAnimationManagerDestroyed() = 0;
- };
-
/**
* @brief Constructor.
*/
~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.
*/
*/
void Process(bool postProcessor) override;
+ /**
+ * @copydoc Dali::Integration::Processor::GetProcessorName()
+ */
+ std::string_view GetProcessorName() const override
+ {
+ return "VectorAnimationManager";
+ }
+
private:
// Undefined
VectorAnimationManager(const VectorAnimationManager& manager) = delete;
VectorAnimationManager& operator=(const VectorAnimationManager& manager) = delete;
private:
- std::vector<CallbackBase*> mEventCallbacks;
- std::vector<LifecycleObserver*> mLifecycleObservers;
+ Dali::Integration::OrderedSet<CallbackBase> mEventCallbacks; ///< Event triggered callback lists (owned)
+
std::unique_ptr<VectorAnimationThread> mVectorAnimationThread;
- bool mProcessorRegistered;
+ bool mProcessorRegistered : 1;
};
} // namespace Internal