1 #ifndef DALI_TOOLKIT_INTERNAL_VECTOR_ANIMATION_MANAGER_H
2 #define DALI_TOOLKIT_INTERNAL_VECTOR_ANIMATION_MANAGER_H
5 * Copyright (c) 2024 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 #include <dali/integration-api/ordered-set.h>
23 #include <dali/integration-api/processor-interface.h>
24 #include <dali/public-api/common/vector-wrapper.h>
25 #include <dali/public-api/signals/callback.h>
36 class VectorAnimationThread;
39 * @brief Vector animation manager
41 class VectorAnimationManager : public Integration::Processor
47 VectorAnimationManager();
52 ~VectorAnimationManager() override;
55 * Get the vector animation thread.
56 * @return A raw pointer pointing to the vector animation thread.
58 VectorAnimationThread& GetVectorAnimationThread();
61 * @brief Register a callback.
63 * @param callback The callback to register
64 * @note Ownership of the callback is passed onto this class.
66 void RegisterEventCallback(CallbackBase* callback);
69 * @brief Unregister a previously registered callback
71 * @param callback The callback to unregister
73 void UnregisterEventCallback(CallbackBase* callback);
75 protected: // Implementation of Processor
77 * @copydoc Dali::Integration::Processor::Process()
79 void Process(bool postProcessor) override;
82 * @copydoc Dali::Integration::Processor::GetProcessorName()
84 std::string_view GetProcessorName() const override
86 return "VectorAnimationManager";
91 VectorAnimationManager(const VectorAnimationManager& manager) = delete;
94 VectorAnimationManager& operator=(const VectorAnimationManager& manager) = delete;
97 Dali::Integration::OrderedSet<CallbackBase> mEventCallbacks; ///< Event triggered callback lists (owned)
99 std::unique_ptr<VectorAnimationThread> mVectorAnimationThread;
100 bool mProcessorRegistered : 1;
103 } // namespace Internal
105 } // namespace Toolkit
109 #endif // DALI_TOOLKIT_INTERNAL_VECTOR_ANIMATION_MANAGER_H