1 #ifndef DALI_INTERNAL_VECTOR_ANIMATION_RENDERER_PLUGIN_PROXY_H
2 #define DALI_INTERNAL_VECTOR_ANIMATION_RENDERER_PLUGIN_PROXY_H
5 * Copyright (c) 2022 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/devel-api/adaptor-framework/vector-animation-renderer-plugin.h>
31 * Proxy class to dynamically load, use and unload vector animation renderer plugin.
33 class VectorAnimationRendererPluginProxy
39 VectorAnimationRendererPluginProxy(const std::string& sharedObjectName);
44 ~VectorAnimationRendererPluginProxy();
47 * @copydoc Dali::VectorAnimationRendererPlugin::Finalize()
52 * @copydoc Dali::VectorAnimationRendererPlugin::Load()
54 bool Load(const std::string& url);
57 * @copydoc Dali::VectorAnimationRendererPlugin::SetRenderer()
59 void SetRenderer(Dali::Renderer renderer);
62 * @copydoc Dali::VectorAnimationRendererPlugin::SetSize()
64 void SetSize(uint32_t width, uint32_t height);
67 * @copydoc Dali::VectorAnimationRendererPlugin::Render()
69 bool Render(uint32_t frameNumber);
72 * @copydoc Dali::VectorAnimationRendererPlugin::GetTotalFrameNumber()
74 uint32_t GetTotalFrameNumber() const;
77 * @copydoc Dali::VectorAnimationRendererPlugin::GetFrameRate()
79 float GetFrameRate() const;
82 * @copydoc Dali::VectorAnimationRendererPlugin::GetDefaultSize()
84 void GetDefaultSize(uint32_t& width, uint32_t& height) const;
87 * @copydoc Dali::VectorAnimationRendererPlugin::GetLayerInfo()
89 void GetLayerInfo(Property::Map& map) const;
92 * @copydoc Dali::VectorAnimationRendererPlugin::GetMarkerInfo()
94 bool GetMarkerInfo(const std::string& marker, uint32_t& startFrame, uint32_t& endFrame) const;
97 * @copydoc Dali::VectorAnimationRendererPlugin::InvalidateBuffer()
99 void InvalidateBuffer();
102 * @copydoc Dali::VectorAnimationRendererPlugin::AddPropertyValueCallback()
104 void AddPropertyValueCallback(const std::string& keyPath, Dali::VectorAnimationRenderer::VectorProperty property, CallbackBase* callback, int32_t id);
107 * @copydoc Dali::VectorAnimationRendererPlugin::UploadCompletedSignal()
109 VectorAnimationRendererPlugin::UploadCompletedSignalType& UploadCompletedSignal();
111 // Not copyable or movable
112 VectorAnimationRendererPluginProxy(const VectorAnimationRendererPluginProxy&) = delete; ///< Deleted copy constructor
113 VectorAnimationRendererPluginProxy(VectorAnimationRendererPluginProxy&&) = delete; ///< Deleted move constructor
114 VectorAnimationRendererPluginProxy& operator=(const VectorAnimationRendererPluginProxy&) = delete; ///< Deleted copy assignment operator
115 VectorAnimationRendererPluginProxy& operator=(VectorAnimationRendererPluginProxy&&) = delete; ///< Deleted move assignment operator
119 * Dynamically loads the plugin.
124 using CreateVectorAnimationRendererFunction = Dali::VectorAnimationRendererPlugin* (*)();
126 std::string mSharedObjectName; ///< Shared object name
127 void* mLibHandle; ///< Handle for the loaded library
128 Dali::VectorAnimationRendererPlugin* mPlugin; ///< Plugin handle
130 CreateVectorAnimationRendererFunction mCreateVectorAnimationRendererPtr; ///< Function pointer called in adaptor to create a plugin instance
131 VectorAnimationRendererPlugin::UploadCompletedSignalType mDefaultSignal;
134 } // namespace Adaptor
136 } // namespace Internal
140 #endif // DALI_INTERNAL_VECTOR_ANIMATION_RENDERER_PLUGIN_PROXY_H