Merge "Add ENABLE_SHIFT_SELECTION property" into devel/master
authorHyunJu Shin <hyunjushin@samsung.com>
Tue, 19 Dec 2017 07:30:35 +0000 (07:30 +0000)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Tue, 19 Dec 2017 07:30:35 +0000 (07:30 +0000)
45 files changed:
automated-tests/src/dali-toolkit/utc-Dali-Control.cpp
automated-tests/src/dali-toolkit/utc-Dali-ImageView.cpp
automated-tests/src/dali-toolkit/utc-Dali-ImageVisual.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextEditor.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextureManager.cpp
automated-tests/src/dali-toolkit/utc-Dali-Visual.cpp
build/tizen/docs/dali.doxy.in
dali-toolkit/dali-toolkit.h
dali-toolkit/devel-api/controls/control-devel.cpp
dali-toolkit/devel-api/controls/control-devel.h
dali-toolkit/devel-api/file.list
dali-toolkit/devel-api/visual-factory/visual-base.cpp
dali-toolkit/devel-api/visual-factory/visual-base.h
dali-toolkit/devel-api/visuals/image-visual-properties-devel.h
dali-toolkit/devel-api/visuals/text-visual-properties-devel.h [new file with mode: 0644]
dali-toolkit/internal/controls/control/control-data-impl.h
dali-toolkit/internal/text/decorator/text-decorator.cpp
dali-toolkit/internal/text/decorator/text-decorator.h
dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp
dali-toolkit/internal/text/text-controller-impl.cpp
dali-toolkit/internal/text/text-controller.cpp
dali-toolkit/internal/text/text-effects-style.cpp
dali-toolkit/internal/visuals/animated-gradient/animated-gradient-visual.cpp
dali-toolkit/internal/visuals/image/image-visual.cpp
dali-toolkit/internal/visuals/image/image-visual.h
dali-toolkit/internal/visuals/npatch-loader.cpp
dali-toolkit/internal/visuals/npatch/npatch-visual.cpp
dali-toolkit/internal/visuals/text/text-visual.cpp
dali-toolkit/internal/visuals/texture-manager-impl.cpp
dali-toolkit/internal/visuals/visual-base-data-impl.h
dali-toolkit/internal/visuals/visual-base-impl.h
dali-toolkit/public-api/controls/control.cpp
dali-toolkit/public-api/controls/control.h
dali-toolkit/public-api/controls/text-controls/text-editor.h
dali-toolkit/public-api/controls/text-controls/text-field.h
dali-toolkit/public-api/controls/text-controls/text-label.h
dali-toolkit/public-api/dali-toolkit-version.cpp
dali-toolkit/public-api/file.list
dali-toolkit/public-api/image-loader/texture-manager.cpp [moved from dali-toolkit/devel-api/image-loader/texture-manager.cpp with 91% similarity]
dali-toolkit/public-api/image-loader/texture-manager.h [moved from dali-toolkit/devel-api/image-loader/texture-manager.h with 89% similarity]
dali-toolkit/public-api/visuals/image-visual-properties.h
dali-toolkit/public-api/visuals/visual-properties.h
packaging/dali-toolkit.spec

index d695e92..0a4dad2 100755 (executable)
@@ -834,11 +834,12 @@ int UtcDaliControlResourcesReady(void)
 
   DummyControl actor = DummyControl::New();
   DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
+
   dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, smallVisual );
 
   actor.SetSize( 200.f, 200.f );
 
-  Toolkit::Visual::ResourceStatus resourceStatus = DevelControl::GetVisualResourceStatus(dummyImpl, DummyControl::Property::TEST_VISUAL);
+  Toolkit::Visual::ResourceStatus resourceStatus = actor.GetVisualResourceStatus(DummyControl::Property::TEST_VISUAL);
   DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.IsResourceReady(), false, TEST_LOCATION );
   DALI_TEST_EQUALS( static_cast<int>(resourceStatus), static_cast<int>(Toolkit::Visual::ResourceStatus::PREPARING), TEST_LOCATION );
@@ -852,7 +853,7 @@ int UtcDaliControlResourcesReady(void)
   application.SendNotification();
   application.Render();
 
-  resourceStatus = DevelControl::GetVisualResourceStatus(dummyImpl, DummyControl::Property::TEST_VISUAL);
+  resourceStatus = actor.GetVisualResourceStatus(DummyControl::Property::TEST_VISUAL);
   DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.IsResourceReady(), true, TEST_LOCATION );
   DALI_TEST_EQUALS( static_cast<int>(resourceStatus), static_cast<int>(Toolkit::Visual::ResourceStatus::READY), TEST_LOCATION );
@@ -865,12 +866,12 @@ int UtcDaliControlResourcesReady(void)
 
   dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL2, largeVisual, false );
 
-  resourceStatus = DevelControl::GetVisualResourceStatus(dummyImpl, DummyControl::Property::TEST_VISUAL2);
+  resourceStatus = actor.GetVisualResourceStatus(DummyControl::Property::TEST_VISUAL2);
   DALI_TEST_EQUALS( static_cast<int>(resourceStatus), static_cast<int>(Toolkit::Visual::ResourceStatus::PREPARING), TEST_LOCATION );
 
   application.SendNotification();
 
-  resourceStatus = DevelControl::GetVisualResourceStatus(dummyImpl, DummyControl::Property::TEST_VISUAL2);
+  resourceStatus = actor.GetVisualResourceStatus(DummyControl::Property::TEST_VISUAL2);
   DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.IsResourceReady(), true, TEST_LOCATION );
   DALI_TEST_EQUALS( static_cast<int>(resourceStatus), static_cast<int>(Toolkit::Visual::ResourceStatus::PREPARING), TEST_LOCATION );
@@ -881,7 +882,7 @@ int UtcDaliControlResourcesReady(void)
 
   application.SendNotification();
 
-  resourceStatus = DevelControl::GetVisualResourceStatus(dummyImpl, DummyControl::Property::TEST_VISUAL2);
+  resourceStatus = actor.GetVisualResourceStatus(DummyControl::Property::TEST_VISUAL2);
   DALI_TEST_EQUALS( static_cast<int>(resourceStatus), static_cast<int>(Toolkit::Visual::ResourceStatus::READY), TEST_LOCATION );
 
   END_TEST;
index 97a4b1d..bcaca21 100644 (file)
@@ -23,7 +23,7 @@
 #include <dali-toolkit/dali-toolkit.h>
 #include <dali/devel-api/scripting/scripting.h>
 #include <dali-toolkit/devel-api/controls/control-devel.h>
-#include <dali-toolkit/devel-api/image-loader/texture-manager.h>
+#include <dali-toolkit/public-api/image-loader/texture-manager.h>
 #include <dali-toolkit/devel-api/visual-factory/visual-base.h>
 #include <dali-toolkit/devel-api/visuals/image-visual-properties-devel.h>
 
@@ -1526,7 +1526,7 @@ int UtcDaliImageViewResourceReadySignalWithImmediateLoad(void)
   Property::Map imageMap;
 
   imageMap[ ImageVisual::Property::URL ] = gImage_34_RGBA;
-  imageMap[ DevelImageVisual::Property::LOAD_POLICY ] =  DevelImageVisual::LoadPolicy::IMMEDIATE;
+  imageMap[ ImageVisual::Property::LOAD_POLICY ] =  ImageVisual::LoadPolicy::IMMEDIATE;
 
   tet_infoline("Creating ImageView without URL so image does not start loading");
   ImageView imageView = ImageView::New();
@@ -1557,7 +1557,7 @@ int UtcDaliImageViewResourceReadySignalWithReusedImage(void)
   Property::Map imageMap;
 
   imageMap[ ImageVisual::Property::URL ] = gImage_34_RGBA;
-  imageMap[ DevelImageVisual::Property::LOAD_POLICY ] =  DevelImageVisual::LoadPolicy::IMMEDIATE;
+  imageMap[ ImageVisual::Property::LOAD_POLICY ] =  ImageVisual::LoadPolicy::IMMEDIATE;
 
   ImageView imageView = ImageView::New();
   imageView.ResourceReadySignal().Connect( &ResourceReadySignal);
@@ -1591,7 +1591,7 @@ int UtcDaliImageViewResourceReadySignalWithReusedImage02(void)
 
   Property::Map imageImmediateLoadingMap;
   imageImmediateLoadingMap[ ImageVisual::Property::URL ] = gImage_34_RGBA;
-  imageImmediateLoadingMap[ DevelImageVisual::Property::LOAD_POLICY ] =  DevelImageVisual::LoadPolicy::IMMEDIATE;
+  imageImmediateLoadingMap[ ImageVisual::Property::LOAD_POLICY ] =  ImageVisual::LoadPolicy::IMMEDIATE;
 
   tet_infoline("Immediate load an image");
   ImageView imageView = ImageView::New();
index 679721c..ba64af3 100644 (file)
@@ -247,7 +247,7 @@ int UtcDaliImageVisualTextureReuse1(void)
   Property::Map propertyMap;
   propertyMap.Insert( Toolkit::Visual::Property::TYPE,  Visual::IMAGE );
   propertyMap.Insert( ImageVisual::Property::URL, TEST_LARGE_IMAGE_FILE_NAME );
-  propertyMap.Insert( DevelImageVisual::Property::RELEASE_POLICY,  DevelImageVisual::ReleasePolicy::DETACHED );
+  propertyMap.Insert( ImageVisual::Property::RELEASE_POLICY,  ImageVisual::ReleasePolicy::DETACHED );
 
   TestGlAbstraction& gl = application.GetGlAbstraction();
   TraceCallStack& textureTrace = gl.GetTextureTrace();
@@ -1213,7 +1213,7 @@ int UtcDaliImageVisualReleasePolicy01(void)
   ToolkitTestApplication application;
   tet_infoline( "UtcDaliImageVisualReleasePolicy01 Detached Policy, disabling visual with this policy deletes texture" );
 
-  Visual::Base imageVisual = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, DevelImageVisual::Property::RELEASE_POLICY, DevelImageVisual::ReleasePolicy::DETACHED );
+  Visual::Base imageVisual = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, ImageVisual::Property::RELEASE_POLICY, ImageVisual::ReleasePolicy::DETACHED );
   DALI_TEST_CHECK( imageVisual );
 
   // Set up debug trace
@@ -1263,7 +1263,7 @@ int UtcDaliImageVisualReleasePolicy02(void)
   ToolkitTestApplication application;
   tet_infoline( "UtcDaliImageVisualReleasePolicy02 Destroyed Policy, Texture should be deleted when visual destroyed" );
 
-  Visual::Base imageVisual = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, DevelImageVisual::Property::RELEASE_POLICY, DevelImageVisual::ReleasePolicy::DESTROYED );
+  Visual::Base imageVisual = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, ImageVisual::Property::RELEASE_POLICY, ImageVisual::ReleasePolicy::DESTROYED );
   DALI_TEST_CHECK( imageVisual );
 
   // Setup debug trace
@@ -1315,7 +1315,7 @@ int UtcDaliImageVisualReleasePolicy03(void)
   ToolkitTestApplication application;
   tet_infoline( "UtcDaliImageVisualReleasePolicy03 Never Policy, texture should not be deleted after visual destroyed" );
 
-  Visual::Base imageVisual = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, DevelImageVisual::Property::RELEASE_POLICY, DevelImageVisual::ReleasePolicy::NEVER );
+  Visual::Base imageVisual = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, ImageVisual::Property::RELEASE_POLICY, ImageVisual::ReleasePolicy::NEVER );
   DALI_TEST_CHECK( imageVisual );
 
   TestGlAbstraction& gl = application.GetGlAbstraction();
@@ -1365,10 +1365,10 @@ int UtcDaliImageVisualReleasePolicy04(void)
   tet_infoline( "UtcDaliImageVisualReleasePolicy04 Two visuals with different policies sharing a texture" );
 
   tet_infoline( "Create first visual with Never release policy" );
-  Visual::Base imageVisualNever = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, DevelImageVisual::Property::RELEASE_POLICY, DevelImageVisual::ReleasePolicy::NEVER );
+  Visual::Base imageVisualNever = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, ImageVisual::Property::RELEASE_POLICY, ImageVisual::ReleasePolicy::NEVER );
 
   tet_infoline( "Create second visual with Destroyed release policy");
-    Visual::Base imageVisualDestroyed = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, DevelImageVisual::Property::RELEASE_POLICY, DevelImageVisual::ReleasePolicy::DESTROYED );
+    Visual::Base imageVisualDestroyed = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, ImageVisual::Property::RELEASE_POLICY, ImageVisual::ReleasePolicy::DESTROYED );
 
   // Set up trace debug
   TestGlAbstraction& gl = application.GetGlAbstraction();
@@ -1444,7 +1444,7 @@ int UtcDaliImageVisualReleasePolicy05(void)
   imageVisualNever.CreatePropertyMap( resultMap );
   DALI_TEST_CHECK( ! resultMap.Empty() );
 
-  DALI_TEST_EQUALS( ( resultMap.Find( DevelImageVisual::Property::RELEASE_POLICY ) )->Get<int>(), (int)DevelImageVisual::ReleasePolicy::NEVER, TEST_LOCATION );
+  DALI_TEST_EQUALS( ( resultMap.Find( ImageVisual::Property::RELEASE_POLICY ) )->Get<int>(), (int)ImageVisual::ReleasePolicy::NEVER, TEST_LOCATION );
 
   END_TEST;
 }
@@ -1454,7 +1454,7 @@ int UtcDaliImageVisualReleasePolicy06(void)
   ToolkitTestApplication application;
   tet_infoline( "UtcDaliImageVisualReleasePolicy06 Never Policy, texture should not be affected by Disabling and Enabling visual" );
 
-  Visual::Base imageVisual= CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, DevelImageVisual::Property::RELEASE_POLICY, DevelImageVisual::ReleasePolicy::NEVER );
+  Visual::Base imageVisual= CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, ImageVisual::Property::RELEASE_POLICY, ImageVisual::ReleasePolicy::NEVER );
   DALI_TEST_CHECK( imageVisual );
 
   TestGlAbstraction& gl = application.GetGlAbstraction();
@@ -1514,11 +1514,11 @@ int UtcDaliImageVisualReleasePolicy07(void)
   tet_infoline( "UtcDaliImageVisualReleasePolicy07 Two visuals with different policies sharing a texture DETACHED and DESTROYED" );
 
   tet_infoline( "Create first visual with DESTROYED release policy" );
-  Visual::Base imageVisualDestroyed = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, DevelImageVisual::Property::RELEASE_POLICY, DevelImageVisual::ReleasePolicy::DESTROYED );
+  Visual::Base imageVisualDestroyed = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, ImageVisual::Property::RELEASE_POLICY, ImageVisual::ReleasePolicy::DESTROYED );
 
 
   tet_infoline( "Create second visual with DETACHED release policy");
-  Visual::Base imageVisualDetached = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, DevelImageVisual::Property::RELEASE_POLICY, DevelImageVisual::ReleasePolicy::DETACHED );
+  Visual::Base imageVisualDetached = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, ImageVisual::Property::RELEASE_POLICY, ImageVisual::ReleasePolicy::DETACHED );
 
   // Set up trace debug
   TestGlAbstraction& gl = application.GetGlAbstraction();
@@ -1584,7 +1584,7 @@ int UtcDaliImageVisualLoadPolicy01(void)
   textureTrace.Enable(true);
 
   tet_infoline( "Create visual with IMMEDIATE load policy" );
-  Visual::Base imageVisual = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, DevelImageVisual::Property::LOAD_POLICY, DevelImageVisual::LoadPolicy::IMMEDIATE );
+  Visual::Base imageVisual = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, ImageVisual::Property::LOAD_POLICY, ImageVisual::LoadPolicy::IMMEDIATE );
 
   DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
 
@@ -1637,7 +1637,7 @@ int UtcDaliImageVisualLoadPolicy02(void)
   textureTrace.Enable(true);
 
   tet_infoline( "Create visual with IMMEDIATE load policy" );
-  Visual::Base imageVisual = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, DevelImageVisual::Property::LOAD_POLICY, DevelImageVisual::LoadPolicy::ATTACHED );
+  Visual::Base imageVisual = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, ImageVisual::Property::LOAD_POLICY, ImageVisual::LoadPolicy::ATTACHED );
 
   const unsigned int TIME_OUT_3_SECONDS = 3;
   DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1, TIME_OUT_3_SECONDS ), false, TEST_LOCATION );
@@ -1699,7 +1699,7 @@ int UtcDaliImageVisualLoadPolicy03(void)
   actor.SetSize(200.f, 200.f);
 
   tet_infoline( "Create visual with IMMEDIATE load policy" );
-  Visual::Base imageVisual = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, DevelImageVisual::Property::LOAD_POLICY, DevelImageVisual::LoadPolicy::IMMEDIATE );
+  Visual::Base imageVisual = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, ImageVisual::Property::LOAD_POLICY, ImageVisual::LoadPolicy::IMMEDIATE );
 
   tet_infoline( "Registering visual allows control to get a signal once loaded even if visual not enabled( not staged )" );
   dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual, VISUAL_NOT_ENABLED );
@@ -1737,7 +1737,7 @@ int UtcDaliImageVisualLoadPolicy04(void)
   actor.SetSize(200.f, 200.f);
 
   tet_infoline( "Create visual with IMMEDIATE load policy" );
-  Visual::Base imageVisual = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, DevelImageVisual::Property::LOAD_POLICY, DevelImageVisual::LoadPolicy::IMMEDIATE );
+  Visual::Base imageVisual = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, ImageVisual::Property::LOAD_POLICY, ImageVisual::LoadPolicy::IMMEDIATE );
 
   tet_infoline( "Registering visual allows control to get a signal once loaded even if visual not enabled( staged )" );
   dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual, VISUAL_NOT_ENABLED );
@@ -1755,7 +1755,7 @@ int UtcDaliImageVisualLoadPolicy04(void)
   tet_infoline( "Original control correctly signalled, now testing for signal with new Control reusing the image" );
 
   gResourceReadySignalFired = false; // Reset signal check ready for testing next Control
-  Visual::Base imageVisual2 = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, DevelImageVisual::Property::LOAD_POLICY, DevelImageVisual::LoadPolicy::IMMEDIATE );
+  Visual::Base imageVisual2 = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, ImageVisual::Property::LOAD_POLICY, ImageVisual::LoadPolicy::IMMEDIATE );
   DummyControl actor2 = DummyControl::New(true);
   Impl::DummyControl& dummyImpl2 = static_cast<Impl::DummyControl&>(actor.GetImplementation());
   actor2.ResourceReadySignal().Connect( &ResourceReadySignal);
@@ -1788,7 +1788,7 @@ int UtcDaliImageVisualLoadPolicy05(void)
   Stage::GetCurrent().Add( actor );
 
   tet_infoline( "Create visual with ATTACHED load policy" );
-  Visual::Base imageVisual = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, DevelImageVisual::Property::LOAD_POLICY, DevelImageVisual::LoadPolicy::ATTACHED );
+  Visual::Base imageVisual = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, ImageVisual::Property::LOAD_POLICY, ImageVisual::LoadPolicy::ATTACHED );
 
   tet_infoline( "Registering visual allows control to get a signal once loaded" );
   dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual );
@@ -1806,7 +1806,7 @@ int UtcDaliImageVisualLoadPolicy05(void)
   tet_infoline( "Original control correctly signalled, now testing for signal with new Control reusing the image" );
 
   gResourceReadySignalFired = false; // Reset signal check ready for testing next Control
-  Visual::Base imageVisual2 = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, DevelImageVisual::Property::LOAD_POLICY, DevelImageVisual::LoadPolicy::ATTACHED );
+  Visual::Base imageVisual2 = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, ImageVisual::Property::LOAD_POLICY, ImageVisual::LoadPolicy::ATTACHED );
   DummyControl actor2 = DummyControl::New(true);
   Impl::DummyControl& dummyImpl2 = static_cast<Impl::DummyControl&>(actor.GetImplementation());
   actor2.ResourceReadySignal().Connect( &ResourceReadySignal);
@@ -1832,7 +1832,7 @@ int UtcDaliImageVisualOrientationCorrection(void)
   Property::Map propertyMap;
   propertyMap.Insert( Visual::Property::TYPE,  Visual::IMAGE );
   propertyMap.Insert( ImageVisual::Property::URL, TEST_ROTATED_IMAGE );
-  propertyMap.Insert( DevelImageVisual::Property::ORIENTATION_CORRECTION, false );
+  propertyMap.Insert( ImageVisual::Property::ORIENTATION_CORRECTION, false );
   Visual::Base imageVisual = factory.CreateVisual( propertyMap );
 
   tet_infoline( "Create control for visual, need to loaded it" );
@@ -1857,7 +1857,7 @@ int UtcDaliImageVisualOrientationCorrection(void)
   propertyMap.Clear();
   propertyMap.Insert( Visual::Property::TYPE,  Visual::IMAGE );
   propertyMap.Insert( ImageVisual::Property::URL, TEST_ROTATED_IMAGE );
-  propertyMap.Insert( DevelImageVisual::Property::ORIENTATION_CORRECTION, true );
+  propertyMap.Insert( ImageVisual::Property::ORIENTATION_CORRECTION, true );
   imageVisual = factory.CreateVisual( propertyMap );
 
   dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual );
@@ -1874,7 +1874,7 @@ int UtcDaliImageVisualOrientationCorrection(void)
   imageVisual.CreatePropertyMap( resultMap );
 
   // check the Property::ORIENTATION_CORRECTION value from the returned map
-  Property::Value* typeValue = resultMap.Find( DevelImageVisual::Property::ORIENTATION_CORRECTION,  Property::BOOLEAN );
+  Property::Value* typeValue = resultMap.Find( ImageVisual::Property::ORIENTATION_CORRECTION,  Property::BOOLEAN );
   DALI_TEST_EQUALS( typeValue->Get<bool>(), true, TEST_LOCATION );
 
   END_TEST;
index 5b381ef..9fc074f 100644 (file)
@@ -315,9 +315,38 @@ bool DaliTestCheckMaps( const Property::Map& fontStyleMapGet, const Property::Ma
 
       if( NULL != valueSet )
       {
-        if( valueGet.second.Get<std::string>() != valueSet->Get<std::string>() )
+        if( valueSet->GetType() == Dali::Property::STRING && ( valueGet.second.Get<std::string>() != valueSet->Get<std::string>() ) )
         {
-          tet_printf( "  Value got : [%s], expected : [%s]", valueGet.second.Get<std::string>().c_str(), valueSet->Get<std::string>().c_str() );
+          tet_printf( "Value got : [%s], expected : [%s]", valueGet.second.Get<std::string>().c_str(), valueSet->Get<std::string>().c_str() );
+          return false;
+        }
+        else if( valueSet->GetType() == Dali::Property::BOOLEAN && ( valueGet.second.Get<bool>() != valueSet->Get<bool>() ) )
+        {
+          tet_printf( "Value got : [%d], expected : [%d]", valueGet.second.Get<bool>(), valueSet->Get<bool>() );
+          return false;
+        }
+        else if( valueSet->GetType() == Dali::Property::INTEGER && ( valueGet.second.Get<int>() != valueSet->Get<int>() ) )
+        {
+          tet_printf( "Value got : [%d], expected : [%d]", valueGet.second.Get<int>(), valueSet->Get<int>() );
+          return false;
+        }
+        else if( valueSet->GetType() == Dali::Property::FLOAT && ( valueGet.second.Get<float>() != valueSet->Get<float>() ) )
+        {
+          tet_printf( "Value got : [%f], expected : [%f]", valueGet.second.Get<float>(), valueSet->Get<float>() );
+          return false;
+        }
+        else if( valueSet->GetType() == Dali::Property::VECTOR2 && ( valueGet.second.Get<Vector2>() != valueSet->Get<Vector2>() ) )
+        {
+          Vector2 vector2Get = valueGet.second.Get<Vector2>();
+          Vector2 vector2Set = valueSet->Get<Vector2>();
+          tet_printf( "Value got : [%f, %f], expected : [%f, %f]", vector2Get.x, vector2Get.y, vector2Set.x, vector2Set.y );
+          return false;
+        }
+        else if( valueSet->GetType() == Dali::Property::VECTOR4 && ( valueGet.second.Get<Vector4>() != valueSet->Get<Vector4>() ) )
+        {
+          Vector4 vector4Get = valueGet.second.Get<Vector4>();
+          Vector4 vector4Set = valueSet->Get<Vector4>();
+          tet_printf( "Value got : [%f, %f, %f, %f], expected : [%f, %f, %f, %f]", vector4Get.r, vector4Get.g, vector4Get.b, vector4Get.a, vector4Set.r, vector4Set.g, vector4Set.b, vector4Set.a );
           return false;
         }
       }
@@ -787,8 +816,6 @@ int UtcDaliTextEditorSetPropertyP(void)
 
   editor.SetProperty( TextEditor::Property::OUTLINE, outlineMapSet );
 
-  outlineMapSet["color"] = "red";
-  outlineMapSet["width"] = "2";
   outlineMapGet = editor.GetProperty<Property::Map>( TextEditor::Property::OUTLINE );
   DALI_TEST_EQUALS( outlineMapGet.Count(), outlineMapSet.Count(), TEST_LOCATION );
   DALI_TEST_EQUALS( DaliTestCheckMaps( outlineMapGet, outlineMapSet ), true, TEST_LOCATION );
index 719394d..07f1cac 100644 (file)
@@ -331,39 +331,65 @@ bool DaliTestCheckMaps( const Property::Map& fontStyleMapGet, const Property::Ma
     {
       const KeyValuePair& valueGet = fontStyleMapGet.GetKeyValue( index );
 
-      if( valueGet.first.type == Property::Key::STRING )
+      Property::Value* valueSet = NULL;
+      if ( valueGet.first.type == Property::Key::INDEX )
       {
-        Property::Value* valueSet = fontStyleMapSet.Find( valueGet.first.stringKey );
-        if( NULL != valueSet )
+        valueSet = fontStyleMapSet.Find( valueGet.first.indexKey );
+      }
+      else
+      {
+        // Get Key is a string so searching Set Map for a string key
+        valueSet = fontStyleMapSet.Find( valueGet.first.stringKey );
+      }
+
+      if( NULL != valueSet )
+      {
+        if( valueSet->GetType() == Dali::Property::STRING && ( valueGet.second.Get<std::string>() != valueSet->Get<std::string>() ) )
         {
-          if( valueGet.second.Get<std::string>() != valueSet->Get<std::string>() )
-          {
-            tet_printf( "  Value got : [%s], expected : [%s]", valueGet.second.Get<std::string>().c_str(), valueSet->Get<std::string>().c_str() );
-            return false;
-          }
+          tet_printf( "Value got : [%s], expected : [%s]", valueGet.second.Get<std::string>().c_str(), valueSet->Get<std::string>().c_str() );
+          return false;
         }
-        else
+        else if( valueSet->GetType() == Dali::Property::BOOLEAN && ( valueGet.second.Get<bool>() != valueSet->Get<bool>() ) )
         {
-          tet_printf( "  The key %s doesn't exist.", valueGet.first.stringKey.c_str() );
+          tet_printf( "Value got : [%d], expected : [%d]", valueGet.second.Get<bool>(), valueSet->Get<bool>() );
+          return false;
+        }
+        else if( valueSet->GetType() == Dali::Property::INTEGER && ( valueGet.second.Get<int>() != valueSet->Get<int>() ) )
+        {
+          tet_printf( "Value got : [%d], expected : [%d]", valueGet.second.Get<int>(), valueSet->Get<int>() );
+          return false;
+        }
+        else if( valueSet->GetType() == Dali::Property::FLOAT && ( valueGet.second.Get<float>() != valueSet->Get<float>() ) )
+        {
+          tet_printf( "Value got : [%f], expected : [%f]", valueGet.second.Get<float>(), valueSet->Get<float>() );
+          return false;
+        }
+        else if( valueSet->GetType() == Dali::Property::VECTOR2 && ( valueGet.second.Get<Vector2>() != valueSet->Get<Vector2>() ) )
+        {
+          Vector2 vector2Get = valueGet.second.Get<Vector2>();
+          Vector2 vector2Set = valueSet->Get<Vector2>();
+          tet_printf( "Value got : [%f, %f], expected : [%f, %f]", vector2Get.x, vector2Get.y, vector2Set.x, vector2Set.y );
+          return false;
+        }
+        else if( valueSet->GetType() == Dali::Property::VECTOR4 && ( valueGet.second.Get<Vector4>() != valueSet->Get<Vector4>() ) )
+        {
+          Vector4 vector4Get = valueGet.second.Get<Vector4>();
+          Vector4 vector4Set = valueSet->Get<Vector4>();
+          tet_printf( "Value got : [%f, %f, %f, %f], expected : [%f, %f, %f, %f]", vector4Get.r, vector4Get.g, vector4Get.b, vector4Get.a, vector4Set.r, vector4Set.g, vector4Set.b, vector4Set.a );
           return false;
         }
       }
       else
       {
-        Property::Value* valueSet = fontStyleMapSet.Find( valueGet.first.indexKey );
-        if( NULL != valueSet )
+        if ( valueGet.first.type == Property::Key::INDEX )
         {
-          if( valueGet.second.Get<int>() != valueSet->Get<int>() )
-          {
-            tet_printf( "  Integer Value got : [%d], expected : [%d]", valueGet.second.Get<int>(), valueSet->Get<int>() );
-            return false;
-          }
+          tet_printf( "  The key %d doesn't exist.", valueGet.first.indexKey );
         }
         else
         {
-          tet_printf( "  The Int key %d doesn't exist.", valueGet.first.indexKey );
-          return false;
+          tet_printf( "  The key %s doesn't exist.", valueGet.first.stringKey.c_str() );
         }
+        return false;
       }
     }
   }
@@ -846,8 +872,6 @@ int UtcDaliTextFieldSetPropertyP(void)
 
   field.SetProperty( TextField::Property::OUTLINE, outlineMapSet );
 
-  outlineMapSet["color"] = "red";
-  outlineMapSet["width"] = "2";
   outlineMapGet = field.GetProperty<Property::Map>( TextField::Property::OUTLINE );
   DALI_TEST_EQUALS( outlineMapGet.Count(), outlineMapSet.Count(), TEST_LOCATION );
   DALI_TEST_EQUALS( DaliTestCheckMaps( outlineMapGet, outlineMapSet ), true, TEST_LOCATION );
index 35e1ae7..f8d7497 100644 (file)
@@ -82,18 +82,64 @@ bool DaliTestCheckMaps( const Property::Map& fontStyleMapGet, const Property::Ma
     {
       const KeyValuePair& valueGet = fontStyleMapGet.GetKeyValue( index );
 
-      Property::Value* valueSet = fontStyleMapSet.Find( valueGet.first.stringKey );
+      Property::Value* valueSet = NULL;
+      if ( valueGet.first.type == Property::Key::INDEX )
+      {
+        valueSet = fontStyleMapSet.Find( valueGet.first.indexKey );
+      }
+      else
+      {
+        // Get Key is a string so searching Set Map for a string key
+        valueSet = fontStyleMapSet.Find( valueGet.first.stringKey );
+      }
+
       if( NULL != valueSet )
       {
-        if( valueGet.second.Get<std::string>() != valueSet->Get<std::string>() )
+        if( valueSet->GetType() == Dali::Property::STRING && ( valueGet.second.Get<std::string>() != valueSet->Get<std::string>() ) )
         {
-          tet_printf( "  Value got : [%s], expected : [%s]", valueGet.second.Get<std::string>().c_str(), valueSet->Get<std::string>().c_str() );
+          tet_printf( "Value got : [%s], expected : [%s]", valueGet.second.Get<std::string>().c_str(), valueSet->Get<std::string>().c_str() );
+          return false;
+        }
+        else if( valueSet->GetType() == Dali::Property::BOOLEAN && ( valueGet.second.Get<bool>() != valueSet->Get<bool>() ) )
+        {
+          tet_printf( "Value got : [%d], expected : [%d]", valueGet.second.Get<bool>(), valueSet->Get<bool>() );
+          return false;
+        }
+        else if( valueSet->GetType() == Dali::Property::INTEGER && ( valueGet.second.Get<int>() != valueSet->Get<int>() ) )
+        {
+          tet_printf( "Value got : [%d], expected : [%d]", valueGet.second.Get<int>(), valueSet->Get<int>() );
+          return false;
+        }
+        else if( valueSet->GetType() == Dali::Property::FLOAT && ( valueGet.second.Get<float>() != valueSet->Get<float>() ) )
+        {
+          tet_printf( "Value got : [%f], expected : [%f]", valueGet.second.Get<float>(), valueSet->Get<float>() );
+          return false;
+        }
+        else if( valueSet->GetType() == Dali::Property::VECTOR2 && ( valueGet.second.Get<Vector2>() != valueSet->Get<Vector2>() ) )
+        {
+          Vector2 vector2Get = valueGet.second.Get<Vector2>();
+          Vector2 vector2Set = valueSet->Get<Vector2>();
+          tet_printf( "Value got : [%f, %f], expected : [%f, %f]", vector2Get.x, vector2Get.y, vector2Set.x, vector2Set.y );
+          return false;
+        }
+        else if( valueSet->GetType() == Dali::Property::VECTOR4 && ( valueGet.second.Get<Vector4>() != valueSet->Get<Vector4>() ) )
+        {
+          Vector4 vector4Get = valueGet.second.Get<Vector4>();
+          Vector4 vector4Set = valueSet->Get<Vector4>();
+          tet_printf( "Value got : [%f, %f, %f, %f], expected : [%f, %f, %f, %f]", vector4Get.r, vector4Get.g, vector4Get.b, vector4Get.a, vector4Set.r, vector4Set.g, vector4Set.b, vector4Set.a );
           return false;
         }
       }
       else
       {
-        tet_printf( "  The key %s doesn't exist.", valueGet.first.stringKey.c_str() );
+        if ( valueGet.first.type == Property::Key::INDEX )
+        {
+          tet_printf( "  The key %d doesn't exist.", valueGet.first.indexKey );
+        }
+        else
+        {
+          tet_printf( "  The key %s doesn't exist.", valueGet.first.stringKey.c_str() );
+        }
         return false;
       }
     }
@@ -463,8 +509,6 @@ int UtcDaliToolkitTextLabelSetPropertyP(void)
   outlineMapSet["width"] = 2.0f;
   label.SetProperty( TextLabel::Property::OUTLINE, outlineMapSet );
 
-  outlineMapSet["color"] = "red";
-  outlineMapSet["width"] = "2";
   outlineMapGet = label.GetProperty<Property::Map>( TextLabel::Property::OUTLINE );
   DALI_TEST_EQUALS( outlineMapGet.Count(), outlineMapSet.Count(), TEST_LOCATION );
   DALI_TEST_EQUALS( DaliTestCheckMaps( outlineMapGet, outlineMapSet ), true, TEST_LOCATION );
index 89a95ba..4410c44 100644 (file)
@@ -19,7 +19,7 @@
 #include <dali-toolkit-test-suite-utils.h>
 #include <dali/public-api/rendering/texture-set.h>
 #include <dali/public-api/rendering/texture.h>
-#include <dali-toolkit/devel-api/image-loader/texture-manager.h>
+#include <dali-toolkit/public-api/image-loader/texture-manager.h>
 
 using namespace Dali;
 using namespace Dali::Toolkit;
index b1f2e2e..ab45fc0 100644 (file)
@@ -26,6 +26,7 @@
 #include <dali-toolkit/devel-api/visual-factory/transition-data.h>
 #include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
 #include <dali-toolkit/devel-api/visuals/image-visual-properties-devel.h>
+#include <dali-toolkit/devel-api/visuals/text-visual-properties-devel.h>
 #include <dali-toolkit/devel-api/visuals/animated-gradient-visual-properties-devel.h>
 #include <dali-toolkit/dali-toolkit.h>
 
@@ -68,18 +69,64 @@ bool DaliTestCheckMaps( const Property::Map& fontStyleMapGet, const Property::Ma
     {
       const KeyValuePair& valueGet = fontStyleMapGet.GetKeyValue( index );
 
-      Property::Value* valueSet = fontStyleMapSet.Find( valueGet.first.stringKey );
+      Property::Value* valueSet = NULL;
+      if ( valueGet.first.type == Property::Key::INDEX )
+      {
+        valueSet = fontStyleMapSet.Find( valueGet.first.indexKey );
+      }
+      else
+      {
+        // Get Key is a string so searching Set Map for a string key
+        valueSet = fontStyleMapSet.Find( valueGet.first.stringKey );
+      }
+
       if( NULL != valueSet )
       {
-        if( valueGet.second.Get<std::string>() != valueSet->Get<std::string>() )
+        if( valueSet->GetType() == Dali::Property::STRING && ( valueGet.second.Get<std::string>() != valueSet->Get<std::string>() ) )
+        {
+          tet_printf( "Value got : [%s], expected : [%s]", valueGet.second.Get<std::string>().c_str(), valueSet->Get<std::string>().c_str() );
+          return false;
+        }
+        else if( valueSet->GetType() == Dali::Property::BOOLEAN && ( valueGet.second.Get<bool>() != valueSet->Get<bool>() ) )
+        {
+          tet_printf( "Value got : [%d], expected : [%d]", valueGet.second.Get<bool>(), valueSet->Get<bool>() );
+          return false;
+        }
+        else if( valueSet->GetType() == Dali::Property::INTEGER && ( valueGet.second.Get<int>() != valueSet->Get<int>() ) )
+        {
+          tet_printf( "Value got : [%d], expected : [%d]", valueGet.second.Get<int>(), valueSet->Get<int>() );
+          return false;
+        }
+        else if( valueSet->GetType() == Dali::Property::FLOAT && ( valueGet.second.Get<float>() != valueSet->Get<float>() ) )
         {
-          tet_printf( "  Value got : [%s], expected : [%s]", valueGet.second.Get<std::string>().c_str(), valueSet->Get<std::string>().c_str() );
+          tet_printf( "Value got : [%f], expected : [%f]", valueGet.second.Get<float>(), valueSet->Get<float>() );
+          return false;
+        }
+        else if( valueSet->GetType() == Dali::Property::VECTOR2 && ( valueGet.second.Get<Vector2>() != valueSet->Get<Vector2>() ) )
+        {
+          Vector2 vector2Get = valueGet.second.Get<Vector2>();
+          Vector2 vector2Set = valueSet->Get<Vector2>();
+          tet_printf( "Value got : [%f, %f], expected : [%f, %f]", vector2Get.x, vector2Get.y, vector2Set.x, vector2Set.y );
+          return false;
+        }
+        else if( valueSet->GetType() == Dali::Property::VECTOR4 && ( valueGet.second.Get<Vector4>() != valueSet->Get<Vector4>() ) )
+        {
+          Vector4 vector4Get = valueGet.second.Get<Vector4>();
+          Vector4 vector4Set = valueSet->Get<Vector4>();
+          tet_printf( "Value got : [%f, %f, %f, %f], expected : [%f, %f, %f, %f]", vector4Get.r, vector4Get.g, vector4Get.b, vector4Get.a, vector4Set.r, vector4Set.g, vector4Set.b, vector4Set.a );
           return false;
         }
       }
       else
       {
-        tet_printf( "  The key %s doesn't exist.", valueGet.first.stringKey.c_str() );
+        if ( valueGet.first.type == Property::Key::INDEX )
+        {
+          tet_printf( "  The key %d doesn't exist.", valueGet.first.indexKey );
+        }
+        else
+        {
+          tet_printf( "  The key %s doesn't exist.", valueGet.first.stringKey.c_str() );
+        }
         return false;
       }
     }
@@ -1070,6 +1117,16 @@ int UtcDaliVisualGetPropertyMap10(void)
   propertyMap.Insert( "horizontalAlignment", "CENTER" );
   propertyMap.Insert( "verticalAlignment", "CENTER" );
   propertyMap.Insert( "textColor", Color::RED );
+
+  Property::Map shadowMapSet;
+  propertyMap.Insert( "shadow", shadowMapSet.Add("color", Color::RED).Add("offset", Vector2(2.0f, 2.0f)).Add("blurRadius", 3.0f) );
+
+  Property::Map underlineMapSet;
+  propertyMap.Insert( "underline", underlineMapSet.Add("enable", "true").Add("color", "green").Add("height", "1") );
+
+  Property::Map outlineMapSet;
+  propertyMap.Insert( "outline", outlineMapSet.Add("color", Color::YELLOW).Add("width", 1) );
+
   Visual::Base textVisual = factory.CreateVisual( propertyMap );
 
   Property::Map resultMap;
@@ -1123,6 +1180,27 @@ int UtcDaliVisualGetPropertyMap10(void)
   DALI_TEST_CHECK( value );
   DALI_TEST_CHECK( !value->Get<bool>() );
 
+  value = resultMap.Find( TextVisual::Property::SHADOW, Property::MAP );
+  DALI_TEST_CHECK( value );
+
+  Property::Map shadowMapGet = value->Get<Property::Map>();
+  DALI_TEST_EQUALS( shadowMapGet.Count(), shadowMapSet.Count(), TEST_LOCATION );
+  DALI_TEST_EQUALS( DaliTestCheckMaps( shadowMapGet, shadowMapSet ), true, TEST_LOCATION );
+
+  value = resultMap.Find( TextVisual::Property::UNDERLINE, Property::MAP );
+  DALI_TEST_CHECK( value );
+
+  Property::Map underlineMapGet = value->Get<Property::Map>();
+  DALI_TEST_EQUALS( underlineMapGet.Count(), underlineMapSet.Count(), TEST_LOCATION );
+  DALI_TEST_EQUALS( DaliTestCheckMaps( underlineMapGet, underlineMapSet ), true, TEST_LOCATION );
+
+  value = resultMap.Find( DevelTextVisual::Property::OUTLINE, Property::MAP );
+  DALI_TEST_CHECK( value );
+
+  Property::Map outlineMapGet = value->Get<Property::Map>();
+  DALI_TEST_EQUALS( outlineMapGet.Count(), outlineMapSet.Count(), TEST_LOCATION );
+  DALI_TEST_EQUALS( DaliTestCheckMaps( outlineMapGet, outlineMapSet ), true, TEST_LOCATION );
+
   END_TEST;
 }
 
index ddcd598..354478a 100644 (file)
@@ -354,6 +354,10 @@ ALIASES += SINCE_1_2_10="@since 1.2.10"
 ALIASES += SINCE_1_2_14="@since 1.2.14"
 ALIASES += SINCE_1_2_32="@since 1.2.32"
 
+# Extra tags for Tizen 4.0
+ALIASES += SINCE_1_3_4="@since 1.3.4"
+ALIASES += SINCE_1_3_5="@since 1.3.5"
+
 ALIASES += DEPRECATED_1_0="@deprecated Deprecated since 1.0"
 ALIASES += DEPRECATED_1_1="@deprecated Deprecated since 1.1"
 ALIASES += DEPRECATED_1_2_8="@deprecated Deprecated since 1.2.8"
@@ -384,6 +388,10 @@ ALIASES += REMARK_RAWVIDEO=""
 #ALIASES += SINCE_1_2_14="\par Since:\n 3.0, DALi version 1.2.14"
 #ALIASES += SINCE_1_2_32="\par Since:\n 3.0, DALi version 1.2.32"
 
+## Extra tags for Tizen 4.0
+#ALIASES += SINCE_1_3_4="\par Since:\n 4.0, DALi version 1.3.4"
+#ALIASES += SINCE_1_3_5="\par Since:\n 4.0, DALi version 1.3.5"
+
 ## DALi has no deprecated API in Tizen 2.4 because it's DALi's first release.
 ## Thus deprecated APIs in DALi 1.0.xx will be deprecated in Tizen 3.0.
 #ALIASES += DEPRECATED_1_0="@deprecated Deprecated since 3.0, DALi version 1.0"
index c6fafad..78a79ed 100644 (file)
@@ -54,6 +54,7 @@
 
 #include <dali-toolkit/public-api/image-loader/async-image-loader.h>
 #include <dali-toolkit/public-api/image-loader/sync-image-loader.h>
+#include <dali-toolkit/public-api/image-loader/texture-manager.h>
 
 #include <dali-toolkit/public-api/accessibility-manager/accessibility-manager.h>
 
index 1ea20d2..116f69a 100644 (file)
@@ -83,12 +83,6 @@ bool IsVisualEnabled( const Internal::Control& control, Dali::Property::Index in
   return controlDataImpl.IsVisualEnabled( index );
 }
 
-Toolkit::Visual::ResourceStatus GetVisualResourceStatus( const Internal::Control& control, Dali::Property::Index index )
-{
-  const Internal::Control::Impl& controlDataImpl = Internal::Control::Impl::Get( control );
-  return controlDataImpl.GetVisualResourceStatus( index );
-}
-
 Dali::Animation CreateTransition( Internal::Control& control, const Toolkit::TransitionData& handle )
 {
   Internal::Control::Impl& controlDataImpl = Internal::Control::Impl::Get( control );
index 9a824d3..ae90f4d 100644 (file)
@@ -215,15 +215,6 @@ DALI_IMPORT_API void EnableVisual( Internal::Control& control, Dali::Property::I
 DALI_IMPORT_API bool IsVisualEnabled( const Internal::Control& control, Dali::Property::Index index );
 
 /**
- * @brief Get the loading state of the visual resource.
- *
- * @param[in] control The control
- * @param[in] index The Property index of the visual
- * @return Return the loading status (PREPARING, READY and FAILED) of visual resource
- */
-DALI_IMPORT_API Toolkit::Visual::ResourceStatus GetVisualResourceStatus( const Internal::Control& control, Dali::Property::Index index );
-
-/**
  * @brief Create a transition effect on the control.
  *
  * Only generates an animation if the properties described in the transition
index 2c12272..e7ec321 100644 (file)
@@ -28,7 +28,6 @@ devel_api_src_files = \
   $(devel_api_src_dir)/image-loader/async-image-loader-devel.cpp \
   $(devel_api_src_dir)/image-loader/atlas-upload-observer.cpp \
   $(devel_api_src_dir)/image-loader/image-atlas.cpp \
-  $(devel_api_src_dir)/image-loader/texture-manager.cpp \
   $(devel_api_src_dir)/scripting/script.cpp \
   $(devel_api_src_dir)/styling/style-manager-devel.cpp \
   $(devel_api_src_dir)/transition-effects/cube-transition-cross-effect.cpp \
@@ -94,6 +93,7 @@ devel_api_visuals_header_files = \
   $(devel_api_src_dir)/visuals/image-visual-properties-devel.h \
   $(devel_api_src_dir)/visuals/image-visual-actions-devel.h \
   $(devel_api_src_dir)/visuals/animated-gradient-visual-properties-devel.h \
+  $(devel_api_src_dir)/visuals/text-visual-properties-devel.h \
   $(devel_api_src_dir)/visuals/visual-properties-devel.h
 
 devel_api_shadow_view_header_files = \
@@ -106,8 +106,7 @@ devel_api_focus_manager_header_files = \
 devel_api_image_loader_header_files = \
   $(devel_api_src_dir)/image-loader/async-image-loader-devel.h \
   $(devel_api_src_dir)/image-loader/atlas-upload-observer.h \
-  $(devel_api_src_dir)/image-loader/image-atlas.h \
-  $(devel_api_src_dir)/image-loader/texture-manager.h
+  $(devel_api_src_dir)/image-loader/image-atlas.h
 
 devel_api_scripting_header_files = \
   $(devel_api_src_dir)/scripting/script.h \
index b6a51fb..88cb626 100644 (file)
@@ -61,7 +61,7 @@ const std::string& Visual::Base::GetName()
   return GetImplementation( *this ).GetName();
 }
 
-void Visual::Base::SetTransformAndSize( const Property::Map& transform, Size controlSize )
+void Visual::Base::SetTransformAndSize( const Dali::Property::Map& transform, Size controlSize )
 {
   GetImplementation( *this ).SetTransformAndSize( transform, controlSize );
 }
@@ -91,7 +91,7 @@ int Visual::Base::GetDepthIndex() const
   return GetImplementation( *this ).GetDepthIndex();
 }
 
-void Visual::Base::CreatePropertyMap( Property::Map& map ) const
+void Visual::Base::CreatePropertyMap( Dali::Property::Map& map ) const
 {
   GetImplementation( *this ).CreatePropertyMap( map );
 }
index da41237..54a0310 100644 (file)
@@ -38,13 +38,6 @@ class Base;
 namespace Visual
 {
 
-enum class ResourceStatus
-{
-  PREPARING,
-  READY,
-  FAILED
-};
-
 /**
  * @brief A Visual provides a renderer for drawing a control component. A control may have multiple visuals.
  *
index e87af5d..a340755 100644 (file)
@@ -30,42 +30,6 @@ namespace Toolkit
 namespace DevelImageVisual
 {
 
-/**
- * @brief The policy determining if the image is loaded when the visual is staged or created.
- */
-namespace LoadPolicy
-{
-
-/**
- * @brief The available named elements that define the LoadPolicy.
- */
-enum Type
-{
-  IMMEDIATE = 0,  ///< The image is loaded when the ImageVisual is created.
-  ATTACHED        ///< The image is loaded when the ImageVisual is attached to the stage.
-};
-
-} // namespace LoadPolicy
-
-/**
- * @brief The policy determining when a image is deleted from the cache in relation to the ImageVisual lifetime.
- * @note If the texture is being shared by another visual it persist if still required.
- */
-namespace ReleasePolicy
-{
-
-/**
- * @brief The available named elements that define the ReleasePolicy.
- */
-enum Type
-{
-  DETACHED = 0,  ///<  Image deleted from cache when ImageVisual detached from stage.
-  DESTROYED,     ///<  Image deleted from cache when ImageVisual destroyed.
-  NEVER          ///<  Image is never deleted, will survive the lifetime of the application.
-};
-
-} // namespace ReleasePolicy;
-
 namespace Property
 {
 
@@ -89,29 +53,9 @@ enum Type
   FRAME_DELAY         = Dali::Toolkit::ImageVisual::Property::FRAME_DELAY,
   MASK_CONTENT_SCALE  = Dali::Toolkit::ImageVisual::Property::MASK_CONTENT_SCALE,
   CROP_TO_MASK        = Dali::Toolkit::ImageVisual::Property::CROP_TO_MASK,
-
-  /**
-   * @brief The policy to determine when an image should be loaded.
-   * @details Name "loadPolicy",  Type LoadPolicy::Type (Property::INTEGER)or Property::STRING.
-   * @note Default LoadPolicy::ATTACHED
-   * @see LoadPolicy::Type
-   */
-  LOAD_POLICY = CROP_TO_MASK + 1,
-
-  /**
-   * @brief The policy to determine when an image should no longer be cached.
-   * @details Name "releasePolicy", Type ReleasePolicy::Type (Property::INTEGER) or Property::STRING
-   * @note Default ReleasePolicy::DESTROYED
-   * @see ReleasePolicy::Type
-   */
-  RELEASE_POLICY = CROP_TO_MASK + 2,
-
-  /**
-   * @brief Determines if image orientation should be corrected so the image displays as it was intended.
-   * @details Name "orientationCorrection", Type Property::BOOLEAN, if true the image's orientation will be corrected.
-   * @note Default true
-   */
-  ORIENTATION_CORRECTION = CROP_TO_MASK + 3,
+  LOAD_POLICY         = Dali::Toolkit::ImageVisual::Property::LOAD_POLICY,
+  RELEASE_POLICY      = Dali::Toolkit::ImageVisual::Property::RELEASE_POLICY,
+  ORIENTATION_CORRECTION = Dali::Toolkit::ImageVisual::Property::ORIENTATION_CORRECTION,
 
   /**
    * @brief Overlays the auxiliary iamge on top of an NPatch image.
@@ -123,14 +67,14 @@ enum Type
    * @details Name "auxiliaryImage", Type Property::STRING, URL of the image.
    * @note Default true
    */
-  AUXILIARY_IMAGE = CROP_TO_MASK + 4,
+  AUXILIARY_IMAGE = ORIENTATION_CORRECTION + 1,
 
   /**
    * @brief An alpha value for mixing between the masked main NPatch image and the auxiliary image
    * @details Name "auxiliaryImageAlpha", Type Property::FLOAT, between 0 and 1
    * @note Default 0
    */
-  AUXILIARY_IMAGE_ALPHA = CROP_TO_MASK + 5,
+  AUXILIARY_IMAGE_ALPHA = ORIENTATION_CORRECTION + 2,
 
 };
 
diff --git a/dali-toolkit/devel-api/visuals/text-visual-properties-devel.h b/dali-toolkit/devel-api/visuals/text-visual-properties-devel.h
new file mode 100644 (file)
index 0000000..ec80f49
--- /dev/null
@@ -0,0 +1,69 @@
+#ifndef DALI_TOOLKIT_DEVEL_API_VISUALS_TEXT_VISUAL_PROPERTIES_DEVEL_H
+#define DALI_TOOLKIT_DEVEL_API_VISUALS_TEXT_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 <dali-toolkit/public-api/visuals/text-visual-properties.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace DevelTextVisual
+{
+
+namespace Property
+{
+
+/**
+ * @brief All the visual types.
+ */
+enum
+{
+  TEXT                  = Dali::Toolkit::TextVisual::Property::TEXT,
+  FONT_FAMILY           = Dali::Toolkit::TextVisual::Property::FONT_FAMILY,
+  FONT_STYLE            = Dali::Toolkit::TextVisual::Property::FONT_STYLE,
+  POINT_SIZE            = Dali::Toolkit::TextVisual::Property::POINT_SIZE,
+  MULTI_LINE            = Dali::Toolkit::TextVisual::Property::MULTI_LINE,
+  HORIZONTAL_ALIGNMENT  = Dali::Toolkit::TextVisual::Property::HORIZONTAL_ALIGNMENT,
+  VERTICAL_ALIGNMENT    = Dali::Toolkit::TextVisual::Property::VERTICAL_ALIGNMENT,
+  TEXT_COLOR            = Dali::Toolkit::TextVisual::Property::TEXT_COLOR,
+  ENABLE_MARKUP         = Dali::Toolkit::TextVisual::Property::ENABLE_MARKUP,
+  SHADOW                = Dali::Toolkit::TextVisual::Property::SHADOW,
+  UNDERLINE             = Dali::Toolkit::TextVisual::Property::UNDERLINE,
+
+  /**
+   * @brief The default outline parameters.
+   * @details name "outline", type Property::MAP.
+   */
+  OUTLINE               = UNDERLINE + 1
+};
+
+
+} // namespace Property
+
+} // namespace DevelTextVisual
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif // DALI_TOOLKIT_DEVEL_API_VISUALS_TEXT_VISUAL_PROPERTIES_DEVEL_H
index df661ef..ddd7506 100644 (file)
@@ -31,6 +31,7 @@
 #include <dali-toolkit/internal/controls/tooltip/tooltip.h>
 #include <dali-toolkit/internal/builder/style.h>
 #include <dali-toolkit/internal/builder/dictionary.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
 
 namespace Dali
 {
index e9e0b1a..aa4d5c6 100644 (file)
@@ -236,6 +236,9 @@ struct Decorator::Impl : public ConnectionTracker
     mBoundingBox(),
     mHighlightColor( LIGHT_BLUE ),
     mHighlightPosition( Vector2::ZERO ),
+    mHighlightSize( Vector2::ZERO ),
+    mControlSize( Vector2::ZERO ),
+    mHighlightOutlineOffset( 0.f ),
     mActiveCursor( ACTIVE_CURSOR_NONE ),
     mCursorBlinkInterval( CURSOR_BLINK_INTERVAL ),
     mCursorBlinkDuration( 0.0f ),
@@ -1163,8 +1166,8 @@ struct Decorator::Impl : public ConnectionTracker
     if ( mHighlightActor )
     {
       // Sets the position of the highlight actor inside the decorator.
-      mHighlightActor.SetPosition( mHighlightPosition.x,
-                                   mHighlightPosition.y );
+      mHighlightActor.SetPosition( mHighlightPosition.x + mHighlightOutlineOffset,
+                                   mHighlightPosition.y + mHighlightOutlineOffset );
 
       const unsigned int numberOfQuads = mHighlightQuadList.Count();
       if( 0u != numberOfQuads )
@@ -1912,6 +1915,7 @@ struct Decorator::Impl : public ConnectionTracker
   Vector2             mHighlightPosition;         ///< The position of the highlight actor.
   Size                mHighlightSize;             ///< The size of the highlighted text.
   Size                mControlSize;               ///< The control's size. Set by the Relayout.
+  float               mHighlightOutlineOffset;    ///< The outline's offset.
 
   unsigned int        mActiveCursor;
   unsigned int        mCursorBlinkInterval;
@@ -2199,16 +2203,18 @@ void Decorator::AddHighlight( unsigned int index, const Vector4& quad )
   *( mImpl->mHighlightQuadList.Begin() + index ) = quad;
 }
 
-void Decorator::SetHighLightBox( const Vector2& position, const Size& size )
+void Decorator::SetHighLightBox( const Vector2& position, const Size& size, float outlineOffset )
 {
   mImpl->mHighlightPosition = position;
   mImpl->mHighlightSize = size;
+  mImpl->mHighlightOutlineOffset = outlineOffset;
 }
 
 void Decorator::ClearHighlights()
 {
   mImpl->mHighlightQuadList.Clear();
   mImpl->mHighlightPosition = Vector2::ZERO;
+  mImpl->mHighlightOutlineOffset = 0.f;
 }
 
 void Decorator::ResizeHighlightQuads( unsigned int numberOfQuads )
index 8cff322..11f7062 100644 (file)
@@ -468,9 +468,11 @@ public:
    *
    * @param[in] position The position of the highlighted text in decorator's coords.
    * @param[in] size The size of the highlighted text.
+   * @param[in] outlineOffset The outline's offset.
    */
   void SetHighLightBox( const Vector2& position,
-                        const Size& size );
+                        const Size& size,
+                        float outlineOffset );
 
   /**
    * @brief Removes all of the previously added highlights.
index 3ef1965..03d02f5 100644 (file)
@@ -569,7 +569,7 @@ struct AtlasRenderer::Impl
           lastFontId = glyph.fontId; // Prevents searching for existing blocksizes when string of the same fontId.
         }
 
-        if( isOutline&& ( 0u != slotOutline.mImageId ) ) // invalid slot id, glyph has failed to be added to atlas
+        if( isOutline && ( 0u != slotOutline.mImageId ) ) // invalid slot id, glyph has failed to be added to atlas
         {
           GenerateMesh( glyph,
                         position,
index ba5dda6..57e51d1 100644 (file)
@@ -2292,7 +2292,7 @@ void Controller::Impl::RepositionSelectionHandles()
   const SelectionBoxInfo& firstSelectionBoxLineInfo = *( selectionBoxLinesInfo.Begin() );
   highLightPosition.y = firstSelectionBoxLineInfo.lineOffset;
 
-  mEventData->mDecorator->SetHighLightBox( highLightPosition, highLightSize );
+  mEventData->mDecorator->SetHighLightBox( highLightPosition, highLightSize, static_cast<float>( mModel->GetOutlineWidth() ) );
 
   if( !mEventData->mDecorator->IsSmoothHandlePanEnabled() )
   {
@@ -2712,6 +2712,13 @@ void Controller::Impl::GetCursorPosition( CharacterIndex logical,
   Text::GetCursorPosition( parameters,
                            cursorInfo );
 
+  // Adds Outline offset.
+  const float outlineWidth = static_cast<float>( mModel->GetOutlineWidth() );
+  cursorInfo.primaryPosition.x += outlineWidth;
+  cursorInfo.primaryPosition.y += outlineWidth;
+  cursorInfo.secondaryPosition.x += outlineWidth;
+  cursorInfo.secondaryPosition.y += outlineWidth;
+
   if( isMultiLine )
   {
     // If the text is editable and multi-line, the cursor position after a white space shouldn't exceed the boundaries of the text control.
index dde8160..43c9e7a 100755 (executable)
@@ -3397,7 +3397,7 @@ bool Controller::DoRelayout( const Size& size,
     const Vector<CharacterIndex>& glyphsToCharactersMap = mImpl->mModel->mVisualModel->mGlyphsToCharacters;
     const Vector<Length>& charactersPerGlyph = mImpl->mModel->mVisualModel->mCharactersPerGlyph;
     const Character* const textBuffer = mImpl->mModel->mLogicalModel->mText.Begin();
-    float outlineWidth = mImpl->mModel->GetOutlineWidth();
+    const float outlineWidth = static_cast<float>( mImpl->mModel->GetOutlineWidth() );
 
     // Set the layout parameters.
     Layout::Parameters layoutParameters( size,
index e56eac3..d8d35de 100755 (executable)
@@ -649,14 +649,8 @@ void GetOutlineProperties( ControllerPtr controller, Property::Value& value, Eff
           const unsigned int width = controller->GetOutlineWidth();
 
           Property::Map map;
-
-          std::string colorStr;
-          Vector4ToColorString( color, colorStr );
-          map.Insert( COLOR_KEY, colorStr );
-
-          std::string widthStr;
-          UintToString( width, widthStr );
-          map.Insert( WIDTH_KEY, widthStr );
+          map.Insert( COLOR_KEY, color );
+          map.Insert( WIDTH_KEY, static_cast<int>( width ) );
 
           value = map;
 
index f20286c..78ed950 100755 (executable)
@@ -19,6 +19,7 @@
 
 //INTERNAL INCLUDES
 #include <dali-toolkit/devel-api/visuals/animated-gradient-visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
 #include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
 #include <dali-toolkit/internal/visuals/visual-factory-impl.h>
 #include <dali-toolkit/internal/visuals/visual-factory-cache.h>
index 8845541..51924f0 100644 (file)
@@ -94,15 +94,15 @@ DALI_ENUM_TO_STRING_TABLE_END( WRAP_MODE )
 
 // load policies
 DALI_ENUM_TO_STRING_TABLE_BEGIN( LOAD_POLICY )
-DALI_ENUM_TO_STRING_WITH_SCOPE( DevelImageVisual::LoadPolicy, IMMEDIATE )
-DALI_ENUM_TO_STRING_WITH_SCOPE( DevelImageVisual::LoadPolicy, ATTACHED )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Dali::Toolkit::ImageVisual::LoadPolicy, IMMEDIATE )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Dali::Toolkit::ImageVisual::LoadPolicy, ATTACHED )
 DALI_ENUM_TO_STRING_TABLE_END( LOAD_POLICY )
 
 // release policies
 DALI_ENUM_TO_STRING_TABLE_BEGIN( RELEASE_POLICY )
-DALI_ENUM_TO_STRING_WITH_SCOPE( DevelImageVisual::ReleasePolicy, DETACHED )
-DALI_ENUM_TO_STRING_WITH_SCOPE( DevelImageVisual::ReleasePolicy, DESTROYED )
-DALI_ENUM_TO_STRING_WITH_SCOPE( DevelImageVisual::ReleasePolicy, NEVER )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Dali::Toolkit::ImageVisual::ReleasePolicy, DETACHED )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Dali::Toolkit::ImageVisual::ReleasePolicy, DESTROYED )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Dali::Toolkit::ImageVisual::ReleasePolicy, NEVER )
 DALI_ENUM_TO_STRING_TABLE_END( RELEASE_POLICY )
 
 const Vector4 FULL_TEXTURE_RECT(0.f, 0.f, 1.f, 1.f);
@@ -282,8 +282,8 @@ ImageVisual::ImageVisual( VisualFactoryCache& factoryCache,
   mSamplingMode( samplingMode ),
   mWrapModeU( WrapMode::DEFAULT ),
   mWrapModeV( WrapMode::DEFAULT ),
-  mLoadPolicy( DevelImageVisual::LoadPolicy::ATTACHED ),
-  mReleasePolicy( DevelImageVisual::ReleasePolicy::DETACHED ),
+  mLoadPolicy( Toolkit::ImageVisual::LoadPolicy::ATTACHED ),
+  mReleasePolicy( Toolkit::ImageVisual::ReleasePolicy::DETACHED ),
   mAtlasRect( 0.0f, 0.0f, 0.0f, 0.0f ),
   mAttemptAtlasing( false ),
   mLoading( false ),
@@ -305,8 +305,8 @@ ImageVisual::ImageVisual( VisualFactoryCache& factoryCache, const Image& image )
   mSamplingMode( SamplingMode::DEFAULT ),
   mWrapModeU( WrapMode::DEFAULT ),
   mWrapModeV( WrapMode::DEFAULT ),
-  mLoadPolicy( DevelImageVisual::LoadPolicy::ATTACHED ),
-  mReleasePolicy( DevelImageVisual::ReleasePolicy::DESTROYED ),
+  mLoadPolicy( Toolkit::ImageVisual::LoadPolicy::ATTACHED ),
+  mReleasePolicy( Toolkit::ImageVisual::ReleasePolicy::DESTROYED ),
   mAtlasRect( 0.0f, 0.0f, 0.0f, 0.0f ),
   mAttemptAtlasing( false ),
   mLoading( false ),
@@ -331,7 +331,7 @@ ImageVisual::~ImageVisual()
     }
 
     // ImageVisual destroyed so remove texture unless ReleasePolicy is set to never release
-    if( ( mTextureId != TextureManager::INVALID_TEXTURE_ID  ) && ( mReleasePolicy != DevelImageVisual::ReleasePolicy::NEVER ) )
+    if( ( mTextureId != TextureManager::INVALID_TEXTURE_ID  ) && ( mReleasePolicy != Toolkit::ImageVisual::ReleasePolicy::NEVER ) )
     {
       RemoveTexture();
     }
@@ -400,20 +400,20 @@ void ImageVisual::DoSetProperties( const Property::Map& propertyMap )
       }
       else if ( keyValue.first == LOAD_POLICY_NAME )
       {
-        DoSetProperty( Toolkit::DevelImageVisual::Property::LOAD_POLICY, keyValue.second );
+        DoSetProperty( Toolkit::ImageVisual::Property::LOAD_POLICY, keyValue.second );
       }
       else if( keyValue.first == RELEASE_POLICY_NAME )
       {
-        DoSetProperty( Toolkit::DevelImageVisual::Property::RELEASE_POLICY, keyValue.second );
+        DoSetProperty( Toolkit::ImageVisual::Property::RELEASE_POLICY, keyValue.second );
       }
       else if( keyValue.first == ORIENTATION_CORRECTION_NAME )
       {
-        DoSetProperty( Toolkit::DevelImageVisual::Property::ORIENTATION_CORRECTION, keyValue.second );
+        DoSetProperty( Toolkit::ImageVisual::Property::ORIENTATION_CORRECTION, keyValue.second );
       }
     }
   }
   // Load image immediately if LOAD_POLICY requires it
-  if ( mLoadPolicy == DevelImageVisual::LoadPolicy::IMMEDIATE )
+  if ( mLoadPolicy == Toolkit::ImageVisual::LoadPolicy::IMMEDIATE )
   {
     auto attemptAtlasing = AttemptAtlasing();
     LoadTexture( attemptAtlasing, mAtlasRect, mTextures, mOrientationCorrection,
@@ -554,22 +554,22 @@ void ImageVisual::DoSetProperty( Property::Index index, const Property::Value& v
       break;
     }
 
-    case Toolkit::DevelImageVisual::Property::RELEASE_POLICY:
+    case Toolkit::ImageVisual::Property::RELEASE_POLICY:
     {
       int releasePolicy;
       Scripting::GetEnumerationProperty( value, RELEASE_POLICY_TABLE, RELEASE_POLICY_TABLE_COUNT, releasePolicy );
-      mReleasePolicy = DevelImageVisual::ReleasePolicy::Type( releasePolicy );
+      mReleasePolicy = Toolkit::ImageVisual::ReleasePolicy::Type( releasePolicy );
       break;
     }
 
-    case Toolkit::DevelImageVisual::Property::LOAD_POLICY:
+    case Toolkit::ImageVisual::Property::LOAD_POLICY:
     {
       int loadPolicy;
       Scripting::GetEnumerationProperty( value, LOAD_POLICY_TABLE, LOAD_POLICY_TABLE_COUNT, loadPolicy );
-      mLoadPolicy = DevelImageVisual::LoadPolicy::Type( loadPolicy );
+      mLoadPolicy = Toolkit::ImageVisual::LoadPolicy::Type( loadPolicy );
       break;
     }
-    case Toolkit::DevelImageVisual::Property::ORIENTATION_CORRECTION:
+    case Toolkit::ImageVisual::Property::ORIENTATION_CORRECTION:
     {
       bool orientationCorrection( mOrientationCorrection );
       if( value.Get( orientationCorrection ) )
@@ -892,7 +892,7 @@ void ImageVisual::DoSetOffStage( Actor& actor )
 
   // Image release is dependent on the ReleasePolicy, renderer is destroyed.
   actor.RemoveRenderer( mImpl->mRenderer);
-  if( mReleasePolicy == DevelImageVisual::ReleasePolicy::DETACHED )
+  if( mReleasePolicy == Toolkit::ImageVisual::ReleasePolicy::DETACHED )
   {
     RemoveTexture(); // If INVALID_TEXTURE_ID then removal will be attempted on atlas
   }
@@ -948,9 +948,9 @@ void ImageVisual::DoCreatePropertyMap( Property::Map& map ) const
     map.Insert( Toolkit::ImageVisual::Property::CROP_TO_MASK, mMaskingData->mCropToMask );
   }
 
-  map.Insert( Toolkit::DevelImageVisual::Property::LOAD_POLICY, mLoadPolicy );
-  map.Insert( Toolkit::DevelImageVisual::Property::RELEASE_POLICY, mReleasePolicy );
-  map.Insert( Toolkit::DevelImageVisual::Property::ORIENTATION_CORRECTION, mOrientationCorrection );
+  map.Insert( Toolkit::ImageVisual::Property::LOAD_POLICY, mLoadPolicy );
+  map.Insert( Toolkit::ImageVisual::Property::RELEASE_POLICY, mReleasePolicy );
+  map.Insert( Toolkit::ImageVisual::Property::ORIENTATION_CORRECTION, mOrientationCorrection );
 }
 
 void ImageVisual::DoCreateInstancePropertyMap( Property::Map& map ) const
index 3108b55..d78ceca 100644 (file)
@@ -33,6 +33,7 @@
 #include <dali-toolkit/internal/visuals/visual-base-impl.h>
 #include <dali-toolkit/internal/visuals/visual-url.h>
 #include <dali-toolkit/devel-api/visuals/image-visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/image-visual-properties.h>
 
 namespace Dali
 {
@@ -369,8 +370,8 @@ private:
   Dali::SamplingMode::Type mSamplingMode:4;
   Dali::WrapMode::Type mWrapModeU:3;
   Dali::WrapMode::Type mWrapModeV:3;
-  DevelImageVisual::LoadPolicy::Type mLoadPolicy;
-  DevelImageVisual::ReleasePolicy::Type mReleasePolicy;
+  Dali::Toolkit::ImageVisual::LoadPolicy::Type mLoadPolicy;
+  Dali::Toolkit::ImageVisual::ReleasePolicy::Type mReleasePolicy;
   Vector4 mAtlasRect;
   bool mAttemptAtlasing; ///< If true will attempt atlasing, otherwise create unique texture
   bool mLoading;  ///< True if the texture is still loading.
index f23f1ca..8bc050f 100644 (file)
@@ -79,10 +79,10 @@ std::size_t NPatchLoader::Load( const std::string& url, const Rect< int >& borde
     data->textureSet = mCache[ cachedIndex ]->textureSet;
 
     NinePatchImage::StretchRanges stretchRangesX;
-    stretchRangesX.PushBack( Uint16Pair( border.left, data->croppedWidth - border.right ) );
+    stretchRangesX.PushBack( Uint16Pair( border.left, ( (data->croppedWidth >= static_cast< unsigned int >( border.right )) ? data->croppedWidth - border.right : 0 ) ) );
 
     NinePatchImage::StretchRanges stretchRangesY;
-    stretchRangesY.PushBack( Uint16Pair( border.top, data->croppedHeight - border.bottom ) );
+    stretchRangesY.PushBack( Uint16Pair( border.top, ( (data->croppedHeight >= static_cast< unsigned int >( border.bottom )) ? data->croppedHeight - border.bottom : 0 ) ) );
 
     data->stretchPixelsX = stretchRangesX;
     data->stretchPixelsY = stretchRangesY;
@@ -137,10 +137,10 @@ std::size_t NPatchLoader::Load( const std::string& url, const Rect< int >& borde
       data->textureSet.SetTexture( 0u, texture );
 
       NinePatchImage::StretchRanges stretchRangesX;
-      stretchRangesX.PushBack( Uint16Pair( border.left, data->croppedWidth - border.right ) );
+      stretchRangesX.PushBack( Uint16Pair( border.left, ( (data->croppedWidth >= static_cast< unsigned int >( border.right )) ? data->croppedWidth - border.right : 0 ) ) );
 
       NinePatchImage::StretchRanges stretchRangesY;
-      stretchRangesY.PushBack( Uint16Pair( border.top, data->croppedHeight - border.bottom ) );
+      stretchRangesY.PushBack( Uint16Pair( border.top, ( (data->croppedHeight >= static_cast< unsigned int >( border.bottom )) ? data->croppedHeight - border.bottom : 0 ) ) );
 
       data->stretchPixelsX = stretchRangesX;
       data->stretchPixelsY = stretchRangesY;
index 33a4842..f61848c 100755 (executable)
@@ -56,6 +56,7 @@ const char * const AUXILIARY_IMAGE_ALPHA_NAME( "auxiliaryImageAlpha" );
 const char* VERTEX_SHADER = DALI_COMPOSE_SHADER(
   attribute mediump vec2 aPosition;\n
   varying mediump vec2 vTexCoord;\n
+  varying mediump vec2 vMaskTexCoord;\n
   uniform mediump mat4 uMvpMatrix;\n
   uniform mediump vec3 uSize;\n
   uniform mediump vec2 uNinePatchFactorsX[ FACTOR_SIZE_X ];\n
@@ -83,7 +84,7 @@ const char* VERTEX_SHADER = DALI_COMPOSE_SHADER(
     mediump vec4 gridPosition = vec4( fixedFactor + ( visualSize.xy - fixedTotal ) * stretch / stretchTotal, 0.0, 1.0 );\n
     mediump vec4 vertexPosition = gridPosition;\n
     vertexPosition.xy -= visualSize.xy * vec2( 0.5, 0.5 );\n
-    vertexPostion.xy += anchorPoint*visualSize + (visualOffset + origin)*uSize.xy;\n
+    vertexPosition.xy += anchorPoint*visualSize + (visualOffset + origin)*uSize.xy;\n
     vertexPosition = uMvpMatrix * vertexPosition;\n
     \n
     vTexCoord = ( fixedFactor + stretch ) / ( fixedTotal + stretchTotal );\n
@@ -569,8 +570,8 @@ void NPatchVisual::ApplyTextureAndUniforms()
       Uint16Pair stretchX = data->stretchPixelsX[ 0 ];
       Uint16Pair stretchY = data->stretchPixelsY[ 0 ];
 
-      uint16_t stretchWidth = stretchX.GetY() - stretchX.GetX();
-      uint16_t stretchHeight = stretchY.GetY() - stretchY.GetX();
+      uint16_t stretchWidth = ( stretchX.GetY() >= stretchX.GetX() ) ? stretchX.GetY() - stretchX.GetX() : 0;
+      uint16_t stretchHeight = ( stretchY.GetY() >= stretchY.GetX() ) ? stretchY.GetY() - stretchY.GetX() : 0;
 
       mImpl->mRenderer.RegisterProperty( "uFixed[0]", Vector2::ZERO );
       mImpl->mRenderer.RegisterProperty( "uFixed[1]", Vector2( stretchX.GetX(), stretchY.GetX()) );
index f5817ea..e44b005 100755 (executable)
@@ -24,6 +24,7 @@
 
 // INTERNAL HEADER
 #include <dali-toolkit/public-api/visuals/text-visual-properties.h>
+#include <dali-toolkit/devel-api/visuals/text-visual-properties-devel.h>
 #include <dali-toolkit/public-api/visuals/visual-properties.h>
 #include <dali-toolkit/devel-api/controls/control-depth-index-ranges.h>
 #include <dali-toolkit/internal/visuals/image-atlas-manager.h>
@@ -58,6 +59,7 @@ const char * const TEXT_COLOR_PROPERTY( "textColor" );
 const char * const ENABLE_MARKUP_PROPERTY( "enableMarkup" );
 const char * const SHADOW_PROPERTY( "shadow" );
 const char * const UNDERLINE_PROPERTY( "underline" );
+const char * const OUTLINE_PROPERTY( "outline" );
 
 const Vector4 FULL_TEXTURE_RECT( 0.f, 0.f, 1.f, 1.f );
 
@@ -328,6 +330,10 @@ Dali::Property::Index StringKeyToIndexKey( const std::string& stringKey )
   {
     result = Toolkit::TextVisual::Property::UNDERLINE;
   }
+  else if( stringKey == OUTLINE_PROPERTY )
+  {
+    result = Toolkit::DevelTextVisual::Property::OUTLINE;
+  }
 
   return result;
 }
@@ -405,6 +411,9 @@ void TextVisual::DoCreatePropertyMap( Property::Map& map ) const
 
   GetUnderlineProperties( mController, value, Text::EffectStyle::DEFAULT );
   map.Insert( Toolkit::TextVisual::Property::UNDERLINE, value );
+
+  GetOutlineProperties( mController, value, Text::EffectStyle::DEFAULT );
+  map.Insert( Toolkit::DevelTextVisual::Property::OUTLINE, value );
 }
 
 void TextVisual::DoCreateInstancePropertyMap( Property::Map& map ) const
@@ -593,6 +602,11 @@ void TextVisual::DoSetProperty( Dali::Property::Index index, const Dali::Propert
       SetUnderlineProperties( mController, propertyValue, Text::EffectStyle::DEFAULT );
       break;
     }
+    case Toolkit::DevelTextVisual::Property::OUTLINE:
+    {
+      SetOutlineProperties( mController, propertyValue, Text::EffectStyle::DEFAULT );
+      break;
+    }
   }
 }
 
index c867b91..11d3b0f 100644 (file)
@@ -49,8 +49,8 @@ size_t GetNumberOfThreads(const char* environmentVariable, size_t defaultValue)
   auto numberString = GetEnvironmentVariable(environmentVariable);
   auto numberOfThreads = numberString ? std::strtoul(numberString, nullptr, 10) : 0;
   constexpr auto MAX_NUMBER_OF_THREADS = 100u;
-  DALI_ASSERT_ALWAYS( numberOfThreads < MAX_NUMBER_OF_THREADS );
-  return (numberOfThreads > 0) ? numberOfThreads : defaultValue;
+  DALI_ASSERT_DEBUG( numberOfThreads < MAX_NUMBER_OF_THREADS );
+  return ( numberOfThreads > 0 && numberOfThreads < MAX_NUMBER_OF_THREADS ) ? numberOfThreads : defaultValue;
 }
 
 size_t GetNumberOfLocalLoaderThreads()
index 79c099c..fd24205 100644 (file)
@@ -26,6 +26,7 @@
 #include <dali-toolkit/internal/visuals/visual-base-impl.h>
 #include <dali-toolkit/internal/visuals/visual-resource-observer.h>
 #include <dali-toolkit/public-api/align-enumerations.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
 
 namespace Dali
 {
index 6fc777d..b9cf7e9 100644 (file)
@@ -32,6 +32,7 @@
 #include <dali-toolkit/internal/visuals/transition-data-impl.h>
 #include <dali-toolkit/internal/visuals/visual-factory-cache.h>
 #include <dali-toolkit/devel-api/direction-enums.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
 
 namespace Dali
 {
index 5d28b91..14205f9 100644 (file)
@@ -140,6 +140,13 @@ bool Control::IsResourceReady() const
   return controlDataImpl.IsResourceReady();
 }
 
+Toolkit::Visual::ResourceStatus Control::GetVisualResourceStatus( Dali::Property::Index index )
+{
+  const Internal::Control& internalControl = Toolkit::Internal::GetImplementation( *this );
+  const Internal::Control::Impl& controlDataImpl = Internal::Control::Impl::Get( internalControl );
+  return controlDataImpl.GetVisualResourceStatus( index );
+}
+
 Control::KeyEventSignalType& Control::KeyEventSignal()
 {
   return Internal::GetImplementation(*this).KeyEventSignal();
index 58f3205..edb09fd 100644 (file)
@@ -28,6 +28,9 @@
 #include <dali/public-api/events/tap-gesture-detector.h>
 #include <dali/public-api/images/image.h>
 
+// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
+
 namespace Dali
 {
 
@@ -395,6 +398,15 @@ public:
    */
   bool IsResourceReady() const;
 
+  /**
+   * @brief Get the loading state of the visual resource.
+   *
+   * @SINCE_1_3_5
+   * @param[in] index The Property index of the visual
+   * @return Return the loading status (PREPARING, READY and FAILED) of visual resource
+   */
+  Visual::ResourceStatus GetVisualResourceStatus( Dali::Property::Index index );
+
   // Signals
 
   /**
index fdda010..f633f45 100644 (file)
@@ -301,9 +301,7 @@ public:
       INPUT_LINE_SPACING,
 
       /**
-       * @brief The default underline parameters.
-       * @details Name "underline", type Property::MAP.
-       * @SINCE_1_2.13
+       * @copydoc Dali::Toolkit::TextLabel::Property::UNDERLINE
        */
       UNDERLINE,
 
@@ -315,9 +313,7 @@ public:
       INPUT_UNDERLINE,
 
       /**
-       * @brief The default shadow parameters.
-       * @details Name "shadow", type Property::MAP.
-       * @SINCE_1_2.13
+       * @copydoc Dali::Toolkit::TextLabel::Property::SHADOW
        */
       SHADOW,
 
@@ -343,9 +339,7 @@ public:
       INPUT_EMBOSS,
 
       /**
-       * @brief The default outline parameters.
-       * @details Name "outline", type Property::MAP.
-       * @SINCE_1_2.13
+       * @copydoc Dali::Toolkit::TextLabel::Property::OUTLINE
        */
       OUTLINE,
 
index 0875753..5af78b2 100644 (file)
@@ -353,9 +353,7 @@ public:
       INPUT_POINT_SIZE,
 
       /**
-       * @brief The default underline parameters.
-       * @details Name "underline", type Property::MAP.
-       * @SINCE_1_2.13
+       * @copydoc Dali::Toolkit::TextLabel::Property::UNDERLINE
        */
       UNDERLINE,
 
@@ -367,9 +365,7 @@ public:
       INPUT_UNDERLINE,
 
       /**
-       * @brief The default shadow parameters.
-       * @details Name "shadow", type Property::MAP.
-       * @SINCE_1_2.13
+       * @copydoc Dali::Toolkit::TextLabel::Property::SHADOW
        */
       SHADOW,
 
@@ -395,9 +391,7 @@ public:
       INPUT_EMBOSS,
 
       /**
-       * @brief The default outline parameters.
-       * @details Name "outline", type Property::MAP.
-       * @SINCE_1_2.13
+       * @copydoc Dali::Toolkit::TextLabel::Property::OUTLINE
        */
       OUTLINE,
 
index ec6613c..106f234 100644 (file)
@@ -254,6 +254,15 @@ public:
       /**
        * @brief The default underline parameters.
        * @details Name "underline", type Property::MAP.
+       *
+       * The underline map contains the following keys:
+       *
+       * | %Property Name       | Type     | Required | Description                                                                                                        |
+       * |----------------------|----------|----------|--------------------------------------------------------------------------------------------------------------------|
+       * | enable               | BOOLEAN  | No       | True to enable the underline or false to disable (the default value is false)                                      |
+       * | color                | VECTOR4  | No       | The color of the underline (the default value is Color::BLACK)                                                     |
+       * | height               | FLOAT    | No       | The height of the underline (the default value is 0)                                                               |
+       *
        * @SINCE_1_2.13
        */
       UNDERLINE,
@@ -261,6 +270,15 @@ public:
       /**
        * @brief The default shadow parameters.
        * @details Name "shadow", type Property::MAP.
+       *
+       * The shadow map contains the following keys:
+       *
+       * | %Property Name       | Type     | Required | Description                                                                                                        |
+       * |----------------------|----------|----------|--------------------------------------------------------------------------------------------------------------------|
+       * | color                | VECTOR4  | No       | The color of the shadow (the default value is Color::BLACK)                                                        |
+       * | offset               | VECTOR2  | No       | The offset from the text to draw the shadow in the X and Y axes (the default value is 0 which means no shadow)     |
+       * | blurRadius           | FLOAT    | No       | The radius of blur to be applied to the shadow (the default value is 0 which means no blur)                        |
+       *
        * @SINCE_1_2.13
        */
       SHADOW,
@@ -275,6 +293,14 @@ public:
       /**
        * @brief The default outline parameters.
        * @details Name "outline", type Property::MAP.
+       *
+       * The outline map contains the following keys:
+       *
+       * | %Property Name       | Type     | Required | Description                                                                                                        |
+       * |----------------------|----------|----------|--------------------------------------------------------------------------------------------------------------------|
+       * | color                | VECTOR4  | No       | The color of the outline (the default value is Color::WHITE)                                                       |
+       * | width                | INTEGER  | No       | The width of the outline (the default value is 0 which means no outline)                                           |
+       *
        * @SINCE_1_2.13
        */
       OUTLINE,
index 6ed8280..d417fe7 100644 (file)
@@ -31,7 +31,7 @@ namespace Toolkit
 
 const unsigned int TOOLKIT_MAJOR_VERSION = 1;
 const unsigned int TOOLKIT_MINOR_VERSION = 3;
-const unsigned int TOOLKIT_MICRO_VERSION = 3;
+const unsigned int TOOLKIT_MICRO_VERSION = 4;
 const char * const TOOLKIT_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index e490f79..b32c75b 100755 (executable)
@@ -29,6 +29,7 @@ public_api_src_files = \
   $(public_api_src_dir)/controls/video-view/video-view.cpp \
   $(public_api_src_dir)/image-loader/async-image-loader.cpp \
   $(public_api_src_dir)/image-loader/sync-image-loader.cpp \
+  $(public_api_src_dir)/image-loader/texture-manager.cpp \
   $(public_api_src_dir)/styling/style-manager.cpp \
   $(public_api_src_dir)/accessibility-manager/accessibility-manager.cpp \
   $(public_api_src_dir)/focus-manager/keyboard-focus-manager.cpp \
@@ -75,7 +76,8 @@ public_api_item_view_header_files = \
 
 public_api_image_loader_header_files = \
   $(public_api_src_dir)/image-loader/async-image-loader.h \
-  $(public_api_src_dir)/image-loader/sync-image-loader.h
+  $(public_api_src_dir)/image-loader/sync-image-loader.h \
+  $(public_api_src_dir)/image-loader/texture-manager.h
 
 public_api_progress_bar_header_files = \
   $(public_api_src_dir)/controls/progress-bar/progress-bar.h
@@ -15,7 +15,7 @@
  */
 
 // CLASS HEADER
-#include <dali-toolkit/devel-api/image-loader/texture-manager.h>
+#include <dali-toolkit/public-api/image-loader/texture-manager.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/internal/visuals/visual-factory-impl.h>
@@ -50,8 +50,8 @@ TextureSet RemoveTexture( const std::string& textureUrl )
   return textureMgr.RemoveExternalTexture( textureUrl );
 }
 
-} // TextureManager
+} // namespace TextureManager
 
-} // Toolkit
+} // namespace Toolkit
 
-} // Dali
+} // namespace Dali
@@ -1,5 +1,5 @@
-#ifndef DALI_TOOLKIT_DEVEL_API_TEXTURE_MANAGER_H
-#define DALI_TOOLKIT_DEVEL_API_TEXTURE_MANAGER_H
+#ifndef DALI_TOOLKIT_TEXTURE_MANAGER_H
+#define DALI_TOOLKIT_TEXTURE_MANAGER_H
 
 /*
  * Copyright (c) 2017 Samsung Electronics Co., Ltd.
@@ -29,6 +29,7 @@ namespace Toolkit
 /**
  * API to interface with the toolkit texture manager
  * Allows developers to add Textures through TextureSets to toolkit so that visuals can use them to render
+ * @SINCE_1_3_5
  */
 namespace TextureManager
 {
@@ -36,6 +37,7 @@ namespace TextureManager
 /**
  * @brief Add a Texture to texture manager
  * Toolkit keeps the Texture handle until RemoveTexture is called.
+ * @SINCE_1_3_5
  * @note this method does not check for duplicates,
  *       if same Texture is added multiple times, a different URL is returned each time
  * @param[in] texture the Texture to add
@@ -46,6 +48,7 @@ DALI_IMPORT_API std::string AddTexture( Texture& texture );
 /**
  * @brief Add a TextureSet to texture manager
  * Toolkit keeps the TextureSet handle until RemoveTexture is called.
+ * @SINCE_1_3_5
  * @note this method does not check for duplicates,
  *       if same TextureSet is added multiple times, a different URL is returned each time
  * @param[in] textureSet the TextureSet to add
@@ -55,16 +58,17 @@ DALI_IMPORT_API std::string AddTexture( TextureSet& textureSet );
 
 /**
  * @brief Removes a TextureSet from toolkit
+ * @SINCE_1_3_5
  * @note TextureSet may still be used by visuals and kept alive by them
  * @param[in] textureUrl to remove
  * @return the handle to the TextureSet or empty handle in case TextureSet is not found
  */
 DALI_IMPORT_API TextureSet RemoveTexture( const std::string& textureUrl );
 
-}
+} // namespace TextureManager
 
-} // Toolkit
+} // namespace Toolkit
 
-} // Dali
+} // namespace Dali
 
-#endif // DALI_TOOLKIT_DEVEL_API_TEXTURE_MANAGER_H
+#endif // DALI_TOOLKIT_TEXTURE_MANAGER_H
index 93902cf..6a8649c 100644 (file)
@@ -232,10 +232,80 @@ enum
    * @note If this is false, then the mask is scaled to fit the image before being applied.
    */
   CROP_TO_MASK,
+
+/**
+   * @brief The policy to determine when an image should be loaded.
+   * @details Name "loadPolicy",  Type LoadPolicy::Type (Property::INTEGER)or Property::STRING.
+   * @SINCE_1_3_5
+   * @note Default LoadPolicy::ATTACHED
+   * @see LoadPolicy::Type
+   */
+
+  LOAD_POLICY,
+
+  /**
+   * @brief The policy to determine when an image should no longer be cached.
+   * @details Name "releasePolicy", Type ReleasePolicy::Type (Property::INTEGER) or Property::STRING
+   * @SINCE_1_3_5
+   * @note Default ReleasePolicy::DESTROYED
+   * @see ReleasePolicy::Type
+   */
+
+  RELEASE_POLICY,
+
+  /**
+   * @brief Determines if image orientation should be corrected so the image displays as it was intended.
+   * @details Name "orientationCorrection", Type Property::BOOLEAN, if true the image's orientation will be corrected.
+   * @SINCE_1_3_5
+   * @note Default true
+   */
+
+  ORIENTATION_CORRECTION,
+
 };
 
 } // namespace Property
 
+/**
+ * @brief The policy determining if the image is loaded when the visual is staged or created.
+ * @SINCE_1_3_5
+ */
+namespace LoadPolicy
+{
+
+/**
+ * @brief The available named elements that define the LoadPolicy.
+ * @SINCE_1_3_5
+ */
+enum Type
+{
+  IMMEDIATE = 0,  ///< The image is loaded when the ImageVisual is created.
+  ATTACHED        ///< The image is loaded when the ImageVisual is attached to the stage.
+};
+
+} // namespace LoadPolicy
+
+/**
+ * @brief The policy determining when a image is deleted from the cache in relation to the ImageVisual lifetime.
+ * @SINCE_1_3_5
+ * @note If the texture is being shared by another visual it persist if still required.
+ */
+namespace ReleasePolicy
+{
+
+/**
+ * @brief The available named elements that define the ReleasePolicy.
+ * @SINCE_1_3_5
+ */
+enum Type
+{
+  DETACHED = 0,  ///<  Image deleted from cache when ImageVisual detached from stage.
+  DESTROYED,     ///<  Image deleted from cache when ImageVisual destroyed.
+  NEVER          ///<  Image is never deleted, will survive the lifetime of the application.
+};
+
+} // namespace ReleasePolicy;
+
 } // namespace ImageVisual
 
 /**
index 94b504b..bb0ecd2 100644 (file)
@@ -325,6 +325,18 @@ enum
 
 } // namespace Shader
 
+
+/**
+ * @brief Status of resource which is used for visual.
+ * @SINCE_1_3_5
+ */
+enum class ResourceStatus
+{
+  PREPARING, /// Resource is prepared.    @SINCE_1_3_5
+  READY,     /// Resource is ready.       @SINCE_1_3_5
+  FAILED     /// Resource is fail to load @SINCE_1_3_5
+};
+
 } // namespace Visual
 
 /**
index b1b4cef..981b30a 100644 (file)
@@ -1,6 +1,6 @@
 Name:       dali-toolkit
 Summary:    Dali 3D engine Toolkit
-Version:    1.3.3
+Version:    1.3.4
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT