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
65 * @param[in] debugEnabled If true, use debug renderer to replace all the concrete renderer.
67 RendererFactory( bool debugEnabled );
70 * @copydoc Toolkit::RenderFactory::CreateControlRenderer( const Property::Map& )
72 Toolkit::ControlRenderer CreateControlRenderer( const Property::Map& propertyMap );
75 * @copydoc Toolkit::RenderFactory::CreateControlRenderer( const Image& )
77 Toolkit::ControlRenderer CreateControlRenderer( const Image& image );
80 * @copydoc Toolkit::RenderFactory::CreateControlRenderer( const std::string&, ImageDimensions )
82 Toolkit::ControlRenderer CreateControlRenderer( const std::string& image, ImageDimensions size );
86 * @brief Returns an image to be used when a renderer has failed to correctly render
88 static Image GetBrokenRendererImage();
93 * A reference counted object may only be deleted by calling Unreference()
95 virtual ~RendererFactory();
100 * Get the renderer type from the property map.
102 * @param[in] propertyMap The map contains the properties of the control renderer
103 * @return The rendererType
105 RendererType GetRendererType( const Property::Map& propertyMap );
108 * Prepare the atlas manager
110 void CreateAtlasManager();
113 * Undefined copy constructor.
115 RendererFactory(const RendererFactory&);
118 * Undefined assignment operator.
120 RendererFactory& operator=(const RendererFactory& rhs);
124 RendererFactoryCachePtr mFactoryCache;
125 ImageAtlasManagerPtr mAtlasManager;
129 } // namespace Internal
131 inline const Internal::RendererFactory& GetImplementation(const Toolkit::RendererFactory& factory)
133 DALI_ASSERT_ALWAYS( factory && "RendererFactory handle is empty" );
135 const BaseObject& handle = factory.GetBaseObject();
137 return static_cast<const Internal::RendererFactory&>(handle);
140 inline Internal::RendererFactory& GetImplementation(Toolkit::RendererFactory& factory)
142 DALI_ASSERT_ALWAYS( factory && "RendererFactory handle is empty" );
144 BaseObject& handle = factory.GetBaseObject();
146 return static_cast<Internal::RendererFactory&>(handle);
149 } // namespace Toolkit
153 #endif /* __DALI_TOOLKIT_RENDERER_FACTORY_IMPL_H__ */