[dali_1.9.17] Merge branch 'devel/master' 09/236709/1
authorgreynaga <g.reynaga@samsung.com>
Fri, 19 Jun 2020 11:03:58 +0000 (12:03 +0100)
committergreynaga <g.reynaga@samsung.com>
Fri, 19 Jun 2020 11:03:58 +0000 (12:03 +0100)
Change-Id: I347309a05bfc5f25ae53e352fdb214f598c05f5e

133 files changed:
automated-tests/src/dali-toolkit-internal/dali-toolkit-test-utils/dummy-visual.cpp
automated-tests/src/dali-toolkit-internal/utc-Dali-DebugRendering.cpp [changed mode: 0755->0644]
automated-tests/src/dali-toolkit-internal/utc-Dali-ItemView-internal.cpp [changed mode: 0755->0644]
automated-tests/src/dali-toolkit-styling/utc-Dali-StyleManager.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dali-test-suite-utils.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dali-test-suite-utils.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/mesh-builder.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/mesh-builder.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-actor-utils.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-actor-utils.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-web-engine.cpp
automated-tests/src/dali-toolkit/utc-Dali-AnimatedVectorImageVisual.cpp
automated-tests/src/dali-toolkit/utc-Dali-ArcVisual.cpp
automated-tests/src/dali-toolkit/utc-Dali-BloomView.cpp
automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp
automated-tests/src/dali-toolkit/utc-Dali-ControlWrapper.cpp
automated-tests/src/dali-toolkit/utc-Dali-CubeTransitionEffect.cpp
automated-tests/src/dali-toolkit/utc-Dali-EffectsView.cpp
automated-tests/src/dali-toolkit/utc-Dali-FlexContainer.cpp
automated-tests/src/dali-toolkit/utc-Dali-GaussianBlurView.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-ItemLayout.cpp [changed mode: 0755->0644]
automated-tests/src/dali-toolkit/utc-Dali-ItemView.cpp [changed mode: 0755->0644]
automated-tests/src/dali-toolkit/utc-Dali-KeyboardFocusManager.cpp
automated-tests/src/dali-toolkit/utc-Dali-Model3dView.cpp
automated-tests/src/dali-toolkit/utc-Dali-Popup.cpp
automated-tests/src/dali-toolkit/utc-Dali-ProgressBar.cpp
automated-tests/src/dali-toolkit/utc-Dali-ScrollBar.cpp
automated-tests/src/dali-toolkit/utc-Dali-ShadowView.cpp
automated-tests/src/dali-toolkit/utc-Dali-TableView.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-TextSelectionPopup.cpp
automated-tests/src/dali-toolkit/utc-Dali-Visual.cpp
dali-toolkit/devel-api/builder/builder.h
dali-toolkit/devel-api/controls/control-devel.h
dali-toolkit/devel-api/controls/effects-view/effects-view.h
dali-toolkit/devel-api/controls/progress-bar/progress-bar-devel.cpp [new file with mode: 0644]
dali-toolkit/devel-api/controls/progress-bar/progress-bar-devel.h [new file with mode: 0644]
dali-toolkit/devel-api/controls/text-controls/text-field-devel.h
dali-toolkit/devel-api/controls/text-controls/text-label-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/visual-factory/visual-factory.cpp
dali-toolkit/devel-api/visual-factory/visual-factory.h
dali-toolkit/devel-api/visuals/arc-visual-actions-devel.h [new file with mode: 0644]
dali-toolkit/internal/accessibility-manager/accessibility-manager-impl.cpp
dali-toolkit/internal/builder/builder-impl.cpp
dali-toolkit/internal/controls/buttons/button-impl.cpp
dali-toolkit/internal/controls/buttons/check-box-button-impl.cpp
dali-toolkit/internal/controls/buttons/push-button-impl.cpp
dali-toolkit/internal/controls/buttons/radio-button-impl.cpp
dali-toolkit/internal/controls/buttons/toggle-button-impl.cpp
dali-toolkit/internal/controls/control/control-data-impl.cpp
dali-toolkit/internal/controls/control/control-debug.cpp
dali-toolkit/internal/controls/flex-container/flex-container-impl.cpp
dali-toolkit/internal/controls/gaussian-blur-view/gaussian-blur-view-impl.cpp
dali-toolkit/internal/controls/image-view/image-view-impl.cpp
dali-toolkit/internal/controls/image-view/image-view-impl.h
dali-toolkit/internal/controls/magnifier/magnifier-impl.cpp
dali-toolkit/internal/controls/model3d-view/model3d-view-impl.cpp
dali-toolkit/internal/controls/popup/confirmation-popup-impl.cpp
dali-toolkit/internal/controls/popup/popup-impl.cpp
dali-toolkit/internal/controls/progress-bar/progress-bar-impl.cpp
dali-toolkit/internal/controls/progress-bar/progress-bar-impl.h
dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp
dali-toolkit/internal/controls/shadow-view/shadow-view-impl.cpp
dali-toolkit/internal/controls/table-view/table-view-impl.cpp
dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp [changed mode: 0755->0644]
dali-toolkit/internal/controls/text-controls/text-field-impl.cpp [changed mode: 0755->0644]
dali-toolkit/internal/controls/text-controls/text-label-impl.cpp
dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.cpp
dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.h
dali-toolkit/internal/controls/text-controls/text-selection-toolbar-impl.cpp
dali-toolkit/internal/controls/video-view/video-view-impl.cpp
dali-toolkit/internal/controls/video-view/video-view-impl.h
dali-toolkit/internal/controls/web-view/web-view-impl.cpp
dali-toolkit/internal/drag-drop-detector/drag-and-drop-detector-impl.cpp
dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp
dali-toolkit/internal/text/decorator/text-decorator.cpp
dali-toolkit/internal/text/decorator/text-decorator.h
dali-toolkit/internal/text/rendering/atlas/atlas-manager.h
dali-toolkit/internal/text/text-controller.cpp
dali-toolkit/internal/visuals/animated-gradient/animated-gradient-visual.cpp
dali-toolkit/internal/visuals/animated-image/animated-image-visual.cpp
dali-toolkit/internal/visuals/animated-vector-image/animated-vector-image-visual.cpp
dali-toolkit/internal/visuals/animated-vector-image/vector-animation-task.cpp
dali-toolkit/internal/visuals/animated-vector-image/vector-animation-task.h
dali-toolkit/internal/visuals/arc/arc-visual.cpp
dali-toolkit/internal/visuals/arc/arc-visual.h
dali-toolkit/internal/visuals/border/border-visual.cpp
dali-toolkit/internal/visuals/color/color-visual.cpp
dali-toolkit/internal/visuals/gradient/gradient-visual.cpp
dali-toolkit/internal/visuals/gradient/gradient.h
dali-toolkit/internal/visuals/image-atlas-manager.cpp
dali-toolkit/internal/visuals/image/image-visual.cpp
dali-toolkit/internal/visuals/image/image-visual.h
dali-toolkit/internal/visuals/mesh/mesh-visual.cpp
dali-toolkit/internal/visuals/npatch/npatch-visual.cpp [changed mode: 0755->0644]
dali-toolkit/internal/visuals/npatch/npatch-visual.h
dali-toolkit/internal/visuals/primitive/primitive-visual.cpp
dali-toolkit/internal/visuals/svg/svg-rasterize-thread.h
dali-toolkit/internal/visuals/svg/svg-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.cpp
dali-toolkit/internal/visuals/visual-base-data-impl.h
dali-toolkit/internal/visuals/visual-base-impl.cpp
dali-toolkit/internal/visuals/visual-base-impl.h
dali-toolkit/internal/visuals/visual-factory-cache.cpp
dali-toolkit/internal/visuals/visual-factory-cache.h
dali-toolkit/internal/visuals/visual-factory-impl.cpp
dali-toolkit/internal/visuals/visual-factory-impl.h
dali-toolkit/internal/visuals/wireframe/wireframe-visual.cpp
dali-toolkit/public-api/controls/buttons/button.cpp
dali-toolkit/public-api/controls/buttons/push-button.cpp
dali-toolkit/public-api/controls/control-impl.cpp
dali-toolkit/public-api/controls/control.h
dali-toolkit/public-api/controls/image-view/image-view.cpp
dali-toolkit/public-api/controls/image-view/image-view.h
dali-toolkit/public-api/controls/progress-bar/progress-bar.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/styles/1920x1080/dali-toolkit-default-theme.json
dali-toolkit/styles/2048x1080/dali-toolkit-default-theme.json
dali-toolkit/styles/360x360/dali-toolkit-default-theme.json
dali-toolkit/styles/480x800/dali-toolkit-default-theme.json
dali-toolkit/styles/720x1280/dali-toolkit-default-theme.json
packaging/dali-toolkit.spec

index c679479..651797e 100644 (file)
@@ -38,7 +38,7 @@ DummyVisualPtr DummyVisual::New( const Property::Map& properties )
 }
 
 DummyVisual::DummyVisual( VisualFactoryCache& factoryCache )
-: Visual::Base( factoryCache, Visual::FittingMode::FILL ),
+: Visual::Base( factoryCache, Visual::FittingMode::FILL, Toolkit::Visual::Type::COLOR ),
   mActionCounter( 0 )
 {
 }
old mode 100755 (executable)
new mode 100644 (file)
index 8b119d4..90b5a65
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -233,10 +233,12 @@ int UtcDaliDebugRenderingGetVisual2(void)
   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 );
+  map.Clear();
+  map[ Toolkit::Visual::Property::TYPE ] = Visual::IMAGE;
+  map[ ImageVisual::Property::URL ] = TEST_IMAGE_FILE_NAME;
+  Visual::Base imageVisual = factory.CreateVisual( map );
   DALI_TEST_CHECK( imageVisual );
-  TestDebugVisual( imageVisual, Visual::IMAGE, Vector2::ZERO);
+  TestDebugVisual( imageVisual, Visual::IMAGE, Vector2(64.0f, 64.0f /* Broken Image Size */ ));
 
   // Test that n patch visual is replaced with debug visual
   Visual::Base nPatchVisual = factory.CreateVisual( TEST_NPATCH_FILE_NAME, ImageDimensions() );
old mode 100755 (executable)
new mode 100644 (file)
index 3ca8d0a..5663d79
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -75,10 +75,7 @@ public: // From ItemFactory
   virtual Actor NewItem(unsigned int itemId)
   {
     // Create a renderable actor for this item
-    Image image = ResourceImage::New( TEST_IMAGE_FILE_NAME );
-    Actor actor = CreateRenderableActor(image);
-
-    return actor;
+    return ImageView::New( TEST_IMAGE_FILE_NAME );
   }
 };
 
index 94d625d..25b652a 100755 (executable)
@@ -1343,7 +1343,7 @@ int UtcDaliStyleManagerConfigSectionTest(void)
 
   // For coverage
   Toolkit::TextEditor editor = Toolkit::TextEditor::New();
-  editor.SetKeyboardFocusable( true );
+  editor.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
   Stage::GetCurrent().Add( editor );
 
   Toolkit::KeyboardFocusManager::Get().SetCurrentFocusActor( editor );
index b9c8245..b494a98 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -328,45 +328,6 @@ void ConstraintAppliedCheck::CheckSignalNotReceived()
   }
 }
 
-BufferImage CreateBufferImage(int32_t width, int32_t height, const Vector4& color)
-{
-  BufferImage image = BufferImage::New(width, height, Pixel::RGBA8888);
-
-  PixelBuffer* pixbuf = image.GetBuffer();
-
-  // Using a 4x4 image gives a better blend with the GL implementation
-  // than a 3x3 image
-  for(size_t i=0; i<16; i++)
-  {
-    pixbuf[i*4+0] = color.r*255;
-    pixbuf[i*4+1] = color.g*255;
-    pixbuf[i*4+2] = color.b*255;
-    pixbuf[i*4+3] = color.a*255;
-  }
-
-  return image;
-}
-
-BufferImage CreateBufferImage()
-{
-  return CreateBufferImage(4, 4, Color::WHITE);
-}
-
-void PrepareResourceImage( TestApplication& application, uint32_t imageWidth, uint32_t imageHeight, Pixel::Format pixelFormat )
-{
-  TestPlatformAbstraction& platform = application.GetPlatform();
-  platform.SetClosestImageSize(Vector2( imageWidth, imageHeight));
-
-  Integration::Bitmap* bitmap = Integration::Bitmap::New( Integration::Bitmap::BITMAP_2D_PACKED_PIXELS, ResourcePolicy::OWNED_RETAIN );
-  Integration::PixelBuffer* pixbuffer = bitmap->GetPackedPixelsProfile()->ReserveBuffer( pixelFormat, imageWidth, imageHeight, imageWidth, imageHeight );
-  uint32_t bytesPerPixel = GetBytesPerPixel(  pixelFormat );
-  uint32_t initialColor = 0xFF;
-  memset( pixbuffer, initialColor, imageHeight*imageWidth*bytesPerPixel);
-
-  Integration::ResourcePointer resourcePtr(bitmap);
-  platform.SetSynchronouslyLoadedResource( resourcePtr );
-}
-
 namespace Test
 {
 
index 577ca36..1635ef8 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TEST_SUITE_UTILS_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -393,15 +393,6 @@ struct DefaultFunctionCoverage
   }
 };
 
-
-// Helper to Create buffer image
-BufferImage CreateBufferImage();
-BufferImage CreateBufferImage(int32_t width, int32_t height, const Vector4& color);
-
-
-// Prepare a resource image to be loaded. Should be called before creating the ResourceImage
-void PrepareResourceImage( TestApplication& application, uint32_t imageWidth, uint32_t imageHeight, Pixel::Format pixelFormat );
-
 // Test namespace to prevent pollution of Dali namespace, add Test helper functions here
 namespace Test
 {
index f8e3917..2e8f724 100644 (file)
@@ -18,9 +18,6 @@
 // CLASS HEADER
 #include "mesh-builder.h"
 
-// EXTERNAL INCLUDES
-#include <dali/devel-api/images/texture-set-image.h>
-
 namespace Dali
 {
 
@@ -34,13 +31,6 @@ TextureSet CreateTextureSet()
   return TextureSet::New();
 }
 
-TextureSet CreateTextureSet( Image image )
-{
-  TextureSet textureSet = TextureSet::New();
-  TextureSetImage( textureSet, 0u, image );
-  return textureSet;
-}
-
 TextureSet CreateTextureSet( Texture texture )
 {
   TextureSet textureSet = TextureSet::New();
index ea0b156..37d13ec 100644 (file)
@@ -26,7 +26,6 @@ namespace Dali
 
 Shader CreateShader();
 TextureSet CreateTextureSet();
-TextureSet CreateTextureSet( Image image );
 TextureSet CreateTextureSet( Texture texture );
 Geometry CreateQuadGeometry();
 PropertyBuffer CreatePropertyBuffer();
index 32bccdd..5d45a12 100644 (file)
@@ -20,7 +20,6 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/dali-core.h>
-#include <dali/devel-api/images/texture-set-image.h>
 
 // INTERNAL INCLUDES
 #include "mesh-builder.h"
@@ -94,38 +93,4 @@ Actor CreateRenderableActor( Texture texture, const std::string& vertexShader, c
   return actor;
 }
 
-Actor CreateRenderableActor( Image texture )
-{
-  return CreateRenderableActor( texture, VERTEX_SHADER, FRAGMENT_SHADER );
-}
-
-Actor CreateRenderableActor( Image texture, const std::string& vertexShader, const std::string& fragmentShader )
-{
-  // Create the geometry
-  Geometry geometry = CreateQuadGeometry();
-
-  // Create Shader
-  Shader shader = Shader::New( vertexShader, fragmentShader );
-
-  // Create renderer from geometry and material
-  Renderer renderer = Renderer::New( geometry, shader );
-
-  // Create actor and set renderer
-  Actor actor = Actor::New();
-  actor.AddRenderer( renderer );
-
-  // If we a texture, then create a texture-set and add to renderer
-  if( texture )
-  {
-    TextureSet textureSet = TextureSet::New();
-    TextureSetImage( textureSet, 0u, texture );
-    renderer.SetTextures( textureSet );
-
-    // Set actor to the size of the texture if set
-    actor.SetProperty( Actor::Property::SIZE, Vector2( texture.GetWidth(), texture.GetHeight() ) );
-  }
-
-  return actor;
-}
-
 } // namespace Dali
index 8b8859f..4a8716e 100644 (file)
@@ -39,22 +39,6 @@ Actor CreateRenderableActor();
  * @param[in] texture Texture to set.
  * @return An actor with a renderer.
  */
-Actor CreateRenderableActor( Image texture );
-
-/**
- * @brief Creates a renderable-actor with a texture and custom shaders.
- * @param[in] texture Texture to set.
- * @param[in] vertexShader The vertex-shader.
- * @param[in] fragmentShader The fragment-shader.
- * @return An actor with a renderer.
- */
-Actor CreateRenderableActor( Image texture, const std::string& vertexShader, const std::string& fragmentShader );
-
-/**
- * @brief Creates a renderable-actor with a texture.
- * @param[in] texture Texture to set.
- * @return An actor with a renderer.
- */
 Actor CreateRenderableActor( Texture texture );
 
 /**
index 5316331..5840711 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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,7 +21,6 @@
 #include <dali/public-api/object/any.h>
 #include <dali/public-api/object/base-object.h>
 #include <dali/public-api/adaptor-framework/native-image-source.h>
-#include <dali/public-api/images/native-image.h>
 #include <toolkit-application.h>
 
 namespace Dali
index 587c7ac..2f918e1 100644 (file)
@@ -845,6 +845,8 @@ int UtcDaliAnimatedVectorImageVisualJumpTo(void)
   Visual::Base visual = VisualFactory::Get().CreateVisual( propertyMap );
   DALI_TEST_CHECK( visual );
 
+  tet_printf( "1. Visual is created.\n" );
+
   DummyControl actor = DummyControl::New( true );
   DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
   dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
@@ -866,6 +868,8 @@ int UtcDaliAnimatedVectorImageVisualJumpTo(void)
   Property::Value* value = map.Find( DevelImageVisual::Property::CURRENT_FRAME_NUMBER );
   DALI_TEST_EQUALS( value->Get< int >(), 2, TEST_LOCATION );
 
+  tet_printf( "2. The current frame number is [%d].\n", value->Get< int >() );
+
   Property::Array array;
   array.PushBack( 0 );
   array.PushBack( 2 );
@@ -883,6 +887,8 @@ int UtcDaliAnimatedVectorImageVisualJumpTo(void)
   value = map.Find( DevelImageVisual::Property::CURRENT_FRAME_NUMBER );
   DALI_TEST_EQUALS( value->Get< int >(), 2, TEST_LOCATION );
 
+  tet_printf( "3. The current frame number is [%d].\n", value->Get< int >() );
+
   // Change play range
   attributes.Clear();
   array.Clear();
@@ -913,6 +919,8 @@ int UtcDaliAnimatedVectorImageVisualJumpTo(void)
   value = map.Find( DevelImageVisual::Property::CURRENT_FRAME_NUMBER );
   DALI_TEST_EQUALS( value->Get< int >(), 3, TEST_LOCATION );
 
+  tet_printf( "4. The current frame number is [%d].\n", value->Get< int >() );
+
   // Jump to the same position
   DevelControl::DoAction( actor, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::JUMP_TO, 3 );
 
@@ -923,6 +931,8 @@ int UtcDaliAnimatedVectorImageVisualJumpTo(void)
   value = map.Find( DevelImageVisual::Property::CURRENT_FRAME_NUMBER );
   DALI_TEST_EQUALS( value->Get< int >(), 3, TEST_LOCATION );
 
+  tet_printf( "5. The current frame number is [%d].\n", value->Get< int >() );
+
   END_TEST;
 }
 
index 2476e0b..d6c992e 100644 (file)
 
 #include <iostream>
 #include <stdlib.h>
-//#include <chrono>
-//#include <thread>
 #include <dali-toolkit-test-suite-utils.h>
-//#include <toolkit-timer.h>
 #include <dali-toolkit/dali-toolkit.h>
 #include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
 #include <dali-toolkit/devel-api/controls/control-devel.h>
 #include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
 #include <dali-toolkit/devel-api/visuals/arc-visual-properties-devel.h>
+#include <dali-toolkit/devel-api/visuals/arc-visual-actions-devel.h>
 #include <dali/devel-api/rendering/renderer-devel.h>
 #include "dummy-control.h"
 
@@ -199,3 +197,77 @@ int UtcDaliArcVisualGetPropertyMap01(void)
 
   END_TEST;
 }
+
+int UtcDaliArcVisualUpdateProperty(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline( "UtcDaliArcVisualUpdateProperty" );
+
+  TestGlAbstraction& gl = application.GetGlAbstraction();
+
+  float thickness = 20.0f;
+  float startAngle = 0.0f;
+  float sweepAngle = 90.0f;
+
+  Property::Map propertyMap;
+  propertyMap.Add( Toolkit::Visual::Property::TYPE, DevelVisual::ARC )
+             .Add( Visual::Property::MIX_COLOR, Color::RED )
+             .Add( DevelArcVisual::Property::THICKNESS, thickness )
+             .Add( DevelArcVisual::Property::START_ANGLE, startAngle )
+             .Add( DevelArcVisual::Property::SWEEP_ANGLE, sweepAngle );
+
+  Visual::Base visual = VisualFactory::Get().CreateVisual( propertyMap );
+  DALI_TEST_CHECK( visual );
+
+  DummyControl actor = DummyControl::New( true );
+  DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
+  dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
+
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) );
+  Stage::GetCurrent().Add( actor );
+
+  application.SendNotification();
+  application.Render();
+
+  Property::Map map = actor.GetProperty< Property::Map >( DummyControl::Property::TEST_VISUAL );
+  Property::Value* value = map.Find( DevelArcVisual::Property::THICKNESS, Property::FLOAT );
+  DALI_TEST_EQUALS( value->Get< float >(), thickness, TEST_LOCATION );
+  DALI_TEST_EQUALS( gl.CheckUniformValue< float >( "thickness", thickness ), true, TEST_LOCATION );
+
+  value = map.Find( DevelArcVisual::Property::START_ANGLE, Property::FLOAT );
+  DALI_TEST_EQUALS( value->Get< float >(), startAngle, TEST_LOCATION );
+  DALI_TEST_EQUALS( gl.CheckUniformValue< float >( "startAngle", startAngle ), true, TEST_LOCATION );
+
+  value = map.Find( DevelArcVisual::Property::SWEEP_ANGLE, Property::FLOAT );
+  DALI_TEST_EQUALS( value->Get< float >(), sweepAngle, TEST_LOCATION );
+  DALI_TEST_EQUALS( gl.CheckUniformValue< float >( "sweepAngle", sweepAngle ), true, TEST_LOCATION );
+
+  thickness = 10.0f;
+  startAngle = 90.0f;
+  sweepAngle = 180.0f;
+
+  Property::Map attributes;
+  attributes.Add( DevelArcVisual::Property::THICKNESS, thickness )
+            .Add( DevelArcVisual::Property::START_ANGLE, startAngle )
+            .Add( DevelArcVisual::Property::SWEEP_ANGLE, sweepAngle );
+
+  DevelControl::DoAction( actor, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelArcVisual::Action::UPDATE_PROPERTY, attributes );
+
+  application.SendNotification();
+  application.Render();
+
+  map = actor.GetProperty< Property::Map >( DummyControl::Property::TEST_VISUAL );
+  value = map.Find( DevelArcVisual::Property::THICKNESS, Property::FLOAT );
+  DALI_TEST_EQUALS( value->Get< float >(), thickness, TEST_LOCATION );
+  DALI_TEST_EQUALS( gl.CheckUniformValue< float >( "thickness", thickness ), true, TEST_LOCATION );
+
+  value = map.Find( DevelArcVisual::Property::START_ANGLE, Property::FLOAT );
+  DALI_TEST_EQUALS( value->Get< float >(), startAngle, TEST_LOCATION );
+  DALI_TEST_EQUALS( gl.CheckUniformValue< float >( "startAngle", startAngle ), true, TEST_LOCATION );
+
+  value = map.Find( DevelArcVisual::Property::SWEEP_ANGLE, Property::FLOAT );
+  DALI_TEST_EQUALS( value->Get< float >(), sweepAngle, TEST_LOCATION );
+  DALI_TEST_EQUALS( gl.CheckUniformValue< float >( "sweepAngle", sweepAngle ), true, TEST_LOCATION );
+
+  END_TEST;
+}
index dc9e771..3ac0fa3 100644 (file)
@@ -121,7 +121,7 @@ int UtcDaliBloomViewAddRemove(void)
   DALI_TEST_CHECK( view );
 
   Actor actor = Actor::New();
-  DALI_TEST_CHECK( !actor.OnStage() );
+  DALI_TEST_CHECK( !actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
 
 
   view.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
@@ -129,11 +129,11 @@ int UtcDaliBloomViewAddRemove(void)
   view.Add(actor);
   Stage::GetCurrent().Add(view);
 
-  DALI_TEST_CHECK( actor.OnStage() );
+  DALI_TEST_CHECK( actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
 
   view.Remove(actor);
 
-  DALI_TEST_CHECK( !actor.OnStage() );
+  DALI_TEST_CHECK( !actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
   END_TEST;
 }
 
index 60fd218..483f9c7 100644 (file)
@@ -1094,7 +1094,7 @@ int UtcDaliControlImplRegisterDisabledVisual(void)
 
   DALI_TEST_CHECK( dummyImpl.IsVisualEnabled( TEST_PROPERTY ) == false );
 
-  DALI_TEST_CHECK( dummy.OnStage() == true );
+  DALI_TEST_CHECK( dummy.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) == true );
 
   dummyImpl.EnableVisual( TEST_PROPERTY, true );
 
@@ -1133,7 +1133,7 @@ int UtcDaliControlImplDisableRegisteredVisual(void)
 
   DALI_TEST_CHECK( dummyImpl.IsVisualEnabled( TEST_PROPERTY ) == true);
 
-  DALI_TEST_CHECK( dummy.OnStage() == true );
+  DALI_TEST_CHECK( dummy.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) == true );
 
   dummyImpl.EnableVisual( TEST_PROPERTY, false );
 
@@ -1173,7 +1173,7 @@ int UtcDaliControlImplEnabledVisualParentRemovedFromStage(void)
   application.Render();
 
   DALI_TEST_CHECK( dummyImpl.IsVisualEnabled( TEST_PROPERTY ) == false );
-  DALI_TEST_CHECK( dummy.OnStage() == true );
+  DALI_TEST_CHECK( dummy.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) == true );
   dummyImpl.EnableVisual( TEST_PROPERTY, true );
 
   // Render and notify
@@ -1245,7 +1245,7 @@ int UtcDaliControlImplRegisterTwoVisualsAndEnableOnlyOne(void)
   DALI_TEST_CHECK( dummy.GetRendererCount() == 2u );
   DALI_TEST_CHECK( dummyImpl.IsVisualEnabled( TEST_PROPERTY1 ) == true );
   DALI_TEST_CHECK( dummyImpl.IsVisualEnabled( TEST_PROPERTY1 ) == true);
-  DALI_TEST_CHECK( dummy.OnStage() == true );
+  DALI_TEST_CHECK( dummy.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) == true );
   dummyImpl.EnableVisual( TEST_PROPERTY2, false );
 
   // Render and notify
index 6b289af..e575bca 100644 (file)
@@ -527,7 +527,7 @@ int UtcDaliControlWrapperRegisterDisabledVisual(void)
 
   DALI_TEST_EQUALS( controlWrapperImpl->IsVisualEnabled( TEST_PROPERTY ), false, TEST_LOCATION );
 
-  DALI_TEST_EQUALS( controlWrapper.OnStage(), true, TEST_LOCATION );
+  DALI_TEST_EQUALS( controlWrapper.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ), true, TEST_LOCATION );
 
   controlWrapperImpl->EnableVisual( TEST_PROPERTY, true );
 
@@ -570,7 +570,7 @@ int UtcDaliControlWrapperRegisterDisabledVisualWithDepthIndex(void)
 
   DALI_TEST_EQUALS( controlWrapperImpl->IsVisualEnabled( TEST_PROPERTY ), false, TEST_LOCATION );
 
-  DALI_TEST_EQUALS( controlWrapper.OnStage(), true, TEST_LOCATION );
+  DALI_TEST_EQUALS( controlWrapper.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ), true, TEST_LOCATION );
 
   controlWrapperImpl->EnableVisual( TEST_PROPERTY, true );
 
index a8ce275..f812fe0 100644 (file)
@@ -23,7 +23,6 @@
 #include <dali-toolkit/devel-api/transition-effects/cube-transition-cross-effect.h>
 #include <dali-toolkit/devel-api/transition-effects/cube-transition-fold-effect.h>
 #include <dali-toolkit/devel-api/transition-effects/cube-transition-wave-effect.h>
-#include <dali/public-api/images/buffer-image.h>
 #include <dali/devel-api/adaptor-framework/image-loading.h>
 #include <dali/devel-api/adaptor-framework/pixel-buffer.h>
 
index 2cce946..e7761e6 100644 (file)
@@ -106,7 +106,7 @@ int UtcDaliEffectsViewAddRemoveDropShadow(void)
   DALI_TEST_CHECK( view );
 
   Actor actor = Actor::New();
-  DALI_TEST_CHECK( !actor.OnStage() );
+  DALI_TEST_CHECK( !actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
 
 
   view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
@@ -114,13 +114,13 @@ int UtcDaliEffectsViewAddRemoveDropShadow(void)
   view.Add(actor);
   Stage::GetCurrent().Add(view);
 
-  DALI_TEST_CHECK( actor.OnStage() );
+  DALI_TEST_CHECK( actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
   DALI_TEST_CHECK( actor.GetParent() );
   DALI_TEST_CHECK( actor.GetParent() != view );
 
   view.Remove(actor);
 
-  DALI_TEST_CHECK( !actor.OnStage() );
+  DALI_TEST_CHECK( !actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
   END_TEST;
 }
 
@@ -153,7 +153,7 @@ int UtcDaliEffectsViewAddRemoveEmboss(void)
 
   Actor actor = Actor::New();
   actor.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
-  DALI_TEST_CHECK( !actor.OnStage() );
+  DALI_TEST_CHECK( !actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
 
   view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
 
@@ -162,7 +162,7 @@ int UtcDaliEffectsViewAddRemoveEmboss(void)
 
   stage.Add(view);
 
-  DALI_TEST_CHECK( actor.OnStage() );
+  DALI_TEST_CHECK( actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
 
   application.SendNotification();
   application.Render();
index 3f39a5d..3ae109c 100755 (executable)
@@ -446,8 +446,8 @@ int UtcDaliToolkitFlexContainerMoveFocus(void)
   // Create two actors and add them to the container
   Actor actor1 = Actor::New();
   Actor actor2 = Actor::New();
-  actor1.SetKeyboardFocusable(true);
-  actor2.SetKeyboardFocusable(true);
+  actor1.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
+  actor2.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
   DALI_TEST_CHECK( actor1 );
   DALI_TEST_CHECK( actor2 );
 
@@ -524,10 +524,10 @@ int UtcDaliToolkitFlexContainerRTLSupportP(void)
   // Check content direction property.
   DALI_TEST_EQUALS( (FlexContainer::ContentDirection)flexContainer.GetProperty<int>( FlexContainer::Property::CONTENT_DIRECTION ), FlexContainer::INHERIT, TEST_LOCATION );
 
-  actor0.SetProperty( Dali::DevelActor::Property::LAYOUT_DIRECTION, Dali::LayoutDirection::RIGHT_TO_LEFT );
+  actor0.SetProperty( Dali::Actor::Property::LAYOUT_DIRECTION, Dali::LayoutDirection::RIGHT_TO_LEFT );
   DALI_TEST_EQUALS( (FlexContainer::ContentDirection)flexContainer.GetProperty<int>( FlexContainer::Property::CONTENT_DIRECTION ), FlexContainer::RTL, TEST_LOCATION );
 
-  actor0.SetProperty( Dali::DevelActor::Property::LAYOUT_DIRECTION, Dali::LayoutDirection::LEFT_TO_RIGHT );
+  actor0.SetProperty( Dali::Actor::Property::LAYOUT_DIRECTION, Dali::LayoutDirection::LEFT_TO_RIGHT );
   DALI_TEST_EQUALS( (FlexContainer::ContentDirection)flexContainer.GetProperty<int>( FlexContainer::Property::CONTENT_DIRECTION ), FlexContainer::LTR, TEST_LOCATION );
 
   flexContainer.SetProperty( FlexContainer::Property::CONTENT_DIRECTION, "RTL" );
@@ -536,7 +536,7 @@ int UtcDaliToolkitFlexContainerRTLSupportP(void)
   flexContainer.SetProperty( FlexContainer::Property::CONTENT_DIRECTION, "LTR" );
   DALI_TEST_EQUALS( (FlexContainer::ContentDirection)flexContainer.GetProperty<int>( FlexContainer::Property::CONTENT_DIRECTION ), FlexContainer::LTR, TEST_LOCATION );
 
-  actor0.SetProperty( Dali::DevelActor::Property::LAYOUT_DIRECTION, Dali::LayoutDirection::RIGHT_TO_LEFT );
+  actor0.SetProperty( Dali::Actor::Property::LAYOUT_DIRECTION, Dali::LayoutDirection::RIGHT_TO_LEFT );
   DALI_TEST_EQUALS( (FlexContainer::ContentDirection)flexContainer.GetProperty<int>( FlexContainer::Property::CONTENT_DIRECTION ), FlexContainer::LTR, TEST_LOCATION );
 
   flexContainer.SetProperty( FlexContainer::Property::CONTENT_DIRECTION, "inherit" );
index c508bcd..fd5cd98 100644 (file)
@@ -142,7 +142,7 @@ int UtcDaliGaussianBlurViewAddRemove(void)
   DALI_TEST_CHECK( view );
 
   Actor actor = Actor::New();
-  DALI_TEST_CHECK( !actor.OnStage() );
+  DALI_TEST_CHECK( !actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
 
 
   view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
@@ -150,11 +150,11 @@ int UtcDaliGaussianBlurViewAddRemove(void)
   view.Add(actor);
   Stage::GetCurrent().Add(view);
 
-  DALI_TEST_CHECK( actor.OnStage() );
+  DALI_TEST_CHECK( actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
 
   view.Remove(actor);
 
-  DALI_TEST_CHECK( !actor.OnStage() );
+  DALI_TEST_CHECK( !actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
   END_TEST;
 }
 
index 6829d98..d7aa177 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -52,34 +52,6 @@ void utc_dali_toolkit_image_view_cleanup(void)
 namespace
 {
 
-const char* VERTEX_SHADER = DALI_COMPOSE_SHADER(
-  attribute mediump vec2 aPosition;\n
-  varying mediump vec2 vTexCoord;\n
-  uniform mediump mat4 uMvpMatrix;\n
-  uniform mediump vec3 uSize;\n
-  \n
-  void main()\n
-  {\n
-    mediump vec4 vertexPosition = vec4(aPosition, 0.0, 1.0);\n
-    vertexPosition.xyz *= uSize;\n
-    vertexPosition = uMvpMatrix * vertexPosition;\n
-    \n
-    vTexCoord = aPosition + vec2(0.5);\n
-    gl_Position = vertexPosition;\n
-  }\n
-);
-
-const char* FRAGMENT_SHADER = DALI_COMPOSE_SHADER(
-  varying mediump vec2 vTexCoord;\n
-  uniform sampler2D sTexture;\n
-  uniform lowp vec4 uColor;\n
-  \n
-  void main()\n
-  {\n
-    gl_FragColor = texture2D( sTexture, vTexCoord ) * uColor;\n
-  }\n
-);
-
 const char* TEST_IMAGE_FILE_NAME =  "gallery_image_01.jpg";
 const char* TEST_IMAGE_FILE_NAME2 =  "gallery_image_02.jpg";
 
@@ -96,62 +68,6 @@ const char* TEST_GIF_FILE_NAME = TEST_RESOURCE_DIR "/anim.gif";
 
 const char* TEST_VECTOR_IMAGE_FILE_NAME =  TEST_RESOURCE_DIR  "/insta_camera.json";
 
-void TestImage( ImageView imageView, BufferImage image )
-{
-  Property::Value value = imageView.GetProperty( imageView.GetPropertyIndex( "image" ) );
-
-  Property::Map map;
-  DALI_TEST_CHECK( value.Get( map ) );
-
-  DALI_TEST_CHECK( map.Find( "width" ) );
-  DALI_TEST_CHECK( map.Find( "height" ) );
-  DALI_TEST_CHECK( map.Find( "type" ) );
-
-  int width = 0;
-  DALI_TEST_CHECK( map[ "width" ].Get( width ) );
-  DALI_TEST_EQUALS( (unsigned int)width, image.GetWidth(), TEST_LOCATION );
-
-  int height = 0;
-  DALI_TEST_CHECK( map[ "height" ].Get( height ) );
-  DALI_TEST_EQUALS( (unsigned int)height, image.GetHeight(), TEST_LOCATION );
-
-  std::string type;
-  DALI_TEST_CHECK( map[ "type" ].Get( type ) );
-  DALI_TEST_EQUALS( type, "BufferImage", TEST_LOCATION );
-}
-
-void TestImage( ImageView imageView, ResourceImage image )
-{
-  Property::Value value = imageView.GetProperty( imageView.GetPropertyIndex( "image" ) );
-
-  Property::Map map;
-  DALI_TEST_CHECK( value.Get( map ) );
-
-  if( map.Find( "width" ) )
-  {
-    int width = 0;
-    DALI_TEST_CHECK( map[ "width" ].Get( width ) );
-    DALI_TEST_EQUALS( (unsigned int)width, image.GetWidth(), TEST_LOCATION );
-  }
-
-  if( map.Find( "height" ) )
-  {
-    int height = 0;
-    DALI_TEST_CHECK( map[ "height" ].Get( height ) );
-    DALI_TEST_EQUALS( (unsigned int)height, image.GetHeight(), TEST_LOCATION );
-  }
-
-  DALI_TEST_CHECK( map.Find( "type" ) );
-
-  std::string type;
-  DALI_TEST_CHECK( map[ "type" ].Get( type ) );
-  DALI_TEST_EQUALS( type, "ResourceImage", TEST_LOCATION );
-
-  std::string filename;
-  DALI_TEST_CHECK( map[ "filename" ].Get( filename ) );
-  DALI_TEST_EQUALS( filename, image.GetUrl(), TEST_LOCATION );
-}
-
 void TestUrl( ImageView imageView, const std::string url )
 {
   Property::Value value = imageView.GetProperty( imageView.GetPropertyIndex( "image" ) );
@@ -174,19 +90,6 @@ int UtcDaliImageViewNewP(void)
   END_TEST;
 }
 
-int UtcDaliImageViewNewImageP(void)
-{
-  ToolkitTestApplication application;
-
-  BufferImage image = CreateBufferImage( 100, 200, Vector4( 1.f, 1.f, 1.f, 1.f ) );
-  ImageView imageView = ImageView::New( image );
-
-  DALI_TEST_CHECK( imageView );
-  TestImage( imageView, image );
-
-  END_TEST;
-}
-
 int UtcDaliImageViewNewUrlP(void)
 {
   ToolkitTestApplication application;
@@ -302,83 +205,6 @@ int UtcDaliImageViewSetGetProperty01(void)
   END_TEST;
 }
 
-int UtcDaliImageViewSetGetProperty02(void)
-{
-  ToolkitTestApplication application;
-
-  Image image = CreateBufferImage( 10, 10, Color::WHITE );
-  ImageView imageView = ImageView::New(image);
-  Vector4 fullImageRect( 0.f, 0.f, 1.f, 1.f );
-
-  Stage::GetCurrent().Add( imageView );
-
-  application.SendNotification();
-  application.Render();
-  TestGlAbstraction& gl = application.GetGlAbstraction();
-
-  Vector4 pixelAreaUniform;
-  DALI_TEST_CHECK( gl.GetUniformValue<Vector4>( "pixelArea", pixelAreaUniform ) );
-  DALI_TEST_EQUALS( pixelAreaUniform, fullImageRect, TEST_LOCATION );
-
-  Property::Value value = imageView.GetProperty( ImageView::Property::PIXEL_AREA );
-  Vector4 pixelAreaValue;
-  DALI_TEST_CHECK( value.Get(pixelAreaValue) );
-  DALI_TEST_EQUALS( pixelAreaValue, fullImageRect, TEST_LOCATION );
-
-  Vector4 pixelAreaSet( 0.2f, 0.2f, 0.3f, 0.3f );
-  imageView.SetProperty( ImageView::Property::PIXEL_AREA, pixelAreaSet);
-
-  application.SendNotification();
-  application.Render();
-
-  value = imageView.GetProperty( ImageView::Property::PIXEL_AREA );
-  value.Get(pixelAreaValue);
-  DALI_TEST_EQUALS( pixelAreaValue, pixelAreaSet, TEST_LOCATION );
-
-  DALI_TEST_CHECK( gl.GetUniformValue<Vector4>( "pixelArea", pixelAreaUniform ) );
-  DALI_TEST_EQUALS( pixelAreaUniform, pixelAreaSet, TEST_LOCATION );
-
-  END_TEST;
-}
-
-int UtcDaliImageViewSetGetProperty03(void)
-{
-  ToolkitTestApplication application;
-
-  Image image = CreateBufferImage( 10, 10, Color::WHITE );
-  ImageView imageView = ImageView::New(image);
-  Stage::GetCurrent().Add( imageView );
-  application.SendNotification();
-  application.Render();
-
-  // conventional alpha blending
-  Renderer renderer = imageView.GetRendererAt( 0 );
-  Property::Value value = renderer.GetProperty( Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA );
-  bool enable;
-  DALI_TEST_CHECK( value.Get( enable ) );
-  DALI_TEST_CHECK( !enable );
-
-  // pre-multiplied alpha blending
-  imageView.SetProperty( Toolkit::ImageView::Property::PRE_MULTIPLIED_ALPHA, true );
-  application.SendNotification();
-  application.Render();
-
-  int srcFactorRgb    = renderer.GetProperty<int>( Renderer::Property::BLEND_FACTOR_SRC_RGB );
-  int destFactorRgb   = renderer.GetProperty<int>( Renderer::Property::BLEND_FACTOR_DEST_RGB );
-  int srcFactorAlpha  = renderer.GetProperty<int>( Renderer::Property::BLEND_FACTOR_SRC_ALPHA );
-  int destFactorAlpha = renderer.GetProperty<int>( Renderer::Property::BLEND_FACTOR_DEST_ALPHA );
-  DALI_TEST_CHECK( srcFactorRgb == BlendFactor::ONE );
-  DALI_TEST_CHECK( destFactorRgb == BlendFactor::ONE_MINUS_SRC_ALPHA );
-  DALI_TEST_CHECK( srcFactorAlpha == BlendFactor::ONE );
-  DALI_TEST_CHECK( destFactorAlpha == BlendFactor::ONE_MINUS_SRC_ALPHA );
-
-  value = renderer.GetProperty( Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA );
-  DALI_TEST_CHECK( value.Get( enable ) );
-  DALI_TEST_CHECK( enable );
-
-  END_TEST;
-}
-
 int UtcDaliImageViewPreMultipliedAlphaPng(void)
 {
   ToolkitTestApplication application;
@@ -894,9 +720,8 @@ int UtcDaliImageViewSizeWithBackgroundAndImage(void)
 
   int widthBackground = 100;
   int heightBackground = 200;
-  int width = 300;
-  int height = 400;
-  Image image = CreateBufferImage( width, height, Vector4(1.f, 1.f, 1.f, 1.f) );
+  int width = 600;
+  int height = 600;
 
   ImageView imageView = ImageView::New();
 
@@ -909,7 +734,7 @@ int UtcDaliImageViewSizeWithBackgroundAndImage(void)
                           }
                        );
 
-  imageView.SetImage( image );
+  imageView.SetImage( gImage_600_RGB ); // 1 to 1 ratio, 600x600 pixels
 
   Stage::GetCurrent().Add( imageView );
   application.SendNotification();
@@ -958,9 +783,7 @@ int UtcDaliImageViewHeightForWidthBackgroundAndImage(void)
   int widthBackground = 100;
   int heightBackground = 200;
   int width = 300;
-  int height = 400;
-
-  Image image = CreateBufferImage( width, height, Vector4(1.f, 1.f, 1.f, 1.f) );
+  int height = 300;
 
   ImageView imageView = ImageView::New();
 
@@ -971,9 +794,9 @@ int UtcDaliImageViewHeightForWidthBackgroundAndImage(void)
                            { ImageVisual::Property::DESIRED_WIDTH, widthBackground },
                            { ImageVisual::Property::DESIRED_HEIGHT, heightBackground }
                          }
-                       );
+                       ); // 1 to 2 ratio
 
-  imageView.SetImage( image );
+  imageView.SetImage( gImage_600_RGB ); // 1 to 1 ratio
 
   Stage::GetCurrent().Add( imageView );
   application.SendNotification();
@@ -985,28 +808,6 @@ int UtcDaliImageViewHeightForWidthBackgroundAndImage(void)
   END_TEST;
 }
 
-int UtcDaliImageViewSetBufferImage(void)
-{
-  ToolkitTestApplication application;
-
-  int width1 = 300;
-  int height1 = 400;
-  BufferImage image1 = CreateBufferImage( width1, height1, Vector4( 1.f, 1.f, 1.f, 1.f ) );
-  ImageView imageView = ImageView::New();
-  imageView.SetImage( image1 );
-
-  TestImage( imageView, image1 );
-
-  int width2 = 600;
-  int height2 = 500;
-  BufferImage image2 = CreateBufferImage( width2, height2, Vector4( 1.f, 1.f, 1.f, 1.f ) );
-  imageView.SetImage( image2 );
-
-  TestImage( imageView, image2 );
-
-  END_TEST;
-}
-
 int UtcDaliImageViewSetImageUrl(void)
 {
   ToolkitTestApplication application;
@@ -1022,83 +823,6 @@ int UtcDaliImageViewSetImageUrl(void)
   END_TEST;
 }
 
-int UtcDaliImageViewSetImageOnstageP(void)
-{
-  ToolkitTestApplication application;
-
-  ImageView imageView = ImageView::New();
-
-  Stage::GetCurrent().Add( imageView );
-  application.SendNotification();
-  application.Render();
-
-  ResourceImage image1 = ResourceImage::New( TEST_IMAGE_FILE_NAME );
-  imageView.SetImage( image1 );
-  TestImage( imageView, image1 );
-
-  int width = 300;
-  int height = 400;
-  BufferImage image2 = CreateBufferImage( width, height, Vector4( 1.f, 1.f, 1.f, 1.f ) );
-  imageView.SetImage( image2 );
-  TestImage( imageView, image2 );
-
-  END_TEST;
-}
-
-int UtcDaliImageViewSetImageOnstageN(void)
-{
-  ToolkitTestApplication application;
-
-  ImageView imageView = ImageView::New();
-
-  Stage::GetCurrent().Add( imageView );
-  application.SendNotification();
-  application.Render();
-
-  ResourceImage image1 = ResourceImage::New( TEST_IMAGE_FILE_NAME );
-  imageView.SetImage( image1 );
-  TestImage( imageView, image1 );
-
-  Image image2;
-  imageView.SetImage( image2 );
-
-  Property::Value value = imageView.GetProperty( imageView.GetPropertyIndex( "image" ) );
-
-  //the value should be empty
-  std::string url;
-  DALI_TEST_CHECK( !value.Get( url ) );
-
-  Property::Map map;
-  value.Get( map );
-  DALI_TEST_CHECK( map.Empty() );
-
-  END_TEST;
-}
-
-int UtcDaliImageViewSetImageOffstageP(void)
-{
-  ToolkitTestApplication application;
-
-  ImageView imageView = ImageView::New();
-
-  Stage::GetCurrent().Add( imageView );
-  application.SendNotification();
-  application.Render();
-  Stage::GetCurrent().Remove( imageView );
-
-  ResourceImage image1 = ResourceImage::New( TEST_IMAGE_FILE_NAME );
-  imageView.SetImage( image1 );
-  TestImage( imageView, image1 );
-
-  int width = 300;
-  int height = 400;
-  BufferImage image2 = CreateBufferImage( width, height, Vector4( 1.f, 1.f, 1.f, 1.f ) );
-  imageView.SetImage( image2 );
-  TestImage( imageView, image2 );
-
-  END_TEST;
-}
-
 bool gResourceReadySignalFired = false;
 Vector3 gNaturalSize;
 
@@ -1144,62 +868,6 @@ int UtcDaliImageViewCheckResourceReady(void)
   END_TEST;
 }
 
-int UtcDaliImageViewSetImageOffstageN(void)
-{
-  ToolkitTestApplication application;
-
-  ImageView imageView = ImageView::New();
-
-  Stage::GetCurrent().Add( imageView );
-  application.SendNotification();
-  application.Render();
-  Stage::GetCurrent().Remove( imageView );
-
-  ResourceImage image1 = ResourceImage::New( TEST_IMAGE_FILE_NAME );
-  imageView.SetImage( image1 );
-  TestImage( imageView, image1 );
-
-  Image image2;
-  imageView.SetImage( image2 );
-
-  Property::Value value = imageView.GetProperty( imageView.GetPropertyIndex( "image" ) );
-
-  //the value should be empty
-  std::string url;
-  DALI_TEST_CHECK( !value.Get( url ) );
-
-  Property::Map map;
-  value.Get( map );
-  DALI_TEST_CHECK( map.Empty() );
-
-  END_TEST;
-}
-
-int UtcDaliImageViewSetImageN(void)
-{
-  ToolkitTestApplication application;
-
-  Image image1;
-  ImageView imageView = ImageView::New();
-  imageView.SetImage( image1 );
-
-  Property::Value value = imageView.GetProperty( imageView.GetPropertyIndex( "image" ) );
-
-  //the value should be empty
-  std::string url;
-  DALI_TEST_CHECK( !value.Get( url ) );
-
-  Property::Map map;
-  value.Get( map );
-  DALI_TEST_CHECK( map.Empty() );
-
-  std::string resource_url;
-  Property::Value val = imageView.GetProperty( imageView.GetPropertyIndex( "image" ) );
-  DALI_TEST_CHECK( !val.Get( resource_url ) );
-
-  END_TEST;
-}
-
 int UtcDaliImageViewSetImageTypeChangesP(void)
 {
   ToolkitTestApplication application;
@@ -1237,34 +905,6 @@ int UtcDaliImageViewSetImageTypeChangesP(void)
   DALI_TEST_CHECK( ! value.Get( map ) ); // Value should be empty
   DALI_TEST_CHECK( visual );             // Visual should be valid
 
-  // Set an empty Image
-  imageView.SetImage( Image() );
-
-  application.SendNotification();
-  application.Render( 16 );
-
-  value = imageView.GetProperty( imageView.GetPropertyIndex( "image" ) );
-  visual = DevelControl::GetVisual( controlImpl, ImageView::Property::IMAGE );
-
-  DALI_TEST_CHECK( ! value.Get( url ) ); // Value should be empty
-  value.Get( map );
-  DALI_TEST_CHECK( map.Empty() );        // Value should be empty
-  DALI_TEST_CHECK( ! visual );           // Visual should be invalid
-
-  // Set an Image
-  ResourceImage image1 = ResourceImage::New( TEST_IMAGE_FILE_NAME );
-  imageView.SetImage( image1 );
-
-  application.SendNotification();
-  application.Render( 16 );
-
-  value = imageView.GetProperty( imageView.GetPropertyIndex( "image" ) );
-  visual = DevelControl::GetVisual( controlImpl, ImageView::Property::IMAGE );
-
-  DALI_TEST_CHECK( ! value.Get( url ) ); // Value should be empty
-  DALI_TEST_CHECK( value.Get( map ) );   // Value should NOT be empty
-  DALI_TEST_CHECK( visual );             // Visual should be valid
-
   // Set an empty URL
   imageView.SetImage( "" );
 
@@ -1338,340 +978,12 @@ int UtcDaliImageViewResourceUrlP(void)
   END_TEST;
 }
 
-// Scenarios 1: ImageView from regular image
-int UtcDaliImageViewSetImageBufferImage(void)
-{
-  ToolkitTestApplication application;
-
-  ImageView imageView = ImageView::New();
-  Stage::GetCurrent().Add( imageView );
-
-  TestGlAbstraction& gl = application.GetGlAbstraction();
-  gl.EnableTextureCallTrace( true );
-
-  std::vector< GLuint > ids;
-  ids.push_back( 23 );
-  application.GetGlAbstraction().SetNextTextureIds( ids );
-
-  int width = 300;
-  int height = 400;
-  BufferImage image = CreateBufferImage( width, height, Color::WHITE );
-
-  imageView.SetImage( image );
-
-  application.SendNotification();
-  application.Render();
-
-  DALI_TEST_CHECK( gl.GetTextureTrace().FindMethod("BindTexture") );
-
-  std::stringstream params;
-  params << GL_TEXTURE_2D << ", " << 23;
-  DALI_TEST_CHECK( gl.GetTextureTrace().FindMethodAndParams("BindTexture", params.str()) );
-
-  END_TEST;
-}
-
-// Scenarios 2: ImageView from Native image
-int UtcDaliImageViewSetImageNativeImage(void)
-{
-  ToolkitTestApplication application;
-
-  ImageView imageView = ImageView::New();
-  Stage::GetCurrent().Add( imageView );
-
-  TestGlAbstraction& gl = application.GetGlAbstraction();
-  gl.EnableTextureCallTrace( true );
-
-  std::vector< GLuint > ids;
-  ids.push_back( 23 );
-  application.GetGlAbstraction().SetNextTextureIds( ids );
-
-  int width = 200;
-  int height = 500;
-  TestNativeImagePointer nativeImageInterface = TestNativeImage::New( width, height );
-  NativeImage nativeImage = NativeImage::New( *(nativeImageInterface.Get()) );
-
-  imageView.SetImage( nativeImage );
-  application.SendNotification();
-  application.Render();
-
-  DALI_TEST_CHECK( gl.GetTextureTrace().FindMethod("BindTexture") );
-
-  std::stringstream params;
-  params << GL_TEXTURE_EXTERNAL_OES << ", " << 23;
-  DALI_TEST_CHECK( gl.GetTextureTrace().FindMethodAndParams("BindTexture", params.str()) );
-
-  END_TEST;
-}
-
-// Scenarios 3: ImageView initially from regular image but then SetImage called with Native image
-int UtcDaliImageViewSetImageBufferImageToNativeImage(void)
-{
-  ToolkitTestApplication application;
-
-  int width = 300;
-  int height = 400;
-  BufferImage image = CreateBufferImage( width, height, Color::WHITE );
-
-  ImageView imageView = ImageView::New( image );
-  Stage::GetCurrent().Add( imageView );
-
-  TestGlAbstraction& gl = application.GetGlAbstraction();
-  gl.EnableTextureCallTrace( true );
-
-  std::vector< GLuint > ids;
-  ids.push_back( 23 );
-  application.GetGlAbstraction().SetNextTextureIds( ids );
-
-  application.SendNotification();
-  application.Render();
-
-  DALI_TEST_CHECK( gl.GetTextureTrace().FindMethod("BindTexture") );
-
-  std::stringstream params;
-  params << GL_TEXTURE_2D << ", " << 23;
-  DALI_TEST_CHECK( gl.GetTextureTrace().FindMethodAndParams("BindTexture", params.str()) );
-
-  width = 200;
-  height = 500;
-  TestNativeImagePointer nativeImageInterface = TestNativeImage::New( width, height );
-  NativeImage nativeImage = NativeImage::New( *(nativeImageInterface.Get()) );
-  imageView.SetImage( nativeImage );
-
-  ids.clear();
-  ids.push_back( 24 );
-  application.GetGlAbstraction().SetNextTextureIds( ids );
-
-  application.SendNotification();
-  application.Render();
-
-  DALI_TEST_CHECK( gl.GetTextureTrace().FindMethod("BindTexture") );
-
-  std::stringstream nextTextureParams;
-  nextTextureParams << GL_TEXTURE_EXTERNAL_OES << ", " << 24;
-  DALI_TEST_CHECK( gl.GetTextureTrace().FindMethodAndParams("BindTexture", nextTextureParams.str()) );
-
-  END_TEST;
-}
-
-// Scenarios 4: ImageView initially from Native image but then SetImage called with regular image
-int UtcDaliImageViewSetImageNativeImageToBufferImage(void)
-{
-  ToolkitTestApplication application;
-
-  int width = 300;
-  int height = 400;
-  TestNativeImagePointer nativeImageInterface = TestNativeImage::New( width, height );
-  NativeImage nativeImage = NativeImage::New( *(nativeImageInterface.Get()) );
-
-  ImageView imageView = ImageView::New( nativeImage );
-  Stage::GetCurrent().Add( imageView );
-
-  TestGlAbstraction& gl = application.GetGlAbstraction();
-  gl.EnableTextureCallTrace( true );
-
-  std::vector< GLuint > ids;
-  ids.push_back( 23 );
-  application.GetGlAbstraction().SetNextTextureIds( ids );
-
-  application.SendNotification();
-  application.Render();
-
-  DALI_TEST_CHECK( gl.GetTextureTrace().FindMethod("BindTexture") );
-
-  std::stringstream params;
-  params << GL_TEXTURE_EXTERNAL_OES << ", " << 23;
-  DALI_TEST_CHECK( gl.GetTextureTrace().FindMethodAndParams("BindTexture", params.str()) );
-
-  width = 200;
-  height = 500;
-  BufferImage image = CreateBufferImage( width, height, Color::WHITE );
-  imageView.SetImage( image );
-
-  ids.clear();
-  ids.push_back( 24 );
-  application.GetGlAbstraction().SetNextTextureIds( ids );
-
-  application.SendNotification();
-  application.Render();
-
-  DALI_TEST_CHECK( gl.GetTextureTrace().FindMethod("BindTexture") );
-
-  std::stringstream nextTextureParams;
-  nextTextureParams << GL_TEXTURE_2D << ", " << 24;
-  DALI_TEST_CHECK( gl.GetTextureTrace().FindMethodAndParams("BindTexture", nextTextureParams.str()) );
-
-  END_TEST;
-}
-
-// Scenarios 5: ImageView from Native image with custom shader
-int UtcDaliImageViewSetImageNativeImageWithCustomShader(void)
-{
-  ToolkitTestApplication application;
-
-  int width = 300;
-  int height = 400;
-
-  Property::Map customShader;
-  customShader.Insert( "vertexShader", VERTEX_SHADER );
-  customShader.Insert( "fragmentShader", FRAGMENT_SHADER );
-
-  Property::Array shaderHints;
-  shaderHints.PushBack( "requiresSelfDepthTest" );
-  shaderHints.PushBack( "outputIsTransparent" );
-  shaderHints.PushBack( "outputIsOpaque" );
-  shaderHints.PushBack( "modifiesGeometry" );
-
-  customShader.Insert( "hints", shaderHints );
-
-  Property::Map map;
-  map.Insert( "shader", customShader );
-
-  TestNativeImagePointer nativeImageInterface = TestNativeImage::New( width, height );
-  NativeImage nativeImage = NativeImage::New( *(nativeImageInterface.Get()) );
-
-  ImageView imageView = ImageView::New( nativeImage );
-  imageView.SetProperty( ImageView::Property::IMAGE, map );
-  Stage::GetCurrent().Add( imageView );
-
-  TestGlAbstraction& gl = application.GetGlAbstraction();
-  gl.EnableTextureCallTrace( true );
-
-  std::vector< GLuint > ids;
-  ids.push_back( 23 );
-  application.GetGlAbstraction().SetNextTextureIds( ids );
-
-  application.SendNotification();
-  application.Render();
-
-  DALI_TEST_CHECK( gl.GetTextureTrace().FindMethod("BindTexture") );
-
-  std::stringstream params;
-  params << GL_TEXTURE_EXTERNAL_OES << ", " << 23;
-  DALI_TEST_CHECK( gl.GetTextureTrace().FindMethodAndParams("BindTexture", params.str()) );
-
-  END_TEST;
-}
-
-// Scenarios 6: ImageView initially from regular image with custom shader but then SetImage called with Native
-int UtcDaliImageViewSetImageBufferImageWithCustomShaderToNativeImage(void)
-{
-  ToolkitTestApplication application;
-
-  int width = 300;
-  int height = 400;
-
-  Property::Map customShader;
-  customShader.Insert( "vertexShader", VERTEX_SHADER );
-  customShader.Insert( "fragmentShader", FRAGMENT_SHADER );
-
-  Property::Array shaderHints;
-  shaderHints.PushBack( "requiresSelfDepthTest" );
-  shaderHints.PushBack( "outputIsTransparent" );
-  shaderHints.PushBack( "outputIsOpaque" );
-  shaderHints.PushBack( "modifiesGeometry" );
-
-  customShader.Insert( "hints", shaderHints );
-
-  Property::Map map;
-  map.Insert( "shader", customShader );
-
-  BufferImage image = CreateBufferImage( width, height, Color::WHITE );
-
-  ImageView imageView = ImageView::New( image );
-  imageView.SetProperty( ImageView::Property::IMAGE, map );
-  Stage::GetCurrent().Add( imageView );
-
-  TestGlAbstraction& gl = application.GetGlAbstraction();
-  gl.EnableTextureCallTrace( true );
-
-  std::vector< GLuint > ids;
-  ids.push_back( 23 );
-  application.GetGlAbstraction().SetNextTextureIds( ids );
-
-  application.SendNotification();
-  application.Render();
-
-  DALI_TEST_CHECK( gl.GetTextureTrace().FindMethod("BindTexture") );
-
-  std::stringstream params;
-  params << GL_TEXTURE_2D << ", " << 23;
-  DALI_TEST_CHECK( gl.GetTextureTrace().FindMethodAndParams("BindTexture", params.str()) );
-
-  TestNativeImagePointer nativeImageInterface = TestNativeImage::New( width, height );
-  NativeImage nativeImage = NativeImage::New( *(nativeImageInterface.Get()) );
-  imageView.SetImage( nativeImage );
-
-  ids.clear();
-  ids.push_back( 24 );
-  application.GetGlAbstraction().SetNextTextureIds( ids );
-
-  application.SendNotification();
-  application.Render();
-
-  DALI_TEST_CHECK( gl.GetTextureTrace().FindMethod("BindTexture") );
-
-  std::stringstream nativeImageParams;
-  nativeImageParams << GL_TEXTURE_EXTERNAL_OES << ", " << 24;
-  DALI_TEST_CHECK( gl.GetTextureTrace().FindMethodAndParams("BindTexture", nativeImageParams.str()) );
-
-
-  END_TEST;
-}
-
-int UtcDaliImageViewGetImageP1(void)
-{
-  ToolkitTestApplication application;
-
-  ImageView imageView = ImageView::New();
-  DALI_TEST_CHECK( ! imageView.GetImage() );
-
-  Image image = CreateBufferImage();
-  imageView.SetImage( image );
-  DALI_TEST_CHECK( imageView.GetImage() == image );
-
-  END_TEST;
-}
-
-int UtcDaliImageViewGetImageP2(void)
-{
-  ToolkitTestApplication application;
-
-  BufferImage image = CreateBufferImage();
-  ImageView imageView = ImageView::New( image );
-  DALI_TEST_CHECK( imageView.GetImage() == image );
-
-  END_TEST;
-}
-
-int UtcDaliImageViewGetImageN(void)
-{
-  ToolkitTestApplication application;
-
-  ImageView imageView = ImageView::New( TEST_IMAGE_FILE_NAME );
-  DALI_TEST_CHECK( ! imageView.GetImage() );
-
-  Image image = CreateBufferImage();
-  imageView.SetImage( image );
-  DALI_TEST_CHECK( imageView.GetImage() == image );
-
-  imageView.SetImage( TEST_IMAGE_FILE_NAME );
-  DALI_TEST_CHECK( ! imageView.GetImage() );
-
-  END_TEST;
-}
-
-
 int UtcDaliImageViewReplaceImage(void)
 {
   ToolkitTestApplication application;
 
   gResourceReadySignalFired = false;
 
-  int width = 100;
-  int height = 200;
-  Image image = CreateBufferImage( width, height, Vector4(1.f, 1.f, 1.f, 1.f) );
-
   // Check ImageView with background and main image, to ensure both visuals are marked as loaded
   ImageView imageView = ImageView::New( TEST_IMAGE_1 );
 
index 0bd2225..78792d9 100644 (file)
@@ -59,7 +59,7 @@ std::vector<int> gReadyIds = {};
 void ResourceReadySignal( Control control )
 {
   gResourceReadySignalFired = true;
-  gReadyIds.push_back(control.GetId());
+  gReadyIds.push_back(control.GetProperty< int >( Actor::Property::ID ));
 }
 void ClearReadyIds()
 {
@@ -570,39 +570,6 @@ int UtcDaliImageVisualTextureReuse2(void)
 }
 
 
-int UtcDaliImageVisualImageHandle(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline( "Request image visual with an image handle" );
-
-  VisualFactory factory = VisualFactory::Get();
-  DALI_TEST_CHECK( factory );
-
-  Image image = ResourceImage::New(TEST_IMAGE_FILE_NAME);
-  Visual::Base visual = factory.CreateVisual( image );
-
-  // 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.
-
-  const int width=512;
-  const int height=513;
-
-  Integration::Bitmap* bitmap = Integration::Bitmap::New( Integration::Bitmap::BITMAP_2D_PACKED_PIXELS, ResourcePolicy::OWNED_DISCARD );
-  bitmap->GetPackedPixelsProfile()->ReserveBuffer( Pixel::RGBA8888, width, height,width, height );
-
-  TestGlAbstraction& gl = application.GetGlAbstraction();
-  TraceCallStack& textureTrace = gl.GetTextureTrace();
-  textureTrace.Enable(true);
-
-  DummyControl actor = DummyControl::New();
-  TestVisualRender( application, actor, visual, 1u,
-                    ImageDimensions(width, height),
-                    Integration::ResourcePointer(bitmap) );
-
-  DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION );
-  END_TEST;
-}
-
 int UtcDaliImageVisualCustomWrapModePixelArea(void)
 {
   ToolkitTestApplication application;
@@ -2295,7 +2262,7 @@ void ResourceReadyLoadNext( Control control )
   static int callNumber = 0;
 
   gResourceReadySignalFired = true;
-  gReadyIds.push_back(control.GetId());
+  gReadyIds.push_back(control.GetProperty< int >( Actor::Property::ID ));
 
   if( callNumber == 0 )
   {
@@ -2328,7 +2295,7 @@ int UtcDaliImageVisualLoadReady01(void)
 
   tet_infoline( "Create a control and connect to resource ready signal" );
   DummyControl actor = DummyControl::New(true);
-  int actor1Id = actor.GetId();
+  int actor1Id = actor.GetProperty< int >( Actor::Property::ID );
   actor.ResourceReadySignal().Connect( &ResourceReadySignal);
   Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
   actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
@@ -2359,7 +2326,7 @@ int UtcDaliImageVisualLoadReady01(void)
   Visual::Base imageVisual2 = CreateVisualWithPolicy( TEST_BROKEN_IMAGE_FILE_NAME, ImageVisual::Property::LOAD_POLICY, ImageVisual::LoadPolicy::IMMEDIATE );
 
   DummyControl actor2 = DummyControl::New(true);
-  int actor2Id = actor2.GetId();
+  int actor2Id = actor2.GetProperty< int >( Actor::Property::ID );
   Impl::DummyControl& dummyImpl2 = static_cast<Impl::DummyControl&>(actor2.GetImplementation());
   actor2.ResourceReadySignal().Connect( &ResourceReadyLoadNext);
 
old mode 100755 (executable)
new mode 100644 (file)
index 4098d72..8dcb505
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -73,10 +73,7 @@ public: // From ItemFactory
   virtual Actor NewItem(unsigned int itemId)
   {
     // Create a renderable actor for this item
-    Image image = ResourceImage::New( TEST_IMAGE_FILE_NAME );
-    Actor actor = CreateRenderableActor(image);
-
-    return actor;
+    return ImageView::New( TEST_IMAGE_FILE_NAME );
   }
 };
 
old mode 100755 (executable)
new mode 100644 (file)
index f5e6da8..8b011b8
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -135,10 +135,7 @@ public: // From ItemFactory
   virtual Actor NewItem(unsigned int itemId)
   {
     // Create a renderable actor for this item
-    Image image = ResourceImage::New( TEST_IMAGE_FILE_NAME );
-    Actor actor = CreateRenderableActor(image);
-
-    return actor;
+    return ImageView::New( TEST_IMAGE_FILE_NAME );
   }
 };
 
index a759616..cdecb16 100755 (executable)
@@ -296,12 +296,12 @@ int UtcDaliKeyboardFocusManagerSetAndGetCurrentFocusActor(void)
 
   // Create the first actor and add it to the stage
   Actor first = Actor::New();
-  first.SetKeyboardFocusable(true);
+  first.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
   Stage::GetCurrent().Add(first);
 
   // Create the second actor and add it to the stage
   Actor second = Actor::New();
-  second.SetKeyboardFocusable(true);
+  second.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
   Stage::GetCurrent().Add(second);
 
   // Create the third actor but don't add it to the stage
@@ -333,7 +333,7 @@ int UtcDaliKeyboardFocusManagerSetAndGetCurrentFocusActor(void)
   DALI_TEST_CHECK(manager.GetCurrentFocusActor() == second);
 
   // Make the third actor focusable
-  third.SetKeyboardFocusable(true);
+  third.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
 
   // Check that the focus is successfully moved to the third actor
   DALI_TEST_CHECK(manager.SetCurrentFocusActor(third) == true);
@@ -367,12 +367,12 @@ int UtcDaliKeyboardFocusManagerMoveFocus(void)
 
   // Create the first actor and add it to the stage
   Actor first = Actor::New();
-  first.SetKeyboardFocusable(true);
+  first.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
   Stage::GetCurrent().Add(first);
 
   // Create the second actor and add it to the stage
   Actor second = Actor::New();
-  second.SetKeyboardFocusable(true);
+  second.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
   Stage::GetCurrent().Add(second);
 
   // Move the focus to the right
@@ -428,11 +428,11 @@ int UtcDaliKeyboardFocusManagerMoveFocus(void)
 
   // Create the third actor
   Actor third = Actor::New();
-  third.SetKeyboardFocusable(true);
+  third.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
 
   // Create the fourth actor
   Actor fourth = Actor::New();
-  fourth.SetKeyboardFocusable(true);
+  fourth.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
 
   // Add the four children to table view
   tableView.AddChild(first, TableView::CellPosition(0, 0));
@@ -530,12 +530,12 @@ int UtcDaliKeyboardFocusManagerCustomAlgorithmMoveFocus(void)
 
   // Create the first actor and add it to the stage
   Actor first = Actor::New();
-  first.SetKeyboardFocusable(true);
+  first.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
   Stage::GetCurrent().Add(first);
 
   // Create the second actor and add it to the stage
   Actor second = Actor::New();
-  second.SetKeyboardFocusable(true);
+  second.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
   Stage::GetCurrent().Add(second);
 
   // Move the focus to the right
@@ -623,8 +623,8 @@ int UtcDaliKeyboardFocusManagerFocusablePropertiesMoveFocus(void)
 
   PushButton button1 = PushButton::New();
   PushButton button2 = PushButton::New();
-  button1.SetKeyboardFocusable(true);
-  button2.SetKeyboardFocusable(true);
+  button1.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
+  button2.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
   Stage::GetCurrent().Add(button1);
   Stage::GetCurrent().Add(button2);
 
@@ -637,16 +637,16 @@ int UtcDaliKeyboardFocusManagerFocusablePropertiesMoveFocus(void)
   focusChangedCallback.Reset();
 
   // set the navigation properties of button1
-  button1.SetProperty(Toolkit::DevelControl::Property::LEFT_FOCUSABLE_ACTOR_ID, Property::Value((int)button2.GetId()));
-  button1.SetProperty(Toolkit::DevelControl::Property::RIGHT_FOCUSABLE_ACTOR_ID, Property::Value((int)button2.GetId()));
-  button1.SetProperty(Toolkit::DevelControl::Property::UP_FOCUSABLE_ACTOR_ID, Property::Value((int)button2.GetId()));
-  button1.SetProperty(Toolkit::DevelControl::Property::DOWN_FOCUSABLE_ACTOR_ID, Property::Value((int)button2.GetId()));
+  button1.SetProperty(Toolkit::DevelControl::Property::LEFT_FOCUSABLE_ACTOR_ID, Property::Value((int)button2.GetProperty< int >( Actor::Property::ID )));
+  button1.SetProperty(Toolkit::DevelControl::Property::RIGHT_FOCUSABLE_ACTOR_ID, Property::Value((int)button2.GetProperty< int >( Actor::Property::ID )));
+  button1.SetProperty(Toolkit::DevelControl::Property::UP_FOCUSABLE_ACTOR_ID, Property::Value((int)button2.GetProperty< int >( Actor::Property::ID )));
+  button1.SetProperty(Toolkit::DevelControl::Property::DOWN_FOCUSABLE_ACTOR_ID, Property::Value((int)button2.GetProperty< int >( Actor::Property::ID )));
 
   // set the navigation properties of button2
-  button2.SetProperty(Toolkit::DevelControl::Property::LEFT_FOCUSABLE_ACTOR_ID, Property::Value((int)button1.GetId()));
-  button2.SetProperty(Toolkit::DevelControl::Property::RIGHT_FOCUSABLE_ACTOR_ID, Property::Value((int)button1.GetId()));
-  button2.SetProperty(Toolkit::DevelControl::Property::UP_FOCUSABLE_ACTOR_ID, Property::Value((int)button1.GetId()));
-  button2.SetProperty(Toolkit::DevelControl::Property::DOWN_FOCUSABLE_ACTOR_ID, Property::Value((int)button1.GetId()));
+  button2.SetProperty(Toolkit::DevelControl::Property::LEFT_FOCUSABLE_ACTOR_ID, Property::Value((int)button1.GetProperty< int >( Actor::Property::ID )));
+  button2.SetProperty(Toolkit::DevelControl::Property::RIGHT_FOCUSABLE_ACTOR_ID, Property::Value((int)button1.GetProperty< int >( Actor::Property::ID )));
+  button2.SetProperty(Toolkit::DevelControl::Property::UP_FOCUSABLE_ACTOR_ID, Property::Value((int)button1.GetProperty< int >( Actor::Property::ID )));
+  button2.SetProperty(Toolkit::DevelControl::Property::DOWN_FOCUSABLE_ACTOR_ID, Property::Value((int)button1.GetProperty< int >( Actor::Property::ID )));
 
   // Move the focus towards left
   DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::LEFT) == true);
@@ -693,11 +693,11 @@ int UtcDaliKeyboardFocusManagerFocusablePropertiesMoveFocus(void)
   Stage::GetCurrent().Add(tableView);
 
   PushButton button = PushButton::New();
-  button.SetKeyboardFocusable(true);
+  button.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
   tableView.AddChild(button, TableView::CellPosition(0, 0));
 
   // set the navigation properties of button3
-  button.SetProperty(Toolkit::DevelControl::Property::LEFT_FOCUSABLE_ACTOR_ID, Property::Value((int)button1.GetId()));
+  button.SetProperty(Toolkit::DevelControl::Property::LEFT_FOCUSABLE_ACTOR_ID, Property::Value((int)button1.GetProperty< int >( Actor::Property::ID )));
 
   // Set the focus to the button
   DALI_TEST_CHECK(manager.SetCurrentFocusActor(button) == true);
@@ -731,12 +731,12 @@ int UtcDaliKeyboardFocusManagerClearFocus(void)
 
   // Create the first actor and add it to the stage
   Actor first = Actor::New();
-  first.SetKeyboardFocusable(true);
+  first.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
   Stage::GetCurrent().Add(first);
 
   // Create the second actor and add it to the stage
   Actor second = Actor::New();
-  second.SetKeyboardFocusable(true);
+  second.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
   Stage::GetCurrent().Add(second);
 
   // Check that the focus is set on the first actor
@@ -901,12 +901,12 @@ int UtcDaliKeyboardFocusManagerSignalFocusedActorActivated(void)
 
   // Create the first button and add it to the stage
   PushButton firstPushButton = PushButton::New();
-  firstPushButton.SetKeyboardFocusable(true);
+  firstPushButton.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
   Stage::GetCurrent().Add(firstPushButton);
 
   // Create the second button and add it to the stage
   PushButton secondPushButton = PushButton::New();
-  secondPushButton.SetKeyboardFocusable(true);
+  secondPushButton.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
   Stage::GetCurrent().Add(secondPushButton);
 
   // Check that the focus is set on the first button
@@ -1001,22 +1001,22 @@ int UtcDaliKeyboardFocusManagerMoveFocusBackward(void)
 
   // Create the first actor and add it to the stage
   Actor first = Actor::New();
-  first.SetKeyboardFocusable(true);
+  first.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
   Stage::GetCurrent().Add(first);
 
   // Create the second actor and add it to the stage
   Actor second = Actor::New();
-  second.SetKeyboardFocusable(true);
+  second.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
   Stage::GetCurrent().Add(second);
 
   // Create the third actor and add it to the stage
   Actor third = Actor::New();
-  third.SetKeyboardFocusable(true);
+  third.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
   Stage::GetCurrent().Add(third);
 
   // Create the fourth actor and add it to the stage
   Actor fourth = Actor::New();
-  fourth.SetKeyboardFocusable(true);
+  fourth.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
   Stage::GetCurrent().Add(fourth);
 
   // Check that the focus is set on the second actor
@@ -1058,7 +1058,7 @@ int UtcDaliKeyboardFocusManagerMoveFocusBackward(void)
   for(int i = 0 ; i < 31 ; i ++)
   {
     Actor actor = Actor::New();
-    actor.SetKeyboardFocusable(true);
+    actor.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
     Stage::GetCurrent().Add(actor);
     manager.SetCurrentFocusActor(actor);
   }
@@ -1108,19 +1108,19 @@ int UtcDaliKeyboardFocusManagerChangeFocusDirectionByKeyEvents(void)
 
   // Create the first actor
   Actor first = Actor::New();
-  first.SetKeyboardFocusable(true);
+  first.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
 
   // Create the second actor
   Actor second = Actor::New();
-  second.SetKeyboardFocusable(true);
+  second.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
 
   // Create the third actor
   Actor third = Actor::New();
-  third.SetKeyboardFocusable(true);
+  third.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
 
   // Create the fourth actor
   Actor fourth = Actor::New();
-  fourth.SetKeyboardFocusable(true);
+  fourth.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
 
   // Add the four children to table view
   tableView.AddChild(first, TableView::CellPosition(0, 0));
@@ -1301,12 +1301,12 @@ int UtcDaliKeyboardFocusManagerMoveFocusTestStateChange(void)
 
   // Create the first actor and add it to the stage
   Control first = Control::New();
-  first.SetKeyboardFocusable(true);
+  first.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
   Stage::GetCurrent().Add(first);
 
   // Create the second actor and add it to the stage
   Control second = Control::New();
-  second.SetKeyboardFocusable(true);
+  second.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
   Stage::GetCurrent().Add(second);
 
   // Move the focus to the right
@@ -1365,11 +1365,11 @@ int UtcDaliKeyboardFocusManagerMoveFocusTestStateChange(void)
 
   // Create the third actor
   Control third = Control::New();
-  third.SetKeyboardFocusable(true);
+  third.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
 
   // Create the fourth actor
   Control fourth = Control::New();
-  fourth.SetKeyboardFocusable(true);
+  fourth.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
 
   // Add the four children to table view
   tableView.AddChild(first, TableView::CellPosition(0, 0));
@@ -1494,7 +1494,7 @@ int UtcDaliKeyboardFocusManagerFocusedActorUnstaged(void)
   DALI_TEST_CHECK( ! manager.GetCurrentFocusActor() );
 
   Actor actor = Actor::New();
-  actor.SetKeyboardFocusable( true );
+  actor.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
 
   tet_infoline( "Attempt to set unstaged actor, no actor should be returned from KeyboardFocusManager" );
   manager.SetCurrentFocusActor( actor );
@@ -1522,7 +1522,7 @@ int UtcDaliKeyboardFocusManagerEnableFocusIndicator(void)
   DALI_TEST_CHECK( ! manager.GetCurrentFocusActor() );
 
   Actor actor = Actor::New();
-  actor.SetKeyboardFocusable( true );
+  actor.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
   Stage::GetCurrent().Add( actor );
   manager.SetCurrentFocusActor( actor );
 
@@ -1557,7 +1557,7 @@ int UtcDaliKeyboardFocusManagerCheckConsumedKeyEvent(void)
 
   // Create the first actor and add it to the stage
   Control control = Control::New();
-  control.SetKeyboardFocusable(true);
+  control.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
   scene.Add(control);
 
   KeyEventCallback controlCallback( true );
@@ -1590,13 +1590,13 @@ int UtcDaliKeyboardFocusManagerFocusPerWindow(void)
   Window firstWindow = Window::New(PositionSize(0,0,300,500) ,"", false);
   DALI_TEST_CHECK( firstWindow );
   Control first = Control::New();
-  first.SetKeyboardFocusable(true);
+  first.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
   firstWindow.Add(first);
 
   Window secondWindow = Window::New(PositionSize(0,0,400,600) ,"", false);
   DALI_TEST_CHECK( secondWindow );
   Control second = Control::New();
-  second.SetKeyboardFocusable(true);
+  second.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
   secondWindow.Add( second );
 
   DALI_TEST_CHECK(manager.SetCurrentFocusActor(first) == true);
index 9cce9fc..3f30df1 100644 (file)
@@ -138,7 +138,7 @@ int UtcDaliModelViewAddRemove(void)
   DALI_TEST_CHECK( view );
 
   Actor actor = Actor::New();
-  DALI_TEST_CHECK( !actor.OnStage() );
+  DALI_TEST_CHECK( !actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
 
 
   view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
@@ -146,11 +146,11 @@ int UtcDaliModelViewAddRemove(void)
   view.Add(actor);
   Stage::GetCurrent().Add(view);
 
-  DALI_TEST_CHECK( actor.OnStage() );
+  DALI_TEST_CHECK( actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
 
   view.Remove(actor);
 
-  DALI_TEST_CHECK( !actor.OnStage() );
+  DALI_TEST_CHECK( !actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
   END_TEST;
 }
 
index 8c5fbf7..4801726 100755 (executable)
@@ -1009,20 +1009,20 @@ int UtcDaliPopupPropertyBacking(void)
   Actor backing = popup.FindChildByName( "popupBacking" );
   DALI_TEST_CHECK( backing );
 
-  DALI_TEST_EQUALS( backing.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, Math::MACHINE_EPSILON_0, TEST_LOCATION );
+  DALI_TEST_EQUALS( backing.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, Math::MACHINE_EPSILON_0, TEST_LOCATION );
 
   // Check enabled property.
   popup.SetDisplayState( Popup::SHOWN );
   application.SendNotification();
   application.Render();
 
-  DALI_TEST_EQUALS( backing.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.5f, Math::MACHINE_EPSILON_0, TEST_LOCATION );
+  DALI_TEST_EQUALS( backing.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.5f, Math::MACHINE_EPSILON_0, TEST_LOCATION );
 
   popup.SetDisplayState( Popup::HIDDEN );
   application.SendNotification();
   application.Render();
 
-  DALI_TEST_EQUALS( backing.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, Math::MACHINE_EPSILON_0, TEST_LOCATION );
+  DALI_TEST_EQUALS( backing.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, Math::MACHINE_EPSILON_0, TEST_LOCATION );
 
   popup.SetProperty( Popup::Property::BACKING_ENABLED, false );
   bool propertyResult;
@@ -1033,13 +1033,13 @@ int UtcDaliPopupPropertyBacking(void)
   application.SendNotification();
   application.Render();
 
-  DALI_TEST_EQUALS( backing.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, Math::MACHINE_EPSILON_0, TEST_LOCATION );
+  DALI_TEST_EQUALS( backing.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, Math::MACHINE_EPSILON_0, TEST_LOCATION );
 
   popup.SetDisplayState( Popup::HIDDEN );
   application.SendNotification();
   application.Render();
 
-  DALI_TEST_EQUALS( backing.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, Math::MACHINE_EPSILON_0, TEST_LOCATION );
+  DALI_TEST_EQUALS( backing.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, Math::MACHINE_EPSILON_0, TEST_LOCATION );
 
   // Check color property.
   popup.SetProperty( Popup::Property::BACKING_ENABLED, true );
index 916fb13..d6f125d 100644 (file)
@@ -17,6 +17,9 @@
 
 #include <dali-toolkit-test-suite-utils.h>
 #include <dali-toolkit/dali-toolkit.h>
+#include <dali-toolkit/devel-api/controls/progress-bar/progress-bar-devel.h>
+#include <dali-toolkit/devel-api/visuals/arc-visual-properties-devel.h>
+#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
 #include <dali/devel-api/actors/actor-devel.h>
 
 using namespace Dali;
@@ -85,6 +88,22 @@ int UtcDaliProgressBarNew(void)
   END_TEST;
 }
 
+int UtcDaliProgressBarNew2(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliProgressBarNew2");
+
+  ProgressBar progressBar1 = DevelProgressBar::New( DevelProgressBar::Style::LINEAR );
+  DALI_TEST_CHECK( progressBar1 );
+
+  ProgressBar progressBar2 = DevelProgressBar::New( DevelProgressBar::Style::CIRCULAR );
+  DALI_TEST_CHECK( progressBar2 );
+
+  DALI_TEST_CHECK( progressBar1.GetStyleName() != progressBar2.GetStyleName() );
+
+  END_TEST;
+}
+
 int UtcDaliProgressBarDestructor(void)
 {
   ToolkitTestApplication application;
@@ -410,3 +429,104 @@ int UtcDaliProgressBarSetPropertyP2(void)
 
   END_TEST;
 }
+
+int UtcDaliProgressBarSetPropertyP3(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline( "UtcDaliProgressBarSetPropertyP3" );
+
+  ProgressBar progressBar = ProgressBar::New();
+  progressBar.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
+  progressBar.SetProperty( Actor::Property::ANCHOR_POINT, ParentOrigin::TOP_LEFT);
+  progressBar.SetProperty( Actor::Property::SIZE, Vector2( Stage::GetCurrent().GetSize().x, Stage::GetCurrent().GetSize().y ) );
+  Stage::GetCurrent().Add( progressBar );
+  application.SendNotification();
+  application.Render();
+
+  {
+    // Set arc visual to the SECONDARY_PROGRESS_VISUAL
+    const float expected = 180.0f;
+
+    Property::Map map;
+    map["visualType"] = "ARC";
+    map["thickness"] = 4.0f;
+    map["mixColor"] = Color::BLUE;
+    map["sweepAngle"] = 60;
+    progressBar.SetProperty(ProgressBar::Property::SECONDARY_PROGRESS_VISUAL, map);
+    progressBar.SetProperty(ProgressBar::Property::SECONDARY_PROGRESS_VALUE, 0.5f); // This should change visual's sweep angle.
+
+    Property::Value value = progressBar.GetProperty( ProgressBar::Property::SECONDARY_PROGRESS_VISUAL );
+    Property::Map* resultMap = value.GetMap();
+    DALI_TEST_CHECK( resultMap );
+
+    Property::Value* sweepAngle = resultMap->Find( DevelArcVisual::Property::SWEEP_ANGLE );
+    float result = 0.0f;
+    sweepAngle->Get( result );
+    DALI_TEST_EQUALS( result, expected, TEST_LOCATION );
+  }
+
+  {
+    // Set arc visual to the PROGRESS_VISUAL
+    const float expected = 90.0f;
+
+    Property::Map map;
+    map["visualType"] = "ARC";
+    map["thickness"] = 4.0f;
+    map["mixColor"] = Color::RED;
+    map["sweepAngle"] = 60;
+    progressBar.SetProperty(ProgressBar::Property::PROGRESS_VISUAL, map);
+    progressBar.SetProperty(ProgressBar::Property::PROGRESS_VALUE, 0.25f); // This should change visual's sweep angle.
+
+    Property::Value value = progressBar.GetProperty( ProgressBar::Property::PROGRESS_VISUAL );
+    Property::Map* resultMap = value.GetMap();
+    DALI_TEST_CHECK( resultMap );
+
+    Property::Value* sweepAngle = resultMap->Find( DevelArcVisual::Property::SWEEP_ANGLE );
+    float result = 0.0f;
+    sweepAngle->Get( result );
+    DALI_TEST_EQUALS( result, expected, TEST_LOCATION );
+  }
+
+  {
+    // Set arc visual to the INDETERMINATE_VISUAL
+    const Vector4 expected = Color::GREEN;
+
+    Property::Map map;
+    map["visualType"] = "ARC";
+    map["thickness"] = 4.0f;
+    map["mixColor"] = expected;
+    progressBar.SetProperty(ProgressBar::Property::INDETERMINATE_VISUAL, map);
+
+    Property::Value value = progressBar.GetProperty( ProgressBar::Property::INDETERMINATE_VISUAL );
+    Property::Map* resultMap = value.GetMap();
+    DALI_TEST_CHECK( resultMap );
+
+    Property::Value* mixColor = resultMap->Find( Visual::Property::MIX_COLOR );
+    Vector4 result;
+    mixColor->Get( result );
+    DALI_TEST_EQUALS( result, expected, TEST_LOCATION );
+  }
+
+  {
+    // Set arc visual to the TRACK_VISUAL
+    const Vector4 expected = Color::YELLOW;
+
+    Property::Map map;
+    map["visualType"] = "ARC";
+    map["thickness"] = 0.4f;
+    map["mixColor"] = expected;
+    progressBar.SetProperty( ProgressBar::Property::TRACK_VISUAL, map );
+    progressBar.SetProperty( ProgressBar::Property::INDETERMINATE, true ); // This should not change track visual's properties.
+
+    Property::Value value = progressBar.GetProperty( ProgressBar::Property::TRACK_VISUAL );
+    Property::Map* resultMap = value.GetMap();
+    DALI_TEST_CHECK( resultMap );
+
+    Property::Value* mixColor = resultMap->Find( Visual::Property::MIX_COLOR );
+    Vector4 result;
+    mixColor->Get( result );
+    DALI_TEST_EQUALS( result, expected, TEST_LOCATION );
+  }
+
+  END_TEST;
+}
index 4e00368..5a2b43f 100644 (file)
@@ -864,14 +864,14 @@ int UtcDaliToolkitScrollBarSetIndicatorShowDurationP(void)
   DALI_TEST_EQUALS( scrollBar.GetIndicatorShowDuration(), 0.35f, TEST_LOCATION );
 
   // Make the indicator invisible
-  indicator.SetProperty( DevelActor::Property::OPACITY,0.0f);
+  indicator.SetProperty( Actor::Property::OPACITY,0.0f);
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Check that the indicator is invisible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
 
   // Show the indicator
   scrollBar.ShowIndicator();
@@ -884,21 +884,21 @@ int UtcDaliToolkitScrollBarSetIndicatorShowDurationP(void)
   application.Render();
 
   // Check that the indicator is now visible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
 
   // Set the duration to show the indicator to be 0.75 second
   scrollBar.SetIndicatorShowDuration(0.75);
   DALI_TEST_EQUALS( scrollBar.GetIndicatorShowDuration(), 0.75f, TEST_LOCATION );
 
   // Make the indicator invisible
-  indicator.SetProperty( DevelActor::Property::OPACITY,0.0f);
+  indicator.SetProperty( Actor::Property::OPACITY,0.0f);
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Check that the indicator is invisible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
 
   // Show the indicator
   scrollBar.ShowIndicator();
@@ -911,7 +911,7 @@ int UtcDaliToolkitScrollBarSetIndicatorShowDurationP(void)
   application.Render();
 
   // Check that the indicator is not fully visible yet
-  DALI_TEST_CHECK( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ) != 1.0f );
+  DALI_TEST_CHECK( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ) != 1.0f );
 
   // Wait for another 0.4 second
   Wait(application, 400);
@@ -921,7 +921,7 @@ int UtcDaliToolkitScrollBarSetIndicatorShowDurationP(void)
   application.Render();
 
   // Check that the indicator is now fully visible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
 
   END_TEST;
 }
@@ -946,14 +946,14 @@ int UtcDaliToolkitScrollBarSetIndicatorShowDurationN(void)
   DALI_TEST_CHECK( duration > 0.0f );
 
   // Make the indicator invisible
-  indicator.SetProperty( DevelActor::Property::OPACITY,0.0f);
+  indicator.SetProperty( Actor::Property::OPACITY,0.0f);
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Check that the indicator is invisible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
 
   // Show the indicator
   scrollBar.ShowIndicator();
@@ -966,21 +966,21 @@ int UtcDaliToolkitScrollBarSetIndicatorShowDurationN(void)
   application.Render();
 
   // Check that the indicator is now visible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
 
   // Now set the duration to show the indicator to be a negative value (which should be ignored and therefore means instant)
   scrollBar.SetIndicatorShowDuration(-0.25f);
   DALI_TEST_EQUALS( scrollBar.GetIndicatorShowDuration(), -0.25f, TEST_LOCATION );
 
   // Make the indicator invisible
-  indicator.SetProperty( DevelActor::Property::OPACITY,0.0f);
+  indicator.SetProperty( Actor::Property::OPACITY,0.0f);
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Check that the indicator is invisible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
 
   // Show the indicator
   scrollBar.ShowIndicator();
@@ -990,7 +990,7 @@ int UtcDaliToolkitScrollBarSetIndicatorShowDurationN(void)
   application.Render();
 
   // Check that the indicator becomes instantly visible in the next frame
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
 
   END_TEST;
 }
@@ -1036,14 +1036,14 @@ int UtcDaliToolkitScrollBarSetIndicatorHideDurationP(void)
   DALI_TEST_EQUALS( scrollBar.GetIndicatorHideDuration(), 0.15f, TEST_LOCATION );
 
   // Make the indicator visible
-  indicator.SetProperty( DevelActor::Property::OPACITY,1.0f);
+  indicator.SetProperty( Actor::Property::OPACITY,1.0f);
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Check that the indicator is visible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
 
   // Hide the indicator
   scrollBar.HideIndicator();
@@ -1056,21 +1056,21 @@ int UtcDaliToolkitScrollBarSetIndicatorHideDurationP(void)
   application.Render();
 
   // Check that the indicator is now invisible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
 
   // Set the duration to hide the indicator to be 0.65 second
   scrollBar.SetIndicatorHideDuration(0.65f);
   DALI_TEST_EQUALS( scrollBar.GetIndicatorHideDuration(), 0.65f, TEST_LOCATION );
 
   // Make the indicator visible
-  indicator.SetProperty( DevelActor::Property::OPACITY,1.0f);
+  indicator.SetProperty( Actor::Property::OPACITY,1.0f);
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Check that the indicator is visible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
 
   // Hide the indicator
   scrollBar.HideIndicator();
@@ -1083,7 +1083,7 @@ int UtcDaliToolkitScrollBarSetIndicatorHideDurationP(void)
   application.Render();
 
   // Check that the indicator is not fully invisible yet
-  DALI_TEST_CHECK( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ) != 0.0f );
+  DALI_TEST_CHECK( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ) != 0.0f );
 
   // Wait for another 0.5 second
   Wait(application, 500);
@@ -1093,7 +1093,7 @@ int UtcDaliToolkitScrollBarSetIndicatorHideDurationP(void)
   application.Render();
 
   // Check that the indicator is now fully invisible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
 
   END_TEST;
 }
@@ -1118,14 +1118,14 @@ int UtcDaliToolkitScrollBarSetIndicatorHideDurationN(void)
   DALI_TEST_CHECK( duration > 0.0f );
 
   // Make the indicator visible
-  indicator.SetProperty( DevelActor::Property::OPACITY,1.0f);
+  indicator.SetProperty( Actor::Property::OPACITY,1.0f);
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Check that the indicator is visible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
 
   // Hide the indicator
   scrollBar.HideIndicator();
@@ -1138,21 +1138,21 @@ int UtcDaliToolkitScrollBarSetIndicatorHideDurationN(void)
   application.Render();
 
   // Check that the indicator is now invisible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
 
   // Now set the duration to hide the indicator to be a negative value (which should be ignored and therefore means instant)
   scrollBar.SetIndicatorHideDuration(-0.25f);
   DALI_TEST_EQUALS( scrollBar.GetIndicatorHideDuration(), -0.25f, TEST_LOCATION );
 
   // Make the indicator visible
-  indicator.SetProperty( DevelActor::Property::OPACITY,1.0f);
+  indicator.SetProperty( Actor::Property::OPACITY,1.0f);
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Check that the indicator is visible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
 
   // Hide the indicator
   scrollBar.HideIndicator();
@@ -1162,7 +1162,7 @@ int UtcDaliToolkitScrollBarSetIndicatorHideDurationN(void)
   application.Render();
 
   // Check that the indicator becomes instantly invisible in the next frame
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
 
   END_TEST;
 }
@@ -1210,14 +1210,14 @@ int UtcDaliToolkitScrollBarShowIndicatorP(void)
   DALI_TEST_CHECK( duration > 0.0f );
 
   // Make the indicator invisible
-  indicator.SetProperty( DevelActor::Property::OPACITY,0.0f);
+  indicator.SetProperty( Actor::Property::OPACITY,0.0f);
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Check that the indicator is invisible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
 
   // Show the indicator
   scrollBar.ShowIndicator();
@@ -1230,7 +1230,7 @@ int UtcDaliToolkitScrollBarShowIndicatorP(void)
   application.Render();
 
   // Check that the indicator is now visible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
 
   END_TEST;
 }
@@ -1249,14 +1249,14 @@ int UtcDaliToolkitScrollBarShowIndicatorN(void)
   DALI_TEST_CHECK( indicator );
 
   // Make the indicator initially visible
-  indicator.SetProperty( DevelActor::Property::OPACITY,1.0f);
+  indicator.SetProperty( Actor::Property::OPACITY,1.0f);
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Check that the indicator is initially visible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
 
   // Get the default duration to show the indicator
   float duration = scrollBar.GetIndicatorShowDuration();
@@ -1272,7 +1272,7 @@ int UtcDaliToolkitScrollBarShowIndicatorN(void)
   application.Render();
 
   // Check that the indicator is still visible in the very next frame
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
 
   END_TEST;
 }
@@ -1297,14 +1297,14 @@ int UtcDaliToolkitScrollBarHideIndicatorP(void)
   DALI_TEST_CHECK( duration > 0.0f );
 
   // Make the indicator visible
-  indicator.SetProperty( DevelActor::Property::OPACITY,1.0f);
+  indicator.SetProperty( Actor::Property::OPACITY,1.0f);
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Check that the indicator is visible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
 
   // Hide the indicator
   scrollBar.HideIndicator();
@@ -1317,7 +1317,7 @@ int UtcDaliToolkitScrollBarHideIndicatorP(void)
   application.Render();
 
   // Check that the indicator is now invisible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
 
   END_TEST;
 }
@@ -1336,14 +1336,14 @@ int UtcDaliToolkitScrollBarHideIndicatorN(void)
   DALI_TEST_CHECK( indicator );
 
   // Make the indicator initially invisible
-  indicator.SetProperty( DevelActor::Property::OPACITY,0.0f);
+  indicator.SetProperty( Actor::Property::OPACITY,0.0f);
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Check that the indicator is initially invisible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
 
   // Get the default duration to hide the indicator
   float duration = scrollBar.GetIndicatorHideDuration();
@@ -1359,7 +1359,7 @@ int UtcDaliToolkitScrollBarHideIndicatorN(void)
   application.Render();
 
   // Check that the indicator is still invisible in the very next frame
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
 
   END_TEST;
 }
@@ -1384,14 +1384,14 @@ int UtcDaliToolkitScrollBarActionShowIndicator(void)
   DALI_TEST_CHECK( duration > 0.0f );
 
   // Make the indicator invisible
-  indicator.SetProperty( DevelActor::Property::OPACITY,0.0f);
+  indicator.SetProperty( Actor::Property::OPACITY,0.0f);
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Check that the indicator is invisible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
 
   // Do the "ShowIndicator" action
   Property::Map emptyMap;
@@ -1405,7 +1405,7 @@ int UtcDaliToolkitScrollBarActionShowIndicator(void)
   application.Render();
 
   // Check that the indicator is now visible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
 
   END_TEST;
 }
@@ -1430,14 +1430,14 @@ int UtcDaliToolkitScrollBarActionHideIndicator(void)
   DALI_TEST_CHECK( duration > 0.0f );
 
   // Make the indicator visible
-  indicator.SetProperty( DevelActor::Property::OPACITY,1.0f);
+  indicator.SetProperty( Actor::Property::OPACITY,1.0f);
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Check that the indicator is visible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
 
   // Do the "HideIndicator" action
   Property::Map emptyMap;
@@ -1451,7 +1451,7 @@ int UtcDaliToolkitScrollBarActionHideIndicator(void)
   application.Render();
 
   // Check that the indicator is now invisible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
 
   END_TEST;
 }
@@ -1476,14 +1476,14 @@ int UtcDaliToolkitScrollBarActionShowTransientIndicator(void)
   DALI_TEST_CHECK( duration > 0.0f );
 
   // Make the indicator invisible
-  indicator.SetProperty( DevelActor::Property::OPACITY,0.0f);
+  indicator.SetProperty( Actor::Property::OPACITY,0.0f);
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Check that the indicator is invisible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
 
   // Do the "ShowIndicator" action
   Property::Map emptyMap;
@@ -1497,7 +1497,7 @@ int UtcDaliToolkitScrollBarActionShowTransientIndicator(void)
   application.Render();
 
   // Check that the indicator is now visible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
 
   // Get the default duration to hide the indicator
   float hideDuration = scrollBar.GetProperty<float>( ScrollBar::Property::INDICATOR_HIDE_DURATION );
@@ -1515,7 +1515,7 @@ int UtcDaliToolkitScrollBarActionShowTransientIndicator(void)
   application.Render();
 
   // Check that the indicator is now invisible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
 
   END_TEST;
 }
@@ -1534,7 +1534,7 @@ int UtcDaliToolkitScrollBarActionShowTransientIndicatorImmediate(void)
   DALI_TEST_CHECK( indicator );
 
   // Make the indicator invisible
-  indicator.SetProperty( DevelActor::Property::OPACITY,0.0f);
+  indicator.SetProperty( Actor::Property::OPACITY,0.0f);
 
   // Don't use a show animation; the indicator should appear immediately
   scrollBar.SetProperty( ScrollBar::Property::INDICATOR_SHOW_DURATION, 0.0f );
@@ -1557,7 +1557,7 @@ int UtcDaliToolkitScrollBarActionShowTransientIndicatorImmediate(void)
   application.Render();
 
   // Check that the indicator is now visible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
 
   // Get the default duration to hide the indicator
   float hideDuration = scrollBar.GetProperty<float>( ScrollBar::Property::INDICATOR_HIDE_DURATION );
@@ -1575,7 +1575,7 @@ int UtcDaliToolkitScrollBarActionShowTransientIndicatorImmediate(void)
   application.Render();
 
   // Check that the indicator is now invisible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
 
   END_TEST;
 }
@@ -1600,14 +1600,14 @@ int UtcDaliToolkitScrollBarActionShowTransientIndicatorDuringHide(void)
   DALI_TEST_CHECK( duration > 0.0f );
 
   // Make the indicator visible
-  indicator.SetProperty( DevelActor::Property::OPACITY,1.0f);
+  indicator.SetProperty( Actor::Property::OPACITY,1.0f);
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Check that the indicator is visible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
 
   // Hide the indicator
   scrollBar.HideIndicator();
@@ -1620,7 +1620,7 @@ int UtcDaliToolkitScrollBarActionShowTransientIndicatorDuringHide(void)
   application.Render();
 
   // Check that the indicator is now partially hidden
-  DALI_TEST_CHECK( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ) < 1.0f );
+  DALI_TEST_CHECK( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ) < 1.0f );
 
   // Now interrupt the Hide with a DoAction( "ShowTransientIndicator" )
 
@@ -1642,7 +1642,7 @@ int UtcDaliToolkitScrollBarActionShowTransientIndicatorDuringHide(void)
   application.Render();
 
   // Check that the indicator is now visible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
 
   // Get the default duration to hide the indicator
   float hideDuration = scrollBar.GetProperty<float>( ScrollBar::Property::INDICATOR_HIDE_DURATION );
@@ -1660,7 +1660,7 @@ int UtcDaliToolkitScrollBarActionShowTransientIndicatorDuringHide(void)
   application.Render();
 
   // Check that the indicator is now invisible
-  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
 
   END_TEST;
 }
index d6cbe0e..963deea 100644 (file)
@@ -115,7 +115,7 @@ int UtcDaliShadowViewAddRemove(void)
   DALI_TEST_CHECK( view );
 
   Actor actor = Actor::New();
-  DALI_TEST_CHECK( !actor.OnStage() );
+  DALI_TEST_CHECK( !actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
 
 
   view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
@@ -123,11 +123,11 @@ int UtcDaliShadowViewAddRemove(void)
   view.Add(actor);
   Stage::GetCurrent().Add(view);
 
-  DALI_TEST_CHECK( actor.OnStage() );
+  DALI_TEST_CHECK( actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
 
   view.Remove(actor);
 
-  DALI_TEST_CHECK( !actor.OnStage() );
+  DALI_TEST_CHECK( !actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
   END_TEST;
 }
 
index e0c1cdc..29807e0 100644 (file)
@@ -857,7 +857,7 @@ int UtcDaliTableViewKeyboardFocus(void)
   ToolkitTestApplication application;
 
   TableView tableView = TableView::New(4,4);
-  tableView.SetKeyboardFocusable( true );
+  tableView.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
   tableView.SetProperty( Dali::Actor::Property::NAME, "TableView");
 
   for ( int row = 0; row < 4; ++row )
@@ -868,7 +868,7 @@ int UtcDaliTableViewKeyboardFocus(void)
       std::ostringstream str;
       str << row << "-" << col;
       control.SetProperty( Dali::Actor::Property::NAME, str.str() );
-      control.SetKeyboardFocusable( true );
+      control.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
       tableView.AddChild( control, TableView::CellPosition( row, col ) );
     }
   }
@@ -938,7 +938,7 @@ int UtcDaliTableViewKeyboardFocusInNestedTableView(void)
   ToolkitTestApplication application;
 
   TableView tableView = TableView::New(3, 3);
-  tableView.SetKeyboardFocusable( true );
+  tableView.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
   tableView.SetProperty( Dali::Actor::Property::NAME, "TableView");
 
   for ( int row = 0; row < 3; ++row )
@@ -962,7 +962,7 @@ int UtcDaliTableViewKeyboardFocusInNestedTableView(void)
             std::ostringstream nameStr;
             nameStr << row << "-" << col << "-" << childRow << "-" << childCol;
             control.SetProperty( Dali::Actor::Property::NAME, nameStr.str() );
-            control.SetKeyboardFocusable( true );
+            control.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
             childTableView.AddChild( control, TableView::CellPosition( childRow, childCol ) );
           }
         }
@@ -972,7 +972,7 @@ int UtcDaliTableViewKeyboardFocusInNestedTableView(void)
       {
         Control control = Control::New();
         control.SetProperty( Dali::Actor::Property::NAME, str.str() );
-        control.SetKeyboardFocusable( true );
+        control.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
         tableView.AddChild( control, TableView::CellPosition( row, col ) );
       }
     }
index c84000d..88a3ef3 100755 (executable)
@@ -1509,7 +1509,7 @@ int utcDaliTextEditorEvent02(void)
   application.Render();
 
   Actor layer = editor.GetChildAt( 1u );
-  DALI_TEST_CHECK( layer.IsLayer() );
+  DALI_TEST_CHECK( layer.GetProperty< bool >( Actor::Property::IS_LAYER ) );
 
   DALI_TEST_EQUALS( layer.GetChildCount(), 1u, TEST_LOCATION ); // The cursor.
   DALI_TEST_EQUALS( stencil.GetChildCount(), 0u, TEST_LOCATION );
@@ -2549,7 +2549,7 @@ int utcDaliTextEditorScrollStateChangedSignalTest(void)
   editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
   editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
   editor.SetProperty( TextEditor::Property::ENABLE_SCROLL_BAR, true );
-  editor.SetKeyboardFocusable(true);
+  editor.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
 
   bool startedCalled = false;
   bool finishedCalled = false;
index e96c99e..b8aa61f 100755 (executable)
@@ -1647,7 +1647,7 @@ int utcDaliTextFieldEvent02(void)
   application.Render();
 
   Actor layer = field.GetChildAt( 1u );
-  DALI_TEST_CHECK( layer.IsLayer() );
+  DALI_TEST_CHECK( layer.GetProperty< bool >( Actor::Property::IS_LAYER ) );
 
   DALI_TEST_EQUALS( layer.GetChildCount(), 1u, TEST_LOCATION ); // The cursor.
   DALI_TEST_EQUALS( stencil.GetChildCount(), 0u, TEST_LOCATION );
@@ -2458,7 +2458,7 @@ int utcDaliTextFieldSizeUpdate(void)
   field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
   field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
 
-  field.SetKeyboardFocusable(true);
+  field.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
   KeyboardFocusManager::Get().SetCurrentFocusActor( field );
 
   application.SendNotification();
index a29a7fd..e6d312d 100755 (executable)
@@ -1296,7 +1296,6 @@ int UtcDaliToolkitTextLabelColorComponents(void)
   label.SetProperty( TextLabel::Property::TEXT_COLOR_ALPHA, 0.6f );
   DALI_TEST_EQUALS( label.GetProperty< float >( TextLabel::Property::TEXT_COLOR_ALPHA ), 0.6f, TEST_LOCATION );
   DALI_TEST_EQUALS( label.GetProperty< Vector4 >( TextLabel::Property::TEXT_COLOR ), Vector4( 0.0f, 0.0f, 1.0f, 0.6f ), TEST_LOCATION );
-  DALI_TEST_EQUALS( label.GetProperty< Vector4 >( TextLabel::Property::UNUSED_PROPERTY_TEXT_COLOR ), Vector4( 0.0f, 0.0f, 1.0f, 0.6f ), TEST_LOCATION );
 
   // Test a transparent text - Rendering should be skipped.
   label.SetProperty( TextLabel::Property::TEXT, "Hello world Hello world" );
index 4b8aca5..b09f171 100644 (file)
@@ -230,3 +230,25 @@ int UtcDaliToolkitTextSelectionToolBarScrollView(void)
   END_TEST;
 }
 
+
+
+int UtcDaliToolkitTextSelectionPopupIconProperties(void)
+{
+  ToolkitTestApplication application;
+  TextSelectionPopup popup = TextSelectionPopup::New(nullptr);
+  popup.SetProperty(TextSelectionPopup::Property::POPUP_CLIPBOARD_BUTTON_ICON_IMAGE, "POPUP_CLIPBOARD_BUTTON_ICON_IMAGE");
+  popup.SetProperty(TextSelectionPopup::Property::POPUP_CUT_BUTTON_ICON_IMAGE, "POPUP_CUT_BUTTON_ICON_IMAGE");
+  popup.SetProperty(TextSelectionPopup::Property::POPUP_COPY_BUTTON_ICON_IMAGE, "POPUP_COPY_BUTTON_ICON_IMAGE");
+  popup.SetProperty(TextSelectionPopup::Property::POPUP_PASTE_BUTTON_ICON_IMAGE, "POPUP_PASTE_BUTTON_ICON_IMAGE");
+  popup.SetProperty(TextSelectionPopup::Property::POPUP_SELECT_BUTTON_ICON_IMAGE, "POPUP_SELECT_BUTTON_ICON_IMAGE");
+  popup.SetProperty(TextSelectionPopup::Property::POPUP_SELECT_ALL_BUTTON_ICON_IMAGE, "POPUP_SELECT_ALL_BUTTON_ICON_IMAGE");
+
+  DALI_TEST_EQUALS( popup.GetProperty(TextSelectionPopup::Property::POPUP_CLIPBOARD_BUTTON_ICON_IMAGE).Get<std::string>(), "POPUP_CLIPBOARD_BUTTON_ICON_IMAGE", TEST_LOCATION);
+  DALI_TEST_EQUALS( popup.GetProperty(TextSelectionPopup::Property::POPUP_CUT_BUTTON_ICON_IMAGE).Get<std::string>(), "POPUP_CUT_BUTTON_ICON_IMAGE", TEST_LOCATION);
+  DALI_TEST_EQUALS( popup.GetProperty(TextSelectionPopup::Property::POPUP_COPY_BUTTON_ICON_IMAGE).Get<std::string>(), "POPUP_COPY_BUTTON_ICON_IMAGE", TEST_LOCATION);
+  DALI_TEST_EQUALS( popup.GetProperty(TextSelectionPopup::Property::POPUP_PASTE_BUTTON_ICON_IMAGE).Get<std::string>(), "POPUP_PASTE_BUTTON_ICON_IMAGE", TEST_LOCATION);
+  DALI_TEST_EQUALS( popup.GetProperty(TextSelectionPopup::Property::POPUP_SELECT_BUTTON_ICON_IMAGE).Get<std::string>(), "POPUP_SELECT_BUTTON_ICON_IMAGE", TEST_LOCATION);
+  DALI_TEST_EQUALS( popup.GetProperty(TextSelectionPopup::Property::POPUP_SELECT_ALL_BUTTON_ICON_IMAGE).Get<std::string>(), "POPUP_SELECT_ALL_BUTTON_ICON_IMAGE", TEST_LOCATION);
+
+  END_TEST;
+}
index a0151d2..79aec89 100644 (file)
@@ -47,6 +47,7 @@ const char* TEST_NPATCH_FILE_NAME =  TEST_RESOURCE_DIR "/button-up.9.png";
 const char* TEST_SVG_FILE_NAME = TEST_RESOURCE_DIR "/svg1.svg";
 const char* TEST_OBJ_FILE_NAME = TEST_RESOURCE_DIR "/Cube.obj";
 const char* TEST_MTL_FILE_NAME = TEST_RESOURCE_DIR "/ToyRobot-Metal.mtl";
+const char* TEST_VECTOR_IMAGE_FILE_NAME =  TEST_RESOURCE_DIR "/insta_camera.json";
 const char* TEST_RESOURCE_LOCATION = TEST_RESOURCE_DIR "/";
 
 
@@ -139,20 +140,6 @@ bool DaliTestCheckMaps( const Property::Map& fontStyleMapGet, const Property::Ma
   return true;
 }
 
-void PrepareResourceImage( ToolkitTestApplication& application, unsigned int imageWidth, unsigned int imageHeight, Pixel::Format pixelFormat )
-{
-  TestPlatformAbstraction& platform = application.GetPlatform();
-  platform.SetClosestImageSize(Vector2( imageWidth, imageHeight));
-
-  Integration::Bitmap* bitmap = Integration::Bitmap::New( Integration::Bitmap::BITMAP_2D_PACKED_PIXELS, ResourcePolicy::OWNED_RETAIN );
-  Integration::PixelBuffer* pixbuffer = bitmap->GetPackedPixelsProfile()->ReserveBuffer( pixelFormat, imageWidth, imageHeight, imageWidth, imageHeight );
-  unsigned int bytesPerPixel = GetBytesPerPixel(  pixelFormat );
-  unsigned int initialColor = 0xFF;
-  memset( pixbuffer, initialColor, imageHeight*imageWidth*bytesPerPixel);
-
-  Integration::ResourcePointer resourcePtr(bitmap);
-  platform.SetSynchronouslyLoadedResource( resourcePtr );
-}
 } //namespace
 
 void dali_visual_startup(void)
@@ -296,9 +283,12 @@ int UtcDaliVisualSize(void)
   DALI_TEST_EQUALS( naturalSize, Vector2::ZERO, TEST_LOCATION );
 
   // image visual
-  PrepareResourceImage( application, 100u, 200u, Pixel::RGBA8888 );
-  Image image = ResourceImage::New(TEST_IMAGE_FILE_NAME, ImageDimensions(100, 200));
-  Visual::Base imageVisual = factory.CreateVisual( image );
+  map.Clear();
+  map[Toolkit::Visual::Property::TYPE] = Toolkit::Visual::IMAGE;
+  map[Toolkit::ImageVisual::Property::URL] = TEST_IMAGE_FILE_NAME;
+  map[Toolkit::ImageVisual::Property::DESIRED_WIDTH] = 100.0f;
+  map[Toolkit::ImageVisual::Property::DESIRED_HEIGHT] = 200.0f;
+  Visual::Base imageVisual = factory.CreateVisual( map );
   imageVisual.SetTransformAndSize(DefaultTransform(), controlSize );
 
   imageVisual.GetNaturalSize(naturalSize);
@@ -843,52 +833,6 @@ int UtcDaliVisualGetPropertyMap5(void)
   DALI_TEST_CHECK( value );
   DALI_TEST_CHECK( value->Get<bool>() == true );
 
-  // Get an image visual with an image handle, and test the default property values
-  PrepareResourceImage( application, 100u, 200u, Pixel::RGBA8888 );
-  Image image = ResourceImage::New(TEST_IMAGE_FILE_NAME, ImageDimensions(100, 200));
-  imageVisual = factory.CreateVisual(image);
-  imageVisual.CreatePropertyMap( resultMap );
-
-  value = resultMap.Find( Toolkit::Visual::Property::TYPE,  Property::INTEGER );
-  DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<int>() == Visual::IMAGE );
-
-  value = resultMap.Find( ImageVisual::Property::URL,  Property::STRING );
-  DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<std::string>() == TEST_IMAGE_FILE_NAME );
-
-  value = resultMap.Find( ImageVisual::Property::FITTING_MODE,   Property::INTEGER );
-  DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<int>() == FittingMode::DEFAULT );
-
-  value = resultMap.Find( ImageVisual::Property::SAMPLING_MODE,   Property::INTEGER );
-  DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<int>() == SamplingMode::BOX );
-
-  value = resultMap.Find( ImageVisual::Property::DESIRED_WIDTH,   Property::INTEGER );
-  DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<int>() == 100 );
-
-  value = resultMap.Find( ImageVisual::Property::DESIRED_HEIGHT,   Property::INTEGER );
-  DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<int>() == 200 );
-
-  value = resultMap.Find( ImageVisual::Property::PIXEL_AREA, Property::VECTOR4 );
-  DALI_TEST_CHECK( value );
-  DALI_TEST_EQUALS( value->Get<Vector4>(), Vector4( 0.f, 0.f, 1.f, 1.f ), Math::MACHINE_EPSILON_100, TEST_LOCATION );
-
-  value = resultMap.Find( ImageVisual::Property::WRAP_MODE_U, Property::INTEGER );
-  DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK(  value->Get<int>() == WrapMode::DEFAULT);
-
-  value = resultMap.Find( ImageVisual::Property::WRAP_MODE_V, Property::INTEGER );
-  DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK(  value->Get<int>() == WrapMode::DEFAULT);
-
-  value = resultMap.Find( "synchronousLoading",   Property::BOOLEAN );
-  DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<bool>() == false );
-
   END_TEST;
 }
 
@@ -2979,20 +2923,6 @@ int UtcDaliVisualSetTransform4(void)
 int UtcDaliVisualSetTransform5(void)
 {
   ToolkitTestApplication application;
-  tet_infoline( "UtcDaliVisualSetTransform: ImageVisual from Image" );
-
-  VisualFactory factory = VisualFactory::Get();
-  Image image = ResourceImage::New(TEST_IMAGE_FILE_NAME, ImageDimensions(100, 200));
-  Visual::Base visual = factory.CreateVisual(image);
-  TestTransform( application, visual );
-  TestMixColor( visual, Visual::Property::MIX_COLOR, Color::WHITE );
-
-  END_TEST;
-}
-
-int UtcDaliVisualSetTransform6(void)
-{
-  ToolkitTestApplication application;
   tet_infoline( "UtcDaliVisualSetTransform: ImageVisual for URL " );
 
   VisualFactory factory = VisualFactory::Get();
@@ -3012,7 +2942,7 @@ int UtcDaliVisualSetTransform6(void)
   END_TEST;
 }
 
-int UtcDaliVisualSetTransform7(void)
+int UtcDaliVisualSetTransform6(void)
 {
   ToolkitTestApplication application;
   tet_infoline( "UtcDaliVisualSetTransform: NPatch visual" );
@@ -3772,3 +3702,139 @@ int UtcDaliColorVisualBlurRadius(void)
 
   END_TEST;
 }
+
+int UtcDaliVisualGetType(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline( "UtcDaliVisualGetType" );
+
+  VisualFactory factory = VisualFactory::Get();
+
+  {
+    Property::Map properties;
+    properties[Visual::Property::TYPE] = Visual::BORDER;
+    Visual::Base visual = factory.CreateVisual( properties );
+
+    DALI_TEST_CHECK( visual.GetType() == Visual::BORDER );
+  }
+
+  {
+    Property::Map properties;
+    properties[Visual::Property::TYPE] = Visual::COLOR;
+    Visual::Base visual = factory.CreateVisual( properties );
+
+    DALI_TEST_CHECK( visual.GetType() == Visual::COLOR );
+  }
+
+  {
+    Property::Map properties;
+    properties[Visual::Property::TYPE] = Visual::GRADIENT;
+    properties[GradientVisual::Property::START_POSITION] = Vector2( -1.f, -1.f );
+    properties[GradientVisual::Property::END_POSITION] = Vector2( 1.f, 1.f );
+    properties[GradientVisual::Property::STOP_OFFSET] = Vector2(0.f, 1.f);
+    // propertyMap.Insert( GradientVisual::Property::SPREAD_METHOD, GradientVisual::SpreadMethod::REPEAT) ;
+    Property::Array stopColors;
+    stopColors.PushBack( Color::RED );
+    stopColors.PushBack( Color::GREEN );
+    properties[GradientVisual::Property::STOP_COLOR] = stopColors;
+    Visual::Base visual = factory.CreateVisual( properties );
+
+    DALI_TEST_CHECK( visual.GetType() == Visual::GRADIENT );
+  }
+
+  {
+    Property::Map properties;
+    properties[Visual::Property::TYPE] = Visual::IMAGE;
+    properties.Insert( ImageVisual::Property::URL,  TEST_IMAGE_FILE_NAME );
+    Visual::Base visual = factory.CreateVisual( properties );
+
+    DALI_TEST_CHECK( visual.GetType() == Visual::IMAGE );
+  }
+
+  {
+    Property::Map properties;
+    properties[Visual::Property::TYPE] = Visual::MESH;
+    Visual::Base visual = factory.CreateVisual( properties );
+
+    DALI_TEST_CHECK( visual.GetType() == Visual::MESH );
+  }
+
+  {
+    Property::Map properties;
+    properties[Visual::Property::TYPE] = Visual::PRIMITIVE;
+    properties[PrimitiveVisual::Property::SHAPE] = PrimitiveVisual::Shape::CUBE;
+    Visual::Base visual = factory.CreateVisual( properties );
+
+    DALI_TEST_CHECK( visual.GetType() == Visual::PRIMITIVE );
+  }
+
+  {
+    Property::Map properties;
+    properties[Visual::Property::TYPE] = Visual::WIREFRAME;
+    Visual::Base visual = factory.CreateVisual( properties );
+
+    DALI_TEST_CHECK( visual.GetType() == Visual::WIREFRAME );
+  }
+
+  {
+    Property::Map properties;
+    properties[Visual::Property::TYPE] = Visual::TEXT;
+    Visual::Base visual = factory.CreateVisual( properties );
+
+    DALI_TEST_CHECK( visual.GetType() == Visual::TEXT );
+  }
+
+  {
+    Property::Map properties;
+    properties[Visual::Property::TYPE] = Visual::N_PATCH;
+    properties[ImageVisual::Property::URL] =  TEST_NPATCH_FILE_NAME;
+    Visual::Base visual = factory.CreateVisual( properties );
+
+    DALI_TEST_CHECK( visual.GetType() == Visual::N_PATCH );
+  }
+
+  {
+    Property::Map properties;
+    properties[Visual::Property::TYPE] = Visual::SVG;
+    properties[ImageVisual::Property::URL] = TEST_SVG_FILE_NAME;
+    Visual::Base visual = factory.CreateVisual( properties );
+
+    DALI_TEST_CHECK( visual.GetType() == Visual::SVG );
+  }
+
+  {
+    Property::Map properties;
+    properties[Visual::Property::TYPE] = Visual::ANIMATED_IMAGE;
+    properties[ImageVisual::Property::URL] = TEST_GIF_FILE_NAME;
+    Visual::Base visual = factory.CreateVisual( properties );
+
+    DALI_TEST_CHECK( visual.GetType() == Visual::ANIMATED_IMAGE );
+  }
+
+  {
+    Property::Map properties;
+    properties[Visual::Property::TYPE] = DevelVisual::ANIMATED_GRADIENT;
+    Visual::Base visual = factory.CreateVisual( properties );
+
+    DALI_TEST_CHECK( visual.GetType() == static_cast<Visual::Type>( DevelVisual::ANIMATED_GRADIENT ) );
+  }
+
+  {
+    Property::Map properties;
+    properties[Visual::Property::TYPE] = DevelVisual::ANIMATED_VECTOR_IMAGE;
+    properties[ImageVisual::Property::URL] = TEST_VECTOR_IMAGE_FILE_NAME;
+    Visual::Base visual = factory.CreateVisual( properties );
+
+    DALI_TEST_CHECK( visual.GetType() == static_cast<Visual::Type>( DevelVisual::ANIMATED_VECTOR_IMAGE ) );
+  }
+
+  {
+    Property::Map properties;
+    properties[Visual::Property::TYPE] = DevelVisual::ARC;
+    Visual::Base visual = factory.CreateVisual( properties );
+
+    DALI_TEST_CHECK( visual.GetType() == static_cast<Visual::Type>( DevelVisual::ARC ) );
+  }
+
+  END_TEST;
+}
index 7c40be4..e7f460d 100755 (executable)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_UIBUILDER_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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,6 @@
 #include <dali/public-api/animation/animation.h>
 #include <dali/public-api/animation/linear-constrainer.h>
 #include <dali/devel-api/animation/path-constrainer.h>
-#include <dali/public-api/images/frame-buffer-image.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/dali-toolkit-common.h>
index 04e8205..fcc563e 100755 (executable)
@@ -53,8 +53,6 @@ namespace Property
 enum
 {
   STYLE_NAME            = Control::Property::STYLE_NAME,
-  RESERVED_PROPERTY_01  = Control::Property::RESERVED_PROPERTY_01,
-  RESERVED_PROPERTY_02  = Control::Property::RESERVED_PROPERTY_02,
   KEY_INPUT_FOCUS       = Control::Property::KEY_INPUT_FOCUS,
   BACKGROUND            = Control::Property::BACKGROUND,
   MARGIN                = Control::Property::MARGIN,
index 1a3d1a0..6ced5a9 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_EFFECTS_VIEW_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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 @@
  */
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/images/frame-buffer-image.h>
+#include <dali/public-api/images/pixel.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control.h>
diff --git a/dali-toolkit/devel-api/controls/progress-bar/progress-bar-devel.cpp b/dali-toolkit/devel-api/controls/progress-bar/progress-bar-devel.cpp
new file mode 100644 (file)
index 0000000..f3951aa
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2020 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/internal/controls/progress-bar/progress-bar-impl.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace DevelProgressBar
+{
+
+Toolkit::ProgressBar New( Style progressBarStyle )
+{
+  return Internal::ProgressBar::New( progressBarStyle );
+}
+
+} // namespace DevelProgressBar
+
+} // namespace Toolkit
+
+} // namespace Dali
diff --git a/dali-toolkit/devel-api/controls/progress-bar/progress-bar-devel.h b/dali-toolkit/devel-api/controls/progress-bar/progress-bar-devel.h
new file mode 100644 (file)
index 0000000..b9a04d4
--- /dev/null
@@ -0,0 +1,62 @@
+#ifndef DALI_TOOLKIT_PROGRESS_BAR_DEVEL_H
+#define DALI_TOOLKIT_PROGRESS_BAR_DEVEL_H
+
+/*
+ * Copyright (c) 2020 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/controls/progress-bar/progress-bar.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace DevelProgressBar
+{
+
+/**
+ * @brief Enumeration for the style of progress bar.
+ */
+enum class Style
+{
+  /**
+   * @brief Indicates a linear shape of progress bar.
+   */
+  LINEAR,
+
+  /**
+   * @brief Indicates a circular shape of progress bar.
+   */
+  CIRCULAR,
+};
+
+/**
+ * @brief Creates a new ProgressBar with predefined style.
+ * @param[in] progressBarStyle A style value that determines the visual properties for ProgressBar.
+ * @return A handle to the ProgressBar control.
+ */
+DALI_TOOLKIT_API Toolkit::ProgressBar New( Style progressBarStyle );
+
+} // namespace DevelProgressBar
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif // DALI_TOOLKIT_PROGRESS_BAR_DEVEL_H
index 042841f..75fa4ef 100755 (executable)
@@ -49,8 +49,6 @@ namespace Property
       VERTICAL_ALIGNMENT = Dali::Toolkit::TextField::Property::VERTICAL_ALIGNMENT,
       TEXT_COLOR = Dali::Toolkit::TextField::Property::TEXT_COLOR,
       PLACEHOLDER_TEXT_COLOR = Dali::Toolkit::TextField::Property::PLACEHOLDER_TEXT_COLOR,
-      RESERVED_PROPERTY_01 = Dali::Toolkit::TextField::Property::RESERVED_PROPERTY_01,
-      RESERVED_PROPERTY_02 = Dali::Toolkit::TextField::Property::RESERVED_PROPERTY_02,
       PRIMARY_CURSOR_COLOR = Dali::Toolkit::TextField::Property::PRIMARY_CURSOR_COLOR,
       SECONDARY_CURSOR_COLOR = Dali::Toolkit::TextField::Property::SECONDARY_CURSOR_COLOR,
       ENABLE_CURSOR_BLINK = Dali::Toolkit::TextField::Property::ENABLE_CURSOR_BLINK,
index 9190441..c6bdd17 100755 (executable)
@@ -42,12 +42,6 @@ namespace Property
     MULTI_LINE = Dali::Toolkit::TextLabel::Property::MULTI_LINE,
     HORIZONTAL_ALIGNMENT = Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT,
     VERTICAL_ALIGNMENT = Dali::Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT,
-    UNUSED_PROPERTY_TEXT_COLOR = Dali::Toolkit::TextLabel::Property::UNUSED_PROPERTY_TEXT_COLOR,
-    RESERVED_PROPERTY_01 = Dali::Toolkit::TextLabel::Property::RESERVED_PROPERTY_01,
-    RESERVED_PROPERTY_02 = Dali::Toolkit::TextLabel::Property::RESERVED_PROPERTY_02,
-    RESERVED_PROPERTY_03 = Dali::Toolkit::TextLabel::Property::RESERVED_PROPERTY_03,
-    RESERVED_PROPERTY_04 = Dali::Toolkit::TextLabel::Property::RESERVED_PROPERTY_04,
-    RESERVED_PROPERTY_05 = Dali::Toolkit::TextLabel::Property::RESERVED_PROPERTY_05,
     ENABLE_MARKUP = Dali::Toolkit::TextLabel::Property::ENABLE_MARKUP,
     ENABLE_AUTO_SCROLL = Dali::Toolkit::TextLabel::Property::ENABLE_AUTO_SCROLL,
     AUTO_SCROLL_SPEED = Dali::Toolkit::TextLabel::Property::AUTO_SCROLL_SPEED,
index 219fb28..5eb6d82 100755 (executable)
@@ -22,6 +22,7 @@ SET( devel_api_src_files
   ${devel_api_src_dir}/controls/page-turn-view/page-turn-view.cpp
   ${devel_api_src_dir}/controls/popup/confirmation-popup.cpp
   ${devel_api_src_dir}/controls/popup/popup.cpp
+  ${devel_api_src_dir}/controls/progress-bar/progress-bar-devel.cpp
   ${devel_api_src_dir}/controls/scene3d-view/scene3d-view.cpp
   ${devel_api_src_dir}/controls/shadow-view/shadow-view.cpp
   ${devel_api_src_dir}/controls/super-blur-view/super-blur-view.cpp
@@ -115,6 +116,10 @@ SET( devel_api_popup_header_files
   ${devel_api_src_dir}/controls/popup/popup.h
 )
 
+SET( devel_api_progress_bar_header_files
+  ${devel_api_src_dir}/controls/progress-bar/progress-bar-devel.h
+)
+
 SET( devel_api_visual_factory_header_files
   ${devel_api_src_dir}/visual-factory/transition-data.h
   ${devel_api_src_dir}/visual-factory/visual-factory.h
@@ -126,6 +131,7 @@ SET( devel_api_visuals_header_files
   ${devel_api_src_dir}/visuals/animated-image-visual-actions-devel.h
   ${devel_api_src_dir}/visuals/animated-vector-image-visual-actions-devel.h
   ${devel_api_src_dir}/visuals/animated-vector-image-visual-signals-devel.h
+  ${devel_api_src_dir}/visuals/arc-visual-actions-devel.h
   ${devel_api_src_dir}/visuals/arc-visual-properties-devel.h
   ${devel_api_src_dir}/visuals/color-visual-properties-devel.h
   ${devel_api_src_dir}/visuals/image-visual-properties-devel.h
@@ -234,6 +240,7 @@ SET( DEVEL_API_HEADERS ${DEVEL_API_HEADERS}
   ${devel_api_navigation_view_header_files}
   ${devel_api_page_turn_view_header_files}
   ${devel_api_popup_header_files}
+  ${devel_api_progress_bar_header_files}
   ${devel_api_visual_factory_header_files}
   ${devel_api_visuals_header_files}
   ${devel_api_scene3d_view_header_files}
index 7b20c60..c0c6d2b 100644 (file)
@@ -96,6 +96,11 @@ void Visual::Base::CreatePropertyMap( Dali::Property::Map& map ) const
   GetImplementation( *this ).CreatePropertyMap( map );
 }
 
+Visual::Type Visual::Base::GetType() const
+{
+  return GetImplementation( *this ).GetType();
+}
+
 
 
 
index 94db5c4..0d6fd9e 100755 (executable)
@@ -23,6 +23,7 @@
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/dali-toolkit-common.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
 
 namespace Dali
 {
@@ -190,6 +191,13 @@ public:
    */
   void CreatePropertyMap( Dali::Property::Map& map ) const;
 
+  /**
+   * @brief Get the type of this visual.
+   *
+   * @return The the type of this visual.
+   */
+  Visual::Type GetType() const;
+
 public: // Not intended for application developers
 
   explicit DALI_INTERNAL Base(Internal::Visual::Base *impl);
index b24adbb..46cbbac 100644 (file)
@@ -1,5 +1,5 @@
  /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -99,11 +99,6 @@ Visual::Base VisualFactory::CreateVisual( const Property::Map& propertyMap )
   return GetImplementation( *this ).CreateVisual( propertyMap );
 }
 
-Visual::Base VisualFactory::CreateVisual( const Image& image )
-{
-  return GetImplementation( *this ).CreateVisual( image );
-}
-
 Visual::Base VisualFactory::CreateVisual( const std::string& url, ImageDimensions size )
 {
   return GetImplementation( *this ).CreateVisual( url, size );
index 0a86754..26f6df3 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_VISUAL_FACTORY_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -101,14 +101,6 @@ public:
   Visual::Base CreateVisual( const Property::Map& propertyMap  );
 
   /**
-   * @brief Request the visual to render the image.
-   *
-   * @param[in] image The image to be rendered.
-   * @return The pointer pointing to the visual
-   */
-  Visual::Base CreateVisual( const Image& image );
-
-  /**
    * @brief Request the visual to render the given resource at the url.
    *
    * @param[in] url The URL to the resource to be rendered.
diff --git a/dali-toolkit/devel-api/visuals/arc-visual-actions-devel.h b/dali-toolkit/devel-api/visuals/arc-visual-actions-devel.h
new file mode 100644 (file)
index 0000000..306821c
--- /dev/null
@@ -0,0 +1,55 @@
+#ifndef DALI_TOOLKIT_DEVEL_API_VISUALS_ARC_VISUAL_ACTIONS_DEVEL_H
+#define DALI_TOOLKIT_DEVEL_API_VISUALS_ARC_VISUAL_ACTIONS_DEVEL_H
+
+/*
+ * Copyright (c) 2020 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
+{
+
+namespace DevelArcVisual
+{
+
+/**
+ * @brief Actions that the arc visual can perform.  These actions are called through the Visual::Base::DoAction API.
+ */
+namespace Action
+{
+/**
+ * @brief The available actions for this visual
+ */
+enum Type
+{
+  /**
+   * @brief Update the properties of the visual.
+   * @note DevelArcVisual::Property::THICKNESS, DevelArcVisual::Property::START_ANGLE and DevelArcVisual::Property::SWEEP_ANGLE can be updated.
+   */
+  UPDATE_PROPERTY = 0
+};
+
+} // namespace Actions
+
+} // namespace DevelArcVisual
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif // DALI_TOOLKIT_DEVEL_API_VISUALS_ARC_VISUAL_ACTIONS_DEVEL_H
index deafb53..6b4433d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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,6 @@
 #include <dali/devel-api/adaptor-framework/sound-player.h>
 #include <dali/public-api/animation/constraints.h>
 #include <dali/devel-api/events/hit-test-algorithm.h>
-#include <dali/public-api/images/resource-image.h>
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
@@ -165,7 +164,7 @@ void AccessibilityManager::SetAccessibilityAttribute(Actor actor, Toolkit::Acces
 {
   if(actor)
   {
-    unsigned int actorID = actor.GetId();
+    unsigned int actorID = actor.GetProperty< int >( Actor::Property::ID );
 
     ActorAdditionalInfo info = GetActorAdditionalInfo(actorID);
     info.mAccessibilityAttributes[type] = text;
@@ -181,7 +180,7 @@ std::string AccessibilityManager::GetAccessibilityAttribute(Actor actor, Toolkit
 
   if(actor)
   {
-    ActorAdditionalInfo data = GetActorAdditionalInfo(actor.GetId());
+    ActorAdditionalInfo data = GetActorAdditionalInfo(actor.GetProperty< int >( Actor::Property::ID ));
     text = data.mAccessibilityAttributes[type];
   }
 
@@ -243,11 +242,11 @@ void AccessibilityManager::SetFocusOrder(Actor actor, const unsigned int order)
       actor.SetProperty(propertyActorFocusable, true);
 
       // Now we insert the actor into the focus chain with the specified focus order
-      mFocusIDContainer.insert(FocusIDPair(order, actor.GetId()));
+      mFocusIDContainer.insert(FocusIDPair(order, actor.GetProperty< int >( Actor::Property::ID )));
     }
 
     // Update the actor's focus order in its additional data
-    SynchronizeActorAdditionalInfo(actor.GetId(), order);
+    SynchronizeActorAdditionalInfo(actor.GetProperty< int >( Actor::Property::ID ), order);
   }
 }
 
@@ -257,7 +256,7 @@ unsigned int AccessibilityManager::GetFocusOrder(Actor actor) const
 
   if(actor)
   {
-    ActorAdditionalInfo data = GetActorAdditionalInfo(actor.GetId());
+    ActorAdditionalInfo data = GetActorAdditionalInfo(actor.GetProperty< int >( Actor::Property::ID ));
     focusOrder = data.mFocusOrder;
   }
 
@@ -295,7 +294,7 @@ bool AccessibilityManager::SetCurrentFocusActor(Actor actor)
 {
   if(actor)
   {
-    return DoSetCurrentFocusActor(actor.GetId());
+    return DoSetCurrentFocusActor(actor.GetProperty< int >( Actor::Property::ID ));
   }
 
   return false;
index 5165a09..86fb2f6 100644 (file)
@@ -985,13 +985,13 @@ BaseHandle Builder::DoCreate( const TreeNode& root, const TreeNode& node,
 
       if(actor)
       {
-        DALI_SCRIPT_VERBOSE("  Is Actor id=%d\n", actor.GetId());
+        DALI_SCRIPT_VERBOSE("  Is Actor id=%d\n", actor.GetProperty< int >( Actor::Property::ID ));
       }
 
       Toolkit::Control control  = Toolkit::Control::DownCast(handle);
       if(control)
       {
-        DALI_SCRIPT_VERBOSE("  Is Control id=%d\n", actor.GetId());
+        DALI_SCRIPT_VERBOSE("  Is Control id=%d\n", actor.GetProperty< int >( Actor::Property::ID ));
       }
 #endif // DEBUG_ENABLED
 
index 1af6848..0305e8a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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,6 @@
 #include <dali/devel-api/scripting/enum-helper.h>
 #include <dali/integration-api/debug.h>
 #include <dali/public-api/events/touch-data.h>
-#include <dali/public-api/images/resource-image.h>
 #include <dali/public-api/object/type-registry.h>
 #include <dali/public-api/object/type-registry-helper.h>
 #include <dali/public-api/size-negotiation/relayout-container.h>
@@ -289,7 +288,7 @@ void Button::ChangeState( State requestedState )
   mPreviousButtonState = mButtonState; // Store previous state for visual removal (used when animations ended)
   mButtonState = requestedState; // Update current state
 
-  if ( Self().OnStage() )
+  if ( Self().GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
   {
     OnStateChange( mButtonState ); // Notify derived buttons
     SelectRequiredVisual( VISUAL_INDEX_FOR_STATE[ mButtonState ][ BACKGROUND ] );
@@ -619,7 +618,7 @@ void Button::OnInitialize()
   mTapDetector.Attach( self );
   mTapDetector.DetectedSignal().Connect(this, &Button::OnTap);
 
-  self.SetKeyboardFocusable( true );
+  self.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
 
   self.TouchSignal().Connect( this, &Button::OnTouch );
 }
index 9554ccb..00a99bf 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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,7 +21,6 @@
 // EXTERNAL INCLUDES
 #include <dali/integration-api/debug.h>
 #include <dali/public-api/object/type-registry.h>
-#include <dali/public-api/images/resource-image.h>
 
 //INTERNAL INCLUDES
 #include <dali-toolkit/internal/controls/image-view/image-view-impl.h>
index 612d010..394f127 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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,7 +21,6 @@
 // EXTERNAL INCLUDES
 #include <dali/public-api/object/type-registry.h>
 #include <dali/public-api/object/type-registry-helper.h>
-#include <dali/public-api/images/resource-image.h>
 #include <dali/devel-api/scripting/scripting.h>
 #include <dali/integration-api/debug.h>
 
index bbd151a..5389a22 100644 (file)
@@ -22,7 +22,6 @@
 // EXTERNAL INCLUDES
 #include <dali/integration-api/debug.h>
 #include <dali/public-api/object/type-registry.h>
-#include <dali/public-api/images/resource-image.h>
 
 #if defined(DEBUG_ENABLED)
   extern Debug::Filter* gLogButtonFilter;
index dca592a..e6c0ab7 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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,7 +21,6 @@
 // EXTERNAL INCLUDES
 #include <dali/public-api/object/type-registry.h>
 #include <dali/public-api/object/type-registry-helper.h>
-#include <dali/public-api/images/resource-image.h>
 #include <dali/devel-api/scripting/scripting.h>
 #include <dali/public-api/object/property-array.h>
 #include <dali/integration-api/debug.h>
index eb6285a..6c5de97 100755 (executable)
@@ -298,8 +298,6 @@ void SetVisualsOffStage( const RegisteredVisualContainer& container, Actor paren
 
 // Properties registered without macro to use specific member variables.
 const PropertyRegistration Control::Impl::PROPERTY_1( typeRegistration, "styleName",              Toolkit::Control::Property::STYLE_NAME,                   Property::STRING,  &Control::Impl::SetProperty, &Control::Impl::GetProperty );
-const PropertyRegistration Control::Impl::PROPERTY_2( typeRegistration, "reservedProperty01",     Toolkit::Control::Property::RESERVED_PROPERTY_01,         Property::VECTOR4, &Control::Impl::SetProperty, &Control::Impl::GetProperty );
-const PropertyRegistration Control::Impl::PROPERTY_3( typeRegistration, "reservedProperty02",     Toolkit::Control::Property::RESERVED_PROPERTY_02,         Property::MAP,     &Control::Impl::SetProperty, &Control::Impl::GetProperty );
 const PropertyRegistration Control::Impl::PROPERTY_4( typeRegistration, "keyInputFocus",          Toolkit::Control::Property::KEY_INPUT_FOCUS,              Property::BOOLEAN, &Control::Impl::SetProperty, &Control::Impl::GetProperty );
 const PropertyRegistration Control::Impl::PROPERTY_5( typeRegistration, "background",             Toolkit::Control::Property::BACKGROUND,                   Property::MAP,     &Control::Impl::SetProperty, &Control::Impl::GetProperty );
 const PropertyRegistration Control::Impl::PROPERTY_6( typeRegistration, "margin",                 Toolkit::Control::Property::MARGIN,                       Property::EXTENTS, &Control::Impl::SetProperty, &Control::Impl::GetProperty );
@@ -434,7 +432,7 @@ void Control::Impl::RegisterVisual( Property::Index index, Toolkit::Visual::Base
         StopObservingVisual( currentRegisteredVisual );
 
         // If control staged and visual enabled then visuals will be swapped once ready
-        if(  self.OnStage() && enabled )
+        if(  self.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) && enabled )
         {
           // Check if visual is currently in the process of being replaced ( is in removal container )
           RegisteredVisualContainer::Iterator visualQueuedForRemoval;
@@ -524,7 +522,7 @@ void Control::Impl::RegisterVisual( Property::Index index, Toolkit::Visual::Base
 
     Internal::Visual::Base& visualImpl = Toolkit::GetImplementation( visual );
     // Put on stage if enabled and the control is already on the stage
-    if( ( enabled == VisualState::ENABLED ) && self.OnStage() )
+    if( ( enabled == VisualState::ENABLED ) && self.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
     {
       visualImpl.SetOnStage( self );
     }
@@ -588,7 +586,7 @@ void Control::Impl::EnableVisual( Property::Index index, bool enable )
 
     (*iter)->enabled = enable;
     Actor parentActor = mControlImpl.Self();
-    if ( mControlImpl.Self().OnStage() ) // If control not on Stage then Visual will be added when StageConnection is called.
+    if ( mControlImpl.Self().GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) ) // If control not on Stage then Visual will be added when StageConnection is called.
     {
       if ( enable )
       {
@@ -664,7 +662,7 @@ void Control::Impl::ResourceReady( Visual::Base& object)
   }
 
   // A visual is ready so control may need relayouting if staged
-  if ( self.OnStage() )
+  if ( self.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
   {
     mControlImpl.RelayoutRequest();
   }
index 8afaa03..bcb69ac 100644 (file)
@@ -292,7 +292,7 @@ std::string DumpControl( const Internal::Control& control )
   {
     oss << "\"name\":\"" << name << "\",\n";
   }
-  oss << "\"id\":\"" << control.Self().GetId() << "\",\n";
+  oss << "\"id\":\"" << control.Self().GetProperty< int >( Actor::Property::ID ) << "\",\n";
   oss << "\"registeredVisuals\":\n" << controlData.mVisuals << ",\n";
   oss << "\"removeVisuals\":\n" << controlData.mRemoveVisuals << ",\n";
   oss << "\"rendererCount\":" << control.Self().GetRendererCount() << ",\n";
@@ -311,7 +311,7 @@ std::string DumpActor( Actor actor )
   {
     oss << "\"name\":\"" << name << "\",\n";
   }
-  oss << "\"id\":\"" << actor.GetId() << "\",\n";
+  oss << "\"id\":\"" << actor.GetProperty< int >( Actor::Property::ID ) << "\",\n";
   oss << "\"rendererCount\":" << actor.GetRendererCount() << ",\n";
   oss << "\"properties\":\n{\n";
   Toolkit::Internal::DumpProperties( oss, actor ) << "}\n";
index 5eb3c6f..0fc7588 100755 (executable)
@@ -515,7 +515,7 @@ void FlexContainer::OnRelayout( const Vector2& size, RelayoutContainer& containe
     if( child )
     {
       // Anchor actor to top left of the container
-      if( child.GetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT ).Get< bool >() )
+      if( child.GetProperty( Actor::Property::POSITION_USES_ANCHOR_POINT ).Get< bool >() )
       {
         child.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
       }
@@ -760,7 +760,7 @@ Actor FlexContainer::GetNextKeyboardFocusableActor(Actor currentFocusedActor, To
               {
                 break;
               }
-            } while ( !mChildrenNodes[nextFocusedActorIndex].actor.GetHandle().IsKeyboardFocusable() );
+            } while ( !mChildrenNodes[nextFocusedActorIndex].actor.GetHandle().GetProperty< bool >( Actor::Property::KEYBOARD_FOCUSABLE ) );
             break;
           }
           case Toolkit::Control::KeyboardFocus::RIGHT:
@@ -782,7 +782,7 @@ Actor FlexContainer::GetNextKeyboardFocusableActor(Actor currentFocusedActor, To
               {
                 break;
               }
-            } while ( !mChildrenNodes[nextFocusedActorIndex].actor.GetHandle().IsKeyboardFocusable() );
+            } while ( !mChildrenNodes[nextFocusedActorIndex].actor.GetHandle().GetProperty< bool >( Actor::Property::KEYBOARD_FOCUSABLE ) );
             break;
           }
           default:
@@ -842,7 +842,7 @@ void FlexContainer::OnInitialize()
   YGNodeStyleSetAlignContent( mRootNode.node, static_cast<YGAlign>( mAlignContent ) );
 
   // Make self as keyboard focusable and focus group
-  self.SetKeyboardFocusable( true );
+  self.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
   SetAsKeyboardFocusGroup( true );
 }
 
index b78f110..d113df9 100644 (file)
@@ -295,7 +295,7 @@ void GaussianBlurView::OnInitialize()
   {
     mCompositingActor = Actor::New();
     mCompositingActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER );
-    mCompositingActor.SetProperty( DevelActor::Property::OPACITY,GAUSSIAN_BLUR_VIEW_DEFAULT_BLUR_STRENGTH); // ensure alpha is enabled for this object and set default value
+    mCompositingActor.SetProperty( Actor::Property::OPACITY,GAUSSIAN_BLUR_VIEW_DEFAULT_BLUR_STRENGTH); // ensure alpha is enabled for this object and set default value
     renderer = CreateRenderer( BASIC_VERTEX_SOURCE, BASIC_FRAGMENT_SOURCE );
     mCompositingActor.AddRenderer( renderer );
 
index 28cbfff..7f92138 100755 (executable)
@@ -19,7 +19,6 @@
 #include "image-view-impl.h"
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/images/resource-image.h>
 #include <dali/public-api/object/type-registry.h>
 #include <dali/public-api/object/type-registry-helper.h>
 #include <dali/devel-api/scripting/scripting.h>
@@ -54,7 +53,6 @@ BaseHandle Create()
 
 // Setup properties, signals and actions using the type-registry.
 DALI_TYPE_REGISTRATION_BEGIN( Toolkit::ImageView, Toolkit::Control, Create );
-DALI_PROPERTY_REGISTRATION( Toolkit, ImageView, "reservedProperty01", STRING, RESERVED_PROPERTY_01 )
 DALI_PROPERTY_REGISTRATION( Toolkit, ImageView, "image", MAP, IMAGE )
 DALI_PROPERTY_REGISTRATION( Toolkit, ImageView, "preMultipliedAlpha", BOOLEAN, PRE_MULTIPLIED_ALPHA )
 
@@ -99,47 +97,11 @@ void ImageView::OnInitialize()
   handle.ResourceReadySignal().Connect( this, &ImageView::OnResourceReady );
 }
 
-void ImageView::SetImage( Image image )
-{
-  // Don't bother comparing if we had a visual previously, just drop old visual and create new one
-  mImage = image;
-  mUrl.clear();
-  mPropertyMap.Clear();
-
-  Toolkit::Visual::Base visual =  Toolkit::VisualFactory::Get().CreateVisual( image );
-  if( visual )
-  {
-    if( !mVisual )
-    {
-      mVisual = visual;
-    }
-
-    if( !mShaderMap.Empty() )
-    {
-      Internal::Visual::Base& visualImpl = Toolkit::GetImplementation( visual );
-      visualImpl.SetCustomShader( mShaderMap );
-    }
-
-    DevelControl::RegisterVisual( *this, Toolkit::ImageView::Property::IMAGE, visual );
-  }
-  else
-  {
-    // Unregister the existing visual
-    DevelControl::UnregisterVisual( *this, Toolkit::ImageView::Property::IMAGE );
-
-    // Trigger a size negotiation request that may be needed when unregistering a visual.
-    RelayoutRequest();
-  }
-
-  // Signal that a Relayout may be needed
-}
-
 void ImageView::SetImage( const Property::Map& map )
 {
   // Comparing a property map is too expensive so just creating a new visual
   mPropertyMap = map;
   mUrl.clear();
-  mImage.Reset();
 
   Toolkit::Visual::Base visual =  Toolkit::VisualFactory::Get().CreateVisual( mPropertyMap );
   if( visual )
@@ -175,7 +137,6 @@ void ImageView::SetImage( const std::string& url, ImageDimensions size )
   // Don't bother comparing if we had a visual previously, just drop old visual and create new one
   mUrl = url;
   mImageSize = size;
-  mImage.Reset();
   mPropertyMap.Clear();
 
   // Don't set mVisual until it is ready and shown. Getters will still use current visual.
@@ -207,11 +168,6 @@ void ImageView::SetImage( const std::string& url, ImageDimensions size )
   // Signal that a Relayout may be needed
 }
 
-Image ImageView::GetImage() const
-{
-  return mImage;
-}
-
 void ImageView::EnablePreMultipliedAlpha( bool preMultipled )
 {
   if( mVisual )
@@ -316,11 +272,12 @@ void ImageView::OnRelayout( const Vector2& size, RelayoutContainer& container )
     mVisual.SetTransformAndSize( transformMap, size );
 
     // mVisual is not updated util the resource is ready in the case of visual replacement.
-    // So apply the transform and size to the new visual.
+    // in this case, the Property Map must be initialized so that the previous value is not reused.
+    // after mVisual is updated, the correct value will be reset.
     Toolkit::Visual::Base visual = DevelControl::GetVisual( *this, Toolkit::ImageView::Property::IMAGE );
     if( visual && visual != mVisual )
     {
-      visual.SetTransformAndSize( transformMap, size );
+      visual.SetTransformAndSize( Property::Map(), size );
     }
   }
 }
@@ -504,10 +461,6 @@ void ImageView::SetProperty( BaseObject* object, Property::Index index, const Pr
                 {
                   impl.SetImage( impl.mUrl, impl.mImageSize );
                 }
-                else if( impl.mImage )
-                {
-                  impl.SetImage( impl.mImage );
-                }
                 else if( !impl.mPropertyMap.Empty() )
                 {
                   impl.SetImage( impl.mPropertyMap );
@@ -549,12 +502,6 @@ Property::Value ImageView::GetProperty( BaseObject* object, Property::Index prop
         {
           value = impl.mUrl;
         }
-        else if( impl.mImage )
-        {
-          Property::Map map;
-          Scripting::CreatePropertyMap( impl.mImage, map );
-          value = map;
-        }
         else
         {
           Property::Map map;
index 382feb8..8c69678 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_IMAGE_VIEW_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -58,11 +58,6 @@ public:
   static Toolkit::ImageView New();
 
   /**
-   * @copydoc Dali::Toolkit::SetImage
-   */
-  void SetImage( Image image );
-
-  /**
    * @brief Sets this ImageView from an Dali::Property::Map
    *
    * If the handle is empty, ImageView will display nothing
@@ -76,11 +71,6 @@ public:
   void SetImage( const std::string& imageUrl, ImageDimensions size );
 
   /**
-   * @copydoc Dali::Toolkit::GetImage
-   */
-  Image GetImage() const;
-
-  /**
    * @brief Set whether the Pre-multiplied Alpha Blending is required
    *
    * @param[in] preMultipled whether alpha is pre-multiplied.
@@ -184,7 +174,6 @@ private:
   Toolkit::Visual::Base  mVisual;
 
   std::string      mUrl;          ///< the url for the image if the image came from a URL, empty otherwise
-  Image            mImage;        ///< the Image if the image came from a Image, null otherwise
   Property::Map    mPropertyMap;  ///< the Property::Map if the image came from a Property::Map, empty otherwise
   Property::Map    mShaderMap;    ///< the Property::Map if the custom shader is set, empty otherwise
   ImageDimensions  mImageSize;    ///< the image size
index 04fa8da..cc2a2f6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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,6 @@
 #include <dali/public-api/animation/constraints.h>
 #include <dali/public-api/common/stage.h>
 #include <dali/public-api/render-tasks/render-task-list.h>
-#include <dali/public-api/images/resource-image.h>
 #include <dali/public-api/object/type-registry.h>
 #include <dali/public-api/object/type-registry-helper.h>
 #include <dali/public-api/object/property-map.h>
index 3830f62..467783c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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,6 @@
 #include <dali/public-api/animation/constraints.h>
 #include <dali/public-api/object/type-registry-helper.h>
 #include <dali-toolkit/public-api/controls/model3d-view/model3d-view.h>
-#include <dali/public-api/images/resource-image.h>
 #include <dali/devel-api/adaptor-framework/file-loader.h>
 #include <dali/devel-api/adaptor-framework/image-loading.h>
 
index 43758cb..1092c13 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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,6 @@
 #include "confirmation-popup-impl.h"
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/images/resource-image.h>
 #include <dali/public-api/object/type-registry.h>
 #include <dali/public-api/object/type-registry-helper.h>
 #include <cstring>
index 45d56f6..8cc35df 100644 (file)
@@ -361,7 +361,7 @@ void Popup::LayoutAnimation()
     case Toolkit::Popup::FADE:
     {
       // Fade animations start transparent.
-      mPopupContainer.SetProperty( DevelActor::Property::OPACITY, 0.0f );
+      mPopupContainer.SetProperty( Actor::Property::OPACITY, 0.0f );
       break;
     }
 
@@ -456,7 +456,7 @@ void Popup::StartTransitionAnimation( bool transitionIn, bool instantaneous /* f
       }
       else
       {
-        mPopupContainer.SetProperty( DevelActor::Property::OPACITY, transitionIn ? 1.0f : 0.0f );
+        mPopupContainer.SetProperty( Actor::Property::OPACITY, transitionIn ? 1.0f : 0.0f );
       }
       break;
     }
@@ -747,16 +747,16 @@ void Popup::SetDisplayState( Toolkit::Popup::DisplayState displayState )
     {
       mPreviousFocusedActor = keyboardFocusManager.GetCurrentFocusActor();
 
-      if( Self().IsKeyboardFocusable() )
+      if( Self().GetProperty< bool >( Actor::Property::KEYBOARD_FOCUSABLE ) )
       {
         // Setup the actgor to start focus from.
         Actor focusActor;
-        if( mContent && mContent.IsKeyboardFocusable() )
+        if( mContent && mContent.GetProperty< bool >( Actor::Property::KEYBOARD_FOCUSABLE ) )
         {
           // If the content is focusable, move the focus to the content.
           focusActor = mContent;
         }
-        else if( mFooter && mFooter.IsKeyboardFocusable() )
+        else if( mFooter && mFooter.GetProperty< bool >( Actor::Property::KEYBOARD_FOCUSABLE ) )
         {
           // If the footer is focusable, move the focus to the footer.
           focusActor = mFooter;
@@ -779,7 +779,7 @@ void Popup::SetDisplayState( Toolkit::Popup::DisplayState displayState )
     ClearKeyInputFocus();
 
     // Restore the keyboard focus when popup is hidden.
-    if( mPreviousFocusedActor && mPreviousFocusedActor.IsKeyboardFocusable() )
+    if( mPreviousFocusedActor && mPreviousFocusedActor.GetProperty< bool >( Actor::Property::KEYBOARD_FOCUSABLE ) )
     {
       Dali::Toolkit::KeyboardFocusManager keyboardFocusManager = Dali::Toolkit::KeyboardFocusManager::Get();
       if( keyboardFocusManager )
@@ -1831,7 +1831,7 @@ void Popup::AddFocusableChildrenRecursive( Actor parent, std::vector< Actor >& f
     Toolkit::Control control = Toolkit::Control::DownCast( parent );
     bool layoutControl = control && GetImplementation( control ).IsKeyboardNavigationSupported();
 
-    if( parent.IsKeyboardFocusable() || layoutControl )
+    if( parent.GetProperty< bool >( Actor::Property::KEYBOARD_FOCUSABLE ) || layoutControl )
     {
       focusableActors.push_back( parent );
 
@@ -1889,12 +1889,12 @@ Actor Popup::GetNextKeyboardFocusableActor( Actor currentFocusedActor, Toolkit::
     ( currentFocusedActor && ( ( !mContent || ( currentFocusGroup != mContent ) ) && ( !mFooter || ( currentFocusGroup != mFooter ) ) ) ) )
   {
     // The current focused actor is not within popup.
-    if( mContent && mContent.IsKeyboardFocusable() )
+    if( mContent && mContent.GetProperty< bool >( Actor::Property::KEYBOARD_FOCUSABLE ) )
     {
       // If the content is focusable, move the focus to the content.
       nextFocusableActor = mContent;
     }
-    else if( mFooter && mFooter.IsKeyboardFocusable() )
+    else if( mFooter && mFooter.GetProperty< bool >( Actor::Property::KEYBOARD_FOCUSABLE ) )
     {
       // If the footer is focusable, move the focus to the footer.
       nextFocusableActor = mFooter;
index 2b89fed..4390792 100755 (executable)
@@ -28,6 +28,9 @@
 #include <dali-toolkit/public-api/align-enumerations.h>
 #include <dali-toolkit/devel-api/controls/control-devel.h>
 #include <dali-toolkit/devel-api/visual-factory/visual-base.h>
+#include <dali-toolkit/internal/visuals/visual-base-impl.h>
+#include <dali-toolkit/internal/visuals/visual-string-constants.h>
+#include <dali-toolkit/devel-api/visuals/arc-visual-properties-devel.h>
 #include <dali-toolkit/public-api/visuals/color-visual-properties.h>
 #include <dali-toolkit/public-api/visuals/image-visual-properties.h>
 #include <dali-toolkit/public-api/visuals/text-visual-properties.h>
@@ -86,6 +89,35 @@ float DEFAULT_VALUE = 0.0f;
 float DEFAULT_LOWER_BOUND = 0.0f;
 float DEFAULT_UPPER_BOUND = 1.0f;
 float DEFAULT_FONT_SIZE = 12.0f;
+const char* CIRCULAR_PROGRESS_BAR_STYLE_NAME = "CircularProgressBar";
+
+
+void BackupVisualProperties( const Control* control, Property::Index index, Property::Map& map )
+{
+  Toolkit::Visual::Base visual = DevelControl::GetVisual( *control, index );
+
+  if( visual )
+  {
+    map.Clear();
+    visual.CreatePropertyMap( map );
+  }
+}
+
+void RestoreVisualProperties( Control* control, Property::Index index, Property::Map& map, int depth )
+{
+  if( !map.Empty() )
+  {
+    Toolkit::Visual::Base visual = DevelControl::GetVisual( *control, index );
+
+    Visual::Base& visualImpl = Toolkit::GetImplementation( visual );
+
+    visualImpl.SetProperties( map );
+
+    DevelControl::UnregisterVisual( *control, index );
+
+    DevelControl::RegisterVisual( *control, index, visual, true, depth );
+  }
+}
 
 } // Unnamed namespace
 
@@ -93,14 +125,26 @@ float DEFAULT_FONT_SIZE = 12.0f;
 // ProgressBar
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-Dali::Toolkit::ProgressBar ProgressBar::New()
+Dali::Toolkit::ProgressBar ProgressBar::New( DevelProgressBar::Style progressBarStyle )
 {
   // Create the implementation
   ProgressBarPtr progressBar( new ProgressBar() );
 
-  // Pass ownership to CustomActor via derived handle
   Dali::Toolkit::ProgressBar handle( *progressBar );
 
+  switch( progressBarStyle )
+  {
+    case DevelProgressBar::Style::CIRCULAR:
+    {
+      progressBar->SetStyleName( CIRCULAR_PROGRESS_BAR_STYLE_NAME );
+      break;
+    }
+    default:
+    {
+      break;
+    }
+  }
+
   // Second-phase init of the implementation
   // This can only be done after the CustomActor connection has been made...
   progressBar->Initialize();
@@ -133,8 +177,6 @@ void ProgressBar::OnRelayout( const Vector2& size, RelayoutContainer& container
   trackSize.width = std::max( 0.0f, size.width ); // Ensure we don't go negative
 
   Toolkit::Visual::Base trackVisual = DevelControl::GetVisual( *this, Toolkit::ProgressBar::Property::TRACK_VISUAL );
-  Toolkit::Visual::Base secondProgressVisual = DevelControl::GetVisual( *this, Toolkit::ProgressBar::Property::SECONDARY_PROGRESS_VISUAL );
-  Toolkit::Visual::Base progressVisual = DevelControl::GetVisual( *this, Toolkit::ProgressBar::Property::PROGRESS_VISUAL );
   Toolkit::Visual::Base labelVisual = DevelControl::GetVisual( *this, Toolkit::ProgressBar::Property::LABEL_VISUAL );
   Toolkit::Visual::Base indeterminateVisual = DevelControl::GetVisual( *this, Toolkit::ProgressBar::Property::INDETERMINATE_VISUAL );
 
@@ -149,29 +191,9 @@ void ProgressBar::OnRelayout( const Vector2& size, RelayoutContainer& container
     trackVisual.SetTransformAndSize( visualTransform, trackSize );
   }
 
-  if( secondProgressVisual )
-  {
-    Property::Map visualTransform;
-
-    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 );
-  }
-
-  if( progressVisual )
-  {
-    Property::Map visualTransform;
+  ApplyProgressToVisualTransform( mSecondaryProgressValue, trackSize, Toolkit::ProgressBar::Property::SECONDARY_PROGRESS_VISUAL );
 
-    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 );
-  }
+  ApplyProgressToVisualTransform( mProgressValue, trackSize, Toolkit::ProgressBar::Property::PROGRESS_VISUAL );
 
   if( labelVisual )
   {
@@ -240,6 +262,8 @@ void ProgressBar::SetProgressValue( float value )
   {
     mProgressValue = Clamp( value, DEFAULT_LOWER_BOUND, DEFAULT_UPPER_BOUND );
 
+    ApplyProgressToVisual( mProgressValue, Toolkit::ProgressBar::Property::PROGRESS_VISUAL, ProgressDepthIndex::PROGRESS_VISUAL );
+
     Toolkit::ProgressBar self = Toolkit::ProgressBar::DownCast( Self() );
     mValueChangedSignal.Emit( self, mProgressValue, mSecondaryProgressValue );
     RelayoutRequest();
@@ -261,6 +285,8 @@ void ProgressBar::SetSecondaryProgressValue( float value )
   {
     mSecondaryProgressValue = Clamp( value, DEFAULT_LOWER_BOUND, DEFAULT_UPPER_BOUND );
 
+    ApplyProgressToVisual( mSecondaryProgressValue, Toolkit::ProgressBar::Property::SECONDARY_PROGRESS_VISUAL, ProgressDepthIndex::SECONDARY_PROGRESS_VISUAL );
+
     Toolkit::ProgressBar self = Toolkit::ProgressBar::DownCast( Self() );
     mValueChangedSignal.Emit( self, mProgressValue, mSecondaryProgressValue );
 
@@ -292,6 +318,13 @@ void ProgressBar::SetIndeterminate( bool value )
     {
       mIndeterminateVisualAni.Stop();
     }
+
+    // Restore previous visual data after animation finished.
+    RestoreVisualProperties( this, Toolkit::ProgressBar::Property::TRACK_VISUAL, mTrackVisualMap, ProgressDepthIndex::TRACK_VISUAL );
+    RestoreVisualProperties( this, Toolkit::ProgressBar::Property::SECONDARY_PROGRESS_VISUAL, mSecondaryProgressVisualMap, ProgressDepthIndex::SECONDARY_PROGRESS_VISUAL );
+    RestoreVisualProperties( this, Toolkit::ProgressBar::Property::PROGRESS_VISUAL, mProgressVisualMap, ProgressDepthIndex::PROGRESS_VISUAL );
+
+    RelayoutRequest();
   }
 }
 
@@ -311,6 +344,11 @@ void ProgressBar::SetIndeterminateVisualTransition( Toolkit::TransitionData tran
 
 void ProgressBar::PlayIndeterminateVisualTransition()
 {
+  // Store current visual data before animation changes it.
+  BackupVisualProperties( this, Toolkit::ProgressBar::Property::TRACK_VISUAL, mTrackVisualMap );
+  BackupVisualProperties( this, Toolkit::ProgressBar::Property::SECONDARY_PROGRESS_VISUAL, mSecondaryProgressVisualMap );
+  BackupVisualProperties( this, Toolkit::ProgressBar::Property::PROGRESS_VISUAL, mProgressVisualMap );
+
   if( mIndeterminateVisualAni )
   {
     mIndeterminateVisualAni.Stop();
@@ -404,6 +442,47 @@ bool ProgressBar::GetPropertyMapForVisual( Property::Index visualIndex, Property
   return success;
 }
 
+
+void ProgressBar::ApplyProgressToVisual( float progress, Property::Index index, int depth )
+{
+  Toolkit::Visual::Base visual = DevelControl::GetVisual( *this, index );
+
+  if( visual && static_cast<DevelVisual::Type>( visual.GetType() ) == DevelVisual::ARC && !mIndeterminate )
+  {
+    Visual::Base& visualImpl = Toolkit::GetImplementation( visual );
+
+    Property::Map map;
+
+    map[ Toolkit::DevelArcVisual::Property::SWEEP_ANGLE ] = Property::Value( 360.0f * progress );
+
+    visualImpl.SetProperties( map );
+
+    DevelControl::UnregisterVisual( *this, index );
+    DevelControl::RegisterVisual( *this, index, visual, true, depth );
+  }
+}
+
+void ProgressBar::ApplyProgressToVisualTransform( float progress, Vector2 trackSize, Property::Index index )
+{
+  Toolkit::Visual::Base visual = DevelControl::GetVisual( *this, index );
+
+  if( visual )
+  {
+    Property::Map visualTransform;
+
+    if( static_cast<DevelVisual::Type>( visual.GetType() ) != DevelVisual::ARC )
+    {
+      visualTransform.Add( Toolkit::Visual::Transform::Property::SIZE, Vector2( mDomain.from.x + progress * ( 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 );
+    }
+
+    visual.SetTransformAndSize( visualTransform, trackSize );
+  }
+}
+
 // Static class method to support script connecting signals
 bool ProgressBar::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
 {
@@ -444,12 +523,14 @@ void ProgressBar::SetProperty( BaseObject* object, Property::Index propertyIndex
       case Toolkit::ProgressBar::Property::SECONDARY_PROGRESS_VISUAL:
       {
         progressBarImpl.CreateVisualsForComponent( propertyIndex, value, ProgressDepthIndex::SECONDARY_PROGRESS_VISUAL );
+        progressBarImpl.ApplyProgressToVisual( progressBarImpl.mSecondaryProgressValue, propertyIndex, ProgressDepthIndex::SECONDARY_PROGRESS_VISUAL );
         break;
       }
 
       case Toolkit::ProgressBar::Property::PROGRESS_VISUAL:
       {
         progressBarImpl.CreateVisualsForComponent( propertyIndex, value, ProgressDepthIndex::PROGRESS_VISUAL );
+        progressBarImpl.ApplyProgressToVisual( progressBarImpl.mProgressValue, propertyIndex, ProgressDepthIndex::PROGRESS_VISUAL );
         break;
       }
 
index 5b0ffd2..31ae483 100755 (executable)
  *
  */
 
-
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control-impl.h>
 #include <dali/public-api/animation/animation.h>
 #include <dali-toolkit/public-api/controls/progress-bar/progress-bar.h>
+#include <dali-toolkit/devel-api/controls/progress-bar/progress-bar-devel.h>
 #include <dali-toolkit/devel-api/visual-factory/transition-data.h>
 
 namespace Dali
@@ -46,11 +46,11 @@ class ProgressBar : public Control
 public:
 
   /**
-   * Create a new ProgressBar.
-   *
+   * Create a new ProgressBar with predefined style.
+   * @param[in] progressBarStyle A style value that determines the shape of the progress bar.
    * @return A public handle to the newly allocated ProgressBar.
    */
-  static Dali::Toolkit::ProgressBar New();
+  static Dali::Toolkit::ProgressBar New( DevelProgressBar::Style progressBarStyle = DevelProgressBar::Style::LINEAR );
 
 public:
 
@@ -233,6 +233,16 @@ private:
   bool GetPropertyMapForVisual( Property::Index visualIndex, Property::Map& retreivedMap ) const;
 
   /**
+   * Apply progress value to visual
+   */
+  void ApplyProgressToVisual( float progress, Property::Index index, int depth );
+
+  /**
+   * Apply progress value to visual transform
+   */
+  void ApplyProgressToVisualTransform( float progress, Vector2 trackSize, Property::Index index );
+
+  /**
    * Check if we should start animating
    */
   virtual void OnStageConnection( int depth );
@@ -256,6 +266,9 @@ private:
   float mProgressValue;                                               ///< Current value of ProgressBar
   float mSecondaryProgressValue;                                      ///< Current loading value of ProgressBar
   bool mIndeterminate;                                                ///< Whether the progress state is determined or not
+  Property::Map mTrackVisualMap;                                      ///< To backup visual properties when switching determinate/indeterminate.
+  Property::Map mProgressVisualMap;                                   ///< To backup visual properties when switching determinate/indeterminate.
+  Property::Map mSecondaryProgressVisualMap;                          ///< To backup visual properties when switching determinate/indeterminate.
 };
 
 } // namespace Internal
index 683cfd6..711f323 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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,6 @@
 #include <cstring> // for strcmp
 #include <dali/public-api/animation/constraint.h>
 #include <dali/public-api/animation/constraints.h>
-#include <dali/public-api/images/resource-image.h>
 #include <dali/public-api/object/type-registry.h>
 #include <dali/public-api/object/property-array.h>
 #include <dali/public-api/object/type-registry-helper.h>
@@ -391,7 +390,7 @@ void ScrollBar::ShowIndicator()
   }
   else
   {
-    mIndicator.SetProperty( DevelActor::Property::OPACITY,mIndicatorShowAlpha);
+    mIndicator.SetProperty( Actor::Property::OPACITY,mIndicatorShowAlpha);
   }
 }
 
@@ -412,7 +411,7 @@ void ScrollBar::HideIndicator()
   }
   else
   {
-    mIndicator.SetProperty( DevelActor::Property::OPACITY,0.0f);
+    mIndicator.SetProperty( Actor::Property::OPACITY,0.0f);
   }
 }
 
@@ -433,7 +432,7 @@ void ScrollBar::ShowTransientIndicator()
   }
   else
   {
-    mIndicator.SetProperty( DevelActor::Property::OPACITY,mIndicatorShowAlpha);
+    mIndicator.SetProperty( Actor::Property::OPACITY,mIndicatorShowAlpha);
   }
   mAnimation.AnimateTo( Property( mIndicator, Actor::Property::COLOR_ALPHA ),
                         0.0f, AlphaFunction::EASE_IN, TimePeriod((mIndicatorShowDuration + mTransientIndicatorDuration), mIndicatorHideDuration) );
index 9156aae..fbebcd7 100644 (file)
@@ -209,7 +209,7 @@ void ShadowView::SetShadowColor(Vector4 color)
 
 void ShadowView::Activate()
 {
-  DALI_ASSERT_ALWAYS( Self().OnStage() && "ShadowView should be on stage before calling Activate()\n" );
+  DALI_ASSERT_ALWAYS( Self().GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) && "ShadowView should be on stage before calling Activate()\n" );
 
   // make sure resources are allocated and start the render tasks processing
   CreateRenderTasks();
@@ -217,7 +217,7 @@ void ShadowView::Activate()
 
 void ShadowView::Deactivate()
 {
-  DALI_ASSERT_ALWAYS( Self().OnStage() && "ShadowView should be on stage before calling Deactivate()\n" )
+  DALI_ASSERT_ALWAYS( Self().GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) && "ShadowView should be on stage before calling Deactivate()\n" )
 
   // stop render tasks processing
   // Note: render target resources are automatically freed since we set the Image::Unused flag
index f00190b..a0c1849 100755 (executable)
@@ -829,7 +829,7 @@ void TableView::OnRelayout( const Vector2& size, RelayoutContainer& container )
       if( actor &&  position.rowIndex == row && position.columnIndex == column )
       {
         // Anchor actor to top left of the cell
-        if( actor.GetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT ).Get< bool >() )
+        if( actor.GetProperty( Actor::Property::POSITION_USES_ANCHOR_POINT ).Get< bool >() )
         {
           actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
         }
@@ -1117,7 +1117,7 @@ void TableView::OnInitialize()
 {
   // Make self as keyboard focusable and focus group
   Actor self = Self();
-  self.SetKeyboardFocusable(true);
+  self.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
   SetAsKeyboardFocusGroup(true);
 }
 
old mode 100755 (executable)
new mode 100644 (file)
index 0ddac75..f9fe425
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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,6 @@
 #include <limits>
 #include <dali/public-api/adaptor-framework/key.h>
 #include <dali/public-api/common/stage.h>
-#include <dali/public-api/images/resource-image.h>
 #include <dali/devel-api/actors/actor-devel.h>
 #include <dali/devel-api/object/property-helper-devel.h>
 #include <dali/public-api/object/type-registry-helper.h>
@@ -145,6 +144,24 @@ DALI_SIGNAL_REGISTRATION( Toolkit, TextEditor, "inputStyleChanged",  SIGNAL_INPU
 
 DALI_TYPE_REGISTRATION_END()
 
+const char * const IMAGE_MAP_FILENAME_STRING = "filename";
+
+/// Retrieves a filename from a value that is a Property::Map
+std::string GetImageFileNameFromPropertyValue( const Property::Value& value )
+{
+  std::string filename;
+  const Property::Map* map = value.GetMap();
+  if( map )
+  {
+    const Property::Value* filenameValue = map->Find( IMAGE_MAP_FILENAME_STRING );
+    if( filenameValue )
+    {
+      filenameValue->Get( filename );
+    }
+  }
+  return filename;
+}
+
 } // namespace
 
 Toolkit::TextEditor TextEditor::New()
@@ -351,90 +368,90 @@ void TextEditor::SetProperty( BaseObject* object, Property::Index index, const P
       }
       case Toolkit::TextEditor::Property::GRAB_HANDLE_IMAGE:
       {
-        const ResourceImage image = ResourceImage::New( value.Get< std::string >() );
-        DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextEditor %p GRAB_HANDLE_IMAGE %s\n", impl.mController.Get(), image.GetUrl().c_str() );
+        const std::string imageFileName = value.Get< std::string >();
+        DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextEditor %p GRAB_HANDLE_IMAGE %s\n", impl.mController.Get(), imageFileName.c_str() );
 
-        if( impl.mDecorator )
+        if( impl.mDecorator && imageFileName.size() )
         {
-          impl.mDecorator->SetHandleImage( GRAB_HANDLE, HANDLE_IMAGE_RELEASED, image );
+          impl.mDecorator->SetHandleImage( GRAB_HANDLE, HANDLE_IMAGE_RELEASED, imageFileName );
           impl.RequestTextRelayout();
         }
         break;
       }
       case Toolkit::TextEditor::Property::GRAB_HANDLE_PRESSED_IMAGE:
       {
-        const ResourceImage image = ResourceImage::New( value.Get< std::string >() );
-        DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextEditor %p GRAB_HANDLE_PRESSED_IMAGE %s\n", impl.mController.Get(), image.GetUrl().c_str() );
+        const std::string imageFileName = value.Get< std::string >();
+        DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextEditor %p GRAB_HANDLE_PRESSED_IMAGE %s\n", impl.mController.Get(), imageFileName.c_str() );
 
-        if( impl.mDecorator )
+        if( impl.mDecorator && imageFileName.size() )
         {
-          impl.mDecorator->SetHandleImage( GRAB_HANDLE, HANDLE_IMAGE_PRESSED, image );
+          impl.mDecorator->SetHandleImage( GRAB_HANDLE, HANDLE_IMAGE_PRESSED, imageFileName );
           impl.RequestTextRelayout();
         }
         break;
       }
       case Toolkit::TextEditor::Property::SELECTION_HANDLE_IMAGE_LEFT:
       {
-        const Image image = Scripting::NewImage( value );
+        const std::string filename = GetImageFileNameFromPropertyValue( value );
 
-        if( impl.mDecorator && image )
+        if( impl.mDecorator && filename.size() )
         {
-          impl.mDecorator->SetHandleImage( LEFT_SELECTION_HANDLE, HANDLE_IMAGE_RELEASED, image );
+          impl.mDecorator->SetHandleImage( LEFT_SELECTION_HANDLE, HANDLE_IMAGE_RELEASED, filename );
           impl.RequestTextRelayout();
         }
         break;
       }
       case Toolkit::TextEditor::Property::SELECTION_HANDLE_IMAGE_RIGHT:
       {
-        const Image image = Scripting::NewImage( value );
+        const std::string filename = GetImageFileNameFromPropertyValue( value );
 
-        if( impl.mDecorator && image )
+        if( impl.mDecorator && filename.size() )
         {
-          impl.mDecorator->SetHandleImage( RIGHT_SELECTION_HANDLE, HANDLE_IMAGE_RELEASED, image );
+          impl.mDecorator->SetHandleImage( RIGHT_SELECTION_HANDLE, HANDLE_IMAGE_RELEASED, filename );
           impl.RequestTextRelayout();
         }
         break;
       }
       case Toolkit::TextEditor::Property::SELECTION_HANDLE_PRESSED_IMAGE_LEFT:
       {
-        const Image image = Scripting::NewImage( value );
+        const std::string filename = GetImageFileNameFromPropertyValue( value );
 
-        if( impl.mDecorator && image )
+        if( impl.mDecorator && filename.size() )
         {
-          impl.mDecorator->SetHandleImage( LEFT_SELECTION_HANDLE, HANDLE_IMAGE_PRESSED, image );
+          impl.mDecorator->SetHandleImage( LEFT_SELECTION_HANDLE, HANDLE_IMAGE_PRESSED, filename );
           impl.RequestTextRelayout();
         }
         break;
       }
       case Toolkit::TextEditor::Property::SELECTION_HANDLE_PRESSED_IMAGE_RIGHT:
       {
-        const Image image = Scripting::NewImage( value );
+        const std::string filename = GetImageFileNameFromPropertyValue( value );
 
-        if( impl.mDecorator && image )
+        if( impl.mDecorator && filename.size() )
         {
-          impl.mDecorator->SetHandleImage( RIGHT_SELECTION_HANDLE, HANDLE_IMAGE_PRESSED, image );
+          impl.mDecorator->SetHandleImage( RIGHT_SELECTION_HANDLE, HANDLE_IMAGE_PRESSED, filename );
           impl.RequestTextRelayout();
         }
         break;
       }
       case Toolkit::TextEditor::Property::SELECTION_HANDLE_MARKER_IMAGE_LEFT:
       {
-        const Image image = Scripting::NewImage( value );
+        const std::string filename = GetImageFileNameFromPropertyValue( value );
 
-        if( impl.mDecorator && image )
+        if( impl.mDecorator && filename.size() )
         {
-          impl.mDecorator->SetHandleImage( LEFT_SELECTION_HANDLE_MARKER, HANDLE_IMAGE_RELEASED, image );
+          impl.mDecorator->SetHandleImage( LEFT_SELECTION_HANDLE_MARKER, HANDLE_IMAGE_RELEASED, filename );
           impl.RequestTextRelayout();
         }
         break;
       }
       case Toolkit::TextEditor::Property::SELECTION_HANDLE_MARKER_IMAGE_RIGHT:
       {
-        const Image image = Scripting::NewImage( value );
+        const std::string filename = GetImageFileNameFromPropertyValue( value );
 
-        if( impl.mDecorator && image )
+        if( impl.mDecorator && filename.size() )
         {
-          impl.mDecorator->SetHandleImage( RIGHT_SELECTION_HANDLE_MARKER, HANDLE_IMAGE_RELEASED, image );
+          impl.mDecorator->SetHandleImage( RIGHT_SELECTION_HANDLE_MARKER, HANDLE_IMAGE_RELEASED, filename );
           impl.RequestTextRelayout();
         }
         break;
@@ -892,11 +909,7 @@ Property::Value TextEditor::GetProperty( BaseObject* object, Property::Index ind
       {
         if( impl.mDecorator )
         {
-          ResourceImage image = ResourceImage::DownCast( impl.mDecorator->GetHandleImage( GRAB_HANDLE, HANDLE_IMAGE_RELEASED ) );
-          if( image )
-          {
-            value = image.GetUrl();
-          }
+          value = impl.mDecorator->GetHandleImage( GRAB_HANDLE, HANDLE_IMAGE_RELEASED );
         }
         break;
       }
@@ -904,11 +917,7 @@ Property::Value TextEditor::GetProperty( BaseObject* object, Property::Index ind
       {
         if( impl.mDecorator )
         {
-          ResourceImage image = ResourceImage::DownCast( impl.mDecorator->GetHandleImage( GRAB_HANDLE, HANDLE_IMAGE_PRESSED ) );
-          if( image )
-          {
-            value = image.GetUrl();
-          }
+          value = impl.mDecorator->GetHandleImage( GRAB_HANDLE, HANDLE_IMAGE_PRESSED );
         }
         break;
       }
@@ -1733,7 +1742,7 @@ void TextEditor::UpdateScrollBar()
   {
     mAnimation = Animation::New( mAnimationPeriod.durationSeconds );
   }
-  indicator.SetProperty( DevelActor::Property::OPACITY,1.0f);
+  indicator.SetProperty( Actor::Property::OPACITY,1.0f);
   mAnimation.AnimateTo( Property( indicator, Actor::Property::COLOR_ALPHA ), 0.0f, AlphaFunction::EASE_IN, mAnimationPeriod );
   mAnimation.Play();
   mAnimation.FinishedSignal().Connect( this, &TextEditor::OnScrollIndicatorAnimationFinished );
@@ -1772,14 +1781,9 @@ void TextEditor::GetHandleImagePropertyValue(  Property::Value& value, Text::Han
 {
   if( mDecorator )
   {
-    ResourceImage image = ResourceImage::DownCast( mDecorator->GetHandleImage( handleType, handleImageType ) );
-
-    if ( image )
-    {
-      Property::Map map;
-      Scripting::CreatePropertyMap( image, map );
-      value = map;
-    }
+    Property::Map map;
+    map[ IMAGE_MAP_FILENAME_STRING ] = mDecorator->GetHandleImage( handleType, handleImageType );
+    value = map;
   }
 }
 
old mode 100755 (executable)
new mode 100644 (file)
index 7e2d143..d7699bd
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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,6 @@
 #include <dali/public-api/adaptor-framework/key.h>
 #include <dali/devel-api/adaptor-framework/key-devel.h>
 #include <dali/public-api/common/stage.h>
-#include <dali/public-api/images/resource-image.h>
 #include <dali/devel-api/object/property-helper-devel.h>
 #include <dali/devel-api/actors/actor-devel.h>
 #include <dali/public-api/object/type-registry-helper.h>
@@ -91,8 +90,6 @@ DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "horizontalAlignment",
 DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "verticalAlignment",                    STRING,    VERTICAL_ALIGNMENT                   )
 DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "textColor",                            VECTOR4,   TEXT_COLOR                           )
 DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "placeholderTextColor",                 VECTOR4,   PLACEHOLDER_TEXT_COLOR               )
-DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "reservedProperty01",                   STRING,    RESERVED_PROPERTY_01                 )
-DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "reservedProperty02",                   STRING,    RESERVED_PROPERTY_02                 )
 DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "primaryCursorColor",                   VECTOR4,   PRIMARY_CURSOR_COLOR                 )
 DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "secondaryCursorColor",                 VECTOR4,   SECONDARY_CURSOR_COLOR               )
 DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "enableCursorBlink",                    BOOLEAN,   ENABLE_CURSOR_BLINK                  )
@@ -143,6 +140,24 @@ DALI_SIGNAL_REGISTRATION( Toolkit, TextField, "inputStyleChanged",  SIGNAL_INPUT
 
 DALI_TYPE_REGISTRATION_END()
 
+const char * const IMAGE_MAP_FILENAME_STRING = "filename";
+
+/// Retrieves a filename from a value that is a Property::Map
+std::string GetImageFileNameFromPropertyValue( const Property::Value& value )
+{
+  std::string filename;
+  const Property::Map* map = value.GetMap();
+  if( map )
+  {
+    const Property::Value* filenameValue = map->Find( IMAGE_MAP_FILENAME_STRING );
+    if( filenameValue )
+    {
+      filenameValue->Get( filename );
+    }
+  }
+  return filename;
+}
+
 } // namespace
 
 Toolkit::TextField TextField::New()
@@ -415,24 +430,24 @@ void TextField::SetProperty( BaseObject* object, Property::Index index, const Pr
       }
       case Toolkit::TextField::Property::GRAB_HANDLE_IMAGE:
       {
-        const ResourceImage image = ResourceImage::New( value.Get< std::string >() );
-        DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField %p GRAB_HANDLE_IMAGE %s\n", impl.mController.Get(), image.GetUrl().c_str() );
+        const std::string imageFileName = value.Get< std::string >();
+        DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField %p GRAB_HANDLE_IMAGE %s\n", impl.mController.Get(), imageFileName.c_str() );
 
-        if( impl.mDecorator )
+        if( impl.mDecorator && imageFileName.size() )
         {
-          impl.mDecorator->SetHandleImage( GRAB_HANDLE, HANDLE_IMAGE_RELEASED, image );
+          impl.mDecorator->SetHandleImage( GRAB_HANDLE, HANDLE_IMAGE_RELEASED, imageFileName );
           impl.RequestTextRelayout();
         }
         break;
       }
       case Toolkit::TextField::Property::GRAB_HANDLE_PRESSED_IMAGE:
       {
-        const ResourceImage image = ResourceImage::New( value.Get< std::string >() );
-        DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField %p GRAB_HANDLE_PRESSED_IMAGE %s\n", impl.mController.Get(), image.GetUrl().c_str() );
+        const std::string imageFileName = value.Get< std::string >();
+        DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField %p GRAB_HANDLE_PRESSED_IMAGE %s\n", impl.mController.Get(), imageFileName.c_str() );
 
-        if( impl.mDecorator )
+        if( impl.mDecorator && imageFileName.size() )
         {
-          impl.mDecorator->SetHandleImage( GRAB_HANDLE, HANDLE_IMAGE_PRESSED, image );
+          impl.mDecorator->SetHandleImage( GRAB_HANDLE, HANDLE_IMAGE_PRESSED, imageFileName );
           impl.RequestTextRelayout();
         }
         break;
@@ -461,66 +476,66 @@ void TextField::SetProperty( BaseObject* object, Property::Index index, const Pr
       }
       case Toolkit::TextField::Property::SELECTION_HANDLE_IMAGE_LEFT:
       {
-        const Image image = Scripting::NewImage( value );
+        const std::string filename = GetImageFileNameFromPropertyValue( value );
 
-        if( impl.mDecorator && image )
+        if( impl.mDecorator && filename.size() )
         {
-          impl.mDecorator->SetHandleImage( LEFT_SELECTION_HANDLE, HANDLE_IMAGE_RELEASED, image );
+          impl.mDecorator->SetHandleImage( LEFT_SELECTION_HANDLE, HANDLE_IMAGE_RELEASED, filename );
           impl.RequestTextRelayout();
         }
         break;
       }
       case Toolkit::TextField::Property::SELECTION_HANDLE_IMAGE_RIGHT:
       {
-        const Image image = Scripting::NewImage( value );
+        const std::string filename = GetImageFileNameFromPropertyValue( value );
 
-        if( impl.mDecorator && image )
+        if( impl.mDecorator && filename.size() )
         {
-          impl.mDecorator->SetHandleImage( RIGHT_SELECTION_HANDLE, HANDLE_IMAGE_RELEASED, image );
+          impl.mDecorator->SetHandleImage( RIGHT_SELECTION_HANDLE, HANDLE_IMAGE_RELEASED, filename );
           impl.RequestTextRelayout();
         }
         break;
       }
       case Toolkit::TextField::Property::SELECTION_HANDLE_PRESSED_IMAGE_LEFT:
       {
-        const Image image = Scripting::NewImage( value );
+        const std::string filename = GetImageFileNameFromPropertyValue( value );
 
-        if( impl.mDecorator && image )
+        if( impl.mDecorator && filename.size() )
         {
-          impl.mDecorator->SetHandleImage( LEFT_SELECTION_HANDLE, HANDLE_IMAGE_PRESSED, image );
+          impl.mDecorator->SetHandleImage( LEFT_SELECTION_HANDLE, HANDLE_IMAGE_PRESSED, filename );
           impl.RequestTextRelayout();
         }
         break;
       }
       case Toolkit::TextField::Property::SELECTION_HANDLE_PRESSED_IMAGE_RIGHT:
       {
-        const Image image = Scripting::NewImage( value );
+        const std::string filename = GetImageFileNameFromPropertyValue( value );
 
-        if( impl.mDecorator && image )
+        if( impl.mDecorator && filename.size() )
         {
-          impl.mDecorator->SetHandleImage( RIGHT_SELECTION_HANDLE, HANDLE_IMAGE_PRESSED, image );
+          impl.mDecorator->SetHandleImage( RIGHT_SELECTION_HANDLE, HANDLE_IMAGE_PRESSED, filename );
           impl.RequestTextRelayout();
         }
         break;
       }
       case Toolkit::TextField::Property::SELECTION_HANDLE_MARKER_IMAGE_LEFT:
       {
-        const Image image = Scripting::NewImage( value );
+        const std::string filename = GetImageFileNameFromPropertyValue( value );
 
-        if( impl.mDecorator && image )
+        if( impl.mDecorator && filename.size() )
         {
-          impl.mDecorator->SetHandleImage( LEFT_SELECTION_HANDLE_MARKER, HANDLE_IMAGE_RELEASED, image );
+          impl.mDecorator->SetHandleImage( LEFT_SELECTION_HANDLE_MARKER, HANDLE_IMAGE_RELEASED, filename );
           impl.RequestTextRelayout();
         }
         break;
       }
       case Toolkit::TextField::Property::SELECTION_HANDLE_MARKER_IMAGE_RIGHT:
       {
-        const Image image = Scripting::NewImage( value );
+        const std::string filename = GetImageFileNameFromPropertyValue( value );
 
-        if( impl.mDecorator && image )
+        if( impl.mDecorator && filename.size() )
         {
-          impl.mDecorator->SetHandleImage( RIGHT_SELECTION_HANDLE_MARKER, HANDLE_IMAGE_RELEASED, image );
+          impl.mDecorator->SetHandleImage( RIGHT_SELECTION_HANDLE_MARKER, HANDLE_IMAGE_RELEASED, filename );
           impl.RequestTextRelayout();
         }
         break;
@@ -967,11 +982,7 @@ Property::Value TextField::GetProperty( BaseObject* object, Property::Index inde
       {
         if( impl.mDecorator )
         {
-          ResourceImage image = ResourceImage::DownCast( impl.mDecorator->GetHandleImage( GRAB_HANDLE, HANDLE_IMAGE_RELEASED ) );
-          if( image )
-          {
-            value = image.GetUrl();
-          }
+          value = impl.mDecorator->GetHandleImage( GRAB_HANDLE, HANDLE_IMAGE_RELEASED );
         }
         break;
       }
@@ -979,11 +990,7 @@ Property::Value TextField::GetProperty( BaseObject* object, Property::Index inde
       {
         if( impl.mDecorator )
         {
-          ResourceImage image = ResourceImage::DownCast( impl.mDecorator->GetHandleImage( GRAB_HANDLE, HANDLE_IMAGE_PRESSED ) );
-          if( image )
-          {
-            value = image.GetUrl();
-          }
+          value = impl.mDecorator->GetHandleImage( GRAB_HANDLE, HANDLE_IMAGE_PRESSED );
         }
         break;
       }
@@ -1800,14 +1807,9 @@ void TextField::GetHandleImagePropertyValue(  Property::Value& value, Text::Hand
 {
   if( mDecorator )
   {
-    ResourceImage image = ResourceImage::DownCast( mDecorator->GetHandleImage( handleType, handleImageType ) );
-
-    if ( image )
-    {
-      Property::Map map;
-      Scripting::CreatePropertyMap( image, map );
-      value = map;
-    }
+    Property::Map map;
+    map[ IMAGE_MAP_FILENAME_STRING ] = mDecorator->GetHandleImage( handleType, handleImageType );
+    value = map;
   }
 }
 
index e542d9c..24dc6d4 100755 (executable)
@@ -113,12 +113,6 @@ DALI_PROPERTY_REGISTRATION( Toolkit,           TextLabel, "pointSize",
 DALI_PROPERTY_REGISTRATION( Toolkit,           TextLabel, "multiLine",                 BOOLEAN, MULTI_LINE                 )
 DALI_PROPERTY_REGISTRATION( Toolkit,           TextLabel, "horizontalAlignment",       STRING,  HORIZONTAL_ALIGNMENT       )
 DALI_PROPERTY_REGISTRATION( Toolkit,           TextLabel, "verticalAlignment",         STRING,  VERTICAL_ALIGNMENT         )
-DALI_PROPERTY_REGISTRATION( Toolkit,           TextLabel, "unusedPropertyTextColor",   VECTOR4, UNUSED_PROPERTY_TEXT_COLOR )
-DALI_PROPERTY_REGISTRATION( Toolkit,           TextLabel, "reservedProperty01",        STRING,  RESERVED_PROPERTY_01       )
-DALI_PROPERTY_REGISTRATION( Toolkit,           TextLabel, "reservedProperty02",        STRING,  RESERVED_PROPERTY_02       )
-DALI_PROPERTY_REGISTRATION( Toolkit,           TextLabel, "reservedProperty03",        STRING,  RESERVED_PROPERTY_03       )
-DALI_PROPERTY_REGISTRATION( Toolkit,           TextLabel, "reservedProperty04",        STRING,  RESERVED_PROPERTY_04       )
-DALI_PROPERTY_REGISTRATION( Toolkit,           TextLabel, "reservedProperty05",        STRING,  RESERVED_PROPERTY_05       )
 DALI_PROPERTY_REGISTRATION( Toolkit,           TextLabel, "enableMarkup",              BOOLEAN, ENABLE_MARKUP              )
 DALI_PROPERTY_REGISTRATION( Toolkit,           TextLabel, "enableAutoScroll",          BOOLEAN, ENABLE_AUTO_SCROLL         )
 DALI_PROPERTY_REGISTRATION( Toolkit,           TextLabel, "autoScrollSpeed",           INTEGER, AUTO_SCROLL_SPEED          )
@@ -270,13 +264,6 @@ void TextLabel::SetProperty( BaseObject* object, Property::Index index, const Pr
         }
         break;
       }
-
-      case Toolkit::TextLabel::Property::UNUSED_PROPERTY_TEXT_COLOR:
-      {
-        label.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, value );
-        impl.mTextUpdateNeeded = true;
-        break;
-      }
       case Toolkit::TextLabel::Property::ENABLE_MARKUP:
       {
         if( impl.mController )
@@ -662,11 +649,6 @@ Property::Value TextLabel::GetProperty( BaseObject* object, Property::Index inde
         }
         break;
       }
-      case Toolkit::TextLabel::Property::UNUSED_PROPERTY_TEXT_COLOR:
-      {
-        value = label.GetProperty( Toolkit::TextLabel::Property::TEXT_COLOR );
-        break;
-      }
       case Toolkit::TextLabel::Property::ENABLE_MARKUP:
       {
         if( impl.mController )
index 2f0c692..f35dd4b 100644 (file)
@@ -25,7 +25,6 @@
 #include <string.h>
 #include <cfloat>
 #include <dali/public-api/animation/animation.h>
-#include <dali/public-api/images/resource-image.h>
 #include <dali/public-api/math/vector2.h>
 #include <dali/public-api/math/vector4.h>
 #include <dali/public-api/object/property-map.h>
@@ -177,38 +176,32 @@ void TextSelectionPopup::SetProperty( BaseObject* object, Property::Index index,
       }
       case Toolkit::TextSelectionPopup::Property::POPUP_CLIPBOARD_BUTTON_ICON_IMAGE:
       {
-        ResourceImage image = ResourceImage::New( value.Get< std::string >() );
-        impl.SetButtonImage( Toolkit::TextSelectionPopup::CLIPBOARD, image );
+        impl.SetButtonImage( Toolkit::TextSelectionPopup::CLIPBOARD, value.Get< std::string >() );
         break;
       }
       case Toolkit::TextSelectionPopup::Property::POPUP_CUT_BUTTON_ICON_IMAGE:
       {
-        ResourceImage image = ResourceImage::New( value.Get< std::string >() );
-        impl.SetButtonImage( Toolkit::TextSelectionPopup::CUT, image );
+        impl.SetButtonImage( Toolkit::TextSelectionPopup::CUT, value.Get< std::string >() );
         break;
       }
       case Toolkit::TextSelectionPopup::Property::POPUP_COPY_BUTTON_ICON_IMAGE:
       {
-        ResourceImage image = ResourceImage::New( value.Get< std::string >() );
-        impl.SetButtonImage( Toolkit::TextSelectionPopup::COPY, image );
+        impl.SetButtonImage( Toolkit::TextSelectionPopup::COPY, value.Get< std::string >() );
         break;
       }
       case Toolkit::TextSelectionPopup::Property::POPUP_PASTE_BUTTON_ICON_IMAGE:
       {
-        ResourceImage image = ResourceImage::New( value.Get< std::string >() );
-        impl.SetButtonImage( Toolkit::TextSelectionPopup::PASTE, image );
+        impl.SetButtonImage( Toolkit::TextSelectionPopup::PASTE, value.Get< std::string >() );
         break;
       }
       case Toolkit::TextSelectionPopup::Property::POPUP_SELECT_BUTTON_ICON_IMAGE:
       {
-        ResourceImage image = ResourceImage::New( value.Get< std::string >() );
-        impl.SetButtonImage( Toolkit::TextSelectionPopup::SELECT, image );
+        impl.SetButtonImage( Toolkit::TextSelectionPopup::SELECT, value.Get< std::string >() );
         break;
       }
       case Toolkit::TextSelectionPopup::Property::POPUP_SELECT_ALL_BUTTON_ICON_IMAGE:
       {
-        ResourceImage image = ResourceImage::New( value.Get< std::string >() );
-        impl.SetButtonImage( Toolkit::TextSelectionPopup::SELECT_ALL, image );
+        impl.SetButtonImage( Toolkit::TextSelectionPopup::SELECT_ALL, value.Get< std::string >() );
         break;
       }
       case Toolkit::TextSelectionPopup::Property::POPUP_DIVIDER_COLOR:
@@ -285,56 +278,32 @@ Property::Value TextSelectionPopup::GetProperty( BaseObject* object, Property::I
       }
       case Toolkit::TextSelectionPopup::Property::POPUP_CLIPBOARD_BUTTON_ICON_IMAGE:
       {
-        ResourceImage image = ResourceImage::DownCast( impl.GetButtonImage( Toolkit::TextSelectionPopup::CLIPBOARD ) );
-        if( image )
-        {
-          value = image.GetUrl();
-        }
+        value = impl.GetButtonImage( Toolkit::TextSelectionPopup::CLIPBOARD );
         break;
       }
       case Toolkit::TextSelectionPopup::Property::POPUP_CUT_BUTTON_ICON_IMAGE:
       {
-        ResourceImage image = ResourceImage::DownCast( impl.GetButtonImage( Toolkit::TextSelectionPopup::CUT ) );
-        if( image )
-        {
-          value = image.GetUrl();
-        }
+        value = impl.GetButtonImage( Toolkit::TextSelectionPopup::CUT );
         break;
       }
       case Toolkit::TextSelectionPopup::Property::POPUP_COPY_BUTTON_ICON_IMAGE:
       {
-        ResourceImage image = ResourceImage::DownCast( impl.GetButtonImage( Toolkit::TextSelectionPopup::COPY ) );
-        if( image )
-        {
-          value = image.GetUrl();
-        }
+        value = impl.GetButtonImage( Toolkit::TextSelectionPopup::COPY );
         break;
       }
       case Toolkit::TextSelectionPopup::Property::POPUP_PASTE_BUTTON_ICON_IMAGE:
       {
-        ResourceImage image = ResourceImage::DownCast( impl.GetButtonImage( Toolkit::TextSelectionPopup::PASTE ) );
-        if( image )
-        {
-          value = image.GetUrl();
-        }
+        value = impl.GetButtonImage( Toolkit::TextSelectionPopup::PASTE );
         break;
       }
       case Toolkit::TextSelectionPopup::Property::POPUP_SELECT_BUTTON_ICON_IMAGE:
       {
-        ResourceImage image = ResourceImage::DownCast( impl.GetButtonImage( Toolkit::TextSelectionPopup::SELECT ) );
-        if( image )
-        {
-          value = image.GetUrl();
-        }
+        value = impl.GetButtonImage( Toolkit::TextSelectionPopup::SELECT );
         break;
       }
       case Toolkit::TextSelectionPopup::Property::POPUP_SELECT_ALL_BUTTON_ICON_IMAGE:
       {
-        ResourceImage image = ResourceImage::DownCast( impl.GetButtonImage( Toolkit::TextSelectionPopup::SELECT_ALL ) );
-        if( image )
-        {
-          value = image.GetUrl();
-        }
+        value = impl.GetButtonImage( Toolkit::TextSelectionPopup::SELECT_ALL );
         break;
       }
       case Toolkit::TextSelectionPopup::Property::POPUP_PRESSED_IMAGE:
@@ -557,89 +526,89 @@ Size TextSelectionPopup::GetDimensionToCustomise( const PopupCustomisations& set
   return Size::ZERO;
 }
 
-void TextSelectionPopup::SetButtonImage( Toolkit::TextSelectionPopup::Buttons button, Dali::Image image )
+void TextSelectionPopup::SetButtonImage( Toolkit::TextSelectionPopup::Buttons button, const std::string& image )
 {
    switch ( button )
    {
-   break;
-   case Toolkit::TextSelectionPopup::CLIPBOARD:
-   {
-     mClipboardIconImage  = image;
-   }
-   break;
-   case Toolkit::TextSelectionPopup::CUT :
-   {
-     mCutIconImage = image;
-   }
-   break;
-   case Toolkit::TextSelectionPopup::COPY :
-   {
-     mCopyIconImage = image;
-   }
-   break;
-   case Toolkit::TextSelectionPopup::PASTE :
-   {
-     mPasteIconImage = image;
-   }
-   break;
-   case Toolkit::TextSelectionPopup::SELECT :
-   {
-     mSelectIconImage = image;
-   }
-   break;
-   case Toolkit::TextSelectionPopup::SELECT_ALL :
-   {
-     mSelectAllIconImage = image;
-   }
-   break;
-   default :
-   {
-     DALI_ASSERT_DEBUG( "TextSelectionPopup SetPopupImage Unknown Button" );
-   }
+     case Toolkit::TextSelectionPopup::CLIPBOARD:
+     {
+       mClipboardIconImage  = image;
+       break;
+     }
+     case Toolkit::TextSelectionPopup::CUT :
+     {
+       mCutIconImage = image;
+       break;
+     }
+     case Toolkit::TextSelectionPopup::COPY :
+     {
+       mCopyIconImage = image;
+       break;
+     }
+     case Toolkit::TextSelectionPopup::PASTE :
+     {
+       mPasteIconImage = image;
+       break;
+     }
+     case Toolkit::TextSelectionPopup::SELECT :
+     {
+       mSelectIconImage = image;
+       break;
+     }
+     case Toolkit::TextSelectionPopup::SELECT_ALL :
+     {
+       mSelectAllIconImage = image;
+       break;
+     }
+     default :
+     {
+       DALI_ASSERT_DEBUG( "TextSelectionPopup SetPopupImage Unknown Button" );
+     }
    } // switch
 }
 
-Dali::Image TextSelectionPopup::GetButtonImage( Toolkit::TextSelectionPopup::Buttons button )
+std::string TextSelectionPopup::GetButtonImage( Toolkit::TextSelectionPopup::Buttons button )
 {
+  std::string buttonImageUrl;
   switch ( button )
   {
-  case Toolkit::TextSelectionPopup::CLIPBOARD :
-  {
-    return mClipboardIconImage;
-  }
-  break;
-  case Toolkit::TextSelectionPopup::CUT :
-  {
-    return mCutIconImage;
-  }
-  break;
-  case Toolkit::TextSelectionPopup::COPY :
-  {
-    return mCopyIconImage;
-  }
-  break;
-  case Toolkit::TextSelectionPopup::PASTE :
-  {
-    return mPasteIconImage;
-  }
-  break;
-  case Toolkit::TextSelectionPopup::SELECT :
-  {
-    return mSelectIconImage;
-  }
-  break;
-  case Toolkit::TextSelectionPopup::SELECT_ALL :
-  {
-    return mSelectAllIconImage;
-  }
-  break;
-  default :
-  {
-    DALI_ASSERT_DEBUG( "TextSelectionPopup GetPopupImage Unknown Button" );
-  }
+    case Toolkit::TextSelectionPopup::CLIPBOARD :
+    {
+      buttonImageUrl = mClipboardIconImage;
+      break;
+    }
+    case Toolkit::TextSelectionPopup::CUT :
+    {
+      buttonImageUrl = mCutIconImage;
+      break;
+    }
+    case Toolkit::TextSelectionPopup::COPY :
+    {
+      buttonImageUrl = mCopyIconImage;
+      break;
+    }
+    case Toolkit::TextSelectionPopup::PASTE :
+    {
+      buttonImageUrl = mPasteIconImage;
+      break;
+    }
+    case Toolkit::TextSelectionPopup::SELECT :
+    {
+      buttonImageUrl = mSelectIconImage;
+      break;
+    }
+    case Toolkit::TextSelectionPopup::SELECT_ALL :
+    {
+      buttonImageUrl = mSelectAllIconImage;
+      break;
+    }
+    default :
+    {
+      DALI_ASSERT_DEBUG( "TextSelectionPopup GetPopupImage Unknown Button" );
+    }
   } // switch
 
-  return Dali::Image();
+  return buttonImageUrl;
 }
 
 void TextSelectionPopup::SetPressedImage( const std::string& filename )
@@ -658,12 +627,12 @@ std::string TextSelectionPopup::GetPressedImage() const
    mOrderListOfButtons.reserve( 8u );
 
    // Create button for each possible option using Option priority
-   mOrderListOfButtons.push_back( ButtonRequirement( Toolkit::TextSelectionPopup::CUT, mCutOptionPriority, OPTION_CUT, POPUP_CUT_STRING , mCutIconImage, 0 != ( mEnabledButtons & Toolkit::TextSelectionPopup::CUT)  ) );
-   mOrderListOfButtons.push_back( ButtonRequirement( Toolkit::TextSelectionPopup::COPY, mCopyOptionPriority, OPTION_COPY, POPUP_COPY_STRING, mCopyIconImage, 0 != ( mEnabledButtons & Toolkit::TextSelectionPopup::COPY)  ) );
-   mOrderListOfButtons.push_back( ButtonRequirement( Toolkit::TextSelectionPopup::PASTE, mPasteOptionPriority, OPTION_PASTE, POPUP_PASTE_STRING, mPasteIconImage, 0 != ( mEnabledButtons & Toolkit::TextSelectionPopup::PASTE)  ) );
-   mOrderListOfButtons.push_back( ButtonRequirement( Toolkit::TextSelectionPopup::SELECT, mSelectOptionPriority, OPTION_SELECT_WORD, POPUP_SELECT_STRING, mSelectIconImage, 0 != ( mEnabledButtons & Toolkit::TextSelectionPopup::SELECT)  ) );
-   mOrderListOfButtons.push_back( ButtonRequirement( Toolkit::TextSelectionPopup::SELECT_ALL, mSelectAllOptionPriority, OPTION_SELECT_ALL, POPUP_SELECT_ALL_STRING, mSelectAllIconImage, 0 != ( mEnabledButtons & Toolkit::TextSelectionPopup::SELECT_ALL)  ) );
-   mOrderListOfButtons.push_back( ButtonRequirement( Toolkit::TextSelectionPopup::CLIPBOARD, mClipboardOptionPriority, OPTION_CLIPBOARD, POPUP_CLIPBOARD_STRING, mClipboardIconImage, 0 != ( mEnabledButtons & Toolkit::TextSelectionPopup::CLIPBOARD)  ) );
+   mOrderListOfButtons.push_back( ButtonRequirement( Toolkit::TextSelectionPopup::CUT, mCutOptionPriority, OPTION_CUT, POPUP_CUT_STRING , 0 != ( mEnabledButtons & Toolkit::TextSelectionPopup::CUT)  ) );
+   mOrderListOfButtons.push_back( ButtonRequirement( Toolkit::TextSelectionPopup::COPY, mCopyOptionPriority, OPTION_COPY, POPUP_COPY_STRING, 0 != ( mEnabledButtons & Toolkit::TextSelectionPopup::COPY)  ) );
+   mOrderListOfButtons.push_back( ButtonRequirement( Toolkit::TextSelectionPopup::PASTE, mPasteOptionPriority, OPTION_PASTE, POPUP_PASTE_STRING, 0 != ( mEnabledButtons & Toolkit::TextSelectionPopup::PASTE)  ) );
+   mOrderListOfButtons.push_back( ButtonRequirement( Toolkit::TextSelectionPopup::SELECT, mSelectOptionPriority, OPTION_SELECT_WORD, POPUP_SELECT_STRING, 0 != ( mEnabledButtons & Toolkit::TextSelectionPopup::SELECT)  ) );
+   mOrderListOfButtons.push_back( ButtonRequirement( Toolkit::TextSelectionPopup::SELECT_ALL, mSelectAllOptionPriority, OPTION_SELECT_ALL, POPUP_SELECT_ALL_STRING, 0 != ( mEnabledButtons & Toolkit::TextSelectionPopup::SELECT_ALL)  ) );
+   mOrderListOfButtons.push_back( ButtonRequirement( Toolkit::TextSelectionPopup::CLIPBOARD, mClipboardOptionPriority, OPTION_CLIPBOARD, POPUP_CLIPBOARD_STRING, 0 != ( mEnabledButtons & Toolkit::TextSelectionPopup::CLIPBOARD)  ) );
 
    // Sort the buttons according their priorities.
    std::sort( mOrderListOfButtons.begin(), mOrderListOfButtons.end(), TextSelectionPopup::ButtonPriorityCompare() );
index a79a925..9cd7ab7 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_TEXT_SELECTION_POPUP_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
  *
  */
 
+// EXTERNAL INCLUDES
+#include <string>
+#include <dali/public-api/actors/layer.h>
+#include <dali/public-api/object/property-map.h>
+
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control-impl.h>
 #include <dali-toolkit/public-api/controls/buttons/push-button.h>
 #include <dali-toolkit/devel-api/controls/text-controls/text-selection-popup.h>
 #include <dali-toolkit/devel-api/controls/text-controls/text-selection-toolbar.h>
 
-// EXTERNAL INCLUDES
-#include <dali/public-api/actors/layer.h>
-#include <dali/public-api/object/property-map.h>
-
 namespace Dali
 {
 
@@ -58,7 +59,6 @@ public:
       priority( 0u ),
       name(),
       caption(),
-      icon(),
       enabled( false )
     {}
 
@@ -66,13 +66,11 @@ public:
                        std::size_t buttonPriority,
                        const std::string& buttonName,
                        const std::string& buttonCaption,
-                       Dali::Image& buttonIcon,
                        bool buttonEnabled )
     : id( buttonId ),
       priority( buttonPriority ),
       name( buttonName ),
       caption( buttonCaption ),
-      icon( buttonIcon ),
       enabled( buttonEnabled )
     {}
 
@@ -80,7 +78,6 @@ public:
     std::size_t priority;
     std::string name;
     std::string caption;
-    Dali::Image icon;
     bool enabled;
   };
 
@@ -211,7 +208,7 @@ private: // Implementation
    * @param[in] button  The button the image should be used for from the Buttons Enum.
    * @param[in] image The image to use.
    */
- void SetButtonImage( Toolkit::TextSelectionPopup::Buttons button, Dali::Image image );
+ void SetButtonImage( Toolkit::TextSelectionPopup::Buttons button, const std::string& image );
 
   /**
    * @brief Retrieves the image of the given button used by the popup
@@ -219,7 +216,7 @@ private: // Implementation
    * @param[in] button The button to get the image from
    * @return The image used for that button.
    */
-  Dali::Image GetButtonImage( Toolkit::TextSelectionPopup::Buttons button );
+  std::string GetButtonImage( Toolkit::TextSelectionPopup::Buttons button );
 
   /**
    * @brief Sets the image for the pressed state of a popup option.
@@ -273,13 +270,13 @@ private: // Data
 
   Dali::Toolkit::TableView mTableOfButtons;           // Actor which holds all the buttons, sensitivity can be set on buttons via this actor
 
-  // Images to be used by the Popup buttons
-  Image mCutIconImage;
-  Image mCopyIconImage;
-  Image mPasteIconImage;
-  Image mClipboardIconImage;
-  Image mSelectIconImage;
-  Image mSelectAllIconImage;
+  // Images paths to be used by the Popup buttons
+  std::string mCutIconImage;
+  std::string mCopyIconImage;
+  std::string mPasteIconImage;
+  std::string mClipboardIconImage;
+  std::string mSelectIconImage;
+  std::string mSelectAllIconImage;
 
   Size mPopupMaxSize;                   // Maximum size of the Popup
   Size mOptionMaxSize;                  // Maximum size of an Option button
index 66f747e..504e453 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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,6 @@
 
 // EXTERNAL INCLUDES
 #include <cfloat>
-#include <dali/public-api/images/buffer-image.h>
 #include <dali/public-api/math/vector2.h>
 #include <dali/public-api/math/vector4.h>
 #include <dali/public-api/object/property-map.h>
index d85be9a..cb5bfcd 100755 (executable)
@@ -611,7 +611,7 @@ void VideoView::SetWindowSurfaceTarget()
 {
   Actor self = Self();
 
-  if( !self.OnStage() )
+  if( !self.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
   {
     // When the control is off the stage, it does not have Window.
     return;
@@ -736,11 +736,11 @@ void VideoView::UpdateDisplayArea( Dali::PropertyNotification& source )
 
   Actor self( Self() );
 
-  bool positionUsesAnchorPoint = self.GetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT ).Get< bool >();
+  bool positionUsesAnchorPoint = self.GetProperty( Actor::Property::POSITION_USES_ANCHOR_POINT ).Get< bool >();
   Vector3 actorSize = self.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ) * self.GetCurrentProperty< Vector3 >( Actor::Property::SCALE );
   Vector3 anchorPointOffSet = actorSize * ( positionUsesAnchorPoint ? self.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ) : AnchorPoint::TOP_LEFT );
 
-  Vector2 screenPosition = self.GetProperty( DevelActor::Property::SCREEN_POSITION ).Get< Vector2 >();
+  Vector2 screenPosition = self.GetProperty( Actor::Property::SCREEN_POSITION ).Get< Vector2 >();
 
   mDisplayArea.x = screenPosition.x - anchorPointOffSet.x;
   mDisplayArea.y = screenPosition.y - anchorPointOffSet.y;
index 3d345a3..200ab10 100755 (executable)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_VIDEO_VIEW_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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,6 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/object/property-map.h>
-#include <dali/public-api/images/native-image.h>
 #include <dali/public-api/object/property-notification.h>
 #include <dali/public-api/object/property-conditions.h>
 #include <dali/public-api/rendering/renderer.h>
index b0d81de..a46fb1f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
 #include <dali/devel-api/scripting/enum-helper.h>
 #include <dali/devel-api/scripting/scripting.h>
 #include <dali/public-api/common/stage.h>
-#include <dali/public-api/images/native-image.h>
 #include <dali/public-api/adaptor-framework/native-image-source.h>
 #include <dali/public-api/object/type-registry.h>
 #include <dali/public-api/object/type-registry-helper.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/devel-api/controls/control-devel.h>
+#include <dali-toolkit/devel-api/image-loader/texture-manager.h>
 #include <dali-toolkit/internal/visuals/visual-factory-impl.h>
 
 namespace Dali
@@ -136,7 +136,7 @@ Toolkit::WebView WebView::New( const std::string& locale, const std::string& tim
 
 void WebView::OnInitialize()
 {
-  Self().SetKeyboardFocusable( true );
+  Self().SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
   Self().TouchSignal().Connect( this, &WebView::OnTouchEvent );
 
   if( mWebEngine )
@@ -152,8 +152,11 @@ void WebView::LoadUrl( const std::string& url )
   mUrl = url;
   if( mWebEngine )
   {
-    Dali::Image image = Dali::NativeImage::New( *mWebEngine.GetNativeImageSource() );
-    mVisual = Toolkit::VisualFactory::Get().CreateVisual( image );
+    Texture texture = Dali::Texture::New( *mWebEngine.GetNativeImageSource() );
+    const std::string nativeImageUrl = Dali::Toolkit::TextureManager::AddTexture( texture );
+    mVisual = Toolkit::VisualFactory::Get().CreateVisual(
+      { { Toolkit::Visual::Property::TYPE,  Toolkit::Visual::IMAGE } ,
+        { Toolkit::ImageVisual::Property::URL, nativeImageUrl } } );
 
     if( mVisual )
     {
@@ -168,8 +171,11 @@ void WebView::LoadHTMLString( const std::string& htmlString )
 {
   if( mWebEngine )
   {
-    Dali::Image image = Dali::NativeImage::New( *mWebEngine.GetNativeImageSource() );
-    mVisual = Toolkit::VisualFactory::Get().CreateVisual( image );
+    Texture texture = Dali::Texture::New( *mWebEngine.GetNativeImageSource() );
+    const std::string nativeImageUrl = Dali::Toolkit::TextureManager::AddTexture( texture );
+    mVisual = Toolkit::VisualFactory::Get().CreateVisual(
+      { { Toolkit::Visual::Property::TYPE,  Toolkit::Visual::IMAGE } ,
+        { Toolkit::ImageVisual::Property::URL, nativeImageUrl } } );
 
     if( mVisual )
     {
index 06c3156..f1aec26 100755 (executable)
@@ -51,7 +51,7 @@ void DragAndDropDetector::Attach(Dali::Toolkit::Control& control)
     }
     mControls.push_back(control);
     control.TouchSignal().Connect(this, &DragAndDropDetector::OnDrag);
-    mFirstEnter.push_back(control.GetId());
+    mFirstEnter.push_back(control.GetProperty< int >( Actor::Property::ID ));
     mPanGestureDetector.Attach(control);
     mPanGestureDetector.DetectedSignal().Connect(this, &DragAndDropDetector::OnPan);
   }
@@ -73,7 +73,7 @@ void DragAndDropDetector::Detach(Dali::Toolkit::Control& control)
     {
       match->TouchSignal().Disconnect(this, &DragAndDropDetector::OnDrag);
       mPanGestureDetector.Detach(*match);
-      mFirstEnter.erase(std::find(mFirstEnter.begin(), mFirstEnter.end(), control.GetId()));
+      mFirstEnter.erase(std::find(mFirstEnter.begin(), mFirstEnter.end(), control.GetProperty< int >( Actor::Property::ID )));
       mControls.erase(match);
     }
   }
@@ -131,7 +131,7 @@ void DragAndDropDetector::OnPan(Dali::Actor actor, const PanGesture& gesture)
     mFirstEnter.clear();
     for( auto&& control : mControls)
     {
-      mFirstEnter.push_back(control.GetId());
+      mFirstEnter.push_back(control.GetProperty< int >( Actor::Property::ID ));
     }
     float width = control.GetProperty<float>(Dali::Actor::Property::SIZE_WIDTH);
     float height = control.GetProperty<float>(Dali::Actor::Property::SIZE_HEIGHT);
@@ -169,7 +169,7 @@ bool DragAndDropDetector::OnDrag(Dali::Actor actor, const Dali::TouchData& data)
   {
     if(mDragControl != control && mPointDown)
     {
-      auto found = std::find(mFirstEnter.begin(), mFirstEnter.end(), control.GetId());
+      auto found = std::find(mFirstEnter.begin(), mFirstEnter.end(), control.GetProperty< int >( Actor::Property::ID ));
       if(mFirstEnter.end() != found)
       {
         SetPosition(data.GetScreenPosition(0));
@@ -188,7 +188,7 @@ bool DragAndDropDetector::OnDrag(Dali::Actor actor, const Dali::TouchData& data)
   {
     if(mDragControl != control && mPointDown)
     {
-      mFirstEnter.push_back(control.GetId());
+      mFirstEnter.push_back(control.GetProperty< int >( Actor::Property::ID ));
       EmitExitedSignal(control);
     }
   }
index 89e280f..e4eb16b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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,7 +31,6 @@
 #include <dali/public-api/object/type-registry.h>
 #include <dali/public-api/object/type-registry-helper.h>
 #include <dali/public-api/object/property-map.h>
-#include <dali/public-api/images/resource-image.h>
 #include <dali/integration-api/debug.h>
 #include <dali/integration-api/adaptor-framework/adaptor.h>
 #include <dali/integration-api/adaptor-framework/scene-holder.h>
@@ -203,7 +202,7 @@ bool KeyboardFocusManager::SetCurrentFocusActor( Actor actor )
 bool KeyboardFocusManager::DoSetCurrentFocusActor( Actor actor )
 {
   bool success = false;
-  if( actor && actor.IsKeyboardFocusable() && actor.OnStage() )
+  if( actor && actor.GetProperty< bool >( Actor::Property::KEYBOARD_FOCUSABLE ) && actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
   {
     Integration::SceneHolder currentWindow = Integration::SceneHolder::Get( actor );
 
@@ -227,7 +226,7 @@ bool KeyboardFocusManager::DoSetCurrentFocusActor( Actor actor )
   }
 
   // Check whether the actor is in the stage and is keyboard focusable.
-  if( actor && actor.IsKeyboardFocusable() && actor.OnStage() )
+  if( actor && actor.GetProperty< bool >( Actor::Property::KEYBOARD_FOCUSABLE ) && actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
   {
     if( ( mIsFocusIndicatorShown == SHOW ) && ( mEnableFocusIndicator == ENABLE ) )
     {
@@ -301,7 +300,7 @@ Actor KeyboardFocusManager::GetCurrentFocusActor()
 {
   Actor actor = mCurrentFocusActor.GetHandle();
 
-  if( actor && ! actor.OnStage() )
+  if( actor && ! actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
   {
     // If the actor has been removed from the stage, then it should not be focused
     actor.Reset();
@@ -323,7 +322,7 @@ Actor KeyboardFocusManager::GetFocusActorFromCurrentWindow()
     }
   }
 
-  if( actor && ! actor.OnStage() )
+  if( actor && ! actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
   {
     // If the actor has been removed from the window, then the window doesn't have any focused actor
     actor.Reset();
@@ -353,7 +352,7 @@ void KeyboardFocusManager::MoveFocusBackward()
       Actor target = mFocusHistory[ mFocusHistory.size() -1 ].GetHandle();
 
       // Impl of Actor is not null
-      if( target && target.OnStage() )
+      if( target && target.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
       {
         // Delete pre focused actor in history because it will pushed again by SetCurrentFocusActor()
         mFocusHistory.pop_back();
@@ -504,7 +503,7 @@ bool KeyboardFocusManager::MoveFocus(Toolkit::Control::KeyboardFocus::Direction
       }
     }
 
-    if( nextFocusableActor && nextFocusableActor.IsKeyboardFocusable() )
+    if( nextFocusableActor && nextFocusableActor.GetProperty< bool >( Actor::Property::KEYBOARD_FOCUSABLE ) )
     {
       // Whether the next focusable actor is a layout control
       if( IsLayoutControl( nextFocusableActor ) )
@@ -530,7 +529,7 @@ bool KeyboardFocusManager::DoMoveFocusWithinLayoutControl(Toolkit::Control contr
   Actor nextFocusableActor = GetImplementation( control ).GetNextKeyboardFocusableActor(actor, direction, mFocusGroupLoopEnabled);
   if(nextFocusableActor)
   {
-    if(!nextFocusableActor.IsKeyboardFocusable())
+    if(!nextFocusableActor.GetProperty< bool >( Actor::Property::KEYBOARD_FOCUSABLE ))
     {
       // If the actor is not focusable, ask the same layout control for the next actor to focus
       return DoMoveFocusWithinLayoutControl(control, nextFocusableActor, direction);
@@ -549,7 +548,7 @@ bool KeyboardFocusManager::DoMoveFocusWithinLayoutControl(Toolkit::Control contr
         mIsWaitingKeyboardFocusChangeCommit = false;
       }
 
-      if (committedFocusActor && committedFocusActor.IsKeyboardFocusable())
+      if (committedFocusActor && committedFocusActor.GetProperty< bool >( Actor::Property::KEYBOARD_FOCUSABLE ))
       {
         // Whether the commited focusable actor is a layout control
         if(IsLayoutControl(committedFocusActor))
index 65a5f68..a495768 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
 #include <dali/public-api/common/stage.h>
 #include <dali/public-api/events/touch-data.h>
 #include <dali/public-api/events/pan-gesture.h>
-#include <dali/public-api/images/resource-image.h>
 #include <dali/public-api/object/property-notification.h>
 #include <dali/public-api/rendering/geometry.h>
 #include <dali/public-api/rendering/renderer.h>
+#include <dali/devel-api/adaptor-framework/image-loading.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/image-view/image-view.h>
@@ -795,7 +795,7 @@ struct Decorator::Impl : public ConnectionTracker
     HandleImpl& grabHandle = mHandle[GRAB_HANDLE];
     if( !grabHandle.actor )
     {
-      if( mHandleImages[GRAB_HANDLE][HANDLE_IMAGE_RELEASED] )
+      if( mHandleImages[GRAB_HANDLE][HANDLE_IMAGE_RELEASED].size() )
       {
         grabHandle.actor = ImageView::New( mHandleImages[GRAB_HANDLE][HANDLE_IMAGE_RELEASED] );
         GetImpl( grabHandle.actor).SetDepthIndex( DepthIndex::DECORATION );
@@ -848,9 +848,9 @@ struct Decorator::Impl : public ConnectionTracker
     }
   }
 
-  void CreateHandleMarker( HandleImpl& handle, Image& image, HandleType handleType )
+  void CreateHandleMarker( HandleImpl& handle, const std::string& image, HandleType handleType )
   {
-    if( image )
+    if( image.size() )
     {
       handle.markerActor = ImageView::New( image );
       handle.markerActor.SetProperty( Actor::Property::COLOR, mHandleColor );
@@ -876,7 +876,7 @@ struct Decorator::Impl : public ConnectionTracker
     HandleImpl& primary = mHandle[ LEFT_SELECTION_HANDLE ];
     if( !primary.actor )
     {
-      if( mHandleImages[LEFT_SELECTION_HANDLE][HANDLE_IMAGE_RELEASED] )
+      if( mHandleImages[LEFT_SELECTION_HANDLE][HANDLE_IMAGE_RELEASED].size() )
       {
         primary.actor = ImageView::New( mHandleImages[LEFT_SELECTION_HANDLE][HANDLE_IMAGE_RELEASED] );
 #ifdef DECORATOR_DEBUG
@@ -920,7 +920,7 @@ struct Decorator::Impl : public ConnectionTracker
     HandleImpl& secondary = mHandle[ RIGHT_SELECTION_HANDLE ];
     if( !secondary.actor )
     {
-      if( mHandleImages[RIGHT_SELECTION_HANDLE][HANDLE_IMAGE_RELEASED] )
+      if( mHandleImages[RIGHT_SELECTION_HANDLE][HANDLE_IMAGE_RELEASED].size() )
       {
         secondary.actor = ImageView::New( mHandleImages[RIGHT_SELECTION_HANDLE][HANDLE_IMAGE_RELEASED] );
 #ifdef DECORATOR_DEBUG
@@ -1121,7 +1121,7 @@ struct Decorator::Impl : public ConnectionTracker
     // Chooses between the released or pressed image. It checks whether the pressed image exists.
     if( handle.actor )
     {
-      const HandleImageType imageType = ( handle.pressed ? ( mHandleImages[type][HANDLE_IMAGE_PRESSED] ? HANDLE_IMAGE_PRESSED : HANDLE_IMAGE_RELEASED ) : HANDLE_IMAGE_RELEASED );
+      const HandleImageType imageType = ( handle.pressed ? ( mHandleImages[type][HANDLE_IMAGE_PRESSED].size() ? HANDLE_IMAGE_PRESSED : HANDLE_IMAGE_RELEASED ) : HANDLE_IMAGE_RELEASED );
 
       handle.actor.SetImage( mHandleImages[type][imageType] );
     }
@@ -1130,7 +1130,7 @@ struct Decorator::Impl : public ConnectionTracker
     {
       if( handle.markerActor )
       {
-        const HandleImageType markerImageType = ( handle.pressed ? ( mHandleImages[markerType][HANDLE_IMAGE_PRESSED] ? HANDLE_IMAGE_PRESSED : HANDLE_IMAGE_RELEASED ) : HANDLE_IMAGE_RELEASED );
+        const HandleImageType markerImageType = ( handle.pressed ? ( mHandleImages[markerType][HANDLE_IMAGE_PRESSED].size() ? HANDLE_IMAGE_PRESSED : HANDLE_IMAGE_RELEASED ) : HANDLE_IMAGE_RELEASED );
         handle.markerActor.SetImage( mHandleImages[markerType][markerImageType] );
       }
     }
@@ -1755,12 +1755,14 @@ struct Decorator::Impl : public ConnectionTracker
     mPopupBottomExceedNotification.NotifySignal().Connect( this, &Decorator::Impl::PopUpLeavesBottomBoundary );
   }
 
-  void SetHandleImage( HandleType handleType, HandleImageType handleImageType, Dali::Image image )
+  void SetHandleImage( HandleType handleType, HandleImageType handleImageType, const std::string& imageFileName )
   {
+    ImageDimensions dimensions = Dali::GetOriginalImageSize( imageFileName );
+
     HandleImpl& handle = mHandle[handleType];
-    handle.size = Size( image.GetWidth(), image.GetHeight() );
+    handle.size = Size( dimensions.GetWidth(), dimensions.GetHeight() );
 
-    mHandleImages[handleType][handleImageType] = image;
+    mHandleImages[handleType][handleImageType] = imageFileName;
   }
 
   void SetScrollThreshold( float threshold )
@@ -1898,7 +1900,7 @@ struct Decorator::Impl : public ConnectionTracker
   TextSelectionPopup::Buttons mEnabledPopupButtons; /// Bit mask of currently enabled Popup buttons
   TextSelectionPopupCallbackInterface& mTextSelectionPopupCallbackInterface;
 
-  Image               mHandleImages[HANDLE_TYPE_COUNT][HANDLE_IMAGE_TYPE_COUNT];
+  std::string         mHandleImages[HANDLE_TYPE_COUNT][HANDLE_IMAGE_TYPE_COUNT];
   Vector4             mHandleColor;
 
   CursorImpl          mCursor[CURSOR_COUNT];
@@ -2109,11 +2111,11 @@ void Decorator::SetHandleActive( HandleType handleType, bool active )
     // The problem is the handle actor does not receive the touch event with the Interrupt
     // state when the power button is pressed and the application goes to background.
     mImpl->mHandle[handleType].pressed = false;
-    Image imageReleased = mImpl->mHandleImages[handleType][HANDLE_IMAGE_RELEASED];
+    const bool imageReleased = mImpl->mHandleImages[handleType][HANDLE_IMAGE_RELEASED].size();
     ImageView imageView = mImpl->mHandle[handleType].actor;
     if( imageReleased && imageView )
     {
-      imageView.SetImage( imageReleased );
+      imageView.SetImage( mImpl->mHandleImages[handleType][HANDLE_IMAGE_RELEASED] );
     }
   }
 
@@ -2124,12 +2126,12 @@ bool Decorator::IsHandleActive( HandleType handleType ) const
   return mImpl->mHandle[handleType].active ;
 }
 
-void Decorator::SetHandleImage( HandleType handleType, HandleImageType handleImageType, Dali::Image image )
+void Decorator::SetHandleImage( HandleType handleType, HandleImageType handleImageType, const std::string& imageFileName )
 {
-  mImpl->SetHandleImage( handleType, handleImageType, image );
+  mImpl->SetHandleImage( handleType, handleImageType, imageFileName );
 }
 
-Dali::Image Decorator::GetHandleImage( HandleType handleType, HandleImageType handleImageType ) const
+const std::string& Decorator::GetHandleImage( HandleType handleType, HandleImageType handleImageType ) const
 {
   return mImpl->mHandleImages[handleType][handleImageType];
 }
index 36adee4..8d0894f 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_DECORATOR_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -353,23 +353,23 @@ public:
   bool IsHandleActive( HandleType handleType ) const;
 
   /**
-   * @brief Sets the image for one of the handles.
+   * @brief Sets the image file name for one of the handles.
    *
    * @param[in] handleType One of the handles.
    * @param[in] handleImageType A different image can be set for the pressed/released states.
-   * @param[in] image The image to use.
+   * @param[in] imageFileName The image filename to use.
    */
-  void SetHandleImage( HandleType handleType, HandleImageType handleImageType, Dali::Image image );
+  void SetHandleImage( HandleType handleType, HandleImageType handleImageType, const std::string& imageFileName );
 
   /**
-   * @brief Retrieves the image for one of the handles.
+   * @brief Retrieves the file name of the image for one of the handles.
    *
    * @param[in] handleType One of the handles.
    * @param[in] handleImageType A different image can be set for the pressed/released states.
    *
-   * @return The grab handle image.
+   * @return The grab handle image string.
    */
-  Dali::Image GetHandleImage( HandleType handleType, HandleImageType handleImageType ) const;
+  const std::string& GetHandleImage( HandleType handleType, HandleImageType handleImageType ) const;
 
   /**
    * @brief Sets the color of the handles
index 3b567ef..044b9e3 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_ATLAS_MANAGER_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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,6 @@
 // EXTERNAL INCLUDES
 #include <stdint.h>
 #include <dali/public-api/common/dali-vector.h>
-#include <dali/public-api/images/buffer-image.h>
 #include <dali/public-api/rendering/texture-set.h>
 
 namespace Dali
@@ -189,7 +188,7 @@ public:
                          bool addReference = true );
 
   /**
-   * @brief Get the BufferImage containing an atlas
+   * @brief Get the Texture containing an atlas
    *
    * @param[in] atlas AtlasId returned when atlas was created
    *
index cb09223..95f54bc 100755 (executable)
@@ -835,6 +835,16 @@ void Controller::SetDefaultFontFamily( const std::string& defaultFontFamily )
   DALI_LOG_INFO( gLogFilter, Debug::General, "Controller::SetDefaultFontFamily %s\n", defaultFontFamily.c_str());
   mImpl->mFontDefaults->familyDefined = !defaultFontFamily.empty();
 
+  if( mImpl->mEventData )
+  {
+    // Update the cursor position if it's in editing mode
+    if( EventData::IsEditingState( mImpl->mEventData->mState ) )
+    {
+      mImpl->mEventData->mDecoratorUpdated = true;
+      mImpl->mEventData->mUpdateCursorPosition = true; // Cursor position should be updated when the font family is updated.
+    }
+  }
+
   // Clear the font-specific data
   ClearFontData();
 
@@ -888,6 +898,16 @@ void Controller::SetDefaultFontWeight( FontWeight weight )
   mImpl->mFontDefaults->mFontDescription.weight = weight;
   mImpl->mFontDefaults->weightDefined = true;
 
+  if( mImpl->mEventData )
+  {
+    // Update the cursor position if it's in editing mode
+    if( EventData::IsEditingState( mImpl->mEventData->mState ) )
+    {
+      mImpl->mEventData->mDecoratorUpdated = true;
+      mImpl->mEventData->mUpdateCursorPosition = true; // Cursor position should be updated when the font weight is updated.
+    }
+  }
+
   // Clear the font-specific data
   ClearFontData();
 
@@ -959,6 +979,16 @@ void Controller::SetDefaultFontWidth( FontWidth width )
   mImpl->mFontDefaults->mFontDescription.width = width;
   mImpl->mFontDefaults->widthDefined = true;
 
+  if( mImpl->mEventData )
+  {
+    // Update the cursor position if it's in editing mode
+    if( EventData::IsEditingState( mImpl->mEventData->mState ) )
+    {
+      mImpl->mEventData->mDecoratorUpdated = true;
+      mImpl->mEventData->mUpdateCursorPosition = true; // Cursor position should be updated when the font width is updated.
+    }
+  }
+
   // Clear the font-specific data
   ClearFontData();
 
@@ -1030,6 +1060,16 @@ void Controller::SetDefaultFontSlant( FontSlant slant )
   mImpl->mFontDefaults->mFontDescription.slant = slant;
   mImpl->mFontDefaults->slantDefined = true;
 
+  if( mImpl->mEventData )
+  {
+    // Update the cursor position if it's in editing mode
+    if( EventData::IsEditingState( mImpl->mEventData->mState ) )
+    {
+      mImpl->mEventData->mDecoratorUpdated = true;
+      mImpl->mEventData->mUpdateCursorPosition = true; // Cursor position should be updated when the font slant is updated.
+    }
+  }
+
   // Clear the font-specific data
   ClearFontData();
 
@@ -1119,6 +1159,16 @@ void Controller::SetDefaultFontSize( float fontSize, FontSizeType type )
     }
   }
 
+  if( mImpl->mEventData )
+  {
+    // Update the cursor position if it's in editing mode
+    if( EventData::IsEditingState( mImpl->mEventData->mState ) )
+    {
+      mImpl->mEventData->mDecoratorUpdated = true;
+      mImpl->mEventData->mUpdateCursorPosition = true; // Cursor position should be updated when the font size is updated.
+    }
+  }
+
   // Clear the font-specific data
   ClearFontData();
 
index d4e2f6e..d871c87 100755 (executable)
@@ -216,7 +216,7 @@ AnimatedGradientVisualPtr AnimatedGradientVisual::New( VisualFactoryCache& facto
 }
 
 AnimatedGradientVisual::AnimatedGradientVisual( VisualFactoryCache& factoryCache )
-: Visual::Base( factoryCache, Visual::FittingMode::FILL )
+: Visual::Base( factoryCache, Visual::FittingMode::FILL, static_cast<Toolkit::Visual::Type>( Toolkit::DevelVisual::ANIMATED_GRADIENT ) )
 {
   SetupDefaultValue();
 }
index a0ebe45..386013a 100755 (executable)
@@ -168,7 +168,7 @@ void AnimatedImageVisual::InitializeGif( const VisualUrl& imageUrl )
 }
 
 AnimatedImageVisual::AnimatedImageVisual( VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory )
-: Visual::Base( factoryCache, Visual::FittingMode::FIT_KEEP_ASPECT_RATIO ),
+: Visual::Base( factoryCache, Visual::FittingMode::FIT_KEEP_ASPECT_RATIO, Toolkit::Visual::ANIMATED_IMAGE ),
   mFrameDelayTimer(),
   mPlacementActor(),
   mImageVisualShaderFactory( shaderFactory ),
index bf3b519..e7255ea 100644 (file)
@@ -84,7 +84,7 @@ AnimatedVectorImageVisualPtr AnimatedVectorImageVisual::New( VisualFactoryCache&
 }
 
 AnimatedVectorImageVisual::AnimatedVectorImageVisual( VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl )
-: Visual::Base( factoryCache, Visual::FittingMode::FILL ),
+: Visual::Base( factoryCache, Visual::FittingMode::FILL, static_cast<Toolkit::Visual::Type>( Toolkit::DevelVisual::ANIMATED_VECTOR_IMAGE ) ),
   mUrl( imageUrl ),
   mAnimationData(),
   mVectorAnimationTask( new VectorAnimationTask( factoryCache, imageUrl.GetUrl() ) ),
index 6072ce5..55968e1 100644 (file)
@@ -74,7 +74,8 @@ VectorAnimationTask::VectorAnimationTask( VisualFactoryCache& factoryCache, cons
   mForward( true ),
   mUpdateFrameNumber( false ),
   mNeedAnimationFinishedTrigger( true ),
-  mAnimationDataUpdated( false )
+  mAnimationDataUpdated( false ),
+  mDestroyTask( false )
 {
   Initialize();
 }
@@ -95,6 +96,8 @@ void VectorAnimationTask::Finalize()
   }
 
   mVectorRenderer.Finalize();
+
+  mDestroyTask = true;
 }
 
 void VectorAnimationTask::SetRenderer( Renderer renderer )
@@ -372,6 +375,15 @@ bool VectorAnimationTask::Rasterize()
   bool stopped = false;
   uint32_t currentFrame;
 
+  {
+    ConditionalWait::ScopedLock lock( mConditionalWait );
+    if( mDestroyTask )
+    {
+      // The task will be destroyed. We don't need rasterization.
+      return false;
+    }
+  }
+
   ApplyAnimationData();
 
   if( mPlayState == PlayState::PLAYING && mUpdateFrameNumber )
index 8e91788..79c3ee2 100644 (file)
@@ -314,7 +314,7 @@ private:
   bool                                   mUpdateFrameNumber;
   bool                                   mNeedAnimationFinishedTrigger;
   bool                                   mAnimationDataUpdated;
-
+  bool                                   mDestroyTask;
 };
 
 } // namespace Internal
index a1eb02a..71bb538 100644 (file)
@@ -23,6 +23,7 @@
 
 //INTERNAL INCLUDES
 #include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/devel-api/visuals/arc-visual-actions-devel.h>
 #include <dali-toolkit/internal/visuals/visual-factory-impl.h>
 #include <dali-toolkit/internal/visuals/visual-factory-cache.h>
 #include <dali-toolkit/internal/visuals/visual-string-constants.h>
@@ -153,12 +154,15 @@ ArcVisualPtr ArcVisual::New( VisualFactoryCache& factoryCache, const Property::M
 }
 
 ArcVisual::ArcVisual( VisualFactoryCache& factoryCache )
-: Visual::Base( factoryCache, Visual::FittingMode::FILL ),
+: Visual::Base( factoryCache, Visual::FittingMode::FILL, static_cast<Toolkit::Visual::Type>( Toolkit::DevelVisual::ARC ) ),
   mThickness( 0.0f ),
   mRadius( 0.0f ),
   mStartAngle( 0.0f ),
   mSweepAngle( 360.0f ),
   mRadiusIndex( Property::INVALID_INDEX ),
+  mThicknessIndex( Property::INVALID_INDEX ),
+  mStartAngleIndex( Property::INVALID_INDEX ),
+  mSweepAngleIndex( Property::INVALID_INDEX ),
   mCapType( DevelArcVisual::Cap::BUTT )
 {
 }
@@ -176,6 +180,16 @@ void ArcVisual::DoSetProperties( const Property::Map& propertyMap )
     {
       DALI_LOG_ERROR( "ArcVisual:DoSetProperties:: THICKNESS property has incorrect type: %d\n", thicknessValue->GetType() );
     }
+    else
+    {
+      if( mImpl->mRenderer )
+      {
+        mImpl->mRenderer.SetProperty( mThicknessIndex, mThickness );
+
+        // Need to calculate radius again
+        OnSetTransform();
+      }
+    }
   }
 
   Property::Value* startAngleValue = propertyMap.Find( Toolkit::DevelArcVisual::Property::START_ANGLE, START_ANGLE_NAME );
@@ -185,6 +199,13 @@ void ArcVisual::DoSetProperties( const Property::Map& propertyMap )
     {
       DALI_LOG_ERROR( "ArcVisual:DoSetProperties:: START_ANGLE property has incorrect type: %d\n", startAngleValue->GetType() );
     }
+    else
+    {
+      if( mImpl->mRenderer )
+      {
+        mImpl->mRenderer.SetProperty( mStartAngleIndex, mStartAngle );
+      }
+    }
   }
 
   Property::Value* sweepAngleValue = propertyMap.Find( Toolkit::DevelArcVisual::Property::SWEEP_ANGLE, SWEEP_ANGLE_NAME );
@@ -194,6 +215,13 @@ void ArcVisual::DoSetProperties( const Property::Map& propertyMap )
     {
       DALI_LOG_ERROR( "ArcVisual:DoSetProperties:: SWEEP_ANGLE property has incorrect type: %d\n", sweepAngleValue->GetType() );
     }
+    else
+    {
+      if( mImpl->mRenderer )
+      {
+        mImpl->mRenderer.SetProperty( mSweepAngleIndex, mSweepAngle );
+      }
+    }
   }
 
   Property::Value* capValue = propertyMap.Find( Toolkit::DevelArcVisual::Property::CAP, CAP_NAME );
@@ -241,6 +269,23 @@ void ArcVisual::OnSetTransform()
   }
 }
 
+void ArcVisual::OnDoAction( const Property::Index actionId, const Property::Value& attributes )
+{
+  // Check if action is valid for this visual type and perform action if possible
+  switch( actionId )
+  {
+    case DevelArcVisual::Action::UPDATE_PROPERTY:
+    {
+      Property::Map* map = attributes.GetMap();
+      if( map )
+      {
+        DoSetProperties( *map );
+      }
+      break;
+    }
+  }
+}
+
 void ArcVisual::InitializeRenderer()
 {
   Geometry geometry = mFactoryCache.GetGeometry( VisualFactoryCache::QUAD_GEOMETRY );
@@ -267,10 +312,9 @@ void ArcVisual::InitializeRenderer()
 
   mImpl->mRenderer = Renderer::New( geometry, shader );
 
-  mImpl->mRenderer.RegisterProperty( THICKNESS_NAME, mThickness );
-  mImpl->mRenderer.RegisterProperty( START_ANGLE_NAME, mStartAngle );
-  mImpl->mRenderer.RegisterProperty( SWEEP_ANGLE_NAME, mSweepAngle );
-  mImpl->mRenderer.RegisterProperty( CAP_NAME, 0.0f );
+  mThicknessIndex = mImpl->mRenderer.RegisterProperty( THICKNESS_NAME, mThickness );
+  mStartAngleIndex = mImpl->mRenderer.RegisterProperty( START_ANGLE_NAME, mStartAngle );
+  mSweepAngleIndex = mImpl->mRenderer.RegisterProperty( SWEEP_ANGLE_NAME, mSweepAngle );
 
   mRadiusIndex = mImpl->mRenderer.RegisterProperty( RADIUS_NAME, mRadius );
 
index e9fa083..3de0473 100644 (file)
@@ -103,6 +103,11 @@ protected:
    */
   void OnSetTransform() override;
 
+  /**
+   * @copydoc Visual::Base::OnDoAction
+   */
+  void OnDoAction( const Property::Index actionId, const Property::Value& attributes ) override;
+
 private:
 
   /**
@@ -125,6 +130,9 @@ private:
   float mStartAngle;                   ///< The start angle of the arc.
   float mSweepAngle;                   ///< The sweep angle of the arc.
   Property::Index mRadiusIndex;        ///< The index of the radius property.
+  Property::Index mThicknessIndex;     ///< The index of the thickness property.
+  Property::Index mStartAngleIndex;    ///< The index of the start angle property.
+  Property::Index mSweepAngleIndex;    ///< The index of the sweep angle property.
   DevelArcVisual::Cap::Type mCapType;  ///< The cap type.
 };
 
index c1ba93b..259b005 100644 (file)
@@ -125,7 +125,7 @@ BorderVisualPtr BorderVisual::New( VisualFactoryCache& factoryCache, const Prope
 }
 
 BorderVisual::BorderVisual( VisualFactoryCache& factoryCache )
-: Visual::Base( factoryCache, Visual::FittingMode::FILL ),
+: Visual::Base( factoryCache, Visual::FittingMode::FILL, Toolkit::Visual::BORDER ),
   mBorderColor( Color::TRANSPARENT ),
   mBorderSize( 0.f ),
   mBorderColorIndex( Property::INVALID_INDEX ),
index e2a30bd..cb2b447 100644 (file)
@@ -183,7 +183,7 @@ ColorVisualPtr ColorVisual::New( VisualFactoryCache& factoryCache, const Propert
 }
 
 ColorVisual::ColorVisual( VisualFactoryCache& factoryCache )
-: Visual::Base( factoryCache, Visual::FittingMode::FILL ),
+: Visual::Base( factoryCache, Visual::FittingMode::FILL, Toolkit::Visual::COLOR ),
   mBlurRadius( 0.0f ),
   mRenderIfTransparent( false )
 {
index e1959e7..9c19049 100644 (file)
@@ -22,7 +22,6 @@
 #include <typeinfo>
 #include <dali/integration-api/debug.h>
 #include <dali/public-api/common/dali-vector.h>
-#include <dali/public-api/images/buffer-image.h>
 #include <dali/public-api/object/property-array.h>
 #include <dali/devel-api/scripting/enum-helper.h>
 #include <dali/devel-api/scripting/scripting.h>
@@ -319,7 +318,7 @@ GradientVisualPtr GradientVisual::New( VisualFactoryCache& factoryCache, const P
 }
 
 GradientVisual::GradientVisual( VisualFactoryCache& factoryCache )
-: Visual::Base( factoryCache, Visual::FittingMode::FILL ),
+: Visual::Base( factoryCache, Visual::FittingMode::FILL, Toolkit::Visual::GRADIENT ),
   mGradientType( LINEAR ),
   mIsOpaque( true )
 {
index d6dd7f4..f6e77ba 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_GRADIENT_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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,6 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/common/dali-vector.h>
-#include <dali/public-api/images/buffer-image.h>
 #include <dali/public-api/math/matrix3.h>
 #include <dali/public-api/object/ref-object.h>
 #include <dali/public-api/rendering/texture.h>
index 2e4dfb4..a9a4786 100644 (file)
@@ -1,5 +1,5 @@
  /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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,6 @@
 #include "image-atlas-manager.h"
 
 // EXTERNAL HEADER
-#include <dali/devel-api/images/texture-set-image.h>
 #include <dali/devel-api/adaptor-framework/image-loading.h>
 
 namespace Dali
index 07ead87..9823a92 100644 (file)
@@ -22,9 +22,6 @@
 #include <cstring> // for strlen()
 #include <dali/public-api/actors/layer.h>
 #include <dali/public-api/common/stage.h>
-#include <dali/public-api/images/resource-image.h>
-#include <dali/public-api/images/native-image.h>
-#include <dali/devel-api/images/texture-set-image.h>
 #include <dali/devel-api/adaptor-framework/image-loading.h>
 #include <dali/devel-api/scripting/enum-helper.h>
 #include <dali/devel-api/scripting/scripting.h>
@@ -99,8 +96,6 @@ DALI_ENUM_TO_STRING_TABLE_END( RELEASE_POLICY )
 
 const Vector4 FULL_TEXTURE_RECT(0.f, 0.f, 1.f, 1.f);
 
-const char* DEFAULT_SAMPLER_TYPENAME = "sampler2D";
-
 const float PIXEL_ALIGN_ON = 1.0f;
 const float PIXEL_ALIGN_OFF = 0.0f;
 
@@ -146,19 +141,13 @@ ImageVisualPtr ImageVisual::New( VisualFactoryCache& factoryCache,
   return new ImageVisual( factoryCache, shaderFactory, imageUrl, size, fittingMode, samplingMode );
 }
 
-ImageVisualPtr ImageVisual::New( VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const Image& image )
-{
-  return new ImageVisual( factoryCache, shaderFactory, image );
-}
-
 ImageVisual::ImageVisual( VisualFactoryCache& factoryCache,
                           ImageVisualShaderFactory& shaderFactory,
                           const VisualUrl& imageUrl,
                           ImageDimensions size,
                           FittingMode::Type fittingMode,
                           Dali::SamplingMode::Type samplingMode )
-: Visual::Base( factoryCache, Visual::FittingMode::FILL ),
-  mImage(),
+: Visual::Base( factoryCache, Visual::FittingMode::FILL, Toolkit::Visual::IMAGE ),
   mPixelArea( FULL_TEXTURE_RECT ),
   mPlacementActor(),
   mImageUrl( imageUrl ),
@@ -182,32 +171,6 @@ ImageVisual::ImageVisual( VisualFactoryCache& factoryCache,
   EnablePreMultipliedAlpha( mFactoryCache.GetPreMultiplyOnLoad() );
 }
 
-ImageVisual::ImageVisual( VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const Image& image )
-: Visual::Base( factoryCache, Visual::FittingMode::FILL ),
-  mImage( image ),
-  mPixelArea( FULL_TEXTURE_RECT ),
-  mPlacementActor(),
-  mImageUrl(),
-  mMaskingData( ),
-  mDesiredSize(),
-  mTextureId( TextureManager::INVALID_TEXTURE_ID ),
-  mTextures(),
-  mImageVisualShaderFactory( shaderFactory ),
-  mFittingMode( FittingMode::DEFAULT ),
-  mSamplingMode( SamplingMode::DEFAULT ),
-  mWrapModeU( WrapMode::DEFAULT ),
-  mWrapModeV( WrapMode::DEFAULT ),
-  mLoadPolicy( Toolkit::ImageVisual::LoadPolicy::ATTACHED ),
-  mReleasePolicy( Toolkit::ImageVisual::ReleasePolicy::DESTROYED ),
-  mAtlasRect( 0.0f, 0.0f, 0.0f, 0.0f ),
-  mAttemptAtlasing( false ),
-  mLoading( false ),
-  mOrientationCorrection( true )
-{
-  // PreMultiplied alpha should be disabled when the Image is used.
-  EnablePreMultipliedAlpha( false );
-}
-
 ImageVisual::~ImageVisual()
 {
   if( Stage::IsInstalled() )
@@ -482,13 +445,7 @@ void ImageVisual::AllocateMaskData()
 
 void ImageVisual::GetNaturalSize( Vector2& naturalSize )
 {
-  if(mImage)
-  {
-    naturalSize.x = mImage.GetWidth();
-    naturalSize.y = mImage.GetHeight();
-    return;
-  }
-  else if( mDesiredSize.GetWidth()>0 && mDesiredSize.GetHeight()>0)
+  if( mDesiredSize.GetWidth()>0 && mDesiredSize.GetHeight()>0)
   {
     naturalSize.x = mDesiredSize.GetWidth();
     naturalSize.y = mDesiredSize.GetHeight();
@@ -540,7 +497,7 @@ void ImageVisual::GetNaturalSize( Vector2& naturalSize )
       }
       else
       {
-        Image brokenImage = mFactoryCache.GetBrokenVisualImage();
+        Texture brokenImage = mFactoryCache.GetBrokenVisualImage();
 
         naturalSize.x = brokenImage.GetWidth();
         naturalSize.y = brokenImage.GetWidth();
@@ -604,60 +561,6 @@ void ImageVisual::CreateRenderer( TextureSet& textureSet )
   EnablePreMultipliedAlpha( IsPreMultipliedAlphaEnabled() );
 }
 
-void ImageVisual::CreateNativeImageRenderer( NativeImage& nativeImage )
-{
-  Geometry geometry;
-  Shader shader;
-
-  std::string fragmentShader;
-  const char* fragmentPreFix = nativeImage.GetCustomFragmentPreFix();
-  const char* customSamplerTypename = nativeImage.GetCustomSamplerTypename();
-
-  if( fragmentPreFix )
-  {
-    fragmentShader = fragmentPreFix;
-    fragmentShader += "\n";
-  }
-
-  if( mImpl->mCustomShader && !mImpl->mCustomShader->mFragmentShader.empty() )
-  {
-    fragmentShader += mImpl->mCustomShader->mFragmentShader;
-  }
-  else
-  {
-    fragmentShader += mImageVisualShaderFactory.GetFragmentShaderSource();
-  }
-
-  if( customSamplerTypename )
-  {
-    fragmentShader.replace( fragmentShader.find( DEFAULT_SAMPLER_TYPENAME ), strlen( DEFAULT_SAMPLER_TYPENAME ), customSamplerTypename );
-  }
-
-  if( !mImpl->mCustomShader )
-  {
-    geometry = CreateGeometry( mFactoryCache, ImageDimensions( 1, 1 ) );
-
-    shader  = Shader::New( mImageVisualShaderFactory.GetVertexShaderSource(), fragmentShader );
-    shader.RegisterProperty( PIXEL_AREA_UNIFORM_NAME, FULL_TEXTURE_RECT );
-  }
-  else
-  {
-    geometry = CreateGeometry( mFactoryCache, mImpl->mCustomShader->mGridSize );
-    shader  = Shader::New( mImpl->mCustomShader->mVertexShader.empty() ? mImageVisualShaderFactory.GetVertexShaderSource() : mImpl->mCustomShader->mVertexShader,
-                           fragmentShader,
-                           mImpl->mCustomShader->mHints );
-    if( mImpl->mCustomShader->mVertexShader.empty() )
-    {
-      shader.RegisterProperty( PIXEL_AREA_UNIFORM_NAME, FULL_TEXTURE_RECT );
-    }
-  }
-
-  mImpl->mRenderer = Renderer::New( geometry, shader );
-
-  //Register transform properties
-  mImpl->mTransform.RegisterUniforms( mImpl->mRenderer, Direction::LEFT_TO_RIGHT );
-}
-
 void ImageVisual::LoadTexture( bool& atlasing, Vector4& atlasRect, TextureSet& textures, bool orientationCorrection,
                                TextureManager::ReloadPolicy forceReload )
 {
@@ -733,35 +636,12 @@ void ImageVisual::InitializeRenderer()
   }
 }
 
-void ImageVisual::InitializeRenderer( const Image& image )
-{
-  TextureSet textures = TextureSet::New();
-
-  NativeImage nativeImage = NativeImage::DownCast( image );
-  if( nativeImage )
-  {
-    CreateNativeImageRenderer( nativeImage );
-    DALI_ASSERT_DEBUG( textures );
-    mImpl->mRenderer.SetTextures( textures );
-  }
-  else
-  {
-    // reuse existing code for regular images
-    CreateRenderer( textures ); // Textures will be retreived from Image
-  }
-  ApplyImageToSampler( image );
-}
-
 void ImageVisual::DoSetOnStage( Actor& actor )
 {
   if( mImageUrl.IsValid() )
   {
     InitializeRenderer();
   }
-  else if( mImage )
-  {
-    InitializeRenderer( mImage );
-  }
 
   if( !mImpl->mRenderer )
   {
@@ -804,11 +684,6 @@ void ImageVisual::DoSetOffStage( Actor& actor )
     mImpl->mResourceStatus = Toolkit::Visual::ResourceStatus::PREPARING;
   }
 
-  if( mImageUrl.IsValid() )
-  {
-    // Legacy support for deprecated Dali::Image
-    mImage.Reset();
-  }
   mLoading = false;
   mImpl->mRenderer.Reset();
   mPlacementActor.Reset();
@@ -827,17 +702,6 @@ void ImageVisual::DoCreatePropertyMap( Property::Map& map ) const
     map.Insert( Toolkit::ImageVisual::Property::DESIRED_WIDTH, mDesiredSize.GetWidth() );
     map.Insert( Toolkit::ImageVisual::Property::DESIRED_HEIGHT, mDesiredSize.GetHeight() );
   }
-  else if( mImage )
-  {
-    map.Insert( Toolkit::ImageVisual::Property::DESIRED_WIDTH, static_cast<int>(mImage.GetWidth()) );
-    map.Insert( Toolkit::ImageVisual::Property::DESIRED_HEIGHT, static_cast<int>(mImage.GetHeight()) );
-
-    ResourceImage resourceImage = ResourceImage::DownCast(mImage);
-    if( resourceImage )
-    {
-      map.Insert( Toolkit::ImageVisual::Property::URL, resourceImage.GetUrl() );
-    }
-  }
 
   map.Insert( Toolkit::ImageVisual::Property::FITTING_MODE, mFittingMode );
   map.Insert( Toolkit::ImageVisual::Property::SAMPLING_MODE, mSamplingMode );
@@ -869,11 +733,6 @@ void ImageVisual::DoCreateInstancePropertyMap( Property::Map& map ) const
     map.Insert( Toolkit::ImageVisual::Property::DESIRED_WIDTH, mDesiredSize.GetWidth() );
     map.Insert( Toolkit::ImageVisual::Property::DESIRED_HEIGHT, mDesiredSize.GetHeight() );
   }
-  else if( mImage )
-  {
-    map.Insert( Toolkit::ImageVisual::Property::DESIRED_WIDTH, static_cast<int>(mImage.GetWidth()) );
-    map.Insert( Toolkit::ImageVisual::Property::DESIRED_HEIGHT, static_cast<int>(mImage.GetHeight()) );
-  }
 }
 
 void ImageVisual::OnDoAction( const Dali::Property::Index actionName, const Dali::Property::Value& attributes )
@@ -906,20 +765,6 @@ bool ImageVisual::IsResourceReady() const
            mImpl->mResourceStatus == Toolkit::Visual::ResourceStatus::FAILED );
 }
 
-void ImageVisual::ApplyImageToSampler( const Image& image )
-{
-  if( image )
-  {
-    TextureSet textureSet = mImpl->mRenderer.GetTextures();
-    DALI_ASSERT_DEBUG( textureSet ); // texture set should always exist by this time
-
-    TextureSetImage( textureSet, 0u, image );
-    Sampler sampler = Sampler::New();
-    sampler.SetWrapMode(  mWrapModeU, mWrapModeV  );
-    textureSet.SetSampler( 0u, sampler );
-  }
-}
-
 // From existing atlas manager
 void ImageVisual::UploadCompleted()
 {
@@ -960,22 +805,20 @@ void ImageVisual::UploadComplete( bool loadingSuccess, int32_t textureId, Textur
       mPlacementActor.Reset();
     }
 
-    if( loadingSuccess )
-    {
-      Sampler sampler = Sampler::New();
-      sampler.SetWrapMode(  mWrapModeU, mWrapModeV  );
-      textureSet.SetSampler( 0u, sampler );
-      mImpl->mRenderer.SetTextures(textureSet);
-    }
-    else
+    if( !loadingSuccess )
     {
-      Image brokenImage = mFactoryCache.GetBrokenVisualImage();
+      Texture brokenImage = mFactoryCache.GetBrokenVisualImage();
 
       textureSet = TextureSet::New();
+      textureSet.SetTexture(0u, brokenImage);
       mImpl->mRenderer.SetTextures( textureSet );
-
-      ApplyImageToSampler( brokenImage );
     }
+
+    Sampler sampler = Sampler::New();
+    sampler.SetWrapMode(  mWrapModeU, mWrapModeV  );
+    textureSet.SetSampler( 0u, sampler );
+    mImpl->mRenderer.SetTextures(textureSet);
+
   }
 
   // Storing TextureSet needed when renderer staged.
index 23dee63..4868a32 100644 (file)
@@ -22,9 +22,7 @@
 #include <memory>
 
 #include <dali/public-api/common/intrusive-ptr.h>
-#include <dali/public-api/images/image.h>
 #include <dali/public-api/images/image-operations.h>
-#include <dali/public-api/images/resource-image.h>
 #include <dali/public-api/object/weak-handle.h>
 
 // INTERNAL INCLUDES
@@ -158,15 +156,6 @@ public:
                              FittingMode::Type fittingMode = FittingMode::DEFAULT,
                              Dali::SamplingMode::Type samplingMode = SamplingMode::BOX_THEN_LINEAR );
 
-  /**
-   * @brief Create a new image visual with an Image type.
-   *
-   * @param[in] factoryCache The VisualFactoryCache object
-   * @param[in] shaderFactory The ImageVisualShaderFactory object
-   * @param[in] image The image to use
-   */
-  static ImageVisualPtr New( VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const Image& image );
-
 public:  // from Visual
 
   /**
@@ -211,15 +200,6 @@ protected:
                Dali::SamplingMode::Type samplingMode );
 
   /**
-   * @brief Constructor with an Image type.
-   *
-   * @param[in] factoryCache The VisualFactoryCache object
-   * @param[in] shaderFactory The ImageVisualShaderFactory object
-   * @param[in] image The image to use
-   */
-  ImageVisual( VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const Image& image );
-
-  /**
    * @brief A reference counted object may only be deleted by calling Unreference().
    */
   virtual ~ImageVisual();
@@ -284,13 +264,6 @@ private:
   void AllocateMaskData();
 
   /**
-   * @brief Applies the image to the texture set used for this renderer
-   *
-   * @param[in] image The Image to apply to the texture set used for this renderer
-   */
-  void ApplyImageToSampler( const Image& image );
-
-  /**
    * @brief Load the texture, will try to atlas unless unable or param set to false.
    * @param[in, out] atlasing flag if the image has been put in a atlas (true), passing false will not atlas even if possible.
    * @param[out] atlasRect if atlasing is used this the texture area of the image in the atlas.
@@ -312,25 +285,12 @@ private:
   void InitializeRenderer();
 
   /**
-   * @brief Initializes the Dali::Renderer from an image handle
-   *
-   * @param[in] image The image handle to intialize this ImageVisual from
-   */
-  void InitializeRenderer( const Image& image );
-
-  /**
    * @brief Creates the Dali::Renderer (potentially from the renderer cache), initializing it
    * @param[in] textures to use
    */
   void CreateRenderer( TextureSet& textures );
 
   /**
-   * @brief Creates the Dali::Renderer for NativeImage with custom sampler type and prefix, initializing it
-   * @param NativeImageRenderer
-   */
-  void CreateNativeImageRenderer( NativeImage& nativeImage );
-
-  /**
    * Creates the texture set and adds the texture to it
    * @param[out] textureRect The texture area of the texture in the atlas.
    * @param[in] url The URL of the image resource to use.
@@ -360,7 +320,6 @@ private:
 
 private:
 
-  Image mImage;
   Vector4 mPixelArea;
   WeakHandle<Actor> mPlacementActor;
   VisualUrl mImageUrl;
index 7fbb28e..3b918e2 100644 (file)
@@ -351,7 +351,7 @@ MeshVisualPtr MeshVisual::New( VisualFactoryCache& factoryCache, const Property:
 }
 
 MeshVisual::MeshVisual( VisualFactoryCache& factoryCache )
-: Visual::Base( factoryCache, Visual::FittingMode::FIT_KEEP_ASPECT_RATIO ),
+: Visual::Base( factoryCache, Visual::FittingMode::FIT_KEEP_ASPECT_RATIO, Toolkit::Visual::MESH ),
   mShadingMode( Toolkit::MeshVisual::ShadingMode::TEXTURED_WITH_DETAILED_SPECULAR_LIGHTING ),
   mUseTexture( true ),
   mUseMipmapping( true ),
old mode 100755 (executable)
new mode 100644 (file)
index c4dc4df..57b1293
 #include "npatch-visual.h"
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/images/buffer-image.h>
-#include <dali/public-api/images/resource-image.h>
 #include <dali/devel-api/object/handle-devel.h>
-#include <dali/devel-api/images/texture-set-image.h>
 #include <dali/devel-api/adaptor-framework/image-loading.h>
 #include <dali/integration-api/debug.h>
 
@@ -456,7 +453,7 @@ void NPatchVisual::DoCreateInstancePropertyMap( Property::Map& map ) const
 }
 
 NPatchVisual::NPatchVisual( VisualFactoryCache& factoryCache )
-: Visual::Base( factoryCache, Visual::FittingMode::FILL ),
+: Visual::Base( factoryCache, Visual::FittingMode::FILL, Toolkit::Visual::N_PATCH ),
   mPlacementActor(),
   mLoader( factoryCache.GetNPatchLoader() ),
   mImageUrl(),
@@ -621,8 +618,8 @@ void NPatchVisual::ApplyTextureAndUniforms()
     DALI_LOG_ERROR("The N patch image '%s' is not a valid N patch image\n", mImageUrl.GetUrl().c_str() );
     textureSet = TextureSet::New();
 
-    Image croppedImage = mFactoryCache.GetBrokenVisualImage();
-    TextureSetImage( textureSet, 0u, croppedImage );
+    Texture croppedImage = mFactoryCache.GetBrokenVisualImage();
+    textureSet.SetTexture( 0u, croppedImage );
     mImpl->mRenderer.RegisterProperty( "uFixed[0]", Vector2::ZERO );
     mImpl->mRenderer.RegisterProperty( "uFixed[1]", Vector2::ZERO );
     mImpl->mRenderer.RegisterProperty( "uFixed[2]", Vector2::ZERO );
index 4a82cfb..827e9cb 100644 (file)
@@ -20,7 +20,6 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/common/intrusive-ptr.h>
-#include <dali/public-api/images/image.h>
 #include <dali/public-api/images/image-operations.h>
 #include <dali/public-api/rendering/geometry.h>
 #include <dali/public-api/rendering/sampler.h>
index 8b2346c..9a9c06f 100644 (file)
@@ -173,7 +173,7 @@ PrimitiveVisualPtr PrimitiveVisual::New( VisualFactoryCache& factoryCache, const
 }
 
 PrimitiveVisual::PrimitiveVisual( VisualFactoryCache& factoryCache )
-: Visual::Base( factoryCache, Visual::FittingMode::FIT_KEEP_ASPECT_RATIO ),
+: Visual::Base( factoryCache, Visual::FittingMode::FIT_KEEP_ASPECT_RATIO, Toolkit::Visual::PRIMITIVE ),
   mScaleDimensions( Vector3::ONE ),
   mScaleTopRadius( DEFAULT_SCALE_TOP_RADIUS ),
   mScaleBottomRadius( DEFAULT_SCALE_BOTTOM_RADIUS ),
index b7bdbfd..e01020e 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_SVG_RASTERIZE_THREAD_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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,6 @@
 #include <dali/devel-api/threading/conditional-wait.h>
 #include <dali/devel-api/threading/mutex.h>
 #include <dali/devel-api/threading/thread.h>
-#include <dali/public-api/images/buffer-image.h>
 #include <dali/public-api/images/pixel-data.h>
 #include <dali/public-api/common/intrusive-ptr.h>
 #include <dali/public-api/common/vector-wrapper.h>
index 9330bdb..32ff3ea 100644 (file)
@@ -68,7 +68,7 @@ SvgVisualPtr SvgVisual::New( VisualFactoryCache& factoryCache, ImageVisualShader
 }
 
 SvgVisual::SvgVisual( VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl )
-: Visual::Base( factoryCache, Visual::FittingMode::FILL ),
+: Visual::Base( factoryCache, Visual::FittingMode::FILL, Toolkit::Visual::SVG ),
   mImageVisualShaderFactory( shaderFactory ),
   mAtlasRect( FULL_TEXTURE_RECT ),
   mImageUrl( imageUrl ),
index 9ddbf3b..a3057c3 100755 (executable)
@@ -383,7 +383,7 @@ void TextVisual::DoCreateInstancePropertyMap( Property::Map& map ) const
 
 
 TextVisual::TextVisual( VisualFactoryCache& factoryCache )
-: Visual::Base( factoryCache, Visual::FittingMode::FIT_KEEP_ASPECT_RATIO ),
+: Visual::Base( factoryCache, Visual::FittingMode::FIT_KEEP_ASPECT_RATIO, Toolkit::Visual::TEXT ),
   mController( Text::Controller::New() ),
   mTypesetter( Text::Typesetter::New( mController->GetTextModel() ) ),
   mAnimatableTextColorPropertyIndex( Property::INVALID_INDEX ),
index 8912c17..0af86b3 100644 (file)
@@ -25,7 +25,6 @@
 #include <dali/devel-api/adaptor-framework/environment-variable.h>
 #include <dali/devel-api/adaptor-framework/image-loading.h>
 #include <dali/devel-api/common/hash.h>
-#include <dali/devel-api/images/texture-set-image.h>
 #include <dali/devel-api/adaptor-framework/pixel-buffer.h>
 #include <dali/integration-api/debug.h>
 
index 4bb7634..41040ef 100644 (file)
@@ -115,7 +115,7 @@ bool GetPolicyFromValue( const Property::Value& value, Vector2& policy )
 
 } // unnamed namespace
 
-Internal::Visual::Base::Impl::Impl(FittingMode fittingMode)
+Internal::Visual::Base::Impl::Impl( FittingMode fittingMode, Toolkit::Visual::Type type )
 : mCustomShader( NULL ),
   mBlendSlotDelegate( NULL ),
   mEventObserver( NULL ),
@@ -128,7 +128,8 @@ Internal::Visual::Base::Impl::Impl(FittingMode fittingMode)
   mCornerRadiusIndex( Property::INVALID_INDEX ),
   mFittingMode( fittingMode ),
   mFlags( 0 ),
-  mResourceStatus( Toolkit::Visual::ResourceStatus::PREPARING )
+  mResourceStatus( Toolkit::Visual::ResourceStatus::PREPARING ),
+  mType( type )
 {
 }
 
index 839971b..1b6afa3 100644 (file)
@@ -46,8 +46,9 @@ struct Base::Impl
   /**
    * Constructor
    * @param [in] fittingMode that the derived class prefers
+   * @param [in] type The type of the this visual
    */
-  Impl(FittingMode fittingMode);
+  Impl( FittingMode fittingMode, Toolkit::Visual::Type type );
 
   /**
    * Destructor
@@ -132,6 +133,7 @@ struct Base::Impl
   FittingMode     mFittingMode;  //< How the contents should fit the view
   int             mFlags;
   Toolkit::Visual::ResourceStatus  mResourceStatus;
+  const Toolkit::Visual::Type      mType;
 };
 
 } // namespace Visual
index 2cbca7d..c63a9e2 100755 (executable)
@@ -67,8 +67,8 @@ DALI_ENUM_TO_STRING_TABLE_END( VISUAL_FITTING_MODE )
 
 } // namespace
 
-Visual::Base::Base( VisualFactoryCache& factoryCache, FittingMode fittingMode )
-: mImpl( new Impl(fittingMode) ),
+Visual::Base::Base( VisualFactoryCache& factoryCache, FittingMode fittingMode, Toolkit::Visual::Type type )
+: mImpl( new Impl( fittingMode, type ) ),
   mFactoryCache( factoryCache )
 {
 }
@@ -502,6 +502,11 @@ bool Visual::Base::IsSynchronousLoadingRequired() const
   return ( mImpl->mFlags & Impl::IS_SYNCHRONOUS_RESOURCE_LOADING );
 }
 
+Toolkit::Visual::Type Visual::Base::GetType() const
+{
+  return mImpl->mType;
+}
+
 Toolkit::Visual::ResourceStatus Visual::Base::GetResourceStatus() const
 {
   return mImpl->mResourceStatus;
index a04fa1f..6105867 100644 (file)
@@ -272,14 +272,23 @@ public:
    */
   bool IsSynchronousLoadingRequired() const;
 
+  /**
+   * @brief Get the type of this visual.
+   *
+   * @return The the type of this visual.
+   */
+  Toolkit::Visual::Type GetType() const;
+
  protected:
 
   /**
    * @brief Constructor.
    *
    * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object
+   * @param[in] fittingMode The value that determines how the visual should be fit to the view
+   * @param[in] type The type of the this visual
    */
-  Base( VisualFactoryCache& factoryCache, FittingMode fittingMode );
+  Base( VisualFactoryCache& factoryCache, FittingMode fittingMode, Toolkit::Visual::Type type );
 
   /**
    * @brief A reference counted object may only be deleted by calling Unreference().
index 854a43a..2db3a57 100644 (file)
@@ -1,5 +1,5 @@
  /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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 @@
 
 // EXTERNAL INCLUDES
 #include <dali/devel-api/common/hash.h>
-#include <dali/public-api/images/resource-image.h>
+#include <dali/devel-api/adaptor-framework/image-loading.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/internal/visuals/color/color-visual.h>
@@ -217,9 +217,21 @@ Geometry VisualFactoryCache::CreateGridGeometry( Uint16Pair gridSize )
   return geometry;
 }
 
-Image VisualFactoryCache::GetBrokenVisualImage()
+Texture VisualFactoryCache::GetBrokenVisualImage()
 {
-  return ResourceImage::New( mBrokenImageUrl );
+  if(!mBrokenImageTexture && mBrokenImageUrl.size())
+  {
+    PixelData data;
+    Devel::PixelBuffer pixelBuffer = LoadImageFromFile( mBrokenImageUrl );
+    if( pixelBuffer )
+    {
+      data = Devel::PixelBuffer::Convert(pixelBuffer); // takes ownership of buffer
+      mBrokenImageTexture = Texture::New( Dali::TextureType::TEXTURE_2D, data.GetPixelFormat(),
+                                      data.GetWidth(), data.GetHeight() );
+      mBrokenImageTexture.Upload( data );
+    }
+  }
+  return mBrokenImageTexture;
 }
 
 void VisualFactoryCache::SetPreMultiplyOnLoad( bool preMultiply )
index f22fb86..18d4abc 100644 (file)
@@ -32,6 +32,7 @@
 
 namespace Dali
 {
+class Texture;
 
 namespace Toolkit
 {
@@ -167,10 +168,10 @@ public:
   static Geometry CreateGridGeometry( Uint16Pair gridSize );
 
   /**
-   * @brief Returns an image to be used when a visual has failed to correctly render
-   * @return The broken image handle.
+   * @brief Returns a new Texture to use when a visual has failed to correctly render
+   * @return The broken image texture.
    */
-  Image GetBrokenVisualImage();
+  Texture GetBrokenVisualImage();
 
   /**
    * @copydoc Toolkit::VisualFactory::SetPreMultiplyOnLoad()
@@ -245,6 +246,7 @@ private:
   ImageAtlasManagerPtr                     mAtlasManager;
   TextureManager                           mTextureManager;
   NPatchLoader                             mNPatchLoader;
+  Texture                                  mBrokenImageTexture;
   SvgRasterizeThread*                      mSvgRasterizeThread;
   std::unique_ptr< VectorAnimationThread > mVectorAnimationThread;
   std::string                              mBrokenImageUrl;
index d3be0b4..2531a84 100644 (file)
@@ -19,7 +19,6 @@
 
 // EXTERNAL INCLUDES
 #include <dali/integration-api/debug.h>
-#include <dali/public-api/images/image.h>
 #include <dali/public-api/object/property-array.h>
 #include <dali/public-api/object/type-registry.h>
 #include <dali/public-api/object/type-registry-helper.h>
@@ -314,24 +313,6 @@ Toolkit::Visual::Base VisualFactory::CreateVisual( const Property::Map& property
   return Toolkit::Visual::Base( visualPtr.Get() );
 }
 
-Toolkit::Visual::Base VisualFactory::CreateVisual( const Image& image )
-{
-  Visual::BasePtr visualPtr;
-
-  if( image )
-  {
-    visualPtr = ImageVisual::New(GetFactoryCache(), GetImageVisualShaderFactory(), image );
-  }
-
-  if( mDebugEnabled )
-  {
-    //Create a WireframeVisual if we have debug enabled
-    visualPtr = WireframeVisual::New( GetFactoryCache(), visualPtr );
-  }
-
-  return Toolkit::Visual::Base( visualPtr.Get() );
-}
-
 Toolkit::Visual::Base VisualFactory::CreateVisual( const std::string& url, ImageDimensions size )
 {
   Visual::BasePtr visualPtr;
index 0e4dcb4..4a4ab4c 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_VISUAL_FACTORY_IMPL_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -67,11 +67,6 @@ public:
   Toolkit::Visual::Base CreateVisual( const Property::Map& propertyMap );
 
   /**
-   * @copydoc Toolkit::VisualFactory::CreateVisual( const Image& )
-   */
-  Toolkit::Visual::Base CreateVisual( const Image& image );
-
-  /**
    * @copydoc Toolkit::VisualFactory::CreateVisual( const std::string&, ImageDimensions )
    */
   Toolkit::Visual::Base CreateVisual( const std::string& image, ImageDimensions size );
@@ -140,7 +135,7 @@ void InitializeVisual( Actor& actor, Toolkit::Visual::Base& visual, ParameterTyp
     Toolkit::GetImplementation(visual).SetOffStage( actor );
   }
   visual = Toolkit::VisualFactory::Get().CreateVisual( param0, param1 );
-  if( visual && actor && actor.OnStage() )
+  if( visual && actor && actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
   {
     Toolkit::GetImplementation(visual).SetOnStage(actor);
   }
@@ -163,7 +158,7 @@ void InitializeVisual( Actor& actor, Toolkit::Visual::Base& visual, ParameterTyp
     Toolkit::GetImplementation(visual).SetOffStage( actor );
   }
   visual =  Toolkit::VisualFactory::Get().CreateVisual( param );
-  if( visual && actor && actor.OnStage() )
+  if( visual && actor && actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
   {
     Toolkit::GetImplementation(visual).SetOnStage(actor);
   }
index 1202d1c..5364de2 100644 (file)
@@ -106,7 +106,7 @@ WireframeVisualPtr WireframeVisual::New( VisualFactoryCache& factoryCache, Visua
 }
 
 WireframeVisual::WireframeVisual( VisualFactoryCache& factoryCache, Visual::BasePtr actualVisual )
-: Visual::Base( factoryCache, Visual::FittingMode::FILL ),
+: Visual::Base( factoryCache, Visual::FittingMode::FILL, actualVisual ? actualVisual->GetType() : Toolkit::Visual::WIREFRAME ),
   mActualVisual( actualVisual )
 {
 }
index 70377b3..2855636 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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,7 +21,6 @@
 // EXTERNAL INCLUDES
 #include <dali/integration-api/debug.h>
 #include <dali/public-api/object/property-map.h>
-#include <dali/public-api/images/resource-image.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/internal/controls/buttons/button-impl.h>
index 6a70aaf..e8ae5a1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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,7 +21,6 @@
 // EXTERNAL INCLUDES
 #include <dali/integration-api/debug.h>
 
-#include <dali/public-api/images/resource-image.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/internal/controls/buttons/push-button-impl.h>
index ba1fd7f..991a578 100755 (executable)
@@ -297,7 +297,7 @@ bool Control::IsKeyboardNavigationSupported()
 
 void Control::SetKeyInputFocus()
 {
-  if( Self().OnStage() )
+  if( Self().GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
   {
     Toolkit::KeyInputFocusManager::Get().SetFocus(Toolkit::Control::DownCast(Self()));
   }
@@ -306,7 +306,7 @@ void Control::SetKeyInputFocus()
 bool Control::HasKeyInputFocus()
 {
   bool result = false;
-  if( Self().OnStage() )
+  if( Self().GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
   {
     Toolkit::Control control = Toolkit::KeyInputFocusManager::Get().GetCurrentFocusControl();
     if( Self() == control )
@@ -319,7 +319,7 @@ bool Control::HasKeyInputFocus()
 
 void Control::ClearKeyInputFocus()
 {
-  if( Self().OnStage() )
+  if( Self().GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
   {
     Toolkit::KeyInputFocusManager::Get().RemoveFocus(Toolkit::Control::DownCast(Self()));
   }
@@ -596,7 +596,7 @@ void Control::OnPropertySet( Property::Index index, Property::Value propertyValu
 {
   // If the clipping mode has been set, we may need to create a renderer.
   // Only do this if we are already on-stage as the OnStageConnection will handle the off-stage clipping controls.
-  if( ( index == Actor::Property::CLIPPING_MODE ) && Self().OnStage() )
+  if( ( index == Actor::Property::CLIPPING_MODE ) && Self().GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
   {
     // Note: This method will handle whether creation of the renderer is required.
     CreateClippingRenderer( *this );
index ed68e15..b8b5621 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_CONTROL_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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,6 @@
 #include <dali/public-api/events/pinch-gesture-detector.h>
 #include <dali/public-api/events/tap-gesture-detector.h>
 #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>
@@ -107,9 +106,6 @@ public:
        */
       STYLE_NAME = PROPERTY_START_INDEX,
 
-      RESERVED_PROPERTY_01, ///< Reserved index for a removed property.
-      RESERVED_PROPERTY_02, ///< Reserved index for a removed property.
-
       /**
        * @brief Receives key events to the control.
        * @details Name "keyInputFocus", type Property::BOOLEAN.
index 02d3e0d..f06b667 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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,6 @@
 
 // EXTERNAL INCLUDES
 #include <dali/integration-api/debug.h>
-#include <dali/public-api/images/resource-image.h>
 #include <dali/public-api/object/property-map.h>
 
 // INTERNAL INCLUDES
@@ -59,15 +58,6 @@ ImageView ImageView::New()
   return Internal::ImageView::New();
 }
 
-ImageView ImageView::New( Image image )
-{
-  DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: New() is deprecated and will be removed from next release. use New( const std::string& ) instead.\n" );
-
-  ImageView imageView = Internal::ImageView::New();
-  imageView.SetImage( image );
-  return imageView;
-}
-
 ImageView ImageView::New( const std::string& url )
 {
   ImageView imageView = Internal::ImageView::New();
@@ -87,13 +77,6 @@ ImageView ImageView::DownCast( BaseHandle handle )
   return Control::DownCast<ImageView, Internal::ImageView>( handle );
 }
 
-void ImageView::SetImage( Image image )
-{
-  DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: SetImage() is deprecated and will be removed from next release. Use SetImage( const std::string& ) instead.\n" );
-
-  Dali::Toolkit::GetImpl( *this ).SetImage( image );
-}
-
 void ImageView::SetImage( const std::string& url )
 {
   Dali::Toolkit::GetImpl( *this ).SetImage( url, ImageDimensions() );
@@ -104,13 +87,6 @@ void ImageView::SetImage( const std::string& url, ImageDimensions size )
   Dali::Toolkit::GetImpl( *this ).SetImage( url, size );
 }
 
-Image ImageView::GetImage() const
-{
-  DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: GetImage() is deprecated and will be removed from next release.\n" );
-
-  return Dali::Toolkit::GetImpl( *this ).GetImage();
-}
-
 ImageView::ImageView( Internal::ImageView& implementation )
  : Control( implementation )
 {
index c6d0b2a..47806df 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_IMAGE_VIEW_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -104,13 +104,11 @@ public:
     {
       // Event side properties
 
-      RESERVED_PROPERTY_01 = PROPERTY_START_INDEX, ///< Reserved index for a removed property.
-
       /**
        * @brief name "image", type string if it is a url, map otherwise.
        * @SINCE_1_0.0
        */
-      IMAGE,
+      IMAGE = PROPERTY_START_INDEX,
 
       /**
        * @brief name "preMultipliedAlpha", type Boolean.
@@ -150,19 +148,6 @@ public:
   static ImageView New();
 
   /**
-   * @DEPRECATED_1_2_8, use New( const std::string& ) instead.
-   *
-   * @brief Creates an initialized ImageView from an Image instance.
-   *
-   * If the handle is empty, ImageView will not display anything.
-   *
-   * @SINCE_1_0.0
-   * @param[in] image The Image instance to display
-   * @return A handle to a newly allocated ImageView
-   */
-  static ImageView New( Image image ) DALI_DEPRECATED_API;
-
-  /**
    * @brief Creates an initialized ImageView from an URL to an image resource.
    *
    * If the string is empty, ImageView will not display anything.
@@ -230,17 +215,6 @@ public:
   static ImageView DownCast( BaseHandle handle );
 
   /**
-   * @DEPRECATED_1_2_8, use SetImage( const std::string& ) instead.
-   *
-   * @brief Sets this ImageView from an Image instance.
-   *
-   * If the handle is empty, ImageView will display nothing
-   * @SINCE_1_0.0
-   * @param[in] image The Image instance to display.
-   */
-  void SetImage( Image image ) DALI_DEPRECATED_API;
-
-  /**
    * @brief Sets this ImageView from the given URL.
    *
    * If the URL is empty, ImageView will not display anything.
@@ -265,17 +239,6 @@ public:
    */
   void SetImage( const std::string& url, ImageDimensions size );
 
-  /**
-   * @DEPRECATED_1_1.4
-   * @brief Gets the Image instance handle used by the ImageView.
-   *
-   * A valid handle will be returned only if this instance was created with New(Image) or SetImage(Image) was called.
-   *
-   * @SINCE_1_0.0
-   * @return The Image instance currently used by the ImageView
-   */
-  Image GetImage() const DALI_DEPRECATED_API;
-
 public: // Not intended for application developers
 
   /// @cond internal
index a7b87c2..407e026 100644 (file)
@@ -158,7 +158,7 @@ public:
 public:
 
   /**
-   * @brief Creates the ProgressBar control.
+   * @brief Creates the ProgressBar control. It creates a horizontal linear shape of progress bar.
    * @SINCE_1_2.60
    * @return A handle to the ProgressBar control
    */
index 6ac1887..bad1d71 100644 (file)
@@ -169,16 +169,6 @@ public:
       PLACEHOLDER_TEXT_COLOR,
 
       /**
-       * @brief This property is removed because it's deprecated.
-       */
-      RESERVED_PROPERTY_01,
-
-      /**
-       * @brief This property is removed because it's deprecated.
-       */
-      RESERVED_PROPERTY_02,
-
-      /**
        * @brief The color to apply to the primary cursor.
        * @details Name "primaryCursorColor", type Property::VECTOR4.
        * @SINCE_1_0.0
index a3a0c3d..18c6c32 100644 (file)
@@ -161,39 +161,6 @@ public:
       VERTICAL_ALIGNMENT,
 
       /**
-       * @DEPRECATED_1_2.60 Use the new enum value of TEXT_COLOR instead.
-       * @brief The color of the text.
-       * @details Name "unusedPropertyTextColor", type Property::VECTOR4.
-       * @SINCE_1_0.0
-       */
-      UNUSED_PROPERTY_TEXT_COLOR,
-
-      /**
-       * @brief This property is removed because it's deprecated.
-       */
-      RESERVED_PROPERTY_01,
-
-      /**
-       * @brief This property is removed because it's deprecated.
-       */
-      RESERVED_PROPERTY_02,
-
-      /**
-       * @brief This property is removed because it's deprecated.
-       */
-      RESERVED_PROPERTY_03,
-
-      /**
-       * @brief This property is removed because it's deprecated.
-       */
-      RESERVED_PROPERTY_04,
-
-      /**
-       * @brief This property is removed because it's deprecated.
-       */
-      RESERVED_PROPERTY_05,
-
-      /**
        * @brief Whether the mark-up processing is enabled.
        * @details Name "enableMarkup", type Property::BOOLEAN.
        * @SINCE_1_0.0
index 53f0ddd..d1adcb7 100644 (file)
@@ -31,7 +31,7 @@ namespace Toolkit
 
 const unsigned int TOOLKIT_MAJOR_VERSION = 1;
 const unsigned int TOOLKIT_MINOR_VERSION = 9;
-const unsigned int TOOLKIT_MICRO_VERSION = 16;
+const unsigned int TOOLKIT_MICRO_VERSION = 17;
 const char * const TOOLKIT_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index 43bd4e5..35dec78 100755 (executable)
       "secondaryProgressValue":0.0,
       "indeterminate": false
     },
+    "CircularProgressBar":
+    {
+      "size":[64,64],
+      "trackVisual":{
+        "visualType":"ARC",
+        "mixColor":[0.0,0.165,0.302,1.0],
+        "thickness":4.0,
+        "startAngle":0.0,
+        "cap":"ROUND"
+      },
+      "progressVisual":{
+        "visualType":"ARC",
+        "mixColor":[0.0,0.549,1.0,1.0],
+        "thickness":4.0,
+        "startAngle":0.0,
+        "cap":"ROUND"
+      },
+      "secondaryProgressVisual":{
+        "visualType":"ARC",
+        "mixColor":[0.0,0.549,1.0,0.3],
+        "thickness":4.0,
+        "startAngle":0.0,
+        "cap":"ROUND"
+      },
+      "indeterminateVisual":{
+        "visualType":"ARC",
+        "mixColor":[0.02,0.71,0.525,1.0],
+        "thickness":4.0,
+        "startAngle":267.0,
+        "sweepAngle":75.0,
+        "cap":"ROUND"
+      },
+      "indeterminateVisualAnimation":
+      [
+        {
+          "target":"trackVisual",
+          "property":"opacity",
+          "targetValue": 0,
+          "animator":
+          {
+            "alphaFunction":"DEFAULT",
+            "timePeriod":
+            {
+              "duration":0,
+              "delay":0
+            }
+          }
+        },
+        {
+          "target":"secondaryProgressVisual",
+          "property":"opacity",
+          "targetValue": 0,
+          "animator":
+          {
+            "alphaFunction":"DEFAULT",
+            "timePeriod":
+            {
+              "duration":0,
+              "delay":0
+            }
+          }
+        },
+        {
+          "target":"progressVisual",
+          "property":"sweepAngle",
+          "initialValue": 75,
+          "targetValue": 180,
+          "animator":
+          {
+            "alphaFunction":[0.439, 0.0, 0.718, 0.428],
+            "timePeriod":
+            {
+              "duration":1.0,
+              "delay":0.0
+            }
+          }
+        },
+        {
+          "target":"progressVisual",
+          "property":"sweepAngle",
+          "targetValue": 75,
+          "animator":
+          {
+            "alphaFunction":[0.224, 0.571, 0.53, 1.0],
+            "timePeriod":
+            {
+              "duration":1.0,
+              "delay":2.0
+            }
+          }
+        },
+        {
+          "target":"progressVisual",
+          "property":"startAngle",
+          "initialValue": 87,
+          "targetValue": 1887,
+          "animator":
+          {
+            "alphaFunction":[0.33, 0.0, 0.3, 1.0],
+            "timePeriod":
+            {
+              "duration":3.0,
+              "delay":0.0
+            }
+          }
+        },
+        {
+          "target":"indeterminateVisual",
+          "property":"sweepAngle",
+          "initialValue": 75,
+          "targetValue": 180,
+          "animator":
+          {
+            "alphaFunction":[0.439, 0.0, 0.718, 0.428],
+            "timePeriod":
+            {
+              "duration":1.0,
+              "delay":0.0
+            }
+          }
+        },
+        {
+          "target":"indeterminateVisual",
+          "property":"sweepAngle",
+          "targetValue": 75,
+          "animator":
+          {
+            "alphaFunction":[0.224, 0.571, 0.53, 1.0],
+            "timePeriod":
+            {
+              "duration":1.0,
+              "delay":2.0
+            }
+          }
+        },
+        {
+          "target":"indeterminateVisual",
+          "property":"startAngle",
+          "initialValue": 267,
+          "targetValue": 2067,
+          "animator":
+          {
+            "alphaFunction":[0.33, 0.0, 0.3, 1.0],
+            "timePeriod":
+            {
+              "duration":3.0,
+              "delay":0.0
+            }
+          }
+        }
+      ],
+      "labelVisual":{
+        "visualType": "TEXT",
+        "textColor": [ 1.0, 1.0, 1.0, 1.0 ],
+        "pointSize" : 12.0, // Point size must always be provided to Text Visual
+        "horizontalAlignment": "CENTER",
+        "verticalAlignment": "CENTER"
+      },
+      "progressValue": 0.2,
+      "secondaryProgressValue":0.4,
+      "indeterminate": false
+    },
     "Button":
     {
       "styles":["Tooltip"],
index 2028c16..d055427 100755 (executable)
       "secondaryProgressValue":0.0,
       "indeterminate": false
     },
+    "CircularProgressBar":
+    {
+      "size":[64,64],
+      "trackVisual":{
+        "visualType":"ARC",
+        "mixColor":[0.0,0.165,0.302,1.0],
+        "thickness":4.0,
+        "startAngle":0.0,
+        "cap":"ROUND"
+      },
+      "progressVisual":{
+        "visualType":"ARC",
+        "mixColor":[0.0,0.549,1.0,1.0],
+        "thickness":4.0,
+        "startAngle":0.0,
+        "cap":"ROUND"
+      },
+      "secondaryProgressVisual":{
+        "visualType":"ARC",
+        "mixColor":[0.0,0.549,1.0,0.3],
+        "thickness":4.0,
+        "startAngle":0.0,
+        "cap":"ROUND"
+      },
+      "indeterminateVisual":{
+        "visualType":"ARC",
+        "mixColor":[0.02,0.71,0.525,1.0],
+        "thickness":4.0,
+        "startAngle":267.0,
+        "sweepAngle":75.0,
+        "cap":"ROUND"
+      },
+      "indeterminateVisualAnimation":
+      [
+        {
+          "target":"trackVisual",
+          "property":"opacity",
+          "targetValue": 0,
+          "animator":
+          {
+            "alphaFunction":"DEFAULT",
+            "timePeriod":
+            {
+              "duration":0,
+              "delay":0
+            }
+          }
+        },
+        {
+          "target":"secondaryProgressVisual",
+          "property":"opacity",
+          "targetValue": 0,
+          "animator":
+          {
+            "alphaFunction":"DEFAULT",
+            "timePeriod":
+            {
+              "duration":0,
+              "delay":0
+            }
+          }
+        },
+        {
+          "target":"progressVisual",
+          "property":"sweepAngle",
+          "initialValue": 75,
+          "targetValue": 180,
+          "animator":
+          {
+            "alphaFunction":[0.439, 0.0, 0.718, 0.428],
+            "timePeriod":
+            {
+              "duration":1.0,
+              "delay":0.0
+            }
+          }
+        },
+        {
+          "target":"progressVisual",
+          "property":"sweepAngle",
+          "targetValue": 75,
+          "animator":
+          {
+            "alphaFunction":[0.224, 0.571, 0.53, 1.0],
+            "timePeriod":
+            {
+              "duration":1.0,
+              "delay":2.0
+            }
+          }
+        },
+        {
+          "target":"progressVisual",
+          "property":"startAngle",
+          "initialValue": 87,
+          "targetValue": 1887,
+          "animator":
+          {
+            "alphaFunction":[0.33, 0.0, 0.3, 1.0],
+            "timePeriod":
+            {
+              "duration":3.0,
+              "delay":0.0
+            }
+          }
+        },
+        {
+          "target":"indeterminateVisual",
+          "property":"sweepAngle",
+          "initialValue": 75,
+          "targetValue": 180,
+          "animator":
+          {
+            "alphaFunction":[0.439, 0.0, 0.718, 0.428],
+            "timePeriod":
+            {
+              "duration":1.0,
+              "delay":0.0
+            }
+          }
+        },
+        {
+          "target":"indeterminateVisual",
+          "property":"sweepAngle",
+          "targetValue": 75,
+          "animator":
+          {
+            "alphaFunction":[0.224, 0.571, 0.53, 1.0],
+            "timePeriod":
+            {
+              "duration":1.0,
+              "delay":2.0
+            }
+          }
+        },
+        {
+          "target":"indeterminateVisual",
+          "property":"startAngle",
+          "initialValue": 267,
+          "targetValue": 2067,
+          "animator":
+          {
+            "alphaFunction":[0.33, 0.0, 0.3, 1.0],
+            "timePeriod":
+            {
+              "duration":3.0,
+              "delay":0.0
+            }
+          }
+        }
+      ],
+      "labelVisual":{
+        "visualType": "TEXT",
+        "textColor": [ 1.0, 1.0, 1.0, 1.0 ],
+        "pointSize" : 12.0, // Point size must always be provided to Text Visual
+        "horizontalAlignment": "CENTER",
+        "verticalAlignment": "CENTER"
+      },
+      "progressValue": 0.2,
+      "secondaryProgressValue":0.4,
+      "indeterminate": false
+    },
     "Button":
     {
       "styles":["Tooltip"],
index 36db9a1..14fdc1e 100644 (file)
       "secondaryProgressValue":0.0,
       "indeterminate": false
     },
+    "CircularProgressBar":
+    {
+      "size":[64,64],
+      "trackVisual":{
+        "visualType":"ARC",
+        "mixColor":[0.0,0.165,0.302,1.0],
+        "thickness":4.0,
+        "startAngle":0.0,
+        "cap":"ROUND"
+      },
+      "progressVisual":{
+        "visualType":"ARC",
+        "mixColor":[0.0,0.549,1.0,1.0],
+        "thickness":4.0,
+        "startAngle":0.0,
+        "cap":"ROUND"
+      },
+      "secondaryProgressVisual":{
+        "visualType":"ARC",
+        "mixColor":[0.0,0.549,1.0,0.3],
+        "thickness":4.0,
+        "startAngle":0.0,
+        "cap":"ROUND"
+      },
+      "indeterminateVisual":{
+        "visualType":"ARC",
+        "mixColor":[0.02,0.71,0.525,1.0],
+        "thickness":4.0,
+        "startAngle":267.0,
+        "sweepAngle":75.0,
+        "cap":"ROUND"
+      },
+      "indeterminateVisualAnimation":
+      [
+        {
+          "target":"trackVisual",
+          "property":"opacity",
+          "targetValue": 0,
+          "animator":
+          {
+            "alphaFunction":"DEFAULT",
+            "timePeriod":
+            {
+              "duration":0,
+              "delay":0
+            }
+          }
+        },
+        {
+          "target":"secondaryProgressVisual",
+          "property":"opacity",
+          "targetValue": 0,
+          "animator":
+          {
+            "alphaFunction":"DEFAULT",
+            "timePeriod":
+            {
+              "duration":0,
+              "delay":0
+            }
+          }
+        },
+        {
+          "target":"progressVisual",
+          "property":"sweepAngle",
+          "initialValue": 75,
+          "targetValue": 180,
+          "animator":
+          {
+            "alphaFunction":[0.439, 0.0, 0.718, 0.428],
+            "timePeriod":
+            {
+              "duration":1.0,
+              "delay":0.0
+            }
+          }
+        },
+        {
+          "target":"progressVisual",
+          "property":"sweepAngle",
+          "targetValue": 75,
+          "animator":
+          {
+            "alphaFunction":[0.224, 0.571, 0.53, 1.0],
+            "timePeriod":
+            {
+              "duration":1.0,
+              "delay":2.0
+            }
+          }
+        },
+        {
+          "target":"progressVisual",
+          "property":"startAngle",
+          "initialValue": 87,
+          "targetValue": 1887,
+          "animator":
+          {
+            "alphaFunction":[0.33, 0.0, 0.3, 1.0],
+            "timePeriod":
+            {
+              "duration":3.0,
+              "delay":0.0
+            }
+          }
+        },
+        {
+          "target":"indeterminateVisual",
+          "property":"sweepAngle",
+          "initialValue": 75,
+          "targetValue": 180,
+          "animator":
+          {
+            "alphaFunction":[0.439, 0.0, 0.718, 0.428],
+            "timePeriod":
+            {
+              "duration":1.0,
+              "delay":0.0
+            }
+          }
+        },
+        {
+          "target":"indeterminateVisual",
+          "property":"sweepAngle",
+          "targetValue": 75,
+          "animator":
+          {
+            "alphaFunction":[0.224, 0.571, 0.53, 1.0],
+            "timePeriod":
+            {
+              "duration":1.0,
+              "delay":2.0
+            }
+          }
+        },
+        {
+          "target":"indeterminateVisual",
+          "property":"startAngle",
+          "initialValue": 267,
+          "targetValue": 2067,
+          "animator":
+          {
+            "alphaFunction":[0.33, 0.0, 0.3, 1.0],
+            "timePeriod":
+            {
+              "duration":3.0,
+              "delay":0.0
+            }
+          }
+        }
+      ],
+      "labelVisual":{
+        "visualType": "TEXT",
+        "textColor": [ 1.0, 1.0, 1.0, 1.0 ],
+        "pointSize" : 12.0, // Point size must always be provided to Text Visual
+        "horizontalAlignment": "CENTER",
+        "verticalAlignment": "CENTER"
+      },
+      "progressValue": 0.2,
+      "secondaryProgressValue":0.4,
+      "indeterminate": false
+    },
     "Button":
     {
       "initialAutoRepeatingDelay":2.0,
index f35f988..a5d23aa 100644 (file)
       "secondaryProgressValue":0.0,
       "indeterminate": false
     },
+    "CircularProgressBar":
+    {
+      "size":[64,64],
+      "trackVisual":{
+        "visualType":"ARC",
+        "mixColor":[0.0,0.165,0.302,1.0],
+        "thickness":4.0,
+        "startAngle":0.0,
+        "cap":"ROUND"
+      },
+      "progressVisual":{
+        "visualType":"ARC",
+        "mixColor":[0.0,0.549,1.0,1.0],
+        "thickness":4.0,
+        "startAngle":0.0,
+        "cap":"ROUND"
+      },
+      "secondaryProgressVisual":{
+        "visualType":"ARC",
+        "mixColor":[0.0,0.549,1.0,0.3],
+        "thickness":4.0,
+        "startAngle":0.0,
+        "cap":"ROUND"
+      },
+      "indeterminateVisual":{
+        "visualType":"ARC",
+        "mixColor":[0.02,0.71,0.525,1.0],
+        "thickness":4.0,
+        "startAngle":267.0,
+        "sweepAngle":75.0,
+        "cap":"ROUND"
+      },
+      "indeterminateVisualAnimation":
+      [
+        {
+          "target":"trackVisual",
+          "property":"opacity",
+          "targetValue": 0,
+          "animator":
+          {
+            "alphaFunction":"DEFAULT",
+            "timePeriod":
+            {
+              "duration":0,
+              "delay":0
+            }
+          }
+        },
+        {
+          "target":"secondaryProgressVisual",
+          "property":"opacity",
+          "targetValue": 0,
+          "animator":
+          {
+            "alphaFunction":"DEFAULT",
+            "timePeriod":
+            {
+              "duration":0,
+              "delay":0
+            }
+          }
+        },
+        {
+          "target":"progressVisual",
+          "property":"sweepAngle",
+          "initialValue": 75,
+          "targetValue": 180,
+          "animator":
+          {
+            "alphaFunction":[0.439, 0.0, 0.718, 0.428],
+            "timePeriod":
+            {
+              "duration":1.0,
+              "delay":0.0
+            }
+          }
+        },
+        {
+          "target":"progressVisual",
+          "property":"sweepAngle",
+          "targetValue": 75,
+          "animator":
+          {
+            "alphaFunction":[0.224, 0.571, 0.53, 1.0],
+            "timePeriod":
+            {
+              "duration":1.0,
+              "delay":2.0
+            }
+          }
+        },
+        {
+          "target":"progressVisual",
+          "property":"startAngle",
+          "initialValue": 87,
+          "targetValue": 1887,
+          "animator":
+          {
+            "alphaFunction":[0.33, 0.0, 0.3, 1.0],
+            "timePeriod":
+            {
+              "duration":3.0,
+              "delay":0.0
+            }
+          }
+        },
+        {
+          "target":"indeterminateVisual",
+          "property":"sweepAngle",
+          "initialValue": 75,
+          "targetValue": 180,
+          "animator":
+          {
+            "alphaFunction":[0.439, 0.0, 0.718, 0.428],
+            "timePeriod":
+            {
+              "duration":1.0,
+              "delay":0.0
+            }
+          }
+        },
+        {
+          "target":"indeterminateVisual",
+          "property":"sweepAngle",
+          "targetValue": 75,
+          "animator":
+          {
+            "alphaFunction":[0.224, 0.571, 0.53, 1.0],
+            "timePeriod":
+            {
+              "duration":1.0,
+              "delay":2.0
+            }
+          }
+        },
+        {
+          "target":"indeterminateVisual",
+          "property":"startAngle",
+          "initialValue": 267,
+          "targetValue": 2067,
+          "animator":
+          {
+            "alphaFunction":[0.33, 0.0, 0.3, 1.0],
+            "timePeriod":
+            {
+              "duration":3.0,
+              "delay":0.0
+            }
+          }
+        }
+      ],
+      "labelVisual":{
+        "visualType": "TEXT",
+        "textColor": [ 1.0, 1.0, 1.0, 1.0 ],
+        "pointSize" : 12.0, // Point size must always be provided to Text Visual
+        "horizontalAlignment": "CENTER",
+        "verticalAlignment": "CENTER"
+      },
+      "progressValue": 0.2,
+      "secondaryProgressValue":0.4,
+      "indeterminate": false
+    },
     "Button":
     {
       "styles":["Tooltip"],
index 1a9d7ab..3627ef4 100644 (file)
       "secondaryProgressValue":0.0,
       "indeterminate": false
     },
+    "CircularProgressBar":
+    {
+      "size":[64,64],
+      "trackVisual":{
+        "visualType":"ARC",
+        "mixColor":[0.0,0.165,0.302,1.0],
+        "thickness":4.0,
+        "startAngle":0.0,
+        "cap":"ROUND"
+      },
+      "progressVisual":{
+        "visualType":"ARC",
+        "mixColor":[0.0,0.549,1.0,1.0],
+        "thickness":4.0,
+        "startAngle":0.0,
+        "cap":"ROUND"
+      },
+      "secondaryProgressVisual":{
+        "visualType":"ARC",
+        "mixColor":[0.0,0.549,1.0,0.3],
+        "thickness":4.0,
+        "startAngle":0.0,
+        "cap":"ROUND"
+      },
+      "indeterminateVisual":{
+        "visualType":"ARC",
+        "mixColor":[0.02,0.71,0.525,1.0],
+        "thickness":4.0,
+        "startAngle":267.0,
+        "sweepAngle":75.0,
+        "cap":"ROUND"
+      },
+      "indeterminateVisualAnimation":
+      [
+        {
+          "target":"trackVisual",
+          "property":"opacity",
+          "targetValue": 0,
+          "animator":
+          {
+            "alphaFunction":"DEFAULT",
+            "timePeriod":
+            {
+              "duration":0,
+              "delay":0
+            }
+          }
+        },
+        {
+          "target":"secondaryProgressVisual",
+          "property":"opacity",
+          "targetValue": 0,
+          "animator":
+          {
+            "alphaFunction":"DEFAULT",
+            "timePeriod":
+            {
+              "duration":0,
+              "delay":0
+            }
+          }
+        },
+        {
+          "target":"progressVisual",
+          "property":"sweepAngle",
+          "initialValue": 75,
+          "targetValue": 180,
+          "animator":
+          {
+            "alphaFunction":[0.439, 0.0, 0.718, 0.428],
+            "timePeriod":
+            {
+              "duration":1.0,
+              "delay":0.0
+            }
+          }
+        },
+        {
+          "target":"progressVisual",
+          "property":"sweepAngle",
+          "targetValue": 75,
+          "animator":
+          {
+            "alphaFunction":[0.224, 0.571, 0.53, 1.0],
+            "timePeriod":
+            {
+              "duration":1.0,
+              "delay":2.0
+            }
+          }
+        },
+        {
+          "target":"progressVisual",
+          "property":"startAngle",
+          "initialValue": 87,
+          "targetValue": 1887,
+          "animator":
+          {
+            "alphaFunction":[0.33, 0.0, 0.3, 1.0],
+            "timePeriod":
+            {
+              "duration":3.0,
+              "delay":0.0
+            }
+          }
+        },
+        {
+          "target":"indeterminateVisual",
+          "property":"sweepAngle",
+          "initialValue": 75,
+          "targetValue": 180,
+          "animator":
+          {
+            "alphaFunction":[0.439, 0.0, 0.718, 0.428],
+            "timePeriod":
+            {
+              "duration":1.0,
+              "delay":0.0
+            }
+          }
+        },
+        {
+          "target":"indeterminateVisual",
+          "property":"sweepAngle",
+          "targetValue": 75,
+          "animator":
+          {
+            "alphaFunction":[0.224, 0.571, 0.53, 1.0],
+            "timePeriod":
+            {
+              "duration":1.0,
+              "delay":2.0
+            }
+          }
+        },
+        {
+          "target":"indeterminateVisual",
+          "property":"startAngle",
+          "initialValue": 267,
+          "targetValue": 2067,
+          "animator":
+          {
+            "alphaFunction":[0.33, 0.0, 0.3, 1.0],
+            "timePeriod":
+            {
+              "duration":3.0,
+              "delay":0.0
+            }
+          }
+        }
+      ],
+      "labelVisual":{
+        "visualType": "TEXT",
+        "textColor": [ 1.0, 1.0, 1.0, 1.0 ],
+        "pointSize" : 12.0, // Point size must always be provided to Text Visual
+        "horizontalAlignment": "CENTER",
+        "verticalAlignment": "CENTER"
+      },
+      "progressValue": 0.2,
+      "secondaryProgressValue":0.4,
+      "indeterminate": false
+    },
     "Button":
     {
       "initialAutoRepeatingDelay":2.0,
index 8092c6b..cd075ce 100644 (file)
@@ -1,6 +1,6 @@
 Name:       dali2-toolkit
 Summary:    Dali 3D engine Toolkit
-Version:    1.9.16
+Version:    1.9.17
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT