#define DALI_EXTENSION_INTERNAL_RIVE_ANIMATION_RENDERER_MANAGER_H
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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/public-api/common/vector-wrapper.h>
-#include <dali/devel-api/threading/mutex.h>
#include <dali/devel-api/adaptor-framework/event-thread-callback.h>
+#include <dali/devel-api/threading/mutex.h>
#include <dali/integration-api/processor-interface.h>
+#include <dali/public-api/common/vector-wrapper.h>
#include <memory>
// INTERNAL INCLUDES
{
namespace Internal
{
-
/**
* @brief Rive animation renderer manager
*/
class RiveAnimationRendererManager : public Integration::Processor
{
public:
-
/**
* @brief Create or retrieve RiveAnimationRendererManager singleton.
*
void TriggerEvent(RiveAnimationRendererEventHandler& handler);
protected: // Implementation of Processor
-
/**
* @copydoc Dali::Integration::Processor::Process()
*/
void Process(bool postProcessor) override;
-private:
+ /**
+ * @copydoc Dali::Integration::Processor::GetProcessorName()
+ */
+ std::string_view GetProcessorName() const override
+ {
+ return "RiveAnimationRendererManager";
+ }
+private:
/**
* @brief Event callback to process events.
*/
void OnEventTriggered();
private:
-
/**
* @brief Constructor.
*/
RiveAnimationRendererManager& operator=(const RiveAnimationRendererManager&) = delete;
private:
-
std::vector<RiveAnimationRendererEventHandler*> mEventHandlers;
std::vector<RiveAnimationRendererEventHandler*> mTriggeredHandlers;
Dali::Mutex mMutex;
*/
// EXTERNAL INCLUDES
-#include <dali/public-api/common/vector-wrapper.h>
-#include <dali/devel-api/threading/mutex.h>
#include <dali/devel-api/adaptor-framework/event-thread-callback.h>
+#include <dali/devel-api/threading/mutex.h>
#include <dali/integration-api/processor-interface.h>
+#include <dali/public-api/common/vector-wrapper.h>
#include <memory>
// INTERNAL INCLUDES
namespace Dali
{
-
namespace Plugin
{
-
/**
* @brief Tizen vector animation manager
*/
class VectorAnimationPluginManager : public Integration::Processor
{
public:
-
/**
* @brief Create or retrieve VectorAnimationPluginManager singleton.
*
*
* @param handler The event handler to add.
*/
- void AddEventHandler( VectorAnimationEventHandler& handler );
+ void AddEventHandler(VectorAnimationEventHandler& handler);
/**
* @brief Remove the event handler.
*
* @param handler The event handler to remove.
*/
- void RemoveEventHandler( VectorAnimationEventHandler& handler );
+ void RemoveEventHandler(VectorAnimationEventHandler& handler);
/**
* @brief Trigger the event.
*/
- void TriggerEvent( VectorAnimationEventHandler& handler );
+ void TriggerEvent(VectorAnimationEventHandler& handler);
protected: // Implementation of Processor
-
/**
* @copydoc Dali::Integration::Processor::Process()
*/
void Process(bool postProcessor) override;
-private:
+ /**
+ * @copydoc Dali::Integration::Processor::GetProcessorName()
+ */
+ std::string_view GetProcessorName() const override
+ {
+ return "VectorAnimationPluginManager";
+ }
+private:
/**
* @brief Event callback to process events.
*/
void OnEventTriggered();
private:
-
/**
* @brief Constructor.
*/
virtual ~VectorAnimationPluginManager();
// Undefined
- VectorAnimationPluginManager( const VectorAnimationPluginManager& ) = delete;
+ VectorAnimationPluginManager(const VectorAnimationPluginManager&) = delete;
// Undefined
- VectorAnimationPluginManager& operator=( const VectorAnimationPluginManager& ) = delete;
+ VectorAnimationPluginManager& operator=(const VectorAnimationPluginManager&) = delete;
private:
-
- std::vector< VectorAnimationEventHandler* > mEventHandlers;
- std::vector< VectorAnimationEventHandler* > mTriggeredHandlers;
- Dali::Mutex mMutex;
- std::unique_ptr< EventThreadCallback > mEventTrigger;
+ std::vector<VectorAnimationEventHandler*> mEventHandlers;
+ std::vector<VectorAnimationEventHandler*> mTriggeredHandlers;
+ Dali::Mutex mMutex;
+ std::unique_ptr<EventThreadCallback> mEventTrigger;
};
} // namespace Plugin
-} // namespace Dali;
+} // namespace Dali
#endif // DALI_TIZEN_VECTOR_ANIMATION_MANAGER_H