1 #ifndef DALI_INTERNAL_VECTOR_ANIMATION_RENDERER_PLUGIN_PROXY_H
2 #define DALI_INTERNAL_VECTOR_ANIMATION_RENDERER_PLUGIN_PROXY_H
5 * Copyright (c) 2019 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>
34 * Proxy class to dynamically load, use and unload vector animation renderer plugin.
36 class VectorAnimationRendererPluginProxy
43 VectorAnimationRendererPluginProxy( const std::string& sharedObjectName );
48 ~VectorAnimationRendererPluginProxy();
51 * @copydoc Dali::VectorAnimationRendererPlugin::Initialize()
53 bool Initialize( const std::string& url );
56 * @copydoc Dali::VectorAnimationRendererPlugin::SetRenderer()
58 void SetRenderer( Dali::Renderer renderer );
61 * @copydoc Dali::VectorAnimationRendererPlugin::SetSize()
63 void SetSize( uint32_t width, uint32_t height );
66 * @copydoc Dali::VectorAnimationRendererPlugin::Render()
68 bool Render( uint32_t frameNumber );
71 * @copydoc Dali::VectorAnimationRendererPlugin::GetTotalFrameNumber()
73 uint32_t GetTotalFrameNumber() const;
76 * @copydoc Dali::VectorAnimationRendererPlugin::GetFrameRate()
78 float GetFrameRate() const;
81 * @copydoc Dali::VectorAnimationRendererPlugin::GetDefaultSize()
83 void GetDefaultSize( uint32_t& width, uint32_t& height ) const;
86 * @copydoc Dali::VectorAnimationRendererPlugin::GetLayerInfo()
88 void GetLayerInfo( Property::Map& map );
91 * @copydoc Dali::VectorAnimationRendererPlugin::UploadCompletedSignal()
93 VectorAnimationRendererPlugin::UploadCompletedSignalType& UploadCompletedSignal();
95 // Not copyable or movable
96 VectorAnimationRendererPluginProxy( const VectorAnimationRendererPluginProxy& ) = delete; ///< Deleted copy constructor
97 VectorAnimationRendererPluginProxy( VectorAnimationRendererPluginProxy&& ) = delete; ///< Deleted move constructor
98 VectorAnimationRendererPluginProxy& operator=( const VectorAnimationRendererPluginProxy& ) = delete; ///< Deleted copy assignment operator
99 VectorAnimationRendererPluginProxy& operator=( VectorAnimationRendererPluginProxy&& ) = delete; ///< Deleted move assignment operator
104 * Dynamically loads the plugin.
110 using CreateVectorAnimationRendererFunction = Dali::VectorAnimationRendererPlugin* (*)();
112 std::string mSharedObjectName; ///< Shared object name
113 void* mLibHandle; ///< Handle for the loaded library
114 Dali::VectorAnimationRendererPlugin* mPlugin; ///< Plugin handle
116 CreateVectorAnimationRendererFunction mCreateVectorAnimationRendererPtr; ///< Function pointer called in adaptor to create a plugin instance
117 VectorAnimationRendererPlugin::UploadCompletedSignalType mDefaultSignal;
121 } // namespace Adaptor
123 } // namespace Internal
127 #endif // DALI_INTERNAL_VECTOR_ANIMATION_RENDERER_PLUGIN_PROXY_H