From: Agnelo Vaz Date: Fri, 29 Sep 2017 18:25:04 +0000 (+0100) Subject: Visuals devel API migrated to public X-Git-Tag: dali_1.2.60~9 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=ca4209fb071e5c353a7e528098a2e497765118d8 Visuals devel API migrated to public Change-Id: Ibbdb5c6dff39cecb46aa9fa6d1fede97633faf97 --- diff --git a/automated-tests/src/dali-toolkit-internal/utc-Dali-DebugRendering.cpp b/automated-tests/src/dali-toolkit-internal/utc-Dali-DebugRendering.cpp index f853c90..b4ea19b 100644 --- a/automated-tests/src/dali-toolkit-internal/utc-Dali-DebugRendering.cpp +++ b/automated-tests/src/dali-toolkit-internal/utc-Dali-DebugRendering.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -19,10 +19,6 @@ #include #include #include -#include -#include -#include -#include #include @@ -41,7 +37,7 @@ const char* TEST_GIF_FILE_NAME = TEST_RESOURCE_DIR "/anim.gif"; const std::string DEFAULT_FONT_DIR( "/resources/fonts" ); -void TestDebugVisual( Visual::Base& visual, DevelVisual::Type actualType, Vector2 expectedNaturalSize ) +void TestDebugVisual( Visual::Base& visual, Visual::Type actualType, Vector2 expectedNaturalSize ) { DALI_TEST_CHECK( &typeid( Toolkit::Internal::WireframeVisual ) == &typeid( GetImplementation(visual) ) ); @@ -51,7 +47,7 @@ void TestDebugVisual( Visual::Base& visual, DevelVisual::Type actualType, Vector Property::Map propertyMap; visual.CreatePropertyMap( propertyMap ); - Property::Value* typeValue = propertyMap.Find( Visual::Property::TYPE, Property::INTEGER ); + Property::Value* typeValue = propertyMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER ); if ( typeValue ) { DALI_TEST_CHECK( typeValue->Get() == actualType ); @@ -96,7 +92,7 @@ int UtcDaliDebugRenderingGetVisual1(void) propertyMap1.Insert(ColorVisual::Property::MIX_COLOR, Color::BLUE); Visual::Base colorVisual = factory.CreateVisual(propertyMap1); DALI_TEST_CHECK( colorVisual ); - TestDebugVisual( colorVisual, DevelVisual::COLOR, Vector2::ZERO ); + TestDebugVisual( colorVisual, Visual::COLOR, Vector2::ZERO ); // Test that border visual is replaced with debug visual Property::Map propertyMap2; @@ -105,7 +101,7 @@ int UtcDaliDebugRenderingGetVisual1(void) propertyMap2.Insert(BorderVisual::Property::SIZE, 2.f); Visual::Base borderVisual = factory.CreateVisual(propertyMap2); DALI_TEST_CHECK( borderVisual ); - TestDebugVisual( borderVisual, DevelVisual::BORDER, Vector2::ZERO ); + TestDebugVisual( borderVisual, Visual::BORDER, Vector2::ZERO ); // Test that gradient visual is replaced with debug visual Property::Map propertyMap3; @@ -125,17 +121,17 @@ int UtcDaliDebugRenderingGetVisual1(void) propertyMap3.Insert(GradientVisual::Property::STOP_COLOR, stopColors); Visual::Base gradientVisual = factory.CreateVisual(propertyMap3); DALI_TEST_CHECK( gradientVisual ); - TestDebugVisual( gradientVisual, DevelVisual::GRADIENT, Vector2::ZERO ); + TestDebugVisual( gradientVisual, Visual::GRADIENT, Vector2::ZERO ); // Test that image visual is replaced with debug visual Property::Map propertyMap4; - propertyMap4.Insert( Visual::Property::TYPE, Visual::IMAGE ); + propertyMap4.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE ); propertyMap4.Insert( ImageVisual::Property::URL, TEST_IMAGE_FILE_NAME ); propertyMap4.Insert( ImageVisual::Property::DESIRED_WIDTH, 50.f ); propertyMap4.Insert( ImageVisual::Property::DESIRED_HEIGHT, 100.f ); Visual::Base imageVisual = factory.CreateVisual( propertyMap4 ); DALI_TEST_CHECK( imageVisual ); - TestDebugVisual( imageVisual, DevelVisual::IMAGE, Vector2( 50.f, 100.f ) ); + TestDebugVisual( imageVisual, Visual::IMAGE, Vector2( 50.f, 100.f ) ); // Test that SVG visual is replaced with debug visual // TEST_SVG_FILE: @@ -143,21 +139,21 @@ int UtcDaliDebugRenderingGetVisual1(void) // // Property::Map propertyMap5; - propertyMap5.Insert( Visual::Property::TYPE, DevelVisual::SVG ); + propertyMap5.Insert( Toolkit::Visual::Property::TYPE, Visual::SVG ); propertyMap5.Insert( ImageVisual::Property::URL, TEST_SVG_FILE_NAME ); Visual::Base svgVisual = factory.CreateVisual( propertyMap5 ); DALI_TEST_CHECK( svgVisual ); - TestDebugVisual( svgVisual, DevelVisual::SVG, Vector2(100.f, 100.f) ); + TestDebugVisual( svgVisual, Visual::SVG, Vector2(100.f, 100.f) ); // Test that AnimatedImageVisual is replaced with debug visual // TEST_GIF_FILE: anim.gif // resolution: 50*50, frame count: 4, frame delay: 0.2 second for each frame Property::Map propertyMap6; - propertyMap6.Insert( Visual::Property::TYPE, DevelVisual::ANIMATED_IMAGE ); + propertyMap6.Insert( Toolkit::Visual::Property::TYPE, Visual::ANIMATED_IMAGE ); propertyMap6.Insert( ImageVisual::Property::URL, TEST_GIF_FILE_NAME ); Visual::Base animatedImageVisual = factory.CreateVisual( propertyMap6 ); DALI_TEST_CHECK( animatedImageVisual ); - TestDebugVisual( animatedImageVisual, DevelVisual::ANIMATED_IMAGE, Vector2(50.f, 50.f) ); + TestDebugVisual( animatedImageVisual, Visual::ANIMATED_IMAGE, Vector2(50.f, 50.f) ); // Test that text visual is replaced with debug visual @@ -172,7 +168,7 @@ int UtcDaliDebugRenderingGetVisual1(void) fontClient.GetFontId( pathName + DEFAULT_FONT_DIR + "/tizen/TizenSansRegular.ttf" ); Property::Map propertyMap7; - propertyMap7.Insert( Visual::Property::TYPE, DevelVisual::TEXT ); + propertyMap7.Insert( Toolkit::Visual::Property::TYPE, Visual::TEXT ); propertyMap7.Insert( TextVisual::Property::ENABLE_MARKUP, true ); propertyMap7.Insert( TextVisual::Property::TEXT, "Hello world" ); propertyMap7.Insert( TextVisual::Property::MULTI_LINE, true ); @@ -191,11 +187,11 @@ int UtcDaliDebugRenderingGetVisual1(void) // Test that NPatchVisual is replaced with debug visual // TEST_NPATCH_FILE_NAME: image_01.9.jpg Property::Map propertyMap8; - propertyMap8.Insert( Visual::Property::TYPE, DevelVisual::N_PATCH ); + propertyMap8.Insert( Toolkit::Visual::Property::TYPE, Visual::N_PATCH ); propertyMap8.Insert( ImageVisual::Property::URL, TEST_NPATCH_FILE_NAME ); Visual::Base nPatchVisual = factory.CreateVisual( propertyMap8 ); DALI_TEST_CHECK( nPatchVisual ); - TestDebugVisual( nPatchVisual, DevelVisual::N_PATCH, Vector2::ZERO ); + TestDebugVisual( nPatchVisual, Visual::N_PATCH, Vector2::ZERO ); EnvironmentVariable::SetTestingEnvironmentVariable(false); END_TEST; @@ -212,32 +208,32 @@ int UtcDaliDebugRenderingGetVisual2(void) // Test that color visual is replaced with debug visual Dali::Property::Map map; - map[ Visual::Property::TYPE ] = Visual::COLOR; + map[ Toolkit::Visual::Property::TYPE ] = Visual::COLOR; map[ ColorVisual::Property::MIX_COLOR ] = Color::CYAN; Visual::Base colorVisual = factory.CreateVisual( map); DALI_TEST_CHECK( colorVisual ); - TestDebugVisual( colorVisual, DevelVisual::COLOR, Vector2::ZERO ); + TestDebugVisual( colorVisual, Visual::COLOR, Vector2::ZERO ); // Test that border visual is replaced with debug visual map.Clear(); - map[ Visual::Property::TYPE ] = Visual::BORDER; + map[ Toolkit::Visual::Property::TYPE ] = Visual::BORDER; map[ BorderVisual::Property::COLOR ] = Color::GREEN; map[ BorderVisual::Property::SIZE ] = 2.f; Visual::Base borderVisual = factory.CreateVisual( map ); DALI_TEST_CHECK( borderVisual ); - TestDebugVisual( borderVisual, DevelVisual::BORDER, Vector2::ZERO ); + TestDebugVisual( borderVisual, Visual::BORDER, Vector2::ZERO ); // Test that image visual is replaced with debug visual Image image = ResourceImage::New(TEST_IMAGE_FILE_NAME); Visual::Base imageVisual = factory.CreateVisual( image ); DALI_TEST_CHECK( imageVisual ); - TestDebugVisual( imageVisual, DevelVisual::IMAGE, Vector2::ZERO); + TestDebugVisual( imageVisual, Visual::IMAGE, Vector2::ZERO); // Test that n patch visual is replaced with debug visual Visual::Base nPatchVisual = factory.CreateVisual( TEST_NPATCH_FILE_NAME, ImageDimensions() ); DALI_TEST_CHECK( nPatchVisual ); - TestDebugVisual( nPatchVisual, DevelVisual::N_PATCH, Vector2::ZERO ); + TestDebugVisual( nPatchVisual, Visual::N_PATCH, Vector2::ZERO ); EnvironmentVariable::SetTestingEnvironmentVariable(false); END_TEST; diff --git a/automated-tests/src/dali-toolkit-styling/utc-Dali-StyleManager.cpp b/automated-tests/src/dali-toolkit-styling/utc-Dali-StyleManager.cpp index 819bb2b..07d657f 100644 --- a/automated-tests/src/dali-toolkit-styling/utc-Dali-StyleManager.cpp +++ b/automated-tests/src/dali-toolkit-styling/utc-Dali-StyleManager.cpp @@ -29,12 +29,8 @@ #include #include #include -#include -#include #include #include -#include -#include #include #include @@ -71,7 +67,7 @@ Visual::Base CheckVisual( Impl::DummyControl& dummyImpl, Property::Index visualI DALI_TEST_EQUALS( (bool)visual, true, location ); Property::Map map; visual.CreatePropertyMap( map ); - Property::Value* value = map.Find( Visual::Property::TYPE ); + Property::Value* value = map.Find( Toolkit::Visual::Property::TYPE ); DALI_TEST_EQUALS( value != NULL, true, location ); int visualType; @@ -1269,13 +1265,13 @@ int UtcDaliStyleManagerSetSubState02(void) tet_infoline( "Changing state to FOCUSED - check visual changes\n"); Visual::Base fgVisual1 = CheckVisual( dummyImpl, DummyControl::Property::FOREGROUND_VISUAL, Toolkit::Visual::GRADIENT, TEST_LOCATION); - Visual::Base focusVisual1 = CheckVisual( dummyImpl, DummyControl::Property::FOCUS_VISUAL, Toolkit::DevelVisual::N_PATCH, TEST_LOCATION); + Visual::Base focusVisual1 = CheckVisual( dummyImpl, DummyControl::Property::FOCUS_VISUAL, Toolkit::Visual::N_PATCH, TEST_LOCATION); actor.SetProperty(DevelControl::Property::SUB_STATE, "SELECTED"); tet_infoline( "Changing substate to SELECTED - Expect no change\n"); Visual::Base fgVisual2 = CheckVisual( dummyImpl, DummyControl::Property::FOREGROUND_VISUAL, Toolkit::Visual::GRADIENT, TEST_LOCATION); - Visual::Base focusVisual2 = CheckVisual( dummyImpl, DummyControl::Property::FOCUS_VISUAL, Toolkit::DevelVisual::N_PATCH, TEST_LOCATION); + Visual::Base focusVisual2 = CheckVisual( dummyImpl, DummyControl::Property::FOCUS_VISUAL, Toolkit::Visual::N_PATCH, TEST_LOCATION); DALI_TEST_CHECK( fgVisual1 == fgVisual2 ); DALI_TEST_CHECK( focusVisual1 == focusVisual2 ); diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dummy-control.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dummy-control.cpp index d0a9d03..3461f0d 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dummy-control.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dummy-control.cpp @@ -19,8 +19,6 @@ #include #include -#include -#include #include namespace Dali diff --git a/automated-tests/src/dali-toolkit/utc-Dali-AnimatedImageVisual.cpp b/automated-tests/src/dali-toolkit/utc-Dali-AnimatedImageVisual.cpp index 97f04ac..085ca42 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-AnimatedImageVisual.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-AnimatedImageVisual.cpp @@ -21,8 +21,6 @@ #include #include #include -#include -#include #include #include #include "dummy-control.h" @@ -70,7 +68,7 @@ int UtcDaliAnimatedImageVisualGetPropertyMap01(void) VisualFactory factory = VisualFactory::Get(); Visual::Base animatedImageVisual = factory.CreateVisual( Property::Map() - .Add( Visual::Property::TYPE, DevelVisual::ANIMATED_IMAGE ) + .Add( Toolkit::Visual::Property::TYPE, Visual::ANIMATED_IMAGE ) .Add( ImageVisual::Property::URL, TEST_GIF_FILE_NAME ) .Add( ImageVisual::Property::PIXEL_AREA, Vector4() ) .Add( ImageVisual::Property::WRAP_MODE_U, WrapMode::REPEAT ) @@ -79,9 +77,9 @@ int UtcDaliAnimatedImageVisualGetPropertyMap01(void) Property::Map resultMap; animatedImageVisual.CreatePropertyMap( resultMap ); // check the property values from the returned map from a visual - Property::Value* value = resultMap.Find( Visual::Property::TYPE, Property::INTEGER ); + Property::Value* value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER ); DALI_TEST_CHECK( value ); - DALI_TEST_CHECK( value->Get() == DevelVisual::ANIMATED_IMAGE ); + DALI_TEST_CHECK( value->Get() == Visual::ANIMATED_IMAGE ); value = resultMap.Find( ImageVisual::Property::URL, Property::STRING ); DALI_TEST_CHECK( value ); @@ -92,9 +90,9 @@ int UtcDaliAnimatedImageVisualGetPropertyMap01(void) resultMap.Clear(); animatedImageVisual2.CreatePropertyMap( resultMap ); // check the property values from the returned map from a visual - value = resultMap.Find( Visual::Property::TYPE, Property::INTEGER ); + value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER ); DALI_TEST_CHECK( value ); - DALI_TEST_CHECK( value->Get() == DevelVisual::ANIMATED_IMAGE ); + DALI_TEST_CHECK( value->Get() == Visual::ANIMATED_IMAGE ); value = resultMap.Find( ImageVisual::Property::URL, Property::STRING ); DALI_TEST_CHECK( value ); @@ -116,7 +114,7 @@ int UtcDaliAnimatedImageVisualGetPropertyMap02(void) Visual::Base animatedImageVisual = factory.CreateVisual( Property::Map() - .Add( Visual::Property::TYPE, DevelVisual::ANIMATED_IMAGE ) + .Add( Toolkit::Visual::Property::TYPE, Visual::ANIMATED_IMAGE ) .Add( "url", urls ) .Add( "batchSize", 4 ) .Add( "cacheSize", 8 ) @@ -128,25 +126,25 @@ int UtcDaliAnimatedImageVisualGetPropertyMap02(void) Property::Map resultMap; animatedImageVisual.CreatePropertyMap( resultMap ); // check the property values from the returned map from a visual - Property::Value* value = resultMap.Find( Visual::Property::TYPE, Property::INTEGER ); + Property::Value* value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER ); DALI_TEST_CHECK( value ); - DALI_TEST_CHECK( value->Get() == DevelVisual::ANIMATED_IMAGE ); + DALI_TEST_CHECK( value->Get() == Visual::ANIMATED_IMAGE ); - value = resultMap.Find( DevelImageVisual::Property::URL, "url" ); + value = resultMap.Find( ImageVisual::Property::URL, "url" ); DALI_TEST_CHECK( value ); Property::Array* resultUrls = value->GetArray(); DALI_TEST_CHECK( resultUrls ); DALI_TEST_EQUALS( resultUrls->Count(), urls.Count(), TEST_LOCATION ); - value = resultMap.Find( DevelImageVisual::Property::BATCH_SIZE, "batchSize" ); + value = resultMap.Find( ImageVisual::Property::BATCH_SIZE, "batchSize" ); DALI_TEST_CHECK( value ); DALI_TEST_EQUALS( value->Get(), 4, TEST_LOCATION ); - value = resultMap.Find( DevelImageVisual::Property::CACHE_SIZE, "cacheSize" ); + value = resultMap.Find( ImageVisual::Property::CACHE_SIZE, "cacheSize" ); DALI_TEST_CHECK( value ); DALI_TEST_EQUALS( value->Get(), 8, TEST_LOCATION ); - value = resultMap.Find( DevelImageVisual::Property::FRAME_DELAY, "frameDelay" ); + value = resultMap.Find( ImageVisual::Property::FRAME_DELAY, "frameDelay" ); DALI_TEST_CHECK( value ); DALI_TEST_EQUALS( value->Get(), 200, TEST_LOCATION ); @@ -167,10 +165,10 @@ int UtcDaliAnimatedImageVisualMultiImage01(void) { Property::Map propertyMap; propertyMap.Insert(Visual::Property::TYPE, Visual::IMAGE ); - propertyMap.Insert( DevelImageVisual::Property::URL, Property::Value(urls) ); - propertyMap.Insert( DevelImageVisual::Property::BATCH_SIZE, 4); - propertyMap.Insert( DevelImageVisual::Property::CACHE_SIZE, 8); - propertyMap.Insert( DevelImageVisual::Property::FRAME_DELAY, 100); + propertyMap.Insert( ImageVisual::Property::URL, Property::Value(urls) ); + propertyMap.Insert( ImageVisual::Property::BATCH_SIZE, 4); + propertyMap.Insert( ImageVisual::Property::CACHE_SIZE, 8); + propertyMap.Insert( ImageVisual::Property::FRAME_DELAY, 100); VisualFactory factory = VisualFactory::Get(); Visual::Base visual = factory.CreateVisual( propertyMap ); @@ -261,10 +259,10 @@ int UtcDaliAnimatedImageVisualMultiImage02(void) Property::Map propertyMap; propertyMap.Insert(Visual::Property::TYPE, Visual::IMAGE ); - propertyMap.Insert( DevelImageVisual::Property::URL, Property::Value(urls) ); - propertyMap.Insert( DevelImageVisual::Property::BATCH_SIZE, 0); - propertyMap.Insert( DevelImageVisual::Property::CACHE_SIZE, 0); - propertyMap.Insert( DevelImageVisual::Property::FRAME_DELAY, 100); + propertyMap.Insert( ImageVisual::Property::URL, Property::Value(urls) ); + propertyMap.Insert( ImageVisual::Property::BATCH_SIZE, 0); + propertyMap.Insert( ImageVisual::Property::CACHE_SIZE, 0); + propertyMap.Insert( ImageVisual::Property::FRAME_DELAY, 100); VisualFactory factory = VisualFactory::Get(); Visual::Base visual = factory.CreateVisual( propertyMap ); // TexMgr::Request load tId:0 @@ -334,17 +332,17 @@ int UtcDaliAnimatedImageVisualMultiImage03(void) Property::Map animatedImageMap1; animatedImageMap1.Insert(Visual::Property::TYPE, Visual::IMAGE ); - animatedImageMap1.Insert( DevelImageVisual::Property::URL, Property::Value(urls1) ); - animatedImageMap1.Insert( DevelImageVisual::Property::BATCH_SIZE, 3); - animatedImageMap1.Insert( DevelImageVisual::Property::CACHE_SIZE, 3); - animatedImageMap1.Insert( DevelImageVisual::Property::FRAME_DELAY, 100); + animatedImageMap1.Insert( ImageVisual::Property::URL, Property::Value(urls1) ); + animatedImageMap1.Insert( ImageVisual::Property::BATCH_SIZE, 3); + animatedImageMap1.Insert( ImageVisual::Property::CACHE_SIZE, 3); + animatedImageMap1.Insert( ImageVisual::Property::FRAME_DELAY, 100); Property::Map animatedImageMap2; animatedImageMap2.Insert(Visual::Property::TYPE, Visual::IMAGE ); - animatedImageMap2.Insert( DevelImageVisual::Property::URL, Property::Value(urls2) ); - animatedImageMap2.Insert( DevelImageVisual::Property::BATCH_SIZE, 2); - animatedImageMap2.Insert( DevelImageVisual::Property::CACHE_SIZE, 2); - animatedImageMap2.Insert( DevelImageVisual::Property::FRAME_DELAY, 100); + animatedImageMap2.Insert( ImageVisual::Property::URL, Property::Value(urls2) ); + animatedImageMap2.Insert( ImageVisual::Property::BATCH_SIZE, 2); + animatedImageMap2.Insert( ImageVisual::Property::CACHE_SIZE, 2); + animatedImageMap2.Insert( ImageVisual::Property::FRAME_DELAY, 100); VisualFactory factory = VisualFactory::Get(); Visual::Base animatedImageVisual1 = factory.CreateVisual( animatedImageMap1 ); @@ -417,10 +415,10 @@ int UtcDaliAnimatedImageVisualMultiImage04(void) { Property::Map propertyMap; propertyMap.Insert(Visual::Property::TYPE, Visual::IMAGE ); - propertyMap.Insert( DevelImageVisual::Property::URL, Property::Value(urls) ); - propertyMap.Insert( DevelImageVisual::Property::BATCH_SIZE, 6); - propertyMap.Insert( DevelImageVisual::Property::CACHE_SIZE, 11); - propertyMap.Insert( DevelImageVisual::Property::FRAME_DELAY, 100); + propertyMap.Insert( ImageVisual::Property::URL, Property::Value(urls) ); + propertyMap.Insert( ImageVisual::Property::BATCH_SIZE, 6); + propertyMap.Insert( ImageVisual::Property::CACHE_SIZE, 11); + propertyMap.Insert( ImageVisual::Property::FRAME_DELAY, 100); VisualFactory factory = VisualFactory::Get(); Visual::Base visual = factory.CreateVisual( propertyMap ); @@ -503,10 +501,10 @@ int UtcDaliAnimatedImageVisualMultiImage05(void) { Property::Map propertyMap; propertyMap.Insert(Visual::Property::TYPE, Visual::IMAGE ); - propertyMap.Insert( DevelImageVisual::Property::URL, Property::Value(urls) ); - propertyMap.Insert( DevelImageVisual::Property::BATCH_SIZE, 4); - propertyMap.Insert( DevelImageVisual::Property::CACHE_SIZE, 11); - propertyMap.Insert( DevelImageVisual::Property::FRAME_DELAY, 100); + propertyMap.Insert( ImageVisual::Property::URL, Property::Value(urls) ); + propertyMap.Insert( ImageVisual::Property::BATCH_SIZE, 4); + propertyMap.Insert( ImageVisual::Property::CACHE_SIZE, 11); + propertyMap.Insert( ImageVisual::Property::FRAME_DELAY, 100); VisualFactory factory = VisualFactory::Get(); Visual::Base visual = factory.CreateVisual( propertyMap ); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-Button.cpp b/automated-tests/src/dali-toolkit/utc-Dali-Button.cpp index 79d5cef..d01f3b0 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-Button.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-Button.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -28,8 +28,6 @@ #include #include -#include -#include using namespace Dali; using namespace Toolkit; @@ -496,7 +494,7 @@ int UtcDaliButtonSetLabelStringWithPropertyMapP(void) Button button = PushButton::New(); button.SetProperty( Toolkit::Button::Property::LABEL, - Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT ) + Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT ) .Add( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f ) .Add( Toolkit::TextVisual::Property::TEXT, "Button Label") ); @@ -525,7 +523,7 @@ int UtcDaliButtonSetLabelStringWithPropertyMapStringsP(void) tet_infoline(" UtcDaliButtonSetLabelStringWithPropertyMapStringsP Intermediate part of test"); Property::Map propertyMap; - propertyMap.Insert( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT ); propertyMap.Insert( Toolkit::TextVisual::Property::TEXT, "error if this is the final text" ); propertyMap.Insert( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f ); @@ -554,7 +552,7 @@ int UtcDaliButtonSetLabelWithStringP(void) // Set default point size for text visual as style sheet not available. button.SetProperty( Toolkit::Button::Property::LABEL, - Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT ) + Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT ) .Add( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f ) ); @@ -577,7 +575,7 @@ int UtcDaliButtonSetLabelPropertyP(void) Button button = PushButton::New(); button.SetProperty( Toolkit::Button::Property::LABEL, - Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT ) + Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT ) .Add( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f ) .Add( Toolkit::TextVisual::Property::TEXT, TEST_LABEL1 ) ); @@ -585,7 +583,7 @@ int UtcDaliButtonSetLabelPropertyP(void) DALI_TEST_EQUALS( GetButtonText( button ), TEST_LABEL1, TEST_LOCATION ); Property::Map propertyMap; - propertyMap.Insert( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT ); propertyMap.Insert( Toolkit::TextVisual::Property::TEXT, TEST_LABEL2 ); propertyMap.Insert( Toolkit::TextVisual::Property::TEXT_COLOR, Color::BLUE ); propertyMap.Insert( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f ); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-CheckBoxButton.cpp b/automated-tests/src/dali-toolkit/utc-Dali-CheckBoxButton.cpp index 443dd30..1544a60 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-CheckBoxButton.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-CheckBoxButton.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -21,8 +21,6 @@ #include #include #include -#include -#include using namespace Dali; @@ -181,7 +179,7 @@ int UtcDaliCheckBoxSetLabelP(void) Property::Map propertyMap; - propertyMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT ) + propertyMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT ) .Add( Toolkit::TextVisual::Property::TEXT, "activate" ) .Add( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f ); @@ -206,7 +204,7 @@ int UtcDaliCheckBoxSetDisabledPropertyP(void) Property::Map propertyMap; - propertyMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT ) + propertyMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT ) .Add( Toolkit::TextVisual::Property::TEXT, "activate" ) .Add( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f ); @@ -245,7 +243,7 @@ int UtcDaliCheckBoxSetLabelPadding(void) Property::Map propertyMap; - propertyMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT ) + propertyMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT ) .Add( Toolkit::TextVisual::Property::TEXT, "activate" ) .Add( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f ); @@ -284,7 +282,7 @@ int UtcDaliCheckBoxSetForegroundPadding(void) Property::Map propertyMap; - propertyMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT ) + propertyMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT ) .Add( Toolkit::TextVisual::Property::TEXT, "activate" ) .Add( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f ); @@ -377,7 +375,7 @@ int UtcDaliCheckBoxSetLabelDisabledP(void) Property::Map propertyMap; - propertyMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT ) + propertyMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT ) .Add( Toolkit::TextVisual::Property::TEXT, "activate" ) .Add( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f ); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-Control.cpp b/automated-tests/src/dali-toolkit/utc-Dali-Control.cpp index 9ba1bcf..ffe1ee7 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-Control.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-Control.cpp @@ -24,8 +24,7 @@ #include #include -#include -#include +#include #include #include #include @@ -437,8 +436,8 @@ int UtcDaliControlBackgroundColor(void) Property::Value propValue = control.GetProperty( Control::Property::BACKGROUND ); Property::Map* resultMap = propValue.GetMap(); - DALI_TEST_CHECK( resultMap->Find( Visual::Property::TYPE ) ); - DALI_TEST_CHECK( resultMap->Find( Visual::Property::TYPE )->Get() == Visual::COLOR ); + DALI_TEST_CHECK( resultMap->Find( Toolkit::Visual::Property::TYPE ) ); + DALI_TEST_CHECK( resultMap->Find( Toolkit::Visual::Property::TYPE )->Get() == Visual::COLOR ); DALI_TEST_CHECK( resultMap->Find( ColorVisual::Property::MIX_COLOR ) ); DALI_TEST_CHECK( resultMap->Find( ColorVisual::Property::MIX_COLOR )->Get() == Color::RED ); @@ -468,8 +467,8 @@ int UtcDaliControlBackgroundImage(void) Property::Value propValue = control.GetProperty( Control::Property::BACKGROUND ); Property::Map* resultMap = propValue.GetMap(); - DALI_TEST_CHECK( resultMap->Find( Visual::Property::TYPE ) ); - DALI_TEST_CHECK( resultMap->Find( Visual::Property::TYPE )->Get() == Visual::IMAGE ); + DALI_TEST_CHECK( resultMap->Find( Toolkit::Visual::Property::TYPE ) ); + DALI_TEST_CHECK( resultMap->Find( Toolkit::Visual::Property::TYPE )->Get() == Visual::IMAGE ); DALI_TEST_CHECK( resultMap->Find( ImageVisual::Property::URL ) ); DALI_TEST_CHECK( resultMap->Find( ImageVisual::Property::URL )->Get() == "TestImage" ); @@ -493,13 +492,13 @@ int UtcDaliControlBackgroundProperties(void) DALI_TEST_CHECK( control.GetProperty( Control::Property::BACKGROUND ).Get< Property::Map >().Empty() ); Property::Map imageMap; - imageMap[ Visual::Property::TYPE ] = Visual::IMAGE; + imageMap[ Toolkit::Visual::Property::TYPE ] = Visual::IMAGE; imageMap[ ImageVisual::Property::URL ] = "TestImage"; control.SetProperty( Control::Property::BACKGROUND, imageMap ); Property::Value propValue = control.GetProperty( Control::Property::BACKGROUND ); Property::Map* resultMap = propValue.GetMap(); - DALI_TEST_CHECK( resultMap->Find( Visual::Property::TYPE ) ); - DALI_TEST_EQUALS( resultMap->Find( Visual::Property::TYPE )->Get(),(int)Visual::IMAGE, TEST_LOCATION ); + DALI_TEST_CHECK( resultMap->Find( Toolkit::Visual::Property::TYPE ) ); + DALI_TEST_EQUALS( resultMap->Find( Toolkit::Visual::Property::TYPE )->Get(),(int)Visual::IMAGE, TEST_LOCATION ); DALI_TEST_CHECK( resultMap->Find( ImageVisual::Property::URL ) ); DALI_TEST_EQUALS( resultMap->Find( ImageVisual::Property::URL )->Get(), "TestImage", TEST_LOCATION ); @@ -509,8 +508,8 @@ int UtcDaliControlBackgroundProperties(void) control.SetProperty( Control::Property::BACKGROUND, rendererMap ); propValue = control.GetProperty( Control::Property::BACKGROUND ); resultMap = propValue.GetMap(); - DALI_TEST_CHECK( resultMap->Find( Visual::Property::TYPE ) ); - DALI_TEST_EQUALS( resultMap->Find( Visual::Property::TYPE )->Get(), (int)Visual::COLOR, TEST_LOCATION ); + DALI_TEST_CHECK( resultMap->Find( Toolkit::Visual::Property::TYPE ) ); + DALI_TEST_EQUALS( resultMap->Find( Toolkit::Visual::Property::TYPE )->Get(), (int)Visual::COLOR, TEST_LOCATION ); DALI_TEST_CHECK( resultMap->Find( ColorVisual::Property::MIX_COLOR ) ); DALI_TEST_EQUALS( resultMap->Find( ColorVisual::Property::MIX_COLOR )->Get(), Color::CYAN, TEST_LOCATION ); @@ -522,14 +521,14 @@ int UtcDaliControlBackgroundProperties(void) control.SetProperty( Control::Property::BACKGROUND, "Foobar.png" ); propValue = control.GetProperty( Control::Property::BACKGROUND ); resultMap = propValue.GetMap(); - DALI_TEST_EQUALS( resultMap->Find( Visual::Property::TYPE )->Get(), (int)Visual::IMAGE, TEST_LOCATION ); + DALI_TEST_EQUALS( resultMap->Find( Toolkit::Visual::Property::TYPE )->Get(), (int)Visual::IMAGE, TEST_LOCATION ); DALI_TEST_EQUALS( resultMap->Find( ImageVisual::Property::URL )->Get(), "Foobar.png", TEST_LOCATION ); // set as Color control.SetProperty( Control::Property::BACKGROUND, Color::RED ); propValue = control.GetProperty( Control::Property::BACKGROUND ); resultMap = propValue.GetMap(); - DALI_TEST_EQUALS( resultMap->Find( Visual::Property::TYPE )->Get(), (int)Visual::COLOR, TEST_LOCATION ); + DALI_TEST_EQUALS( resultMap->Find( Toolkit::Visual::Property::TYPE )->Get(), (int)Visual::COLOR, TEST_LOCATION ); DALI_TEST_EQUALS( resultMap->Find( ColorVisual::Property::MIX_COLOR )->Get(), Color::RED, TEST_LOCATION ); // Deprecated Properties @@ -682,7 +681,7 @@ int UtcDaliControlAutoClippingN(void) { ToolkitTestApplication application; Control control = Control::New(); - control.SetProperty( Control::Property::BACKGROUND, Property::Map().Add( Visual::Property::TYPE, Visual::COLOR ) + control.SetProperty( Control::Property::BACKGROUND, Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::COLOR ) .Add( ColorVisual::Property::MIX_COLOR, Color::RED ) ); tet_infoline( "Test to ensure that a renderer does NOT get added when we are clipping children and already have renderers/visuals" ); @@ -739,7 +738,7 @@ int UtcDaliControlAutoClippingWhenAlreadyOnStageN(void) { ToolkitTestApplication application; Control control = Control::New(); - control.SetProperty( Control::Property::BACKGROUND, Property::Map().Add( Visual::Property::TYPE, Visual::COLOR ) + control.SetProperty( Control::Property::BACKGROUND, Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::COLOR ) .Add( ColorVisual::Property::MIX_COLOR, Color::RED ) ); tet_infoline( "Test to ensure that a renderer does NOT get added when we are clipping children and already have renderers/visuals and when already on stage" ); @@ -777,13 +776,13 @@ int UtcDaliControlSetTransformSize(void) Control control = Control::New(); Property::Map transformMap; - transformMap.Add( DevelVisual::Transform::Property::OFFSET, Vector2( 10, 10 ) ) - .Add( DevelVisual::Transform::Property::ANCHOR_POINT, Align::BOTTOM_END ) - .Add( DevelVisual::Transform::Property::ORIGIN, Align::BOTTOM_END ) - .Add( DevelVisual::Transform::Property::SIZE, Vector2( 10, 20 ) ); + transformMap.Add( Visual::Transform::Property::OFFSET, Vector2( 10, 10 ) ) + .Add( Visual::Transform::Property::ANCHOR_POINT, Align::BOTTOM_END ) + .Add( Visual::Transform::Property::ORIGIN, Align::BOTTOM_END ) + .Add( Visual::Transform::Property::SIZE, Vector2( 10, 20 ) ); - control.SetProperty( Control::Property::BACKGROUND, Property::Map().Add( Visual::Property::TYPE, Visual::COLOR ) - .Add( DevelVisual::Property::TRANSFORM, transformMap ) ); + control.SetProperty( Control::Property::BACKGROUND, Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::COLOR ) + .Add( Visual::Property::TRANSFORM, transformMap ) ); tet_infoline( "Test to ensure that the control background transform does not get overwritten when adding to the stage" ); @@ -796,15 +795,15 @@ int UtcDaliControlSetTransformSize(void) Property::Value value = control.GetProperty( Control::Property::BACKGROUND ); Property::Map* map = value.GetMap(); DALI_TEST_CHECK( map ); - Property::Value* transformValue = map->Find( DevelVisual::Property::TRANSFORM ); + Property::Value* transformValue = map->Find( Visual::Property::TRANSFORM ); DALI_TEST_CHECK( transformValue ); Property::Map* retMap = transformValue->GetMap(); DALI_TEST_CHECK( retMap ); - DALI_TEST_EQUALS( retMap->Find( DevelVisual::Transform::Property::OFFSET )->Get< Vector2 >(), Vector2( 10, 10 ), TEST_LOCATION ); - DALI_TEST_EQUALS( retMap->Find( DevelVisual::Transform::Property::ANCHOR_POINT )->Get< int >(), (int)Align::BOTTOM_END, TEST_LOCATION ); - DALI_TEST_EQUALS( retMap->Find( DevelVisual::Transform::Property::ORIGIN )->Get< int >(), (int)Align::BOTTOM_END, TEST_LOCATION ); - DALI_TEST_EQUALS( retMap->Find( DevelVisual::Transform::Property::SIZE )->Get< Vector2 >(), Vector2( 10, 20 ), TEST_LOCATION ); + DALI_TEST_EQUALS( retMap->Find( Visual::Transform::Property::OFFSET )->Get< Vector2 >(), Vector2( 10, 10 ), TEST_LOCATION ); + DALI_TEST_EQUALS( retMap->Find( Visual::Transform::Property::ANCHOR_POINT )->Get< int >(), (int)Align::BOTTOM_END, TEST_LOCATION ); + DALI_TEST_EQUALS( retMap->Find( Visual::Transform::Property::ORIGIN )->Get< int >(), (int)Align::BOTTOM_END, TEST_LOCATION ); + DALI_TEST_EQUALS( retMap->Find( Visual::Transform::Property::SIZE )->Get< Vector2 >(), Vector2( 10, 20 ), TEST_LOCATION ); END_TEST; } @@ -819,11 +818,11 @@ int UtcDaliControlResourcesReady(void) DALI_TEST_CHECK( factory ); Property::Map propertyMapLarge; - propertyMapLarge.Insert( Visual::Property::TYPE, Visual::IMAGE ); + propertyMapLarge.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE ); propertyMapLarge.Insert( ImageVisual::Property::URL, TEST_LARGE_IMAGE_FILE_NAME ); Property::Map propertyMapSmall; - propertyMapSmall.Insert( Visual::Property::TYPE, Visual::IMAGE ); + propertyMapSmall.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE ); propertyMapSmall.Insert( ImageVisual::Property::URL, TEST_IMAGE_FILE_NAME ); Visual::Base smallVisual = factory.CreateVisual( propertyMapSmall ); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ControlWrapper.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ControlWrapper.cpp index c62e11c..cc1a62e 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ControlWrapper.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ControlWrapper.cpp @@ -694,8 +694,8 @@ int UtcDaliControlWrapperTestControlProperties(void) controlWrapper.SetProperty( Control::Property::BACKGROUND, rendererMap ); Property::Value propertyValue = controlWrapper.GetProperty( Control::Property::BACKGROUND ); Property::Map* resultMap = propertyValue.GetMap(); - DALI_TEST_CHECK( resultMap->Find( Visual::Property::TYPE ) ); - DALI_TEST_EQUALS( resultMap->Find( Visual::Property::TYPE )->Get(), (int)Visual::COLOR, TEST_LOCATION ); + DALI_TEST_CHECK( resultMap->Find( Toolkit::Visual::Property::TYPE ) ); + DALI_TEST_EQUALS( resultMap->Find( Toolkit::Visual::Property::TYPE )->Get(), (int)Visual::COLOR, TEST_LOCATION ); DALI_TEST_CHECK( resultMap->Find( ColorVisual::Property::MIX_COLOR ) ); DALI_TEST_EQUALS( resultMap->Find( ColorVisual::Property::MIX_COLOR )->Get(), Color::RED, TEST_LOCATION ); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ImageAtlas.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ImageAtlas.cpp index 848a282..b605fc4 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ImageAtlas.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ImageAtlas.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -21,9 +21,6 @@ #include #include #include -#include - -#include #include using namespace Dali; @@ -399,14 +396,14 @@ int UtcDaliImageAtlasImageView(void) imageMap1[ ImageVisual::Property::URL ] = gImage_34_RGBA; imageMap1[ ImageVisual::Property::DESIRED_HEIGHT ] = 34; imageMap1[ ImageVisual::Property::DESIRED_WIDTH ] = 34; - imageMap1[ DevelImageVisual::Property::ATLASING] = true; + imageMap1[ ImageVisual::Property::ATLASING] = true; Property::Map imageMap2; imageMap2[ ImageVisual::Property::URL ] = gImage_50_RGBA; imageMap2[ ImageVisual::Property::DESIRED_HEIGHT ] = 50; imageMap2[ ImageVisual::Property::DESIRED_WIDTH ] = 50; - imageMap2[ DevelImageVisual::Property::ATLASING ] = true; + imageMap2[ ImageVisual::Property::ATLASING ] = true; ImageView imageView1 = ImageView::New(); imageView1.SetProperty( ImageView::Property::IMAGE, imageMap1 ); @@ -460,7 +457,7 @@ int UtcDaliImageAtlasImageView(void) imageMap3[ ImageVisual::Property::URL ] = gImage_128_RGB; imageMap3[ ImageVisual::Property::DESIRED_HEIGHT ] = 100; imageMap3[ ImageVisual::Property::DESIRED_WIDTH ] = 100; - imageMap3[ DevelImageVisual::Property::ATLASING ] = true; + imageMap3[ ImageVisual::Property::ATLASING ] = true; ImageView imageView3 = ImageView::New(); imageView3.SetProperty( ImageView::Property::IMAGE, imageMap3 ); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ImageView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ImageView.cpp index 894bad0..b22239e 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ImageView.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ImageView.cpp @@ -22,15 +22,14 @@ #include #include -#include #include #include -#include #include #include #include + #include "dummy-control.h" using namespace Dali; @@ -473,7 +472,7 @@ int UtcDaliImageViewAsyncLoadingWithAtlasing(void) imageMap[ ImageVisual::Property::URL ] = gImage_34_RGBA; imageMap[ ImageVisual::Property::DESIRED_HEIGHT ] = 34; imageMap[ ImageVisual::Property::DESIRED_WIDTH ] = 34; - imageMap[ DevelImageVisual::Property::ATLASING] = true; + imageMap[ ImageVisual::Property::ATLASING] = true; ImageView imageView = ImageView::New(); imageView.SetProperty( ImageView::Property::IMAGE, imageMap ); @@ -552,7 +551,7 @@ int UtcDaliImageViewSyncLoading(void) Property::Map syncLoadingMap; syncLoadingMap[ ImageVisual::Property::SYNCHRONOUS_LOADING ] = true; - syncLoadingMap[ DevelImageVisual::Property::ATLASING ] = true; + syncLoadingMap[ ImageVisual::Property::ATLASING ] = true; // Sync loading, no atlasing for big size image { diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ImageVisual.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ImageVisual.cpp index a743793..c40af67 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ImageVisual.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ImageVisual.cpp @@ -19,14 +19,8 @@ #include #include #include -#include -#include -#include #include #include -#include -#include -#include #include #include #include @@ -114,13 +108,13 @@ static void TestMixColor( Visual::Base visual, Property::Index mixColorIndex, co DALI_TEST_CHECK( value->Get( mixColor1 ) ); DALI_TEST_EQUALS( mixColor1, Vector3(testColor), 0.001, TEST_LOCATION ); - value = map.Find( DevelVisual::Property::MIX_COLOR ); + value = map.Find( Visual::Property::MIX_COLOR ); DALI_TEST_CHECK( value ); Vector4 mixColor2; DALI_TEST_CHECK( value->Get( mixColor2 ) ); DALI_TEST_EQUALS( mixColor2, testColor, 0.001, TEST_LOCATION ); - value = map.Find( DevelVisual::Property::OPACITY ); + value = map.Find( Visual::Property::OPACITY ); DALI_TEST_CHECK( value ); float opacity; DALI_TEST_CHECK( value->Get( opacity ) ); @@ -138,7 +132,7 @@ int UtcDaliImageVisualPropertyMap(void) DALI_TEST_CHECK( factory ); Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE ); propertyMap.Insert( ImageVisual::Property::URL, TEST_LARGE_IMAGE_FILE_NAME ); Visual::Base visual = factory.CreateVisual( propertyMap ); @@ -187,7 +181,7 @@ int UtcDaliImageVisualRemoteImageLoad(void) DALI_TEST_CHECK( factory ); Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE ); propertyMap.Insert( ImageVisual::Property::URL, TEST_REMOTE_IMAGE_FILE_NAME ); Visual::Base visual = factory.CreateVisual( propertyMap ); @@ -227,7 +221,7 @@ int UtcDaliImageVisualTextureReuse1(void) tet_infoline( "Request remote image visual with a Property::Map; request a second visual with the same property map - should reuse texture" ); Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE ); propertyMap.Insert( ImageVisual::Property::URL, TEST_LARGE_IMAGE_FILE_NAME ); TestGlAbstraction& gl = application.GetGlAbstraction(); @@ -297,7 +291,7 @@ int UtcDaliImageVisualTextureReuse2(void) tet_infoline( "Request remote image visual with a Property::Map; request a second visual with the same url but different property map - should create new texture" ); Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE ); propertyMap.Insert( ImageVisual::Property::URL, TEST_REMOTE_IMAGE_FILE_NAME ); TestGlAbstraction& gl = application.GetGlAbstraction(); @@ -420,7 +414,7 @@ int UtcDaliImageVisualCustomWrapModePixelArea(void) const Vector4 pixelArea(-0.5f, -0.5f, 2.f, 2.f); Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE ); propertyMap.Insert( ImageVisual::Property::URL, TEST_SMALL_IMAGE_FILE_NAME ); propertyMap.Insert( ImageVisual::Property::DESIRED_WIDTH, width ); propertyMap.Insert( ImageVisual::Property::DESIRED_HEIGHT, height ); @@ -428,7 +422,7 @@ int UtcDaliImageVisualCustomWrapModePixelArea(void) propertyMap.Insert( ImageVisual::Property::PIXEL_AREA, pixelArea ); propertyMap.Insert( ImageVisual::Property::WRAP_MODE_U, WrapMode::MIRRORED_REPEAT ); propertyMap.Insert( ImageVisual::Property::WRAP_MODE_V, WrapMode::REPEAT ); - propertyMap.Insert( DevelImageVisual::Property::ATLASING, true ); + propertyMap.Insert( ImageVisual::Property::ATLASING, true ); Visual::Base visual = factory.CreateVisual( propertyMap ); DALI_TEST_CHECK( visual ); @@ -499,7 +493,7 @@ int UtcDaliImageVisualCustomWrapModeNoAtlas(void) const Vector4 pixelArea(-0.5f, -0.5f, 2.f, 2.f); Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE ); propertyMap.Insert( ImageVisual::Property::URL, TEST_LARGE_IMAGE_FILE_NAME ); propertyMap.Insert( ImageVisual::Property::DESIRED_WIDTH, width ); propertyMap.Insert( ImageVisual::Property::DESIRED_HEIGHT, height ); @@ -586,7 +580,7 @@ int UtcDaliImageVisualAnimateMixColor(void) DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION); Renderer renderer = actor.GetRendererAt(0); - Property::Index index = DevelHandle::GetPropertyIndex( renderer, DevelVisual::Property::MIX_COLOR ); + Property::Index index = DevelHandle::GetPropertyIndex( renderer, Visual::Property::MIX_COLOR ); Property::Value blendModeValue = renderer.GetProperty( Renderer::Property::BLEND_MODE ); DALI_TEST_EQUALS( blendModeValue.Get(), (int)BlendMode::AUTO, TEST_LOCATION ); @@ -632,7 +626,7 @@ int UtcDaliImageVisualAnimateMixColor(void) DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue("mixColor", Vector3(TARGET_MIX_COLOR)), true, TEST_LOCATION ); DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue("opacity", TARGET_MIX_COLOR.a), true, TEST_LOCATION ); - TestMixColor( visual, DevelVisual::Property::MIX_COLOR, TARGET_MIX_COLOR ); + TestMixColor( visual, Visual::Property::MIX_COLOR, TARGET_MIX_COLOR ); blendModeValue = renderer.GetProperty( Renderer::Property::BLEND_MODE ); DALI_TEST_EQUALS( blendModeValue.Get(), (int)BlendMode::ON, TEST_LOCATION ); @@ -668,7 +662,7 @@ int UtcDaliImageVisualAnimateOpacity(void) Renderer renderer = actor.GetRendererAt(0); tet_infoline("Test that the renderer has the opacity property"); - Property::Index index = DevelHandle::GetPropertyIndex( renderer, DevelVisual::Property::OPACITY ); + Property::Index index = DevelHandle::GetPropertyIndex( renderer, Visual::Property::OPACITY ); DALI_TEST_CHECK( index != Property::INVALID_INDEX ); @@ -714,7 +708,7 @@ int UtcDaliImageVisualAnimateOpacity(void) Property::Map map; map["target"] = "testVisual"; - map["property"] = DevelVisual::Property::OPACITY; + map["property"] = Visual::Property::OPACITY; map["targetValue"] = 0.1f; map["animator"] = Property::Map() .Add("alphaFunction", "LINEAR") @@ -776,7 +770,7 @@ int UtcDaliImageVisualAnimatePixelArea(void) DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION); Renderer renderer = actor.GetRendererAt(0); - Property::Index index = DevelHandle::GetPropertyIndex( renderer, DevelVisual::Property::MIX_COLOR ); + Property::Index index = DevelHandle::GetPropertyIndex( renderer, Visual::Property::MIX_COLOR ); tet_infoline("Test that the renderer has the mixColor property"); DALI_TEST_CHECK( index != Property::INVALID_INDEX ); @@ -818,7 +812,7 @@ int UtcDaliImageVisualTextureCancelRemoteLoad(void) tet_infoline( "Request remote image visual, then destroy visual to cancel load" ); Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE ); propertyMap.Insert( ImageVisual::Property::URL, TEST_REMOTE_IMAGE_FILE_NAME ); TestGlAbstraction& gl = application.GetGlAbstraction(); @@ -851,7 +845,7 @@ int UtcDaliImageVisualTextureCancelAsyncLoad(void) DALI_TEST_CHECK( factory ); Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE ); propertyMap.Insert( ImageVisual::Property::URL, TEST_IMAGE_FILE_NAME ); Visual::Base visual = factory.CreateVisual( propertyMap ); @@ -903,7 +897,7 @@ int UtcDaliImageVisualSetInvalidAsyncImage(void) DALI_TEST_CHECK( factory ); Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE ); propertyMap.Insert( ImageVisual::Property::URL, TEST_INVALID_FILE_NAME ); Visual::Base visual = factory.CreateVisual( propertyMap ); @@ -946,7 +940,7 @@ int UtcDaliImageVisualSetInvalidSyncImage(void) DALI_TEST_CHECK( factory ); Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE ); propertyMap.Insert( ImageVisual::Property::URL, TEST_INVALID_FILE_NAME ); propertyMap.Insert( ImageVisual::Property::SYNCHRONOUS_LOADING, true ); @@ -988,7 +982,7 @@ int UtcDaliImageVisualSetInvalidRemoteImage(void) // Local invalid file, asynchronous loading Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE ); propertyMap.Insert( ImageVisual::Property::URL, TEST_REMOTE_INVALID_FILE_NAME ); Visual::Base visual = factory.CreateVisual( propertyMap ); @@ -1031,16 +1025,16 @@ int UtcDaliImageVisualAlphaMask(void) DALI_TEST_CHECK( factory ); Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE ); propertyMap.Insert( ImageVisual::Property::URL, TEST_LARGE_IMAGE_FILE_NAME ); - propertyMap.Insert( DevelImageVisual::Property::ALPHA_MASK_URL, TEST_MASK_IMAGE_FILE_NAME ); + propertyMap.Insert( ImageVisual::Property::ALPHA_MASK_URL, TEST_MASK_IMAGE_FILE_NAME ); Visual::Base visual = factory.CreateVisual( propertyMap ); DALI_TEST_CHECK( visual ); Property::Map testMap; visual.CreatePropertyMap(testMap); - DALI_TEST_EQUALS(*testMap.Find(DevelImageVisual::Property::ALPHA_MASK_URL),Property::Value(TEST_MASK_IMAGE_FILE_NAME), TEST_LOCATION ); + DALI_TEST_EQUALS(*testMap.Find(ImageVisual::Property::ALPHA_MASK_URL),Property::Value(TEST_MASK_IMAGE_FILE_NAME), TEST_LOCATION ); // For tesing the LoadResourceFunc is called, a big image size should be set, so the atlasing is not applied. // Image with a size smaller than 512*512 will be uploaded as a part of the atlas. @@ -1084,7 +1078,7 @@ int UtcDaliImageVisualRemoteAlphaMask(void) const std::string MASK_IMAGE = TEST_REMOTE_IMAGE_FILE_NAME; Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE ); propertyMap.Insert( ImageVisual::Property::URL, TEST_IMAGE_FILE_NAME ); propertyMap.Insert( "alphaMaskUrl", MASK_IMAGE ); @@ -1093,7 +1087,7 @@ int UtcDaliImageVisualRemoteAlphaMask(void) Property::Map testMap; visual.CreatePropertyMap(testMap); - DALI_TEST_EQUALS(*testMap.Find(DevelImageVisual::Property::ALPHA_MASK_URL),Property::Value(MASK_IMAGE), TEST_LOCATION ); + DALI_TEST_EQUALS(*testMap.Find(ImageVisual::Property::ALPHA_MASK_URL),Property::Value(MASK_IMAGE), TEST_LOCATION ); // For tesing the LoadResourceFunc is called, a big image size should be set, so the atlasing is not applied. // Image with a size smaller than 512*512 will be uploaded as a part of the atlas. @@ -1136,20 +1130,20 @@ int UtcDaliImageVisualAlphaMaskCrop(void) DALI_TEST_CHECK( factory ); Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE ); propertyMap.Insert( ImageVisual::Property::URL, TEST_LARGE_IMAGE_FILE_NAME ); - propertyMap.Insert( DevelImageVisual::Property::ALPHA_MASK_URL, TEST_MASK_IMAGE_FILE_NAME ); - propertyMap.Insert( DevelImageVisual::Property::MASK_CONTENT_SCALE, 1.6f ); - propertyMap.Insert( DevelImageVisual::Property::CROP_TO_MASK, true ); + propertyMap.Insert( ImageVisual::Property::ALPHA_MASK_URL, TEST_MASK_IMAGE_FILE_NAME ); + propertyMap.Insert( ImageVisual::Property::MASK_CONTENT_SCALE, 1.6f ); + propertyMap.Insert( ImageVisual::Property::CROP_TO_MASK, true ); Visual::Base visual = factory.CreateVisual( propertyMap ); DALI_TEST_CHECK( visual ); Property::Map testMap; visual.CreatePropertyMap(testMap); - DALI_TEST_EQUALS( *testMap.Find(DevelImageVisual::Property::ALPHA_MASK_URL),Property::Value(TEST_MASK_IMAGE_FILE_NAME), TEST_LOCATION ); - DALI_TEST_EQUALS( *testMap.Find(DevelImageVisual::Property::MASK_CONTENT_SCALE), Property::Value(1.6f), TEST_LOCATION ); - DALI_TEST_EQUALS( *testMap.Find(DevelImageVisual::Property::CROP_TO_MASK),Property::Value(true), TEST_LOCATION ); + DALI_TEST_EQUALS( *testMap.Find(ImageVisual::Property::ALPHA_MASK_URL),Property::Value(TEST_MASK_IMAGE_FILE_NAME), TEST_LOCATION ); + DALI_TEST_EQUALS( *testMap.Find(ImageVisual::Property::MASK_CONTENT_SCALE), Property::Value(1.6f), TEST_LOCATION ); + DALI_TEST_EQUALS( *testMap.Find(ImageVisual::Property::CROP_TO_MASK),Property::Value(true), TEST_LOCATION ); // For tesing the LoadResourceFunc is called, a big image size should be set, so the atlasing is not applied. // Image with a size smaller than 512*512 will be uploaded as a part of the atlas. diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ProgressBar.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ProgressBar.cpp index 3f2fc27..a43b2c6 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ProgressBar.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ProgressBar.cpp @@ -17,9 +17,6 @@ #include #include -#include -#include -#include using namespace Dali; using namespace Dali::Toolkit; @@ -248,7 +245,7 @@ int UtcDaliProgressBarSetPropertyP(void) DALI_TEST_EQUALS( textString, std::string( "test1" ), TEST_LOCATION ); Property::Map textVisualMap2; - textVisualMap2.Insert( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT ); + textVisualMap2.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT ); textVisualMap2.Insert( Toolkit::TextVisual::Property::TEXT, "test2" ); textVisualMap2.Insert( Toolkit::TextVisual::Property::POINT_SIZE, 12.0f ); progressBar.SetProperty(ProgressBar::Property::LABEL_VISUAL, textVisualMap2); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-PushButton.cpp b/automated-tests/src/dali-toolkit/utc-Dali-PushButton.cpp index 7ea83bc..e958429 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-PushButton.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-PushButton.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -27,8 +27,6 @@ #include #include -#include -#include #include @@ -449,7 +447,7 @@ int UtcDaliPushButtonLabelProperty(void) application.Render(); pushButton.SetProperty( Toolkit::Button::Property::LABEL, - Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT ) + Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT ) .Add( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f ) ); @@ -1511,7 +1509,7 @@ int UtcDaliPushButtonSetLabelText(void) PushButton pushButton = PushButton::New(); pushButton.SetProperty( Toolkit::Button::Property::LABEL, - Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT ) + Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT ) .Add( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f ) ); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-RadioButton.cpp b/automated-tests/src/dali-toolkit/utc-Dali-RadioButton.cpp index 85cced6..16b38f6 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-RadioButton.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-RadioButton.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -21,8 +21,6 @@ #include #include -#include -#include using namespace Dali; using namespace Dali::Toolkit; @@ -164,7 +162,7 @@ int UtcDaliRadioButtonLabelProperty(void) RadioButton radioButton = RadioButton::New(); radioButton.SetProperty( Toolkit::Button::Property::LABEL, - Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT ) + Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT ) .Add( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f ) ); @@ -350,7 +348,7 @@ int UtcDaliRadioButtonLabelActor(void) RadioButton radioButton = RadioButton::New(); radioButton.SetProperty( Toolkit::Button::Property::LABEL, - Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT ) + Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT ) .Add( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f ) ); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ShaderEffects.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ShaderEffects.cpp index 6cb1a40..336efb5 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ShaderEffects.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ShaderEffects.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -37,7 +37,7 @@ int UtcDaliCreateAlphaDiscardEffect(void) Property::Map effect = Toolkit::CreateAlphaDiscardEffect(); DALI_TEST_CHECK( !effect.Empty() ); - Property::Value* customShaderValue = effect.Find( Visual::Property::SHADER ); + Property::Value* customShaderValue = effect.Find( Toolkit::Visual::Property::SHADER ); DALI_TEST_CHECK( customShaderValue ); Property::Map customShader; @@ -72,7 +72,7 @@ int UtcDaliCreateDissolveEffect( bool highPrecision ) Property::Map effect = Toolkit::CreateDissolveEffect( highPrecision ); DALI_TEST_CHECK( !effect.Empty() ); - Property::Value* customShaderValue = effect.Find( Visual::Property::SHADER ); + Property::Value* customShaderValue = effect.Find( Toolkit::Visual::Property::SHADER ); DALI_TEST_CHECK( customShaderValue ); Property::Map customShader; @@ -137,7 +137,7 @@ int UtcDaliCreateDissolveEffect(void) Property::Map effect = Toolkit::CreateDistanceFieldEffect(); DALI_TEST_CHECK( !effect.Empty() ); - Property::Value* customShaderValue = effect.Find( Visual::Property::SHADER ); + Property::Value* customShaderValue = effect.Find( Toolkit::Visual::Property::SHADER ); DALI_TEST_CHECK( customShaderValue ); Property::Map customShader; @@ -173,7 +173,7 @@ int UtcDaliCreateImageRegionEffect(void) Property::Map effect = Toolkit::CreateImageRegionEffect(); DALI_TEST_CHECK( !effect.Empty() ); - Property::Value* customShaderValue = effect.Find( Visual::Property::SHADER ); + Property::Value* customShaderValue = effect.Find( Toolkit::Visual::Property::SHADER ); DALI_TEST_CHECK( customShaderValue ); Property::Map customShader; @@ -208,7 +208,7 @@ int UtcDaliCreateMotionBlurEffect(void) Property::Map effect = Toolkit::CreateMotionBlurEffect(); DALI_TEST_CHECK( !effect.Empty() ); - Property::Value* customShaderValue = effect.Find( Visual::Property::SHADER ); + Property::Value* customShaderValue = effect.Find( Toolkit::Visual::Property::SHADER ); DALI_TEST_CHECK( customShaderValue ); Property::Map customShader; @@ -271,7 +271,7 @@ int UtcDaliCreateMotionStretchEffect(void) Property::Map effect = Toolkit::CreateMotionStretchEffect(); DALI_TEST_CHECK( !effect.Empty() ); - Property::Value* customShaderValue = effect.Find( Visual::Property::SHADER ); + Property::Value* customShaderValue = effect.Find( Toolkit::Visual::Property::SHADER ); DALI_TEST_CHECK( customShaderValue ); Property::Map customShader; diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ToolBar.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ToolBar.cpp index 3bb7da1..99cd40e 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ToolBar.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ToolBar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -43,7 +43,7 @@ Actor CreateColorActor( const Vector4& color ) VisualFactory factory = VisualFactory::Get(); Dali::Property::Map map; - map[ Visual::Property::TYPE ] = Visual::COLOR; + map[ Toolkit::Visual::Property::TYPE ] = Visual::COLOR; map[ ColorVisual::Property::MIX_COLOR ] = color; Visual::Base colorVisual = factory.CreateVisual( map ); dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, colorVisual ); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-Tooltip.cpp b/automated-tests/src/dali-toolkit/utc-Dali-Tooltip.cpp index 42f5d1c..3dfaec2 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-Tooltip.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-Tooltip.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -28,8 +28,6 @@ #include #include #include -#include -#include #include using namespace Dali; @@ -128,7 +126,7 @@ int UtcDaliTooltipCreateWithTextVisualMap(void) Control control = Control::New(); control.SetProperty( DevelControl::Property::TOOLTIP, Property::Map().Add( Tooltip::Property::CONTENT, - Property::Map().Add( Visual::Property::TYPE, DevelVisual::TEXT ) + Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::TEXT ) .Add( TextVisual::Property::TEXT, "Hello TextVisual Test" ) ) ); @@ -168,7 +166,7 @@ int UtcDaliTooltipCreateWithTextVisualMapWithoutString(void) Control control = Control::New(); control.SetProperty( DevelControl::Property::TOOLTIP, Property::Map().Add( Tooltip::Property::CONTENT, - Property::Map().Add( Visual::Property::TYPE, DevelVisual::TEXT ) + Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::TEXT ) .Add( TextVisual::Property::POINT_SIZE, 20 ) ) ); @@ -208,7 +206,7 @@ int UtcDaliTooltipCreateWithImageVisualMap(void) Control control = Control::New(); control.SetProperty( DevelControl::Property::TOOLTIP, Property::Map().Add( Tooltip::Property::CONTENT, - Property::Map().Add( Visual::Property::TYPE, Visual::IMAGE ) + Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::IMAGE ) .Add( ImageVisual::Property::URL, "dummy-url.png" ) ) ); @@ -247,9 +245,9 @@ int UtcDaliTooltipCreateWithArray(void) Control control = Control::New(); control.SetProperty( DevelControl::Property::TOOLTIP, - Property::Array().Add( Property::Map().Add( Visual::Property::TYPE, Visual::IMAGE ) + Property::Array().Add( Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::IMAGE ) .Add( ImageVisual::Property::URL, "dummy-url.png" ) ) - .Add( Property::Map().Add( Visual::Property::TYPE, DevelVisual::TEXT ) + .Add( Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::TEXT ) .Add( TextVisual::Property::TEXT, "Hello Array Test" ) ) ); @@ -301,7 +299,7 @@ int UtcDaliTooltipCreateWithFullMap(void) Control control = Control::New(); control.SetProperty( DevelControl::Property::TOOLTIP, Property::Map().Add( Tooltip::Property::CONTENT, - Property::Map().Add( Visual::Property::TYPE, DevelVisual::TEXT ) + Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::TEXT ) .Add( TextVisual::Property::TEXT, "Hello TextVisual Test" ) ) .Add( Tooltip::Property::LAYOUT, Vector2( 1.0f, 2.0f ) ) .Add( Tooltip::Property::WAIT_TIME, 2.5f ) @@ -590,9 +588,9 @@ int UtcDaliTooltipDisplayWithContentArray(void) control.SetSize( 100.0f, 100.0f ); control.SetProperty( DevelControl::Property::TOOLTIP, Property::Map().Add( Tooltip::Property::CONTENT, - Property::Array().Add( Property::Map().Add( Visual::Property::TYPE, Visual::IMAGE ) + Property::Array().Add( Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::IMAGE ) .Add( ImageVisual::Property::URL, "dummy-url.png" ) ) - .Add( Property::Map().Add( Visual::Property::TYPE, DevelVisual::TEXT ) + .Add( Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::TEXT ) .Add( TextVisual::Property::TEXT, "Hello Array Test" ) )) .Add( Tooltip::Property::TAIL, Property::Map().Add( Tooltip::Tail::Property::VISIBILITY, true ) diff --git a/automated-tests/src/dali-toolkit/utc-Dali-TransitionData.cpp b/automated-tests/src/dali-toolkit/utc-Dali-TransitionData.cpp index 14b19b6..42ca88e 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-TransitionData.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-TransitionData.cpp @@ -22,7 +22,6 @@ #include #include #include -#include #include "dummy-control.h" using namespace Dali; @@ -255,7 +254,7 @@ int UtcDaliTransitionDataMap1P(void) Renderer renderer = actor.GetRendererAt(0); Property::Index mixColorIndex = DevelHandle::GetPropertyIndex( renderer, ColorVisual::Property::MIX_COLOR ); - Property::Index opacityIndex = DevelHandle::GetPropertyIndex( renderer, DevelVisual::Property::OPACITY ); + Property::Index opacityIndex = DevelHandle::GetPropertyIndex( renderer, Visual::Property::OPACITY ); application.SendNotification(); application.Render(0); @@ -324,7 +323,7 @@ int UtcDaliTransitionDataMap2P(void) Renderer renderer = actor.GetRendererAt(0); Property::Index mixColorIndex = DevelHandle::GetPropertyIndex( renderer, ColorVisual::Property::MIX_COLOR ); - Property::Index opacityIndex = DevelHandle::GetPropertyIndex( renderer, DevelVisual::Property::OPACITY ); + Property::Index opacityIndex = DevelHandle::GetPropertyIndex( renderer, Visual::Property::OPACITY ); application.SendNotification(); application.Render(0); @@ -397,7 +396,7 @@ int UtcDaliTransitionDataMap2Pb(void) Renderer renderer = actor.GetRendererAt(0); Property::Index mixColorIndex = DevelHandle::GetPropertyIndex( renderer, PrimitiveVisual::Property::MIX_COLOR ); - Property::Index opacityIndex = DevelHandle::GetPropertyIndex( renderer, DevelVisual::Property::OPACITY ); + Property::Index opacityIndex = DevelHandle::GetPropertyIndex( renderer, Visual::Property::OPACITY ); application.SendNotification(); application.Render(0); @@ -594,7 +593,7 @@ int UtcDaliTransitionDataMap5P(void) Renderer renderer = actor.GetRendererAt(0); Property::Index mixColorIndex = DevelHandle::GetPropertyIndex( renderer, ColorVisual::Property::MIX_COLOR ); - Property::Index opacityIndex = DevelHandle::GetPropertyIndex( renderer, DevelVisual::Property::OPACITY ); + Property::Index opacityIndex = DevelHandle::GetPropertyIndex( renderer, Visual::Property::OPACITY ); application.SendNotification(); application.Render(0); @@ -666,7 +665,7 @@ int UtcDaliTransitionDataMap6P(void) Renderer renderer = actor.GetRendererAt(0); Property::Index mixColorIndex = DevelHandle::GetPropertyIndex( renderer, ColorVisual::Property::MIX_COLOR ); - Property::Index opacityIndex = DevelHandle::GetPropertyIndex( renderer, DevelVisual::Property::OPACITY ); + Property::Index opacityIndex = DevelHandle::GetPropertyIndex( renderer, Visual::Property::OPACITY ); application.SendNotification(); application.Render(0); @@ -819,7 +818,7 @@ int UtcDaliTransitionDataMapN4(void) Renderer renderer = actor.GetRendererAt(0); Property::Index mixColorIdx = DevelHandle::GetPropertyIndex( renderer, ColorVisual::Property::MIX_COLOR ); - Property::Index opacityIdx = DevelHandle::GetPropertyIndex( renderer, DevelVisual::Property::OPACITY ); + Property::Index opacityIdx = DevelHandle::GetPropertyIndex( renderer, Visual::Property::OPACITY ); tet_printf( "Test that the property has been set to target value\n"); DALI_TEST_EQUALS(renderer.GetProperty(mixColorIdx), Vector3(Color::RED), 0.001, TEST_LOCATION); @@ -923,7 +922,7 @@ int UtcDaliTransitionDataMapN6(void) Renderer renderer = actor.GetRendererAt(0); Property::Index mixColorIdx = DevelHandle::GetPropertyIndex( renderer, ColorVisual::Property::MIX_COLOR ); - Property::Index opacityIdx = DevelHandle::GetPropertyIndex( renderer, DevelVisual::Property::OPACITY ); + Property::Index opacityIdx = DevelHandle::GetPropertyIndex( renderer, Visual::Property::OPACITY ); tet_printf( "Test that the property has been set to target value\n"); DALI_TEST_EQUALS(renderer.GetProperty(mixColorIdx), Vector3(Color::RED), 0.001, TEST_LOCATION); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-Visual.cpp b/automated-tests/src/dali-toolkit/utc-Dali-Visual.cpp index 3c774c7..fbc55d2 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-Visual.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-Visual.cpp @@ -19,18 +19,11 @@ #include #include -#include -#include -#include #include #include #include #include #include -#include -#include -#include -#include #include #include "dummy-control.h" @@ -53,12 +46,12 @@ Property::Map DefaultTransform() { Property::Map transformMap; transformMap - .Add( Toolkit::DevelVisual::Transform::Property::OFFSET, Vector2(0.0f, 0.0f) ) - .Add( Toolkit::DevelVisual::Transform::Property::SIZE, Vector2(1.0f, 1.0f) ) - .Add( Toolkit::DevelVisual::Transform::Property::ORIGIN, Toolkit::Align::TOP_BEGIN ) - .Add( Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT, Toolkit::Align::TOP_BEGIN ) - .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::DevelVisual::Transform::Policy::RELATIVE, Toolkit::DevelVisual::Transform::Policy::RELATIVE ) ) - .Add( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::DevelVisual::Transform::Policy::RELATIVE, Toolkit::DevelVisual::Transform::Policy::RELATIVE ) ); + .Add( Toolkit::Visual::Transform::Property::OFFSET, Vector2(0.0f, 0.0f) ) + .Add( Toolkit::Visual::Transform::Property::SIZE, Vector2(1.0f, 1.0f) ) + .Add( Toolkit::Visual::Transform::Property::ORIGIN, Toolkit::Align::TOP_BEGIN ) + .Add( Toolkit::Visual::Transform::Property::ANCHOR_POINT, Toolkit::Align::TOP_BEGIN ) + .Add( Toolkit::Visual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::Visual::Transform::Policy::RELATIVE, Toolkit::Visual::Transform::Policy::RELATIVE ) ) + .Add( Toolkit::Visual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::Visual::Transform::Policy::RELATIVE, Toolkit::Visual::Transform::Policy::RELATIVE ) ); return transformMap; } @@ -127,13 +120,13 @@ static void TestMixColor( Visual::Base visual, Property::Index mixColorIndex, co DALI_TEST_CHECK( value->Get( mixColor1 ) ); DALI_TEST_EQUALS( mixColor1, Vector3(testColor), 0.001, TEST_LOCATION ); - value = map.Find( DevelVisual::Property::MIX_COLOR ); + value = map.Find( Visual::Property::MIX_COLOR ); DALI_TEST_CHECK( value ); Vector4 mixColor2; DALI_TEST_CHECK( value->Get( mixColor2 ) ); DALI_TEST_EQUALS( mixColor2, testColor, 0.001, TEST_LOCATION ); - value = map.Find( DevelVisual::Property::OPACITY ); + value = map.Find( Visual::Property::OPACITY ); DALI_TEST_CHECK( value ); float opacity; DALI_TEST_CHECK( value->Get( opacity ) ); @@ -237,7 +230,7 @@ int UtcDaliVisualSize(void) // color colorVisual Dali::Property::Map map; - map[ Visual::Property::TYPE ] = Visual::COLOR; + map[ Toolkit::Visual::Property::TYPE ] = Visual::COLOR; map[ ColorVisual::Property::MIX_COLOR ] = Color::MAGENTA; Visual::Base colorVisual = factory.CreateVisual( map ); @@ -260,7 +253,7 @@ int UtcDaliVisualSize(void) // border visual float borderSize = 5.f; map.Clear(); - map[ Visual::Property::TYPE ] = Visual::BORDER; + map[ Toolkit::Visual::Property::TYPE ] = Visual::BORDER; map[ BorderVisual::Property::COLOR ] = Color::RED; map[ BorderVisual::Property::SIZE ] = borderSize; Visual::Base borderVisual = factory.CreateVisual( map ); @@ -315,7 +308,7 @@ int UtcDaliVisualSize(void) fontClient.GetFontId( pathName + DEFAULT_FONT_DIR + "/tizen/TizenSansRegular.ttf" ); propertyMap.Clear(); - propertyMap.Insert( Visual::Property::TYPE, DevelVisual::TEXT ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::TEXT ); propertyMap.Insert( TextVisual::Property::ENABLE_MARKUP, true ); propertyMap.Insert( TextVisual::Property::TEXT, "Hello world" ); propertyMap.Insert( TextVisual::Property::MULTI_LINE, true ); @@ -382,13 +375,13 @@ int UtcDaliVisualGetPropertyMap1(void) VisualFactory factory = VisualFactory::Get(); Property::Map propertyMap; propertyMap.Insert(Visual::Property::TYPE, Visual::COLOR); - propertyMap.Insert(DevelVisual::Property::MIX_COLOR, Color::BLUE); + propertyMap.Insert(Visual::Property::MIX_COLOR, Color::BLUE); Visual::Base colorVisual = factory.CreateVisual( propertyMap ); Property::Map resultMap; colorVisual.CreatePropertyMap( resultMap ); - Property::Value* typeValue = resultMap.Find( Visual::Property::TYPE, Property::INTEGER ); + Property::Value* typeValue = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER ); DALI_TEST_CHECK( typeValue ); DALI_TEST_CHECK( typeValue->Get() == Visual::COLOR ); @@ -426,7 +419,7 @@ int UtcDaliVisualGetPropertyMap2(void) borderVisual.CreatePropertyMap( resultMap ); // check the property values from the returned map from visual - Property::Value* typeValue = resultMap.Find( Visual::Property::TYPE, Property::INTEGER ); + Property::Value* typeValue = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER ); DALI_TEST_CHECK( typeValue ); DALI_TEST_CHECK( typeValue->Get() == Visual::BORDER ); @@ -443,13 +436,13 @@ int UtcDaliVisualGetPropertyMap2(void) DALI_TEST_CHECK( AAValue->Get() == true ); Property::Map propertyMap1; - propertyMap1[ Visual::Property::TYPE ] = Visual::BORDER; + propertyMap1[ Toolkit::Visual::Property::TYPE ] = Visual::BORDER; propertyMap1[ BorderVisual::Property::COLOR ] = Color::CYAN; propertyMap1[ BorderVisual::Property::SIZE ] = 10.0f; borderVisual = factory.CreateVisual( propertyMap1 ); borderVisual.CreatePropertyMap( resultMap ); - typeValue = resultMap.Find( Visual::Property::TYPE, Property::INTEGER ); + typeValue = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER ); DALI_TEST_CHECK( typeValue ); DALI_TEST_CHECK( typeValue->Get() == Visual::BORDER ); @@ -519,7 +512,7 @@ int UtcDaliVisualGetPropertyMap3(void) gradientVisual.CreatePropertyMap( resultMap ); // check the property values from the returned map from visual - Property::Value* value = resultMap.Find( Visual::Property::TYPE, Property::INTEGER ); + Property::Value* value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER ); DALI_TEST_CHECK( value ); DALI_TEST_CHECK( value->Get() == Visual::GRADIENT ); @@ -587,7 +580,7 @@ int UtcDaliVisualGetPropertyMap4(void) gradientVisual.CreatePropertyMap( resultMap ); // check the property values from the returned map from visual - Property::Value* value = resultMap.Find( Visual::Property::TYPE, Property::INTEGER ); + Property::Value* value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER ); DALI_TEST_CHECK( value ); DALI_TEST_CHECK( value->Get() == Visual::GRADIENT ); @@ -634,8 +627,8 @@ int UtcDaliVisualGetPropertyMap5(void) VisualFactory factory = VisualFactory::Get(); Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE ); - propertyMap.Insert( DevelVisual::Property::MIX_COLOR, Color::MAGENTA ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::IMAGE ); + propertyMap.Insert( Visual::Property::MIX_COLOR, Color::MAGENTA ); propertyMap.Insert( ImageVisual::Property::URL, TEST_IMAGE_FILE_NAME ); propertyMap.Insert( ImageVisual::Property::DESIRED_WIDTH, 20 ); propertyMap.Insert( ImageVisual::Property::DESIRED_HEIGHT, 30 ); @@ -653,7 +646,7 @@ int UtcDaliVisualGetPropertyMap5(void) imageVisual.CreatePropertyMap( resultMap ); // check the property values from the returned map from visual - Property::Value* value = resultMap.Find( Visual::Property::TYPE, Property::INTEGER ); + Property::Value* value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER ); DALI_TEST_CHECK( value ); DALI_TEST_CHECK( value->Get() == Visual::IMAGE ); @@ -661,7 +654,7 @@ int UtcDaliVisualGetPropertyMap5(void) DALI_TEST_CHECK( value ); DALI_TEST_CHECK( value->Get() == TEST_IMAGE_FILE_NAME ); - value = resultMap.Find( DevelVisual::Property::MIX_COLOR, Property::VECTOR4 ); + value = resultMap.Find( Visual::Property::MIX_COLOR, Property::VECTOR4 ); DALI_TEST_CHECK( value ); DALI_TEST_CHECK( value->Get() == Color::MAGENTA ); @@ -703,7 +696,7 @@ int UtcDaliVisualGetPropertyMap5(void) imageVisual = factory.CreateVisual(image); imageVisual.CreatePropertyMap( resultMap ); - value = resultMap.Find( Visual::Property::TYPE, Property::INTEGER ); + value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER ); DALI_TEST_CHECK( value ); DALI_TEST_CHECK( value->Get() == Visual::IMAGE ); @@ -755,22 +748,22 @@ int UtcDaliVisualGetPropertyMap6(void) VisualFactory factory = VisualFactory::Get(); Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, DevelVisual::N_PATCH ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::N_PATCH ); propertyMap.Insert( "mixColor", Color::MAGENTA ); propertyMap.Insert( ImageVisual::Property::URL, TEST_NPATCH_FILE_NAME ); propertyMap.Insert( ImageVisual::Property::BORDER_ONLY, true ); - propertyMap.Insert( DevelImageVisual::Property::BORDER, border ); + propertyMap.Insert( ImageVisual::Property::BORDER, border ); Visual::Base nPatchVisual = factory.CreateVisual( propertyMap ); Property::Map resultMap; nPatchVisual.CreatePropertyMap( resultMap ); // check the property values from the returned map from visual - Property::Value* value = resultMap.Find( Visual::Property::TYPE, Property::INTEGER ); + Property::Value* value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER ); DALI_TEST_CHECK( value ); - DALI_TEST_CHECK( value->Get() == DevelVisual::N_PATCH ); + DALI_TEST_CHECK( value->Get() == Visual::N_PATCH ); - value = resultMap.Find( DevelVisual::Property::MIX_COLOR, Property::VECTOR4 ); + value = resultMap.Find( Visual::Property::MIX_COLOR, Property::VECTOR4 ); DALI_TEST_CHECK( value ); DALI_TEST_CHECK( value->Get() == Color::MAGENTA ); @@ -782,28 +775,28 @@ int UtcDaliVisualGetPropertyMap6(void) DALI_TEST_CHECK( value ); DALI_TEST_CHECK( value->Get() ); - value = resultMap.Find( DevelImageVisual::Property::BORDER, Property::RECTANGLE ); + value = resultMap.Find( ImageVisual::Property::BORDER, Property::RECTANGLE ); DALI_TEST_CHECK( value ); DALI_TEST_CHECK( value->Get< Rect< int > >() == border ); Vector4 border1( 1.0f, 1.0f, 1.0f, 1.0f ); Property::Map propertyMap1; - propertyMap1.Insert( Visual::Property::TYPE, DevelVisual::N_PATCH ); + propertyMap1.Insert( Toolkit::Visual::Property::TYPE, Visual::N_PATCH ); propertyMap1.Insert( "mixColor", Color::MAGENTA ); propertyMap1.Insert( ImageVisual::Property::URL, TEST_NPATCH_FILE_NAME ); propertyMap1.Insert( ImageVisual::Property::BORDER_ONLY, true ); - propertyMap1.Insert( DevelImageVisual::Property::BORDER, border1 ); + propertyMap1.Insert( ImageVisual::Property::BORDER, border1 ); nPatchVisual = factory.CreateVisual( propertyMap1 ); nPatchVisual.CreatePropertyMap( resultMap ); // check the property values from the returned map from visual - value = resultMap.Find( Visual::Property::TYPE, Property::INTEGER ); + value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER ); DALI_TEST_CHECK( value ); - DALI_TEST_CHECK( value->Get() == DevelVisual::N_PATCH ); + DALI_TEST_CHECK( value->Get() == Visual::N_PATCH ); - value = resultMap.Find( DevelVisual::Property::MIX_COLOR, Property::VECTOR4 ); + value = resultMap.Find( Visual::Property::MIX_COLOR, Property::VECTOR4 ); DALI_TEST_CHECK( value ); DALI_TEST_CHECK( value->Get() == Color::MAGENTA ); @@ -815,7 +808,7 @@ int UtcDaliVisualGetPropertyMap6(void) DALI_TEST_CHECK( value ); DALI_TEST_CHECK( value->Get() ); - value = resultMap.Find( DevelImageVisual::Property::BORDER, Property::RECTANGLE ); + value = resultMap.Find( ImageVisual::Property::BORDER, Property::RECTANGLE ); DALI_TEST_CHECK( value ); DALI_TEST_CHECK( value->Get< Rect< int > >() == border ); @@ -830,17 +823,17 @@ int UtcDaliVisualGetPropertyMap7(void) // request SvgVisual with a property map VisualFactory factory = VisualFactory::Get(); Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, DevelVisual::SVG ); - propertyMap.Insert( DevelVisual::Property::MIX_COLOR, Color::WHITE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::SVG ); + propertyMap.Insert( Visual::Property::MIX_COLOR, Color::WHITE ); propertyMap.Insert( ImageVisual::Property::URL, TEST_SVG_FILE_NAME ); Visual::Base svgVisual = factory.CreateVisual( propertyMap ); Property::Map resultMap; svgVisual.CreatePropertyMap( resultMap ); // check the property values from the returned map from a visual - Property::Value* value = resultMap.Find( Visual::Property::TYPE, Property::INTEGER ); + Property::Value* value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER ); DALI_TEST_CHECK( value ); - DALI_TEST_CHECK( value->Get() == DevelVisual::SVG ); + DALI_TEST_CHECK( value->Get() == Visual::SVG ); value = resultMap.Find( ImageVisual::Property::URL, Property::STRING ); DALI_TEST_CHECK( value ); @@ -851,9 +844,9 @@ int UtcDaliVisualGetPropertyMap7(void) resultMap.Clear(); svgVisual2.CreatePropertyMap( resultMap ); // check the property values from the returned map from a visual - value = resultMap.Find( Visual::Property::TYPE, Property::INTEGER ); + value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER ); DALI_TEST_CHECK( value ); - DALI_TEST_CHECK( value->Get() == DevelVisual::SVG ); + DALI_TEST_CHECK( value->Get() == Visual::SVG ); value = resultMap.Find( ImageVisual::Property::URL, Property::STRING ); DALI_TEST_CHECK( value ); @@ -871,8 +864,8 @@ int UtcDaliVisualGetPropertyMap8(void) //Request MeshVisual using a property map. VisualFactory factory = VisualFactory::Get(); Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::MESH ); - propertyMap.Insert( DevelVisual::Property::MIX_COLOR, Color::BLUE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::MESH ); + propertyMap.Insert( Visual::Property::MIX_COLOR, Color::BLUE ); propertyMap.Insert( MeshVisual::Property::OBJECT_URL, TEST_OBJ_FILE_NAME ); propertyMap.Insert( MeshVisual::Property::MATERIAL_URL, TEST_MTL_FILE_NAME ); propertyMap.Insert( MeshVisual::Property::TEXTURES_PATH, TEST_RESOURCE_LOCATION ); @@ -882,10 +875,10 @@ int UtcDaliVisualGetPropertyMap8(void) Property::Map resultMap; meshVisual.CreatePropertyMap( resultMap ); - TestMixColor( meshVisual, DevelVisual::Property::MIX_COLOR, Color::BLUE ); + TestMixColor( meshVisual, Visual::Property::MIX_COLOR, Color::BLUE ); //Check values in the result map are identical to the initial map's values. - Property::Value* value = resultMap.Find( Visual::Property::TYPE, Property::INTEGER ); + Property::Value* value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER ); DALI_TEST_CHECK( value ); DALI_TEST_EQUALS( value->Get(), (int)Visual::MESH, TEST_LOCATION ); @@ -924,7 +917,7 @@ int UtcDaliVisualGetPropertyMap9(void) //Request PrimitiveVisual using a property map. VisualFactory factory = VisualFactory::Get(); Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE ); propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::CUBE ); propertyMap.Insert( PrimitiveVisual::Property::MIX_COLOR, color ); propertyMap.Insert( PrimitiveVisual::Property::SLICES, 10 ); @@ -943,7 +936,7 @@ int UtcDaliVisualGetPropertyMap9(void) primitiveVisual.CreatePropertyMap( resultMap ); //Check values in the result map are identical to the initial map's values. - Property::Value* value = resultMap.Find( Visual::Property::TYPE, Property::INTEGER ); + Property::Value* value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER ); DALI_TEST_CHECK( value ); DALI_TEST_EQUALS( value->Get(), (int)Visual::PRIMITIVE, TEST_LOCATION ); @@ -1009,8 +1002,8 @@ int UtcDaliVisualGetPropertyMap10(void) VisualFactory factory = VisualFactory::Get(); Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, DevelVisual::TEXT ); - propertyMap.Insert( DevelVisual::Property::MIX_COLOR, Color::BLACK ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::TEXT ); + propertyMap.Insert( Visual::Property::MIX_COLOR, Color::BLACK ); propertyMap.Insert( "renderingBackend", static_cast( Toolkit::Text::DEFAULT_RENDERING_BACKEND ) ); propertyMap.Insert( "enableMarkup", false ); propertyMap.Insert( "text", "Hello world" ); @@ -1031,11 +1024,11 @@ int UtcDaliVisualGetPropertyMap10(void) textVisual.CreatePropertyMap( resultMap ); //Check values in the result map are identical to the initial map's values. - Property::Value* value = resultMap.Find( Visual::Property::TYPE, Property::INTEGER ); + Property::Value* value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER ); DALI_TEST_CHECK( value ); - DALI_TEST_EQUALS( value->Get(), (int)DevelVisual::TEXT, TEST_LOCATION ); + DALI_TEST_EQUALS( value->Get(), (int)Visual::TEXT, TEST_LOCATION ); - value = resultMap.Find( DevelVisual::Property::MIX_COLOR, Property::VECTOR4 ); + value = resultMap.Find( Visual::Property::MIX_COLOR, Property::VECTOR4 ); DALI_TEST_CHECK( value ); DALI_TEST_EQUALS( value->Get(), Color::BLACK, 0.001f, TEST_LOCATION ); @@ -1089,7 +1082,7 @@ int UtcDaliVisualAnimateBorderVisual01(void) VisualFactory factory = VisualFactory::Get(); Property::Map propertyMap; propertyMap.Insert(Visual::Property::TYPE, Visual::BORDER); - propertyMap.Insert(DevelVisual::Property::MIX_COLOR, Vector4(1, 1, 1, 0.8f)); + propertyMap.Insert(Visual::Property::MIX_COLOR, Vector4(1, 1, 1, 0.8f)); propertyMap.Insert(BorderVisual::Property::COLOR, Color::BLUE); propertyMap.Insert(BorderVisual::Property::SIZE, 5.f); Visual::Base borderVisual = factory.CreateVisual( propertyMap ); @@ -1117,7 +1110,7 @@ int UtcDaliVisualAnimateBorderVisual01(void) Renderer renderer = actor.GetRendererAt(0); Property::Index borderColorIndex = DevelHandle::GetPropertyIndex( renderer, BorderVisual::Property::COLOR ); - Property::Index mixColorIndex = DevelHandle::GetPropertyIndex( renderer, DevelVisual::Property::MIX_COLOR ); + Property::Index mixColorIndex = DevelHandle::GetPropertyIndex( renderer, Visual::Property::MIX_COLOR ); Animation animation = dummyImpl.CreateTransition( transition ); @@ -1342,7 +1335,7 @@ int UtcDaliVisualWireframeVisual(void) VisualFactory factory = VisualFactory::Get(); Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::WIREFRAME ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::WIREFRAME ); // Create the visual. Visual::Base visual = factory.CreateVisual( propertyMap ); @@ -1353,7 +1346,7 @@ int UtcDaliVisualWireframeVisual(void) visual.CreatePropertyMap( resultMap ); // Check the property values from the returned map from visual - Property::Value* value = resultMap.Find( Visual::Property::TYPE, Property::INTEGER ); + Property::Value* value = resultMap.Find( Toolkit::Visual::Property::TYPE, Property::INTEGER ); DALI_TEST_CHECK( value ); DALI_TEST_CHECK( value->Get() == Visual::WIREFRAME ); @@ -1373,38 +1366,38 @@ int UtcDaliVisualGetTransform(void) Dali::Property::Map visualMap; colorVisual.CreatePropertyMap( visualMap ); - Property::Value* value = visualMap.Find( Dali::Toolkit::DevelVisual::Property::TRANSFORM ); + Property::Value* value = visualMap.Find( Dali::Toolkit::Visual::Property::TRANSFORM ); Dali::Property::Map* map = value->GetMap(); DALI_TEST_CHECK( map ); //Test default values { - Property::Value* typeValue = map->Find( Toolkit::DevelVisual::Transform::Property::OFFSET ); + Property::Value* typeValue = map->Find( Toolkit::Visual::Transform::Property::OFFSET ); DALI_TEST_CHECK( typeValue ); DALI_TEST_CHECK( typeValue->Get() == Vector2(0.0f,0.0f) ); } { - Property::Value* typeValue = map->Find( Toolkit::DevelVisual::Transform::Property::SIZE ); + Property::Value* typeValue = map->Find( Toolkit::Visual::Transform::Property::SIZE ); DALI_TEST_CHECK( typeValue ); DALI_TEST_CHECK( typeValue->Get() == Vector2(1.0f,1.0f) ); } { - Property::Value* typeValue = map->Find( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY ); + Property::Value* typeValue = map->Find( Toolkit::Visual::Transform::Property::OFFSET_POLICY ); DALI_TEST_CHECK( typeValue ); - DALI_TEST_CHECK( typeValue->Get< Vector2 >() == Vector2( Toolkit::DevelVisual::Transform::Policy::RELATIVE, Toolkit::DevelVisual::Transform::Policy::RELATIVE ) ); + DALI_TEST_CHECK( typeValue->Get< Vector2 >() == Vector2( Toolkit::Visual::Transform::Policy::RELATIVE, Toolkit::Visual::Transform::Policy::RELATIVE ) ); } { - Property::Value* typeValue = map->Find( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY ); + Property::Value* typeValue = map->Find( Toolkit::Visual::Transform::Property::SIZE_POLICY ); DALI_TEST_CHECK( typeValue ); - DALI_TEST_CHECK( typeValue->Get< Vector2 >() == Vector2( Toolkit::DevelVisual::Transform::Policy::RELATIVE, Toolkit::DevelVisual::Transform::Policy::RELATIVE ) ); + DALI_TEST_CHECK( typeValue->Get< Vector2 >() == Vector2( Toolkit::Visual::Transform::Policy::RELATIVE, Toolkit::Visual::Transform::Policy::RELATIVE ) ); } { - Property::Value* typeValue = map->Find( Toolkit::DevelVisual::Transform::Property::ORIGIN ); + Property::Value* typeValue = map->Find( Toolkit::Visual::Transform::Property::ORIGIN ); DALI_TEST_CHECK( typeValue ); DALI_TEST_CHECK( (Toolkit::Align::Type)typeValue->Get() == Toolkit::Align::TOP_BEGIN ); } { - Property::Value* typeValue = map->Find( Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT ); + Property::Value* typeValue = map->Find( Toolkit::Visual::Transform::Property::ANCHOR_POINT ); DALI_TEST_CHECK( typeValue ); DALI_TEST_CHECK( (Toolkit::Align::Type)typeValue->Get() == Toolkit::Align::TOP_BEGIN ); } @@ -1415,47 +1408,47 @@ int UtcDaliVisualGetTransform(void) static void TestTransform( ToolkitTestApplication& application, Visual::Base visual ) { Property::Map transform; - transform.Insert( DevelVisual::Transform::Property::OFFSET, Vector2(10.0f, 10.0f) ); - transform.Insert( DevelVisual::Transform::Property::SIZE, Vector2(0.2f, 0.2f) ); - transform.Insert( DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::DevelVisual::Transform::Policy::ABSOLUTE, Toolkit::DevelVisual::Transform::Policy::ABSOLUTE ) ); - transform.Insert( DevelVisual::Transform::Property::ORIGIN, "CENTER" ); - transform.Insert( DevelVisual::Transform::Property::ANCHOR_POINT, Toolkit::Align::BOTTOM_END ); + transform.Insert( Visual::Transform::Property::OFFSET, Vector2(10.0f, 10.0f) ); + transform.Insert( Visual::Transform::Property::SIZE, Vector2(0.2f, 0.2f) ); + transform.Insert( Visual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) ); + transform.Insert( Visual::Transform::Property::ORIGIN, "CENTER" ); + transform.Insert( Visual::Transform::Property::ANCHOR_POINT, Toolkit::Align::BOTTOM_END ); visual.SetTransformAndSize( transform, Vector2(100, 100) ); Dali::Property::Map visualMap; visual.CreatePropertyMap( visualMap ); - Property::Value* value = visualMap.Find( Dali::Toolkit::DevelVisual::Property::TRANSFORM ); + Property::Value* value = visualMap.Find( Dali::Toolkit::Visual::Property::TRANSFORM ); Dali::Property::Map* map = value->GetMap(); DALI_TEST_CHECK( map ); { - Property::Value* typeValue = map->Find( Toolkit::DevelVisual::Transform::Property::OFFSET ); + Property::Value* typeValue = map->Find( Toolkit::Visual::Transform::Property::OFFSET ); DALI_TEST_CHECK( typeValue ); DALI_TEST_EQUALS( typeValue->Get(),Vector2(10.0f,10.0f), TEST_LOCATION ); } { - Property::Value* typeValue = map->Find( Toolkit::DevelVisual::Transform::Property::SIZE ); + Property::Value* typeValue = map->Find( Toolkit::Visual::Transform::Property::SIZE ); DALI_TEST_CHECK( typeValue ); DALI_TEST_EQUALS( typeValue->Get(), Vector2(0.2f,0.2f), TEST_LOCATION ); } { - Property::Value* typeValue = map->Find( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY ); + Property::Value* typeValue = map->Find( Toolkit::Visual::Transform::Property::OFFSET_POLICY ); DALI_TEST_CHECK( typeValue ); - DALI_TEST_EQUALS( typeValue->Get< Vector2 >(), Vector2( Toolkit::DevelVisual::Transform::Policy::ABSOLUTE, Toolkit::DevelVisual::Transform::Policy::ABSOLUTE ), TEST_LOCATION ); + DALI_TEST_EQUALS( typeValue->Get< Vector2 >(), Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ), TEST_LOCATION ); } { - Property::Value* typeValue = map->Find( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY ); + Property::Value* typeValue = map->Find( Toolkit::Visual::Transform::Property::SIZE_POLICY ); DALI_TEST_CHECK( typeValue ); - DALI_TEST_EQUALS( typeValue->Get< Vector2 >(), Vector2( Toolkit::DevelVisual::Transform::Policy::RELATIVE, Toolkit::DevelVisual::Transform::Policy::RELATIVE ), TEST_LOCATION ); + DALI_TEST_EQUALS( typeValue->Get< Vector2 >(), Vector2( Toolkit::Visual::Transform::Policy::RELATIVE, Toolkit::Visual::Transform::Policy::RELATIVE ), TEST_LOCATION ); } { - Property::Value* typeValue = map->Find( Toolkit::DevelVisual::Transform::Property::ORIGIN ); + Property::Value* typeValue = map->Find( Toolkit::Visual::Transform::Property::ORIGIN ); DALI_TEST_CHECK( typeValue ); DALI_TEST_EQUALS( (Toolkit::Align::Type)typeValue->Get(), Toolkit::Align::CENTER, TEST_LOCATION ); } { - Property::Value* typeValue = map->Find( Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT ); + Property::Value* typeValue = map->Find( Toolkit::Visual::Transform::Property::ANCHOR_POINT ); DALI_TEST_CHECK( typeValue ); DALI_TEST_EQUALS( (Toolkit::Align::Type)typeValue->Get(), Toolkit::Align::BOTTOM_END, TEST_LOCATION ); } @@ -1503,9 +1496,9 @@ static void TestTransform( ToolkitTestApplication& application, Visual::Base vis //Set a new transform transform.Clear(); transform = DefaultTransform(); - transform.Insert( DevelVisual::Transform::Property::OFFSET, Vector2(20.0f, 20.0f) ); - transform.Insert( DevelVisual::Transform::Property::SIZE, Vector2(100.0f, 100.0f) ); - transform.Insert( DevelVisual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::DevelVisual::Transform::Policy::ABSOLUTE, Toolkit::DevelVisual::Transform::Policy::ABSOLUTE ) ); + transform.Insert( Visual::Transform::Property::OFFSET, Vector2(20.0f, 20.0f) ); + transform.Insert( Visual::Transform::Property::SIZE, Vector2(100.0f, 100.0f) ); + transform.Insert( Visual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) ); visual.SetTransformAndSize( transform, Vector2(100, 100) ); application.SendNotification(); application.Render(0); @@ -1551,7 +1544,7 @@ int UtcDaliVisualSetTransform1(void) VisualFactory factory = VisualFactory::Get(); Property::Map propertyMap; - propertyMap[ Visual::Property::TYPE ] = Visual::PRIMITIVE; + propertyMap[ Toolkit::Visual::Property::TYPE ] = Visual::PRIMITIVE; propertyMap[ PrimitiveVisual::Property::MIX_COLOR ] = Color::WHITE; propertyMap[ PrimitiveVisual::Property::SHAPE ] = PrimitiveVisual::Shape::SPHERE; propertyMap[ PrimitiveVisual::Property::SLICES ] = 10; @@ -1570,8 +1563,8 @@ int UtcDaliVisualSetTransform2(void) VisualFactory factory = VisualFactory::Get(); Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::GRADIENT ); - propertyMap.Insert( DevelVisual::Property::MIX_COLOR, Color::GREEN ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::GRADIENT ); + propertyMap.Insert( Visual::Property::MIX_COLOR, Color::GREEN ); Property::Array stopOffsets; stopOffsets.PushBack( 0.0f ); @@ -1592,7 +1585,7 @@ int UtcDaliVisualSetTransform2(void) propertyMap.Insert( GradientVisual::Property::RADIUS, 1.414f ); Visual::Base visual = factory.CreateVisual( propertyMap ); TestTransform( application, visual ); - TestMixColor( visual, DevelVisual::Property::MIX_COLOR, Color::GREEN ); + TestMixColor( visual, Visual::Property::MIX_COLOR, Color::GREEN ); END_TEST; } @@ -1604,13 +1597,13 @@ int UtcDaliVisualSetTransform3(void) VisualFactory factory = VisualFactory::Get(); Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::BORDER ); - propertyMap.Insert( DevelVisual::Property::MIX_COLOR, Color::MAGENTA ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::BORDER ); + propertyMap.Insert( Visual::Property::MIX_COLOR, Color::MAGENTA ); propertyMap.Insert( BorderVisual::Property::COLOR, Vector4(0.f, 1.f, 0.f, 0.6f) ); propertyMap.Insert( BorderVisual::Property::SIZE, 3.0f ); Visual::Base visual = factory.CreateVisual( propertyMap ); TestTransform( application, visual ); - TestMixColor( visual, DevelVisual::Property::MIX_COLOR, Color::MAGENTA ); + TestMixColor( visual, Visual::Property::MIX_COLOR, Color::MAGENTA ); END_TEST; } @@ -1622,8 +1615,8 @@ int UtcDaliVisualSetTransform4(void) VisualFactory factory = VisualFactory::Get(); Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::MESH ); - propertyMap.Insert( DevelVisual::Property::MIX_COLOR, Color::CYAN ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::MESH ); + propertyMap.Insert( Visual::Property::MIX_COLOR, Color::CYAN ); propertyMap.Insert( "objectUrl", TEST_OBJ_FILE_NAME ); propertyMap.Insert( "materialUrl", TEST_MTL_FILE_NAME ); @@ -1632,7 +1625,7 @@ int UtcDaliVisualSetTransform4(void) propertyMap.Insert( "lightPosition", Vector3( 5.0f, 10.0f, 15.0f) ); Visual::Base visual = factory.CreateVisual( propertyMap ); TestTransform( application, visual ); - TestMixColor( visual, DevelVisual::Property::MIX_COLOR, Color::CYAN ); + TestMixColor( visual, Visual::Property::MIX_COLOR, Color::CYAN ); END_TEST; } @@ -1646,7 +1639,7 @@ int UtcDaliVisualSetTransform5(void) Image image = ResourceImage::New(TEST_IMAGE_FILE_NAME, ImageDimensions(100, 200)); Visual::Base visual = factory.CreateVisual(image); TestTransform( application, visual ); - TestMixColor( visual, DevelVisual::Property::MIX_COLOR, Color::WHITE ); + TestMixColor( visual, Visual::Property::MIX_COLOR, Color::WHITE ); END_TEST; } @@ -1659,7 +1652,7 @@ int UtcDaliVisualSetTransform6(void) VisualFactory factory = VisualFactory::Get(); Property::Map propertyMap; propertyMap[Toolkit::Visual::Property::TYPE] = Toolkit::Visual::IMAGE; - propertyMap[DevelVisual::Property::MIX_COLOR] = Color::YELLOW; + propertyMap[Visual::Property::MIX_COLOR] = Color::YELLOW; propertyMap[Toolkit::ImageVisual::Property::URL] = TEST_IMAGE_FILE_NAME; propertyMap[Toolkit::ImageVisual::Property::DESIRED_WIDTH] = 100.0f; propertyMap[Toolkit::ImageVisual::Property::DESIRED_HEIGHT] = 100.0f; @@ -1668,7 +1661,7 @@ int UtcDaliVisualSetTransform6(void) propertyMap[Toolkit::ImageVisual::Property::SYNCHRONOUS_LOADING] = true; Visual::Base visual = factory.CreateVisual(propertyMap); TestTransform( application, visual ); - TestMixColor( visual, DevelVisual::Property::MIX_COLOR, Color::YELLOW ); + TestMixColor( visual, Visual::Property::MIX_COLOR, Color::YELLOW ); END_TEST; } @@ -1682,7 +1675,7 @@ int UtcDaliVisualSetTransform7(void) Image image = ResourceImage::New(TEST_NPATCH_FILE_NAME, ImageDimensions(100, 200)); Visual::Base visual = factory.CreateVisual(image); TestTransform( application, visual ); - TestMixColor( visual, DevelVisual::Property::MIX_COLOR, Color::WHITE ); + TestMixColor( visual, Visual::Property::MIX_COLOR, Color::WHITE ); END_TEST; } @@ -1707,19 +1700,19 @@ int UtcDaliVisualTestTransformPoliciesAsStrings(void) Dali::Property::Map visualMap; visual.CreatePropertyMap( visualMap ); - Property::Value* value = visualMap.Find( Dali::Toolkit::DevelVisual::Property::TRANSFORM ); + Property::Value* value = visualMap.Find( Dali::Toolkit::Visual::Property::TRANSFORM ); Dali::Property::Map* map = value->GetMap(); DALI_TEST_CHECK( map ); { - Property::Value* typeValue = map->Find( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY ); + Property::Value* typeValue = map->Find( Toolkit::Visual::Transform::Property::OFFSET_POLICY ); DALI_TEST_CHECK( typeValue ); - DALI_TEST_EQUALS( typeValue->Get< Vector2 >(), Vector2( Toolkit::DevelVisual::Transform::Policy::ABSOLUTE, Toolkit::DevelVisual::Transform::Policy::RELATIVE ), TEST_LOCATION ); + DALI_TEST_EQUALS( typeValue->Get< Vector2 >(), Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::RELATIVE ), TEST_LOCATION ); } { - Property::Value* typeValue = map->Find( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY ); + Property::Value* typeValue = map->Find( Toolkit::Visual::Transform::Property::SIZE_POLICY ); DALI_TEST_CHECK( typeValue ); - DALI_TEST_EQUALS( typeValue->Get< Vector2 >(), Vector2( Toolkit::DevelVisual::Transform::Policy::RELATIVE, Toolkit::DevelVisual::Transform::Policy::ABSOLUTE ), TEST_LOCATION ); + DALI_TEST_EQUALS( typeValue->Get< Vector2 >(), Vector2( Toolkit::Visual::Transform::Policy::RELATIVE, Toolkit::Visual::Transform::Policy::ABSOLUTE ), TEST_LOCATION ); } END_TEST; @@ -1741,18 +1734,18 @@ int UtcDaliNPatchVisualCustomShader(void) Property::Map transformMap; transformMap["size"] = Vector2( 0.5f, 0.5f ) ; transformMap["offset"] = Vector2( 20.0f, 0.0f ) ; - transformMap["offsetPolicy"] = Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ); + transformMap["offsetPolicy"] = Vector2( Visual::Transform::Policy::ABSOLUTE, Visual::Transform::Policy::ABSOLUTE ); transformMap["anchorPoint"] = Align::CENTER; transformMap["origin"] = Align::CENTER; - properties[DevelVisual::Property::TRANSFORM] = transformMap; + properties[Visual::Property::TRANSFORM] = transformMap; properties[Visual::Property::TYPE] = Visual::IMAGE; - properties[DevelVisual::Property::MIX_COLOR] = Color::BLUE; + properties[Visual::Property::MIX_COLOR] = Color::BLUE; properties[Visual::Property::SHADER]=shader; properties[ImageVisual::Property::URL] = TEST_NPATCH_FILE_NAME; Visual::Base visual = factory.CreateVisual( properties ); - TestMixColor( visual, DevelVisual::Property::MIX_COLOR, Color::BLUE ); + TestMixColor( visual, Visual::Property::MIX_COLOR, Color::BLUE ); // trigger creation through setting on stage DummyControl dummy = DummyControl::New(true); @@ -1788,14 +1781,14 @@ int UtcDaliGradientVisualBlendMode(void) VisualFactory factory = VisualFactory::Get(); Visual::Base opaqueGradientVisual = factory.CreateVisual( - Property::Map().Add( Visual::Property::TYPE, Visual::GRADIENT ) + Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::GRADIENT ) .Add( GradientVisual::Property::START_POSITION, Vector2( -0.5f, -0.5f ) ) .Add( GradientVisual::Property::END_POSITION, Vector2( 0.5f, 0.5f ) ) .Add( GradientVisual::Property::STOP_COLOR, Property::Array().Add( Color::RED ) .Add( Color::GREEN ) ) ); Visual::Base alphaGradientVisual = factory.CreateVisual( - Property::Map().Add( Visual::Property::TYPE, Visual::GRADIENT ) + Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::GRADIENT ) .Add( GradientVisual::Property::START_POSITION, Vector2( -0.5f, -0.5f ) ) .Add( GradientVisual::Property::END_POSITION, Vector2( 0.5f, 0.5f ) ) .Add( GradientVisual::Property::STOP_COLOR, Property::Array().Add( Color::RED ) @@ -1876,7 +1869,7 @@ int UtcDaliVisualTextVisualRender(void) VisualFactory factory = VisualFactory::Get(); Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, DevelVisual::TEXT ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::TEXT ); propertyMap.Insert( "mixColor", Color::WHITE ); propertyMap.Insert( "renderingBackend", static_cast( Toolkit::Text::DEFAULT_RENDERING_BACKEND ) ); propertyMap.Insert( "enableMarkup", false ); @@ -1910,14 +1903,14 @@ int UtcDaliVisualTextVisualRender(void) // Create a texture bigger than the maximum allowed by the image atlas. Used to increase coverage. propertyMap.Clear(); - propertyMap.Insert( Visual::Property::TYPE, DevelVisual::TEXT ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::TEXT ); propertyMap.Insert( TextVisual::Property::ENABLE_MARKUP, true ); propertyMap.Insert( TextVisual::Property::TEXT, "Hello world" ); propertyMap.Insert( TextVisual::Property::MULTI_LINE, true ); Property::Map transformMap; transformMap.Insert( "size", Vector2( 0.5f, 0.5f ) ); - propertyMap.Insert( DevelVisual::Property::TRANSFORM, transformMap ); + propertyMap.Insert( Visual::Property::TRANSFORM, transformMap ); textVisual = factory.CreateVisual( propertyMap ); textVisual.SetDepthIndex( 1 ); @@ -1945,7 +1938,7 @@ int UtcDaliVisualTextVisualDisableEnable(void) VisualFactory factory = VisualFactory::Get(); Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, DevelVisual::TEXT ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::TEXT ); propertyMap.Insert( "mixColor", Color::WHITE ); propertyMap.Insert( "renderingBackend", static_cast( Toolkit::Text::DEFAULT_RENDERING_BACKEND ) ); propertyMap.Insert( "enableMarkup", false ); @@ -2000,12 +1993,12 @@ int UtcDaliVisualPremultipliedAlpha(void) { Visual::Base imageVisual = factory.CreateVisual( Property::Map() - .Add( Visual::Property::TYPE, Visual::IMAGE ) + .Add( Toolkit::Visual::Property::TYPE, Visual::IMAGE ) .Add( ImageVisual::Property::URL, TEST_IMAGE_FILE_NAME ) ); Dali::Property::Map visualMap; imageVisual.CreatePropertyMap( visualMap ); - Property::Value* value = visualMap.Find( DevelVisual::Property::PREMULTIPLIED_ALPHA ); + Property::Value* value = visualMap.Find( Visual::Property::PREMULTIPLIED_ALPHA ); // test values DALI_TEST_CHECK( value ); @@ -2016,13 +2009,13 @@ int UtcDaliVisualPremultipliedAlpha(void) { Visual::Base imageVisual = factory.CreateVisual( Property::Map() - .Add( Visual::Property::TYPE, Visual::IMAGE ) + .Add( Toolkit::Visual::Property::TYPE, Visual::IMAGE ) .Add( ImageVisual::Property::URL, TEST_IMAGE_FILE_NAME ) - .Add( DevelVisual::Property::PREMULTIPLIED_ALPHA, true ) ); + .Add( Visual::Property::PREMULTIPLIED_ALPHA, true ) ); Dali::Property::Map visualMap; imageVisual.CreatePropertyMap( visualMap ); - Property::Value* value = visualMap.Find( DevelVisual::Property::PREMULTIPLIED_ALPHA ); + Property::Value* value = visualMap.Find( Visual::Property::PREMULTIPLIED_ALPHA ); // test values DALI_TEST_CHECK( value ); @@ -2033,12 +2026,12 @@ int UtcDaliVisualPremultipliedAlpha(void) { Visual::Base imageVisual = factory.CreateVisual( Property::Map() - .Add( Visual::Property::TYPE, Visual::IMAGE ) + .Add( Toolkit::Visual::Property::TYPE, Visual::IMAGE ) .Add( ImageVisual::Property::URL, TEST_SVG_FILE_NAME ) ); Dali::Property::Map visualMap; imageVisual.CreatePropertyMap( visualMap ); - Property::Value* value = visualMap.Find( DevelVisual::Property::PREMULTIPLIED_ALPHA ); + Property::Value* value = visualMap.Find( Visual::Property::PREMULTIPLIED_ALPHA ); // test values DALI_TEST_CHECK( value ); diff --git a/automated-tests/src/dali-toolkit/utc-Dali-VisualFactory.cpp b/automated-tests/src/dali-toolkit/utc-Dali-VisualFactory.cpp index 337fb24..91c25fd 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-VisualFactory.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-VisualFactory.cpp @@ -19,13 +19,7 @@ #include #include #include -#include -#include -#include #include -#include -#include -#include #include #include #include "dummy-control.h" @@ -55,12 +49,12 @@ Property::Map DefaultTransform() { Property::Map transformMap; transformMap - .Add( Toolkit::DevelVisual::Transform::Property::OFFSET, Vector2(0.0f, 0.0f) ) - .Add( Toolkit::DevelVisual::Transform::Property::SIZE, Vector2(1.0f, 1.0f) ) - .Add( Toolkit::DevelVisual::Transform::Property::ORIGIN, Toolkit::Align::CENTER ) - .Add( Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT, Toolkit::Align::CENTER ) - .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::DevelVisual::Transform::Policy::RELATIVE, Toolkit::DevelVisual::Transform::Policy::RELATIVE ) ) - .Add( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::DevelVisual::Transform::Policy::RELATIVE, Toolkit::DevelVisual::Transform::Policy::RELATIVE ) ); + .Add( Toolkit::Visual::Transform::Property::OFFSET, Vector2(0.0f, 0.0f) ) + .Add( Toolkit::Visual::Transform::Property::SIZE, Vector2(1.0f, 1.0f) ) + .Add( Toolkit::Visual::Transform::Property::ORIGIN, Toolkit::Align::CENTER ) + .Add( Toolkit::Visual::Transform::Property::ANCHOR_POINT, Toolkit::Align::CENTER ) + .Add( Toolkit::Visual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::Visual::Transform::Policy::RELATIVE, Toolkit::Visual::Transform::Policy::RELATIVE ) ) + .Add( Toolkit::Visual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::Visual::Transform::Policy::RELATIVE, Toolkit::Visual::Transform::Policy::RELATIVE ) ); return transformMap; } @@ -340,7 +334,7 @@ int UtcDaliVisualFactoryGetColorVisual2(void) Vector4 testColor( 1.f, 0.5f, 0.3f, 0.2f ); Dali::Property::Map map; - map[ Visual::Property::TYPE ] = Visual::COLOR; + map[ Toolkit::Visual::Property::TYPE ] = Visual::COLOR; map[ ColorVisual::Property::MIX_COLOR ] = testColor; Visual::Base visual = factory.CreateVisual( map ); DALI_TEST_CHECK( visual ); @@ -422,7 +416,7 @@ int UtcDaliVisualFactoryGetBorderVisual2(void) float testSize = 5.f; Dali::Property::Map propertyMap; - propertyMap[ Visual::Property::TYPE ] = Visual::BORDER; + propertyMap[ Toolkit::Visual::Property::TYPE ] = Visual::BORDER; propertyMap[ BorderVisual::Property::COLOR ] = testColor; propertyMap[ BorderVisual::Property::SIZE ] = testSize; Visual::Base visual = factory.CreateVisual( propertyMap ); @@ -457,7 +451,7 @@ int UtcDaliVisualFactoryGetBorderVisual2(void) // enable the anti-aliasing Dali::Property::Map map; - map[ Visual::Property::TYPE ] = Visual::BORDER; + map[ Toolkit::Visual::Property::TYPE ] = Visual::BORDER; map[ BorderVisual::Property::COLOR ] = testColor; map[ BorderVisual::Property::SIZE ] = testSize; map[ BorderVisual::Property::ANTI_ALIASING ] = true; @@ -610,7 +604,7 @@ int UtcDaliVisualFactoryGetNPatchVisual1(void) Integration::ResourcePointer ninePatchResource = CustomizeNinePatch( application, ninePatchImageWidth, ninePatchImageHeight, stretchRangesX, stretchRangesY ); Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, DevelVisual::N_PATCH ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::N_PATCH ); propertyMap.Insert( ImageVisual::Property::URL, TEST_NPATCH_FILE_NAME ); { tet_infoline( "whole grid" ); @@ -660,9 +654,9 @@ int UtcDaliVisualFactoryGetNPatchVisual2(void) DALI_TEST_CHECK( factory ); Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, DevelVisual::N_PATCH ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::N_PATCH ); propertyMap.Insert( ImageVisual::Property::URL, gImage_34_RGBA ); - propertyMap.Insert( DevelImageVisual::Property::BORDER, Rect< int >( 2, 2, 2, 2 ) ); + propertyMap.Insert( ImageVisual::Property::BORDER, Rect< int >( 2, 2, 2, 2 ) ); { tet_infoline( "whole grid" ); Visual::Base visual = factory.CreateVisual( propertyMap ); @@ -695,9 +689,9 @@ int UtcDaliVisualFactoryGetNPatchVisual2(void) } propertyMap.Clear(); - propertyMap.Insert( Visual::Property::TYPE, DevelVisual::N_PATCH ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::N_PATCH ); propertyMap.Insert( ImageVisual::Property::URL, gImage_34_RGBA ); - propertyMap.Insert( DevelImageVisual::Property::BORDER, Rect< int >( 1, 1, 1, 1 ) ); + propertyMap.Insert( ImageVisual::Property::BORDER, Rect< int >( 1, 1, 1, 1 ) ); { tet_infoline( "whole grid" ); Visual::Base visual = factory.CreateVisual( propertyMap ); @@ -738,7 +732,7 @@ int UtcDaliVisualFactoryGetNPatchVisual3(void) Integration::ResourcePointer ninePatchResource = CustomizeNinePatch( application, ninePatchImageWidth, ninePatchImageHeight, stretchRangesX, stretchRangesY ); Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, DevelVisual::N_PATCH ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::N_PATCH ); propertyMap.Insert( ImageVisual::Property::URL, TEST_NPATCH_FILE_NAME ); { Visual::Base visual = factory.CreateVisual( propertyMap ); @@ -904,7 +898,7 @@ int UtcDaliVisualFactoryGetNPatchVisualN2(void) DALI_TEST_CHECK( factory ); Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, DevelVisual::N_PATCH ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::N_PATCH ); propertyMap.Insert( ImageVisual::Property::URL, "ERROR.9.jpg" ); Visual::Base visual = factory.CreateVisual( propertyMap ); @@ -941,7 +935,7 @@ int UtcDaliVisualFactoryGetNPatchVisualN3(void) DALI_TEST_CHECK( factory ); Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, 111 ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, 111 ); propertyMap.Insert( ImageVisual::Property::URL, "ERROR.9.jpg" ); Visual::Base visual = factory.CreateVisual( propertyMap ); @@ -1122,7 +1116,7 @@ int UtcDaliVisualFactoryGetMeshVisual1(void) //Set up visual properties. Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::MESH ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::MESH ); propertyMap.Insert( MeshVisual::Property::OBJECT_URL, TEST_OBJ_FILE_NAME ); //Test to see if mesh loads correctly. @@ -1142,7 +1136,7 @@ int UtcDaliVisualFactoryGetMeshVisual2(void) //Set up visual properties. Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::MESH ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::MESH ); propertyMap.Insert( MeshVisual::Property::OBJECT_URL, TEST_OBJ_FILE_NAME ); propertyMap.Insert( MeshVisual::Property::MATERIAL_URL, "" ); propertyMap.Insert( MeshVisual::Property::TEXTURES_PATH, "" ); @@ -1163,7 +1157,7 @@ int UtcDaliVisualFactoryGetMeshVisual3b(void) //Set up visual properties. Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::MESH ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::MESH ); propertyMap.Insert( MeshVisual::Property::OBJECT_URL, TEST_OBJ_FILE_NAME ); propertyMap.Insert( MeshVisual::Property::MATERIAL_URL, TEST_MTL_FILE_NAME ); propertyMap.Insert( MeshVisual::Property::USE_MIPMAPPING, Color::GREEN ); // Test that wrong property types don't prevent the object load @@ -1187,7 +1181,7 @@ int UtcDaliVisualFactoryGetMeshVisual3(void) //Set up visual properties. Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::MESH ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::MESH ); propertyMap.Insert( MeshVisual::Property::OBJECT_URL, TEST_OBJ_FILE_NAME ); propertyMap.Insert( MeshVisual::Property::MATERIAL_URL, TEST_MTL_FILE_NAME ); propertyMap.Insert( MeshVisual::Property::USE_MIPMAPPING, false ); @@ -1212,7 +1206,7 @@ int UtcDaliVisualFactoryGetMeshVisual4(void) //Set up visual properties. Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::MESH ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::MESH ); propertyMap.Insert( MeshVisual::Property::OBJECT_URL, TEST_OBJ_FILE_NAME ); propertyMap.Insert( MeshVisual::Property::MATERIAL_URL, TEST_SIMPLE_MTL_FILE_NAME ); propertyMap.Insert( MeshVisual::Property::TEXTURES_PATH, TEST_RESOURCE_DIR "/" ); @@ -1233,7 +1227,7 @@ int UtcDaliVisualFactoryGetMeshVisual5(void) //Set up visual properties. Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::MESH ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::MESH ); propertyMap.Insert( "objectUrl", TEST_OBJ_FILE_NAME ); propertyMap.Insert( "materialUrl", TEST_MTL_FILE_NAME ); propertyMap.Insert( "texturesPath", TEST_RESOURCE_DIR "/" ); @@ -1259,7 +1253,7 @@ int UtcDaliVisualFactoryGetMeshVisual6(void) //Set up visual properties. Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::MESH ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::MESH ); propertyMap.Insert( MeshVisual::Property::OBJECT_URL, TEST_OBJ_FILE_NAME ); propertyMap.Insert( MeshVisual::Property::MATERIAL_URL, TEST_MTL_FILE_NAME ); propertyMap.Insert( MeshVisual::Property::TEXTURES_PATH, TEST_RESOURCE_DIR "/" ); @@ -1281,7 +1275,7 @@ int UtcDaliVisualFactoryGetMeshVisual7(void) //Set up visual properties. Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::MESH ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::MESH ); propertyMap.Insert( MeshVisual::Property::OBJECT_URL, TEST_OBJ_FILE_NAME ); propertyMap.Insert( MeshVisual::Property::MATERIAL_URL, TEST_MTL_FILE_NAME ); propertyMap.Insert( MeshVisual::Property::TEXTURES_PATH, TEST_RESOURCE_DIR "/" ); @@ -1304,7 +1298,7 @@ int UtcDaliVisualFactoryGetMeshVisual8(void) //Set up visual properties. Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::MESH ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::MESH ); propertyMap.Insert( MeshVisual::Property::OBJECT_URL, TEST_SIMPLE_OBJ_FILE_NAME ); propertyMap.Insert( MeshVisual::Property::MATERIAL_URL, TEST_MTL_FILE_NAME ); propertyMap.Insert( MeshVisual::Property::TEXTURES_PATH, TEST_RESOURCE_DIR "/" ); @@ -1325,7 +1319,7 @@ int UtcDaliVisualFactoryGetMeshVisualN1(void) //Set up visual properties. Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::MESH ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::MESH ); propertyMap.Insert( MeshVisual::Property::MATERIAL_URL, TEST_MTL_FILE_NAME ); propertyMap.Insert( MeshVisual::Property::TEXTURES_PATH, TEST_RESOURCE_DIR "/" ); @@ -1346,7 +1340,7 @@ int UtcDaliVisualFactoryGetMeshVisualN2(void) //Set up visual properties. Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::MESH ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::MESH ); propertyMap.Insert( MeshVisual::Property::OBJECT_URL, TEST_OBJ_FILE_NAME ); propertyMap.Insert( MeshVisual::Property::MATERIAL_URL, "invalid" ); propertyMap.Insert( MeshVisual::Property::TEXTURES_PATH, "also invalid" ); @@ -1368,7 +1362,7 @@ int UtcDaliVisualFactoryGetMeshVisualN3(void) //Set up visual properties. Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::MESH ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::MESH ); propertyMap.Insert( MeshVisual::Property::OBJECT_URL, "invalid" ); propertyMap.Insert( MeshVisual::Property::MATERIAL_URL, TEST_MTL_FILE_NAME ); propertyMap.Insert( MeshVisual::Property::TEXTURES_PATH, TEST_RESOURCE_DIR "/" ); @@ -1428,7 +1422,7 @@ int UtcDaliVisualFactoryGetPrimitiveVisual1(void) //Set up visual properties. Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE ); propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::CUBE ); //Test to see if shape loads correctly. @@ -1447,7 +1441,7 @@ int UtcDaliVisualFactoryGetPrimitiveVisual2(void) //Set up visual properties. Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE ); propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::CUBE ); propertyMap.Insert( PrimitiveVisual::Property::MIX_COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) ); propertyMap.Insert( PrimitiveVisual::Property::SLICES, 10 ); @@ -1476,7 +1470,7 @@ int UtcDaliVisualFactoryGetPrimitiveVisual3(void) //Set up visual properties. Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE ); propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE ); propertyMap.Insert( PrimitiveVisual::Property::MIX_COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) ); propertyMap.Insert( PrimitiveVisual::Property::SLICES, 10 ); @@ -1498,7 +1492,7 @@ int UtcDaliVisualFactoryGetPrimitiveVisual4(void) //Set up visual properties. Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE ); propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::CONICAL_FRUSTRUM ); propertyMap.Insert( PrimitiveVisual::Property::MIX_COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) ); propertyMap.Insert( PrimitiveVisual::Property::SLICES, 10 ); @@ -1522,7 +1516,7 @@ int UtcDaliVisualFactoryGetPrimitiveVisual5(void) //Set up visual properties. Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE ); propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::BEVELLED_CUBE ); propertyMap.Insert( PrimitiveVisual::Property::MIX_COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) ); propertyMap.Insert( PrimitiveVisual::Property::BEVEL_PERCENTAGE, 0.7f ); @@ -1543,7 +1537,7 @@ int UtcDaliVisualFactoryGetPrimitiveVisual6(void) //Set up visual properties. Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE ); propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::OCTAHEDRON ); propertyMap.Insert( PrimitiveVisual::Property::MIX_COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) ); @@ -1563,7 +1557,7 @@ int UtcDaliVisualFactoryGetPrimitiveVisual7(void) //Set up visual properties. Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE ); propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::CONE ); propertyMap.Insert( PrimitiveVisual::Property::MIX_COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) ); propertyMap.Insert( PrimitiveVisual::Property::SLICES, 10 ); @@ -1586,7 +1580,7 @@ int UtcDaliVisualFactoryGetPrimitiveVisual8(void) //Set up visual properties. Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE ); propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE ); propertyMap.Insert( PrimitiveVisual::Property::MIX_COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) ); propertyMap.Insert( MeshVisual::Property::LIGHT_POSITION, Vector3( 0.0, 1.0, 2.0 ) ); @@ -1607,7 +1601,7 @@ int UtcDaliVisualFactoryGetPrimitiveVisual9(void) //Set up visual properties. Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE ); propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE ); propertyMap.Insert( PrimitiveVisual::Property::SLICES, Property::Value( 1000000 ) ); @@ -1627,7 +1621,7 @@ int UtcDaliVisualFactoryGetPrimitiveVisual10(void) //Set up visual properties. Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE ); propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE ); propertyMap.Insert( PrimitiveVisual::Property::SLICES, Property::Value( 2 ) ); @@ -1647,7 +1641,7 @@ int UtcDaliVisualFactoryGetPrimitiveVisual11(void) //Set up visual properties. Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE ); propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE ); propertyMap.Insert( PrimitiveVisual::Property::STACKS, Property::Value( 1000000 ) ); @@ -1667,7 +1661,7 @@ int UtcDaliVisualFactoryGetPrimitiveVisual12(void) //Set up visual properties. Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE ); propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE ); propertyMap.Insert( PrimitiveVisual::Property::STACKS, Property::Value( 1 ) ); @@ -1687,7 +1681,7 @@ int UtcDaliVisualFactoryGetPrimitiveVisual13(void) //Set up visual properties. Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE ); propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE ); propertyMap.Insert( PrimitiveVisual::Property::SCALE_DIMENSIONS, Vector3::ZERO ); @@ -1707,7 +1701,7 @@ int UtcDaliVisualFactoryGetPrimitiveVisual14(void) //Set up visual properties. Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE ); propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE ); propertyMap.Insert( PrimitiveVisual::Property::BEVEL_PERCENTAGE, Property::Value( -1.0f ) ); @@ -1727,7 +1721,7 @@ int UtcDaliVisualFactoryGetPrimitiveVisual15(void) //Set up visual properties. Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE ); propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE ); propertyMap.Insert( PrimitiveVisual::Property::BEVEL_PERCENTAGE, Property::Value( 2.0f ) ); @@ -1747,7 +1741,7 @@ int UtcDaliVisualFactoryGetPrimitiveVisual16(void) //Set up visual properties. Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE ); propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE ); propertyMap.Insert( PrimitiveVisual::Property::BEVEL_SMOOTHNESS, Property::Value( -1.0f ) ); @@ -1767,7 +1761,7 @@ int UtcDaliVisualFactoryGetPrimitiveVisual17(void) //Set up visual properties. Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE ); propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::SPHERE ); propertyMap.Insert( PrimitiveVisual::Property::BEVEL_SMOOTHNESS, Property::Value( 2.0f ) ); @@ -1787,7 +1781,7 @@ int UtcDaliVisualFactoryGetPrimitiveVisualN1(void) //Set up visual properties, without supplying shape. Property::Map propertyMap; - propertyMap.Insert( Visual::Property::TYPE, Visual::PRIMITIVE ); + propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE ); //Test to see if shape loads regardless of missing input. TestPrimitiveVisualWithProperties( propertyMap, application ); @@ -1882,7 +1876,7 @@ int UtcDaliVisualFactoryGetAnimatedImageVisual2(void) const Vector4 pixelArea(-0.5f, -0.5f, 2.f, 2.f); Property::Map propertyMap; - propertyMap.Add( Visual::Property::TYPE, Visual::IMAGE ) + propertyMap.Add( Toolkit::Visual::Property::TYPE, Visual::IMAGE ) .Add( ImageVisual::Property::URL, TEST_GIF_FILE_NAME ) .Add( ImageVisual::Property::PIXEL_AREA, pixelArea ) .Add( ImageVisual::Property::WRAP_MODE_U, WrapMode::MIRRORED_REPEAT ) diff --git a/dali-toolkit/dali-toolkit.h b/dali-toolkit/dali-toolkit.h index 35d9d9c..2ce8e89 100644 --- a/dali-toolkit/dali-toolkit.h +++ b/dali-toolkit/dali-toolkit.h @@ -66,8 +66,10 @@ #include #include #include +#include #include +#include #include #include #include diff --git a/dali-toolkit/devel-api/align-enums.h b/dali-toolkit/devel-api/direction-enums.h similarity index 73% rename from dali-toolkit/devel-api/align-enums.h rename to dali-toolkit/devel-api/direction-enums.h index 7cba1cd..ff86b16 100644 --- a/dali-toolkit/devel-api/align-enums.h +++ b/dali-toolkit/devel-api/direction-enums.h @@ -2,7 +2,7 @@ #define __DALI_TOOLKIT_DEVEL_API_ALIGN_ENUMS_H__ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -34,25 +34,6 @@ namespace Direction }; } -/** - * @brief Enum used to describe anchor point and parent origin of visuals - */ -namespace Align -{ - enum Type - { - TOP_BEGIN = 0, - TOP_CENTER, - TOP_END, - CENTER_BEGIN, - CENTER, - CENTER_END, - BOTTOM_BEGIN, - BOTTOM_CENTER, - BOTTOM_END - }; -} - } // namespace Toolkit } // namespace Dali diff --git a/dali-toolkit/devel-api/file.list b/dali-toolkit/devel-api/file.list index cb34265..65ef332 100644 --- a/dali-toolkit/devel-api/file.list +++ b/dali-toolkit/devel-api/file.list @@ -44,7 +44,7 @@ devel_api_src_files = \ # Add devel header files here devel_api_header_files = \ - $(devel_api_src_dir)/align-enums.h + $(devel_api_src_dir)/direction-enums.h devel_api_controls_header_files = \ $(devel_api_src_dir)/controls/control-depth-index-ranges.h \ @@ -94,11 +94,6 @@ devel_api_visual_factory_header_files = \ $(devel_api_src_dir)/visual-factory/visual-factory.h \ $(devel_api_src_dir)/visual-factory/visual-base.h -devel_api_visuals_header_files = \ - $(devel_api_src_dir)/visuals/text-visual-properties.h \ - $(devel_api_src_dir)/visuals/image-visual-properties-devel.h \ - $(devel_api_src_dir)/visuals/visual-properties-devel.h - devel_api_shadow_view_header_files = \ $(devel_api_src_dir)/controls/shadow-view/shadow-view.h diff --git a/dali-toolkit/devel-api/shader-effects/alpha-discard-effect.h b/dali-toolkit/devel-api/shader-effects/alpha-discard-effect.h index cc69acf..e5cd8f9 100644 --- a/dali-toolkit/devel-api/shader-effects/alpha-discard-effect.h +++ b/dali-toolkit/devel-api/shader-effects/alpha-discard-effect.h @@ -2,7 +2,7 @@ #define __DALI_TOOLKIT_ALPHA_DISCARD_EFFECT_H__ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -66,7 +66,7 @@ inline Property::Map CreateAlphaDiscardEffect() Property::Map customShader; customShader[ Visual::Shader::Property::FRAGMENT_SHADER ] = ALPHA_DISCARD_FRAGMENT_SHADER_SOURCE; - map[ Visual::Property::SHADER ] = customShader; + map[ Toolkit::Visual::Property::SHADER ] = customShader; return map; } diff --git a/dali-toolkit/devel-api/shader-effects/dissolve-effect.h b/dali-toolkit/devel-api/shader-effects/dissolve-effect.h index 0c26d95..b0660be 100644 --- a/dali-toolkit/devel-api/shader-effects/dissolve-effect.h +++ b/dali-toolkit/devel-api/shader-effects/dissolve-effect.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_SHADER_EFFECT_DISSOLVE_H /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -225,7 +225,7 @@ inline Property::Map CreateDissolveEffect( bool useHighPrecision = true ) customShader[ Visual::Shader::Property::HINTS ] = Shader::Hint::OUTPUT_IS_TRANSPARENT; - map[ Visual::Property::SHADER ] = customShader; + map[ Toolkit::Visual::Property::SHADER ] = customShader; return map; } diff --git a/dali-toolkit/devel-api/shader-effects/distance-field-effect.h b/dali-toolkit/devel-api/shader-effects/distance-field-effect.h index a5d6c26..703340c 100644 --- a/dali-toolkit/devel-api/shader-effects/distance-field-effect.h +++ b/dali-toolkit/devel-api/shader-effects/distance-field-effect.h @@ -2,7 +2,7 @@ #define __DALI_TOOLKIT_SHADER_EFFECT_DISTANCEFIELD_H__ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -171,7 +171,7 @@ inline Dali::Property::Map CreateDistanceFieldEffect() customShader[ Visual::Shader::Property::FRAGMENT_SHADER ] = fragmentShaderString; customShader[ Visual::Shader::Property::HINTS ] = Shader::Hint::OUTPUT_IS_TRANSPARENT; - map[ Visual::Property::SHADER ] = customShader; + map[ Toolkit::Visual::Property::SHADER ] = customShader; return map; } 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 afeba53..0593d7d 100644 --- a/dali-toolkit/devel-api/shader-effects/image-region-effect.h +++ b/dali-toolkit/devel-api/shader-effects/image-region-effect.h @@ -2,7 +2,7 @@ #define __DALI_TOOLKIT_IMAGE_REGION_EFFECT_H__ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -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[ DevelVisual::Property::SHADER ] = customShader; + map[ Toolkit::Visual::Property::SHADER ] = customShader; return map; } diff --git a/dali-toolkit/devel-api/shader-effects/motion-blur-effect.h b/dali-toolkit/devel-api/shader-effects/motion-blur-effect.h index 70fd967..de0491c 100644 --- a/dali-toolkit/devel-api/shader-effects/motion-blur-effect.h +++ b/dali-toolkit/devel-api/shader-effects/motion-blur-effect.h @@ -2,7 +2,7 @@ #define __DALI_TOOLKIT_SHADER_EFFECT_MOTION_BLUR_H__ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -237,7 +237,7 @@ inline Property::Map CreateMotionBlurEffect() customShader[ Visual::Shader::Property::HINTS ] = Shader::Hint::OUTPUT_IS_TRANSPARENT; - map[ Visual::Property::SHADER ] = customShader; + map[ Toolkit::Visual::Property::SHADER ] = customShader; return map; } diff --git a/dali-toolkit/devel-api/shader-effects/motion-stretch-effect.h b/dali-toolkit/devel-api/shader-effects/motion-stretch-effect.h index dcbda9e..07ee2dd 100644 --- a/dali-toolkit/devel-api/shader-effects/motion-stretch-effect.h +++ b/dali-toolkit/devel-api/shader-effects/motion-stretch-effect.h @@ -2,7 +2,7 @@ #define __DALI_TOOLKIT_SHADER_EFFECT_MOTION_STRETCH_H__ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -201,7 +201,7 @@ inline Property::Map CreateMotionStretchEffect() customShader[ Visual::Shader::Property::HINTS ] = Shader::Hint::OUTPUT_IS_TRANSPARENT; - map[ Visual::Property::SHADER ] = customShader; + map[ Toolkit::Visual::Property::SHADER ] = customShader; return map; } diff --git a/dali-toolkit/devel-api/visual-factory/visual-base.h b/dali-toolkit/devel-api/visual-factory/visual-base.h index 65fb275..fd00cd0 100644 --- a/dali-toolkit/devel-api/visual-factory/visual-base.h +++ b/dali-toolkit/devel-api/visual-factory/visual-base.h @@ -67,8 +67,8 @@ namespace Visual * | size | VECTOR2 | No | (1,1) | size of visual | * | origin | INTEGER or STRING | No | CENTER | origin of the visual @sa Dali::Toolkit::Align | * | anchorPoint | INTEGER or STRING | No | CENTER | anchor point of the visual @sa Dali::Toolkit::Align | - * | offsetPolicy | VECTOR2 | No | ( RELATIVE, RELATIVE ) | @sa Dali::Toolkit::DevelVisual::Transform::Policy | - * | sizePolicy | VECTOR2 | No | ( RELATIVE, RELATIVE ) | @sa Dali::Toolkit::DevelVisual::Transform::Policy | + * | offsetPolicy | VECTOR2 | No | ( RELATIVE, RELATIVE ) | @sa Dali::Toolkit::Visual::Transform::Policy | + * | sizePolicy | VECTOR2 | No | ( RELATIVE, RELATIVE ) | @sa Dali::Toolkit::Visual::Transform::Policy | * * Relative means that the component describes a factor of the parent control size; * size.x = 1 means full width; size.y = 0.5 means half height. diff --git a/dali-toolkit/devel-api/visuals/image-visual-properties-devel.h b/dali-toolkit/devel-api/visuals/image-visual-properties-devel.h deleted file mode 100644 index ce15c21..0000000 --- a/dali-toolkit/devel-api/visuals/image-visual-properties-devel.h +++ /dev/null @@ -1,131 +0,0 @@ -#ifndef DALI_TOOLKIT_DEVEL_API_VISUALS_IMAGE_VISUAL_PROPERTIES_DEVEL_H -#define DALI_TOOLKIT_DEVEL_API_VISUALS_IMAGE_VISUAL_PROPERTIES_DEVEL_H - -/* - * Copyright (c) 2017 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 - -namespace Dali -{ - -namespace Toolkit -{ - -namespace DevelImageVisual -{ - -namespace Property -{ - -enum Type -{ - URL = Dali::Toolkit::ImageVisual::Property::URL, - FITTING_MODE = Dali::Toolkit::ImageVisual::Property::FITTING_MODE, - SAMPLING_MODE = Dali::Toolkit::ImageVisual::Property::SAMPLING_MODE, - DESIRED_WIDTH = Dali::Toolkit::ImageVisual::Property::DESIRED_WIDTH, - DESIRED_HEIGHT = Dali::Toolkit::ImageVisual::Property::DESIRED_HEIGHT, - SYNCHRONOUS_LOADING = Dali::Toolkit::ImageVisual::Property::SYNCHRONOUS_LOADING, - BORDER_ONLY = Dali::Toolkit::ImageVisual::Property::BORDER_ONLY, - PIXEL_AREA = Dali::Toolkit::ImageVisual::Property::PIXEL_AREA, - WRAP_MODE_U = Dali::Toolkit::ImageVisual::Property::WRAP_MODE_U, - WRAP_MODE_V = Dali::Toolkit::ImageVisual::Property::WRAP_MODE_V, - - /** - * @brief The border of the image - * @details Name "border", type Property::RECTANGLE or Property::VECTOR4 - * The border of the image in the order: left, right, bottom, top. - * - * @note Optional. - * @note For N-Patch images only. - */ - BORDER = WRAP_MODE_V + 1, - - /** - * @brief Whether to use the texture atlas - * @details Name "atlasing", type Property::BOOLEAN, true to enable texture atlas - * - * @note Optional. By default atlasing is off. - */ - - ATLASING = WRAP_MODE_V + 2, - - /** - * @brief URL of a masking image - * @details Name "alphaMaskUrl", type Property::STRING, URL of image to apply as - * a mask after image loading. If set after the main URL has finished loading, this - * may necessitate a re-load of the main image. The alpha mask image will be scaled - * on load to match the size of the main image, then applied to the pixel data - * before uploading to GL. - * @note Optional. - */ - - ALPHA_MASK_URL = WRAP_MODE_V + 3, - - /** - * @brief Defines the batch size for pre-loading images in the AnimatedImageVisual - * @details Name "batchSize", type Property::INTEGER, number of images to pre-load - * before starting to play. Default value: 1 - */ - BATCH_SIZE = WRAP_MODE_V + 4, - - /** - * @brief Defines the cache size for loading images in the AnimatedImageVisual - * @details Name "cacheSize", type Property::INTEGER, number of images to keep - * cached ahead during playback. Default value: 1 - * - * @note, cacheSize should be >= batchSize. - * If it isn't, then the cache will automatically be changed to batchSize. - * @note, because of the defaults, it is expected that the application developer - * tune the batch and cache sizes to their particular use case. - */ - CACHE_SIZE = WRAP_MODE_V + 5, - - /** - * @brief The number of milliseconds between each frame in the AnimatedImageVisual - * @details Name "frameDelay", type Property::INTEGER, The number of milliseconds between each frame. Note, this is only used with the URLS property above. - */ - FRAME_DELAY = WRAP_MODE_V + 6, - - /** - * @brief The scale factor to apply to the content image before masking - * @details Name "maskContentScale", type Property::FLOAT, The scale factor - * to apply to the content before masking. Note, scaled images are cropped to - * the same size as the alpha mask. - */ - MASK_CONTENT_SCALE = WRAP_MODE_V + 7, - - /** - * @brief Whether to crop image to mask or scale mask to fit image - * @details Name "cropToMask", type Property::BOOLEAN, True if the image should - * be cropped to match the mask size, or false if the image should remain the same size. - * Note, if this is false, then the mask is scaled to fit the image before being applied. - */ - CROP_TO_MASK = WRAP_MODE_V + 8, - -}; - -} //namespace Property - -} // namespace DevelImageVisual - -} // namespace Toolkit - -} // namespace Dali - -#endif // DALI_TOOLKIT_DEVEL_API_VISUALS_IMAGE_VISUAL_PROPERTIES_DEVEL_H diff --git a/dali-toolkit/devel-api/visuals/text-visual-properties.h b/dali-toolkit/devel-api/visuals/text-visual-properties.h deleted file mode 100644 index 4286c38..0000000 --- a/dali-toolkit/devel-api/visuals/text-visual-properties.h +++ /dev/null @@ -1,113 +0,0 @@ -#ifndef DALI_TOOLKIT_TEXT_VISUAL_PROPERTIES_H -#define DALI_TOOLKIT_TEXT_VISUAL_PROPERTIES_H - -/* - * Copyright (c) 2017 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 - -namespace Dali -{ - -namespace Toolkit -{ - -namespace TextVisual -{ - -namespace Property -{ - -enum -{ - /** - * @brief The text to display in UTF-8 format, - * @details name "text", type STRING - */ - TEXT = VISUAL_PROPERTY_START_INDEX, - - /** - * @brief The requested font family to use, - * @details name "fontFamily", type STRING - */ - FONT_FAMILY, - - /** - * @brief The requested font style to use, - * @details name "fontStyle", type MAP - */ - FONT_STYLE, - - /** - * @brief The size of font in points - * @details name "pointSize", type FLOAT - */ - POINT_SIZE, - - /** - * @brief The single-line or multi-line layout option - * @details name "multiLine", type BOOLEAN, default false - */ - MULTI_LINE, - - /** - * @brief The line horizontal alignment - * @details name "horizontalAlignment", type STRING, values "BEGIN", "CENTER", "END", default BEGIN - */ - HORIZONTAL_ALIGNMENT, - - /** - * @brief The line vertical alignment - * @details name "verticalAlignment", type STRING, values "TOP", "CENTER", "BOTTOM", default TOP - */ - VERTICAL_ALIGNMENT, - - /** - * @brief The color of the text - * @details name "textColor", type VECTOR4 - */ - TEXT_COLOR, - - /** - * @brief Whether the mark-up processing is enabled - * @details name "enableMarkup", type BOOLEAN - */ - ENABLE_MARKUP, - - /** - * @brief The shadow parameters. - * @details name "shadow", type MAP. - */ - SHADOW, - - /** - * @brief The default underline parameters. - * @details name "underline", type MAP. - */ - UNDERLINE, -}; - -} // namespace Property - -} // namespace TextVisual - -} // namespace Toolkit - -} // namespace Dali - -#endif // DALI_TOOLKIT_TEXT_VISUAL_PROPERTIES_H diff --git a/dali-toolkit/devel-api/visuals/visual-properties-devel.h b/dali-toolkit/devel-api/visuals/visual-properties-devel.h deleted file mode 100644 index 18362b6..0000000 --- a/dali-toolkit/devel-api/visuals/visual-properties-devel.h +++ /dev/null @@ -1,205 +0,0 @@ -#ifndef DALI_TOOLKIT_DEVEL_API_VISUALS_VISUAL_PROPERTIES_DEVEL_H -#define DALI_TOOLKIT_DEVEL_API_VISUALS_VISUAL_PROPERTIES_DEVEL_H - -/* - * Copyright (c) 2017 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 - -namespace Dali -{ - -namespace Toolkit -{ - -namespace DevelVisual -{ - -/** - * @brief All the visual types. - */ -enum Type -{ - BORDER = Dali::Toolkit::Visual::BORDER, - COLOR = Dali::Toolkit::Visual::COLOR, - GRADIENT = Dali::Toolkit::Visual::GRADIENT, - IMAGE = Dali::Toolkit::Visual::IMAGE, - MESH = Dali::Toolkit::Visual::MESH, - PRIMITIVE = Dali::Toolkit::Visual::PRIMITIVE, - WIREFRAME = Dali::Toolkit::Visual::WIREFRAME, - - TEXT = WIREFRAME + 1, ///< Renders text. - N_PATCH = WIREFRAME + 2, ///< Renders an n-patch image. - SVG = WIREFRAME + 3, ///< Renders an SVG image. - ANIMATED_IMAGE = WIREFRAME + 4 ///< Renders a animated image. -}; - -namespace Property -{ - -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 DevelVisual::Transform::Property - */ - TRANSFORM = SHADER + 1, - - /** - * @brief Enables/disables premultiplied alpha. - * The premultiplied alpha is false by default unless this behaviour is modified - * by the derived Visual type. - * - * @details Name "premultipliedAlpha", type Property::Boolean. - * - * @note Optional. - */ - PREMULTIPLIED_ALPHA = SHADER + 2, - - /** - * @brief Mix color is a blend color for any visual. - * @details Name "mixColor", type Property::VECTOR3 or Property::VECTOR4 - * - * @note Optional - */ - MIX_COLOR = SHADER + 3, - - /** - * @brief Opacity is the alpha component of the mixColor, above. - * @details Name "opacity", type Property::FLOAT - * - * @note Optional - */ - OPACITY = SHADER + 4 -}; - -} // namespace Property - -namespace Transform -{ - -/** - * @brief Policies used by the transform for the offset or size. - */ -namespace Policy -{ - -enum Type -{ - RELATIVE = 0, ///< Relative to the control (percentage [0.0f to 1.0f] of the control). - ABSOLUTE = 1 ///< Absolute value in world units. -}; - -} // namespace Policy - -namespace Property -{ - -enum Type -{ - /** - * @brief Offset of the visual, which can be either relative (percentage [0.0f to 1.0f] of the parent) or absolute (in world units). - * @details Name "offset", type Property::VECTOR2 - * @see OFFSET_POLICY - */ - OFFSET, - - /** - * @brief Size of the visual, which can be either relative (percentage [0.0f to 1.0f] of the parent) or absolute (in world units). - * @details Name "size", type Property::VECTOR2 - * @see SIZE_POLICY - */ - SIZE, - - /** - * @brief The origin of the visual within its control area. - * @details Name "origin", type Align::Type (Property::INTEGER) or Property::STRING. - * @see Toolkit::Align - * @note The default is Align::TOP_BEGIN. - */ - ORIGIN, - - /** - * @brief The anchor-point of the visual - * @details Name "anchorPoint", type Align::Type (Property::INTEGER) or Property::STRING. - * @see Toolkit::Align - * @note The default is Align::TOP_BEGIN. - */ - ANCHOR_POINT, - - /** - * @brief Whether the x or y OFFSET values are relative (percentage [0.0f to 1.0f] of the control) or absolute (in world units). - * @details Name "offsetPolicy", type Vector2 or Property::ARRAY of Property::STRING. - * If Property::ARRAY then 2 strings expected for the x and y. - * - * C++: - * @code - * control.SetProperty( ..., // Some visual based property - * Property::Map().Add( ... ) // Properties to set up visual - * .Add( DevelVisual::Property::TRANSFORM, - * Property::Array().Add( DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( Policy::ABSOLUTE, Policy::RELATIVE ) ) ) - * .Add( DevelVisual::Transform::Property::OFFSET, Vector2( 10, 1.0f ) ) ); - * @endcode - * - * JSON: - * @code - * { - * ... - * "transition": - * { - * "offsetPolicy" : [ "ABSOLUTE", "RELATIVE" ], - * "offset" : [ 10, 1.0 ] - * } - * ... - * } - * - * @endcode - * @see Policy::Type - * @note By default, both the x and the y offset is RELATIVE. - */ - OFFSET_POLICY, - - /** - * @brief Whether the width or height SIZE values are relative (percentage [0.0f to 1.0f] of the control) or absolute (in world units). - * @details Name "sizePolicy", type Vector2 or Property::ARRAY of Property::STRING. - * If Property::ARRAY then 2 strings expected for the width and height. - * - * @see Policy::Type - * @see OFFSET_POLICY for example - * @note By default, both the width and the height is RELATIVE to the control's size. - */ - SIZE_POLICY, -}; - -} // namespace Property - -} // namespace Transform - -} // namespace DevelVisual - -} // namespace Toolkit - -} // namespace Dali - -#endif // DALI_TOOLKIT_DEVEL_API_VISUALS_VISUAL_PROPERTIES_DEVEL_H diff --git a/dali-toolkit/internal/builder/style.cpp b/dali-toolkit/internal/builder/style.cpp index 988bd61..a5ced1b 100644 --- a/dali-toolkit/internal/builder/style.cpp +++ b/dali-toolkit/internal/builder/style.cpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include @@ -123,8 +123,8 @@ void Style::ApplyVisual( // merge them into the visual map if( instancedProperties ) { - Property::Value* instanceTypeValue = instancedProperties->Find( Toolkit::DevelVisual::Property::TYPE); - Property::Value* newTypeValue = visualMap.Find( Toolkit::DevelVisual::Property::TYPE, VISUAL_TYPE ); + Property::Value* instanceTypeValue = instancedProperties->Find( Toolkit::Visual::Property::TYPE); + Property::Value* newTypeValue = visualMap.Find( Toolkit::Visual::Property::TYPE, VISUAL_TYPE ); if( instanceTypeValue && newTypeValue ) { int instanceVisualType=-1; 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 085772e..1a1f9f0 100644 --- a/dali-toolkit/internal/controls/bloom-view/bloom-view-impl.cpp +++ b/dali-toolkit/internal/controls/bloom-view/bloom-view-impl.cpp @@ -34,7 +34,7 @@ // 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::DevelVisual::Property::SHADER, customShader ); + visualMap.Insert( Toolkit::Visual::Property::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::DevelVisual::Property::SHADER ] = customShader; + visualMap[ Toolkit::Visual::Property::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 27df32e..bbf81a9 100644 --- a/dali-toolkit/internal/controls/bubble-effect/color-adjuster.h +++ b/dali-toolkit/internal/controls/bubble-effect/color-adjuster.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_INTERNAL_COLOR_ADJUSTER_H /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -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::DevelVisual::Property::SHADER ] = customShader; + map[ Toolkit::Visual::Property::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 149cb4a..7f91013 100644 --- a/dali-toolkit/internal/controls/buttons/button-impl.cpp +++ b/dali-toolkit/internal/controls/buttons/button-impl.cpp @@ -35,14 +35,14 @@ #include #include #include -#include +#include #include #include #include #include #include -#include -#include +#include +#include #if defined(DEBUG_ENABLED) Debug::Filter* gLogButtonFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_BUTTON_CONTROL"); @@ -982,8 +982,8 @@ void Button::OnRelayout( const Vector2& size, RelayoutContainer& container ) Property::Map visualTransform; - visualTransform.Add( Toolkit::DevelVisual::Transform::Property::SIZE, size ) - .Add( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) ); + visualTransform.Add( Toolkit::Visual::Transform::Property::SIZE, size ) + .Add( Toolkit::Visual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) ); currentBackGroundVisual.SetTransformAndSize( visualTransform, size ); } @@ -994,12 +994,12 @@ void Button::OnRelayout( const Vector2& size, RelayoutContainer& container ) Property::Map visualTransform; - visualTransform.Add( Toolkit::DevelVisual::Transform::Property::SIZE, visualSize ) - .Add( Toolkit::DevelVisual::Transform::Property::OFFSET, visualPosition ) - .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) ) - .Add( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) ) - .Add( Toolkit::DevelVisual::Transform::Property::ORIGIN, Toolkit::Align::TOP_BEGIN ) - .Add( Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT, visualAnchorPoint ); + visualTransform.Add( Toolkit::Visual::Transform::Property::SIZE, visualSize ) + .Add( Toolkit::Visual::Transform::Property::OFFSET, visualPosition ) + .Add( Toolkit::Visual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) ) + .Add( Toolkit::Visual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) ) + .Add( Toolkit::Visual::Transform::Property::ORIGIN, Toolkit::Align::TOP_BEGIN ) + .Add( Toolkit::Visual::Transform::Property::ANCHOR_POINT, visualAnchorPoint ); currentVisual.SetTransformAndSize( visualTransform, size ); } @@ -1025,12 +1025,12 @@ void Button::OnRelayout( const Vector2& size, RelayoutContainer& container ) Property::Map textVisualTransform; - textVisualTransform.Add( Toolkit::DevelVisual::Transform::Property::SIZE, preSize ) - .Add( Toolkit::DevelVisual::Transform::Property::OFFSET, labelPosition ) - .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) ) - .Add( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) ) - .Add( Toolkit::DevelVisual::Transform::Property::ORIGIN, Toolkit::Align::TOP_BEGIN ) - .Add( Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT, visualAnchorPoint ); + textVisualTransform.Add( Toolkit::Visual::Transform::Property::SIZE, preSize ) + .Add( Toolkit::Visual::Transform::Property::OFFSET, labelPosition ) + .Add( Toolkit::Visual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) ) + .Add( Toolkit::Visual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) ) + .Add( Toolkit::Visual::Transform::Property::ORIGIN, Toolkit::Align::TOP_BEGIN ) + .Add( Toolkit::Visual::Transform::Property::ANCHOR_POINT, visualAnchorPoint ); textVisual.SetTransformAndSize( textVisualTransform, size ); } @@ -1234,7 +1234,7 @@ void Button::SetProperty( BaseObject* object, Property::Index index, const Prope DALI_LOG_INFO( gLogButtonFilter, Debug::Verbose, "Button::SetProperty Setting TextVisual with string[%s]\n", textString.c_str() ); Property::Map setPropertyMap; - setPropertyMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT ) + setPropertyMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT ) .Add( Toolkit::TextVisual::Property::TEXT, textString ); GetImplementation( button ).MergeWithExistingLabelProperties( setPropertyMap, outTextVisualProperties ); diff --git a/dali-toolkit/internal/controls/buttons/toggle-button-impl.cpp b/dali-toolkit/internal/controls/buttons/toggle-button-impl.cpp index 36366cb..0ecae06 100755 --- a/dali-toolkit/internal/controls/buttons/toggle-button-impl.cpp +++ b/dali-toolkit/internal/controls/buttons/toggle-button-impl.cpp @@ -32,10 +32,10 @@ #include #include #include -#include -#include +#include +#include #include -#include +#include #include #if defined(DEBUG_ENABLED) @@ -323,12 +323,12 @@ void ToggleButton::RelayoutVisual( Property::Index index, const Vector2& size ) DALI_LOG_INFO( gLogButtonFilter, Debug::General, "ToggleButton::OnRelayout Setting visual position to(%f,%f)\n", visualPosition.x, visualPosition.y ); Property::Map visualTransform; - visualTransform.Add( Toolkit::DevelVisual::Transform::Property::SIZE, visualSize ) - .Add( Toolkit::DevelVisual::Transform::Property::OFFSET, visualPosition ) - .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) ) - .Add( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) ) - .Add( Toolkit::DevelVisual::Transform::Property::ORIGIN, Toolkit::Align::CENTER ) - .Add( Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT, Toolkit::Align::CENTER ); + visualTransform.Add( Toolkit::Visual::Transform::Property::SIZE, visualSize ) + .Add( Toolkit::Visual::Transform::Property::OFFSET, visualPosition ) + .Add( Toolkit::Visual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) ) + .Add( Toolkit::Visual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) ) + .Add( Toolkit::Visual::Transform::Property::ORIGIN, Toolkit::Align::CENTER ) + .Add( Toolkit::Visual::Transform::Property::ANCHOR_POINT, Toolkit::Align::CENTER ); visual.SetTransformAndSize( visualTransform, size ); } diff --git a/dali-toolkit/internal/controls/control/control-data-impl.cpp b/dali-toolkit/internal/controls/control/control-data-impl.cpp index 2469beb..43f3161 100644 --- a/dali-toolkit/internal/controls/control/control-data-impl.cpp +++ b/dali-toolkit/internal/controls/control/control-data-impl.cpp @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include #include @@ -85,10 +85,10 @@ void Remove( DictionaryKeys& keys, const std::string& name ) } } -Toolkit::DevelVisual::Type GetVisualTypeFromMap( const Property::Map& map ) +Toolkit::Visual::Type GetVisualTypeFromMap( const Property::Map& map ) { - Property::Value* typeValue = map.Find( Toolkit::DevelVisual::Property::TYPE, VISUAL_TYPE ); - Toolkit::DevelVisual::Type type = Toolkit::DevelVisual::IMAGE; + Property::Value* typeValue = map.Find( Toolkit::Visual::Property::TYPE, VISUAL_TYPE ); + Toolkit::Visual::Type type = Toolkit::Visual::IMAGE; if( typeValue ) { Scripting::GetEnumerationProperty( *typeValue, VISUAL_TYPE_TABLE, VISUAL_TYPE_TABLE_COUNT, type ); @@ -1095,8 +1095,8 @@ void Control::Impl::RecreateChangedVisuals( Dictionary& stateVisu Property::Map fromMap; visual.CreatePropertyMap( fromMap ); - Toolkit::DevelVisual::Type fromType = GetVisualTypeFromMap( fromMap ); - Toolkit::DevelVisual::Type toType = GetVisualTypeFromMap( toMap ); + Toolkit::Visual::Type fromType = GetVisualTypeFromMap( fromMap ); + Toolkit::Visual::Type toType = GetVisualTypeFromMap( toMap ); if( fromType != toType ) { @@ -1104,8 +1104,8 @@ void Control::Impl::RecreateChangedVisuals( Dictionary& stateVisu } else { - if( fromType == Toolkit::DevelVisual::IMAGE || fromType == Toolkit::DevelVisual::N_PATCH - || fromType == Toolkit::DevelVisual::SVG || fromType == Toolkit::DevelVisual::ANIMATED_IMAGE ) + if( fromType == Toolkit::Visual::IMAGE || fromType == Toolkit::Visual::N_PATCH + || fromType == Toolkit::Visual::SVG || fromType == Toolkit::Visual::ANIMATED_IMAGE ) { Property::Value* fromUrl = fromMap.Find( Toolkit::ImageVisual::Property::URL, IMAGE_URL_NAME ); Property::Value* toUrl = toMap.Find( Toolkit::ImageVisual::Property::URL, IMAGE_URL_NAME ); 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 2dddad7..e3e5436 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::DevelVisual::Property::SHADER ] = source; + mCustomShader[ Toolkit::Visual::Property::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 fadd921..e7514b0 100644 --- a/dali-toolkit/internal/controls/image-view/image-view-impl.cpp +++ b/dali-toolkit/internal/controls/image-view/image-view-impl.cpp @@ -27,7 +27,7 @@ // INTERNAL INCLUDES #include #include -#include +#include #include #include #include @@ -267,7 +267,7 @@ void ImageView::SetProperty( BaseObject* object, Property::Index index, const Pr map = value.GetMap(); if( map ) { - Property::Value* shaderValue = map->Find( Toolkit::DevelVisual::Property::SHADER, CUSTOM_SHADER ); + Property::Value* shaderValue = map->Find( Toolkit::Visual::Property::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 bb48404..f4ad54f 100644 --- a/dali-toolkit/internal/controls/magnifier/magnifier-impl.cpp +++ b/dali-toolkit/internal/controls/magnifier/magnifier-impl.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include namespace Dali { @@ -268,7 +268,7 @@ void Magnifier::SetFrameVisibility(bool visible) Toolkit::VisualFactory visualFactory = Toolkit::VisualFactory::Get(); Property::Map map; - map[ Toolkit::DevelVisual::Property::TYPE ] = Toolkit::Visual::BORDER; + map[ Toolkit::Visual::Property::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 2af39469..100c2c8 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 @@ -2,7 +2,7 @@ #define DALI_PAGE_TURN_BOOK_SPINE_EFFECT_H /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -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::DevelVisual::Property::SHADER ] = customShader; + map[ Toolkit::Visual::Property::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 36f8f0c..15a48da 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 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -22,7 +22,7 @@ #include // INTERNAL INCLUDES -#include +#include #include using namespace Dali; @@ -337,7 +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::DevelVisual::Property::SHADER ] = customShader; + map[ Toolkit::Visual::Property::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 a66813a..0ee82e9 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 @@ -27,7 +27,7 @@ #include // INTERNAL INCLUDES -#include +#include #include #include #include @@ -419,7 +419,7 @@ void PageTurnView::OnInitialize() Shader PageTurnView::CreateShader( const Property::Map& shaderMap ) { Shader shader; - Property::Value* shaderValue = shaderMap.Find( Toolkit::DevelVisual::Property::SHADER, CUSTOM_SHADER ); + Property::Value* shaderValue = shaderMap.Find( Toolkit::Visual::Property::SHADER, CUSTOM_SHADER ); Property::Map shaderSource; if( shaderValue && shaderValue->Get( shaderSource ) ) { diff --git a/dali-toolkit/internal/controls/progress-bar/progress-bar-impl.cpp b/dali-toolkit/internal/controls/progress-bar/progress-bar-impl.cpp index a537621..2b89fed 100755 --- a/dali-toolkit/internal/controls/progress-bar/progress-bar-impl.cpp +++ b/dali-toolkit/internal/controls/progress-bar/progress-bar-impl.cpp @@ -25,13 +25,13 @@ #include #include #include -#include +#include #include #include #include #include -#include -#include +#include +#include #include #include @@ -142,9 +142,9 @@ void ProgressBar::OnRelayout( const Vector2& size, RelayoutContainer& container { Property::Map visualTransform; - visualTransform.Add( Toolkit::DevelVisual::Transform::Property::SIZE, trackSize ) - .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) ) - .Add( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) ); + visualTransform.Add( Toolkit::Visual::Transform::Property::SIZE, trackSize ) + .Add( Toolkit::Visual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) ) + .Add( Toolkit::Visual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) ); trackVisual.SetTransformAndSize( visualTransform, trackSize ); } @@ -153,11 +153,11 @@ void ProgressBar::OnRelayout( const Vector2& size, RelayoutContainer& container { Property::Map visualTransform; - visualTransform.Add( Toolkit::DevelVisual::Transform::Property::SIZE, Vector2( mDomain.from.x + mSecondaryProgressValue * ( mDomain.to.x - mDomain.from.x ), trackSize.height ) ) - .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) ) - .Add( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) ) - .Add( Toolkit::DevelVisual::Transform::Property::ORIGIN, Toolkit::Align::TOP_BEGIN ) - .Add( Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT, Toolkit::Align::TOP_BEGIN ); + visualTransform.Add( Toolkit::Visual::Transform::Property::SIZE, Vector2( mDomain.from.x + mSecondaryProgressValue * ( mDomain.to.x - mDomain.from.x ), trackSize.height ) ) + .Add( Toolkit::Visual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) ) + .Add( Toolkit::Visual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) ) + .Add( Toolkit::Visual::Transform::Property::ORIGIN, Toolkit::Align::TOP_BEGIN ) + .Add( Toolkit::Visual::Transform::Property::ANCHOR_POINT, Toolkit::Align::TOP_BEGIN ); secondProgressVisual.SetTransformAndSize( visualTransform, trackSize ); } @@ -165,11 +165,11 @@ void ProgressBar::OnRelayout( const Vector2& size, RelayoutContainer& container { Property::Map visualTransform; - visualTransform.Add( Toolkit::DevelVisual::Transform::Property::SIZE, Vector2( mDomain.from.x + mProgressValue * ( mDomain.to.x - mDomain.from.x ), trackSize.height ) ) - .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) ) - .Add( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) ) - .Add( Toolkit::DevelVisual::Transform::Property::ORIGIN, Toolkit::Align::TOP_BEGIN ) - .Add( Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT, Toolkit::Align::TOP_BEGIN ); + visualTransform.Add( Toolkit::Visual::Transform::Property::SIZE, Vector2( mDomain.from.x + mProgressValue * ( mDomain.to.x - mDomain.from.x ), trackSize.height ) ) + .Add( Toolkit::Visual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) ) + .Add( Toolkit::Visual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) ) + .Add( Toolkit::Visual::Transform::Property::ORIGIN, Toolkit::Align::TOP_BEGIN ) + .Add( Toolkit::Visual::Transform::Property::ANCHOR_POINT, Toolkit::Align::TOP_BEGIN ); progressVisual.SetTransformAndSize( visualTransform, trackSize ); } @@ -177,9 +177,9 @@ void ProgressBar::OnRelayout( const Vector2& size, RelayoutContainer& container { Property::Map visualTransform; - visualTransform.Add( Toolkit::DevelVisual::Transform::Property::SIZE, trackSize ) - .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) ) - .Add( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) ); + visualTransform.Add( Toolkit::Visual::Transform::Property::SIZE, trackSize ) + .Add( Toolkit::Visual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) ) + .Add( Toolkit::Visual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) ); labelVisual.SetTransformAndSize( visualTransform, trackSize ); } @@ -187,9 +187,9 @@ void ProgressBar::OnRelayout( const Vector2& size, RelayoutContainer& container { Property::Map visualTransform; - visualTransform.Add( Toolkit::DevelVisual::Transform::Property::SIZE, trackSize ) - .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) ) - .Add( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) ); + visualTransform.Add( Toolkit::Visual::Transform::Property::SIZE, trackSize ) + .Add( Toolkit::Visual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) ) + .Add( Toolkit::Visual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) ); indeterminateVisual.SetTransformAndSize( visualTransform, trackSize ); } @@ -478,7 +478,7 @@ void ProgressBar::SetProperty( BaseObject* object, Property::Index propertyIndex // if LABEL_VISUAL doesn't set before, add Visual property "TYPE" to create new text Visual if( map.Empty() ) { - newTextMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT ); + newTextMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT ); newTextMap.Add( Toolkit::TextVisual::Property::POINT_SIZE, DEFAULT_FONT_SIZE ); } newTextMap.Add( Toolkit::TextVisual::Property::TEXT, textString ); 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 c8605c1..70fd250 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::DevelVisual::Property::SHADER ] = customShader; + mShadowVisualMap[ Toolkit::Visual::Property::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-editor-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp index 63f0707..9602d74 100644 --- a/dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include #include @@ -1229,7 +1229,7 @@ void TextEditor::OnInitialize() // Creates a background visual. Even if the color is transparent it updates the stencil. mStencil.SetProperty( Toolkit::Control::Property::BACKGROUND, - Property::Map().Add( Toolkit::Visual::Property::TYPE, DevelVisual::COLOR ). + Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::COLOR ). Add( ColorVisual::Property::MIX_COLOR, Color::TRANSPARENT ) ); // Enable the clipping property. diff --git a/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp index d035c5e..daf5c6e 100644 --- a/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include @@ -1689,7 +1689,7 @@ void TextField::EnableClipping() // Creates a background visual. Even if the color is transparent it updates the stencil. mStencil.SetProperty( Toolkit::Control::Property::BACKGROUND, - Property::Map().Add( Toolkit::Visual::Property::TYPE, DevelVisual::COLOR ). + Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR ). Add( ColorVisual::Property::MIX_COLOR, Color::TRANSPARENT ) ); // Enable the clipping property. 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 e871db3..87a4fae 100644 --- a/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp @@ -35,11 +35,11 @@ #include #include -#include +#include #include #include -#include -#include +#include +#include #include using namespace Dali::Toolkit::Text; @@ -793,7 +793,7 @@ void TextLabel::OnInitialize() Actor self = Self(); Property::Map propertyMap; - propertyMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT ); + propertyMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT ); mVisual = Toolkit::VisualFactory::Get().CreateVisual( propertyMap ); DevelControl::RegisterVisual( *this, Toolkit::TextLabel::Property::TEXT, mVisual ); @@ -907,12 +907,12 @@ void TextLabel::OnRelayout( const Vector2& size, RelayoutContainer& container ) Self().GetPadding( padding ); Property::Map visualTransform; - visualTransform.Add( Toolkit::DevelVisual::Transform::Property::SIZE, contentSize ) - .Add( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY, Vector2( DevelVisual::Transform::Policy::ABSOLUTE, DevelVisual::Transform::Policy::ABSOLUTE ) ) - .Add( Toolkit::DevelVisual::Transform::Property::OFFSET, Vector2(padding.left, padding.top) ) - .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::DevelVisual::Transform::Policy::ABSOLUTE, Toolkit::DevelVisual::Transform::Policy::ABSOLUTE ) ) - .Add( Toolkit::DevelVisual::Transform::Property::ORIGIN, Toolkit::Align::TOP_BEGIN ) - .Add( Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT, Toolkit::Align::TOP_BEGIN ); + visualTransform.Add( Toolkit::Visual::Transform::Property::SIZE, contentSize ) + .Add( Toolkit::Visual::Transform::Property::SIZE_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) ) + .Add( Toolkit::Visual::Transform::Property::OFFSET, Vector2(padding.left, padding.top) ) + .Add( Toolkit::Visual::Transform::Property::OFFSET_POLICY, Vector2( Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE ) ) + .Add( Toolkit::Visual::Transform::Property::ORIGIN, Toolkit::Align::TOP_BEGIN ) + .Add( Toolkit::Visual::Transform::Property::ANCHOR_POINT, Toolkit::Align::TOP_BEGIN ); mVisual.SetTransformAndSize( visualTransform, size ); if ( mController->IsAutoScrollEnabled() ) diff --git a/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.cpp index c167f81..26b14b6 100644 --- a/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.cpp @@ -37,8 +37,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/dali-toolkit/internal/controls/tooltip/tooltip.cpp b/dali-toolkit/internal/controls/tooltip/tooltip.cpp index be1017f..d9bb052 100644 --- a/dali-toolkit/internal/controls/tooltip/tooltip.cpp +++ b/dali-toolkit/internal/controls/tooltip/tooltip.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -31,8 +31,8 @@ #include #include #include -#include -#include +#include +#include #include #include @@ -238,11 +238,11 @@ void Tooltip::SetContent( Toolkit::Control& control, const Property::Value& valu if( typeValue ) { // Set to an invalid value so it definitely changes if set in Scripting::GetEnumerationProperty - Toolkit::DevelVisual::Type visualType = static_cast< Toolkit::DevelVisual::Type >( -1 ); + Toolkit::Visual::Type visualType = static_cast< Toolkit::Visual::Type >( -1 ); if( Scripting::GetEnumerationProperty( *typeValue, VISUAL_TYPE_TABLE, VISUAL_TYPE_TABLE_COUNT, visualType ) ) { - if( visualType == Toolkit::DevelVisual::TEXT ) + if( visualType == Toolkit::Visual::TEXT ) { // Visual Type is text, ensure we have a the TEXT property set before we connect to the signals. @@ -277,7 +277,7 @@ void Tooltip::SetContent( Toolkit::Control& control, const Property::Value& valu if( value.Get( text ) ) { mContentTextVisual[ Toolkit::TextVisual::Property::TEXT ] = text; - mContentTextVisual[ Toolkit::Visual::Property::TYPE ] = DevelVisual::TEXT; + mContentTextVisual[ Toolkit::Visual::Property::TYPE ] = Visual::TEXT; mContentArray.Clear(); connectSignals = true; } diff --git a/dali-toolkit/internal/filters/blur-two-pass-filter.cpp b/dali-toolkit/internal/filters/blur-two-pass-filter.cpp index 307a3a1..f2689ef 100644 --- a/dali-toolkit/internal/filters/blur-two-pass-filter.cpp +++ b/dali-toolkit/internal/filters/blur-two-pass-filter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -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::DevelVisual::Property::SHADER, customShader ); + visualMap.Insert( Toolkit::Visual::Property::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::DevelVisual::Property::SHADER ] = customShader; + visualMap[ Toolkit::Visual::Property::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 6350a1d..7f6dd18 100644 --- a/dali-toolkit/internal/filters/emboss-filter.cpp +++ b/dali-toolkit/internal/filters/emboss-filter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -29,7 +29,7 @@ // INTERNAL INCLUDES #include -#include +#include #include #include @@ -97,7 +97,7 @@ void EmbossFilter::Enable() Property::Map customShader; customShader[ Toolkit::Visual::Shader::Property::FRAGMENT_SHADER ] = EMBOSS_FRAGMENT_SOURCE; Property::Map visualMap; - visualMap.Insert( Toolkit::DevelVisual::Property::SHADER, customShader ); + visualMap.Insert( Toolkit::Visual::Property::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 2e3729d..0ed7934 100644 --- a/dali-toolkit/internal/filters/spread-filter.cpp +++ b/dali-toolkit/internal/filters/spread-filter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -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::DevelVisual::Property::SHADER, customShader ); + visualMap.Insert( Toolkit::Visual::Property::SHADER, customShader ); // set SPREAD custom shader mActorForInput.SetProperty( Toolkit::ImageView::Property::IMAGE, visualMap ); diff --git a/dali-toolkit/internal/visuals/animated-image/animated-image-visual.cpp b/dali-toolkit/internal/visuals/animated-image/animated-image-visual.cpp index acaede8..4f4b441 100644 --- a/dali-toolkit/internal/visuals/animated-image/animated-image-visual.cpp +++ b/dali-toolkit/internal/visuals/animated-image/animated-image-visual.cpp @@ -25,8 +25,7 @@ // INTERNAL INCLUDES #include -#include -#include +#include #include #include #include @@ -176,7 +175,7 @@ void AnimatedImageVisual::DoCreatePropertyMap( Property::Map& map ) const { map.Clear(); - map.Insert( Toolkit::DevelVisual::Property::TYPE, Toolkit::DevelVisual::ANIMATED_IMAGE ); + map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::ANIMATED_IMAGE ); if( mImageUrl.IsValid() ) { @@ -197,9 +196,9 @@ void AnimatedImageVisual::DoCreatePropertyMap( Property::Map& map ) const map.Insert( Toolkit::ImageVisual::Property::WRAP_MODE_U, mWrapModeU ); map.Insert( Toolkit::ImageVisual::Property::WRAP_MODE_V, mWrapModeV ); - map.Insert( Toolkit::DevelImageVisual::Property::BATCH_SIZE, static_cast(mBatchSize) ); - map.Insert( Toolkit::DevelImageVisual::Property::CACHE_SIZE, static_cast(mCacheSize) ); - map.Insert( Toolkit::DevelImageVisual::Property::FRAME_DELAY, static_cast(mFrameDelay) ); + map.Insert( Toolkit::ImageVisual::Property::BATCH_SIZE, static_cast(mBatchSize) ); + map.Insert( Toolkit::ImageVisual::Property::CACHE_SIZE, static_cast(mCacheSize) ); + map.Insert( Toolkit::ImageVisual::Property::FRAME_DELAY, static_cast(mFrameDelay) ); } void AnimatedImageVisual::DoCreateInstancePropertyMap( Property::Map& map ) const @@ -234,15 +233,15 @@ void AnimatedImageVisual::DoSetProperties( const Property::Map& propertyMap ) } else if( keyValue.first == BATCH_SIZE_NAME ) { - DoSetProperty( Toolkit::DevelImageVisual::Property::BATCH_SIZE, keyValue.second ); + DoSetProperty( Toolkit::ImageVisual::Property::BATCH_SIZE, keyValue.second ); } else if( keyValue.first == CACHE_SIZE_NAME ) { - DoSetProperty( Toolkit::DevelImageVisual::Property::CACHE_SIZE, keyValue.second ); + DoSetProperty( Toolkit::ImageVisual::Property::CACHE_SIZE, keyValue.second ); } else if( keyValue.first == FRAME_DELAY_NAME ) { - DoSetProperty( Toolkit::DevelImageVisual::Property::FRAME_DELAY, keyValue.second ); + DoSetProperty( Toolkit::ImageVisual::Property::FRAME_DELAY, keyValue.second ); } } } @@ -290,7 +289,7 @@ void AnimatedImageVisual::DoSetProperty( Property::Index index, break; } - case Toolkit::DevelImageVisual::Property::BATCH_SIZE: + case Toolkit::ImageVisual::Property::BATCH_SIZE: { int batchSize; if( value.Get( batchSize ) ) @@ -300,7 +299,7 @@ void AnimatedImageVisual::DoSetProperty( Property::Index index, break; } - case Toolkit::DevelImageVisual::Property::CACHE_SIZE: + case Toolkit::ImageVisual::Property::CACHE_SIZE: { int cacheSize; if( value.Get( cacheSize ) ) @@ -310,7 +309,7 @@ void AnimatedImageVisual::DoSetProperty( Property::Index index, break; } - case Toolkit::DevelImageVisual::Property::FRAME_DELAY: + case Toolkit::ImageVisual::Property::FRAME_DELAY: { int frameDelay; if( value.Get( frameDelay ) ) diff --git a/dali-toolkit/internal/visuals/border/border-visual.cpp b/dali-toolkit/internal/visuals/border/border-visual.cpp index 0adfa8d..da0ec77 100644 --- a/dali-toolkit/internal/visuals/border/border-visual.cpp +++ b/dali-toolkit/internal/visuals/border/border-visual.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -24,7 +24,7 @@ // INTERNAL INCLUDES #include -#include +#include #include #include #include @@ -223,7 +223,7 @@ void BorderVisual::DoSetOnStage( Actor& actor ) void BorderVisual::DoCreatePropertyMap( Property::Map& map ) const { map.Clear(); - map.Insert( Toolkit::DevelVisual::Property::TYPE, Toolkit::Visual::BORDER ); + map.Insert( Toolkit::Visual::Property::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 31922ba..f1dfc4d 100644 --- a/dali-toolkit/internal/visuals/color/color-visual.cpp +++ b/dali-toolkit/internal/visuals/color/color-visual.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -24,7 +24,7 @@ //INTERNAL INCLUDES #include -#include +#include #include #include #include @@ -99,7 +99,7 @@ ColorVisual::~ColorVisual() void ColorVisual::DoSetProperties( const Property::Map& propertyMap ) { // By virtue of DoSetProperties being called last, this will override - // anything set by DevelVisual::Property::MIX_COLOR + // anything set by Toolkit::Visual::Property::MIX_COLOR Property::Value* colorValue = propertyMap.Find( Toolkit::ColorVisual::Property::MIX_COLOR, MIX_COLOR ); if( colorValue ) { @@ -137,7 +137,7 @@ void ColorVisual::DoSetOnStage( Actor& actor ) void ColorVisual::DoCreatePropertyMap( Property::Map& map ) const { map.Clear(); - map.Insert( Toolkit::DevelVisual::Property::TYPE, Toolkit::Visual::COLOR ); + map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR ); map.Insert( Toolkit::ColorVisual::Property::MIX_COLOR, mImpl->mMixColor ); } diff --git a/dali-toolkit/internal/visuals/gradient/gradient-visual.cpp b/dali-toolkit/internal/visuals/gradient/gradient-visual.cpp index b75b359..7c3f791 100644 --- a/dali-toolkit/internal/visuals/gradient/gradient-visual.cpp +++ b/dali-toolkit/internal/visuals/gradient/gradient-visual.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -29,7 +29,7 @@ // INTERNAL INCLUDES #include -#include +#include #include #include #include @@ -286,7 +286,7 @@ void GradientVisual::DoSetOnStage( Actor& actor ) void GradientVisual::DoCreatePropertyMap( Property::Map& map ) const { map.Clear(); - map.Insert( Toolkit::DevelVisual::Property::TYPE, Toolkit::Visual::GRADIENT ); + map.Insert( Toolkit::Visual::Property::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/image-visual.cpp b/dali-toolkit/internal/visuals/image/image-visual.cpp index 5dbd3cd..c83bd6e 100644 --- a/dali-toolkit/internal/visuals/image/image-visual.cpp +++ b/dali-toolkit/internal/visuals/image/image-visual.cpp @@ -32,8 +32,7 @@ // INTERNAL HEADERS #include -#include -#include +#include #include #include #include @@ -352,19 +351,19 @@ void ImageVisual::DoSetProperties( const Property::Map& propertyMap ) } else if ( keyValue.first == IMAGE_ATLASING ) { - DoSetProperty( Toolkit::DevelImageVisual::Property::ATLASING, keyValue.second ); + DoSetProperty( Toolkit::ImageVisual::Property::ATLASING, keyValue.second ); } else if ( keyValue.first == ALPHA_MASK_URL ) { - DoSetProperty( Toolkit::DevelImageVisual::Property::ALPHA_MASK_URL, keyValue.second ); + DoSetProperty( Toolkit::ImageVisual::Property::ALPHA_MASK_URL, keyValue.second ); } else if ( keyValue.first == MASK_CONTENT_SCALE_NAME ) { - DoSetProperty( Toolkit::DevelImageVisual::Property::MASK_CONTENT_SCALE, keyValue.second ); + DoSetProperty( Toolkit::ImageVisual::Property::MASK_CONTENT_SCALE, keyValue.second ); } else if ( keyValue.first == CROP_TO_MASK_NAME ) { - DoSetProperty( Toolkit::DevelImageVisual::Property::CROP_TO_MASK, keyValue.second ); + DoSetProperty( Toolkit::ImageVisual::Property::CROP_TO_MASK, keyValue.second ); } } } @@ -461,14 +460,14 @@ void ImageVisual::DoSetProperty( Property::Index index, const Property::Value& v break; } - case Toolkit::DevelImageVisual::Property::ATLASING: + case Toolkit::ImageVisual::Property::ATLASING: { bool atlasing = false; mAttemptAtlasing = value.Get( atlasing ); break; } - case Toolkit::DevelImageVisual::Property::ALPHA_MASK_URL: + case Toolkit::ImageVisual::Property::ALPHA_MASK_URL: { std::string alphaUrl; if( value.Get( alphaUrl ) ) @@ -482,7 +481,7 @@ void ImageVisual::DoSetProperty( Property::Index index, const Property::Value& v break; } - case Toolkit::DevelImageVisual::Property::MASK_CONTENT_SCALE: + case Toolkit::ImageVisual::Property::MASK_CONTENT_SCALE: { float scale; if( value.Get( scale ) ) @@ -493,7 +492,7 @@ void ImageVisual::DoSetProperty( Property::Index index, const Property::Value& v break; } - case Toolkit::DevelImageVisual::Property::CROP_TO_MASK: + case Toolkit::ImageVisual::Property::CROP_TO_MASK: { bool crop=false; if( value.Get( crop ) ) @@ -821,7 +820,7 @@ void ImageVisual::DoSetOffStage( Actor& actor ) void ImageVisual::DoCreatePropertyMap( Property::Map& map ) const { map.Clear(); - map.Insert( Toolkit::DevelVisual::Property::TYPE, Toolkit::Visual::IMAGE ); + map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::IMAGE ); bool sync = IsSynchronousResourceLoading(); map.Insert( SYNCHRONOUS_LOADING, sync ); @@ -850,19 +849,19 @@ void ImageVisual::DoCreatePropertyMap( Property::Map& map ) const map.Insert( Toolkit::ImageVisual::Property::WRAP_MODE_U, mWrapModeU ); map.Insert( Toolkit::ImageVisual::Property::WRAP_MODE_V, mWrapModeV ); - map.Insert( Toolkit::DevelImageVisual::Property::ATLASING, mAttemptAtlasing ); + map.Insert( Toolkit::ImageVisual::Property::ATLASING, mAttemptAtlasing ); if( mMaskingData != NULL ) { - map.Insert( Toolkit::DevelImageVisual::Property::ALPHA_MASK_URL, mMaskingData->mAlphaMaskUrl.GetUrl() ); - map.Insert( Toolkit::DevelImageVisual::Property::MASK_CONTENT_SCALE, mMaskingData->mContentScaleFactor ); - map.Insert( Toolkit::DevelImageVisual::Property::CROP_TO_MASK, mMaskingData->mCropToMask ); + map.Insert( Toolkit::ImageVisual::Property::ALPHA_MASK_URL, mMaskingData->mAlphaMaskUrl.GetUrl() ); + map.Insert( Toolkit::ImageVisual::Property::MASK_CONTENT_SCALE, mMaskingData->mContentScaleFactor ); + map.Insert( Toolkit::ImageVisual::Property::CROP_TO_MASK, mMaskingData->mCropToMask ); } } void ImageVisual::DoCreateInstancePropertyMap( Property::Map& map ) const { map.Clear(); - map.Insert( Toolkit::DevelVisual::Property::TYPE, Toolkit::Visual::IMAGE ); + map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::IMAGE ); if( mImageUrl.IsValid() ) { map.Insert( Toolkit::ImageVisual::Property::DESIRED_WIDTH, mDesiredSize.GetWidth() ); diff --git a/dali-toolkit/internal/visuals/mesh/mesh-visual.cpp b/dali-toolkit/internal/visuals/mesh/mesh-visual.cpp index e6a7bf4..92d30ab 100644 --- a/dali-toolkit/internal/visuals/mesh/mesh-visual.cpp +++ b/dali-toolkit/internal/visuals/mesh/mesh-visual.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -28,7 +28,7 @@ #include //INTERNAL INCLUDES -#include +#include #include #include @@ -526,7 +526,7 @@ void MeshVisual::DoSetOnStage( Actor& actor ) void MeshVisual::DoCreatePropertyMap( Property::Map& map ) const { map.Clear(); - map.Insert( Toolkit::DevelVisual::Property::TYPE, Toolkit::Visual::MESH ); + map.Insert( Toolkit::Visual::Property::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 7be7301..df9b2ff 100755 --- a/dali-toolkit/internal/visuals/npatch/npatch-visual.cpp +++ b/dali-toolkit/internal/visuals/npatch/npatch-visual.cpp @@ -26,8 +26,7 @@ // INTERNAL INCLUDES #include -#include -#include +#include #include #include #include @@ -35,7 +34,6 @@ #include #include - namespace Dali { @@ -286,7 +284,7 @@ void NPatchVisual::DoSetProperties( const Property::Map& propertyMap ) borderOnlyValue->Get( mBorderOnly ); } - Property::Value* borderValue = propertyMap.Find( Toolkit::DevelImageVisual::Property::BORDER, BORDER ); + Property::Value* borderValue = propertyMap.Find( Toolkit::ImageVisual::Property::BORDER, BORDER ); if( borderValue && ! borderValue->Get( mBorder ) ) // If value exists and is rect, just set mBorder { // Not a rect so try vector4 @@ -338,10 +336,10 @@ void NPatchVisual::OnSetTransform() void NPatchVisual::DoCreatePropertyMap( Property::Map& map ) const { map.Clear(); - map.Insert( Toolkit::DevelVisual::Property::TYPE, Toolkit::DevelVisual::N_PATCH ); + map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::N_PATCH ); map.Insert( Toolkit::ImageVisual::Property::URL, mImageUrl.GetUrl() ); map.Insert( Toolkit::ImageVisual::Property::BORDER_ONLY, mBorderOnly ); - map.Insert( Toolkit::DevelImageVisual::Property::BORDER, mBorder ); + map.Insert( Toolkit::ImageVisual::Property::BORDER, mBorder ); } void NPatchVisual::DoCreateInstancePropertyMap( Property::Map& map ) const diff --git a/dali-toolkit/internal/visuals/primitive/primitive-visual.cpp b/dali-toolkit/internal/visuals/primitive/primitive-visual.cpp index ede8ce0..51a9b29 100644 --- a/dali-toolkit/internal/visuals/primitive/primitive-visual.cpp +++ b/dali-toolkit/internal/visuals/primitive/primitive-visual.cpp @@ -27,7 +27,7 @@ #include // INTERNAL INCLUDES -#include +#include #include #include @@ -218,7 +218,7 @@ void PrimitiveVisual::DoSetProperties( const Property::Map& propertyMap ) } // By virtue of DoSetProperties being called last, this will override - // anything set by DevelVisual::Property::MIX_COLOR + // anything set by Toolkit::Visual::Property::MIX_COLOR Property::Value* colorValue = propertyMap.Find( Toolkit::PrimitiveVisual::Property::MIX_COLOR, MIX_COLOR ); if( colorValue ) { @@ -426,7 +426,7 @@ void PrimitiveVisual::DoSetOnStage( Actor& actor ) void PrimitiveVisual::DoCreatePropertyMap( Property::Map& map ) const { map.Clear(); - map.Insert( Toolkit::DevelVisual::Property::TYPE, Toolkit::Visual::PRIMITIVE ); + map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::PRIMITIVE ); map.Insert( Toolkit::PrimitiveVisual::Property::MIX_COLOR, mImpl->mMixColor ); map.Insert( Toolkit::PrimitiveVisual::Property::SHAPE, mPrimitiveType ); 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 ef2fdae..95a7786 100644 --- a/dali-toolkit/internal/visuals/svg/svg-visual.cpp +++ b/dali-toolkit/internal/visuals/svg/svg-visual.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -27,7 +27,7 @@ // INTERNAL INCLUDES #include -#include +#include #include #include #include @@ -140,7 +140,7 @@ void SvgVisual::GetNaturalSize( Vector2& naturalSize ) void SvgVisual::DoCreatePropertyMap( Property::Map& map ) const { map.Clear(); - map.Insert( Toolkit::DevelVisual::Property::TYPE, Toolkit::DevelVisual::SVG ); + map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::SVG ); if( mImageUrl.IsValid() ) { map.Insert( Toolkit::ImageVisual::Property::URL, mImageUrl.GetUrl() ); diff --git a/dali-toolkit/internal/visuals/text/text-visual.cpp b/dali-toolkit/internal/visuals/text/text-visual.cpp index f274321..05fbf0d 100755 --- a/dali-toolkit/internal/visuals/text/text-visual.cpp +++ b/dali-toolkit/internal/visuals/text/text-visual.cpp @@ -23,8 +23,8 @@ #include // INTERNAL HEADER -#include -#include +#include +#include #include #include #include @@ -382,7 +382,7 @@ void TextVisual::DoCreatePropertyMap( Property::Map& map ) const Property::Value value; map.Clear(); - map.Insert( Toolkit::DevelVisual::Property::TYPE, Toolkit::DevelVisual::TEXT ); + map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT ); std::string text; mController->GetText( text ); @@ -415,7 +415,7 @@ void TextVisual::DoCreatePropertyMap( Property::Map& map ) const void TextVisual::DoCreateInstancePropertyMap( Property::Map& map ) const { map.Clear(); - map.Insert( Toolkit::DevelVisual::Property::TYPE, Toolkit::DevelVisual::TEXT ); + map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::TEXT ); std::string text; mController->GetText( text ); map.Insert( Toolkit::TextVisual::Property::TEXT, text ); diff --git a/dali-toolkit/internal/visuals/visual-base-data-impl.cpp b/dali-toolkit/internal/visuals/visual-base-data-impl.cpp index 16af15d..27ba4a0 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 #include @@ -60,8 +60,8 @@ DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Align, BOTTOM_END ) DALI_ENUM_TO_STRING_TABLE_END( ALIGN ) DALI_ENUM_TO_STRING_TABLE_BEGIN( POLICY ) -DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::DevelVisual::Transform::Policy, RELATIVE ) -DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::DevelVisual::Transform::Policy, ABSOLUTE ) +DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual::Transform::Policy, RELATIVE ) +DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual::Transform::Policy, ABSOLUTE ) DALI_ENUM_TO_STRING_TABLE_END( POLICY ) Dali::Vector2 PointToVector2( Toolkit::Align::Type point, Toolkit::Direction::Type direction ) @@ -97,11 +97,11 @@ bool GetPolicyFromValue( const Property::Value& value, Vector2& policy ) Property::Array* array = value.GetArray(); if( array && array->Size() == 2 ) { - DevelVisual::Transform::Policy::Type xPolicy = static_cast< DevelVisual::Transform::Policy::Type >( -1 ); // Assign an invalid value so definitely changes - DevelVisual::Transform::Policy::Type yPolicy = static_cast< DevelVisual::Transform::Policy::Type >( -1 ); // Assign an invalid value so definitely changes + Toolkit::Visual::Transform::Policy::Type xPolicy = static_cast< Toolkit::Visual::Transform::Policy::Type >( -1 ); // Assign an invalid value so definitely changes + Toolkit::Visual::Transform::Policy::Type yPolicy = static_cast< Toolkit::Visual::Transform::Policy::Type >( -1 ); // Assign an invalid value so definitely changes - if( Scripting::GetEnumerationProperty< DevelVisual::Transform::Policy::Type >( array->GetElementAt( 0 ), POLICY_TABLE, POLICY_TABLE_COUNT, xPolicy ) && - Scripting::GetEnumerationProperty< DevelVisual::Transform::Policy::Type >( array->GetElementAt( 1 ), POLICY_TABLE, POLICY_TABLE_COUNT, yPolicy ) ) + if( Scripting::GetEnumerationProperty< Toolkit::Visual::Transform::Policy::Type >( array->GetElementAt( 0 ), POLICY_TABLE, POLICY_TABLE_COUNT, xPolicy ) && + Scripting::GetEnumerationProperty< Toolkit::Visual::Transform::Policy::Type >( array->GetElementAt( 1 ), POLICY_TABLE, POLICY_TABLE_COUNT, yPolicy ) ) { policy.x = xPolicy; policy.y = yPolicy; @@ -233,7 +233,7 @@ void Internal::Visual::Base::Impl::CustomShader::CreatePropertyMap( Property::Ma customShader.Insert( Toolkit::Visual::Shader::Property::HINTS, static_cast< int >( mHints ) ); } - map.Insert( Toolkit::DevelVisual::Property::SHADER, customShader ); + map.Insert( Toolkit::Visual::Property::SHADER, customShader ); } } @@ -267,27 +267,27 @@ void Internal::Visual::Base::Impl::Transform::UpdatePropertyMap( const Property: { switch( keyValue.first.indexKey ) { - case Toolkit::DevelVisual::Transform::Property::OFFSET: + case Toolkit::Visual::Transform::Property::OFFSET: { keyValue.second.Get( mOffset ); break; } - case Toolkit::DevelVisual::Transform::Property::SIZE: + case Toolkit::Visual::Transform::Property::SIZE: { keyValue.second.Get( mSize ); break; } - case Toolkit::DevelVisual::Transform::Property::ORIGIN: + case Toolkit::Visual::Transform::Property::ORIGIN: { Scripting::GetEnumerationProperty< Toolkit::Align::Type >( keyValue.second, ALIGN_TABLE, ALIGN_TABLE_COUNT, mOrigin ); break; } - case Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT: + case Toolkit::Visual::Transform::Property::ANCHOR_POINT: { Scripting::GetEnumerationProperty< Toolkit::Align::Type >( keyValue.second, ALIGN_TABLE, ALIGN_TABLE_COUNT, mAnchorPoint ); break; } - case Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY: + case Toolkit::Visual::Transform::Property::OFFSET_POLICY: { Vector2 policy; if( GetPolicyFromValue( keyValue.second, policy ) ) @@ -297,7 +297,7 @@ void Internal::Visual::Base::Impl::Transform::UpdatePropertyMap( const Property: } break; } - case Toolkit::DevelVisual::Transform::Property::SIZE_POLICY: + case Toolkit::Visual::Transform::Property::SIZE_POLICY: { Vector2 policy; if( GetPolicyFromValue( keyValue.second, policy ) ) @@ -352,12 +352,12 @@ void Internal::Visual::Base::Impl::Transform::UpdatePropertyMap( const Property: void Internal::Visual::Base::Impl::Transform::GetPropertyMap( Property::Map& map ) const { map.Clear(); - map.Add( Toolkit::DevelVisual::Transform::Property::OFFSET, mOffset ) - .Add( Toolkit::DevelVisual::Transform::Property::SIZE, mSize ) - .Add( Toolkit::DevelVisual::Transform::Property::ORIGIN, mOrigin ) - .Add( Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT, mAnchorPoint ) - .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( mOffsetSizeMode.x, mOffsetSizeMode.y ) ) - .Add( Toolkit::DevelVisual::Transform::Property::SIZE_POLICY, Vector2( mOffsetSizeMode.z, mOffsetSizeMode.w ) ); + map.Add( Toolkit::Visual::Transform::Property::OFFSET, mOffset ) + .Add( Toolkit::Visual::Transform::Property::SIZE, mSize ) + .Add( Toolkit::Visual::Transform::Property::ORIGIN, mOrigin ) + .Add( Toolkit::Visual::Transform::Property::ANCHOR_POINT, mAnchorPoint ) + .Add( Toolkit::Visual::Transform::Property::OFFSET_POLICY, Vector2( mOffsetSizeMode.x, mOffsetSizeMode.y ) ) + .Add( Toolkit::Visual::Transform::Property::SIZE_POLICY, Vector2( mOffsetSizeMode.z, mOffsetSizeMode.w ) ); } void Internal::Visual::Base::Impl::Transform::RegisterUniforms( Dali::Renderer renderer, Toolkit::Direction::Type direction ) diff --git a/dali-toolkit/internal/visuals/visual-base-data-impl.h b/dali-toolkit/internal/visuals/visual-base-data-impl.h index ca311e1..1d92f6e 100644 --- a/dali-toolkit/internal/visuals/visual-base-data-impl.h +++ b/dali-toolkit/internal/visuals/visual-base-data-impl.h @@ -25,7 +25,7 @@ // INTERNAL INCLUDES #include #include -#include +#include namespace Dali { diff --git a/dali-toolkit/internal/visuals/visual-base-impl.cpp b/dali-toolkit/internal/visuals/visual-base-impl.cpp index 7add024..c829e8f 100644 --- a/dali-toolkit/internal/visuals/visual-base-impl.cpp +++ b/dali-toolkit/internal/visuals/visual-base-impl.cpp @@ -26,7 +26,7 @@ //INTERNAL HEARDER #include #include -#include +#include #include #include @@ -82,29 +82,29 @@ void Visual::Base::SetProperties( const Property::Map& propertyMap ) { if( matchKey == CUSTOM_SHADER ) { - matchKey = Property::Key( DevelVisual::Property::SHADER ); + matchKey = Property::Key( Toolkit::Visual::Property::SHADER ); } else if( matchKey == TRANSFORM ) { - matchKey = Property::Key( DevelVisual::Property::TRANSFORM ); + matchKey = Property::Key( Toolkit::Visual::Property::TRANSFORM ); } else if( matchKey == PREMULTIPLIED_ALPHA ) { - matchKey = Property::Key( DevelVisual::Property::PREMULTIPLIED_ALPHA ); + matchKey = Property::Key( Toolkit::Visual::Property::PREMULTIPLIED_ALPHA ); } else if( matchKey == MIX_COLOR ) { - matchKey = Property::Key( DevelVisual::Property::MIX_COLOR ); + matchKey = Property::Key( Toolkit::Visual::Property::MIX_COLOR ); } else if( matchKey == OPACITY ) { - matchKey = Property::Key( DevelVisual::Property::OPACITY ); + matchKey = Property::Key( Toolkit::Visual::Property::OPACITY ); } } switch( matchKey.indexKey ) { - case DevelVisual::Property::SHADER: + case Toolkit::Visual::Property::SHADER: { Property::Map shaderMap; if( value.Get( shaderMap ) ) @@ -114,7 +114,7 @@ void Visual::Base::SetProperties( const Property::Map& propertyMap ) break; } - case DevelVisual::Property::TRANSFORM: + case Toolkit::Visual::Property::TRANSFORM: { Property::Map map; if( value.Get( map ) ) @@ -124,7 +124,7 @@ void Visual::Base::SetProperties( const Property::Map& propertyMap ) break; } - case DevelVisual::Property::PREMULTIPLIED_ALPHA: + case Toolkit::Visual::Property::PREMULTIPLIED_ALPHA: { bool premultipliedAlpha = false; if( value.Get( premultipliedAlpha ) ) @@ -134,7 +134,7 @@ void Visual::Base::SetProperties( const Property::Map& propertyMap ) break; } - case DevelVisual::Property::MIX_COLOR: + case Toolkit::Visual::Property::MIX_COLOR: { Vector4 mixColor; if( value.Get( mixColor ) ) @@ -151,7 +151,7 @@ void Visual::Base::SetProperties( const Property::Map& propertyMap ) } break; } - case DevelVisual::Property::OPACITY: + case Toolkit::Visual::Property::OPACITY: { float opacity; if( value.Get( opacity ) ) @@ -276,15 +276,15 @@ void Visual::Base::CreatePropertyMap( Property::Map& map ) const Property::Map transform; mImpl->mTransform.GetPropertyMap( transform ); - map.Insert( DevelVisual::Property::TRANSFORM, transform ); + map.Insert( Toolkit::Visual::Property::TRANSFORM, transform ); bool premultipliedAlpha( IsPreMultipliedAlphaEnabled() ); - map.Insert( DevelVisual::Property::PREMULTIPLIED_ALPHA, premultipliedAlpha ); + map.Insert( Toolkit::Visual::Property::PREMULTIPLIED_ALPHA, premultipliedAlpha ); // Note, Color and Primitive will also insert their own mix color into the map // which is ok, because they have a different key value range. - map.Insert( DevelVisual::Property::MIX_COLOR, mImpl->mMixColor ); // vec4 - map.Insert( DevelVisual::Property::OPACITY, mImpl->mMixColor.a ); + map.Insert( Toolkit::Visual::Property::MIX_COLOR, mImpl->mMixColor ); // vec4 + map.Insert( Toolkit::Visual::Property::OPACITY, mImpl->mMixColor.a ); } void Visual::Base::CreateInstancePropertyMap( Property::Map& map ) const @@ -296,8 +296,8 @@ void Visual::Base::CreateInstancePropertyMap( Property::Map& map ) const mImpl->mCustomShader->CreatePropertyMap( map ); } - //map.Insert( DevelVisual::Property::DEPTH_INDEX, mImpl->mDepthIndex ); - //map.Insert( DevelVisual::Property::ENABLED, (bool) mImpl->mRenderer ); + //map.Insert( Toolkit::Visual::Property::DEPTH_INDEX, mImpl->mDepthIndex ); + //map.Insert( Toolkit::Visual::Property::ENABLED, (bool) mImpl->mRenderer ); } @@ -342,7 +342,7 @@ void Visual::Base::RegisterMixColor() { mImpl->mMixColorIndex = DevelHandle::RegisterProperty( mImpl->mRenderer, - Toolkit::DevelVisual::Property::MIX_COLOR, + Toolkit::Visual::Property::MIX_COLOR, MIX_COLOR, Vector3(mImpl->mMixColor) ); } @@ -356,7 +356,7 @@ void Visual::Base::RegisterMixColor() { mImpl->mOpacityIndex = DevelHandle::RegisterProperty( mImpl->mRenderer, - Toolkit::DevelVisual::Property::OPACITY, + Toolkit::Visual::Property::OPACITY, OPACITY, mImpl->mMixColor.a ); } @@ -520,14 +520,14 @@ void Visual::Base::AnimateProperty( Property::Map map; DoCreatePropertyMap( map ); - Property::Value* valuePtr = map.Find( Toolkit::DevelVisual::Property::TYPE ); + Property::Value* valuePtr = map.Find( Toolkit::Visual::Property::TYPE ); int visualType = -1; if( valuePtr ) { valuePtr->Get( visualType ); } - if( animator.propertyKey == Toolkit::DevelVisual::Property::MIX_COLOR || + if( animator.propertyKey == Toolkit::Visual::Property::MIX_COLOR || animator.propertyKey == MIX_COLOR || ( visualType == Toolkit::Visual::COLOR && animator.propertyKey == ColorVisual::Property::MIX_COLOR ) || @@ -536,7 +536,7 @@ void Visual::Base::AnimateProperty( { AnimateMixColorProperty( transition, animator ); } - else if(animator.propertyKey == Toolkit::DevelVisual::Property::OPACITY || + else if(animator.propertyKey == Toolkit::Visual::Property::OPACITY || animator.propertyKey == OPACITY ) { AnimateOpacityProperty( transition, animator ); diff --git a/dali-toolkit/internal/visuals/visual-base-impl.h b/dali-toolkit/internal/visuals/visual-base-impl.h index d580d8f..1706b9c 100644 --- a/dali-toolkit/internal/visuals/visual-base-impl.h +++ b/dali-toolkit/internal/visuals/visual-base-impl.h @@ -31,6 +31,7 @@ #include #include #include +#include namespace Dali { diff --git a/dali-toolkit/internal/visuals/visual-factory-impl.cpp b/dali-toolkit/internal/visuals/visual-factory-impl.cpp index 3aef5bc..365c614 100644 --- a/dali-toolkit/internal/visuals/visual-factory-impl.cpp +++ b/dali-toolkit/internal/visuals/visual-factory-impl.cpp @@ -27,9 +27,8 @@ // INTERNAL INCLUDES #include -#include -#include -#include +#include +#include #include #include #include @@ -88,8 +87,8 @@ Toolkit::Visual::Base VisualFactory::CreateVisual( const Property::Map& property Visual::BasePtr visualPtr; - Property::Value* typeValue = propertyMap.Find( Toolkit::DevelVisual::Property::TYPE, VISUAL_TYPE ); - Toolkit::DevelVisual::Type visualType = Toolkit::DevelVisual::IMAGE; // Default to IMAGE type. + Property::Value* typeValue = propertyMap.Find( Toolkit::Visual::Property::TYPE, VISUAL_TYPE ); + Toolkit::Visual::Type visualType = Toolkit::Visual::IMAGE; // Default to IMAGE type. if( typeValue ) { Scripting::GetEnumerationProperty( *typeValue, VISUAL_TYPE_TABLE, VISUAL_TYPE_TABLE_COUNT, visualType ); @@ -179,13 +178,13 @@ Toolkit::Visual::Base VisualFactory::CreateVisual( const Property::Map& property break; } - case Toolkit::DevelVisual::TEXT: + case Toolkit::Visual::TEXT: { visualPtr = TextVisual::New( *( mFactoryCache.Get() ), propertyMap ); break; } - case Toolkit::DevelVisual::N_PATCH: + case Toolkit::Visual::N_PATCH: { Property::Value* imageURLValue = propertyMap.Find( Toolkit::ImageVisual::Property::URL, IMAGE_URL_NAME ); std::string imageUrl; @@ -196,7 +195,7 @@ Toolkit::Visual::Base VisualFactory::CreateVisual( const Property::Map& property break; } - case Toolkit::DevelVisual::SVG: + case Toolkit::Visual::SVG: { Property::Value* imageURLValue = propertyMap.Find( Toolkit::ImageVisual::Property::URL, IMAGE_URL_NAME ); std::string imageUrl; @@ -207,7 +206,7 @@ Toolkit::Visual::Base VisualFactory::CreateVisual( const Property::Map& property break; } - case Toolkit::DevelVisual::ANIMATED_IMAGE: + case Toolkit::Visual::ANIMATED_IMAGE: { Property::Value* imageURLValue = propertyMap.Find( Toolkit::ImageVisual::Property::URL, IMAGE_URL_NAME ); std::string imageUrl; @@ -235,7 +234,7 @@ Toolkit::Visual::Base VisualFactory::CreateVisual( const Property::Map& property DALI_LOG_ERROR( "Renderer type unknown\n" ); } - if( mDebugEnabled && visualType != Toolkit::DevelVisual::WIREFRAME ) + if( mDebugEnabled && visualType != Toolkit::Visual::WIREFRAME ) { //Create a WireframeVisual if we have debug enabled visualPtr = WireframeVisual::New( *( mFactoryCache.Get() ), visualPtr, propertyMap ); diff --git a/dali-toolkit/internal/visuals/visual-string-constants.cpp b/dali-toolkit/internal/visuals/visual-string-constants.cpp index c47063f..b3352d4 100644 --- a/dali-toolkit/internal/visuals/visual-string-constants.cpp +++ b/dali-toolkit/internal/visuals/visual-string-constants.cpp @@ -20,7 +20,6 @@ // INTERNAL INCLUDES #include -#include namespace Dali { @@ -38,10 +37,10 @@ DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual, GRADIENT ) DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual, IMAGE ) DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual, MESH ) DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual, PRIMITIVE ) -DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::DevelVisual, TEXT ) -DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::DevelVisual, N_PATCH ) -DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::DevelVisual, SVG ) -DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::DevelVisual, ANIMATED_IMAGE ) +DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual, TEXT ) +DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual, N_PATCH ) +DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual, SVG ) +DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual, ANIMATED_IMAGE ) DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::Visual, WIREFRAME ) DALI_ENUM_TO_STRING_TABLE_END( VISUAL_TYPE ) diff --git a/dali-toolkit/internal/visuals/wireframe/wireframe-visual.cpp b/dali-toolkit/internal/visuals/wireframe/wireframe-visual.cpp index e674bf1..1c79d72 100644 --- a/dali-toolkit/internal/visuals/wireframe/wireframe-visual.cpp +++ b/dali-toolkit/internal/visuals/wireframe/wireframe-visual.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -20,7 +20,7 @@ #include "wireframe-visual.h" // INTERNAL INCLUDES -#include +#include #include #include #include @@ -96,7 +96,7 @@ WireframeVisualPtr WireframeVisual::New( VisualFactoryCache& factoryCache, Visua WireframeVisualPtr wireframeVisual( new WireframeVisual( factoryCache, actualVisual ) ); // Instead of calling SetProperties, looking for the only valid property 'transform' - Property::Value* transformValue = properties.Find( DevelVisual::Property::TRANSFORM, TRANSFORM ); + Property::Value* transformValue = properties.Find( Toolkit::Visual::Property::TRANSFORM, TRANSFORM ); Property::Map transformMap; if( transformValue && transformValue->Get( transformMap ) ) { @@ -149,7 +149,7 @@ void WireframeVisual::DoCreatePropertyMap( Property::Map& map ) const else { map.Clear(); - map.Insert( Toolkit::DevelVisual::Property::TYPE, Toolkit::Visual::WIREFRAME ); + map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::WIREFRAME ); } } @@ -160,7 +160,7 @@ void WireframeVisual::DoCreateInstancePropertyMap( Property::Map& map ) const void WireframeVisual::DoSetProperties( const Property::Map& propertyMap ) { - Property::Value* mixValue = propertyMap.Find( Toolkit::DevelVisual::Property::MIX_COLOR, MIX_COLOR ); + Property::Value* mixValue = propertyMap.Find( Toolkit::Visual::Property::MIX_COLOR, MIX_COLOR ); if( mixValue ) { Vector4 mixColor; diff --git a/dali-toolkit/public-api/align-enumerations.h b/dali-toolkit/public-api/align-enumerations.h new file mode 100644 index 0000000..24312ab --- /dev/null +++ b/dali-toolkit/public-api/align-enumerations.h @@ -0,0 +1,66 @@ +#ifndef __DALI_TOOLKIT_DEVEL_API_ALIGN_ENUMERATIONS_H__ +#define __DALI_TOOLKIT_DEVEL_API_ALIGN_ENUMERATIONS_H__ + +/* + * Copyright (c) 2017 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. + * + */ + + +namespace Dali +{ + +namespace Toolkit +{ + +/** + * @addtogroup dali_toolkit_controls + * @{ + */ + +/** + * @brief Enumerations for the alignment of Visuals + * @SINCE_1_2.60 + */ +namespace Align +{ + +/** + * @brief Describes anchor point and parent origin of visuals + * @SINCE_1_2.60 + */ +enum Type +{ + TOP_BEGIN = 0, ///< @SINCE_1_2.60 + TOP_CENTER, ///< @SINCE_1_2.60 + TOP_END, ///< @SINCE_1_2.60 + CENTER_BEGIN, ///< @SINCE_1_2.60 + CENTER, ///< @SINCE_1_2.60 + CENTER_END, ///< @SINCE_1_2.60 + BOTTOM_BEGIN, ///< @SINCE_1_2.60 + BOTTOM_CENTER, ///< @SINCE_1_2.60 + BOTTOM_END ///< @SINCE_1_2.60 +}; +} + +/** + * @} + */ + +} // namespace Toolkit + +} // namespace Dali + +#endif // __DALI_TOOLKIT_DEVEL_API_ALIGN_ENUMERATIONS_H__ diff --git a/dali-toolkit/public-api/controls/buttons/button.cpp b/dali-toolkit/public-api/controls/buttons/button.cpp index 52ebd8f..623a535 100644 --- a/dali-toolkit/public-api/controls/buttons/button.cpp +++ b/dali-toolkit/public-api/controls/buttons/button.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 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. @@ -26,7 +26,7 @@ // INTERNAL INCLUDES #include #include -#include +#include namespace Dali { diff --git a/dali-toolkit/public-api/controls/control-impl.cpp b/dali-toolkit/public-api/controls/control-impl.cpp index 05f7ab3..1fb9f44 100644 --- a/dali-toolkit/public-api/controls/control-impl.cpp +++ b/dali-toolkit/public-api/controls/control-impl.cpp @@ -36,12 +36,12 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include #include namespace Dali @@ -108,7 +108,7 @@ void Control::SetBackgroundColor( const Vector4& color ) { mImpl->mBackgroundColor = color; Property::Map map; - map[ Toolkit::DevelVisual::Property::TYPE ] = Toolkit::Visual::COLOR; + map[ Toolkit::Visual::Property::TYPE ] = Toolkit::Visual::COLOR; map[ Toolkit::ColorVisual::Property::MIX_COLOR ] = color; SetBackground( map ); diff --git a/dali-toolkit/public-api/file.list b/dali-toolkit/public-api/file.list index 9909328..2076772 100755 --- a/dali-toolkit/public-api/file.list +++ b/dali-toolkit/public-api/file.list @@ -40,6 +40,7 @@ public_api_src_files = \ public_api_header_files = \ $(public_api_src_dir)/dali-toolkit-version.h \ $(public_api_src_dir)/enums.h \ + $(public_api_src_dir)/align-enumerations.h \ $(public_api_src_dir)/toolkit-property-index-ranges.h public_api_controls_header_files = \ @@ -124,4 +125,5 @@ public_api_visuals_header_files = \ $(public_api_src_dir)/visuals/image-visual-properties.h \ $(public_api_src_dir)/visuals/mesh-visual-properties.h \ $(public_api_src_dir)/visuals/primitive-visual-properties.h \ - $(public_api_src_dir)/visuals/visual-properties.h + $(public_api_src_dir)/visuals/visual-properties.h \ + $(public_api_src_dir)/visuals/text-visual-properties.h diff --git a/dali-toolkit/public-api/visuals/image-visual-properties.h b/dali-toolkit/public-api/visuals/image-visual-properties.h index 8eff9fa..589a188 100644 --- a/dali-toolkit/public-api/visuals/image-visual-properties.h +++ b/dali-toolkit/public-api/visuals/image-visual-properties.h @@ -54,7 +54,7 @@ enum { /** * @brief The URL of the image. - * @details Name "url", type Property::STRING or Property::ARRAY of Property::STRING + * @details Name "url", type Property::STRING or Property::ARRAY of Property::STRING. * @note The array form is used for generating animated image visuals. * @note The number of threads used for local and remote image loading can be controlled by the * environment variables DALI_TEXTURE_LOCAL_THREADS and DALI_TEXTURE_REMOTE_THREADS respectively. @@ -133,7 +133,7 @@ enum /** * @brief The wrap mode for u coordinate. - * @details Name "wrapModeU", type Dali::WrapMode::Type (Property::INTEGER) or Property::STRING + * @details Name "wrapModeU", type Dali::WrapMode::Type (Property::INTEGER) or Property::STRING. * It decides how the texture should be sampled when the u coordinate exceeds the range of 0.0 to 1.0. * @SINCE_1_2.1 * @note Optional. If not specified, the default is CLAMP. @@ -143,13 +143,95 @@ enum /** * @brief The wrap mode for v coordinate. - * @details Name "wrapModeV", type Dali::WrapMode::Type (Property::INTEGER) or Property::STRING + * @details Name "wrapModeV", type Dali::WrapMode::Type (Property::INTEGER) or Property::STRING. * it decides how the texture should be sampled when the v coordinate exceeds the range of 0.0 to 1.0. * @SINCE_1_2.1 * @note Optional. If not specified, the default is CLAMP. * @note For Normal QUAD image only. */ WRAP_MODE_V, + + /** + * @brief The border of the image. + * @details Name "border", type Property::RECTANGLE or Property::VECTOR4. + * The border of the image in the order: left, right, bottom, top. + * @SINCE_1_2.60 + * @note Optional. + * @note For N-Patch images only. + */ + BORDER, + + /** + * @brief Whether to use the texture atlas + * @details Name "atlasing", type Property::BOOLEAN. + * @SINCE_1_2.60 + * @note Optional. By default atlasing is off. + */ + ATLASING, + + /** + * @brief URL of a masking image + * @details Name "alphaMaskUrl", type Property::STRING, URL of image to apply as + * a mask after image loading. If set after the main URL has finished loading, this + * may necessitate a re-load of the main image. The alpha mask image will be scaled + * on load to match the size of the main image, then applied to the pixel data + * before uploading to GL. + * @SINCE_1_2.60 + * @note Optional. + */ + ALPHA_MASK_URL, + + /** + * @brief Defines the batch size for pre-loading images in the AnimatedImageVisual + * @details Name "batchSize", type Property::INTEGER, number of images to pre-load + * before starting to play. Default value: 1 + * @SINCE_1_2.60 + * @note Optional. + */ + BATCH_SIZE, + + /** + * @brief Defines the cache size for loading images in the AnimatedImageVisual + * @details Name "cacheSize", type Property::INTEGER, number of images to keep + * cached ahead during playback. Default value: 1 + * + * @SINCE_1_2.60 + * @note Optional. + * @note, cacheSize should be >= batchSize. + * If it isn't, then the cache will automatically be changed to batchSize. + * @note, because of the defaults, it is expected that the application developer + * tune the batch and cache sizes to their particular use case. + */ + CACHE_SIZE, + + /** + * @brief The number of milliseconds between each frame in the AnimatedImageVisual + * @details Name "frameDelay", type Property::INTEGER, The number of milliseconds between each frame. + * @SINCE_1_2.60 + * @note Optional. + * @note This is only used when multiple URLs are provided. + */ + FRAME_DELAY, + + /** + * @brief The scale factor to apply to the content image before masking + * @details Name "maskContentScale", type Property::FLOAT, The scale factor + * to apply to the content before masking. Note, scaled images are cropped to + * the same size as the alpha mask. + * @SINCE_1_2.60 + * @note Optional. + */ + MASK_CONTENT_SCALE, + + /** + * @brief Whether to crop image to mask or scale mask to fit image + * @details Name "cropToMask", type Property::BOOLEAN, True if the image should + * be cropped to match the mask size, or false if the image should remain the same size. + * @SINCE_1_2.60 + * @note Optional. + * @note If this is false, then the mask is scaled to fit the image before being applied. + */ + CROP_TO_MASK, }; } // namespace Property diff --git a/dali-toolkit/public-api/visuals/text-visual-properties.h b/dali-toolkit/public-api/visuals/text-visual-properties.h new file mode 100644 index 0000000..6399efc --- /dev/null +++ b/dali-toolkit/public-api/visuals/text-visual-properties.h @@ -0,0 +1,136 @@ +#ifndef DALI_TOOLKIT_TEXT_VISUAL_PROPERTIES_H +#define DALI_TOOLKIT_TEXT_VISUAL_PROPERTIES_H + +/* + * Copyright (c) 2017 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 + +namespace Dali +{ + +namespace Toolkit +{ +/** + * @addtogroup dali_toolkit_visuals + * @{ + */ + +/** + * @brief TextVisual Properties + * @SINCE_1_2.60 + */ +namespace TextVisual +{ + +namespace Property +{ + +enum +{ + /** + * @brief The text to display in UTF-8 format. + * @details name "text", type Property::STRING. + * @SINCE_1_2.60 + */ + TEXT = VISUAL_PROPERTY_START_INDEX, + + /** + * @brief The requested font family to use. + * @details name "fontFamily", type Property::STRING. + * @SINCE_1_2.60 + */ + FONT_FAMILY, + + /** + * @brief The requested font style to use. + * @details name "fontStyle", type Property::MAP. + * @SINCE_1_2.60 + */ + FONT_STYLE, + + /** + * @brief The size of font in points. + * @details name "pointSize", type Property::FLOAT. + * @SINCE_1_2.60 + */ + POINT_SIZE, + + /** + * @brief The single-line or multi-line layout option. + * @details name "multiLine", type Property::BOOLEAN, default false. + * @SINCE_1_2.60 + */ + MULTI_LINE, + + /** + * @brief The line horizontal alignment. + * @details name "horizontalAlignment", type Property::STRING, values "BEGIN", "CENTER", "END", default BEGIN. + * @SINCE_1_2.60 + */ + HORIZONTAL_ALIGNMENT, + + /** + * @brief The line vertical alignment. + * @details name "verticalAlignment", type Property::STRING, values "TOP", "CENTER", "BOTTOM", default TOP. + * @SINCE_1_2.60 + */ + VERTICAL_ALIGNMENT, + + /** + * @brief The color of the text. + * @details name "textColor", type Property::VECTOR4. + * @SINCE_1_2.60 + */ + TEXT_COLOR, + + /** + * @brief Whether the mark-up processing is enabled. + * @details name "enableMarkup", type Property::BOOLEAN. + * @SINCE_1_2.60 + */ + ENABLE_MARKUP, + + /** + * @brief The shadow parameters. + * @details name "shadow", type Property::MAP. + * @SINCE_1_2.60 + */ + SHADOW, + + /** + * @brief The default underline parameters. + * @details name "underline", type Property::MAP. + * @SINCE_1_2.60 + */ + UNDERLINE, +}; + +} // namespace Property + +} // namespace TextVisual + +/** + * @} + */ + +} // namespace Toolkit + +} // namespace Dali + +#endif // DALI_TOOLKIT_TEXT_VISUAL_PROPERTIES_H diff --git a/dali-toolkit/public-api/visuals/visual-properties.h b/dali-toolkit/public-api/visuals/visual-properties.h index ee24889..5617198 100644 --- a/dali-toolkit/public-api/visuals/visual-properties.h +++ b/dali-toolkit/public-api/visuals/visual-properties.h @@ -45,13 +45,17 @@ namespace Visual */ enum Type { - BORDER, ///< Renders a solid color as an internal border to the control's quad. @SINCE_1_1.45 - COLOR, ///< Renders a solid color to the control's quad. @SINCE_1_1.45 - GRADIENT, ///< Renders a smooth transition of colors to the control's quad. @SINCE_1_1.45 - IMAGE, ///< Renders an image into the control's quad. @SINCE_1_1.45 - MESH, ///< Renders a mesh using an "obj" file, optionally with textures provided by an "mtl" file. @SINCE_1_1.45 - PRIMITIVE, ///< Renders a simple 3D shape, such as a cube or sphere. @SINCE_1_1.45 - WIREFRAME ///< Renders a simple wire-frame outlining a quad. @SINCE_1_2_2 + BORDER, ///< Renders a solid color as an internal border to the control's quad. @SINCE_1_1.45 + COLOR, ///< Renders a solid color to the control's quad. @SINCE_1_1.45 + GRADIENT, ///< Renders a smooth transition of colors to the control's quad. @SINCE_1_1.45 + IMAGE, ///< Renders an image into the control's quad. @SINCE_1_1.45 + MESH, ///< Renders a mesh using an "obj" file, optionally with textures provided by an "mtl" file. @SINCE_1_1.45 + PRIMITIVE, ///< Renders a simple 3D shape, such as a cube or sphere. @SINCE_1_1.45 + WIREFRAME, ///< Renders a simple wire-frame outlining a quad. @SINCE_1_2_2 + TEXT, ///< Renders text @SINCE_1_2.60 + N_PATCH, ///< Renders an n-patch image. @SINCE_1_2.60 + SVG, ///< Renders an SVG image. @SINCE_1_2.60 + ANIMATED_IMAGE, ///< Renders a animated image. @SINCE_1_2.60 }; /** @@ -78,17 +82,160 @@ enum /** * @brief The shader to use in the visual. - * @details Name "shader", type Property::Map. + * @details Name "shader", type Property::MAP. * @SINCE_1_1.45 * @note Optional. * @note Will override the existing shaders. * @see Shader::Property */ - SHADER + SHADER, + + /** + * @brief The transform used by the visual. + * @details Name "transform", type Property::MAP. + * @SINCE_1_2.60 + * @note Optional. + * @see DevelVisual::Transform::Property + */ + TRANSFORM, + + /** + * @brief Enables/disables premultiplied alpha. + * @details Name "premultipliedAlpha", type Property::BOOLEAN. + * @SINCE_1_2.60 + * @note Optional. + * @note The premultiplied alpha is false by default unless this behaviour is modified + * by the derived Visual type. + */ + PREMULTIPLIED_ALPHA, + + /** + * @brief Mix color is a blend color for any visual. + * @details Name "mixColor", type Property::VECTOR3 or Property::VECTOR4. + * @SINCE_1_2.60 + * @note Optional + */ + MIX_COLOR, + + /** + * @brief Opacity is the alpha component of the mixColor, above. + * @details Name "opacity", type Property::FLOAT. + * @SINCE_1_2.60 + * @note Optional + */ + OPACITY, }; } // namespace Property +namespace Transform +{ + +/** + * @brief Policies used by the transform for the offset or size. + * @SINCE_1_2.60 + * + */ +namespace Policy +{ + +enum Type +{ + RELATIVE = 0, ///< Relative to the control (percentage [0.0f to 1.0f] of the control). + ABSOLUTE = 1 ///< Absolute value in world units. +}; + +} // namespace Policy + +namespace Property +{ + +enum Type +{ + /** + * @brief Offset of the visual, which can be either relative (percentage [0.0f to 1.0f] of the parent) or absolute (in world units). + * @details Name "offset", type Property::VECTOR2. + * @SINCE_1_2.60 + * + * @see OFFSET_POLICY + */ + OFFSET, + + /** + * @brief Size of the visual, which can be either relative (percentage [0.0f to 1.0f] of the parent) or absolute (in world units). + * @details Name "size", type Property::VECTOR2. + * @see SIZE_POLICY + */ + SIZE, + + /** + * @brief The origin of the visual within its control area. + * @details Name "origin", type Align::Type (Property::INTEGER) or Property::STRING. + * @see Toolkit::Align + * @SINCE_1_2.60 + * @note The default is Align::TOP_BEGIN. + */ + ORIGIN, + + /** + * @brief The anchor-point of the visual + * @details Name "anchorPoint", type Align::Type (Property::INTEGER) or Property::STRING. + * @see Toolkit::Align + * @SINCE_1_2.60 + * @note The default is Align::TOP_BEGIN. + */ + ANCHOR_POINT, + + /** + * @brief Whether the x or y OFFSET values are relative (percentage [0.0f to 1.0f] of the control) or absolute (in world units). + * @details Name "offsetPolicy", type Vector2 or Property::ARRAY of Property::STRING. + * If Property::ARRAY then 2 strings expected for the x and y. + * + * C++: + * @code + * control.SetProperty( ..., // Some visual based property + * Property::Map().Add( ... ) // Properties to set up visual + * .Add( Visual::Property::TRANSFORM, + * Property::Array().Add( DevelVisual::Transform::Property::OFFSET_POLICY, Vector2( Policy::ABSOLUTE, Policy::RELATIVE ) ) ) + * .Add( DevelVisual::Transform::Property::OFFSET, Vector2( 10, 1.0f ) ) ); + * @endcode + * + * JSON: + * @code + * { + * ... + * "transition": + * { + * "offsetPolicy" : [ "ABSOLUTE", "RELATIVE" ], + * "offset" : [ 10, 1.0 ] + * } + * ... + * } + * + * @endcode + * @see Policy::Type + * @SINCE_1_2.60 + * @note By default, both the x and the y offset is RELATIVE. + */ + OFFSET_POLICY, + + /** + * @brief Whether the width or height SIZE values are relative (percentage [0.0f to 1.0f] of the control) or absolute (in world units). + * @details Name "sizePolicy", type Vector2 or Property::ARRAY of Property::STRING. + * If Property::ARRAY then 2 strings expected for the width and height. + * + * @see Policy::Type + * @see OFFSET_POLICY for example + * @SINCE_1_2.60 + * @note By default, both the width and the height is RELATIVE to the control's size. + */ + SIZE_POLICY, +}; + +} // namespace Property + +} // namespace Transform + /** * @brief Shader for Visuals * @SINCE_1_1.45 diff --git a/docs/content/shared-javascript-and-cpp-documentation/visuals.md b/docs/content/shared-javascript-and-cpp-documentation/visuals.md index 17abb35..99ec69a 100644 --- a/docs/content/shared-javascript-and-cpp-documentation/visuals.md +++ b/docs/content/shared-javascript-and-cpp-documentation/visuals.md @@ -28,12 +28,12 @@ Visuals have a **transform** field in the property map to allow layouting within | Property | String | Type | Required | Description | |----------------------------------------------------------------|--------------|:-----------------:|:--------:|---------------------------------------------------------------------------------------------| -| Dali::Toolkit::DevelVisual::Transform::Property::OFFSET | offset | VECTOR2 | No | The offset of the visual. | -| Dali::Toolkit::DevelVisual::Transform::Property::SIZE | size | VECTOR2 | No | The size of the visual. | -| Dali::Toolkit::DevelVisual::Transform::Property::OFFSET_POLICY | offsetPolicy | VECTOR4 | No | Whether the offset components are Relative or Absolute [More info](@ref offset-size-policy) | -| Dali::Toolkit::DevelVisual::Transform::Property::SIZE_POLICY | sizePolicy | VECTOR4 | No | Whether the size components are Relative or Absolute [More info](@ref offset-size-policy) | -| Dali::Toolkit::DevelVisual::Transform::Property::ORIGIN | origin | INTEGER or STRING | No | The origin of the visual within the control's area. [More info](@ref align-type) | -| Dali::Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT | anchorPoint | INTEGER or STRING | No | The anchor point of the visual. [More info](@ref align-type) | +| Dali::Toolkit::Visual::Transform::Property::OFFSET | offset | VECTOR2 | No | The offset of the visual. | +| Dali::Toolkit::Visual::Transform::Property::SIZE | size | VECTOR2 | No | The size of the visual. | +| Dali::Toolkit::Visual::Transform::Property::OFFSET_POLICY | offsetPolicy | VECTOR4 | No | Whether the offset components are Relative or Absolute [More info](@ref offset-size-policy) | +| Dali::Toolkit::Visual::Transform::Property::SIZE_POLICY | sizePolicy | VECTOR4 | No | Whether the size components are Relative or Absolute [More info](@ref offset-size-policy) | +| Dali::Toolkit::Visual::Transform::Property::ORIGIN | origin | INTEGER or STRING | No | The origin of the visual within the control's area. [More info](@ref align-type) | +| Dali::Toolkit::Visual::Transform::Property::ANCHOR_POINT | anchorPoint | INTEGER or STRING | No | The anchor point of the visual. [More info](@ref align-type) | ## Offset & Size Policy {#offset-size-policy} @@ -42,8 +42,8 @@ The offset and size policies can be either Relative or Absolute. | Enumeration | String | Description | |---------------------------------------------------------|----------|-------------------------------------------------------------------------------| -| Dali::Toolkit::DevelVisual::Transform::Policy::RELATIVE | RELATIVE | *Default*. The size or offset value represents a ratio of the control's size | -| Dali::Toolkit::DevelVisual::Transform::Policy::ABSOLUTE | ABSOLUTE | The size or offset value represents world units (pixels) | +| Dali::Toolkit::Visual::Transform::Policy::RELATIVE | RELATIVE | *Default*. The size or offset value represents a ratio of the control's size | +| Dali::Toolkit::Visual::Transform::Policy::ABSOLUTE | ABSOLUTE | The size or offset value represents world units (pixels) | For example, an offsetPolicy of [ RELATIVE, RELATIVE ], a sizePolicy of [ ABSOLUTE, ABSOLUTE ], an offset of ( 0, 0.25 ) and a size of ( 20, 20 ) means the visual will be 20 pixels by 20 pixels in size, positioned 25% above the center of the control.