From: David Steele Date: Wed, 26 Oct 2016 18:00:21 +0000 (+0100) Subject: Added devel-api mirroring of public enumeration. X-Git-Tag: dali_1.2.12~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F14%2F94014%2F4;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git Added devel-api mirroring of public enumeration. Used namespace alias to reduce implementation cruft. Fixed one issue of namespace clashing within control-impl. Change-Id: Ia02b3dd5717e0a7934f3d0887273c78bd08a7b80 Signed-off-by: David Steele --- diff --git a/automated-tests/src/dali-toolkit/utc-Dali-Visual.cpp b/automated-tests/src/dali-toolkit/utc-Dali-Visual.cpp index 35c224e..270b304 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-Visual.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-Visual.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include "dummy-control.h" diff --git a/dali-toolkit/devel-api/shader-effects/image-region-effect.h b/dali-toolkit/devel-api/shader-effects/image-region-effect.h index af2c1e9..0ccf172 100644 --- a/dali-toolkit/devel-api/shader-effects/image-region-effect.h +++ b/dali-toolkit/devel-api/shader-effects/image-region-effect.h @@ -22,7 +22,7 @@ #include // INTERNAL INCLUDES -#include +#include namespace Dali { @@ -78,7 +78,7 @@ inline Property::Map CreateImageRegionEffect() Property::Map customShader; customShader[ Visual::Shader::Property::VERTEX_SHADER ] = vertexShader; - map[ Visual::Property::SHADER ] = customShader; + map[ VisualProperty::SHADER ] = customShader; return map; } diff --git a/dali-toolkit/devel-api/visual-factory/devel-visual-properties.h b/dali-toolkit/devel-api/visual-factory/devel-visual-properties.h new file mode 100644 index 0000000..02e977b --- /dev/null +++ b/dali-toolkit/devel-api/visual-factory/devel-visual-properties.h @@ -0,0 +1,66 @@ +#ifndef DALI_TOOLKIT_DEVEL_VISUAL_PROPERTIES_H +#define DALI_TOOLKIT_DEVEL_VISUAL_PROPERTIES_H + +/* + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// INTERNAL INCLUDES +#include +#include + +namespace Dali +{ + +namespace Toolkit +{ + +namespace Visual +{ + +// Mirror of public API Property namespace with addition of enums that are not yet +// public. A namespace alias is used below to reduce implementation cruft. + +namespace DevelProperty +{ + +enum Type +{ + TYPE = Dali::Toolkit::Visual::Property::TYPE, + SHADER = Dali::Toolkit::Visual::Property::SHADER, + + /** + * @brief The transform used by the visual. + * @details Name "transform", type Property::Map. + + * @note Optional. + * @see Transform::Property + */ + TRANSFORM = SHADER+1//Dali::Toolkit::Visual::Property::SHADER+1 +}; + +} // namespace DevelProperty + +} // namespace Visual + +namespace VisualProperty = Visual::DevelProperty; + +} // namespace Toolkit + +} // namespace Dali + + +#endif // DALI_TOOLKIT_DEVEL_VISUAL_PROPERTIES_H diff --git a/dali-toolkit/internal/controls/bloom-view/bloom-view-impl.cpp b/dali-toolkit/internal/controls/bloom-view/bloom-view-impl.cpp index d98cfd9..8c167ab 100644 --- a/dali-toolkit/internal/controls/bloom-view/bloom-view-impl.cpp +++ b/dali-toolkit/internal/controls/bloom-view/bloom-view-impl.cpp @@ -33,8 +33,8 @@ // INTERNAL INCLUDES #include -#include #include +#include #include namespace Dali @@ -378,7 +378,7 @@ void BloomView::AllocateResources() Property::Map customShader; customShader[ Toolkit::Visual::Shader::Property::FRAGMENT_SHADER ] = BLOOM_EXTRACT_FRAGMENT_SOURCE; Property::Map visualMap; - visualMap.Insert( Toolkit::Visual::Property::SHADER, customShader ); + visualMap.Insert( Toolkit::VisualProperty::SHADER, customShader ); mBloomExtractImageView.SetProperty( Toolkit::ImageView::Property::IMAGE, visualMap ); // set GaussianBlurView to blur our extracted bloom @@ -388,7 +388,7 @@ void BloomView::AllocateResources() mCompositeImageView.SetImage( mRenderTargetForRenderingChildren ); // Create shader used to composite bloom and original image to output render target customShader[ Toolkit::Visual::Shader::Property::FRAGMENT_SHADER ] = COMPOSITE_FRAGMENT_SOURCE; - visualMap[ Toolkit::Visual::Property::SHADER ] = customShader; + visualMap[ Toolkit::VisualProperty::SHADER ] = customShader; mCompositeImageView.SetProperty( Toolkit::ImageView::Property::IMAGE, visualMap ); TextureSet textureSet = mCompositeImageView.GetRendererAt(0).GetTextures(); TextureSetImage( textureSet, 1u, mBlurExtractTarget ); diff --git a/dali-toolkit/internal/controls/bubble-effect/color-adjuster.h b/dali-toolkit/internal/controls/bubble-effect/color-adjuster.h index 1810031..008f814 100644 --- a/dali-toolkit/internal/controls/bubble-effect/color-adjuster.h +++ b/dali-toolkit/internal/controls/bubble-effect/color-adjuster.h @@ -23,7 +23,7 @@ #include // INTERNAL INCLUDES -#include +#include #define DALI_COMPOSE_SHADER(STR) #STR @@ -97,7 +97,7 @@ inline Property::Map CreateColorAdjuster() customShader[ Toolkit::Visual::Shader::Property::FRAGMENT_SHADER ] = fragmentShader; Property::Map map; - map[ Toolkit::Visual::Property::SHADER ] = customShader; + map[ Toolkit::VisualProperty::SHADER ] = customShader; return map; } diff --git a/dali-toolkit/internal/controls/buttons/button-impl.cpp b/dali-toolkit/internal/controls/buttons/button-impl.cpp index faac0dc..8b4e380 100644 --- a/dali-toolkit/internal/controls/buttons/button-impl.cpp +++ b/dali-toolkit/internal/controls/buttons/button-impl.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include @@ -570,7 +571,7 @@ void Button::SetColor( const Vector4& color, Button::PaintState selectedState ) Toolkit::Visual::Base visual; Property::Map map; - map[ Toolkit::Visual::Property::TYPE ] = Toolkit::Visual::COLOR; + map[ Toolkit::VisualProperty::TYPE ] = Toolkit::Visual::COLOR; map[ Toolkit::ColorVisual::Property::MIX_COLOR ] = color; visual = visualFactory.CreateVisual( map ); diff --git a/dali-toolkit/internal/controls/gaussian-blur-view/gaussian-blur-view-impl.cpp b/dali-toolkit/internal/controls/gaussian-blur-view/gaussian-blur-view-impl.cpp index 95984f5..5690528 100644 --- a/dali-toolkit/internal/controls/gaussian-blur-view/gaussian-blur-view-impl.cpp +++ b/dali-toolkit/internal/controls/gaussian-blur-view/gaussian-blur-view-impl.cpp @@ -30,7 +30,7 @@ #include // INTERNAL INCLUDES -#include +#include // TODO: // pixel format / size - set from JSON @@ -264,7 +264,7 @@ void GaussianBlurView::OnInitialize() horizFragmentShaderStringStream << GAUSSIAN_BLUR_FRAGMENT_SOURCE; Property::Map source; source[ Toolkit::Visual::Shader::Property::FRAGMENT_SHADER ] = horizFragmentShaderStringStream.str(); - mCustomShader[ Toolkit::Visual::Property::SHADER ] = source; + mCustomShader[ Toolkit::VisualProperty::SHADER ] = source; ////////////////////////////////////////////////////// // Create actors diff --git a/dali-toolkit/internal/controls/image-view/image-view-impl.cpp b/dali-toolkit/internal/controls/image-view/image-view-impl.cpp index 37147e8..e015144 100644 --- a/dali-toolkit/internal/controls/image-view/image-view-impl.cpp +++ b/dali-toolkit/internal/controls/image-view/image-view-impl.cpp @@ -11,7 +11,7 @@ // INTERNAL INCLUDES #include -#include +#include #include #include #include @@ -281,7 +281,7 @@ void ImageView::SetProperty( BaseObject* object, Property::Index index, const Pr // if its not a string then get a Property::Map from the property if possible. else if( value.Get( map ) ) { - Property::Value* shaderValue = map.Find( Toolkit::Visual::Property::SHADER, CUSTOM_SHADER ); + Property::Value* shaderValue = map.Find( Toolkit::VisualProperty::SHADER, CUSTOM_SHADER ); // set image only if property map contains image information other than custom shader if( map.Count() > 1u || !shaderValue ) { diff --git a/dali-toolkit/internal/controls/magnifier/magnifier-impl.cpp b/dali-toolkit/internal/controls/magnifier/magnifier-impl.cpp index 56806e8..2a8cc3f 100644 --- a/dali-toolkit/internal/controls/magnifier/magnifier-impl.cpp +++ b/dali-toolkit/internal/controls/magnifier/magnifier-impl.cpp @@ -31,6 +31,7 @@ // INTERNAL INCLUDES #include #include +#include namespace Dali { @@ -266,7 +267,7 @@ void Magnifier::SetFrameVisibility(bool visible) Toolkit::VisualFactory visualFactory = Toolkit::VisualFactory::Get(); Property::Map map; - map[ Toolkit::Visual::Property::TYPE ] = Toolkit::Visual::BORDER; + map[ Toolkit::VisualProperty::TYPE ] = Toolkit::Visual::BORDER; map[ Toolkit::BorderVisual::Property::COLOR ] = Color::WHITE; map[ Toolkit::BorderVisual::Property::SIZE ] = IMAGE_BORDER_INDENT; Toolkit::Visual::Base borderVisual = visualFactory.CreateVisual( map ); diff --git a/dali-toolkit/internal/controls/page-turn-view/page-turn-book-spine-effect.h b/dali-toolkit/internal/controls/page-turn-view/page-turn-book-spine-effect.h index c64f5ca..1496c6f 100644 --- a/dali-toolkit/internal/controls/page-turn-view/page-turn-book-spine-effect.h +++ b/dali-toolkit/internal/controls/page-turn-view/page-turn-book-spine-effect.h @@ -19,7 +19,7 @@ */ // INTERNAL INCLUDES -#include +#include #define DALI_COMPOSE_SHADER(STR) #STR @@ -104,7 +104,7 @@ inline Property::Map CreatePageTurnBookSpineEffect() customShader[ Toolkit::Visual::Shader::Property::VERTEX_SHADER ] = vertexSource; customShader[ Toolkit::Visual::Shader::Property::FRAGMENT_SHADER ] = fragmentSource; - map[ Toolkit::Visual::Property::SHADER ] = customShader; + map[ Toolkit::VisualProperty::SHADER ] = customShader; return map; } diff --git a/dali-toolkit/internal/controls/page-turn-view/page-turn-effect.cpp b/dali-toolkit/internal/controls/page-turn-view/page-turn-effect.cpp index 889062f..69a5ad1 100644 --- a/dali-toolkit/internal/controls/page-turn-view/page-turn-effect.cpp +++ b/dali-toolkit/internal/controls/page-turn-view/page-turn-effect.cpp @@ -22,7 +22,7 @@ #include // INTERNAL INCLUDES -#include +#include #include using namespace Dali; @@ -337,8 +337,7 @@ Property::Map Dali::Toolkit::Internal::CreatePageTurnEffect() customShader[ Toolkit::Visual::Shader::Property::SUBDIVIDE_GRID_X ] = 20; customShader[ Toolkit::Visual::Shader::Property::SUBDIVIDE_GRID_Y ] = 20; - map[ Toolkit::Visual::Property::SHADER ] = customShader; + map[ Toolkit::VisualProperty::SHADER ] = customShader; return map; } - diff --git a/dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.cpp b/dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.cpp index f6d5e7a..112fa05 100644 --- a/dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.cpp +++ b/dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.cpp @@ -29,7 +29,7 @@ #include // INTERNAL INCLUDES -#include +#include #include #include #include @@ -425,7 +425,7 @@ void PageTurnView::OnInitialize() Shader PageTurnView::CreateShader( const Property::Map& shaderMap ) { Shader shader; - Property::Value* shaderValue = shaderMap.Find( Toolkit::Visual::Property::SHADER, CUSTOM_SHADER ); + Property::Value* shaderValue = shaderMap.Find( Toolkit::VisualProperty::SHADER, CUSTOM_SHADER ); Property::Map shaderSource; if( shaderValue && shaderValue->Get( shaderSource ) ) { diff --git a/dali-toolkit/internal/controls/shadow-view/shadow-view-impl.cpp b/dali-toolkit/internal/controls/shadow-view/shadow-view-impl.cpp index b64ce97..d6fd804 100644 --- a/dali-toolkit/internal/controls/shadow-view/shadow-view-impl.cpp +++ b/dali-toolkit/internal/controls/shadow-view/shadow-view-impl.cpp @@ -30,7 +30,7 @@ #include // INTERNAL INCLUDES -#include +#include #include #include @@ -252,7 +252,7 @@ void ShadowView::OnInitialize() customShader[ Toolkit::Visual::Shader::Property::HINTS ] = Shader::Hint::OUTPUT_IS_TRANSPARENT; - mShadowVisualMap[ Toolkit::Visual::Property::SHADER ] = customShader; + mShadowVisualMap[ Toolkit::VisualProperty::SHADER ] = customShader; // Create render targets needed for rendering from light's point of view mSceneFromLightRenderTarget = FrameBufferImage::New( stageSize.width, stageSize.height, Pixel::RGBA8888 ); diff --git a/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp index 955e0f2..1114ad5 100644 --- a/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp @@ -25,6 +25,7 @@ // INTERNAL INCLUDES #include #include +#include #include #include @@ -285,7 +286,7 @@ void TextLabel::OnInitialize() // Creates the text's visual. Property::Map visualMap; - visualMap[Toolkit::Visual::Property::TYPE] = Toolkit::Visual::TEXT; + visualMap[Toolkit::VisualProperty::TYPE] = Toolkit::Visual::TEXT; visualMap[Toolkit::TextVisual::Property::RENDERING_BACKEND] = static_cast( DEFAULT_RENDERING_BACKEND ); mVisual = Toolkit::VisualFactory::Get().CreateVisual( visualMap ); diff --git a/dali-toolkit/internal/filters/blur-two-pass-filter.cpp b/dali-toolkit/internal/filters/blur-two-pass-filter.cpp index d345893..57490a6 100644 --- a/dali-toolkit/internal/filters/blur-two-pass-filter.cpp +++ b/dali-toolkit/internal/filters/blur-two-pass-filter.cpp @@ -28,7 +28,7 @@ #include // INTERNAL INCLUDES -#include +#include namespace Dali { @@ -172,13 +172,13 @@ void BlurTwoPassFilter::Enable() Property::Map customShader; customShader[ Toolkit::Visual::Shader::Property::FRAGMENT_SHADER ] = fragmentSource.str(); Property::Map visualMap; - visualMap.Insert( Toolkit::Visual::Property::SHADER, customShader ); + visualMap.Insert( Toolkit::VisualProperty::SHADER, customShader ); mActorForInput.SetProperty( Toolkit::ImageView::Property::IMAGE, visualMap ); mActorForHorz.SetProperty( Toolkit::ImageView::Property::IMAGE, visualMap ); // Set up blend-two-image custom shader customShader[ Toolkit::Visual::Shader::Property::FRAGMENT_SHADER ] = BLEND_TWO_IMAGES_FRAGMENT_SOURCE; - visualMap[ Toolkit::Visual::Property::SHADER ] = customShader; + visualMap[ Toolkit::VisualProperty::SHADER ] = customShader; mActorForBlending.SetProperty( Toolkit::ImageView::Property::IMAGE, visualMap ); mRootActor.Add( mActorForInput ); diff --git a/dali-toolkit/internal/filters/emboss-filter.cpp b/dali-toolkit/internal/filters/emboss-filter.cpp index b274558..2a0c81d 100644 --- a/dali-toolkit/internal/filters/emboss-filter.cpp +++ b/dali-toolkit/internal/filters/emboss-filter.cpp @@ -28,8 +28,8 @@ #include // INTERNAL INCLUDES -#include #include +#include #include namespace Dali @@ -96,7 +96,7 @@ void EmbossFilter::Enable() Property::Map customShader; customShader[ Toolkit::Visual::Shader::Property::FRAGMENT_SHADER ] = EMBOSS_FRAGMENT_SOURCE; Property::Map visualMap; - visualMap.Insert( Toolkit::Visual::Property::SHADER, customShader ); + visualMap.Insert( Toolkit::VisualProperty::SHADER, customShader ); // create actor to render input with applied emboss effect mActorForInput1 = Toolkit::ImageView::New(mInputImage); diff --git a/dali-toolkit/internal/filters/spread-filter.cpp b/dali-toolkit/internal/filters/spread-filter.cpp index e4f6224..11284c6 100644 --- a/dali-toolkit/internal/filters/spread-filter.cpp +++ b/dali-toolkit/internal/filters/spread-filter.cpp @@ -25,7 +25,7 @@ #include // INTERNAL INCLUDES -#include +#include namespace Dali { @@ -103,7 +103,7 @@ void SpreadFilter::Enable() Property::Map customShader; customShader[ Toolkit::Visual::Shader::Property::FRAGMENT_SHADER ] = SPREAD_FRAGMENT_SOURCE; Property::Map visualMap; - visualMap.Insert( Toolkit::Visual::Property::SHADER, customShader ); + visualMap.Insert( Toolkit::VisualProperty::SHADER, customShader ); // set SPREAD custom shader mActorForInput.SetProperty( Toolkit::ImageView::Property::IMAGE, visualMap ); diff --git a/dali-toolkit/internal/visuals/border/border-visual.cpp b/dali-toolkit/internal/visuals/border/border-visual.cpp index 764d178..0203a13 100644 --- a/dali-toolkit/internal/visuals/border/border-visual.cpp +++ b/dali-toolkit/internal/visuals/border/border-visual.cpp @@ -23,6 +23,7 @@ // INTERNAL INCLUDES #include +#include #include #include #include @@ -159,7 +160,7 @@ void BorderVisual::DoSetOnStage( Actor& actor ) void BorderVisual::DoCreatePropertyMap( Property::Map& map ) const { map.Clear(); - map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::BORDER ); + map.Insert( VisualProperty::TYPE, Toolkit::Visual::BORDER ); map.Insert( Toolkit::BorderVisual::Property::COLOR, mBorderColor ); map.Insert( Toolkit::BorderVisual::Property::SIZE, mBorderSize ); map.Insert( Toolkit::BorderVisual::Property::ANTI_ALIASING, mAntiAliasing ); diff --git a/dali-toolkit/internal/visuals/color/color-visual.cpp b/dali-toolkit/internal/visuals/color/color-visual.cpp index cbe0036..9ceed38 100644 --- a/dali-toolkit/internal/visuals/color/color-visual.cpp +++ b/dali-toolkit/internal/visuals/color/color-visual.cpp @@ -23,6 +23,7 @@ //INTERNAL INCLUDES #include +#include #include #include #include @@ -106,7 +107,7 @@ void ColorVisual::DoSetOnStage( Actor& actor ) void ColorVisual::DoCreatePropertyMap( Property::Map& map ) const { map.Clear(); - map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR ); + map.Insert( Toolkit::VisualProperty::TYPE, Toolkit::Visual::COLOR ); map.Insert( Toolkit::ColorVisual::Property::MIX_COLOR, mMixColor ); } diff --git a/dali-toolkit/internal/visuals/gradient/gradient-visual.cpp b/dali-toolkit/internal/visuals/gradient/gradient-visual.cpp index ee2b150..d6d90cb 100644 --- a/dali-toolkit/internal/visuals/gradient/gradient-visual.cpp +++ b/dali-toolkit/internal/visuals/gradient/gradient-visual.cpp @@ -29,6 +29,7 @@ // INTERNAL INCLUDES #include +#include #include #include #include @@ -243,7 +244,7 @@ void GradientVisual::DoSetOnStage( Actor& actor ) void GradientVisual::DoCreatePropertyMap( Property::Map& map ) const { map.Clear(); - map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::GRADIENT ); + map.Insert( Toolkit::VisualProperty::TYPE, Toolkit::Visual::GRADIENT ); map.Insert( Toolkit::GradientVisual::Property::UNITS, mGradient->GetGradientUnits() ); map.Insert( Toolkit::GradientVisual::Property::SPREAD_METHOD, mGradient->GetSpreadMethod() ); diff --git a/dali-toolkit/internal/visuals/image/batch-image-visual.cpp b/dali-toolkit/internal/visuals/image/batch-image-visual.cpp index eecef34..2aba159 100644 --- a/dali-toolkit/internal/visuals/image/batch-image-visual.cpp +++ b/dali-toolkit/internal/visuals/image/batch-image-visual.cpp @@ -31,6 +31,7 @@ // INTERNAL HEADER #include +#include #include #include #include @@ -234,7 +235,7 @@ void BatchImageVisual::DoSetOffStage( Actor& actor ) void BatchImageVisual::DoCreatePropertyMap( Property::Map& map ) const { map.Clear(); - map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::IMAGE ); + map.Insert( Toolkit::VisualProperty::TYPE, Toolkit::Visual::IMAGE ); if( !mImageUrl.empty() ) { diff --git a/dali-toolkit/internal/visuals/image/image-visual.cpp b/dali-toolkit/internal/visuals/image/image-visual.cpp index 21bbc63..cbfa445 100644 --- a/dali-toolkit/internal/visuals/image/image-visual.cpp +++ b/dali-toolkit/internal/visuals/image/image-visual.cpp @@ -31,6 +31,7 @@ // INTERNAL HEADER #include +#include #include #include #include @@ -674,7 +675,7 @@ void ImageVisual::DoSetOffStage( Actor& actor ) void ImageVisual::DoCreatePropertyMap( Property::Map& map ) const { map.Clear(); - map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::IMAGE ); + map.Insert( Toolkit::VisualProperty::TYPE, Toolkit::Visual::IMAGE ); bool sync = IsSynchronousResourceLoading(); map.Insert( SYNCHRONOUS_LOADING, sync ); diff --git a/dali-toolkit/internal/visuals/mesh/mesh-visual.cpp b/dali-toolkit/internal/visuals/mesh/mesh-visual.cpp index 3e94f9e..761f1e0 100644 --- a/dali-toolkit/internal/visuals/mesh/mesh-visual.cpp +++ b/dali-toolkit/internal/visuals/mesh/mesh-visual.cpp @@ -28,6 +28,7 @@ #include //INTERNAL INCLUDES +#include #include namespace Dali @@ -384,7 +385,7 @@ void MeshVisual::DoSetOnStage( Actor& actor ) void MeshVisual::DoCreatePropertyMap( Property::Map& map ) const { map.Clear(); - map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::MESH ); + map.Insert( Toolkit::VisualProperty::TYPE, Toolkit::Visual::MESH ); map.Insert( Toolkit::MeshVisual::Property::OBJECT_URL, mObjectUrl ); map.Insert( Toolkit::MeshVisual::Property::MATERIAL_URL, mMaterialUrl ); map.Insert( Toolkit::MeshVisual::Property::TEXTURES_PATH, mTexturesPath ); diff --git a/dali-toolkit/internal/visuals/npatch/npatch-visual.cpp b/dali-toolkit/internal/visuals/npatch/npatch-visual.cpp index da73b33..b67fb18 100644 --- a/dali-toolkit/internal/visuals/npatch/npatch-visual.cpp +++ b/dali-toolkit/internal/visuals/npatch/npatch-visual.cpp @@ -26,6 +26,7 @@ // INTERNAL IINCLUDES #include +#include #include #include #include @@ -425,7 +426,7 @@ void NPatchVisual::DoSetOffStage( Actor& actor ) void NPatchVisual::DoCreatePropertyMap( Property::Map& map ) const { map.Clear(); - map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::IMAGE ); + map.Insert( Toolkit::VisualProperty::TYPE, Toolkit::Visual::IMAGE ); if( !mImageUrl.empty() ) { map.Insert( Toolkit::ImageVisual::Property::URL, mImageUrl ); diff --git a/dali-toolkit/internal/visuals/primitive/primitive-visual.cpp b/dali-toolkit/internal/visuals/primitive/primitive-visual.cpp index 6938eef..bc60560 100644 --- a/dali-toolkit/internal/visuals/primitive/primitive-visual.cpp +++ b/dali-toolkit/internal/visuals/primitive/primitive-visual.cpp @@ -26,6 +26,7 @@ #include // INTERNAL INCLUDES +#include #include namespace Dali @@ -395,7 +396,7 @@ void PrimitiveVisual::DoSetOnStage( Actor& actor ) void PrimitiveVisual::DoCreatePropertyMap( Property::Map& map ) const { map.Clear(); - map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::PRIMITIVE ); + map.Insert( Toolkit::VisualProperty::TYPE, Toolkit::Visual::PRIMITIVE ); map.Insert( Toolkit::PrimitiveVisual::Property::SHAPE, mPrimitiveType ); map.Insert( Toolkit::PrimitiveVisual::Property::MIX_COLOR, mColor ); map.Insert( Toolkit::PrimitiveVisual::Property::SLICES, mSlices ); diff --git a/dali-toolkit/internal/visuals/svg/svg-visual.cpp b/dali-toolkit/internal/visuals/svg/svg-visual.cpp index efa3582..5929eca 100644 --- a/dali-toolkit/internal/visuals/svg/svg-visual.cpp +++ b/dali-toolkit/internal/visuals/svg/svg-visual.cpp @@ -28,6 +28,7 @@ // INTERNAL INCLUDES #include +#include #include #include #include @@ -157,7 +158,7 @@ void SvgVisual::SetSize( const Vector2& size ) void SvgVisual::DoCreatePropertyMap( Property::Map& map ) const { map.Clear(); - map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::IMAGE ); + map.Insert( Toolkit::VisualProperty::TYPE, Toolkit::Visual::IMAGE ); if( !mImageUrl.empty() ) { map.Insert( Toolkit::ImageVisual::Property::URL, mImageUrl ); diff --git a/dali-toolkit/internal/visuals/text/text-visual.cpp b/dali-toolkit/internal/visuals/text/text-visual.cpp index 31dc8bb..abaa703 100644 --- a/dali-toolkit/internal/visuals/text/text-visual.cpp +++ b/dali-toolkit/internal/visuals/text/text-visual.cpp @@ -25,6 +25,7 @@ // INTERNAL HEADER #include #include +#include #include #include #include @@ -200,7 +201,7 @@ void TextVisual::DoCreatePropertyMap( Property::Map& map ) const Property::Value value; map.Clear(); - map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT ); + map.Insert( Toolkit::VisualProperty::TYPE, Toolkit::Visual::TEXT ); map.Insert( Toolkit::TextVisual::Property::RENDERING_BACKEND, mRenderingBackend ); @@ -269,7 +270,7 @@ void TextVisual::DoSetProperties( const Property::Map& propertyMap ) { case Property::Key::INDEX: { - if( Toolkit::Visual::Property::TYPE != keyValue.first.indexKey ) // Toolkit::Visual::Property::TYPE is not a TextVisual's property. + if( Toolkit::VisualProperty::TYPE != keyValue.first.indexKey ) // Toolkit::VisualProperty::TYPE is not a TextVisual's property. { DoSetProperty( keyValue.first.indexKey, keyValue.second ); } diff --git a/dali-toolkit/internal/visuals/visual-base-data-impl.cpp b/dali-toolkit/internal/visuals/visual-base-data-impl.cpp index f539dd6..21e146f 100644 --- a/dali-toolkit/internal/visuals/visual-base-data-impl.cpp +++ b/dali-toolkit/internal/visuals/visual-base-data-impl.cpp @@ -25,7 +25,7 @@ #include // INTERNAL INCLUDES -#include +#include #include namespace Dali @@ -158,7 +158,7 @@ void Internal::Visual::Base::Impl::CustomShader::CreatePropertyMap( Property::Ma customShader.Insert( Toolkit::Visual::Shader::Property::HINTS, static_cast< int >( mHints ) ); } - map.Insert( Toolkit::Visual::Property::SHADER, customShader ); + map.Insert( Toolkit::VisualProperty::SHADER, customShader ); } } diff --git a/dali-toolkit/internal/visuals/visual-base-impl.cpp b/dali-toolkit/internal/visuals/visual-base-impl.cpp index d152a7f..2e1a312 100644 --- a/dali-toolkit/internal/visuals/visual-base-impl.cpp +++ b/dali-toolkit/internal/visuals/visual-base-impl.cpp @@ -23,7 +23,7 @@ #include //INTERNAL HEARDER -#include +#include #include #include @@ -61,7 +61,7 @@ void Visual::Base::SetCustomShader( const Property::Map& shaderMap ) void Visual::Base::SetProperties( const Property::Map& propertyMap ) { - Property::Value* customShaderValue = propertyMap.Find( Toolkit::Visual::Property::SHADER, CUSTOM_SHADER ); + Property::Value* customShaderValue = propertyMap.Find( VisualProperty::SHADER, CUSTOM_SHADER ); if( customShaderValue ) { Property::Map shaderMap; diff --git a/dali-toolkit/internal/visuals/visual-factory-impl.cpp b/dali-toolkit/internal/visuals/visual-factory-impl.cpp index 67311b0..d7e4b97 100644 --- a/dali-toolkit/internal/visuals/visual-factory-impl.cpp +++ b/dali-toolkit/internal/visuals/visual-factory-impl.cpp @@ -28,7 +28,7 @@ // INTERNAL INCLUDES #include -#include +#include #include #include #include @@ -105,7 +105,7 @@ Toolkit::Visual::Base VisualFactory::CreateVisual( const Property::Map& property Visual::BasePtr visualPtr; - Property::Value* typeValue = propertyMap.Find( Toolkit::Visual::Property::TYPE, VISUAL_TYPE ); + Property::Value* typeValue = propertyMap.Find( Toolkit::VisualProperty::TYPE, VISUAL_TYPE ); Toolkit::Visual::Type visualType = Toolkit::Visual::IMAGE; // Default to IMAGE type. if( typeValue ) { diff --git a/dali-toolkit/internal/visuals/wireframe/wireframe-visual.cpp b/dali-toolkit/internal/visuals/wireframe/wireframe-visual.cpp index b65f67c..2e1e4a3 100644 --- a/dali-toolkit/internal/visuals/wireframe/wireframe-visual.cpp +++ b/dali-toolkit/internal/visuals/wireframe/wireframe-visual.cpp @@ -20,7 +20,7 @@ #include "wireframe-visual.h" // INTERNAL INCLUDES -#include +#include #include #include #include @@ -93,7 +93,7 @@ void WireframeVisual::DoSetOnStage( Actor& actor ) void WireframeVisual::DoCreatePropertyMap( Property::Map& map ) const { map.Clear(); - map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::WIREFRAME ); + map.Insert( Toolkit::VisualProperty::TYPE, Toolkit::Visual::WIREFRAME ); } void WireframeVisual::DoSetProperty( Dali::Property::Index index, const Dali::Property::Value& propertyValue ) diff --git a/dali-toolkit/public-api/controls/control-impl.cpp b/dali-toolkit/public-api/controls/control-impl.cpp index 6c4b211..a2ddcbe 100644 --- a/dali-toolkit/public-api/controls/control-impl.cpp +++ b/dali-toolkit/public-api/controls/control-impl.cpp @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -71,18 +72,18 @@ struct RegisteredVisual index(aIndex), visual(aVisual), placementActor(aPlacementActor), enabled(aEnabled) {} }; -struct VisualProperty +struct HandleIndex { Handle handle; ///< a handle to the target object Property::Index index; ///< The index of a property provided by the referenced object - VisualProperty( ) + HandleIndex( ) : handle(), index( Property::INVALID_INDEX ) { } - VisualProperty( Handle& handle, Property::Index index ) + HandleIndex( Handle& handle, Property::Index index ) : handle( handle ), index( index ) { @@ -107,7 +108,7 @@ bool FindVisual( Property::Index targetIndex, RegisteredVisualContainer& visuals return false; } -VisualProperty GetVisualProperty( +HandleIndex GetVisualProperty( Internal::Control& controlImpl, RegisteredVisualContainer& visuals, const std::string& visualName, @@ -115,7 +116,7 @@ VisualProperty GetVisualProperty( { #if defined(DEBUG_ENABLED) std::ostringstream oss; - oss << "Control::GetVisualProperty(" << visualName << ", " << propertyKey << ")" << std::endl; + oss << "Control::GetHandleIndex(" << visualName << ", " << propertyKey << ")" << std::endl; DALI_LOG_INFO( gLogFilter, Debug::General, oss.str().c_str() ); #endif @@ -142,7 +143,7 @@ VisualProperty GetVisualProperty( if( index != Property::INVALID_INDEX ) { // It's a placement actor property: - return VisualProperty( placementActor, index ); + return HandleIndex( placementActor, index ); } else { @@ -156,19 +157,19 @@ VisualProperty GetVisualProperty( if( index != Property::INVALID_INDEX ) { // It's a renderer property: - return VisualProperty( renderer, index ); + return HandleIndex( renderer, index ); } } else { std::ostringstream oss; oss << propertyKey; - DALI_LOG_WARNING( "Control::GetVisualProperty(%s, %s) No renderers\n", visualName.c_str(), oss.str().c_str() ); + DALI_LOG_WARNING( "Control::GetHandleIndex(%s, %s) No renderers\n", visualName.c_str(), oss.str().c_str() ); } } } Handle handle; - return VisualProperty( handle, Property::INVALID_INDEX ); + return HandleIndex( handle, Property::INVALID_INDEX ); } @@ -567,7 +568,7 @@ void Control::SetBackgroundColor( const Vector4& color ) Actor self( Self() ); mImpl->mBackgroundColor = color; Property::Map map; - map[ Toolkit::Visual::Property::TYPE ] = Toolkit::Visual::COLOR; + map[ Toolkit::VisualProperty::TYPE ] = Toolkit::Visual::COLOR; map[ Toolkit::ColorVisual::Property::MIX_COLOR ] = color; mImpl->mBackgroundVisual = Toolkit::VisualFactory::Get().CreateVisual( map ); RegisterVisual( Toolkit::Control::Property::BACKGROUND, self, mImpl->mBackgroundVisual ); @@ -893,37 +894,37 @@ Dali::Animation Control::CreateTransition( const Toolkit::TransitionData& handle iter != end; ++iter ) { TransitionData::Animator* animator = (*iter); - VisualProperty visualProperty; + HandleIndex handleIndex; // Attempt to find the object name as a child actor Actor child = Self().FindChildByName( animator->objectName ); if( child ) { Property::Index propertyIndex = child.GetPropertyIndex( animator->propertyKey ); - visualProperty = VisualProperty( child, propertyIndex ); + handleIndex = HandleIndex( child, propertyIndex ); } else { // Is it a placement actor/visual pair?; - visualProperty = GetVisualProperty( *this, mImpl->mVisuals, + handleIndex = GetVisualProperty( *this, mImpl->mVisuals, animator->objectName, animator->propertyKey ); } - if( visualProperty.handle && visualProperty.index != Property::INVALID_INDEX ) + if( handleIndex.handle && handleIndex.index != Property::INVALID_INDEX ) { if( animator->animate == false ) { if( animator->targetValue.GetType() != Property::NONE ) { - visualProperty.handle.SetProperty( visualProperty.index, animator->targetValue ); + handleIndex.handle.SetProperty( handleIndex.index, animator->targetValue ); } } else { if( animator->initialValue.GetType() != Property::NONE ) { - visualProperty.handle.SetProperty( visualProperty.index, animator->initialValue ); + handleIndex.handle.SetProperty( handleIndex.index, animator->initialValue ); } if( ! transition ) @@ -933,7 +934,7 @@ Dali::Animation Control::CreateTransition( const Toolkit::TransitionData& handle transition = Dali::Animation::New( 0.1f ); } - transition.AnimateTo( Property( visualProperty.handle, visualProperty.index ), + transition.AnimateTo( Property( handleIndex.handle, handleIndex.index ), animator->targetValue, animator->alphaFunction, TimePeriod( animator->timePeriodDelay, @@ -946,7 +947,6 @@ Dali::Animation Control::CreateTransition( const Toolkit::TransitionData& handle return transition; } - bool Control::OnAccessibilityActivated() { return false; // Accessibility activation is not handled by default diff --git a/dali-toolkit/public-api/visuals/border-visual-properties.h b/dali-toolkit/public-api/visuals/border-visual-properties.h index 81832fe..9f0a458 100644 --- a/dali-toolkit/public-api/visuals/border-visual-properties.h +++ b/dali-toolkit/public-api/visuals/border-visual-properties.h @@ -19,7 +19,7 @@ */ // INTERNAL INCLUDES -#include +#include namespace Dali { diff --git a/dali-toolkit/public-api/visuals/color-visual-properties.h b/dali-toolkit/public-api/visuals/color-visual-properties.h index 3952d8c..3b4e104 100644 --- a/dali-toolkit/public-api/visuals/color-visual-properties.h +++ b/dali-toolkit/public-api/visuals/color-visual-properties.h @@ -19,7 +19,7 @@ */ // INTERNAL INCLUDES -#include +#include namespace Dali { diff --git a/dali-toolkit/public-api/visuals/gradient-visual-properties.h b/dali-toolkit/public-api/visuals/gradient-visual-properties.h index 62082f9..6933015 100644 --- a/dali-toolkit/public-api/visuals/gradient-visual-properties.h +++ b/dali-toolkit/public-api/visuals/gradient-visual-properties.h @@ -19,7 +19,7 @@ */ // INTERNAL INCLUDES -#include +#include namespace Dali { diff --git a/dali-toolkit/public-api/visuals/image-visual-properties.h b/dali-toolkit/public-api/visuals/image-visual-properties.h index 882f932..9c9e063 100644 --- a/dali-toolkit/public-api/visuals/image-visual-properties.h +++ b/dali-toolkit/public-api/visuals/image-visual-properties.h @@ -19,7 +19,7 @@ */ // INTERNAL INCLUDES -#include +#include namespace Dali { diff --git a/dali-toolkit/public-api/visuals/mesh-visual-properties.h b/dali-toolkit/public-api/visuals/mesh-visual-properties.h index 0e1ce5c..29b50f2 100644 --- a/dali-toolkit/public-api/visuals/mesh-visual-properties.h +++ b/dali-toolkit/public-api/visuals/mesh-visual-properties.h @@ -19,7 +19,7 @@ */ // INTERNAL INCLUDES -#include +#include namespace Dali { diff --git a/dali-toolkit/public-api/visuals/primitive-visual-properties.h b/dali-toolkit/public-api/visuals/primitive-visual-properties.h index dbf1e5c..ce1ba75 100644 --- a/dali-toolkit/public-api/visuals/primitive-visual-properties.h +++ b/dali-toolkit/public-api/visuals/primitive-visual-properties.h @@ -19,7 +19,7 @@ */ // INTERNAL INCLUDES -#include +#include namespace Dali { diff --git a/dali-toolkit/public-api/visuals/text-visual-properties.h b/dali-toolkit/public-api/visuals/text-visual-properties.h index 39a5eb3..53a0df0 100644 --- a/dali-toolkit/public-api/visuals/text-visual-properties.h +++ b/dali-toolkit/public-api/visuals/text-visual-properties.h @@ -19,7 +19,7 @@ */ // INTERNAL INCLUDES -#include +#include namespace Dali { diff --git a/dali-toolkit/public-api/visuals/visual-properties.h b/dali-toolkit/public-api/visuals/visual-properties.h index c64a73c..ef07c89 100644 --- a/dali-toolkit/public-api/visuals/visual-properties.h +++ b/dali-toolkit/public-api/visuals/visual-properties.h @@ -68,7 +68,7 @@ enum * @note Will override the existing shaders. * @see Shader::Property */ - SHADER, + SHADER }; } // namespace Property