X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fdevel-api%2Fvisual-factory%2Fvisual-factory.h;h=25c17ccf517920d5643e244cdbe50c6f2abd95ab;hb=76f9ffa0234acd1b72f3d92c631052a5b4147a83;hp=677f68382112a8ea97a4e90572e583dfab2cb484;hpb=99e2ea03e6d6059f5803d700932df1ff1c848cd3;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/devel-api/visual-factory/visual-factory.h b/dali-toolkit/devel-api/visual-factory/visual-factory.h index 677f683..25c17cc 100644 --- a/dali-toolkit/devel-api/visual-factory/visual-factory.h +++ b/dali-toolkit/devel-api/visual-factory/visual-factory.h @@ -1,7 +1,8 @@ -#ifndef __DALI_TOOLKIT_RENDERER_FACTORY_H__ -#define __DALI_TOOLKIT_RENDERER_FACTORY_H__ +#ifndef DALI_TOOLKIT_VISUAL_FACTORY_H +#define DALI_TOOLKIT_VISUAL_FACTORY_H + /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2016 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,9 +46,10 @@ class VisualFactory; * * The visual type is required in the property map for requesting a visual. * - * | %Property Name | Type | - * |--------------------------|------------------| - * | rendererType | STRING | + * | %Property Name | Type | + * |--------------------------|-------------------| + * | visualType | INTEGER or STRING | + * | shader | MAP | */ class DALI_IMPORT_API VisualFactory : public BaseHandle { @@ -92,9 +94,9 @@ public: /** * @brief Request the visual * - * @param[in] propertyMap The map contains the properties required by the control renderer - * Depends on the content of the map, different kind of renderer would be returned. - * @return The pointer pointing to visual + * @param[in] propertyMap The map contains the properties required by the visual. + * The content of the map determines the type of visual that will be returned. + * @return The handle to the created visual */ Visual::Base CreateVisual( const Property::Map& propertyMap ); @@ -121,52 +123,8 @@ private: }; - -/** - * @brief Template to allow discard old visual, get new one and set it on stage if possible - * - * @tparam ParameterType0 The type of first argument passed to the CreateVisual() - * @tparam ParameterType1 The type of second argument passed to the CreateVisual() - * @SINCE_1_0.39 - * @param[in] actor Actor for which the renderer will be replaced - * @param[in,out] visual The visual to be replaced - * @param[in] param0 First template based argument passed to the renderer factory - * @param[in] param1 Second template based argument passed to the renderer factory - */ -template< class ParameterType0, class ParameterType1 > -void InitializeVisual( Actor& actor, Visual::Base& visual, ParameterType0& param0, ParameterType1& param1 ) -{ - visual.RemoveAndReset( actor ); - visual = Toolkit::VisualFactory::Get().CreateVisual( param0, param1 ); - if( visual && actor && actor.OnStage() ) - { - visual.SetOnStage( actor ); - } -} - -/** - * @brief Template to allow discard old visual, get new one and set it on stage if possible - * - * @tparam ParameterType The type of argument passed to the CreateVisual() - * @SINCE_1_0.39 - * @param[in] actor Actor for which the renderer will be replaced - * @param[in,out] visual The visual to be replaced - * @param[in] param Template based argument passed to the renderer factory - */ -template< class ParameterType > -void InitializeVisual( Actor& actor, Visual::Base& visual, ParameterType& param ) -{ - visual.RemoveAndReset( actor ); - visual = Toolkit::VisualFactory::Get().CreateVisual( param ); - if( visual && actor && actor.OnStage() ) - { - visual.SetOnStage( actor ); - } -} - } // namespace Toolkit } // namespace Dali - -#endif /* __DALI_TOOLKIT_RENDERER_FACTORY_H__ */ +#endif // DALI_TOOLKIT_VISUAL_FACTORY_H