1 #ifndef __DALI_TOOLKIT_RENDERER_FACTORY_IMPL_H__
2 #define __DALI_TOOLKIT_RENDERER_FACTORY_IMPL_H__
5 * Copyright (c) 2015 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.
21 #include <dali/public-api/object/base-object.h>
24 #include <dali-toolkit/devel-api/controls/renderer-factory/renderer-factory.h>
25 #include <dali-toolkit/devel-api/controls/renderer-factory/control-renderer.h>
36 class RendererFactoryCache;
37 typedef IntrusivePtr<RendererFactoryCache> RendererFactoryCachePtr;
39 class ImageAtlasManager;
40 typedef IntrusivePtr<ImageAtlasManager> ImageAtlasManagerPtr;
43 * @copydoc Toolkit::RendererFactory
45 class RendererFactory : public BaseObject
64 * @param[in] debugEnabled If true, use debug renderer to replace all the concrete renderer.
66 RendererFactory( bool debugEnabled );
69 * @copydoc Toolkit::RenderFactory::CreateControlRenderer( const Property::Map& )
71 Toolkit::ControlRenderer CreateControlRenderer( const Property::Map& propertyMap );
74 * @copydoc Toolkit::RenderFactory::CreateControlRenderer( const Image& )
76 Toolkit::ControlRenderer CreateControlRenderer( const Image& image );
79 * @copydoc Toolkit::RenderFactory::CreateControlRenderer( const std::string&, ImageDimensions )
81 Toolkit::ControlRenderer CreateControlRenderer( const std::string& image, ImageDimensions size );
85 * @brief Returns an image to be used when a renderer has failed to correctly render
87 static Image GetBrokenRendererImage();
92 * A reference counted object may only be deleted by calling Unreference()
94 virtual ~RendererFactory();
99 * Get the renderer type from the property map.
101 * @param[in] propertyMap The map contains the properties of the control renderer
102 * @return The rendererType
104 RendererType GetRendererType( const Property::Map& propertyMap );
107 * Prepare the atlas manager
109 void CreateAtlasManager();
112 * Undefined copy constructor.
114 RendererFactory(const RendererFactory&);
117 * Undefined assignment operator.
119 RendererFactory& operator=(const RendererFactory& rhs);
123 RendererFactoryCachePtr mFactoryCache;
124 ImageAtlasManagerPtr mAtlasManager;
128 } // namespace Internal
130 inline const Internal::RendererFactory& GetImplementation(const Toolkit::RendererFactory& factory)
132 DALI_ASSERT_ALWAYS( factory && "RendererFactory handle is empty" );
134 const BaseObject& handle = factory.GetBaseObject();
136 return static_cast<const Internal::RendererFactory&>(handle);
139 inline Internal::RendererFactory& GetImplementation(Toolkit::RendererFactory& factory)
141 DALI_ASSERT_ALWAYS( factory && "RendererFactory handle is empty" );
143 BaseObject& handle = factory.GetBaseObject();
145 return static_cast<Internal::RendererFactory&>(handle);
148 } // namespace Toolkit
152 #endif /* __DALI_TOOLKIT_RENDERER_FACTORY_IMPL_H__ */