[dali_1.9.27] Merge branch 'devel/master' 31/242631/1
authorVictor Cebollada <v.cebollada@samsung.com>
Fri, 28 Aug 2020 10:12:07 +0000 (11:12 +0100)
committerVictor Cebollada <v.cebollada@samsung.com>
Fri, 28 Aug 2020 10:12:07 +0000 (11:12 +0100)
Change-Id: I46a29786191b3e10f8205eea2b56c4637f553c26

114 files changed:
automated-tests/CMakeLists.txt
automated-tests/src/dali/CMakeLists.txt
automated-tests/src/dali/dali-test-suite-utils/dali-test-suite-utils.cpp
automated-tests/src/dali/dali-test-suite-utils/dali-test-suite-utils.h
automated-tests/src/dali/dali-test-suite-utils/mesh-builder.cpp
automated-tests/src/dali/dali-test-suite-utils/mesh-builder.h
automated-tests/src/dali/utc-Dali-Animation.cpp
automated-tests/src/dali/utc-Dali-Geometry.cpp
automated-tests/src/dali/utc-Dali-Handle.cpp
automated-tests/src/dali/utc-Dali-KeyEvent.cpp
automated-tests/src/dali/utc-Dali-LongPressGestureRecognizer.cpp
automated-tests/src/dali/utc-Dali-MeshMaterial.cpp
automated-tests/src/dali/utc-Dali-Renderer.cpp
automated-tests/src/dali/utc-Dali-RotationGesture.cpp
automated-tests/src/dali/utc-Dali-RotationGestureDetector.cpp
automated-tests/src/dali/utc-Dali-RotationGestureRecognizer.cpp
automated-tests/src/dali/utc-Dali-Scene.cpp
automated-tests/src/dali/utc-Dali-Stage.cpp
automated-tests/src/dali/utc-Dali-TypeRegistry.cpp
automated-tests/src/dali/utc-Dali-VertexBuffer.cpp [moved from automated-tests/src/dali/utc-Dali-PropertyBuffer.cpp with 65% similarity]
dali/devel-api/common/stage.h
dali/devel-api/events/key-event-devel.cpp
dali/devel-api/events/key-event-devel.h
dali/devel-api/file.list
dali/devel-api/object/handle-devel.cpp
dali/devel-api/object/handle-devel.h
dali/integration-api/events/key-event-integ.cpp
dali/integration-api/events/key-event-integ.h
dali/integration-api/profiling.cpp
dali/integration-api/scene.h
dali/internal/event/actors/actor-impl.cpp [changed mode: 0755->0644]
dali/internal/event/actors/actor-impl.h
dali/internal/event/animation/animation-impl.cpp
dali/internal/event/animation/key-frame-channel.h
dali/internal/event/common/object-impl.cpp
dali/internal/event/common/object-impl.h
dali/internal/event/common/scene-impl.cpp
dali/internal/event/common/scene-impl.h
dali/internal/event/common/type-registry-impl.cpp
dali/internal/event/events/actor-gesture-data.cpp
dali/internal/event/events/actor-gesture-data.h
dali/internal/event/events/gesture-detector-impl.cpp
dali/internal/event/events/gesture-detector-impl.h
dali/internal/event/events/gesture-event-processor.cpp
dali/internal/event/events/gesture-event.cpp
dali/internal/event/events/gesture-event.h
dali/internal/event/events/gesture-processor.cpp
dali/internal/event/events/gesture-processor.h
dali/internal/event/events/gesture-recognizer.h
dali/internal/event/events/gesture-requests.h
dali/internal/event/events/key-event-impl.cpp
dali/internal/event/events/key-event-impl.h
dali/internal/event/events/key-event-processor.cpp
dali/internal/event/events/rotation-gesture/rotation-gesture-detector-impl.cpp
dali/internal/event/events/rotation-gesture/rotation-gesture-detector-impl.h
dali/internal/event/events/rotation-gesture/rotation-gesture-event.h
dali/internal/event/events/rotation-gesture/rotation-gesture-processor.cpp
dali/internal/event/events/rotation-gesture/rotation-gesture-recognizer.cpp
dali/internal/event/rendering/geometry-impl.cpp
dali/internal/event/rendering/geometry-impl.h
dali/internal/event/rendering/texture-set-impl.h
dali/internal/event/rendering/vertex-buffer-impl.cpp [moved from dali/internal/event/common/property-buffer-impl.cpp with 85% similarity]
dali/internal/event/rendering/vertex-buffer-impl.h [moved from dali/internal/event/common/property-buffer-impl.h with 70% similarity]
dali/internal/file.list
dali/internal/render/common/render-manager.cpp
dali/internal/render/common/render-manager.h
dali/internal/render/data-providers/property-buffer-data-provider.h [deleted file]
dali/internal/render/data-providers/render-data-provider.h
dali/internal/render/renderers/render-geometry.cpp
dali/internal/render/renderers/render-geometry.h
dali/internal/render/renderers/render-vertex-buffer.cpp [moved from dali/internal/render/renderers/render-property-buffer.cpp with 85% similarity]
dali/internal/render/renderers/render-vertex-buffer.h [moved from dali/internal/render/renderers/render-property-buffer.h with 86% similarity]
dali/internal/update/animation/scene-graph-animation.cpp
dali/internal/update/animation/scene-graph-animator.h
dali/internal/update/controllers/render-message-dispatcher.h
dali/internal/update/manager/render-instruction-processor.cpp
dali/internal/update/manager/update-manager.cpp
dali/internal/update/manager/update-manager.h
dali/public-api/actors/custom-actor-impl.h
dali/public-api/animation/animation.h
dali/public-api/common/constants.cpp [deleted file]
dali/public-api/common/constants.h
dali/public-api/common/dali-common.h
dali/public-api/common/dali-vector.h
dali/public-api/dali-core-version.cpp
dali/public-api/dali-core.h
dali/public-api/events/gesture.h
dali/public-api/events/key-event.cpp
dali/public-api/events/key-event.h
dali/public-api/events/rotation-gesture-detector.cpp [moved from dali/devel-api/events/rotation-gesture-detector.cpp with 94% similarity]
dali/public-api/events/rotation-gesture-detector.h [moved from dali/devel-api/events/rotation-gesture-detector.h with 94% similarity]
dali/public-api/events/rotation-gesture.cpp [moved from dali/devel-api/events/rotation-gesture.cpp with 84% similarity]
dali/public-api/events/rotation-gesture.h [moved from dali/devel-api/events/rotation-gesture.h with 92% similarity]
dali/public-api/file.list
dali/public-api/math/degree.cpp
dali/public-api/math/degree.h
dali/public-api/math/radian.h
dali/public-api/math/rect.cpp [moved from dali/devel-api/events/gesture-devel.h with 52% similarity]
dali/public-api/math/rect.h
dali/public-api/math/vector2.h
dali/public-api/math/vector3.h
dali/public-api/math/vector4.h
dali/public-api/object/handle.cpp
dali/public-api/object/handle.h
dali/public-api/object/indirect-value.cpp [new file with mode: 0644]
dali/public-api/object/indirect-value.h [new file with mode: 0644]
dali/public-api/object/property.cpp
dali/public-api/object/property.h
dali/public-api/rendering/geometry.cpp
dali/public-api/rendering/geometry.h
dali/public-api/rendering/property-buffer.cpp [deleted file]
dali/public-api/rendering/vertex-buffer.cpp [new file with mode: 0644]
dali/public-api/rendering/vertex-buffer.h [moved from dali/public-api/rendering/property-buffer.h with 75% similarity]
packaging/dali.spec

index c27852a..a3cef24 100644 (file)
@@ -1,5 +1,6 @@
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
+CMAKE_MINIMUM_REQUIRED(VERSION 3.8.2)
 PROJECT(tct_coreapi_utc)
+SET(CMAKE_CXX_STANDARD 17)
 
 INCLUDE(FindPkgConfig)
 SET(BIN_DIR "/opt/usr/bin")
index fb41a62..afa6443 100644 (file)
@@ -61,7 +61,6 @@ SET(TC_SOURCES
         utc-Dali-PixelData.cpp
         utc-Dali-Processors.cpp
         utc-Dali-PropertyArray.cpp
-        utc-Dali-PropertyBuffer.cpp
         utc-Dali-PropertyMap.cpp
         utc-Dali-PropertyNotification.cpp
         utc-Dali-PropertyTypes.cpp
@@ -101,6 +100,7 @@ SET(TC_SOURCES
         utc-Dali-Vector2.cpp
         utc-Dali-Vector3.cpp
         utc-Dali-Vector4.cpp
+        utc-Dali-VertexBuffer.cpp
         utc-Dali-WeakHandle.cpp
         utc-Dali-WheelEvent.cpp
 )
@@ -126,6 +126,7 @@ PKG_CHECK_MODULES(${CAPI_LIB} REQUIRED
      dali2-core
 )
 
+ADD_COMPILE_OPTIONS( -rdynamic )
 ADD_COMPILE_OPTIONS( -O0 -ggdb --coverage -Wall -Werror )
 ADD_COMPILE_OPTIONS( ${${CAPI_LIB}_CFLAGS_OTHER} )
 
@@ -144,7 +145,7 @@ ADD_DEFINITIONS( -DADDON_LIBS_PATH=\"${CMAKE_CURRENT_BINARY_DIR}\" )
 ADD_EXECUTABLE(${EXEC_NAME} ${EXEC_NAME}.cpp ${TC_SOURCES})
 TARGET_LINK_LIBRARIES(${EXEC_NAME}
     ${${CAPI_LIB}_LIBRARIES}
-    -lpthread -ldl --coverage
+    -lpthread -ldl --coverage -rdynamic
 )
 
 # Path to installed precompiled addons
index 4a4ac81..87750e2 100644 (file)
@@ -40,6 +40,8 @@ void tet_result(int32_t value)
 #define END_TEST \
   return ((test_return_value>0)?1:0)
 
+extern "C"
+{
 
 void tet_infoline(const char* str)
 {
@@ -53,6 +55,8 @@ void tet_printf(const char *format, ...)
   vfprintf(stderr, format, arg);
   va_end(arg);
 }
+}
+
 
 bool operator==(TimePeriod a, TimePeriod b)
 {
index 0c5efa3..7ba3196 100644 (file)
 #include <dali/public-api/dali-core.h>
 #include <test-compare-types.h>
 
+extern "C"
+{
 void tet_infoline(const char*str);
 void tet_printf(const char *format, ...);
+}
 
 #include "test-application.h"
 #include "test-actor-utils.h"
@@ -305,6 +308,17 @@ void DALI_TEST_EQUALS( const std::string &str1, const char* str2, const char* lo
 void DALI_TEST_EQUALS( const char* str1, const std::string &str2, const char* location);
 
 /**
+ * Test if a property value type is equal to a trivial type.
+ */
+template<typename Type>
+inline void DALI_TEST_VALUE_EQUALS( Property::Value&& value1, Type value2, float epsilon, const char* location)
+{
+  Property::Value value2b(value2);
+  DALI_TEST_EQUALS(value1, value2b, epsilon, location);
+}
+
+
+/**
  * Test whether one unsigned integer value is greater than another.
  * Test succeeds if value1 > value2
  * @param[in] value1 The first value
index 2e8f724..3d7c359 100644 (file)
@@ -38,19 +38,19 @@ TextureSet CreateTextureSet( Texture texture )
   return textureSet;
 }
 
-PropertyBuffer CreatePropertyBuffer()
+VertexBuffer CreateVertexBuffer()
 {
   Property::Map texturedQuadVertexFormat;
   texturedQuadVertexFormat["aPosition"] = Property::VECTOR2;
   texturedQuadVertexFormat["aVertexCoord"] = Property::VECTOR2;
 
-  PropertyBuffer vertexData = PropertyBuffer::New( texturedQuadVertexFormat );
+  VertexBuffer vertexData = VertexBuffer::New( texturedQuadVertexFormat );
   return vertexData;
 }
 
 Geometry CreateQuadGeometry(void)
 {
-  PropertyBuffer vertexData = CreatePropertyBuffer();
+  VertexBuffer vertexData = CreateVertexBuffer();
   const float halfQuadSize = .5f;
   struct TexturedQuadVertex { Vector2 position; Vector2 textureCoordinates; };
   TexturedQuadVertex texturedQuadVertexData[4] = {
index 37d13ec..e593d38 100644 (file)
@@ -28,7 +28,7 @@ Shader CreateShader();
 TextureSet CreateTextureSet();
 TextureSet CreateTextureSet( Texture texture );
 Geometry CreateQuadGeometry();
-PropertyBuffer CreatePropertyBuffer();
+VertexBuffer CreateVertexBuffer();
 
 }
 
index 8d6b8d0..da1cd92 100644 (file)
@@ -549,7 +549,7 @@ int UtcDaliAnimationSetLoopCountP2(void)
   Animation animation = Animation::New(durationSeconds);
   Vector3 targetPosition(10.0f, 10.0f, 10.0f);
   animation.AnimateTo(Property(actor, Actor::Property::POSITION), targetPosition, AlphaFunction::LINEAR);
-  animation.SetEndAction(Animation::Discard);
+  animation.SetEndAction(Animation::DISCARD);
 
   // Start the animation
   animation.SetLoopCount(3);
@@ -670,7 +670,7 @@ int UtcDaliAnimationSetLoopCountP3(void)
   Animation animation = Animation::New(durationSeconds);
   Vector3 targetPosition(10.0f, 10.0f, 10.0f);
   animation.AnimateTo(Property(actor, Actor::Property::POSITION), targetPosition, AlphaFunction::LINEAR);
-  animation.SetEndAction(Animation::Discard);
+  animation.SetEndAction(Animation::DISCARD);
 
   float intervalSeconds = 3.0f;
 
@@ -734,7 +734,7 @@ int UtcDaliAnimationSetLoopCountP4(void)
   Animation animation = Animation::New(durationSeconds);
   Vector3 targetPosition(10.0f, 10.0f, 10.0f);
   animation.AnimateTo(Property(actor, Actor::Property::POSITION), targetPosition, AlphaFunction::LINEAR);
-  animation.SetEndAction(Animation::Bake);
+  animation.SetEndAction(Animation::BAKE);
 
   float intervalSeconds = 3.0f;
 
@@ -902,7 +902,7 @@ int UtcDaliAnimationSetEndActionN(void)
   // Build the animation
   float durationSeconds(1.0f);
   Animation animation = Animation::New(durationSeconds);
-  DALI_TEST_CHECK(animation.GetEndAction() == Animation::Bake);
+  DALI_TEST_CHECK(animation.GetEndAction() == Animation::BAKE);
 
   Vector3 targetPosition(10.0f, 10.0f, 10.0f);
   animation.AnimateTo(Property(actor, Actor::Property::POSITION), targetPosition, AlphaFunction::LINEAR);
@@ -930,8 +930,8 @@ int UtcDaliAnimationSetEndActionN(void)
 
   // Test BakeFinal, animate again, for half the duration
   finishCheck.Reset();
-  animation.SetEndAction(Animation::BakeFinal);
-  DALI_TEST_CHECK(animation.GetEndAction() == Animation::BakeFinal);
+  animation.SetEndAction(Animation::BAKE_FINAL);
+  DALI_TEST_CHECK(animation.GetEndAction() == Animation::BAKE_FINAL);
   animation.Play();
 
   application.SendNotification();
@@ -957,8 +957,8 @@ int UtcDaliAnimationSetEndActionN(void)
 
   // Test EndAction::Discard, animate again, but don't bake this time
   finishCheck.Reset();
-  animation.SetEndAction(Animation::Discard);
-  DALI_TEST_CHECK(animation.GetEndAction() == Animation::Discard);
+  animation.SetEndAction(Animation::DISCARD);
+  DALI_TEST_CHECK(animation.GetEndAction() == Animation::DISCARD);
   animation.Play();
 
   application.SendNotification();
@@ -986,13 +986,13 @@ int UtcDaliAnimationGetEndActionP(void)
   TestApplication application;
 
   Animation animation = Animation::New(1.0f);
-  DALI_TEST_CHECK(animation.GetEndAction() == Animation::Bake);
+  DALI_TEST_CHECK(animation.GetEndAction() == Animation::BAKE);
 
-  animation.SetEndAction(Animation::Discard);
-  DALI_TEST_CHECK(animation.GetEndAction() == Animation::Discard);
+  animation.SetEndAction(Animation::DISCARD);
+  DALI_TEST_CHECK(animation.GetEndAction() == Animation::DISCARD);
 
-  animation.SetEndAction(Animation::BakeFinal);
-  DALI_TEST_CHECK(animation.GetEndAction() == Animation::BakeFinal);
+  animation.SetEndAction(Animation::BAKE_FINAL);
+  DALI_TEST_CHECK(animation.GetEndAction() == Animation::BAKE_FINAL);
 
   END_TEST;
 }
@@ -1010,7 +1010,7 @@ int UtcDaliAnimationSetDisconnectActionP(void)
     // Build the animation
     float durationSeconds(1.0f);
     Animation animation = Animation::New(durationSeconds);
-    DALI_TEST_CHECK(animation.GetDisconnectAction() == Animation::BakeFinal);
+    DALI_TEST_CHECK(animation.GetDisconnectAction() == Animation::BAKE_FINAL);
 
     Vector3 targetPosition(10.0f, 10.0f, 10.0f);
     animation.AnimateTo(Property(actor, Actor::Property::POSITION), targetPosition, AlphaFunction::LINEAR);
@@ -1037,7 +1037,7 @@ int UtcDaliAnimationSetDisconnectActionP(void)
     // Build the animation
     float durationSeconds(1.0f);
     Animation animation = Animation::New(durationSeconds);
-    animation.SetDisconnectAction( Animation::Bake );
+    animation.SetDisconnectAction( Animation::BAKE );
 
     Vector3 targetPosition(10.0f, 10.0f, 10.0f);
     animation.AnimateTo(Property(actor, Actor::Property::POSITION), targetPosition, AlphaFunction::LINEAR);
@@ -1064,7 +1064,7 @@ int UtcDaliAnimationSetDisconnectActionP(void)
     // Build the animation
     float durationSeconds(1.0f);
     Animation animation = Animation::New(durationSeconds);
-    animation.SetDisconnectAction( Animation::Discard );
+    animation.SetDisconnectAction( Animation::DISCARD );
 
     Vector3 targetPosition(10.0f, 10.0f, 10.0f);
     animation.AnimateTo(Property(actor, Actor::Property::POSITION), targetPosition, AlphaFunction::LINEAR);
@@ -1113,13 +1113,13 @@ int UtcDaliAnimationGetDisconnectActionP(void)
 {
   TestApplication application;
   Animation animation = Animation::New(1.0f);
-  DALI_TEST_CHECK(animation.GetDisconnectAction() == Animation::BakeFinal); // default!
+  DALI_TEST_CHECK(animation.GetDisconnectAction() == Animation::BAKE_FINAL); // default!
 
-  animation.SetDisconnectAction(Animation::Discard);
-  DALI_TEST_CHECK(animation.GetDisconnectAction() == Animation::Discard);
+  animation.SetDisconnectAction(Animation::DISCARD);
+  DALI_TEST_CHECK(animation.GetDisconnectAction() == Animation::DISCARD);
 
-  animation.SetDisconnectAction(Animation::Bake);
-  DALI_TEST_CHECK(animation.GetDisconnectAction() == Animation::Bake);
+  animation.SetDisconnectAction(Animation::BAKE);
+  DALI_TEST_CHECK(animation.GetDisconnectAction() == Animation::BAKE);
 
   END_TEST;
 }
@@ -2166,7 +2166,7 @@ int UtcDaliAnimationPlayOffSceneDiscardP(void)
   // Build the animation
   float durationSeconds(1.0f);
   Animation animation = Animation::New(durationSeconds);
-  animation.SetDisconnectAction( Animation::Discard );
+  animation.SetDisconnectAction( Animation::DISCARD );
   Vector3 targetPosition(100.0f, 100.0f, 100.0f);
   animation.AnimateTo(Property(actor, Actor::Property::POSITION), targetPosition, AlphaFunction::LINEAR);
 
@@ -2343,7 +2343,7 @@ int UtcDaliAnimationPlayOffSceneBakeP(void)
   // Build the animation
   float durationSeconds(1.0f);
   Animation animation = Animation::New(durationSeconds);
-  animation.SetDisconnectAction( Animation::Bake );
+  animation.SetDisconnectAction( Animation::BAKE );
   Vector3 targetPosition(100.0f, 100.0f, 100.0f);
   animation.AnimateTo(Property(actor, Actor::Property::POSITION), targetPosition, AlphaFunction::LINEAR);
 
@@ -9160,7 +9160,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaCubicP(void)
   keyFrames.Add(0.8f, 0.7f);
   keyFrames.Add(1.0f, 0.9f);
 
-  animation.AnimateBetween( Property(actor, Actor::Property::COLOR_ALPHA), keyFrames, Animation::Cubic );
+  animation.AnimateBetween( Property(actor, Actor::Property::COLOR_ALPHA), keyFrames, Animation::CUBIC );
 
   // Start the animation
   animation.Play();
@@ -9335,7 +9335,7 @@ int UtcDaliAnimationAnimateBetweenActorColorCubicP(void)
   keyFrames.Add(0.5f, Vector4(0.9f, 0.8f, 0.7f, 0.6f));
   keyFrames.Add(1.0f, Vector4(1.0f, 1.0f, 1.0f, 1.0f));
 
-  animation.AnimateBetween( Property(actor, Actor::Property::COLOR), keyFrames, Animation::Cubic );
+  animation.AnimateBetween( Property(actor, Actor::Property::COLOR), keyFrames, Animation::CUBIC );
 
   // Start the animation
   animation.Play();
@@ -9460,7 +9460,7 @@ int UtcDaliAnimationAnimateBetweenActorVisibleCubicP(void)
   keyFrames.Add(1.0f, true);
 
   //Cubic interpolation for boolean values should be ignored
-  animation.AnimateBetween( Property(actor, Actor::Property::VISIBLE), keyFrames, Animation::Cubic );
+  animation.AnimateBetween( Property(actor, Actor::Property::VISIBLE), keyFrames, Animation::CUBIC );
 
   // Start the animation
   animation.Play();
@@ -9613,7 +9613,7 @@ int UtcDaliAnimationAnimateBetweenActorOrientation01CubicP(void)
   keyFrames.Add(0.0f, AngleAxis(Degree(60), Vector3::ZAXIS));
 
   //Cubic interpolation should be ignored for quaternions
-  animation.AnimateBetween( Property(actor, Actor::Property::ORIENTATION), keyFrames, Animation::Cubic );
+  animation.AnimateBetween( Property(actor, Actor::Property::ORIENTATION), keyFrames, Animation::CUBIC );
 
   // Start the animation
   animation.Play();
@@ -9659,7 +9659,7 @@ int UtcDaliAnimationAnimateBetweenActorOrientation02CubicP(void)
   keyFrames.Add(1.0f, AngleAxis(Degree(120), Vector3::YAXIS));
 
   //Cubic interpolation should be ignored for quaternions
-  animation.AnimateBetween( Property(actor, Actor::Property::ORIENTATION), keyFrames, Animation::Cubic );
+  animation.AnimateBetween( Property(actor, Actor::Property::ORIENTATION), keyFrames, Animation::CUBIC );
 
   // Start the animation
   animation.Play();
@@ -9808,7 +9808,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaFunctionCubicP(void)
   keyFrames.Add(0.5f, Vector4(0.9f, 0.8f, 0.7f, 0.6f));
   keyFrames.Add(1.0f, Vector4(1.0f, 1.0f, 1.0f, 1.0f));
 
-  animation.AnimateBetween( Property(actor, Actor::Property::COLOR), keyFrames, AlphaFunction::LINEAR, Animation::Cubic );
+  animation.AnimateBetween( Property(actor, Actor::Property::COLOR), keyFrames, AlphaFunction::LINEAR, Animation::CUBIC );
 
   // Start the animation
   animation.Play();
@@ -9969,7 +9969,7 @@ int UtcDaliAnimationAnimateBetweenActorColorTimePeriodCubicP(void)
   keyFrames.Add(0.5f, Vector4(0.9f, 0.8f, 0.7f, 0.6f));
   keyFrames.Add(1.0f, Vector4(1.0f, 1.0f, 1.0f, 1.0f));
 
-  animation.AnimateBetween( Property(actor, Actor::Property::COLOR), keyFrames, TimePeriod( delay, durationSeconds - delay ), Animation::Cubic );
+  animation.AnimateBetween( Property(actor, Actor::Property::COLOR), keyFrames, TimePeriod( delay, durationSeconds - delay ), Animation::CUBIC );
 
   // Start the animation
   animation.Play();
@@ -10132,7 +10132,7 @@ int UtcDaliAnimationAnimateBetweenActorColorCubicWithDelayP(void)
   keyFrames.Add(0.5f, Vector4(0.9f, 0.8f, 0.7f, 0.6f));
   keyFrames.Add(1.0f, Vector4(1.0f, 1.0f, 1.0f, 1.0f));
 
-  animation.AnimateBetween( Property(actor, Actor::Property::COLOR), keyFrames, AlphaFunction::LINEAR, TimePeriod( delay, durationSeconds - delay ), Animation::Cubic );
+  animation.AnimateBetween( Property(actor, Actor::Property::COLOR), keyFrames, AlphaFunction::LINEAR, TimePeriod( delay, durationSeconds - delay ), Animation::CUBIC );
 
   // Start the animation
   animation.Play();
@@ -13418,9 +13418,9 @@ void CheckPropertyValuesWhenCallingAnimationMethod( TestFunction functionToTest,
 
   ExpectedValue expectedValueTable[] =
   {
-   { Animation::Bake,      halfWayToTarget  }, // When baking, the current value is the final value.
-   { Animation::BakeFinal, targetPosition   }, // When BakeFinal, we should jump to the final value when clearing or stopping.
-   { Animation::Discard,   originalPosition }, // When discarding, we should jump back to the original value when clearing or stopping.
+   { Animation::BAKE,      halfWayToTarget  }, // When baking, the current value is the final value.
+   { Animation::BAKE_FINAL, targetPosition   }, // When BakeFinal, we should jump to the final value when clearing or stopping.
+   { Animation::DISCARD,   originalPosition }, // When discarding, we should jump back to the original value when clearing or stopping.
   };
   const auto expectedValueTableCount = sizeof( expectedValueTable ) / sizeof( ExpectedValue );
 
@@ -13488,9 +13488,9 @@ int UtcDaliAnimationPausePropertyValue(void)
 
   Animation::EndAction endActions[] =
   {
-   Animation::Bake,
-   Animation::BakeFinal,
-   Animation::Discard,
+   Animation::BAKE,
+   Animation::BAKE_FINAL,
+   Animation::DISCARD,
   };
   const auto endActionCount = sizeof( endActions ) / sizeof( endActions[0] );
 
@@ -13700,7 +13700,7 @@ int UtcDaliAnimationSetEndActionNegative(void)
   Dali::Animation instance;
   try
   {
-    Dali::Animation::EndAction arg1(Animation::Bake);
+    Dali::Animation::EndAction arg1(Animation::BAKE);
     instance.SetEndAction(arg1);
     DALI_TEST_CHECK(false); // Should not get here
   }
@@ -13773,7 +13773,7 @@ int UtcDaliAnimationAnimateBetweenNegative02(void)
   {
     Dali::Property arg1(actor, Actor::Property::POSITION);
     Dali::KeyFrames arg2;
-    Dali::Animation::Interpolation arg3(Animation::Linear);
+    Dali::Animation::Interpolation arg3(Animation::LINEAR);
     instance.AnimateBetween(arg1,arg2,arg3);
     DALI_TEST_CHECK(false); // Should not get here
   }
@@ -13814,7 +13814,7 @@ int UtcDaliAnimationAnimateBetweenNegative04(void)
     Dali::Property arg1(actor, Actor::Property::POSITION);
     Dali::KeyFrames arg2;
     Dali::TimePeriod arg3(1.0f);
-    Dali::Animation::Interpolation arg4(Animation::Linear);
+    Dali::Animation::Interpolation arg4(Animation::LINEAR);
     instance.AnimateBetween(arg1,arg2,arg3,arg4);
     DALI_TEST_CHECK(false); // Should not get here
   }
@@ -13855,7 +13855,7 @@ int UtcDaliAnimationAnimateBetweenNegative06(void)
     Dali::Property arg1(actor, Actor::Property::POSITION);
     Dali::KeyFrames arg2;
     Dali::AlphaFunction arg3;
-    Dali::Animation::Interpolation arg4(Animation::Linear);
+    Dali::Animation::Interpolation arg4(Animation::LINEAR);
     instance.AnimateBetween(arg1,arg2,arg3,arg4);
     DALI_TEST_CHECK(false); // Should not get here
   }
@@ -13898,7 +13898,7 @@ int UtcDaliAnimationAnimateBetweenNegative08(void)
     Dali::KeyFrames arg2;
     Dali::AlphaFunction arg3;
     Dali::TimePeriod arg4(1.0f);
-    Dali::Animation::Interpolation arg5(Animation::Linear);
+    Dali::Animation::Interpolation arg5(Animation::LINEAR);
     instance.AnimateBetween(arg1,arg2,arg3,arg4,arg5);
     DALI_TEST_CHECK(false); // Should not get here
   }
@@ -14014,7 +14014,7 @@ int UtcDaliAnimationSetDisconnectActionNegative(void)
   Dali::Animation instance;
   try
   {
-    Dali::Animation::EndAction arg1(Animation::Bake);
+    Dali::Animation::EndAction arg1(Animation::BAKE);
     instance.SetDisconnectAction(arg1);
     DALI_TEST_CHECK(false); // Should not get here
   }
index 7fe2e63..dbbb0f8 100644 (file)
@@ -37,7 +37,7 @@ namespace
 
 struct TexturedQuadVertex { Vector2 position; Vector2 textureCoordinates; };
 
-PropertyBuffer CreateVertexBuffer( const std::string& aPosition, const std::string& aTexCoord )
+VertexBuffer CreateVertexBuffer( const std::string& aPosition, const std::string& aTexCoord )
 {
   const float halfQuadSize = .5f;
   TexturedQuadVertex texturedQuadVertexData[4] = {
@@ -50,7 +50,7 @@ PropertyBuffer CreateVertexBuffer( const std::string& aPosition, const std::stri
   vertexFormat[aPosition] = Property::VECTOR2;
   vertexFormat[aTexCoord] = Property::VECTOR2;
 
-  PropertyBuffer vertexData = PropertyBuffer::New( vertexFormat );
+  VertexBuffer vertexData = VertexBuffer::New( vertexFormat );
   vertexData.SetData( texturedQuadVertexData, 4 );
 
   return vertexData;
@@ -114,7 +114,7 @@ int UtcDaliGeometryMoveConstructor(void)
   DALI_TEST_EQUALS( 1, geometry.GetBaseObject().ReferenceCount(), TEST_LOCATION );
   DALI_TEST_EQUALS( 0u, geometry.GetNumberOfVertexBuffers(), TEST_LOCATION );
 
-  PropertyBuffer vertexBuffer = CreateVertexBuffer("aPosition", "aTexCoord" );
+  VertexBuffer vertexBuffer = CreateVertexBuffer("aPosition", "aTexCoord" );
   geometry.AddVertexBuffer( vertexBuffer );
   DALI_TEST_EQUALS( 1u, geometry.GetNumberOfVertexBuffers(), TEST_LOCATION );
 
@@ -136,7 +136,7 @@ int UtcDaliGeometryMoveAssignment(void)
   DALI_TEST_EQUALS( 1, geometry.GetBaseObject().ReferenceCount(), TEST_LOCATION );
   DALI_TEST_EQUALS( 0u, geometry.GetNumberOfVertexBuffers(), TEST_LOCATION );
 
-  PropertyBuffer vertexBuffer = CreateVertexBuffer("aPosition", "aTexCoord" );
+  VertexBuffer vertexBuffer = CreateVertexBuffer("aPosition", "aTexCoord" );
   geometry.AddVertexBuffer( vertexBuffer );
   DALI_TEST_EQUALS( 1u, geometry.GetNumberOfVertexBuffers(), TEST_LOCATION );
 
@@ -178,7 +178,7 @@ int UtcDaliGeometryAddVertexBuffer(void)
 
   tet_infoline("Test AddVertexBuffer");
 
-  PropertyBuffer vertexBuffer1 = CreateVertexBuffer("aPosition1", "aTexCoord1" );
+  VertexBuffer vertexBuffer1 = CreateVertexBuffer("aPosition1", "aTexCoord1" );
   Geometry geometry = Geometry::New();
   geometry.AddVertexBuffer( vertexBuffer1 );
 
@@ -206,7 +206,7 @@ int UtcDaliGeometryAddVertexBuffer(void)
   // add the second vertex buffer
   application.GetGlAbstraction().ResetBufferDataCalls();
 
-  PropertyBuffer vertexBuffer2 = CreateVertexBuffer( "aPosition2", "aTexCoord2" );
+  VertexBuffer vertexBuffer2 = CreateVertexBuffer( "aPosition2", "aTexCoord2" );
   geometry.AddVertexBuffer( vertexBuffer2 );
   application.SendNotification();
   application.Render(0);
@@ -230,9 +230,9 @@ int UtcDaliGeometryGetNumberOfVertexBuffers(void)
   TestApplication application;
 
   tet_infoline("Test GetNumberOfVertexBuffers");
-  PropertyBuffer vertexBuffer1 = CreateVertexBuffer("aPosition1", "aTexCoord1" );
-  PropertyBuffer vertexBuffer2 = CreateVertexBuffer("aPosition2", "aTexCoord2" );
-  PropertyBuffer vertexBuffer3 = CreateVertexBuffer("aPosition3", "aTexCoord3" );
+  VertexBuffer vertexBuffer1 = CreateVertexBuffer("aPosition1", "aTexCoord1" );
+  VertexBuffer vertexBuffer2 = CreateVertexBuffer("aPosition2", "aTexCoord2" );
+  VertexBuffer vertexBuffer3 = CreateVertexBuffer("aPosition3", "aTexCoord3" );
 
   Geometry geometry = Geometry::New();
   geometry.AddVertexBuffer( vertexBuffer1 );
@@ -254,8 +254,8 @@ int UtcDaliGeometryRemoveVertexBuffer(void)
 
   tet_infoline("Test RemoveVertexBuffer");
 
-  PropertyBuffer vertexBuffer1 = CreateVertexBuffer("aPosition1", "aTexCoord1" );
-  PropertyBuffer vertexBuffer2 = CreateVertexBuffer("aPosition2", "aTexCoord2" );
+  VertexBuffer vertexBuffer1 = CreateVertexBuffer("aPosition1", "aTexCoord1" );
+  VertexBuffer vertexBuffer2 = CreateVertexBuffer("aPosition2", "aTexCoord2" );
 
   Geometry geometry = Geometry::New();
   geometry.AddVertexBuffer( vertexBuffer1 );
@@ -288,7 +288,7 @@ int UtcDaliGeometrySetIndexBuffer(void)
 
   tet_infoline("Test SetIndexBuffer");
 
-  PropertyBuffer vertexBuffer = CreateVertexBuffer("aPosition", "aTexCoord" );
+  VertexBuffer vertexBuffer = CreateVertexBuffer("aPosition", "aTexCoord" );
 
   Geometry geometry = Geometry::New();
   geometry.AddVertexBuffer( vertexBuffer );
@@ -346,7 +346,7 @@ int UtcDaliGeometrySetGetGeometryType01(void)
   tet_infoline("Test SetType and GetType: without index buffer");
 
   unsigned int numVertex = 4u;
-  PropertyBuffer vertexBuffer = CreateVertexBuffer("aPosition", "aTexCoord" );
+  VertexBuffer vertexBuffer = CreateVertexBuffer("aPosition", "aTexCoord" );
 
   Geometry geometry = Geometry::New();
   geometry.AddVertexBuffer( vertexBuffer );
@@ -475,7 +475,7 @@ int UtcDaliGeometrySetGetGeometryType02(void)
 
   unsigned int numVertex = 4u;
   unsigned int numIndex = 6u; // 6 unsigned short
-  PropertyBuffer vertexBuffer = CreateVertexBuffer("aPosition", "aTexCoord" );
+  VertexBuffer vertexBuffer = CreateVertexBuffer("aPosition", "aTexCoord" );
 
 
   Geometry geometry = Geometry::New();
@@ -619,7 +619,7 @@ int UtcDaliGeometryAddVertexBufferNegative(void)
   Dali::Geometry instance;
   try
   {
-    Dali::PropertyBuffer arg1;
+    Dali::VertexBuffer arg1;
     instance.AddVertexBuffer(arg1);
     DALI_TEST_CHECK(false); // Should not get here
   }
index 5f5e962..24a4000 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #include <iostream>
-
+#include <typeinfo>
 #include <stdlib.h>
 #include <dali/public-api/dali-core.h>
 #include <dali/devel-api/actors/actor-devel.h>
@@ -263,17 +263,17 @@ int UtcDaliHandleGetPropertyIndex02(void)
   const float withFlake(99.f);
 
   Property::Index index1 = actor.RegisterProperty( "MyPropertyOne", Vector3::ONE );
-  Property::Index index2 = DevelHandle::RegisterProperty( actor, key1, "sideColor", testColor);
+  Property::Index index2 = actor.RegisterProperty( key1, "sideColor", testColor);
   Property::Index index3 = actor.RegisterProperty( "MyPropertyTwo", Vector3::ONE );
-  Property::Index index4 = DevelHandle::RegisterProperty( actor, key2, "iceCream", withFlake );
+  Property::Index index4 = actor.RegisterProperty( key2, "iceCream", withFlake );
   Property::Index index5 = actor.RegisterProperty( "MyPropertyThree", Vector3::ONE );
 
   application.SendNotification();
   application.Render();
 
   // Test that we can get the property index from the integer key
-  Property::Index testIndex1 = DevelHandle::GetPropertyIndex( actor, key1 );
-  Property::Index testIndex2 = DevelHandle::GetPropertyIndex( actor, key2 );
+  Property::Index testIndex1 = actor.GetPropertyIndex( key1 );
+  Property::Index testIndex2 = actor.GetPropertyIndex( key2 );
 
   DALI_TEST_EQUALS( index2, testIndex1, TEST_LOCATION );
   DALI_TEST_EQUALS( index4, testIndex2, TEST_LOCATION );
@@ -303,15 +303,15 @@ int UtcDaliHandleGetPropertyIndex03(void)
   std::string myName("croydon");
   Property::Index intKey = CORE_PROPERTY_MAX_INDEX+1;
   Property::Value value( Color::GREEN );
-  Property::Index myIndex = DevelHandle::RegisterProperty( actor, intKey, myName, value );
+  Property::Index myIndex = actor.RegisterProperty( intKey, myName, value );
 
-  DALI_TEST_EQUALS( myIndex, DevelHandle::GetPropertyIndex( actor, intKey ), TEST_LOCATION );
+  DALI_TEST_EQUALS( myIndex, actor.GetPropertyIndex( intKey ), TEST_LOCATION );
 
   Property::Key key1(myName);
   Property::Key key2(intKey);
 
-  DALI_TEST_EQUALS( myIndex, DevelHandle::GetPropertyIndex( actor, key1 ), TEST_LOCATION );
-  DALI_TEST_EQUALS( myIndex, DevelHandle::GetPropertyIndex( actor, key2 ), TEST_LOCATION );
+  DALI_TEST_EQUALS( myIndex, actor.GetPropertyIndex( key1 ), TEST_LOCATION );
+  DALI_TEST_EQUALS( myIndex, actor.GetPropertyIndex( key2 ), TEST_LOCATION );
   END_TEST;
 }
 
@@ -750,8 +750,8 @@ int UtcDaliHandleRegisterProperty02(void)
   const float withFlake(99.f);
 
   Property::Index index1 = actor.RegisterProperty( "MyPropertyOne", Vector3::ONE );
-  Property::Index index2 = DevelHandle::RegisterProperty( actor, key1, "sideColor", testColor);
-  Property::Index index3 = DevelHandle::RegisterProperty( actor, key2, "iceCream", withFlake );
+  Property::Index index2 = actor.RegisterProperty( key1, "sideColor", testColor);
+  Property::Index index3 = actor.RegisterProperty( key2, "iceCream", withFlake );
 
   application.SendNotification();
   application.Render();
@@ -852,9 +852,9 @@ int UtcDaliHandleGetPropertyIndices(void)
   Property::Index key2 = CORE_PROPERTY_MAX_INDEX+2;
 
   actor.RegisterProperty( "MyPropertyOne", Vector3::ONE );
-  DevelHandle::RegisterProperty( actor, key1, "sideColor", testColor);
+  actor.RegisterProperty( key1, "sideColor", testColor);
   actor.RegisterProperty( "MyPropertyTwo", 1234 );
-  Property::Index index4 = DevelHandle::RegisterProperty( actor, key2, "iceCream", withFlake );
+  Property::Index index4 = actor.RegisterProperty( key2, "iceCream", withFlake );
   actor.RegisterProperty( "MyPropertyThree", Vector2(.2f,.7f) );
 
   actor.GetPropertyIndices( indices );
@@ -1501,7 +1501,7 @@ int UtcDaliHandleDoesCustomPropertyExistP1(void)
   Actor actor = Actor::New();
   auto propertyIndex = actor.RegisterProperty("customProperty1", 1.0f);
 
-  DALI_TEST_EQUALS( DevelHandle::DoesCustomPropertyExist( actor, propertyIndex ), true, TEST_LOCATION );
+  DALI_TEST_EQUALS( actor.DoesCustomPropertyExist( propertyIndex ), true, TEST_LOCATION );
   END_TEST;
 }
 
@@ -1514,7 +1514,7 @@ int UtcDaliHandleDoesCustomPropertyExistN1(void)
   Actor actor = Actor::New();
   auto propertyIndex = actor.RegisterProperty("customProperty1", 1.0f);
 
-  DALI_TEST_EQUALS( DevelHandle::DoesCustomPropertyExist( actor, propertyIndex+1 ), false, TEST_LOCATION );
+  DALI_TEST_EQUALS( actor.DoesCustomPropertyExist( propertyIndex+1 ), false, TEST_LOCATION );
   END_TEST;
 }
 
@@ -1525,7 +1525,7 @@ int UtcDaliHandleDoesCustomPropertyExistN2(void)
   tet_infoline( "Test that a default property does not show as a custom property on object" );
 
   Actor actor = Actor::New();
-  DALI_TEST_EQUALS( DevelHandle::DoesCustomPropertyExist( actor, Actor::Property::POSITION ), false, TEST_LOCATION );
+  DALI_TEST_EQUALS( actor.DoesCustomPropertyExist( Actor::Property::POSITION ), false, TEST_LOCATION );
   END_TEST;
 }
 
@@ -1548,7 +1548,7 @@ int UtcDaliHandleDoesCustomPropertyExistN3(void)
   auto child = Actor::New();
   container.Add( child ); // Resolve child properties (if any)
 
-  DALI_TEST_EQUALS( DevelHandle::DoesCustomPropertyExist( child, CHILD_PROPERTY ), false, TEST_LOCATION );
+  DALI_TEST_EQUALS( child.DoesCustomPropertyExist( CHILD_PROPERTY ), false, TEST_LOCATION );
   END_TEST;
 }
 
@@ -1572,7 +1572,7 @@ int UtcDaliHandleDoesCustomPropertyExistP2(void)
   container.Add( child ); // Resolve child properties (if any)
   child.SetProperty( CHILD_PROPERTY, 2 );
 
-  DALI_TEST_EQUALS( DevelHandle::DoesCustomPropertyExist( child, CHILD_PROPERTY ), true, TEST_LOCATION );
+  DALI_TEST_EQUALS( child.DoesCustomPropertyExist( CHILD_PROPERTY ), true, TEST_LOCATION );
   DALI_TEST_EQUALS( child.GetProperty<int>( CHILD_PROPERTY ), 2, TEST_LOCATION );
   END_TEST;
 }
@@ -1597,7 +1597,7 @@ int UtcDaliHandleDoesCustomPropertyExistP3(void)
   child.RegisterProperty( CHILD_PROPERTY_NAME, Property::Value(3) );
   container.Add( child ); // Resolve child properties (if any)
 
-  DALI_TEST_EQUALS( DevelHandle::DoesCustomPropertyExist( child, CHILD_PROPERTY ), true, TEST_LOCATION );
+  DALI_TEST_EQUALS( child.DoesCustomPropertyExist( CHILD_PROPERTY ), true, TEST_LOCATION );
   DALI_TEST_EQUALS( child.GetProperty<int>( CHILD_PROPERTY ), 3, TEST_LOCATION );
   END_TEST;
 }
@@ -1654,7 +1654,7 @@ int UtcDaliHandlePropertySetSignal01(void)
   tet_infoline( "Test that setting a default property triggers a signal" );
 
   auto actor = Actor::New();
-  DevelHandle::PropertySetSignal(actor).Connect(&application, propertySetCheck);
+  actor.PropertySetSignal().Connect(&application, propertySetCheck);
 
   actor.SetProperty( Actor::Property::POSITION, Vector3::XAXIS );
   propertySetCheck.CheckSignalReceived();
@@ -1674,7 +1674,7 @@ int UtcDaliHandlePropertySetSignal02(void)
   tet_infoline( "Test that setting a custom property triggers a signal" );
 
   auto actor = Actor::New();
-  DevelHandle::PropertySetSignal(actor).Connect(&application, propertySetCheck);
+  actor.PropertySetSignal().Connect(&application, propertySetCheck);
 
   auto propertyIndex = actor.RegisterProperty("propName", 3.0f);
   actor.SetProperty( propertyIndex, 5.0f );
@@ -1706,10 +1706,10 @@ int UtcDaliHandlePropertySetSignal03(void)
   application.GetScene().Add( container );
   auto child = Actor::New();
   child.RegisterProperty( CHILD_PROPERTY_NAME, Property::Value(3) );
-  DevelHandle::PropertySetSignal(child).Connect(&application, propertySetCheck);
+  child.PropertySetSignal().Connect(&application, propertySetCheck);
   container.Add( child ); // Resolve child properties (if any)
 
-  DALI_TEST_EQUALS( DevelHandle::DoesCustomPropertyExist( child, CHILD_PROPERTY ), true, TEST_LOCATION );
+  DALI_TEST_EQUALS( child.DoesCustomPropertyExist( CHILD_PROPERTY ), true, TEST_LOCATION );
   DALI_TEST_EQUALS( child.GetProperty<int>( CHILD_PROPERTY ), 3, TEST_LOCATION );
 
   child.SetProperty( CHILD_PROPERTY, 29 );
@@ -1718,6 +1718,43 @@ int UtcDaliHandlePropertySetSignal03(void)
   END_TEST;
 }
 
+
+
+int UtcDaliHandlePropertySetSignal04(void)
+{
+  TestApplication application;
+  TypeRegistry typeRegistry = TypeRegistry::Get();
+
+  bool signalReceived(false);
+  Property::Value value;
+  PropertySetSignalCheck propertySetCheck(signalReceived, value);
+
+  tet_infoline( "Test that setting a property on a vanilla Object triggers a signal" );
+
+  constexpr Property::Index TEST_PROPERTY_KEY_INDEX = 1;
+  const std::string TEST_PROPERTY_KEY_NAME = "testProperty";
+
+  Handle vanillaObject = Handle::New();
+  auto propertyIndex = vanillaObject.RegisterProperty(
+    TEST_PROPERTY_KEY_INDEX,
+    TEST_PROPERTY_KEY_NAME,
+    Color::WHITE );
+
+  vanillaObject.PropertySetSignal().Connect(&application, propertySetCheck);
+
+  DALI_TEST_EQUALS( vanillaObject.DoesCustomPropertyExist( propertyIndex ), true, TEST_LOCATION );
+  DALI_TEST_EQUALS( vanillaObject.GetProperty<Vector4>( propertyIndex ), Color::WHITE, 0.001f, TEST_LOCATION );
+
+  vanillaObject[TEST_PROPERTY_KEY_NAME] = Color::RED;
+
+  propertySetCheck.CheckSignalReceived();
+  DALI_TEST_EQUALS( propertySetCheck.mValue, Property::Value( Color::RED ), 0.001f, TEST_LOCATION );
+  DALI_TEST_VALUE_EQUALS( vanillaObject[propertyIndex], Property::Value( Color::RED), 0.001f, TEST_LOCATION );
+
+  END_TEST;
+}
+
+
 int UtcDaliHandlePropertySetProperties(void)
 {
   TestApplication application;
@@ -1726,8 +1763,7 @@ int UtcDaliHandlePropertySetProperties(void)
   const Vector4 color( 0.1f, 0.2, 0.3f, 0.4f );
 
   Handle handle = Actor::New();
-  DevelHandle::SetProperties(
-    handle,
+  handle.SetProperties(
     Property::Map
     {
       { Actor::Property::SIZE, actorSize },
@@ -1743,14 +1779,14 @@ int UtcDaliHandlePropertySetProperties(void)
   END_TEST;
 }
 
-int UtcDaliHandleTemplateNew(void)
+int UtcDaliHandleTemplateNew01(void)
 {
   TestApplication application;
   const Vector3 actorSize( 10.0f, 20.0f, 30.0f );
   const Vector3 anchorPoint( 1.0f, 0.5f, 0.0f );
   const Vector4 color( 0.1f, 0.2, 0.3f, 0.4f );
 
-  Handle handle = DevelHandle::New< Actor >(
+  Handle handle = Handle::New< Actor >(
     Property::Map
     {
       { Actor::Property::SIZE, actorSize },
@@ -1772,8 +1808,7 @@ int UtcDaliHandleGetProperties(void)
   TestApplication application;
 
   Handle handle = Actor::New();
-  DevelHandle::SetProperties(
-    handle,
+  handle.SetProperties(
     Property::Map
     {
       { Actor::Property::SIZE, Vector3( 400.0f, 200.0f, 100.0f ) },
@@ -1786,7 +1821,7 @@ int UtcDaliHandleGetProperties(void)
   );
 
   Property::Map map;
-  DevelHandle::GetProperties( handle, map );
+  handle.GetProperties( map );
 
   // Get all the properties and ensure they match
 
@@ -1822,12 +1857,13 @@ int UtcDaliHandleGetProperties(void)
   // Add a custom property and ensure the count goes up by one.
   const auto countBefore = map.Count();
   handle.RegisterProperty( "tempProperty", Color::GREEN );
-  DevelHandle::GetProperties( handle, map );
+  handle.GetProperties( map );
   DALI_TEST_EQUALS( countBefore + 1, map.Count(), TEST_LOCATION );
 
   END_TEST;
 }
 
+
 int UtcDaliHandleSetPropertyNegative(void)
 {
   TestApplication application;
@@ -2171,3 +2207,123 @@ int UtcDaliHandleSupportsNegative(void)
   }
   END_TEST;
 }
+
+
+int UtcDaliHandleIndexOperatorByIndexP01(void)
+{
+  TestApplication application;
+  Actor actor = Actor::New();
+
+  actor[Actor::Property::SIZE] = Vector3( 100.0f, 200.0f, 1.0f );
+
+  DALI_TEST_EQUALS( actor.GetProperty<Vector3>(Actor::Property::SIZE), Vector3( 100.0f, 200.0f, 1.0f ), 0.001f, TEST_LOCATION );
+
+
+  actor.SetProperty( Actor::Property::POSITION, Vector3( 10.0f, 20.0f, 0.0f ) );
+
+  Vector3 position = actor[ Actor::Property::POSITION ];
+  DALI_TEST_EQUALS( position, Vector3( 10.0f, 20.0f, 0.0f ), TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliHandleIndexOperatorByIndexP02(void)
+{
+  TestApplication application;
+  Actor actor = Actor::New();
+
+  const Vector4 defaultActorColor(1.0f, 1.0f, 1.0f, 1.0f);
+  actor.SetProperty(Actor::Property::COLOR, defaultActorColor);
+  actor[Actor::Property::COLOR_RED] = 0.5f;
+
+  DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_RED), 0.5f, 0.001f, TEST_LOCATION);
+  DALI_TEST_EQUALS( actor.GetProperty<Vector4>(Actor::Property::COLOR), Vector4(0.5f, 1.0f, 1.0f, 1.0f), 0.001f, TEST_LOCATION);
+
+  actor.SetProperty( Actor::Property::POSITION, Vector3( 10.0f, 20.0f, 0.0f ) );
+
+  DALI_TEST_EQUALS( (float)actor[ Actor::Property::POSITION_Z ], 0.0f, 0.001f, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliHandleIndexOperatorByIndexP03(void)
+{
+  TestApplication application;
+  Actor actor = Actor::New();
+
+  const Vector4 defaultActorColor(1.0f, 1.0f, 1.0f, 1.0f);
+  actor.SetProperty(Actor::Property::COLOR, defaultActorColor);
+
+  // Value under test is second to allow compiler to deduce type
+  DALI_TEST_VALUE_EQUALS( actor[Actor::Property::COLOR_RED], 1.0f, 0.001f, TEST_LOCATION);
+
+  actor.SetProperty( Actor::Property::POSITION, Vector3( 10.0f, 20.0f, 0.0f ) );
+
+  DALI_TEST_EQUALS( (float)actor[ Actor::Property::POSITION_Z ], 0.0f, 0.001f, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliHandleIndexOperatorByNameP01(void)
+{
+  TestApplication application;
+  Actor actor = Actor::New();
+
+  actor["size"] = Vector3( 100.0f, 200.0f, 1.0f );
+
+  DALI_TEST_VALUE_EQUALS( actor.GetProperty(Actor::Property::SIZE), Vector3( 100.0f, 200.0f, 1.0f ), 0.001f, TEST_LOCATION );
+
+  actor.SetProperty( Actor::Property::POSITION, Vector3( 10.0f, 20.0f, 0.0f ) );
+  Vector3 position = actor[ "position" ];
+
+  DALI_TEST_EQUALS( position, Vector3( 10.0f, 20.0f, 0.0f ), 0.001f, TEST_LOCATION );
+
+  END_TEST;
+}
+
+
+int UtcDaliHandleIndexOperatorByNameP02(void)
+{
+  TestApplication application;
+  Actor actor = Actor::New();
+
+  const Vector4 defaultActorColor(1.0f, 1.0f, 1.0f, 1.0f);
+  actor.SetProperty(Actor::Property::COLOR, defaultActorColor);
+  actor["colorRed"] = 0.5f;
+
+  DALI_TEST_VALUE_EQUALS( actor.GetProperty(Actor::Property::COLOR_RED), 0.5f, 0.001f, TEST_LOCATION);
+  DALI_TEST_VALUE_EQUALS( actor.GetProperty(Actor::Property::COLOR), Vector4(0.5f, 1.0f, 1.0f, 1.0f), 0.001f, TEST_LOCATION);
+
+  actor.SetProperty( Actor::Property::POSITION, Vector3( 10.0f, 20.0f, 0.0f ) );
+
+  float positionY = actor[ "positionY" ];
+  DALI_TEST_EQUALS( positionY, 20.0f, 0.001f, TEST_LOCATION );
+
+  // Should automatically promote IndirectValue to Property::Value rvalue.
+  DALI_TEST_VALUE_EQUALS( actor["positionZ"], 0.0f, 0.001f, TEST_LOCATION );
+
+  END_TEST;
+}
+
+
+int UtcDaliHandleIndexOperatorNegative02(void)
+{
+  TestApplication application;
+
+  Actor actor;
+  try
+  {
+    Vector3 position = actor[Actor::Property::POSITION];
+    if( position == position )
+    {
+      DALI_TEST_CHECK(false); // Should throw before reaching here.
+    }
+    DALI_TEST_CHECK(false); // Should throw before reaching here.
+  }
+  catch(...)
+  {
+    DALI_TEST_CHECK(true); // Assert expected
+  }
+
+  END_TEST;
+}
index 68703a5..db51c33 100644 (file)
@@ -61,9 +61,7 @@ struct SignalData
   {
     functorCalled = false;
 
-    receivedKeyEvent.keyModifier = 0;
-    receivedKeyEvent.keyPressedName.clear();
-    receivedKeyEvent.keyPressed.clear();
+    receivedKeyEvent.Reset();
 
     keyedActor.Reset();
   }
@@ -96,64 +94,184 @@ int UtcDaliKeyEventConstructor(void)
 {
   TestApplication application; // Reset all test adapter return codes
 
-  KeyEvent event(TEST_STRING_1,"i", 99, SHIFT_MODIFIER, 0, KeyEvent::Down);  // set name to test, key string to i and modifier to shift
+  Dali::KeyEvent event = DevelKeyEvent::New(TEST_STRING_1, "I", "i", 99, SHIFT_MODIFIER, 0lu, KeyEvent::DOWN, "", "", Device::Class::NONE, Device::Subclass::NONE);  // set name to test, key string to i and modifier to shift
+  DALI_TEST_CHECK( event );
+
+  DALI_TEST_EQUALS(TEST_STRING_1, event.GetKeyName(), TEST_LOCATION); // check key name
+  DALI_TEST_EQUALS("I", event.GetLogicalKey(), TEST_LOCATION); // check logical key string
+  DALI_TEST_EQUALS("i", event.GetKeyString(), TEST_LOCATION); // check key string
+  DALI_TEST_EQUALS(99, event.GetKeyCode(), TEST_LOCATION); // check keyCode
+  DALI_TEST_EQUALS(SHIFT_MODIFIER, event.GetKeyModifier(), TEST_LOCATION); // check modifier
+  DALI_TEST_EQUALS(0lu, event.GetTime(), TEST_LOCATION); // check time
+  DALI_TEST_EQUALS(KeyEvent::DOWN, event.GetState(), TEST_LOCATION); // check state
+  DALI_TEST_EQUALS("", event.GetCompose(), TEST_LOCATION); // check compose
+  DALI_TEST_EQUALS("", event.GetDeviceName(), TEST_LOCATION); // check device name
+  DALI_TEST_EQUALS(Device::Class::NONE, event.GetDeviceClass(), TEST_LOCATION); // check device class
+  DALI_TEST_EQUALS(Device::Subclass::NONE, event.GetDeviceSubclass(), TEST_LOCATION); // check device subclass
 
-  DALI_TEST_EQUALS(TEST_STRING_1, event.keyPressedName, TEST_LOCATION); // check key name
-  DALI_TEST_EQUALS("i", event.keyPressed, TEST_LOCATION); // check key string
-  DALI_TEST_EQUALS(99, event.keyCode, TEST_LOCATION); // check keyCode
-  DALI_TEST_EQUALS(SHIFT_MODIFIER, event.keyModifier, TEST_LOCATION); // check modifier
-  DALI_TEST_EQUALS(KeyEvent::Down, event.state, TEST_LOCATION); // check state
   END_TEST;
 }
 
-int UtcDaliKeyEventAssignment(void)
+int UtcDaliKeyEventCopyAssignment(void)
 {
   // Test Assignment operator
-  KeyEvent event(TEST_STRING_1,"i", 99, SHIFT_MODIFIER, 0, KeyEvent::Down);  // set name to test, key string to i and modifier to shift
+  Dali::KeyEvent event = DevelKeyEvent::New(TEST_STRING_1, "I", "i", 99, SHIFT_MODIFIER, 0lu, KeyEvent::DOWN, "", "", Device::Class::NONE, Device::Subclass::NONE);  // set name to test, key string to i and modifier to shift
+  DALI_TEST_CHECK( event );
+
+  DALI_TEST_EQUALS(TEST_STRING_1, event.GetKeyName(), TEST_LOCATION); // check key name
+  DALI_TEST_EQUALS("I", event.GetLogicalKey(), TEST_LOCATION); // check logical key string
+  DALI_TEST_EQUALS("i", event.GetKeyString(), TEST_LOCATION); // check key string
+  DALI_TEST_EQUALS(99, event.GetKeyCode(), TEST_LOCATION); // check keyCode
+  DALI_TEST_EQUALS(SHIFT_MODIFIER, event.GetKeyModifier(), TEST_LOCATION); // check modifier
+  DALI_TEST_EQUALS(0lu, event.GetTime(), TEST_LOCATION); // check time
+  DALI_TEST_EQUALS(KeyEvent::DOWN, event.GetState(), TEST_LOCATION); // check state
+  DALI_TEST_EQUALS("", event.GetCompose(), TEST_LOCATION); // check compose
+  DALI_TEST_EQUALS("", event.GetDeviceName(), TEST_LOCATION); // check device name
+  DALI_TEST_EQUALS(Device::Class::NONE, event.GetDeviceClass(), TEST_LOCATION); // check device class
+  DALI_TEST_EQUALS(Device::Subclass::NONE, event.GetDeviceSubclass(), TEST_LOCATION); // check device subclass
+
+  Dali::KeyEvent event2 = DevelKeyEvent::New(TEST_STRING_1, "J", "j", 88, CTRL_MODIFIER, 0lu, KeyEvent::UP, "", "", Device::Class::USER, Device::Subclass::FINGER);  // set name to test, key string to i and modifier to shift
+  DALI_TEST_CHECK( event2 );
+
+  DALI_TEST_EQUALS(TEST_STRING_1, event2.GetKeyName(), TEST_LOCATION); // check key name
+  DALI_TEST_EQUALS("J", event2.GetLogicalKey(), TEST_LOCATION); // check logical key string
+  DALI_TEST_EQUALS("j", event2.GetKeyString(), TEST_LOCATION); // check key string
+  DALI_TEST_EQUALS(88, event2.GetKeyCode(), TEST_LOCATION); // check keyCode
+  DALI_TEST_EQUALS(CTRL_MODIFIER, event2.GetKeyModifier(), TEST_LOCATION); // check modifier
+  DALI_TEST_EQUALS(0lu, event2.GetTime(), TEST_LOCATION); // check time
+  DALI_TEST_EQUALS(KeyEvent::UP, event2.GetState(), TEST_LOCATION); // check state
+  DALI_TEST_EQUALS("", event2.GetCompose(), TEST_LOCATION); // check compose
+  DALI_TEST_EQUALS("", event2.GetDeviceName(), TEST_LOCATION); // check device name
+  DALI_TEST_EQUALS(Device::Class::USER, event2.GetDeviceClass(), TEST_LOCATION); // check device class
+  DALI_TEST_EQUALS(Device::Subclass::FINGER, event2.GetDeviceSubclass(), TEST_LOCATION); // check device subclass
 
-  DALI_TEST_EQUALS(TEST_STRING_1, event.keyPressedName, TEST_LOCATION); // check key name
-  DALI_TEST_EQUALS("i", event.keyPressed, TEST_LOCATION); // check key string
-  DALI_TEST_EQUALS(99, event.keyCode, TEST_LOCATION); // check keyCode
-  DALI_TEST_EQUALS(SHIFT_MODIFIER, event.keyModifier, TEST_LOCATION); // check modifier
-  DALI_TEST_EQUALS(KeyEvent::Down, event.state, TEST_LOCATION); // check state
-
-  KeyEvent event2(TEST_STRING_1,"j", 88, CTRL_MODIFIER, 0, KeyEvent::Up);  // set name to test, key string to i and modifier to shift
+  event = event2;
+  DALI_TEST_CHECK( event );
+
+  DALI_TEST_EQUALS(TEST_STRING_1, event.GetKeyName(), TEST_LOCATION); // check key name
+  DALI_TEST_EQUALS("J", event.GetLogicalKey(), TEST_LOCATION); // check logical key string
+  DALI_TEST_EQUALS("j", event.GetKeyString(), TEST_LOCATION); // check key string
+  DALI_TEST_EQUALS(88, event.GetKeyCode(), TEST_LOCATION); // check keyCode
+  DALI_TEST_EQUALS(CTRL_MODIFIER, event.GetKeyModifier(), TEST_LOCATION); // check modifier
+  DALI_TEST_EQUALS(0lu, event.GetTime(), TEST_LOCATION); // check time
+  DALI_TEST_EQUALS(KeyEvent::UP, event.GetState(), TEST_LOCATION); // check state
+  DALI_TEST_EQUALS("", event.GetCompose(), TEST_LOCATION); // check compose
+  DALI_TEST_EQUALS("", event.GetDeviceName(), TEST_LOCATION); // check device name
+  DALI_TEST_EQUALS(Device::Class::USER, event.GetDeviceClass(), TEST_LOCATION); // check device class
+  DALI_TEST_EQUALS(Device::Subclass::FINGER, event.GetDeviceSubclass(), TEST_LOCATION); // check device subclass
 
-  DALI_TEST_EQUALS(TEST_STRING_1, event2.keyPressedName, TEST_LOCATION); // check key name
-  DALI_TEST_EQUALS("j", event2.keyPressed, TEST_LOCATION); // check key string
-  DALI_TEST_EQUALS(88, event2.keyCode, TEST_LOCATION); // check keyCode
-  DALI_TEST_EQUALS(CTRL_MODIFIER, event2.keyModifier, TEST_LOCATION); // check modifier
-  DALI_TEST_EQUALS(KeyEvent::Up, event2.state, TEST_LOCATION); // check state
+  END_TEST;
+}
 
-  event = event2;
+int UtcDaliKeyEventCopyConstructor(void)
+{
+  // Test Assignment operator
+  Dali::KeyEvent event = DevelKeyEvent::New(TEST_STRING_1, "I", "i", 99, SHIFT_MODIFIER, 0lu, KeyEvent::DOWN, "", "", Device::Class::NONE, Device::Subclass::NONE);  // set name to test, key string to i and modifier to shift
+  DALI_TEST_CHECK( event );
+
+  DALI_TEST_EQUALS(TEST_STRING_1, event.GetKeyName(), TEST_LOCATION); // check key name
+  DALI_TEST_EQUALS("I", event.GetLogicalKey(), TEST_LOCATION); // check logical key string
+  DALI_TEST_EQUALS("i", event.GetKeyString(), TEST_LOCATION); // check key string
+  DALI_TEST_EQUALS(99, event.GetKeyCode(), TEST_LOCATION); // check keyCode
+  DALI_TEST_EQUALS(SHIFT_MODIFIER, event.GetKeyModifier(), TEST_LOCATION); // check modifier
+  DALI_TEST_EQUALS(0lu, event.GetTime(), TEST_LOCATION); // check time
+  DALI_TEST_EQUALS(KeyEvent::DOWN, event.GetState(), TEST_LOCATION); // check state
+  DALI_TEST_EQUALS("", event.GetCompose(), TEST_LOCATION); // check compose
+  DALI_TEST_EQUALS("", event.GetDeviceName(), TEST_LOCATION); // check device name
+  DALI_TEST_EQUALS(Device::Class::NONE, event.GetDeviceClass(), TEST_LOCATION); // check device class
+  DALI_TEST_EQUALS(Device::Subclass::NONE, event.GetDeviceSubclass(), TEST_LOCATION); // check device subclass
 
-  DALI_TEST_EQUALS(TEST_STRING_1, event.keyPressedName, TEST_LOCATION); // check key name
-  DALI_TEST_EQUALS("j", event.keyPressed, TEST_LOCATION); // check key string
-  DALI_TEST_EQUALS(88, event.keyCode, TEST_LOCATION); // check keyCode
-  DALI_TEST_EQUALS(CTRL_MODIFIER, event.keyModifier, TEST_LOCATION); // check modifier
-  DALI_TEST_EQUALS(KeyEvent::Up, event.state, TEST_LOCATION); // check state
+  KeyEvent event2( event );
+  DALI_TEST_CHECK( event2 );
+
+  DALI_TEST_EQUALS(TEST_STRING_1, event2.GetKeyName(), TEST_LOCATION); // check key name
+  DALI_TEST_EQUALS("I", event2.GetLogicalKey(), TEST_LOCATION); // check logical key string
+  DALI_TEST_EQUALS("i", event2.GetKeyString(), TEST_LOCATION); // check key string
+  DALI_TEST_EQUALS(99, event2.GetKeyCode(), TEST_LOCATION); // check keyCode
+  DALI_TEST_EQUALS(SHIFT_MODIFIER, event2.GetKeyModifier(), TEST_LOCATION); // check modifier
+  DALI_TEST_EQUALS(0lu, event2.GetTime(), TEST_LOCATION); // check time
+  DALI_TEST_EQUALS(KeyEvent::DOWN, event2.GetState(), TEST_LOCATION); // check state
+  DALI_TEST_EQUALS("", event2.GetCompose(), TEST_LOCATION); // check compose
+  DALI_TEST_EQUALS("", event2.GetDeviceName(), TEST_LOCATION); // check device name
+  DALI_TEST_EQUALS(Device::Class::NONE, event2.GetDeviceClass(), TEST_LOCATION); // check device class
+  DALI_TEST_EQUALS(Device::Subclass::NONE, event2.GetDeviceSubclass(), TEST_LOCATION); // check device subclass
 
   END_TEST;
 }
 
-int UtcDaliKeyEventCopy(void)
+int UtcDaliKeyEventMoveAssignment(void)
 {
   // Test Assignment operator
-  KeyEvent event(TEST_STRING_1,"i", 99, SHIFT_MODIFIER, 0, KeyEvent::Down);  // set name to test, key string to i and modifier to shift
-
-  DALI_TEST_EQUALS(TEST_STRING_1, event.keyPressedName, TEST_LOCATION); // check key name
-  DALI_TEST_EQUALS("i", event.keyPressed, TEST_LOCATION); // check key string
-  DALI_TEST_EQUALS(99, event.keyCode, TEST_LOCATION); // check keyCode
-  DALI_TEST_EQUALS(SHIFT_MODIFIER, event.keyModifier, TEST_LOCATION); // check modifier
-  DALI_TEST_EQUALS(KeyEvent::Down, event.state, TEST_LOCATION); // check state
+  Dali::KeyEvent event = DevelKeyEvent::New(TEST_STRING_1, "I", "i", 99, SHIFT_MODIFIER, 0lu, KeyEvent::DOWN, "", "", Device::Class::NONE, Device::Subclass::NONE);  // set name to test, key string to i and modifier to shift
+  DALI_TEST_CHECK( event );
+
+  DALI_TEST_EQUALS(TEST_STRING_1, event.GetKeyName(), TEST_LOCATION); // check key name
+  DALI_TEST_EQUALS("I", event.GetLogicalKey(), TEST_LOCATION); // check logical key string
+  DALI_TEST_EQUALS("i", event.GetKeyString(), TEST_LOCATION); // check key string
+  DALI_TEST_EQUALS(99, event.GetKeyCode(), TEST_LOCATION); // check keyCode
+  DALI_TEST_EQUALS(SHIFT_MODIFIER, event.GetKeyModifier(), TEST_LOCATION); // check modifier
+  DALI_TEST_EQUALS(0lu, event.GetTime(), TEST_LOCATION); // check time
+  DALI_TEST_EQUALS(KeyEvent::DOWN, event.GetState(), TEST_LOCATION); // check state
+  DALI_TEST_EQUALS("", event.GetCompose(), TEST_LOCATION); // check compose
+  DALI_TEST_EQUALS("", event.GetDeviceName(), TEST_LOCATION); // check device name
+  DALI_TEST_EQUALS(Device::Class::NONE, event.GetDeviceClass(), TEST_LOCATION); // check device class
+  DALI_TEST_EQUALS(Device::Subclass::NONE, event.GetDeviceSubclass(), TEST_LOCATION); // check device subclass
+
+  KeyEvent move;
+  move = std::move( event );
+  DALI_TEST_CHECK( move );
+
+  DALI_TEST_EQUALS(TEST_STRING_1, move.GetKeyName(), TEST_LOCATION); // check key name
+  DALI_TEST_EQUALS("I", move.GetLogicalKey(), TEST_LOCATION); // check logical key string
+  DALI_TEST_EQUALS("i", move.GetKeyString(), TEST_LOCATION); // check key string
+  DALI_TEST_EQUALS(99, move.GetKeyCode(), TEST_LOCATION); // check keyCode
+  DALI_TEST_EQUALS(SHIFT_MODIFIER, move.GetKeyModifier(), TEST_LOCATION); // check modifier
+  DALI_TEST_EQUALS(0lu, move.GetTime(), TEST_LOCATION); // check time
+  DALI_TEST_EQUALS(KeyEvent::DOWN, move.GetState(), TEST_LOCATION); // check state
+  DALI_TEST_EQUALS("", move.GetCompose(), TEST_LOCATION); // check compose
+  DALI_TEST_EQUALS("", move.GetDeviceName(), TEST_LOCATION); // check device name
+  DALI_TEST_EQUALS(Device::Class::NONE, move.GetDeviceClass(), TEST_LOCATION); // check device class
+  DALI_TEST_EQUALS(Device::Subclass::NONE, move.GetDeviceSubclass(), TEST_LOCATION); // check device subclass
+
+  DALI_TEST_CHECK( !event );
 
-  KeyEvent event2( event );
+  END_TEST;
+}
 
-  DALI_TEST_EQUALS(TEST_STRING_1, event2.keyPressedName, TEST_LOCATION); // check key name
-  DALI_TEST_EQUALS("i", event2.keyPressed, TEST_LOCATION); // check key string
-  DALI_TEST_EQUALS(99, event2.keyCode, TEST_LOCATION); // check keyCode
-  DALI_TEST_EQUALS(SHIFT_MODIFIER, event2.keyModifier, TEST_LOCATION); // check modifier
-  DALI_TEST_EQUALS(KeyEvent::Down, event2.state, TEST_LOCATION); // check state
+int UtcDaliKeyEventMoveConstructor(void)
+{
+  // Test Assignment operator
+  Dali::KeyEvent event = DevelKeyEvent::New(TEST_STRING_1, "I", "i", 99, SHIFT_MODIFIER, 0lu, KeyEvent::DOWN, "", "", Device::Class::NONE, Device::Subclass::NONE);  // set name to test, key string to i and modifier to shift
+  DALI_TEST_CHECK( event );
+
+  DALI_TEST_EQUALS(TEST_STRING_1, event.GetKeyName(), TEST_LOCATION); // check key name
+  DALI_TEST_EQUALS("I", event.GetLogicalKey(), TEST_LOCATION); // check logical key string
+  DALI_TEST_EQUALS("i", event.GetKeyString(), TEST_LOCATION); // check key string
+  DALI_TEST_EQUALS(99, event.GetKeyCode(), TEST_LOCATION); // check keyCode
+  DALI_TEST_EQUALS(SHIFT_MODIFIER, event.GetKeyModifier(), TEST_LOCATION); // check modifier
+  DALI_TEST_EQUALS(0lu, event.GetTime(), TEST_LOCATION); // check time
+  DALI_TEST_EQUALS(KeyEvent::DOWN, event.GetState(), TEST_LOCATION); // check state
+  DALI_TEST_EQUALS("", event.GetCompose(), TEST_LOCATION); // check compose
+  DALI_TEST_EQUALS("", event.GetDeviceName(), TEST_LOCATION); // check device name
+  DALI_TEST_EQUALS(Device::Class::NONE, event.GetDeviceClass(), TEST_LOCATION); // check device class
+  DALI_TEST_EQUALS(Device::Subclass::NONE, event.GetDeviceSubclass(), TEST_LOCATION); // check device subclass
+
+  KeyEvent move = std::move( event );
+  DALI_TEST_CHECK( move );
+
+  DALI_TEST_EQUALS(TEST_STRING_1, move.GetKeyName(), TEST_LOCATION); // check key name
+  DALI_TEST_EQUALS("I", move.GetLogicalKey(), TEST_LOCATION); // check logical key string
+  DALI_TEST_EQUALS("i", move.GetKeyString(), TEST_LOCATION); // check key string
+  DALI_TEST_EQUALS(99, move.GetKeyCode(), TEST_LOCATION); // check keyCode
+  DALI_TEST_EQUALS(SHIFT_MODIFIER, move.GetKeyModifier(), TEST_LOCATION); // check modifier
+  DALI_TEST_EQUALS(0lu, move.GetTime(), TEST_LOCATION); // check time
+  DALI_TEST_EQUALS(KeyEvent::DOWN, move.GetState(), TEST_LOCATION); // check state
+  DALI_TEST_EQUALS("", move.GetCompose(), TEST_LOCATION); // check compose
+  DALI_TEST_EQUALS("", move.GetDeviceName(), TEST_LOCATION); // check device name
+  DALI_TEST_EQUALS(Device::Class::NONE, move.GetDeviceClass(), TEST_LOCATION); // check device class
+  DALI_TEST_EQUALS(Device::Subclass::NONE, move.GetDeviceSubclass(), TEST_LOCATION); // check device subclass
+
+  DALI_TEST_CHECK( !event );
 
   END_TEST;
 }
@@ -163,12 +281,15 @@ int UtcDaliKeyEventIsShiftModifier(void)
 {
   TestApplication application; // Reset all test adapter return codes
 
-  KeyEvent event;
-  DALI_TEST_EQUALS(0, event.keyModifier, TEST_LOCATION);
+  Dali::KeyEvent event = DevelKeyEvent::New(TEST_STRING_1, "I", "i", 99, CTRL_MODIFIER, 0lu, KeyEvent::DOWN, "", "", Device::Class::NONE, Device::Subclass::NONE);  // set name to test, key string to i and modifier to shift
+  DALI_TEST_CHECK( event );
+
+  DALI_TEST_EQUALS(CTRL_MODIFIER, event.GetKeyModifier(), TEST_LOCATION);
+  DALI_TEST_EQUALS(false, event.IsShiftModifier(), TEST_LOCATION); // check IsShiftModifier
 
-  event.keyModifier = SHIFT_MODIFIER; // Set to Shift Modifier
+  DevelKeyEvent::SetKeyModifier( event, SHIFT_MODIFIER ); // Set to Shift Modifier
 
-  DALI_TEST_EQUALS(SHIFT_MODIFIER, event.keyModifier, TEST_LOCATION); // check able to set
+  DALI_TEST_EQUALS(SHIFT_MODIFIER, event.GetKeyModifier(), TEST_LOCATION); // check able to set
 
   DALI_TEST_EQUALS(true, event.IsShiftModifier(), TEST_LOCATION); // check IsShiftModifier
 
@@ -180,12 +301,15 @@ int UtcDaliKeyEventIsCtrlModifier(void)
 {
   TestApplication application; // Reset all test adapter return codes
 
-  KeyEvent event;
-  DALI_TEST_EQUALS(0, event.keyModifier, TEST_LOCATION);
+  Dali::KeyEvent event = DevelKeyEvent::New(TEST_STRING_1, "I", "i", 99, SHIFT_MODIFIER, 0lu, KeyEvent::DOWN, "", "", Device::Class::NONE, Device::Subclass::NONE);  // set name to test, key string to i and modifier to shift
+  DALI_TEST_CHECK( event );
 
-  event.keyModifier = CTRL_MODIFIER; // Set to Ctrl Modifier
+  DALI_TEST_EQUALS(SHIFT_MODIFIER, event.GetKeyModifier(), TEST_LOCATION);
+  DALI_TEST_EQUALS(false, event.IsCtrlModifier(), TEST_LOCATION); // check IsCtrlModifier
 
-  DALI_TEST_EQUALS(CTRL_MODIFIER, event.keyModifier, TEST_LOCATION); // check able to set
+  DevelKeyEvent::SetKeyModifier( event, CTRL_MODIFIER ); // Set to Ctrl Modifier
+
+  DALI_TEST_EQUALS(CTRL_MODIFIER, event.GetKeyModifier(), TEST_LOCATION); // check able to set
 
   DALI_TEST_EQUALS(true, event.IsCtrlModifier(), TEST_LOCATION); // check IsCtrlModifier
   END_TEST;
@@ -196,12 +320,15 @@ int UtcDaliKeyEventIsAltModifier(void)
 {
   TestApplication application; // Reset all test adapter return codes
 
-  KeyEvent event;
-  DALI_TEST_EQUALS(0, event.keyModifier, TEST_LOCATION);
+  Dali::KeyEvent event = DevelKeyEvent::New(TEST_STRING_1, "I", "i", 99, SHIFT_MODIFIER, 0lu, KeyEvent::DOWN, "", "", Device::Class::NONE, Device::Subclass::NONE);  // set name to test, key string to i and modifier to shift
+  DALI_TEST_CHECK( event );
+
+  DALI_TEST_EQUALS(SHIFT_MODIFIER, event.GetKeyModifier(), TEST_LOCATION);
+  DALI_TEST_EQUALS(false, event.IsAltModifier(), TEST_LOCATION); // check IsAltModifier
 
-  event.keyModifier = ALT_MODIFIER; // Set to Alt Modifier
+  DevelKeyEvent::SetKeyModifier( event, ALT_MODIFIER ); // Set to Alt Modifier
 
-  DALI_TEST_EQUALS(ALT_MODIFIER, event.keyModifier, TEST_LOCATION); // check able to set
+  DALI_TEST_EQUALS(ALT_MODIFIER, event.GetKeyModifier(), TEST_LOCATION); // check able to set
 
   DALI_TEST_EQUALS(true, event.IsAltModifier(), TEST_LOCATION);  // IsAltModifier
   END_TEST;
@@ -212,9 +339,9 @@ int UtcDaliKeyEventIsNotShiftModifier(void)
 {
   TestApplication application; // Reset all test adapter return codes
 
-  KeyEvent event("i","i", 0, CTRL_MODIFIER, 0, KeyEvent::Down);
+  Dali::KeyEvent event = DevelKeyEvent::New("i", "I", "i", 0, CTRL_MODIFIER, 0lu, KeyEvent::DOWN, "", "", Device::Class::NONE, Device::Subclass::NONE);
 
-  DALI_TEST_EQUALS(CTRL_MODIFIER, event.keyModifier, TEST_LOCATION);  // check different modifier used
+  DALI_TEST_EQUALS(CTRL_MODIFIER, event.GetKeyModifier(), TEST_LOCATION);
 
   DALI_TEST_EQUALS(false, event.IsShiftModifier(), TEST_LOCATION);
   END_TEST;
@@ -225,9 +352,9 @@ int UtcDaliKeyEventIsNotCtrlModifier(void)
 {
   TestApplication application; // Reset all test adapter return codes
 
-  KeyEvent event("i","i", 0, ALT_MODIFIER, 0, KeyEvent::Up);
+  Dali::KeyEvent event = DevelKeyEvent::New("i", "I", "i", 0, ALT_MODIFIER, 0lu, KeyEvent::UP, "", "", Device::Class::NONE, Device::Subclass::NONE);
 
-  DALI_TEST_EQUALS(ALT_MODIFIER, event.keyModifier, TEST_LOCATION);  // check different modifier used
+  DALI_TEST_EQUALS(ALT_MODIFIER, event.GetKeyModifier(), TEST_LOCATION);
 
   DALI_TEST_EQUALS(false, event.IsCtrlModifier(), TEST_LOCATION);
   END_TEST;
@@ -238,9 +365,9 @@ int UtcDaliKeyEventIsNotAltModifier(void)
 {
   TestApplication application; // Reset all test adapter return codes
 
-  KeyEvent event("i","i", 0, SHIFT_MODIFIER, 0, KeyEvent::Up);
+  Dali::KeyEvent event = DevelKeyEvent::New("i", "I", "i", 0, SHIFT_MODIFIER, 0lu, KeyEvent::UP, "", "", Device::Class::NONE, Device::Subclass::NONE);
 
-  DALI_TEST_EQUALS(SHIFT_MODIFIER, event.keyModifier, TEST_LOCATION);  // check different modifier used
+  DALI_TEST_EQUALS(SHIFT_MODIFIER, event.GetKeyModifier(), TEST_LOCATION);
 
   DALI_TEST_EQUALS(false, event.IsAltModifier(), TEST_LOCATION);
   END_TEST;
@@ -251,10 +378,10 @@ int UtcDaliKeyEventANDModifer(void)
 {
   TestApplication application; // Reset all test adapter return codes
 
-  KeyEvent event("i","i", 0, SHIFT_AND_CTRL_MODIFIER, 0, KeyEvent::Down);
+  Dali::KeyEvent event = DevelKeyEvent::New("i", "I", "i", 0, SHIFT_AND_CTRL_MODIFIER, 0lu, KeyEvent::DOWN, "", "", Device::Class::NONE, Device::Subclass::NONE);
   DALI_TEST_EQUALS(true, (bool)(event.IsCtrlModifier() & event.IsShiftModifier()), TEST_LOCATION);
 
-  event.keyModifier = SHIFT_MODIFIER;
+  DevelKeyEvent::SetKeyModifier( event, SHIFT_MODIFIER ); // Set to Shift Modifier
 
   DALI_TEST_EQUALS(false, (bool)(event.IsCtrlModifier() & event.IsShiftModifier()), TEST_LOCATION);
   END_TEST;
@@ -265,24 +392,10 @@ int UtcDaliKeyEventORModifer(void)
 {
   TestApplication application; // Reset all test adapter return codes
 
-  KeyEvent event("i","i", 0, SHIFT_AND_CTRL_MODIFIER, 0, KeyEvent::Down);
+  Dali::KeyEvent event = DevelKeyEvent::New("i", "I", "i", 0, SHIFT_AND_CTRL_MODIFIER, 0lu, KeyEvent::DOWN, "", "", Device::Class::NONE, Device::Subclass::NONE);
   DALI_TEST_EQUALS(true, (bool)(event.IsCtrlModifier() | event.IsAltModifier()), TEST_LOCATION);
 
-  event.keyModifier = SHIFT_MODIFIER;
-
-  DALI_TEST_EQUALS(false, (bool)(event.IsCtrlModifier() & event.IsAltModifier()), TEST_LOCATION);
-  END_TEST;
-}
-
-// Positive test case for a method
-int UtcDaliKeyEventState(void)
-{
-  TestApplication application; // Reset all test adapter return codes
-
-  KeyEvent event("i","i", 0, SHIFT_AND_CTRL_MODIFIER, 0, KeyEvent::Down);
-  DALI_TEST_EQUALS(true, (bool)(event.IsCtrlModifier() | event.IsAltModifier()), TEST_LOCATION);
-
-  event.keyModifier = SHIFT_MODIFIER;
+  DevelKeyEvent::SetKeyModifier( event, SHIFT_MODIFIER ); // Set to Shift Modifier
 
   DALI_TEST_EQUALS(false, (bool)(event.IsCtrlModifier() & event.IsAltModifier()), TEST_LOCATION);
   END_TEST;
@@ -301,7 +414,11 @@ int UtcDaliIntegrationKeyEvent(void)
     DALI_TEST_EQUALS( keyEvent.keyCode, -1, TEST_LOCATION );
     DALI_TEST_EQUALS( keyEvent.keyModifier, 0, TEST_LOCATION );
     DALI_TEST_EQUALS( keyEvent.time, 0lu, TEST_LOCATION );
-    DALI_TEST_EQUALS( keyEvent.state, Integration::KeyEvent::Down, TEST_LOCATION);
+    DALI_TEST_EQUALS( keyEvent.state, Integration::KeyEvent::DOWN, TEST_LOCATION);
+    DALI_TEST_EQUALS( keyEvent.compose, std::string(), TEST_LOCATION);
+    DALI_TEST_EQUALS( keyEvent.deviceName, std::string(), TEST_LOCATION);
+    DALI_TEST_EQUALS( keyEvent.deviceClass, Device::Class::NONE, TEST_LOCATION);
+    DALI_TEST_EQUALS( keyEvent.deviceSubclass, Device::Subclass::NONE, TEST_LOCATION);
   }
 
   {
@@ -311,7 +428,7 @@ int UtcDaliIntegrationKeyEvent(void)
     const int keyCode(333);
     const int keyModifier(312);
     const unsigned long timeStamp(132);
-    const Integration::KeyEvent::State keyState(Integration::KeyEvent::Up);
+    const Integration::KeyEvent::State keyState(Integration::KeyEvent::UP);
     const std::string compose("compose");
     const std::string deviceName("hwKeyboard");
     const Device::Class::Type deviceClass = Device::Class::KEYBOARD;
@@ -334,81 +451,86 @@ int UtcDaliIntegrationKeyEvent(void)
   END_TEST;
 }
 
-int UtcDaliIntegrationKeyEventConvertor(void)
+int UtcDaliKeyEventSetKeyName(void)
 {
   TestApplication application;
 
-  KeyEvent event(TEST_STRING_1,"i", 99, SHIFT_MODIFIER, 0lu, KeyEvent::Down);  // set name to test, key string to i and modifier to shift
+  Dali::KeyEvent event = DevelKeyEvent::New(TEST_STRING_1, "I", "i", 99, SHIFT_MODIFIER, 0lu, KeyEvent::DOWN, "", "", Device::Class::NONE, Device::Subclass::NONE);
 
-  Integration::KeyEvent keyEvent( event );
+  DALI_TEST_EQUALS( TEST_STRING_1, event.GetKeyName(), TEST_LOCATION );
 
-  DALI_TEST_EQUALS( keyEvent.type, Integration::Event::Key, TEST_LOCATION );
-  DALI_TEST_CHECK( keyEvent.keyName == TEST_STRING_1 );
-  DALI_TEST_CHECK( keyEvent.logicalKey == "" );
-  DALI_TEST_CHECK( keyEvent.keyString == "i" );
-  DALI_TEST_EQUALS( keyEvent.keyCode, 99, TEST_LOCATION );
-  DALI_TEST_EQUALS( keyEvent.keyModifier, SHIFT_MODIFIER, TEST_LOCATION );
-  DALI_TEST_EQUALS( keyEvent.time, 0lu, TEST_LOCATION );
-  DALI_TEST_EQUALS( keyEvent.state, Integration::KeyEvent::Down, TEST_LOCATION);
-  DALI_TEST_EQUALS( keyEvent.compose, "", TEST_LOCATION);
-  DALI_TEST_EQUALS( keyEvent.deviceName, "", TEST_LOCATION);
-  DALI_TEST_EQUALS( keyEvent.deviceClass, Device::Class::NONE, TEST_LOCATION);
-  DALI_TEST_EQUALS( keyEvent.deviceSubclass, Device::Subclass::NONE, TEST_LOCATION);
+  DevelKeyEvent::SetKeyName( event, "keyName" );
+  DALI_TEST_EQUALS( "keyName", event.GetKeyName(), TEST_LOCATION );
 
   END_TEST;
 }
 
-int UtcDaliKeyEventSetCompose(void)
+int UtcDaliKeyEventSetKeyString(void)
 {
   TestApplication application;
 
-  KeyEvent event(TEST_STRING_1,"i", 99, SHIFT_MODIFIER, 0lu, KeyEvent::Down);
+  Dali::KeyEvent event = DevelKeyEvent::New(TEST_STRING_1, "I", "i", 99, SHIFT_MODIFIER, 0lu, KeyEvent::DOWN, "", "", Device::Class::NONE, Device::Subclass::NONE);
+
+  DALI_TEST_EQUALS( "i", event.GetKeyString(), TEST_LOCATION );
 
-  DALI_TEST_EQUALS( event.GetCompose(), "", TEST_LOCATION);
+  DevelKeyEvent::SetKeyString( event, "keyString" );
+  DALI_TEST_EQUALS( "keyString", event.GetKeyString(), TEST_LOCATION );
 
   END_TEST;
 }
 
-int UtcDaliKeyEventSetDeviceName(void)
+int UtcDaliKeyEventSetKeyCode(void)
 {
   TestApplication application;
 
-  KeyEvent event(TEST_STRING_1,"i", 99, SHIFT_MODIFIER, 0lu, KeyEvent::Down);
+  Dali::KeyEvent event = DevelKeyEvent::New(TEST_STRING_1, "I", "i", 99, SHIFT_MODIFIER, 0lu, KeyEvent::DOWN, "", "", Device::Class::NONE, Device::Subclass::NONE);
 
-  DALI_TEST_EQUALS( event.GetDeviceName(), "", TEST_LOCATION);
+  DALI_TEST_EQUALS( 99, event.GetKeyCode(), TEST_LOCATION );
+
+  DevelKeyEvent::SetKeyCode( event, 88 );
+  DALI_TEST_EQUALS( 88, event.GetKeyCode(), TEST_LOCATION );
 
   END_TEST;
 }
 
-int UtcDaliKeyEventSetDeviceClass(void)
+int UtcDaliKeyEventSetKeyModifier(void)
 {
   TestApplication application;
 
-  KeyEvent event(TEST_STRING_1,"i", 99, SHIFT_MODIFIER, 0lu, KeyEvent::Down);
+  Dali::KeyEvent event = DevelKeyEvent::New(TEST_STRING_1, "I", "i", 99, SHIFT_MODIFIER, 0lu, KeyEvent::DOWN, "", "", Device::Class::NONE, Device::Subclass::NONE);
+
+  DALI_TEST_EQUALS( SHIFT_MODIFIER, event.GetKeyModifier(), TEST_LOCATION );
 
-  DALI_TEST_EQUALS( event.GetDeviceClass(), Device::Class::NONE, TEST_LOCATION);
+  DevelKeyEvent::SetKeyModifier( event, ALT_MODIFIER );
+  DALI_TEST_EQUALS( ALT_MODIFIER, event.GetKeyModifier(), TEST_LOCATION );
 
   END_TEST;
 }
 
-int UtcDaliKeyEventSetDeviceSubclass(void)
+int UtcDaliKeyEventSetTime(void)
 {
   TestApplication application;
 
-  KeyEvent event(TEST_STRING_1,"i", 99, SHIFT_MODIFIER, 0lu, KeyEvent::Down);
+  Dali::KeyEvent event = DevelKeyEvent::New(TEST_STRING_1, "I", "i", 99, SHIFT_MODIFIER, 0lu, KeyEvent::DOWN, "", "", Device::Class::NONE, Device::Subclass::NONE);
 
-  DALI_TEST_EQUALS( event.GetDeviceSubclass(), Device::Subclass::NONE, TEST_LOCATION);
+  DALI_TEST_EQUALS( 0lu, event.GetTime(), TEST_LOCATION );
+
+  DevelKeyEvent::SetTime( event, 100lu );
+  DALI_TEST_EQUALS( 100lu, event.GetTime(), TEST_LOCATION );
 
   END_TEST;
 }
 
-int UtcDaliKeyEventSetLogicalKey(void)
+int UtcDaliKeyEventSetState(void)
 {
   TestApplication application;
 
-  KeyEvent event(TEST_STRING_1,"i", 99, SHIFT_MODIFIER, 0lu, KeyEvent::Down);
+  Dali::KeyEvent event = DevelKeyEvent::New(TEST_STRING_1, "I", "i", 99, SHIFT_MODIFIER, 0lu, KeyEvent::DOWN, "", "", Device::Class::NONE, Device::Subclass::NONE);
+
+  DALI_TEST_EQUALS( KeyEvent::DOWN, event.GetState(), TEST_LOCATION );
 
-  DALI_TEST_EQUALS( DevelKeyEvent::GetLogicalKey( event ), "", TEST_LOCATION );
+  DevelKeyEvent::SetState( event, KeyEvent::UP );
+  DALI_TEST_EQUALS( KeyEvent::UP, event.GetState(), TEST_LOCATION );
 
   END_TEST;
 }
index 456dac7..ab81b80 100644 (file)
@@ -324,8 +324,6 @@ int UtcDaliLongPressGestureRecognizerMultiplePointsLongPress(void)
 
   LongPressGestureDetector detector = LongPressGestureDetector::New();
 
-  detector.SetTouchesRequired(2,2);
-
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
@@ -336,6 +334,7 @@ int UtcDaliLongPressGestureRecognizerMultiplePointsLongPress(void)
   application.Render();
 
   detector.Attach(actor);
+  detector.SetTouchesRequired(2,2); // Set after we've attached forcing us to change things internally
 
   SignalData data;
   GestureReceivedFunctor functor(data);
index fc696f5..e453dbd 100644 (file)
@@ -77,10 +77,8 @@ void mesh_material_test_cleanup(void)
  *
  * Check rendered vertex buffer is the right size for the initial property buffer
  *
- * Check PropertyBuffer set via SetData can be read thru property system
- * Check PropertyBuffer property setters / getters
- * Check vertex PropertyBuffer set via properties renders as expected
- * Check Index propertyBuffer set via properties renders as expected
+ * Check VertexBuffer set via SetData renders as expected
+ * Check IndexBuffer set via properties renders as expected
  *
  * Check geometry type renders correctly as the matching GL draw call and type
  *
index 3430f45..7b700ce 100644 (file)
@@ -2028,7 +2028,7 @@ int UtcDaliRendererSetIndexRange(void)
   };
   Property::Map vertexFormat;
   vertexFormat["aPosition"] = Property::VECTOR2;
-  PropertyBuffer vertexBuffer = PropertyBuffer::New( vertexFormat );
+  VertexBuffer vertexBuffer = VertexBuffer::New( vertexFormat );
   vertexBuffer.SetData( shapes, sizeof(shapes)/sizeof(shapes[0]));
 
   // --------------------------------------------------------------------------
index 4287ebf..e140a98 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.
@@ -19,8 +19,6 @@
 
 #include <stdlib.h>
 #include <dali/public-api/dali-core.h>
-#include <dali/devel-api/events/gesture-devel.h>
-#include <dali/devel-api/events/rotation-gesture.h>
 #include <dali-test-suite-utils.h>
 
 using namespace Dali;
@@ -43,17 +41,17 @@ int UtcDaliRotationGestureConstructor(void)
   RotationGesture gesture(Gesture::Started);
   DALI_TEST_EQUALS(Gesture::Started, gesture.state, TEST_LOCATION);
   DALI_TEST_EQUALS(0.0f, gesture.rotation.radian, TEST_LOCATION);
-  DALI_TEST_EQUALS(DevelGesture::Rotation, static_cast< DevelGesture::Type >( gesture.type ), TEST_LOCATION);
+  DALI_TEST_EQUALS(Gesture::Rotation, gesture.type, TEST_LOCATION);
 
   RotationGesture gesture2(Gesture::Continuing);
   DALI_TEST_EQUALS(Gesture::Continuing, gesture2.state, TEST_LOCATION);
   DALI_TEST_EQUALS(0.0f, gesture2.rotation.radian, TEST_LOCATION);
-  DALI_TEST_EQUALS(DevelGesture::Rotation, static_cast< DevelGesture::Type >( gesture2.type ), TEST_LOCATION);
+  DALI_TEST_EQUALS(Gesture::Rotation, gesture2.type, TEST_LOCATION);
 
   RotationGesture gesture3(Gesture::Finished);
   DALI_TEST_EQUALS(Gesture::Finished, gesture3.state, TEST_LOCATION);
   DALI_TEST_EQUALS(0.0f, gesture3.rotation.radian, TEST_LOCATION);
-  DALI_TEST_EQUALS(DevelGesture::Rotation, static_cast< DevelGesture::Type >( gesture3.type ), TEST_LOCATION);
+  DALI_TEST_EQUALS(Gesture::Rotation, gesture3.type, TEST_LOCATION);
 
   // Test copy constructor
   gesture3.rotation = 3.0f;
@@ -61,7 +59,7 @@ int UtcDaliRotationGestureConstructor(void)
   RotationGesture rotation(gesture3);
   DALI_TEST_EQUALS(Gesture::Finished, rotation.state, TEST_LOCATION);
   DALI_TEST_EQUALS(3.0f, rotation.rotation.radian, TEST_LOCATION);
-DALI_TEST_EQUALS(DevelGesture::Rotation, static_cast< DevelGesture::Type >( rotation.type ), TEST_LOCATION);
+  DALI_TEST_EQUALS(Gesture::Rotation, rotation.type, TEST_LOCATION);
   END_TEST;
 }
 
@@ -71,19 +69,19 @@ int UtcDaliRotationGestureAssignment(void)
   RotationGesture gesture(Gesture::Started);
   DALI_TEST_EQUALS(Gesture::Started, gesture.state, TEST_LOCATION);
   DALI_TEST_EQUALS(0.0f, gesture.rotation.radian, TEST_LOCATION);
-  DALI_TEST_EQUALS(DevelGesture::Rotation, static_cast< DevelGesture::Type >( gesture.type ), TEST_LOCATION);
+  DALI_TEST_EQUALS(Gesture::Rotation, gesture.type, TEST_LOCATION);
 
   RotationGesture gesture2(Gesture::Continuing);
   DALI_TEST_EQUALS(Gesture::Continuing, gesture2.state, TEST_LOCATION);
   DALI_TEST_EQUALS(0.0f, gesture2.rotation.radian, TEST_LOCATION);
-  DALI_TEST_EQUALS(DevelGesture::Rotation, static_cast< DevelGesture::Type >( gesture2.type ), TEST_LOCATION);
+  DALI_TEST_EQUALS(Gesture::Rotation, gesture2.type, TEST_LOCATION);
 
   gesture2.rotation.radian = 3.0f;
 
   gesture = gesture2;
   DALI_TEST_EQUALS(Gesture::Continuing, gesture.state, TEST_LOCATION);
   DALI_TEST_EQUALS(3.0f, gesture.rotation.radian, TEST_LOCATION);
-  DALI_TEST_EQUALS(DevelGesture::Rotation, static_cast< DevelGesture::Type >( gesture.type ), TEST_LOCATION);
+  DALI_TEST_EQUALS(Gesture::Rotation, gesture.type, TEST_LOCATION);
   END_TEST;
 }
 
@@ -92,7 +90,7 @@ int UtcDaliRotationGestureDynamicAllocation(void)
   RotationGesture* gesture = new RotationGesture( Gesture::Started );
   DALI_TEST_EQUALS(Gesture::Started, gesture->state, TEST_LOCATION);
   DALI_TEST_EQUALS(0.0f, gesture->rotation.radian, TEST_LOCATION);
-  DALI_TEST_EQUALS(DevelGesture::Rotation, static_cast< DevelGesture::Type >( gesture->type ), TEST_LOCATION);
+  DALI_TEST_EQUALS(Gesture::Rotation, gesture->type, TEST_LOCATION);
   delete gesture;
 
   END_TEST;
index 7c50017..48fa876 100644 (file)
@@ -21,9 +21,6 @@
 #include <dali/public-api/dali-core.h>
 #include <dali/integration-api/events/touch-event-integ.h>
 #include <dali/integration-api/render-task-list-integ.h>
-#include <dali/devel-api/events/gesture-devel.h>
-#include <dali/devel-api/events/rotation-gesture.h>
-#include <dali/devel-api/events/rotation-gesture-detector.h>
 #include <dali-test-suite-utils.h>
 #include <test-touch-event-utils.h>
 
index dd92e00..85ba2e3 100644 (file)
@@ -21,8 +21,6 @@
 #include <dali/public-api/dali-core.h>
 #include <dali/integration-api/input-options.h>
 #include <dali/integration-api/events/touch-event-integ.h>
-#include <dali/devel-api/events/rotation-gesture.h>
-#include <dali/devel-api/events/rotation-gesture-detector.h>
 #include <dali-test-suite-utils.h>
 
 
index 59ea755..e8526ae 100644 (file)
@@ -64,9 +64,7 @@ struct KeyEventSignalData
   {
     functorCalled = false;
 
-    receivedKeyEvent.keyModifier = 0;
-    receivedKeyEvent.keyPressedName.clear();
-    receivedKeyEvent.keyPressed.clear();
+    receivedKeyEvent.Reset();
   }
 
   bool functorCalled;
@@ -182,9 +180,7 @@ struct KeyEventGeneratedSignalData
   {
     functorCalled = false;
 
-    receivedKeyEvent.keyModifier = 0;
-    receivedKeyEvent.keyPressedName.clear();
-    receivedKeyEvent.keyPressed.clear();
+    receivedKeyEvent.Reset();
   }
 
   bool functorCalled;
@@ -565,47 +561,47 @@ int UtcDaliSceneSignalKeyEventP(void)
   KeyEventReceivedFunctor functor( data );
   scene.KeyEventSignal().Connect( &application, functor );
 
-  Integration::KeyEvent event( "i", "", "i", 0, 0, 0, Integration::KeyEvent::Down, "i", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+  Integration::KeyEvent event( "i", "", "i", 0, 0, 0, Integration::KeyEvent::DOWN, "i", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
   application.ProcessEvent( event );
 
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
-  DALI_TEST_CHECK( event.keyModifier == data.receivedKeyEvent.keyModifier );
-  DALI_TEST_CHECK( event.keyName == data.receivedKeyEvent.keyPressedName );
-  DALI_TEST_CHECK( event.keyString == data.receivedKeyEvent.keyPressed );
-  DALI_TEST_CHECK( event.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.state ) );
+  DALI_TEST_CHECK( event.keyModifier == data.receivedKeyEvent.GetKeyModifier() );
+  DALI_TEST_CHECK( event.keyName == data.receivedKeyEvent.GetKeyName() );
+  DALI_TEST_CHECK( event.keyString == data.receivedKeyEvent.GetKeyString() );
+  DALI_TEST_CHECK( event.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.GetState() ) );
 
   data.Reset();
 
-  Integration::KeyEvent event2( "i", "", "i", 0, 0, 0, Integration::KeyEvent::Up, "i", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+  Integration::KeyEvent event2( "i", "", "i", 0, 0, 0, Integration::KeyEvent::UP, "i", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
   application.ProcessEvent( event2 );
 
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
-  DALI_TEST_CHECK( event2.keyModifier == data.receivedKeyEvent.keyModifier );
-  DALI_TEST_CHECK( event2.keyName == data.receivedKeyEvent.keyPressedName );
-  DALI_TEST_CHECK( event2.keyString == data.receivedKeyEvent.keyPressed );
-  DALI_TEST_CHECK( event2.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.state ) );
+  DALI_TEST_CHECK( event2.keyModifier == data.receivedKeyEvent.GetKeyModifier() );
+  DALI_TEST_CHECK( event2.keyName == data.receivedKeyEvent.GetKeyName() );
+  DALI_TEST_CHECK( event2.keyString == data.receivedKeyEvent.GetKeyString() );
+  DALI_TEST_CHECK( event2.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.GetState() ) );
 
   data.Reset();
 
-  Integration::KeyEvent event3( "a", "", "a", 0, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+  Integration::KeyEvent event3( "a", "", "a", 0, 0, 0, Integration::KeyEvent::DOWN, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
   application.ProcessEvent( event3 );
 
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
-  DALI_TEST_CHECK( event3.keyModifier == data.receivedKeyEvent.keyModifier );
-  DALI_TEST_CHECK( event3.keyName == data.receivedKeyEvent.keyPressedName );
-  DALI_TEST_CHECK( event3.keyString == data.receivedKeyEvent.keyPressed );
-  DALI_TEST_CHECK( event3.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.state ) );
+  DALI_TEST_CHECK( event3.keyModifier == data.receivedKeyEvent.GetKeyModifier() );
+  DALI_TEST_CHECK( event3.keyName == data.receivedKeyEvent.GetKeyName() );
+  DALI_TEST_CHECK( event3.keyString == data.receivedKeyEvent.GetKeyString() );
+  DALI_TEST_CHECK( event3.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.GetState() ) );
 
   data.Reset();
 
-  Integration::KeyEvent event4( "a", "", "a", 0, 0, 0, Integration::KeyEvent::Up, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+  Integration::KeyEvent event4( "a", "", "a", 0, 0, 0, Integration::KeyEvent::UP, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
   application.ProcessEvent( event4 );
 
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
-  DALI_TEST_CHECK( event4.keyModifier == data.receivedKeyEvent.keyModifier );
-  DALI_TEST_CHECK( event4.keyName == data.receivedKeyEvent.keyPressedName );
-  DALI_TEST_CHECK( event4.keyString == data.receivedKeyEvent.keyPressed );
-  DALI_TEST_CHECK( event4.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.state ) );
+  DALI_TEST_CHECK( event4.keyModifier == data.receivedKeyEvent.GetKeyModifier() );
+  DALI_TEST_CHECK( event4.keyName == data.receivedKeyEvent.GetKeyName() );
+  DALI_TEST_CHECK( event4.keyString == data.receivedKeyEvent.GetKeyString() );
+  DALI_TEST_CHECK( event4.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.GetState() ) );
   END_TEST;
 }
 
@@ -1050,47 +1046,47 @@ int UtcDaliSceneKeyEventGeneratedSignalP(void)
   KeyEventGeneratedReceivedFunctor functor( data );
   scene.KeyEventGeneratedSignal().Connect( &application, functor );
 
-  Integration::KeyEvent event( "a", "", "a", 0, 0, 0, Integration::KeyEvent::Up, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+  Integration::KeyEvent event( "a", "", "a", 0, 0, 0, Integration::KeyEvent::UP, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
   application.ProcessEvent( event );
 
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
-  DALI_TEST_CHECK( event.keyModifier == data.receivedKeyEvent.keyModifier );
-  DALI_TEST_CHECK( event.keyName == data.receivedKeyEvent.keyPressedName );
-  DALI_TEST_CHECK( event.keyString == data.receivedKeyEvent.keyPressed );
-  DALI_TEST_CHECK( event.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.state ) );
+  DALI_TEST_CHECK( event.keyModifier == data.receivedKeyEvent.GetKeyModifier() );
+  DALI_TEST_CHECK( event.keyName == data.receivedKeyEvent.GetKeyName() );
+  DALI_TEST_CHECK( event.keyString == data.receivedKeyEvent.GetKeyString() );
+  DALI_TEST_CHECK( event.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.GetState() ) );
 
   data.Reset();
 
-  Integration::KeyEvent event2( "i", "", "i", 0, 0, 0, Integration::KeyEvent::Up, "i", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+  Integration::KeyEvent event2( "i", "", "i", 0, 0, 0, Integration::KeyEvent::UP, "i", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
   application.ProcessEvent( event2 );
 
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
-  DALI_TEST_CHECK( event2.keyModifier == data.receivedKeyEvent.keyModifier );
-  DALI_TEST_CHECK( event2.keyName == data.receivedKeyEvent.keyPressedName );
-  DALI_TEST_CHECK( event2.keyString == data.receivedKeyEvent.keyPressed );
-  DALI_TEST_CHECK( event2.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.state ) );
+  DALI_TEST_CHECK( event2.keyModifier == data.receivedKeyEvent.GetKeyModifier() );
+  DALI_TEST_CHECK( event2.keyName == data.receivedKeyEvent.GetKeyName() );
+  DALI_TEST_CHECK( event2.keyString == data.receivedKeyEvent.GetKeyString() );
+  DALI_TEST_CHECK( event2.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.GetState() ) );
 
   data.Reset();
 
-  Integration::KeyEvent event3( "a", "", "a", 0, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+  Integration::KeyEvent event3( "a", "", "a", 0, 0, 0, Integration::KeyEvent::DOWN, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
   application.ProcessEvent( event3 );
 
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
-  DALI_TEST_CHECK( event3.keyModifier == data.receivedKeyEvent.keyModifier );
-  DALI_TEST_CHECK( event3.keyName == data.receivedKeyEvent.keyPressedName );
-  DALI_TEST_CHECK( event3.keyString == data.receivedKeyEvent.keyPressed );
-  DALI_TEST_CHECK( event3.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.state ) );
+  DALI_TEST_CHECK( event3.keyModifier == data.receivedKeyEvent.GetKeyModifier() );
+  DALI_TEST_CHECK( event3.keyName == data.receivedKeyEvent.GetKeyName() );
+  DALI_TEST_CHECK( event3.keyString == data.receivedKeyEvent.GetKeyString() );
+  DALI_TEST_CHECK( event3.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.GetState() ) );
 
   data.Reset();
 
-  Integration::KeyEvent event4( "a", "", "a", 0, 0, 0, Integration::KeyEvent::Up, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+  Integration::KeyEvent event4( "a", "", "a", 0, 0, 0, Integration::KeyEvent::UP, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
   application.ProcessEvent( event4 );
 
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
-  DALI_TEST_CHECK( event4.keyModifier == data.receivedKeyEvent.keyModifier );
-  DALI_TEST_CHECK( event4.keyName == data.receivedKeyEvent.keyPressedName );
-  DALI_TEST_CHECK( event4.keyString == data.receivedKeyEvent.keyPressed );
-  DALI_TEST_CHECK( event4.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.state ) );
+  DALI_TEST_CHECK( event4.keyModifier == data.receivedKeyEvent.GetKeyModifier() );
+  DALI_TEST_CHECK( event4.keyName == data.receivedKeyEvent.GetKeyName() );
+  DALI_TEST_CHECK( event4.keyString == data.receivedKeyEvent.GetKeyString() );
+  DALI_TEST_CHECK( event4.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.GetState() ) );
   END_TEST;
 }
 
index d1a6444..1ba3ab4 100644 (file)
@@ -75,9 +75,7 @@ struct KeyEventGeneratedSignalData
   {
     functorCalled = false;
 
-    receivedKeyEvent.keyModifier = 0;
-    receivedKeyEvent.keyPressedName.clear();
-    receivedKeyEvent.keyPressed.clear();
+    receivedKeyEvent.Reset();
   }
 
   bool functorCalled;
@@ -119,9 +117,7 @@ struct KeyEventSignalData
   {
     functorCalled = false;
 
-    receivedKeyEvent.keyModifier = 0;
-    receivedKeyEvent.keyPressedName.clear();
-    receivedKeyEvent.keyPressed.clear();
+    receivedKeyEvent.Reset();
   }
 
   bool functorCalled;
@@ -866,47 +862,47 @@ int UtcDaliStageKeyEventGeneratedSignalP(void)
   KeyEventGeneratedReceivedFunctor functor2( data2 );
   GetImplementation( stage ).ConnectSignal( &application, "keyEventGenerated", functor2 );
 
-  Integration::KeyEvent event( "a", "", "a", 0, 0, 0, Integration::KeyEvent::Up, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+  Integration::KeyEvent event( "a", "", "a", 0, 0, 0, Integration::KeyEvent::UP, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
   application.ProcessEvent( event );
 
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
-  DALI_TEST_CHECK( event.keyModifier == data.receivedKeyEvent.keyModifier );
-  DALI_TEST_CHECK( event.keyName == data.receivedKeyEvent.keyPressedName );
-  DALI_TEST_CHECK( event.keyString == data.receivedKeyEvent.keyPressed );
-  DALI_TEST_CHECK( event.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.state ) );
+  DALI_TEST_CHECK( event.keyModifier == data.receivedKeyEvent.GetKeyModifier() );
+  DALI_TEST_CHECK( event.keyName == data.receivedKeyEvent.GetKeyName() );
+  DALI_TEST_CHECK( event.keyString == data.receivedKeyEvent.GetKeyString() );
+  DALI_TEST_CHECK( event.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.GetState() ) );
 
   data.Reset();
 
-  Integration::KeyEvent event2( "i", "", "i", 0, 0, 0, Integration::KeyEvent::Up, "i", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+  Integration::KeyEvent event2( "i", "", "i", 0, 0, 0, Integration::KeyEvent::UP, "i", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
   application.ProcessEvent( event2 );
 
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
-  DALI_TEST_CHECK( event2.keyModifier == data.receivedKeyEvent.keyModifier );
-  DALI_TEST_CHECK( event2.keyName == data.receivedKeyEvent.keyPressedName );
-  DALI_TEST_CHECK( event2.keyString == data.receivedKeyEvent.keyPressed );
-  DALI_TEST_CHECK( event2.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.state ) );
+  DALI_TEST_CHECK( event2.keyModifier == data.receivedKeyEvent.GetKeyModifier() );
+  DALI_TEST_CHECK( event2.keyName == data.receivedKeyEvent.GetKeyName() );
+  DALI_TEST_CHECK( event2.keyString == data.receivedKeyEvent.GetKeyString() );
+  DALI_TEST_CHECK( event2.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.GetState() ) );
 
   data.Reset();
 
-  Integration::KeyEvent event3( "a", "", "a", 0, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+  Integration::KeyEvent event3( "a", "", "a", 0, 0, 0, Integration::KeyEvent::DOWN, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
   application.ProcessEvent( event3 );
 
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
-  DALI_TEST_CHECK( event3.keyModifier == data.receivedKeyEvent.keyModifier );
-  DALI_TEST_CHECK( event3.keyName == data.receivedKeyEvent.keyPressedName );
-  DALI_TEST_CHECK( event3.keyString == data.receivedKeyEvent.keyPressed );
-  DALI_TEST_CHECK( event3.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.state ) );
+  DALI_TEST_CHECK( event3.keyModifier == data.receivedKeyEvent.GetKeyModifier() );
+  DALI_TEST_CHECK( event3.keyName == data.receivedKeyEvent.GetKeyName() );
+  DALI_TEST_CHECK( event3.keyString == data.receivedKeyEvent.GetKeyString() );
+  DALI_TEST_CHECK( event3.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.GetState() ) );
 
   data.Reset();
 
-  Integration::KeyEvent event4( "a", "", "a", 0, 0, 0, Integration::KeyEvent::Up, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+  Integration::KeyEvent event4( "a", "", "a", 0, 0, 0, Integration::KeyEvent::UP, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
   application.ProcessEvent( event4 );
 
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
-  DALI_TEST_CHECK( event4.keyModifier == data.receivedKeyEvent.keyModifier );
-  DALI_TEST_CHECK( event4.keyName == data.receivedKeyEvent.keyPressedName );
-  DALI_TEST_CHECK( event4.keyString == data.receivedKeyEvent.keyPressed );
-  DALI_TEST_CHECK( event4.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.state ) );
+  DALI_TEST_CHECK( event4.keyModifier == data.receivedKeyEvent.GetKeyModifier() );
+  DALI_TEST_CHECK( event4.keyName == data.receivedKeyEvent.GetKeyName() );
+  DALI_TEST_CHECK( event4.keyString == data.receivedKeyEvent.GetKeyString() );
+  DALI_TEST_CHECK( event4.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.GetState() ) );
   END_TEST;
 }
 
@@ -919,47 +915,47 @@ int UtcDaliStageSignalKeyEventP(void)
   KeyEventReceivedFunctor functor( data );
   stage.KeyEventSignal().Connect( &application, functor );
 
-  Integration::KeyEvent event( "i", "", "i", 0, 0, 0, Integration::KeyEvent::Down, "i", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+  Integration::KeyEvent event( "i", "", "i", 0, 0, 0, Integration::KeyEvent::DOWN, "i", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
   application.ProcessEvent( event );
 
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
-  DALI_TEST_CHECK( event.keyModifier == data.receivedKeyEvent.keyModifier );
-  DALI_TEST_CHECK( event.keyName == data.receivedKeyEvent.keyPressedName );
-  DALI_TEST_CHECK( event.keyString == data.receivedKeyEvent.keyPressed );
-  DALI_TEST_CHECK( event.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.state ) );
+  DALI_TEST_CHECK( event.keyModifier == data.receivedKeyEvent.GetKeyModifier() );
+  DALI_TEST_CHECK( event.keyName == data.receivedKeyEvent.GetKeyName() );
+  DALI_TEST_CHECK( event.keyString == data.receivedKeyEvent.GetKeyString() );
+  DALI_TEST_CHECK( event.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.GetState() ) );
 
   data.Reset();
 
-  Integration::KeyEvent event2( "i", "", "i", 0, 0, 0, Integration::KeyEvent::Up, "i", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+  Integration::KeyEvent event2( "i", "", "i", 0, 0, 0, Integration::KeyEvent::UP, "i", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
   application.ProcessEvent( event2 );
 
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
-  DALI_TEST_CHECK( event2.keyModifier == data.receivedKeyEvent.keyModifier );
-  DALI_TEST_CHECK( event2.keyName == data.receivedKeyEvent.keyPressedName );
-  DALI_TEST_CHECK( event2.keyString == data.receivedKeyEvent.keyPressed );
-  DALI_TEST_CHECK( event2.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.state ) );
+  DALI_TEST_CHECK( event2.keyModifier == data.receivedKeyEvent.GetKeyModifier() );
+  DALI_TEST_CHECK( event2.keyName == data.receivedKeyEvent.GetKeyName() );
+  DALI_TEST_CHECK( event2.keyString == data.receivedKeyEvent.GetKeyString() );
+  DALI_TEST_CHECK( event2.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.GetState() ) );
 
   data.Reset();
 
-  Integration::KeyEvent event3( "a", "", "a", 0, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+  Integration::KeyEvent event3( "a", "", "a", 0, 0, 0, Integration::KeyEvent::DOWN, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
   application.ProcessEvent( event3 );
 
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
-  DALI_TEST_CHECK( event3.keyModifier == data.receivedKeyEvent.keyModifier );
-  DALI_TEST_CHECK( event3.keyName == data.receivedKeyEvent.keyPressedName );
-  DALI_TEST_CHECK( event3.keyString == data.receivedKeyEvent.keyPressed );
-  DALI_TEST_CHECK( event3.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.state ) );
+  DALI_TEST_CHECK( event3.keyModifier == data.receivedKeyEvent.GetKeyModifier() );
+  DALI_TEST_CHECK( event3.keyName == data.receivedKeyEvent.GetKeyName() );
+  DALI_TEST_CHECK( event3.keyString == data.receivedKeyEvent.GetKeyString() );
+  DALI_TEST_CHECK( event3.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.GetState() ) );
 
   data.Reset();
 
-  Integration::KeyEvent event4( "a", "", "a", 0, 0, 0, Integration::KeyEvent::Up, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+  Integration::KeyEvent event4( "a", "", "a", 0, 0, 0, Integration::KeyEvent::UP, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
   application.ProcessEvent( event4 );
 
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
-  DALI_TEST_CHECK( event4.keyModifier == data.receivedKeyEvent.keyModifier );
-  DALI_TEST_CHECK( event4.keyName == data.receivedKeyEvent.keyPressedName );
-  DALI_TEST_CHECK( event4.keyString == data.receivedKeyEvent.keyPressed );
-  DALI_TEST_CHECK( event4.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.state ) );
+  DALI_TEST_CHECK( event4.keyModifier == data.receivedKeyEvent.GetKeyModifier() );
+  DALI_TEST_CHECK( event4.keyName == data.receivedKeyEvent.GetKeyName() );
+  DALI_TEST_CHECK( event4.keyString == data.receivedKeyEvent.GetKeyString() );
+  DALI_TEST_CHECK( event4.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.GetState() ) );
   END_TEST;
 }
 
index f6ca243..54685ee 100644 (file)
@@ -23,7 +23,6 @@
 #include <dali/internal/event/common/type-info-impl.h>
 #include <dali/integration-api/events/touch-event-integ.h>
 #include <dali/integration-api/events/hover-event-integ.h>
-#include <dali/devel-api/events/rotation-gesture-detector.h>
 
 using namespace Dali;
 
@@ -22,17 +22,17 @@ using namespace Dali;
 
 #include <mesh-builder.h>
 
-void propertyBuffer_test_startup(void)
+void vertexBuffer_test_startup(void)
 {
   test_return_value = TET_UNDEF;
 }
 
-void propertyBuffer_test_cleanup(void)
+void vertexBuffer_test_cleanup(void)
 {
   test_return_value = TET_PASS;
 }
 
-int UtcDaliPropertyBufferNew01(void)
+int UtcDaliVertexBufferNew01(void)
 {
   TestApplication application;
 
@@ -40,21 +40,21 @@ int UtcDaliPropertyBufferNew01(void)
   texturedQuadVertexFormat["aPosition"] = Property::VECTOR2;
   texturedQuadVertexFormat["aVertexCoord"] = Property::VECTOR2;
 
-  PropertyBuffer propertyBuffer = PropertyBuffer::New( texturedQuadVertexFormat );
+  VertexBuffer vertexBuffer = VertexBuffer::New( texturedQuadVertexFormat );
 
-  DALI_TEST_EQUALS( (bool)propertyBuffer, true, TEST_LOCATION );
+  DALI_TEST_EQUALS( (bool)vertexBuffer, true, TEST_LOCATION );
   END_TEST;
 }
 
-int UtcDaliPropertyBufferNew02(void)
+int UtcDaliVertexBufferNew02(void)
 {
   TestApplication application;
-  PropertyBuffer propertyBuffer;
-  DALI_TEST_EQUALS( (bool)propertyBuffer, false, TEST_LOCATION );
+  VertexBuffer vertexBuffer;
+  DALI_TEST_EQUALS( (bool)vertexBuffer, false, TEST_LOCATION );
   END_TEST;
 }
 
-int UtcDaliPropertyBufferDownCast01(void)
+int UtcDaliVertexBufferDownCast01(void)
 {
   TestApplication application;
 
@@ -62,92 +62,92 @@ int UtcDaliPropertyBufferDownCast01(void)
   texturedQuadVertexFormat["aPosition"] = Property::VECTOR2;
   texturedQuadVertexFormat["aVertexCoord"] = Property::VECTOR2;
 
-  PropertyBuffer propertyBuffer = PropertyBuffer::New( texturedQuadVertexFormat );
+  VertexBuffer vertexBuffer = VertexBuffer::New( texturedQuadVertexFormat );
 
-  BaseHandle handle(propertyBuffer);
-  PropertyBuffer propertyBuffer2 = PropertyBuffer::DownCast(handle);
-  DALI_TEST_EQUALS( (bool)propertyBuffer2, true, TEST_LOCATION );
+  BaseHandle handle(vertexBuffer);
+  VertexBuffer vertexBuffer2 = VertexBuffer::DownCast(handle);
+  DALI_TEST_EQUALS( (bool)vertexBuffer2, true, TEST_LOCATION );
   END_TEST;
 }
 
-int UtcDaliPropertyBufferDownCast02(void)
+int UtcDaliVertexBufferDownCast02(void)
 {
   TestApplication application;
 
   Handle handle = Handle::New(); // Create a custom object
-  PropertyBuffer propertyBuffer = PropertyBuffer::DownCast(handle);
-  DALI_TEST_EQUALS( (bool)propertyBuffer, false, TEST_LOCATION );
+  VertexBuffer vertexBuffer = VertexBuffer::DownCast(handle);
+  DALI_TEST_EQUALS( (bool)vertexBuffer, false, TEST_LOCATION );
   END_TEST;
 }
 
-int UtcDaliPropertyBufferCopyConstructor(void)
+int UtcDaliVertexBufferCopyConstructor(void)
 {
   TestApplication application;
 
-  PropertyBuffer propertyBuffer = CreatePropertyBuffer();
+  VertexBuffer vertexBuffer = CreateVertexBuffer();
 
-  PropertyBuffer propertyBufferCopy(propertyBuffer);
+  VertexBuffer vertexBufferCopy(vertexBuffer);
 
-  DALI_TEST_EQUALS( (bool)propertyBufferCopy, true, TEST_LOCATION );
-  DALI_TEST_EQUALS( propertyBufferCopy.GetSize(), 0u, TEST_LOCATION );
+  DALI_TEST_EQUALS( (bool)vertexBufferCopy, true, TEST_LOCATION );
+  DALI_TEST_EQUALS( vertexBufferCopy.GetSize(), 0u, TEST_LOCATION );
 
   END_TEST;
 }
 
-int UtcDaliPropertyBufferAssignmentOperator(void)
+int UtcDaliVertexBufferAssignmentOperator(void)
 {
   TestApplication application;
 
-  PropertyBuffer propertyBuffer = CreatePropertyBuffer();
+  VertexBuffer vertexBuffer = CreateVertexBuffer();
 
-  PropertyBuffer propertyBuffer2;
-  DALI_TEST_EQUALS( (bool)propertyBuffer2, false, TEST_LOCATION );
+  VertexBuffer vertexBuffer2;
+  DALI_TEST_EQUALS( (bool)vertexBuffer2, false, TEST_LOCATION );
 
-  propertyBuffer2 = propertyBuffer;
-  DALI_TEST_EQUALS( (bool)propertyBuffer2, true, TEST_LOCATION );
-  DALI_TEST_EQUALS( propertyBuffer2.GetSize(), 0u, TEST_LOCATION );
+  vertexBuffer2 = vertexBuffer;
+  DALI_TEST_EQUALS( (bool)vertexBuffer2, true, TEST_LOCATION );
+  DALI_TEST_EQUALS( vertexBuffer2.GetSize(), 0u, TEST_LOCATION );
 
   END_TEST;
 }
 
-int UtcDaliPropertyBufferMoveConstructor(void)
+int UtcDaliVertexBufferMoveConstructor(void)
 {
   TestApplication application;
 
-  PropertyBuffer propertyBuffer = CreatePropertyBuffer();
-  DALI_TEST_CHECK( propertyBuffer );
-  DALI_TEST_EQUALS( 1, propertyBuffer.GetBaseObject().ReferenceCount(), TEST_LOCATION );
-  DALI_TEST_EQUALS( 0u, propertyBuffer.GetSize(), TEST_LOCATION );
+  VertexBuffer vertexBuffer = CreateVertexBuffer();
+  DALI_TEST_CHECK( vertexBuffer );
+  DALI_TEST_EQUALS( 1, vertexBuffer.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( 0u, vertexBuffer.GetSize(), TEST_LOCATION );
 
-  PropertyBuffer move = std::move( propertyBuffer );
+  VertexBuffer move = std::move( vertexBuffer );
   DALI_TEST_CHECK( move );
   DALI_TEST_EQUALS( 1, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
   DALI_TEST_EQUALS( 0u, move.GetSize(), TEST_LOCATION );
-  DALI_TEST_CHECK( !propertyBuffer );
+  DALI_TEST_CHECK( !vertexBuffer );
 
   END_TEST;
 }
 
-int UtcDaliPropertyBufferMoveAssignment(void)
+int UtcDaliVertexBufferMoveAssignment(void)
 {
   TestApplication application;
 
-  PropertyBuffer propertyBuffer = CreatePropertyBuffer();
-  DALI_TEST_CHECK( propertyBuffer );
-  DALI_TEST_EQUALS( 1, propertyBuffer.GetBaseObject().ReferenceCount(), TEST_LOCATION );
-  DALI_TEST_EQUALS( 0u, propertyBuffer.GetSize(), TEST_LOCATION );
+  VertexBuffer vertexBuffer = CreateVertexBuffer();
+  DALI_TEST_CHECK( vertexBuffer );
+  DALI_TEST_EQUALS( 1, vertexBuffer.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( 0u, vertexBuffer.GetSize(), TEST_LOCATION );
 
-  PropertyBuffer move;
-  move = std::move( propertyBuffer );
+  VertexBuffer move;
+  move = std::move( vertexBuffer );
   DALI_TEST_CHECK( move );
   DALI_TEST_EQUALS( 1, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
   DALI_TEST_EQUALS( 0u, move.GetSize(), TEST_LOCATION );
-  DALI_TEST_CHECK( !propertyBuffer );
+  DALI_TEST_CHECK( !vertexBuffer );
 
   END_TEST;
 }
 
-int UtcDaliPropertyBufferSetData01(void)
+int UtcDaliVertexBufferSetData01(void)
 {
   TestApplication application;
 
@@ -156,8 +156,8 @@ int UtcDaliPropertyBufferSetData01(void)
   texturedQuadVertexFormat["aVertexCoord"] = Property::VECTOR2;
 
   {
-    PropertyBuffer propertyBuffer = PropertyBuffer::New( texturedQuadVertexFormat );
-    DALI_TEST_EQUALS( (bool)propertyBuffer, true, TEST_LOCATION );
+    VertexBuffer vertexBuffer = VertexBuffer::New( texturedQuadVertexFormat );
+    DALI_TEST_EQUALS( (bool)vertexBuffer, true, TEST_LOCATION );
 
     const float halfQuadSize = .5f;
     struct TexturedQuadVertex { Vector2 position; Vector2 textureCoordinates; };
@@ -167,10 +167,10 @@ int UtcDaliPropertyBufferSetData01(void)
       { Vector2(-halfQuadSize,  halfQuadSize), Vector2(0.f, 1.f) },
       { Vector2( halfQuadSize,  halfQuadSize), Vector2(1.f, 1.f) } };
 
-    propertyBuffer.SetData( texturedQuadVertexData, 4 );
+    vertexBuffer.SetData( texturedQuadVertexData, 4 );
 
     Geometry geometry = Geometry::New();
-    geometry.AddVertexBuffer( propertyBuffer );
+    geometry.AddVertexBuffer( vertexBuffer );
 
     Shader shader = CreateShader();
     Renderer renderer = Renderer::New(geometry, shader);
@@ -199,7 +199,7 @@ int UtcDaliPropertyBufferSetData01(void)
   END_TEST;
 }
 
-int UtcDaliPropertyBufferSetData02(void)
+int UtcDaliVertexBufferSetData02(void)
 {
   TestApplication application;
 
@@ -207,8 +207,8 @@ int UtcDaliPropertyBufferSetData02(void)
   texturedQuadVertexFormat["aPosition"] = Property::VECTOR2;
   texturedQuadVertexFormat["aVertexCoord"] = Property::VECTOR2;
 
-  PropertyBuffer propertyBuffer = PropertyBuffer::New( texturedQuadVertexFormat );
-  DALI_TEST_EQUALS( (bool)propertyBuffer, true, TEST_LOCATION );
+  VertexBuffer vertexBuffer = VertexBuffer::New( texturedQuadVertexFormat );
+  DALI_TEST_EQUALS( (bool)vertexBuffer, true, TEST_LOCATION );
 
   const float halfQuadSize = .5f;
   struct TexturedQuadVertex { Vector2 position; Vector2 textureCoordinates; };
@@ -218,10 +218,10 @@ int UtcDaliPropertyBufferSetData02(void)
     { Vector2(-halfQuadSize,  halfQuadSize), Vector2(0.f, 1.f) },
     { Vector2( halfQuadSize,  halfQuadSize), Vector2(1.f, 1.f) } };
 
-  propertyBuffer.SetData( texturedQuadVertexData, 4 );
+  vertexBuffer.SetData( texturedQuadVertexData, 4 );
 
   Geometry geometry = Geometry::New();
-  geometry.AddVertexBuffer( propertyBuffer );
+  geometry.AddVertexBuffer( vertexBuffer );
 
   Shader shader = CreateShader();
   Renderer renderer = Renderer::New(geometry, shader);
@@ -244,8 +244,8 @@ int UtcDaliPropertyBufferSetData02(void)
     DALI_TEST_EQUALS( bufferDataCalls[0], sizeof(texturedQuadVertexData), TEST_LOCATION );
   }
 
-  // Re-upload the data on the propertyBuffer
-  propertyBuffer.SetData( texturedQuadVertexData, 4 );
+  // Re-upload the data on the vertexBuffer
+  vertexBuffer.SetData( texturedQuadVertexData, 4 );
 
   application.SendNotification();
   application.Render(0);
@@ -271,7 +271,7 @@ int UtcDaliPropertyBufferSetData02(void)
   END_TEST;
 }
 
-int UtcDaliPropertyBufferInvalidTypeN(void)
+int UtcDaliVertexBufferInvalidTypeN(void)
 {
   TestApplication application;
 
@@ -281,21 +281,21 @@ int UtcDaliPropertyBufferInvalidTypeN(void)
 
   try
   {
-    PropertyBuffer propertyBuffer = PropertyBuffer::New( texturedQuadVertexFormat );
+    VertexBuffer vertexBuffer = VertexBuffer::New( texturedQuadVertexFormat );
     tet_result(TET_FAIL);
   }
   catch ( Dali::DaliException& e )
   {
-    DALI_TEST_ASSERT( e, "Property::Type not supported in PropertyBuffer", TEST_LOCATION );
+    DALI_TEST_ASSERT( e, "Property::Type not supported in VertexBuffer", TEST_LOCATION );
   }
   END_TEST;
 }
 
 
-int UtcDaliPropertyBufferSetDataNegative(void)
+int UtcDaliVertexBufferSetDataNegative(void)
 {
   TestApplication application;
-  Dali::PropertyBuffer instance;
+  Dali::VertexBuffer instance;
   try
   {
     void* arg1(nullptr);
@@ -310,10 +310,10 @@ int UtcDaliPropertyBufferSetDataNegative(void)
   END_TEST;
 }
 
-int UtcDaliPropertyBufferGetSizeNegative(void)
+int UtcDaliVertexBufferGetSizeNegative(void)
 {
   TestApplication application;
-  Dali::PropertyBuffer instance;
+  Dali::VertexBuffer instance;
   try
   {
     instance.GetSize();
index 50ba0de..81e5b2f 100644 (file)
@@ -46,7 +46,7 @@ class WheelEvent;
 struct Vector2;
 struct Vector3;
 struct Vector4;
-struct KeyEvent;
+class KeyEvent;
 
 /**
  * @brief The Stage is a top-level object used for displaying a tree of Actors.
index 502404e..6b6d336 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.\r
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.\r
  *\r
  * Licensed under the Apache License, Version 2.0 (the "License");\r
  * you may not use this file except in compliance with the License.\r
@@ -25,9 +25,51 @@ namespace Dali
 namespace DevelKeyEvent\r
 {\r
 \r
-std::string GetLogicalKey( KeyEvent keyEvent )\r
+KeyEvent New( const std::string& keyName,\r
+              const std::string& logicalKey,\r
+              const std::string& keyString,\r
+              int keyCode,\r
+              int keyModifier,\r
+              unsigned long timeStamp,\r
+              const Dali::KeyEvent::State& keyState,\r
+              const std::string& compose,\r
+              const std::string& deviceName,\r
+              const Device::Class::Type deviceClass,\r
+              const Device::Subclass::Type deviceSubclass )\r
 {\r
-  return GetImplementation( &keyEvent )->GetLogicalKey();\r
+  Internal::KeyEventPtr internal = Internal::KeyEvent::New( keyName, logicalKey, keyString, keyCode, keyModifier, timeStamp, keyState, compose, deviceName, deviceClass, deviceSubclass );\r
+\r
+  return KeyEvent( internal.Get() );\r
+}\r
+\r
+void SetKeyName( KeyEvent keyEvent, const std::string& keyName )\r
+{\r
+  GetImplementation( keyEvent ).SetKeyName( keyName );\r
+}\r
+\r
+void SetKeyString( KeyEvent keyEvent, const std::string& keyString )\r
+{\r
+  GetImplementation( keyEvent ).SetKeyString( keyString );\r
+}\r
+\r
+void SetKeyCode( KeyEvent keyEvent, int32_t keyCode )\r
+{\r
+  GetImplementation( keyEvent ).SetKeyCode( keyCode );\r
+}\r
+\r
+void SetKeyModifier( KeyEvent keyEvent, int32_t keyModifier )\r
+{\r
+  GetImplementation( keyEvent ).SetKeyModifier( keyModifier );\r
+}\r
+\r
+void SetTime( KeyEvent keyEvent, unsigned long time )\r
+{\r
+  GetImplementation( keyEvent ).SetTime( time );\r
+}\r
+\r
+void SetState( KeyEvent keyEvent, const KeyEvent::State& state )\r
+{\r
+  GetImplementation( keyEvent ).SetState( state );\r
 }\r
 \r
 } // namespace DevelKeyEvent\r
index bdf1680..ad8b32e 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_KEY_EVENT_DEVEL_H\r
 \r
 /*\r
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.\r
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.\r
  *\r
  * Licensed under the Apache License, Version 2.0 (the "License");\r
  * you may not use this file except in compliance with the License.\r
@@ -28,15 +28,87 @@ namespace DevelKeyEvent
 {\r
 \r
 /**\r
- * @brief Gets the logical key string.\r
+ * @brief Creates an initialized WheelEvent.\r
  *\r
- * For example, when the user presses 'shift' key and '1' key together, the logical key is "exclamation".\r
- * Plus, the keyPressedName is "1", and the keyPressed is "!".\r
+ * @SINCE_1_9.27\r
+ * @param[in]  keyName         The name of the key pressed or command from the IMF, if later then the some following parameters will be needed.\r
+ * @param[in]  logicalKey      The logical key symbol (eg. shift + 1 == "exclamation")\r
+ * @param[in]  keyString       The string of input characters or key pressed\r
+ * @param[in]  keyCode         The unique key code for the key pressed.\r
+ * @param[in]  keyModifier     The key modifier for special keys like shift and alt\r
+ * @param[in]  timeStamp       The time (in ms) that the key event occurred.\r
+ * @param[in]  keyState        The state of the key event.\r
+ * @param[in]  compose         The key compose\r
+ * @param[in]  deviceName      The name of device the key event originated from\r
+ * @param[in]  deviceClass     The class of device the key event originated from\r
+ * @param[in]  deviceSubclass  The subclass of device the key event originated from\r
+ * @return A handle to a newly allocated Dali resource\r
+ */\r
+DALI_CORE_API KeyEvent New( const std::string& keyName,\r
+                            const std::string& logicalKey,\r
+                            const std::string& keyString,\r
+                            int keyCode,\r
+                            int keyModifier,\r
+                            unsigned long timeStamp,\r
+                            const Dali::KeyEvent::State& keyState,\r
+                            const std::string& compose,\r
+                            const std::string& deviceName,\r
+                            const Device::Class::Type deviceClass,\r
+                            const Device::Subclass::Type deviceSubclass );\r
+\r
+/**\r
+ * @brief Set the name given to the key pressed\r
+ *\r
+ * @SINCE_1_9.27\r
+ * @param[in] keyEvent The instance of KeyEvent.\r
+ * @param[in] keyName The name given to the key pressed.\r
+ */\r
+void SetKeyName( KeyEvent keyEvent, const std::string& keyName );\r
+\r
+/**\r
+ * @brief Set the actual string of input characters that should be used for input editors.\r
+ *\r
+ * @SINCE_1_9.27\r
+ * @param[in] keyEvent The instance of KeyEvent.\r
+ * @param[in] keyString The actual string of input characters\r
+ */\r
+void SetKeyString( KeyEvent keyEvent, const std::string& keyString );\r
+\r
+/**\r
+ * @brief Set the unique key code for the key pressed.\r
+ *\r
+ * @SINCE_1_9.27\r
+ * @param[in] keyEvent The instance of KeyEvent.\r
+ * @param[in] keyCode The unique key code for the key pressed\r
+ */\r
+void SetKeyCode( KeyEvent keyEvent, int32_t keyCode );\r
+\r
+/**\r
+ * @brief Set the key modifier for special keys like Shift, Alt and Ctrl which modify the next key pressed.\r
+ *\r
+ * @SINCE_1_9.27\r
+ * @param[in] keyEvent The instance of KeyEvent.\r
+ * @param[in] keyModifier The key modifier\r
+ */\r
+void SetKeyModifier( KeyEvent keyEvent, int32_t keyModifier );\r
+\r
+/**\r
+ * @brief Set the time (in ms) that the key event occurred.\r
+ *\r
+ * @SINCE_1_9.27\r
+ * @param[in] keyEvent The instance of KeyEvent.\r
+ * @param[in] time The time (in ms)\r
+ */\r
+void SetTime( KeyEvent keyEvent, unsigned long time );\r
+\r
+/**\r
+ * @brief Set the state of the key event.\r
  *\r
+ * @SINCE_1_9.27\r
  * @param[in] keyEvent The instance of KeyEvent.\r
- * @return The logical key symbol\r
+ * @param[in] state The state of the key event\r
  */\r
-DALI_CORE_API std::string GetLogicalKey( KeyEvent keyEvent );\r
+void SetState( KeyEvent keyEvent, const KeyEvent::State& state );\r
 \r
 } // namespace DevelKeyEvent\r
 \r
index f93c67e..5ae82c1 100644 (file)
@@ -15,8 +15,6 @@ SET( devel_api_src_files
   ${devel_api_src_dir}/common/stage.cpp
   ${devel_api_src_dir}/events/hit-test-algorithm.cpp
   ${devel_api_src_dir}/events/long-press-gesture-detector-devel.cpp
-  ${devel_api_src_dir}/events/rotation-gesture.cpp
-  ${devel_api_src_dir}/events/rotation-gesture-detector.cpp
   ${devel_api_src_dir}/events/key-event-devel.cpp
   ${devel_api_src_dir}/events/wheel-event-devel.cpp
   ${devel_api_src_dir}/images/distance-field.cpp
@@ -71,11 +69,8 @@ SET( devel_api_core_common_header_files
 
 
 SET( devel_api_core_events_header_files
-  ${devel_api_src_dir}/events/gesture-devel.h
   ${devel_api_src_dir}/events/hit-test-algorithm.h
   ${devel_api_src_dir}/events/long-press-gesture-detector-devel.h
-  ${devel_api_src_dir}/events/rotation-gesture.h
-  ${devel_api_src_dir}/events/rotation-gesture-detector.h
   ${devel_api_src_dir}/events/key-event-devel.h
   ${devel_api_src_dir}/events/wheel-event-devel.h
 )
index 6a01e45..d062531 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.
@@ -29,46 +29,11 @@ namespace Dali
 namespace DevelHandle
 {
 
-Property::Index GetPropertyIndex( const Handle& handle, Property::Index key )
-{
-  return GetImplementation( handle ).GetPropertyIndex( key );
-}
-
-Property::Index GetPropertyIndex( const Handle& handle, Property::Key key )
-{
-  return GetImplementation( handle ).GetPropertyIndex( key );
-}
-
-Property::Index RegisterProperty( Handle handle, Property::Index key, const std::string& name, const Property::Value& propertyValue )
-{
-  return GetImplementation( handle ).RegisterProperty( name, key, propertyValue );
-}
-
-void SetProperties( Handle handle, const Property::Map& properties )
-{
-  GetImplementation( handle ).SetProperties( properties );
-}
-
-void GetProperties( Handle handle, Property::Map& properties )
-{
-  GetImplementation( handle ).GetProperties( properties );
-}
-
 void SetTypeInfo( Handle& handle, const TypeInfo& typeInfo )
 {
   GetImplementation( handle ).SetTypeInfo( &GetImplementation( typeInfo ) );
 }
 
-bool DoesCustomPropertyExist( Handle& handle, Property::Index index )
-{
-  return GetImplementation( handle ).DoesCustomPropertyExist( index );
-}
-
-PropertySetSignalType& PropertySetSignal( Handle handle )
-{
-  return GetImplementation( handle ).PropertySetSignal();
-}
-
 } // namespace DevelHandle
 
 } // namespace Dali
index df6a4d6..d6b6530 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_HANDLE_DEVEL_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.
@@ -28,95 +28,6 @@ namespace DevelHandle
 {
 
 /**
- * @brief Query the index of a custom property matching the given key.
- *
- * Returns the first custom property that matches the given integer key. This is
- * useful for other classes that know the key but not the name. Requires the property
- * to have been registered with the associated key.
- *
- * @note This key is not the same as the Property enum found in
- * objects such as Actor (which is a preset index).
- *
- * @param[in] handle The handle from where to retrieve the property index.
- * @param[in] key The integer key of the property
- *
- * @return The index of the property, or Property::INVALID_INDEX if no property exists with the given key.
- *
- * @note The key is not the same as the returned index, though it has the same type.
- */
-DALI_CORE_API Property::Index GetPropertyIndex( const Handle& handle, Property::Index key );
-
-/**
- * @brief Query the index of a property using the given key from a Property::Map
- *
- * @param[in] handle The handle from where to retrieve the property index.
- * @param[in] key The key of the property to search for.
- *
- * @return the matching property index of either the string key or the matching
- * custom property index of the index key, or Property::INVALID_INDEX if no
- * property matches the given key.
- *
- * @note See also, GetPropertyIndex(Property::Index) and GetPropertyIndex(const std::string&)
- */
-DALI_CORE_API Property::Index GetPropertyIndex( const Handle& handle, Property::Key key );
-
-/**
- * @brief Register a new animatable property with an integer key.
- *
- * @param[in] handle The handle where to register the property.
- * @param[in] key  The integer key of the property.
- * @param[in] name The text key of the property.
- * @param[in] propertyValue The new value of the property.
- *
- * @return The index of the property or Property::INVALID_INDEX if registration failed
- *
- * @pre The object supports dynamic properties i.e. Supports(Handle::DYNAMIC_PROPERTIES) returns true.
- * Property names and keys are expected to be unique, but this is not enforced.
- * Property indices are unique to each registered custom property in a given object.
- *
- * @note Returns Property::INVALID_INDEX if registration failed. This can happen if you try to register
- * animatable property on an object that does not have scene graph object.
- *
- * @note The returned property index is not the same as the integer key (though it shares a type)
- *
- * This version of RegisterProperty associates both an integer key
- * and the text key with the property, allowing for lookup of the
- * property index by either key or name ( which is useful when other
- * classes know the key but not the name )
- *
- * @note Only the following types can be animated:
- *       - Property::BOOLEAN
- *       - Property::FLOAT
- *       - Property::INTEGER
- *       - Property::VECTOR2
- *       - Property::VECTOR3
- *       - Property::VECTOR4
- *       - Property::MATRIX3
- *       - Property::MATRIX
- *       - Property::ROTATION
- * @note If a property with the desired name already exists, then the value given is just set.
- */
-DALI_CORE_API Property::Index RegisterProperty( Handle handle, Property::Index key, const std::string& name, const Property::Value& propertyValue );
-
-/**
- * @brief Sets all the properties in the given property map.
- *
- * @param[in] handle The handle to set the properties on
- * @param[in] properties The properties to set
- */
-DALI_CORE_API void SetProperties( Handle handle, const Property::Map& properties );
-
-/**
- * @brief Retrieves all the properties and the values for a handle.
- *
- * @param[in] handle The handle to retrieve properties from
- * @param[out] properties A map which is populated with the index-value pairs
- *
- * @note The properties map will be cleared by this method first.
- */
-DALI_CORE_API void GetProperties( Handle handle, Property::Map& properties );
-
-/**
  * @brief Set the type-info that the object is created by.
  *
  * @note This is particularly useful to link C# custom control with its correct type-info in the native side
@@ -126,44 +37,6 @@ DALI_CORE_API void GetProperties( Handle handle, Property::Map& properties );
  */
 DALI_CORE_API void SetTypeInfo( Handle& handle, const TypeInfo& typeInfo );
 
-
-/**
- * @brief Determine if the custom property index exists on this object without throwing a Dali::Exception.
- *
- * @note This does not check default properties.
- * @param[in] handle The handle to check
- * @param[in] index The index of the property to test for
- */
-DALI_CORE_API bool DoesCustomPropertyExist( Handle& handle, Property::Index index );
-
-/**
- * @brief PropertySetSignal function prototype for signal handler. Called when a property is set on this object.
- */
-using PropertySetSignalType = Signal< void( Handle& handle, Property::Index index, Property::Value value ) >;
-
-/**
- * @brief Get a signal when a property is set on this object through the API (i.e. not when animating)
- *
- * @param[in] handle The handle of the object to listen to.
- * @return The signal to attach a connection to.
- */
-DALI_CORE_API PropertySetSignalType& PropertySetSignal( Handle handle );
-
-/**
- * @brief Template to create a derived handle and set properties on it.
- *
- * @tparam T The derived class to create
- *
- * @param[in] properties The properties to set
- */
-template< typename T >
-DALI_INTERNAL T New( const Property::Map& properties )
-{
-  T handle = T::New();
-  SetProperties( handle, properties );
-  return handle;
-}
-
 } // namespace DevelHandle
 
 } // namespace Dali
index db7e1bc..276c6ec 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.
@@ -35,7 +35,7 @@ KeyEvent::KeyEvent()
   keyCode( -1 ),
   keyModifier( 0 ),
   time( 0 ),
-  state( KeyEvent::Down ),
+  state( KeyEvent::DOWN ),
   compose( "" ),
   deviceName( "" ),
   deviceClass( Device::Class::NONE ),
@@ -61,28 +61,6 @@ KeyEvent::KeyEvent( const std::string& keyName, const std::string& logicalKey, c
 {
 }
 
-KeyEvent::KeyEvent( const Dali::KeyEvent& event )
-: Event( Key ),
-  keyName( event.keyPressedName ),
-  logicalKey( "" ),
-  keyString( event.keyPressed ),
-  keyCode( event.keyCode ),
-  keyModifier( event.keyModifier ),
-  time( event.time ),
-  state( static_cast< Integration::KeyEvent::State >( event.state ) ),
-  compose( "" ),
-  deviceName( "" ),
-  deviceClass( Device::Class::NONE ),
-  deviceSubclass( Device::Subclass::NONE )
-{
-  const Internal::KeyEventImpl* keyEventImpl = GetImplementation( &event );
-  logicalKey = keyEventImpl->GetLogicalKey();
-  compose = keyEventImpl->GetCompose();
-  deviceName = keyEventImpl->GetDeviceName();
-  deviceClass = keyEventImpl->GetDeviceClass();
-  deviceSubclass = keyEventImpl->GetDeviceSubclass();
-}
-
 KeyEvent::~KeyEvent()
 {
 }
index 4eadad7..c966eda 100755 (executable)
@@ -2,7 +2,7 @@
 #define DALI_INTEGRATION_KEY_EVENT_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.
@@ -42,10 +42,8 @@ struct DALI_CORE_API KeyEvent : public Event
   // Specifies the state of the key event.
   enum State
   {
-    Down,        /**< Key down */
-    Up,          /**< Key up */
-
-    Last
+    DOWN,        /**< Key down */
+    UP,          /**< Key up */
   };
 
   /**
@@ -55,17 +53,17 @@ struct DALI_CORE_API KeyEvent : public Event
 
   /**
    * Constructor
-   * @param[in]  keyName       The name of the key pressed or command from the IMF, if later then the some following parameters will be needed.
-   * @param[in]  logicalKey    The logical key symbol (eg. shift + 1 == "exclamation")
-   * @param[in]  keyString     A string of input characters or key pressed
-   * @param[in]  keyCode       The unique key code for the key pressed.
-   * @param[in]  keyModifier   The key modifier for special keys like shift and alt
-   * @param[in]  timeStamp     The time (in ms) that the key event occurred.
-   * @param[in]  keyState      The state of the key event.
-   * @param[in]  compose       The key compose
-   * @param[in]  deviceName    Name of device KeyEvent originated from
-   * @param[in]  deviceClass   Class of device KeyEvent originated from
-   * @param[in]  deviceSubclass  Subclass of device KeyEvent originated from
+   * @param[in]  keyName         The name of the key pressed or command from the IMF, if later then the some following parameters will be needed.
+   * @param[in]  logicalKey      The logical key symbol (eg. shift + 1 == "exclamation")
+   * @param[in]  keyString       The string of input characters or key pressed
+   * @param[in]  keyCode         The unique key code for the key pressed.
+   * @param[in]  keyModifier     The key modifier for special keys like shift and alt
+   * @param[in]  timeStamp       The time (in ms) that the key event occurred.
+   * @param[in]  keyState        The state of the key event.
+   * @param[in]  compose         The key compose
+   * @param[in]  deviceName      The name of device KeyEvent originated from
+   * @param[in]  deviceClass     The class of device KeyEvent originated from
+   * @param[in]  deviceSubclass  The subclass of device KeyEvent originated from
    */
   KeyEvent(const std::string& keyName,
            const std::string& logicalKey,
@@ -80,12 +78,6 @@ struct DALI_CORE_API KeyEvent : public Event
            const Device::Subclass::Type deviceSubclass );
 
   /**
-   * Constructor, creates a Integration::KeyEvent from a Dali::KeyEvent
-   * @param[in] event Dali::KeyEvent to convert from
-   */
-  explicit KeyEvent( const Dali::KeyEvent& event );
-
-  /**
    * Virtual destructor
    */
   virtual ~KeyEvent();
@@ -93,7 +85,7 @@ struct DALI_CORE_API KeyEvent : public Event
   // Data
 
   /**
-   *@copydoc Dali::KeyEvent::keyPressedName
+   * The name of the key pressed or command from the IMF
    */
   std::string keyName;
 
@@ -103,22 +95,22 @@ struct DALI_CORE_API KeyEvent : public Event
   std::string logicalKey;
 
   /**
-   *@copydoc Dali::KeyEvent::keyPressed
+   * The string of input characters or key pressed
    */
   std::string keyString;
 
   /**
-   * @copydoc Dali::KeyEvent::keyCode
+   * The unique key code for the key pressed.
    */
   int  keyCode;
 
   /**
-   *@copydoc Dali::KeyEvent::keyModifier
+   * The key modifier for special keys like shift and alt
    */
   int  keyModifier;
 
   /**
-   *@copydoc Dali::KeyEvent::time
+   * The time (in ms) that the key event occurred.
    */
   unsigned long time;
 
@@ -129,22 +121,22 @@ struct DALI_CORE_API KeyEvent : public Event
   State state;
 
   /**
-   * A string if this keystroke has modified a string in the middle of being composed - this string replaces the previous one.
+   * If this keystroke has modified a string in the middle of being composed - this string replaces the previous one.
    */
   std::string compose;
 
   /**
-   * Name of device KeyEvent originated from
+   * The name of device KeyEvent originated from
    */
   std::string deviceName;
 
   /**
-   * Class of device KeyEvent originated from
+   * The class of device KeyEvent originated from
    */
   Device::Class::Type deviceClass;
 
   /**
-   * Subclass of device KeyEvent originated from
+   * The subclass of device KeyEvent originated from
    */
   Device::Subclass::Type deviceSubclass;
 };
index 86c7f5e..03458cd 100644 (file)
@@ -42,7 +42,7 @@
 #include <dali/internal/update/rendering/scene-graph-renderer.h>
 
 #include <dali/internal/render/renderers/render-geometry.h>
-#include <dali/internal/render/renderers/render-property-buffer.h>
+#include <dali/internal/render/renderers/render-vertex-buffer.h>
 #include <dali/internal/render/renderers/render-renderer.h>
 #include <dali/internal/render/renderers/render-sampler.h>
 #include <dali/internal/update/render-tasks/scene-graph-camera.h>
@@ -103,8 +103,8 @@ const std::size_t GEOMETRY_MEMORY_SIZE(
   sizeof( Internal::Geometry ) +
   sizeof( Internal::Render::Geometry) );
 const std::size_t PROPERTY_BUFFER_MEMORY_SIZE(
-  sizeof( Internal::PropertyBuffer ) +
-  sizeof( Internal::Render::PropertyBuffer ) );
+  sizeof( Internal::VertexBuffer ) +
+  sizeof( Internal::Render::VertexBuffer ) );
 const std::size_t TEXTURE_SET_MEMORY_SIZE(
   sizeof( Internal::TextureSet ) +
   sizeof( Internal::SceneGraph::TextureSet ) );
index c335154..b69eb10 100755 (executable)
@@ -31,7 +31,7 @@ namespace Dali
 {
 
 class Actor;
-struct KeyEvent;
+class KeyEvent;
 class Layer;
 class RenderTaskList;
 class TouchEvent;
old mode 100755 (executable)
new mode 100644 (file)
index 30cdbd8..91f19d9
@@ -1817,7 +1817,7 @@ ActorGestureData& Actor::GetGestureData()
   return *mGestureData;
 }
 
-bool Actor::IsGestureRequred( DevelGesture::Type type ) const
+bool Actor::IsGestureRequred( Gesture::Type type ) const
 {
   return mGestureData && mGestureData->IsGestureRequred( type );
 }
index b98408f..4b65bb6 100644 (file)
@@ -30,7 +30,6 @@
 #include <dali/public-api/math/viewport.h>
 #include <dali/public-api/object/ref-object.h>
 #include <dali/public-api/size-negotiation/relayout-container.h>
-#include <dali/devel-api/events/gesture-devel.h>
 #include <dali/internal/common/memory-pool-object-allocator.h>
 #include <dali/internal/event/actors/actor-declarations.h>
 #include <dali/internal/event/common/object-impl.h>
@@ -42,7 +41,7 @@
 namespace Dali
 {
 
-struct KeyEvent;
+class KeyEvent;
 class TouchData;
 class TouchEvent;
 class WheelEvent;
@@ -1400,7 +1399,7 @@ public:
    * @param[in] type The gesture type.
    * @return True if the gesture is required, false otherwise.
    */
-  bool IsGestureRequred( DevelGesture::Type type ) const;
+  bool IsGestureRequred( Gesture::Type type ) const;
 
   // Signals
 
index e82da5e..279874b 100644 (file)
@@ -77,9 +77,9 @@ TypeAction action1( mType, ACTION_PLAY,  &Animation::DoAction );
 TypeAction action2( mType, ACTION_STOP,  &Animation::DoAction );
 TypeAction action3( mType, ACTION_PAUSE, &Animation::DoAction );
 
-const Dali::Animation::EndAction DEFAULT_END_ACTION( Dali::Animation::Bake );
-const Dali::Animation::EndAction DEFAULT_DISCONNECT_ACTION( Dali::Animation::BakeFinal );
-const Dali::Animation::Interpolation DEFAULT_INTERPOLATION( Dali::Animation::Linear );
+const Dali::Animation::EndAction DEFAULT_END_ACTION( Dali::Animation::BAKE );
+const Dali::Animation::EndAction DEFAULT_DISCONNECT_ACTION( Dali::Animation::BAKE_FINAL );
+const Dali::Animation::Interpolation DEFAULT_INTERPOLATION( Dali::Animation::LINEAR );
 const Dali::AlphaFunction DEFAULT_ALPHA_FUNCTION( Dali::AlphaFunction::DEFAULT );
 
 /**
@@ -389,7 +389,7 @@ void Animation::Stop()
   StopAnimationMessage( mEventThreadServices.GetUpdateManager(), *mAnimation );
 
   // Only notify the objects with the _stopped_, i.e. current values if the end action is set to BAKE
-  if( mEndAction == EndAction::Bake )
+  if( mEndAction == EndAction::BAKE )
   {
     NotifyObjects( Notify::USE_CURRENT_VALUE );
   }
@@ -400,7 +400,7 @@ void Animation::Clear()
   DALI_ASSERT_DEBUG(mAnimation);
 
   // Only notify the objects with the current values if the end action is set to BAKE
-  if( mEndAction == EndAction::Bake )
+  if( mEndAction == EndAction::BAKE )
   {
     NotifyObjects( Notify::USE_CURRENT_VALUE );
   }
@@ -1091,7 +1091,7 @@ bool Animation::CompareConnectorEndTimes( const Animation::ConnectorTargetValues
 void Animation::NotifyObjects( Animation::Notify notifyValueType )
 {
   // If the animation is discarded, then we do not want to change the target values unless we want to force the current values
-  if( mEndAction != EndAction::Discard || notifyValueType == Notify::FORCE_CURRENT_VALUE )
+  if( mEndAction != EndAction::DISCARD || notifyValueType == Notify::FORCE_CURRENT_VALUE )
   {
     // Sort according to end time with earlier end times coming first, if the end time is the same, then the connectors are not moved
     // Only do this if we're using the target value
index 8cc482c..378f6a4 100644 (file)
@@ -155,7 +155,7 @@ V KeyFrameChannel<V>::GetValue (float progress, Dali::Animation::Interpolation i
   {
     float frameProgress = (progress - start->GetProgress()) / (end->GetProgress() - start->GetProgress());
 
-    if( interpolation == Dali::Animation::Linear )
+    if( interpolation == Dali::Animation::LINEAR )
     {
       Interpolate(interpolatedV, start->GetValue(), end->GetValue(), frameProgress);
     }
index bf521bb..e65d1f3 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.
@@ -136,55 +136,31 @@ std::string Object::GetPropertyName( Property::Index index ) const
   return std::string();
 }
 
-Property::Index Object::GetPropertyIndex( const std::string& name ) const
+Property::Index Object::GetPropertyIndex( Property::Key key ) const
 {
   Property::Index index = Property::INVALID_INDEX;
 
-  const TypeInfo* typeInfo( GetTypeInfo() );
-  if ( typeInfo )
-  {
-    index = typeInfo->GetPropertyIndex( name );
-  }
-  if( (index == Property::INVALID_INDEX)&&( mCustomProperties.Count() > 0 ) )
+  if( key.type == Property::Key::STRING )
   {
-    Property::Index count = PROPERTY_CUSTOM_START_INDEX;
-    const auto end = mCustomProperties.End();
-    for( auto iter = mCustomProperties.Begin(); iter != end; ++iter, ++count )
+    const TypeInfo* typeInfo( GetTypeInfo() );
+    if ( typeInfo )
     {
-      CustomPropertyMetadata* custom = static_cast<CustomPropertyMetadata*>(*iter);
-      if ( custom->name == name )
-      {
-        if ( custom->childPropertyIndex != Property::INVALID_INDEX )
-        {
-          // If it is a child property, return the child property index
-          index = custom->childPropertyIndex;
-        }
-        else
-        {
-          index = count;
-        }
-        break;
-      }
+      index = typeInfo->GetPropertyIndex( key.stringKey );
     }
   }
 
-  return index;
-}
-
-Property::Index Object::GetPropertyIndex( Property::Index key ) const
-{
-  Property::Index index = Property::INVALID_INDEX;
-
-  if( mCustomProperties.Count() > 0 )
+  if( (index == Property::INVALID_INDEX)&&( mCustomProperties.Count() > 0 ) )
   {
     Property::Index count = PROPERTY_CUSTOM_START_INDEX;
     const auto end = mCustomProperties.End();
     for( auto iter = mCustomProperties.Begin(); iter != end; ++iter, ++count )
     {
       CustomPropertyMetadata* custom = static_cast<CustomPropertyMetadata*>(*iter);
-      if( custom->key == key )
+
+      if( ( key.type == Property::Key::STRING && custom->name == key.stringKey) ||
+          ( key.type == Property::Key::INDEX && custom->key == key.indexKey ) )
       {
-        if( custom->childPropertyIndex != Property::INVALID_INDEX )
+        if ( custom->childPropertyIndex != Property::INVALID_INDEX )
         {
           // If it is a child property, return the child property index
           index = custom->childPropertyIndex;
@@ -201,20 +177,6 @@ Property::Index Object::GetPropertyIndex( Property::Index key ) const
   return index;
 }
 
-Property::Index Object::GetPropertyIndex( Property::Key key ) const
-{
-  Property::Index index = Property::INVALID_INDEX;
-  if( key.type == Property::Key::INDEX )
-  {
-    index = GetPropertyIndex( key.indexKey );
-  }
-  else
-  {
-    index = GetPropertyIndex( key.stringKey );
-  }
-  return index;
-}
-
 bool Object::IsPropertyWritable( Property::Index index ) const
 {
   DALI_ASSERT_ALWAYS(index > Property::INVALID_INDEX && "Property index is out of bounds");
@@ -453,7 +415,7 @@ Property::Value Object::GetProperty( Property::Index index ) const
   else if ( ( index >= ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX ) && ( index <= ANIMATABLE_PROPERTY_REGISTRATION_MAX_INDEX ) )
   {
     // check whether the animatable property is registered already, if not then register one.
-         // this is needed because property value may have been set as full property and get as a property component
+    // this is needed because property value may have been set as full property and get as a property component
     AnimatablePropertyMetadata* animatableProperty = GetSceneAnimatableProperty( index, nullptr );
     if( animatableProperty )
     {
@@ -507,7 +469,7 @@ Property::Value Object::GetCurrentProperty( Property::Index index ) const
   else if ( ( index >= ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX ) && ( index <= ANIMATABLE_PROPERTY_REGISTRATION_MAX_INDEX ) )
   {
     // check whether the animatable property is registered already, if not then register one.
-         // this is needed because property value may have been set as full property and get as a property component
+    // this is needed because property value may have been set as full property and get as a property component
     AnimatablePropertyMetadata* animatableProperty = GetSceneAnimatableProperty( index, nullptr );
     if( animatableProperty )
     {
@@ -590,7 +552,7 @@ void Object::SetProperties( const Property::Map& properties )
     // Iterating twice to get the value we want should still be fairly quick in a Property::Map.
 
     const auto& key = properties.GetKeyAt( position );
-    const auto propertyIndex = ( key.type == Property::Key::INDEX ) ? key.indexKey : GetPropertyIndex( key.stringKey );
+    const auto propertyIndex = ( key.type == Property::Key::INDEX ) ? key.indexKey : GetPropertyIndex( key );
 
     if( propertyIndex != Property::INVALID_INDEX )
     {
@@ -974,7 +936,7 @@ int32_t Object::GetPropertyComponentIndex( Property::Index index ) const
   return componentIndex;
 }
 
-DevelHandle::PropertySetSignalType& Object::PropertySetSignal()
+Handle::PropertySetSignalType& Object::PropertySetSignal()
 {
   return mPropertySetSignal;
 }
index c9c1c00..8bdc264 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_OBJECT_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.
@@ -150,16 +150,6 @@ public:
   /**
    * @copydoc Dali::Handle::GetPropertyIndex()
    */
-  Property::Index GetPropertyIndex( const std::string& name ) const;
-
-  /**
-   * @copydoc Dali::Handle::GetPropertyIndex()
-   */
-  Property::Index GetPropertyIndex( Property::Index key ) const;
-
-  /**
-   * @copydoc Dali::Handle::GetPropertyIndex()
-   */
   Property::Index GetPropertyIndex( Property::Key key ) const;
 
   /**
@@ -361,7 +351,7 @@ public:
   /**
    * @copydoc Dali::Handle::PropertySetSignal()
    */
-  DevelHandle::PropertySetSignalType& PropertySetSignal();
+  Handle::PropertySetSignalType& PropertySetSignal();
 
 protected:
 
@@ -571,8 +561,8 @@ private:
 
   using PropertyNotificationContainer = std::vector< Dali::PropertyNotification >;
   PropertyNotificationContainer* mPropertyNotifications; ///< Container of owned property notifications.
-  DevelHandle::PropertySetSignalType mPropertySetSignal;
 
+  Handle::PropertySetSignalType mPropertySetSignal;
 };
 
 } // namespace Internal
index 09486d8..4b44566 100644 (file)
@@ -291,7 +291,7 @@ SceneGraph::Scene* Scene::GetSceneObject() const
   return mSceneObject;
 }
 
-void Scene::EmitKeyEventSignal(const KeyEvent& event)
+void Scene::EmitKeyEventSignal(const Dali::KeyEvent& event)
 {
   if ( !mKeyEventSignal.Empty() )
   {
@@ -300,9 +300,10 @@ void Scene::EmitKeyEventSignal(const KeyEvent& event)
   }
 }
 
-bool Scene::EmitKeyEventGeneratedSignal(const KeyEvent& event)
+bool Scene::EmitKeyEventGeneratedSignal(const Dali::KeyEvent& event)
 {
   // Emit the KeyEventGenerated signal when KeyEvent is generated
+  Dali::Integration::Scene handle( this );
   return mKeyEventGeneratedSignal.Emit( event );
 }
 
index 9db7d02..a271761 100644 (file)
@@ -187,14 +187,14 @@ public:
    * Used by the EventProcessor to emit key event signals.
    * @param[in] event The key event.
    */
-  void EmitKeyEventSignal(const KeyEvent& event);
+  void EmitKeyEventSignal(const Dali::KeyEvent& event);
 
   /**
    * Used by the KeyEventProcessor to emit KeyEventGenerated signals.
    * @param[in] event The key event.
    * @return The return is true if KeyEvent is consumed, otherwise false.
    */
-  bool EmitKeyEventGeneratedSignal(const KeyEvent& event);
+  bool EmitKeyEventGeneratedSignal(const Dali::KeyEvent& event);
 
   /**
    * Emits the event processing finished signal.
index 99c3337..ca86f6e 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.
@@ -99,26 +99,34 @@ std::string TypeRegistry::GetTypeName( uint32_t index ) const
   return name;
 }
 
-std::string TypeRegistry::Register( const std::type_info& theTypeInfo, const std::type_info& baseTypeInfo,
-                             Dali::TypeInfo::CreateFunction createInstance, bool callCreateOnInit )
+std::string TypeRegistry::Register( const std::type_info& theTypeInfo,
+                                    const std::type_info& baseTypeInfo,
+                                    Dali::TypeInfo::CreateFunction createInstance,
+                                    bool callCreateOnInit )
 {
   std::string uniqueTypeName  = DemangleClassName( theTypeInfo.name() );
 
   return Register( uniqueTypeName, baseTypeInfo, createInstance, callCreateOnInit );
 }
 
-std::string TypeRegistry::Register( const std::type_info& theTypeInfo, const std::type_info& baseTypeInfo,
-                             Dali::TypeInfo::CreateFunction createInstance, bool callCreateOnInit,
-                             const Dali::PropertyDetails* defaultProperties, Property::Index defaultPropertyCount )
+std::string TypeRegistry::Register( const std::type_info& theTypeInfo,
+                                    const std::type_info& baseTypeInfo,
+                                    Dali::TypeInfo::CreateFunction createInstance,
+                                    bool callCreateOnInit,
+                                    const Dali::PropertyDetails* defaultProperties,
+                                    Property::Index defaultPropertyCount )
 {
   std::string uniqueTypeName  = DemangleClassName( theTypeInfo.name() );
 
   return Register( uniqueTypeName, baseTypeInfo, createInstance, callCreateOnInit, defaultProperties, defaultPropertyCount );
 }
 
-std::string TypeRegistry::Register( const std::string& uniqueTypeName, const std::type_info& baseTypeInfo,
-                             Dali::TypeInfo::CreateFunction createInstance, bool callCreateOnInit,
-                             const Dali::PropertyDetails* defaultProperties, Property::Index defaultPropertyCount )
+std::string TypeRegistry::Register( const std::string& uniqueTypeName,
+                                    const std::type_info& baseTypeInfo,
+                                    Dali::TypeInfo::CreateFunction createInstance,
+                                    bool callCreateOnInit,
+                                    const Dali::PropertyDetails* defaultProperties,
+                                    Property::Index defaultPropertyCount )
 {
   std::string baseTypeName = DemangleClassName( baseTypeInfo.name() );
 
@@ -133,7 +141,8 @@ std::string TypeRegistry::Register( const std::string& uniqueTypeName, const std
     }
   }
 
-  mRegistryLut.push_back( TypeRegistry::TypeInfoPointer( new Internal::TypeInfo( uniqueTypeName, baseTypeName, createInstance, defaultProperties, defaultPropertyCount ) ) );
+  mRegistryLut.push_back( TypeRegistry::TypeInfoPointer(
+                            new Internal::TypeInfo( uniqueTypeName, baseTypeName, createInstance, defaultProperties, defaultPropertyCount ) ) );
   DALI_LOG_INFO( gLogFilter, Debug::Concise, "Type Registration %s(%s)\n", uniqueTypeName.c_str(), baseTypeName.c_str() );
 
   if( callCreateOnInit )
index a6efbf0..1967bac 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,7 @@ namespace Internal
 {
 
 ActorGestureData::ActorGestureData()
-: gesturesRequired( DevelGesture::Type( 0 ) ),
+: gesturesRequired( Gesture::Type( 0 ) ),
   panDetectors( nullptr ),
   pinchDetectors( nullptr ),
   longPressDetectors( nullptr ),
@@ -45,7 +45,7 @@ ActorGestureData::~ActorGestureData()
 
 void ActorGestureData::AddGestureDetector( GestureDetector& detector )
 {
-  const DevelGesture::Type type( detector.GetType() );
+  const Gesture::Type type( detector.GetType() );
 
   GestureDetectorContainer*& containerPtr( GetContainerPtr( type ) );
   if ( NULL == containerPtr )
@@ -54,12 +54,12 @@ void ActorGestureData::AddGestureDetector( GestureDetector& detector )
   }
   containerPtr->push_back( &detector );
 
-  gesturesRequired = DevelGesture::Type( gesturesRequired | type );
+  gesturesRequired = Gesture::Type( gesturesRequired | type );
 }
 
 void ActorGestureData::RemoveGestureDetector( GestureDetector& detector )
 {
-  const DevelGesture::Type type( detector.GetType() );
+  const Gesture::Type type( detector.GetType() );
 
   GestureDetectorContainer*& containerPtr( GetContainerPtr( type ) );
   DALI_ASSERT_DEBUG( containerPtr && "Container had not been created" );
@@ -71,42 +71,42 @@ void ActorGestureData::RemoveGestureDetector( GestureDetector& detector )
 
   if ( container.empty() )
   {
-    gesturesRequired = DevelGesture::Type( gesturesRequired & ~type );
+    gesturesRequired = Gesture::Type( gesturesRequired & ~type );
     delete containerPtr;
     containerPtr = NULL;
   }
 }
 
-GestureDetectorContainer& ActorGestureData::GetGestureDetectorContainer( DevelGesture::Type type )
+GestureDetectorContainer& ActorGestureData::GetGestureDetectorContainer( Gesture::Type type )
 {
   return *GetContainerPtr( type );
 }
 
-GestureDetectorContainer*& ActorGestureData::GetContainerPtr( DevelGesture::Type type )
+GestureDetectorContainer*& ActorGestureData::GetContainerPtr( Gesture::Type type )
 {
   switch ( type )
   {
-    case DevelGesture::Pan:
+    case Gesture::Pan:
     {
       return panDetectors;
     }
 
-    case DevelGesture::Pinch:
+    case Gesture::Pinch:
     {
       return pinchDetectors;
     }
 
-    case DevelGesture::LongPress:
+    case Gesture::LongPress:
     {
       return longPressDetectors;
     }
 
-    case DevelGesture::Tap:
+    case Gesture::Tap:
     {
       return tapDetectors;
     }
 
-    case DevelGesture::Rotation:
+    case Gesture::Rotation:
     {
       return rotationDetectors;
     }
index 8412e54..55cfb99 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_ACTOR_GESTURE_DATA_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,6 @@
  */
 
 // INTERNAL INCLUDES
-#include <dali/devel-api/events/gesture-devel.h>
 #include <dali/internal/event/events/gesture-detector-impl.h>
 
 namespace Dali
@@ -67,7 +66,7 @@ public:
    * @param[in] type The gesture type.
    * @return true if the gesture is required, false otherwise.
    */
-  inline bool IsGestureRequred( DevelGesture::Type type ) const
+  inline bool IsGestureRequred( Gesture::Type type ) const
   {
     return type & gesturesRequired;
   }
@@ -77,7 +76,7 @@ public:
    * @param[in] type The container type required
    * @pre Ensure IsGestureRequired() is used to check if the container is actually available.
    */
-  GestureDetectorContainer& GetGestureDetectorContainer( DevelGesture::Type type );
+  GestureDetectorContainer& GetGestureDetectorContainer( Gesture::Type type );
 
 private:
 
@@ -85,11 +84,11 @@ private:
    * Helper to retrieve the appropriate container type.
    * @param[in] type The container type required.
    */
-  inline GestureDetectorContainer*& GetContainerPtr( DevelGesture::Type type );
+  inline GestureDetectorContainer*& GetContainerPtr( Gesture::Type type );
 
 private:
 
-  DevelGesture::Type gesturesRequired; ///< Stores which gestures are required
+  Gesture::Type gesturesRequired; ///< Stores which gestures are required
 
   GestureDetectorContainer* panDetectors;       ///< Pointer to a container of pan-detectors
   GestureDetectorContainer* pinchDetectors;     ///< Pointer to a container of pinch-detectors
index c75d497..8d84221 100644 (file)
@@ -34,18 +34,13 @@ namespace Dali
 namespace Internal
 {
 
-GestureDetector::GestureDetector( DevelGesture::Type type, const SceneGraph::PropertyOwner* sceneObject )
+GestureDetector::GestureDetector( Gesture::Type type, const SceneGraph::PropertyOwner* sceneObject )
 : Object( sceneObject ),
   mType( type ),
   mGestureEventProcessor( ThreadLocalStorage::Get().GetGestureEventProcessor() )
 {
 }
 
-GestureDetector::GestureDetector( Gesture::Type type, const SceneGraph::PropertyOwner* sceneObject )
-: GestureDetector( static_cast< DevelGesture::Type >( type ), sceneObject )
-{
-}
-
 GestureDetector::~GestureDetector()
 {
   if ( !mPendingAttachActors.empty() )
index 7cb0ffe..ba8e71f 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_GESTURE_DETECTOR_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.
@@ -98,7 +98,7 @@ public:
    * Retrieves the type of GestureDetector
    * @return The GestureDetector Type
    */
-  DevelGesture::Type GetType() const
+  Gesture::Type GetType() const
   {
     return mType;
   }
@@ -118,11 +118,6 @@ protected: // Creation & Destruction
    * @param pointer to the scene object, nullptr if none
    * by default GestureDetectors don't have our own scene object
    */
-  GestureDetector( DevelGesture::Type type, const SceneGraph::PropertyOwner* sceneObject  = nullptr );
-
-  /**
-   * @copydoc GestureDetector( DevelGesture::Type, const SceneGraph::PropertyOwner* )
-   */
   GestureDetector( Gesture::Type type, const SceneGraph::PropertyOwner* sceneObject  = nullptr );
 
   /**
@@ -174,7 +169,7 @@ private:
 
 protected:
 
-  DevelGesture::Type            mType;                  ///< The gesture detector will detect this type of gesture.
+  Gesture::Type                 mType;                  ///< The gesture detector will detect this type of gesture.
   GestureDetectorActorContainer mAttachedActors;        ///< Object::Observer is used to provide weak-pointer behaviour
   GestureDetectorActorContainer mPendingAttachActors;   ///< Object::Observer is used to provide weak-pointer behaviour
   GestureEventProcessor&        mGestureEventProcessor; ///< A reference to the gesture event processor.
index 63617b6..e6eb904 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.
@@ -65,35 +65,35 @@ void GestureEventProcessor::AddGestureDetector(GestureDetector* gestureDetector,
 {
   switch (gestureDetector->GetType())
   {
-    case DevelGesture::LongPress:
+    case Gesture::LongPress:
     {
       LongPressGestureDetector* longPress = static_cast<LongPressGestureDetector*>(gestureDetector);
       mLongPressGestureProcessor.AddGestureDetector(longPress, scene);
       break;
     }
 
-    case DevelGesture::Pan:
+    case Gesture::Pan:
     {
       PanGestureDetector* pan = static_cast<PanGestureDetector*>(gestureDetector);
       mPanGestureProcessor.AddGestureDetector(pan, scene, envOptionMinimumPanDistance, envOptionMinimumPanEvents);
       break;
     }
 
-    case DevelGesture::Pinch:
+    case Gesture::Pinch:
     {
       PinchGestureDetector* pinch = static_cast<PinchGestureDetector*>(gestureDetector);
       mPinchGestureProcessor.AddGestureDetector(pinch, scene);
       break;
     }
 
-    case DevelGesture::Tap:
+    case Gesture::Tap:
     {
       TapGestureDetector* tap = static_cast<TapGestureDetector*>(gestureDetector);
       mTapGestureProcessor.AddGestureDetector(tap, scene);
       break;
     }
 
-    case DevelGesture::Rotation:
+    case Gesture::Rotation:
     {
       RotationGestureDetector* rotation = static_cast<RotationGestureDetector*>(gestureDetector);
       mRotationGestureProcessor.AddGestureDetector(rotation, scene);
@@ -106,35 +106,35 @@ void GestureEventProcessor::RemoveGestureDetector(GestureDetector* gestureDetect
 {
   switch (gestureDetector->GetType())
   {
-    case DevelGesture::LongPress:
+    case Gesture::LongPress:
     {
       LongPressGestureDetector* longPress = static_cast<LongPressGestureDetector*>(gestureDetector);
       mLongPressGestureProcessor.RemoveGestureDetector(longPress);
       break;
     }
 
-    case DevelGesture::Pan:
+    case Gesture::Pan:
     {
       PanGestureDetector* pan = static_cast<PanGestureDetector*>(gestureDetector);
       mPanGestureProcessor.RemoveGestureDetector(pan);
       break;
     }
 
-    case DevelGesture::Pinch:
+    case Gesture::Pinch:
     {
       PinchGestureDetector* pinch = static_cast<PinchGestureDetector*>(gestureDetector);
       mPinchGestureProcessor.RemoveGestureDetector(pinch);
       break;
     }
 
-    case DevelGesture::Tap:
+    case Gesture::Tap:
     {
       TapGestureDetector* tap = static_cast<TapGestureDetector*>(gestureDetector);
       mTapGestureProcessor.RemoveGestureDetector(tap);
       break;
     }
 
-    case DevelGesture::Rotation:
+    case Gesture::Rotation:
     {
       RotationGestureDetector* rotation = static_cast<RotationGestureDetector*>(gestureDetector);
       mRotationGestureProcessor.RemoveGestureDetector(rotation);
@@ -147,35 +147,35 @@ void GestureEventProcessor::GestureDetectorUpdated(GestureDetector* gestureDetec
 {
   switch (gestureDetector->GetType())
   {
-    case DevelGesture::LongPress:
+    case Gesture::LongPress:
     {
       LongPressGestureDetector* longPress = static_cast<LongPressGestureDetector*>(gestureDetector);
       mLongPressGestureProcessor.GestureDetectorUpdated(longPress);
       break;
     }
 
-    case DevelGesture::Pan:
+    case Gesture::Pan:
     {
       PanGestureDetector* pan = static_cast<PanGestureDetector*>(gestureDetector);
       mPanGestureProcessor.GestureDetectorUpdated(pan);
       break;
     }
 
-    case DevelGesture::Pinch:
+    case Gesture::Pinch:
     {
       PinchGestureDetector* pinch = static_cast<PinchGestureDetector*>(gestureDetector);
       mPinchGestureProcessor.GestureDetectorUpdated(pinch);
       break;
     }
 
-    case DevelGesture::Tap:
+    case Gesture::Tap:
     {
       TapGestureDetector* tap = static_cast<TapGestureDetector*>(gestureDetector);
       mTapGestureProcessor.GestureDetectorUpdated(tap);
       break;
     }
 
-    case DevelGesture::Rotation:
+    case Gesture::Rotation:
     {
       // Nothing to do
       break;
@@ -185,28 +185,10 @@ void GestureEventProcessor::GestureDetectorUpdated(GestureDetector* gestureDetec
 
 void GestureEventProcessor::SetGestureProperties( const Gesture& gesture )
 {
-  bool requestUpdate = false;
+  DALI_ASSERT_DEBUG( gesture.type == Gesture::Pan && "Only PanGesture has a scene object\n" );
 
-  switch ( static_cast< DevelGesture::Type >( gesture.type ) )
-  {
-    case DevelGesture::Pan:
-    {
-      const PanGesture& pan = static_cast< const PanGesture& >( gesture );
-      requestUpdate = mPanGestureProcessor.SetPanGestureProperties( pan );
-      break;
-    }
-
-    case DevelGesture::LongPress:
-    case DevelGesture::Pinch:
-    case DevelGesture::Tap:
-    case DevelGesture::Rotation:
-    {
-      DALI_ASSERT_DEBUG( false && "Gesture type does not have scene object\n" );
-      break;
-    }
-  }
-
-  if( requestUpdate )
+  const PanGesture& pan = static_cast< const PanGesture& >( gesture );
+  if( mPanGestureProcessor.SetPanGestureProperties( pan ) )
   {
     // We may not be updating so we need to ask the render controller for an update.
     mRenderController.RequestUpdate( false );
index f42e514..571c28d 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.
@@ -28,17 +28,12 @@ GestureEvent::~GestureEvent()
 {
 }
 
-GestureEvent::GestureEvent( DevelGesture::Type gesture, Gesture::State gestureState )
+GestureEvent::GestureEvent( Gesture::Type gesture, Gesture::State gestureState )
 : gestureType( gesture ),
   state( gestureState ),
   time( 0 )
 {
 }
-
-GestureEvent::GestureEvent(Gesture::Type gesture, Gesture::State gestureState)
-: GestureEvent( static_cast< DevelGesture::Type >( gesture ), gestureState )
-{
-}
 } // namespace Internal
 
 } // namespace Dali
index cb4dd77..952fbad 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_EVENT_GESTURE_EVENT_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 @@
 
 // INTERNAL INCLUDES
 #include <dali/public-api/events/gesture.h>
-#include <dali/devel-api/events/gesture-devel.h>
 #include <dali/integration-api/events/event.h>
 
 namespace Dali
@@ -47,7 +46,7 @@ struct GestureEvent
   /**
    * Gesture Type.
    */
-  DevelGesture::Type gestureType;
+  Gesture::Type gestureType;
 
   /**
    * The state of the gesture.
@@ -66,12 +65,7 @@ protected:  // Constructors only to be used by derived structures.
    * @param[in] gesture       The type of gesture event.
    * @param[in] gestureState  The state of the gesture event.
    */
-  GestureEvent( DevelGesture::Type gesture, Gesture::State gestureState);
-
-  /**
-   * @copydoc GestureEvent( DevelGesture::Type, Gesture::State )
-   */
-  GestureEvent( Gesture::Type gesture, Gesture::State gestureState );
+  GestureEvent( Gesture::Type gesture, Gesture::State gestureState);
 };
 
 } // namespace Internal
index c294c54..f18671b 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.
@@ -41,13 +41,8 @@ namespace
  */
 struct GestureHitTestCheck : public HitTestAlgorithm::HitTestInterface
 {
-  GestureHitTestCheck( DevelGesture::Type type )
-  : mType( type )
-  {
-  }
-
   GestureHitTestCheck( Gesture::Type type )
-  : GestureHitTestCheck( static_cast< DevelGesture::Type >( type ) )
+  : mType( type )
   {
   }
 
@@ -68,13 +63,13 @@ struct GestureHitTestCheck : public HitTestAlgorithm::HitTestInterface
     return layer->IsTouchConsumed();
   }
 
-  DevelGesture::Type mType;
+  Gesture::Type mType;
 };
 
 } // unnamed namespace
 
 
-GestureProcessor::GestureProcessor( DevelGesture::Type type )
+GestureProcessor::GestureProcessor( Gesture::Type type )
 : mGestureRecognizer(),
   mNeedsUpdate( false ),
   mType( type ),
@@ -83,12 +78,6 @@ GestureProcessor::GestureProcessor( DevelGesture::Type type )
 {
 }
 
-GestureProcessor::GestureProcessor( Gesture::Type type )
-: GestureProcessor( static_cast< DevelGesture::Type >( type ) )
-{
-}
-
-
 GestureProcessor::~GestureProcessor()
 {
   ResetActor();
index ed430df..47e5dab 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_GESTURE_PROCESSOR_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,6 @@
  */
 
 // INTERNAL INCLUDES
-#include <dali/devel-api/events/gesture-devel.h>
 #include <dali/internal/event/events/gesture-detector-impl.h>
 #include <dali/internal/event/events/hit-test-algorithm-impl.h>
 #include <dali/internal/event/events/gesture-recognizer.h>
@@ -65,11 +64,6 @@ protected:
   /**
    * Protected constructor.  Cannot create an instance of GestureProcessor
    */
-  GestureProcessor( DevelGesture::Type type );
-
-  /**
-   * Protected constructor.  Cannot create an instance of GestureProcessor
-   */
   GestureProcessor( Gesture::Type type );
 
   /**
@@ -196,7 +190,7 @@ protected:  //Data
 
 private: // Data
 
-  DevelGesture::Type mType;            ///< Type of GestureProcessor
+  Gesture::Type mType;                 ///< Type of GestureProcessor
   Actor* mCurrentGesturedActor;        ///< The current actor that has been gestured.
   bool   mGesturedActorDisconnected:1; ///< Indicates whether the gestured actor has been disconnected from the scene
 };
index 8505191..d616647 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_GESTURE_RECOGNIZER_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/events/gesture.h>
 #include <dali/public-api/math/vector2.h>
 #include <dali/public-api/object/ref-object.h>
-#include <dali/devel-api/events/gesture-devel.h>
 #include <dali/internal/event/events/gesture-event.h>
 
 namespace Dali
@@ -76,7 +75,7 @@ public:
    * Returns the type of gesture detector.
    * @return Type of gesture detector.
    */
-  DevelGesture::Type GetType() const { return mType; }
+  Gesture::Type GetType() const { return mType; }
 
   /**
    * Called when we get a touch event.
@@ -96,7 +95,7 @@ protected:
    * @param[in]  screenSize    The size of the screen.
    * @param[in]  detectorType  The type of gesture detector.
    */
-  GestureRecognizer( Vector2 screenSize, DevelGesture::Type detectorType )
+  GestureRecognizer( Vector2 screenSize, Gesture::Type detectorType )
   : mScreenSize( screenSize ),
     mType( detectorType ),
     mScene( nullptr )
@@ -104,20 +103,12 @@ protected:
   }
 
   /**
-   * copydoc GestureRecognizer( Vector2, DevelGesture::Type )
-   */
-  GestureRecognizer( Vector2 screenSize, Gesture::Type detectorType )
-  : GestureRecognizer( screenSize, static_cast< DevelGesture::Type >( detectorType ) )
-  {
-  }
-
-  /**
    * Protected Constructor. Should only be able to create derived class objects.
    *
    * Use this constructor with the screen size is not used in the dereived class.
    * @param[in]  detectorType  The type of gesture detector.
    */
-  GestureRecognizer( DevelGesture::Type detectorType )
+  GestureRecognizer( Gesture::Type detectorType )
   : GestureRecognizer( Vector2::ZERO, detectorType )
   {
   }
@@ -129,7 +120,7 @@ protected:
 
 protected:
   Vector2 mScreenSize;
-  DevelGesture::Type mType;
+  Gesture::Type mType;
   Scene* mScene;
 };
 
index 06a41bc..85fbf68 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_GESTURE_REQUESTS_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 @@
 
 // INTERNAL INCLUDES
 #include <dali/public-api/events/gesture.h>
-#include <dali/devel-api/events/gesture-devel.h>
 
 namespace Dali
 {
@@ -39,16 +38,8 @@ struct GestureRequest
    * Default Constructor
    * @param[in]  typeRequired  The gesture type required
    */
-  GestureRequest( DevelGesture::Type typeRequired )
-  : type( typeRequired )
-  {
-  }
-
-  /**
-   * @copydoc GestureRequest( DevelGesture::Type )
-   */
   GestureRequest( Gesture::Type typeRequired )
-  : GestureRequest( static_cast< DevelGesture::Type >( typeRequired ) )
+  : type( typeRequired )
   {
   }
 
@@ -59,7 +50,7 @@ struct GestureRequest
 
   // Data Members
 
-  DevelGesture::Type type; ///< The type of gesture required.
+  Gesture::Type type; ///< The type of gesture required.
 };
 
 /**
index 8f0c84f..f8c1fa8 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.
@@ -26,135 +26,190 @@ namespace Dali
 
 namespace
 {
-/**
- * This container stores a mapping between public key event and impl as we cannot add data members in public one.
- * In practice this keeps the impl "alive" in between KeyEvent constructor and destructor calls so that getter
- * methods can be called to access the new data members. There is a 1:1 mapping between KeyEvent and KeyEventImpl.
- */
-struct KeyImplMapping
-{
-  KeyEvent* keyEvent;
-  Internal::KeyEventImpl* impl;
-};
-Vector< KeyImplMapping > gKeyEventToImplMapping;
-
+const uint32_t MODIFIER_SHIFT   = 0x1;
+const uint32_t MODIFIER_CTRL    = 0x2;
+const uint32_t MODIFIER_ALT     = 0x4;
+const int32_t  KEY_INVALID_CODE = -1;
 }
 
 namespace Internal
 {
 
-KeyEventImpl::KeyEventImpl( KeyEvent* keyEvent )
-: mLogicalKey( "" ),
+KeyEvent::KeyEvent()
+: mKeyName( "" ),
+  mLogicalKey( "" ),
+  mKeyString( "" ),
+  mKeyCode( KEY_INVALID_CODE ),
+  mKeyModifier( 0 ),
+  mTime( 0 ),
+  mState( Dali::KeyEvent::DOWN ),
   mCompose( "" ),
   mDeviceName( "" ),
   mDeviceClass( Device::Class::NONE ),
   mDeviceSubclass( Device::Subclass::NONE )
 {
-  gKeyEventToImplMapping.PushBack( { keyEvent, this } );
 }
 
-KeyEventImpl::~KeyEventImpl()
+KeyEvent::KeyEvent( const std::string& keyName,
+          const std::string& logicalKey,
+          const std::string& keyString,
+          int keyCode,
+          int keyModifier,
+          unsigned long timeStamp,
+          const Dali::KeyEvent::State& keyState,
+          const std::string& compose,
+          const std::string& deviceName,
+          const Device::Class::Type deviceClass,
+          const Device::Subclass::Type deviceSubclass )
+: mKeyName( keyName ),
+  mLogicalKey( logicalKey ),
+  mKeyString( keyString ),
+  mKeyCode( keyCode ),
+  mKeyModifier( keyModifier ),
+  mTime( timeStamp ),
+  mState( keyState ),
+  mCompose( compose ),
+  mDeviceName( deviceName ),
+  mDeviceClass( deviceClass ),
+  mDeviceSubclass( deviceSubclass )
 {
-  for( auto&& iter : gKeyEventToImplMapping )
-  {
-    if( this == iter.impl )
-    {
-      gKeyEventToImplMapping.Erase( &iter ); // iter is reference to KeyImplMapping, take address of it for Erase
-      return;
-    }
-  }
 }
 
-KeyEventImpl& KeyEventImpl::operator=( const KeyEventImpl& rhs )
+KeyEvent::~KeyEvent()
 {
-  if( this != &rhs )
-  {
-    mLogicalKey = rhs.mLogicalKey;
-    mCompose = rhs.mCompose;
-    mDeviceName = rhs.mDeviceName;
-    mDeviceClass = rhs.mDeviceClass;
-    mDeviceSubclass = rhs.mDeviceSubclass;
-  }
+}
 
-  return *this;
+KeyEventPtr KeyEvent::New( const std::string& keyName,
+                           const std::string& logicalKey,
+                           const std::string& keyString,
+                           int keyCode,
+                           int keyModifier,
+                           unsigned long timeStamp,
+                           const Dali::KeyEvent::State& keyState,
+                           const std::string& compose,
+                           const std::string& deviceName,
+                           const Device::Class::Type deviceClass,
+                           const Device::Subclass::Type deviceSubclass )
+{
+  KeyEventPtr keyEvent = new KeyEvent( keyName, logicalKey, keyString, keyCode, keyModifier, timeStamp, keyState, compose, deviceName, deviceClass, deviceSubclass );
+  return keyEvent;
 }
 
-std::string KeyEventImpl::GetLogicalKey() const
+bool KeyEvent::IsShiftModifier() const
 {
-  return mLogicalKey;
+  return ( ( MODIFIER_SHIFT & mKeyModifier ) == MODIFIER_SHIFT );
 }
 
-void KeyEventImpl::SetLogicalKey( const std::string& logicalKey )
+bool KeyEvent::IsCtrlModifier() const
 {
-  mLogicalKey = logicalKey;
+  return ( ( MODIFIER_CTRL & mKeyModifier ) == MODIFIER_CTRL );
 }
 
-std::string KeyEventImpl::GetCompose() const
+bool KeyEvent::IsAltModifier() const
 {
-  return mCompose;
+  return ( ( MODIFIER_ALT & mKeyModifier ) == MODIFIER_ALT );
 }
 
-void KeyEventImpl::SetCompose( const std::string& compose )
+const std::string& KeyEvent::GetCompose() const
 {
-  mCompose = compose;
+  return mCompose;
 }
 
-std::string KeyEventImpl::GetDeviceName() const
+const std::string& KeyEvent::GetDeviceName() const
 {
   return mDeviceName;
 }
 
-void KeyEventImpl::SetDeviceName( const std::string& deviceName )
+
+Device::Class::Type KeyEvent::GetDeviceClass() const
 {
-  mDeviceName = deviceName;
+  return mDeviceClass;
 }
 
-Device::Class::Type KeyEventImpl::GetDeviceClass() const
+
+Device::Subclass::Type KeyEvent::GetDeviceSubclass() const
 {
-  return mDeviceClass;
+  return mDeviceSubclass;
 }
 
-void KeyEventImpl::SetDeviceClass( Device::Class::Type deviceClass )
+
+const std::string& KeyEvent::GetKeyName() const
 {
-  mDeviceClass = deviceClass;
+  return mKeyName;
 }
 
-Device::Subclass::Type KeyEventImpl::GetDeviceSubclass() const
+
+const std::string& KeyEvent::GetKeyString() const
 {
-  return mDeviceSubclass;
+  return mKeyString;
+}
+
+
+const std::string& KeyEvent::GetLogicalKey() const
+{
+  return mLogicalKey;
+}
+
+
+int32_t KeyEvent::GetKeyCode() const
+{
+  return mKeyCode;
+}
+
+
+int32_t KeyEvent::GetKeyModifier() const
+{
+  return mKeyModifier;
+}
+
+
+unsigned long KeyEvent::GetTime() const
+{
+  return mTime;
+}
+
+
+Dali::KeyEvent::State KeyEvent::GetState() const
+{
+  return mState;
+}
+
+
+void KeyEvent::SetKeyName( const std::string& keyName )
+{
+  mKeyName = keyName;
 }
 
-void KeyEventImpl::SetDeviceSubclass( Device::Subclass::Type deviceSubclass )
+
+void KeyEvent::SetKeyString( const std::string& keyString )
 {
-  mDeviceSubclass = deviceSubclass;
+  mKeyString = keyString;
 }
 
-} // namsespace Internal
 
-Internal::KeyEventImpl* GetImplementation( KeyEvent* keyEvent )
+void KeyEvent::SetKeyCode( int32_t keyCode )
 {
-  Internal::KeyEventImpl* impl( NULL );
-  for( auto&& iter : gKeyEventToImplMapping )
-  {
-    if( iter.keyEvent == keyEvent )
-    {
-      impl = iter.impl;
-    }
-  }
-  return impl;
+  mKeyCode = keyCode;
 }
 
-const Internal::KeyEventImpl* GetImplementation( const KeyEvent* keyEvent )
+
+void KeyEvent::SetKeyModifier( int32_t keyModifier )
 {
-  Internal::KeyEventImpl* impl( NULL );
-  for( auto&& iter : gKeyEventToImplMapping )
-  {
-    if( iter.keyEvent == keyEvent )
-    {
-      impl = iter.impl;
-    }
-  }
-  return impl;
+  mKeyModifier = keyModifier;
 }
 
+
+void KeyEvent::SetTime( unsigned long time )
+{
+  mTime = time;
+}
+
+
+void KeyEvent::SetState( const Dali::KeyEvent::State& state )
+{
+  mState = state;
+}
+
+} // namespace Internal
+
 } // namespace Dali
index eed0cb9..8b8f7d4 100755 (executable)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_KEY_EVENT_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,6 +20,7 @@
 
 // INTERNAL INCLUDES
 #include <dali/public-api/events/key-event.h>
+#include <dali/public-api/object/base-object.h>
 
 namespace Dali
 {
@@ -27,121 +28,238 @@ namespace Dali
 namespace Internal
 {
 
-struct KeyEventImpl
+class KeyEvent;
+typedef IntrusivePtr< KeyEvent > KeyEventPtr;
+
+/**
+ * @copydoc Dali::KeyEvent
+ */
+class KeyEvent : public BaseObject
 {
 public:
 
   /**
+   * @brief Default constructor.
+   */
+  KeyEvent();
+
+  /**
    * @brief Constructor.
+   *
+   * @param[in]  keyName         The name of the key pressed or command from the IMF, if later then the some following parameters will be needed.
+   * @param[in]  logicalKey      The logical key symbol (eg. shift + 1 == "exclamation")
+   * @param[in]  keyString       The string of input characters or key pressed
+   * @param[in]  keyCode         The unique key code for the key pressed.
+   * @param[in]  keyModifier     The key modifier for special keys like shift and alt
+   * @param[in]  timeStamp       The time (in ms) that the key event occurred.
+   * @param[in]  keyState        The state of the key event.
+   * @param[in]  compose         The key compose
+   * @param[in]  deviceName      The name of device the key event originated from
+   * @param[in]  deviceClass     The class of device the key event originated from
+   * @param[in]  deviceSubclass  The subclass of device the key event originated from
    */
-  KeyEventImpl( Dali::KeyEvent* keyEvent );
+  KeyEvent( const std::string& keyName,
+            const std::string& logicalKey,
+            const std::string& keyString,
+            int keyCode,
+            int keyModifier,
+            unsigned long timeStamp,
+            const Dali::KeyEvent::State& keyState,
+            const std::string& compose,
+            const std::string& deviceName,
+            const Device::Class::Type deviceClass,
+            const Device::Subclass::Type deviceSubclass );
 
   /**
    * @brief Destructor.
    */
-  ~KeyEventImpl();
+  ~KeyEvent();
 
   /**
-   * @brief Assignment operator.
-   * @param[in] rhs A reference to the copied handle
-   * @return A reference to this
+   * Create a new KeyEvent.
+   *
+   * @param[in]  keyName         The name of the key pressed or command from the IMF, if later then the some following parameters will be needed.
+   * @param[in]  logicalKey      The logical key symbol (eg. shift + 1 == "exclamation")
+   * @param[in]  keyString       The string of input characters or key pressed
+   * @param[in]  keyCode         The unique key code for the key pressed.
+   * @param[in]  keyModifier     The key modifier for special keys like shift and alt
+   * @param[in]  timeStamp       The time (in ms) that the key event occurred.
+   * @param[in]  keyState        The state of the key event.
+   * @param[in]  compose         The key compose
+   * @param[in]  deviceName      The name of device the key event originated from
+   * @param[in]  deviceClass     The class of device the key event originated from
+   * @param[in]  deviceSubclass  The subclass of device the key event originated from
+   * @return A smart-pointer to the newly allocated KeyEvent.
    */
-  KeyEventImpl& operator=( const KeyEventImpl& rhs );
+  static KeyEventPtr New( const std::string& keyName,
+                          const std::string& logicalKey,
+                          const std::string& keyString,
+                          int keyCode,
+                          int keyModifier,
+                          unsigned long timeStamp,
+                          const Dali::KeyEvent::State& keyState,
+                          const std::string& compose,
+                          const std::string& deviceName,
+                          const Device::Class::Type deviceClass,
+                          const Device::Subclass::Type deviceSubclass );
 
   /**
-   * @brief Get the key symbol string.
-   * @return The key symbol
+   * @copydoc Dali::KeyEvent::IsShiftModifier()
    */
-  std::string GetLogicalKey() const;
+  bool IsShiftModifier() const;
 
   /**
-   * @brief Set the key symbol string to the KeyEvent.
-   * @param[in] key The key symbol to set
+   * @copydoc Dali::KeyEvent::IsCtrlModifier()
    */
-  void SetLogicalKey( const std::string& logicalKey );
+  bool IsCtrlModifier() const;
 
   /**
-   * @brief Get the compose string.
-   *
-   * @return The compose string.
+   * @copydoc Dali::KeyEvent::IsAltModifier()
    */
-   std::string GetCompose() const;
+  bool IsAltModifier() const;
 
   /**
-   * @brief Set the compose string to the KeyEvent
-   * A string if this keystroke has modified a string in the middle of being composed,
-   * this string replaces the previous one.
-   *
-   * @param[in] compose The compose string to set
+   * @copydoc Dali::KeyEvent::GetCompose()
+   */
+  const std::string& GetCompose() const;
+
+  /**
+   * @copydoc Dali::KeyEvent::GetDeviceName()
    */
-  void SetCompose( const std::string& compose );
+  const std::string& GetDeviceName() const;
 
   /**
-   * @brief Get the device name the key event originated from
+   * @copydoc Dali::KeyEvent::GetDeviceClass()
+   */
+  Device::Class::Type GetDeviceClass() const;
+
+  /**
+   * @copydoc Dali::KeyEvent::GetDeviceSubclass()
+   */
+  Device::Subclass::Type GetDeviceSubclass() const;
+
+  /**
+   * @copydoc Dali::KeyEvent::GetKeyName()
+   */
+  const std::string& GetKeyName() const;
+
+  /**
+   * @copydoc Dali::KeyEvent::GetKeyString()
+   */
+  const std::string& GetKeyString() const;
+
+  /**
+   * @copydoc Dali::KeyEvent::GetLogicalKey()
+   */
+  const std::string& GetLogicalKey() const;
+
+  /**
+   * @copydoc Dali::KeyEvent::GetKeyCode()
+   */
+  int32_t GetKeyCode() const;
+
+  /**
+   * @copydoc Dali::KeyEvent::GetKeyModifier()
+   */
+  int32_t GetKeyModifier() const;
+
+  /**
+   * @copydoc Dali::KeyEvent::GetTime()
+   */
+  unsigned long GetTime() const;
+
+  /**
+   * @copydoc Dali::KeyEvent::GetState()
+   */
+  Dali::KeyEvent::State GetState() const;
+
+  /**
+   * @brief Set the name given to the key pressed
    *
-   * @return The device name
+   * @param[in] keyName The name given to the key pressed.
    */
-   std::string GetDeviceName() const;
+  void SetKeyName( const std::string& keyName );
 
   /**
-   * @brief Set the device name to the KeyEvent
+   * @brief Set the actual string of input characters that should be used for input editors.
    *
-   * @param[in] deviceName Device name string to set
+   * @param[in] The actual string of input characters
    */
-  void SetDeviceName( const std::string& deviceName );
+  void SetKeyString( const std::string& keyString );
 
   /**
-   * @brief Get the device class the key event originated from
+   * @brief Set the unique key code for the key pressed.
    *
-   * @return The device class
+   * @param[in] keyCode The unique key code for the key pressed
    */
-  Device::Class::Type GetDeviceClass() const;
+  void SetKeyCode( int32_t keyCode );
 
   /**
-   * @brief Set the device class to the KeyEvent
+   * @brief Set the key modifier for special keys like Shift, Alt and Ctrl which modify the next key pressed.
    *
-   * @param[in] deviceClass Device class to set
+   * @param[in] keyModifier The key modifier
    */
-  void SetDeviceClass( Device::Class::Type deviceClass );
+  void SetKeyModifier( int32_t keyModifier );
 
   /**
-   * @brief Get the device subclass the key event originated from
+   * @brief Set the time (in ms) that the key event occurred.
    *
-   * @return The device subclass
+   * @param[in] time The time (in ms)
    */
-  Device::Subclass::Type GetDeviceSubclass() const;
+  void SetTime( unsigned long time );
 
   /**
-   * @brief Set the device subclass to the KeyEvent
+   * @brief Set the state of the key event.
    *
-   * @param[in] deviceClass Device subclass to set
+   * @param[in] state The state of the key event
    */
-  void SetDeviceSubclass( Device::Subclass::Type deviceSubclass );
+  void SetState( const Dali::KeyEvent::State& state );
 
 private:
 
-  // Undefined
-  KeyEventImpl();
+  // Not copyable or movable
 
-  // Undefined
-  KeyEventImpl( const KeyEventImpl& rhs );
+  KeyEvent( const KeyEvent& rhs ) = delete;             ///< Deleted copy constructor
+  KeyEvent( KeyEvent&& rhs ) = delete;                  ///< Deleted move constructor
+  KeyEvent& operator=( const KeyEvent& rhs ) = delete;  ///< Deleted copy assignment operator
+  KeyEvent& operator=( KeyEvent&& rhs ) = delete;       ///< Deleted move assignment operator
 
 private:
 
-  std::string mLogicalKey;
-  std::string mCompose;
-  std::string mDeviceName;
-  Device::Class::Type mDeviceClass;
-  Device::Subclass::Type mDeviceSubclass;
+  std::string mKeyName;                      ///< The name of the key pressed
+  std::string mLogicalKey;                   ///< The logical key symbol
+  std::string mKeyString;                    ///< The string of input characters
+  int  mKeyCode;                             ///< TThe unique key code
+  int  mKeyModifier;                         ///< The key modifier
+  unsigned long mTime;                       ///< The time that the key event occurred.
+  Dali::KeyEvent::State mState;              ///< The state of the key event.
+  std::string mCompose;                      ///< The key compose
+  std::string mDeviceName;                   ///< The name of device the key event originated from
+  Device::Class::Type mDeviceClass;          ///< The class of device the key event originated from
+  Device::Subclass::Type mDeviceSubclass;    ///< The subclass of device the key event originated from
 };
 
 } // namespace Internal
 
 // Helpers for public-api forwarding methods
 
-Internal::KeyEventImpl* GetImplementation( KeyEvent* keyEvent );
+inline Internal::KeyEvent& GetImplementation( Dali::KeyEvent& keyEvent )
+{
+  DALI_ASSERT_ALWAYS( keyEvent && "Key Event handle is empty" );
+
+  BaseObject& object = keyEvent.GetBaseObject();
+
+  return static_cast< Internal::KeyEvent& >( object );
+}
+
+inline const Internal::KeyEvent& GetImplementation( const Dali::KeyEvent& keyEvent )
+{
+  DALI_ASSERT_ALWAYS( keyEvent && "Key Event handle is empty" );
+
+  const BaseObject& object = keyEvent.GetBaseObject();
 
-const Internal::KeyEventImpl* GetImplementation( const KeyEvent* keyEvent );
+  return static_cast< const Internal::KeyEvent& >( object );
+}
 
 } // namespace Dali
 
index 65be14e..e72adc3 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.
@@ -21,7 +21,6 @@
 // INTERNAL INCLUDES
 #include <dali/public-api/events/key-event.h>
 #include <dali/internal/event/events/key-event-impl.h>
-#include <dali/internal/event/actors/actor-impl.h>
 #include <dali/internal/event/common/scene-impl.h>
 #include <dali/integration-api/events/key-event-integ.h>
 
@@ -42,18 +41,14 @@ KeyEventProcessor::~KeyEventProcessor()
 
 void KeyEventProcessor::ProcessKeyEvent( const Integration::KeyEvent& event )
 {
-  KeyEvent keyEvent(event.keyName, event.keyString, event.keyCode, event.keyModifier, event.time, static_cast<Dali::KeyEvent::State>(event.state));
-  GetImplementation( &keyEvent )->SetLogicalKey( event.logicalKey );
-  GetImplementation( &keyEvent )->SetCompose( event.compose );
-  GetImplementation( &keyEvent )->SetDeviceName( event.deviceName );
-  GetImplementation( &keyEvent )->SetDeviceClass( event.deviceClass );
-  GetImplementation( &keyEvent )->SetDeviceSubclass( event.deviceSubclass );
+  KeyEventPtr keyEvent( new KeyEvent( event.keyName, event.logicalKey, event.keyString, event.keyCode, event.keyModifier, event.time, static_cast<Dali::KeyEvent::State>( event.state ), event.compose, event.deviceName, event.deviceClass, event.deviceSubclass ) );
+  Dali::KeyEvent keyEventHandle( keyEvent.Get() );
 
   // Emit the key event signal from the scene.
-  bool consumed = mScene.EmitKeyEventGeneratedSignal( keyEvent );
+  bool consumed = mScene.EmitKeyEventGeneratedSignal( keyEventHandle );
   if( !consumed )
   {
-    mScene.EmitKeyEventSignal(keyEvent);
+    mScene.EmitKeyEventSignal( keyEventHandle );
   }
 
 }
index 6b75613..debf1d0 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.
 #include <cstring> // for strcmp
 
 // INTERNAL INCLUDES
+#include <dali/public-api/events/rotation-gesture.h>
 #include <dali/public-api/object/type-registry.h>
-#include <dali/devel-api/events/gesture-devel.h>
 #include <dali/internal/event/events/gesture-event-processor.h>
 #include <dali/integration-api/debug.h>
-#include <dali/devel-api/events/rotation-gesture.h>
 
 namespace Dali
 {
@@ -59,7 +58,7 @@ RotationGestureDetectorPtr RotationGestureDetector::New()
 }
 
 RotationGestureDetector::RotationGestureDetector()
-: GestureDetector( DevelGesture::Rotation )
+: GestureDetector( Gesture::Rotation )
 {
 }
 
index becfe0f..8af877a 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_ROTATION_GESTURE_DETECTOR_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,8 +19,8 @@
  */
 
 // INTERNAL INCLUDES
+#include <dali/public-api/events/rotation-gesture-detector.h>
 #include <dali/internal/event/events/gesture-detector-impl.h>
-#include <dali/devel-api/events/rotation-gesture-detector.h>
 
 namespace Dali
 {
index 38b83cd..436c7cd 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_EVENT_ROTATION_GESTURE_EVENT_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.
@@ -21,7 +21,6 @@
 // INTERNAL INCLUDES
 #include <dali/public-api/math/radian.h>
 #include <dali/public-api/math/vector2.h>
-#include <dali/devel-api/events/gesture-devel.h>
 #include <dali/internal/event/events/gesture-event.h>
 
 namespace Dali
@@ -48,7 +47,7 @@ struct RotationGestureEvent : public GestureEvent
    * @param[in]  state  The state of the gesture
    */
   RotationGestureEvent( Gesture::State state )
-  : GestureEvent( DevelGesture::Rotation, state )
+  : GestureEvent( Gesture::Rotation, state )
   {
   }
 
index 9c26faa..45a7719 100644 (file)
 
 // INTERNAL INCLUDES
 #include <dali/public-api/actors/actor.h>
+#include <dali/public-api/events/rotation-gesture.h>
 #include <dali/public-api/math/vector2.h>
-#include <dali/devel-api/events/gesture-devel.h>
 #include <dali/internal/event/events/rotation-gesture/rotation-gesture-event.h>
 #include <dali/integration-api/debug.h>
 #include <dali/internal/event/common/scene-impl.h>
 #include <dali/internal/event/render-tasks/render-task-impl.h>
 #include <dali/internal/event/events/rotation-gesture/rotation-gesture-recognizer.h>
 #include <dali/internal/event/events/gesture-requests.h>
-#include <dali/devel-api/events/rotation-gesture.h>
 
 namespace Dali
 {
@@ -102,7 +101,7 @@ struct IsNotAttachedFunctor
 } // unnamed namespace
 
 RotationGestureProcessor::RotationGestureProcessor()
-: GestureProcessor( DevelGesture::Rotation ),
+: GestureProcessor( Gesture::Rotation ),
   mRotationGestureDetectors(),
   mCurrentRotationEmitters(),
   mCurrentRotationEvent( nullptr ),
index 6de3490..2873612 100644 (file)
@@ -24,7 +24,6 @@
 // INTERNAL INCLUDES
 #include <dali/public-api/events/touch-point.h>
 #include <dali/public-api/math/vector2.h>
-#include <dali/devel-api/events/gesture-devel.h>
 #include <dali/integration-api/events/touch-event-integ.h>
 #include <dali/internal/event/events/rotation-gesture/rotation-gesture-event.h>
 #include <dali/internal/event/common/scene-impl.h>
@@ -56,7 +55,7 @@ inline Vector2 GetCenterPoint( const Integration::Point& point1, const Integrati
 } // unnamed namespace
 
 RotationGestureRecognizer::RotationGestureRecognizer( Observer& observer, uint32_t minimumTouchEvents, uint32_t minimumTouchEventsAfterStart )
-: GestureRecognizer( DevelGesture::Rotation ),
+: GestureRecognizer( Gesture::Rotation ),
   mObserver( observer ),
   mState( Clear ),
   mTouchEvents(),
index 57469e5..5e7d540 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.
@@ -35,7 +35,7 @@ GeometryPtr Geometry::New()
   return geometry;
 }
 
-uint32_t Geometry::AddVertexBuffer( PropertyBuffer& vertexBuffer )
+uint32_t Geometry::AddVertexBuffer( VertexBuffer& vertexBuffer )
 {
   mVertexBuffers.push_back( &vertexBuffer );
   SceneGraph::AttachVertexBufferMessage( mEventThreadServices.GetUpdateManager(), *mRenderObject, *vertexBuffer.GetRenderObject() );
@@ -49,8 +49,8 @@ uint32_t Geometry::GetNumberOfVertexBuffers() const
 
 void Geometry::RemoveVertexBuffer( uint32_t index )
 {
-  const Render::PropertyBuffer& renderPropertyBuffer = static_cast<const Render::PropertyBuffer&>( *(mVertexBuffers[index]->GetRenderObject()) );
-  SceneGraph::RemoveVertexBufferMessage( mEventThreadServices.GetUpdateManager(), *mRenderObject, renderPropertyBuffer );
+  const Render::VertexBuffer& renderVertexBuffer = static_cast<const Render::VertexBuffer&>( *(mVertexBuffers[index]->GetRenderObject()) );
+  SceneGraph::RemoveVertexBufferMessage( mEventThreadServices.GetUpdateManager(), *mRenderObject, renderVertexBuffer );
 
   mVertexBuffers.erase( mVertexBuffers.begin() + index );
 }
index 018fea4..d1cc60d 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_GEOMETRY_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.
@@ -28,7 +28,7 @@
 #include <dali/internal/event/common/connectable.h> // Dali::Internal::Connectable
 #include <dali/internal/event/common/object-connector.h> // Dali::Internal::ObjectConnector
 #include <dali/internal/event/common/object-impl.h> // Dali::Internal::Object
-#include <dali/internal/event/common/property-buffer-impl.h> // Dali::Internal::PropertyBuffer
+#include <dali/internal/event/rendering/vertex-buffer-impl.h> // Dali::Internal::VertexBuffer
 #include <dali/internal/render/renderers/render-geometry.h>
 
 namespace Dali
@@ -60,7 +60,7 @@ public:
   /**
    * @copydoc Dali::Geometry::AddVertexBuffer()
    */
-  uint32_t AddVertexBuffer( PropertyBuffer& vertexBuffer );
+  uint32_t AddVertexBuffer( VertexBuffer& vertexBuffer );
 
   /**
    * @copydoc Dali::Geometry::GetNumberOfVertexBuffers()
@@ -122,7 +122,7 @@ private: // data
   EventThreadServices& mEventThreadServices;    ///<Used to send messages to the render thread via update thread
   Render::Geometry* mRenderObject;
 
-  std::vector<PropertyBufferPtr> mVertexBuffers; ///< Vector of intrusive pointers to vertex buffers
+  std::vector<VertexBufferPtr> mVertexBuffers; ///< Vector of intrusive pointers to vertex buffers
   Dali::Geometry::Type mType;      ///< Geometry type (cached)
 };
 
index 295b322..6c4a8b8 100644 (file)
 #include <dali/public-api/common/intrusive-ptr.h> // Dali::IntrusivePtr
 #include <dali/public-api/rendering/texture-set.h> // Dali::TextureSet
 #include <dali/internal/event/common/object-impl.h> // Dali::Internal::Object
-#include <dali/internal/event/common/property-buffer-impl.h> // Dali::Internal::PropertyBuffer
 #include <dali/internal/event/rendering/sampler-impl.h> // Dali::Internal::Sampler
-#include <dali/internal/event/rendering/texture-impl.h> // Dali::Internal::Texture
 #include <dali/internal/event/rendering/shader-impl.h> // Dali::Internal::Shader
+#include <dali/internal/event/rendering/texture-impl.h> // Dali::Internal::Texture
+
 
 namespace Dali
 {
@@ -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.
  */
 
 // CLASS HEADER
-#include <dali/internal/event/common/property-buffer-impl.h>
+#include <dali/internal/event/rendering/vertex-buffer-impl.h>
 
 // INTERNAL INCLUDES
-#include <dali/public-api/rendering/property-buffer.h>
+#include <dali/public-api/rendering/vertex-buffer.h>
 #include <dali/internal/update/manager/update-manager.h>
 
 #if defined (ANDROID) || defined(WIN32)
@@ -135,24 +135,24 @@ uint32_t GetPropertyImplementationAlignment( Property::Type& propertyType )
 
 } // unnamed namespace
 
-PropertyBufferPtr PropertyBuffer::New( Dali::Property::Map& format )
+VertexBufferPtr VertexBuffer::New( Dali::Property::Map& format )
 {
   DALI_ASSERT_ALWAYS( format.Count() && "Format cannot be empty." );
 
-  PropertyBufferPtr propertyBuffer( new PropertyBuffer() );
-  propertyBuffer->Initialize( format );
+  VertexBufferPtr vertexBuffer( new VertexBuffer() );
+  vertexBuffer->Initialize( format );
 
-  return propertyBuffer;
+  return vertexBuffer;
 }
 
-void PropertyBuffer::SetData( const void* data, uint32_t size )
+void VertexBuffer::SetData( const void* data, uint32_t size )
 {
   mSize = size; // size is the number of elements
 
   uint32_t bufferSize = mBufferFormatSize * mSize;
 
   // create a new DALi vector to store the buffer data
-  // the heap allocated vector will end up being owned by Render::PropertyBuffer
+  // the heap allocated vector will end up being owned by Render::VertexBuffer
   OwnerPointer< Vector<uint8_t> > bufferCopy = new Dali::Vector<uint8_t>();
   bufferCopy->Resize( bufferSize );
 
@@ -162,28 +162,28 @@ void PropertyBuffer::SetData( const void* data, uint32_t size )
   std::copy( source, source + bufferSize, destination );
 
   // Ownership of the bufferCopy is passed to the message ( uses an owner pointer )
-  SceneGraph::SetPropertyBufferData( mEventThreadServices.GetUpdateManager(), *mRenderObject, bufferCopy, mSize );
+  SceneGraph::SetVertexBufferData( mEventThreadServices.GetUpdateManager(), *mRenderObject, bufferCopy, mSize );
 }
 
-uint32_t PropertyBuffer::GetSize() const
+uint32_t VertexBuffer::GetSize() const
 {
   return mSize;
 }
 
-const Render::PropertyBuffer* PropertyBuffer::GetRenderObject() const
+const Render::VertexBuffer* VertexBuffer::GetRenderObject() const
 {
   return mRenderObject;
 }
 
-PropertyBuffer::~PropertyBuffer()
+VertexBuffer::~VertexBuffer()
 {
   if( EventThreadServices::IsCoreRunning() && mRenderObject)
   {
-    SceneGraph::RemovePropertyBuffer( mEventThreadServices.GetUpdateManager(), *mRenderObject );
+    SceneGraph::RemoveVertexBuffer( mEventThreadServices.GetUpdateManager(), *mRenderObject );
   }
 }
 
-PropertyBuffer::PropertyBuffer()
+VertexBuffer::VertexBuffer()
 : mEventThreadServices( EventThreadServices::Get() ),
   mRenderObject( NULL ),
   mBufferFormatSize( 0 ),
@@ -191,16 +191,16 @@ PropertyBuffer::PropertyBuffer()
 {
 }
 
-void PropertyBuffer::Initialize( Dali::Property::Map& formatMap )
+void VertexBuffer::Initialize( Dali::Property::Map& formatMap )
 {
-  mRenderObject = new Render::PropertyBuffer();
-  OwnerPointer< Render::PropertyBuffer > transferOwnership( mRenderObject );
-  SceneGraph::AddPropertyBuffer( mEventThreadServices.GetUpdateManager(), transferOwnership );
+  mRenderObject = new Render::VertexBuffer();
+  OwnerPointer< Render::VertexBuffer > transferOwnership( mRenderObject );
+  SceneGraph::AddVertexBuffer( mEventThreadServices.GetUpdateManager(), transferOwnership );
 
   uint32_t numComponents = static_cast<uint32_t>( formatMap.Count() );
 
   // Create the format
-  OwnerPointer< Render::PropertyBuffer::Format> format = new Render::PropertyBuffer::Format();
+  OwnerPointer< Render::VertexBuffer::Format> format = new Render::VertexBuffer::Format();
   format->components.resize( numComponents );
 
   uint32_t currentAlignment = 0u;
@@ -226,7 +226,7 @@ void PropertyBuffer::Initialize( Dali::Property::Map& formatMap )
         ( type == Property::ARRAY  ) ||
         ( type == Property::MAP    ) )
     {
-      DALI_ABORT( "Property::Type not supported in PropertyBuffer" );
+      DALI_ABORT( "Property::Type not supported in VertexBuffer" );
     }
     uint32_t elementSize = GetPropertyImplementationSize( type );
     uint32_t elementAlignment = GetPropertyImplementationAlignment( type );
@@ -269,7 +269,7 @@ void PropertyBuffer::Initialize( Dali::Property::Map& formatMap )
 
   mBufferFormatSize = format->size;
 
-  SceneGraph::SetPropertyBufferFormat(mEventThreadServices.GetUpdateManager(), *mRenderObject, format );
+  SceneGraph::SetVertexBufferFormat(mEventThreadServices.GetUpdateManager(), *mRenderObject, format );
 }
 
 uint32_t GetPropertyImplementationSize( Property::Type& propertyType )
@@ -1,8 +1,8 @@
-#ifndef DALI_INTERNAL_PROPERTY_BUFFER_H
-#define DALI_INTERNAL_PROPERTY_BUFFER_H
+#ifndef DALI_INTERNAL_VERTEX_BUFFER_H
+#define DALI_INTERNAL_VERTEX_BUFFER_H
 
 /*
- * 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/public-api/object/base-object.h>
 #include <dali/public-api/object/property-map.h> // Dali::Property::Map
 #include <dali/internal/event/common/event-thread-services.h>
-#include <dali/internal/render/renderers/render-property-buffer.h>
+#include <dali/internal/render/renderers/render-vertex-buffer.h>
 
 namespace Dali
 {
 namespace Internal
 {
 
-class PropertyBuffer;
-typedef IntrusivePtr<PropertyBuffer> PropertyBufferPtr;
+class VertexBuffer;
+typedef IntrusivePtr<VertexBuffer> VertexBufferPtr;
 
 /**
- * PropertyBuffer is an object that contains an array of structures of values that
+ * VertexBuffer is an object that contains an array of structures of values that
  * can be accessed as properties.
  */
-class PropertyBuffer : public BaseObject
+class VertexBuffer : public BaseObject
 {
 public:
 
   /**
    * @copydoc PropertBuffer::New()
    */
-  static PropertyBufferPtr New( Dali::Property::Map& format );
+  static VertexBufferPtr New( Dali::Property::Map& format );
 
   /**
    * @copydoc PropertBuffer::SetData()
@@ -60,23 +60,23 @@ public:
 public: // Default property extensions from Object
 
   /**
-   * @brief Get the render thread side of the PropertyBuffer
+   * @brief Get the render thread side of the VertexBuffer
    *
-   * @return The render thread side of this PropertyBuffer
+   * @return The render thread side of this VertexBuffer
    */
-  const Render::PropertyBuffer* GetRenderObject() const;
+  const Render::VertexBuffer* GetRenderObject() const;
 
 protected:
   /**
    * @brief Destructor
    */
-  ~PropertyBuffer();
+  ~VertexBuffer();
 
 private: // implementation
   /**
    * @brief Default constructor
    */
-  PropertyBuffer();
+  VertexBuffer();
 
   /**
    * Second stage initialization
@@ -84,12 +84,12 @@ private: // implementation
   void Initialize( Dali::Property::Map& format );
 
 private: // unimplemented methods
-  PropertyBuffer( const PropertyBuffer& );
-  PropertyBuffer& operator=( const PropertyBuffer& );
+  VertexBuffer( const VertexBuffer& );
+  VertexBuffer& operator=( const VertexBuffer& );
 
 private: // data
   EventThreadServices& mEventThreadServices;    ///<Used to send messages to the render thread via update thread
-  Render::PropertyBuffer* mRenderObject;        ///<Render side object
+  Render::VertexBuffer* mRenderObject;        ///<Render side object
   uint32_t mBufferFormatSize;
   uint32_t mSize; ///< Number of elements in the buffer
 };
@@ -99,7 +99,7 @@ private: // data
  */
 template<Property::Type type> struct PropertyImplementationType
 {
-  // typedef ... Type; not defined, only support types declared bellow
+  // typedef ... Type; not defined, only support types declared below
 };
 template<> struct PropertyImplementationType< Property::BOOLEAN > { typedef bool Type; };
 template<> struct PropertyImplementationType< Property::FLOAT > { typedef float Type; };
@@ -117,24 +117,24 @@ uint32_t GetPropertyImplementationSize( Property::Type& propertyType );
 } // namespace Internal
 
 // Helpers for public-api forwarding methods
-inline Internal::PropertyBuffer& GetImplementation(Dali::PropertyBuffer& handle)
+inline Internal::VertexBuffer& GetImplementation(Dali::VertexBuffer& handle)
 {
-  DALI_ASSERT_ALWAYS(handle && "PropertyBuffer handle is empty");
+  DALI_ASSERT_ALWAYS(handle && "VertexBuffer handle is empty");
 
   BaseObject& object = handle.GetBaseObject();
 
-  return static_cast<Internal::PropertyBuffer&>(object);
+  return static_cast<Internal::VertexBuffer&>(object);
 }
 
-inline const Internal::PropertyBuffer& GetImplementation(const Dali::PropertyBuffer& handle)
+inline const Internal::VertexBuffer& GetImplementation(const Dali::VertexBuffer& handle)
 {
-  DALI_ASSERT_ALWAYS(handle && "PropertyBuffer handle is empty");
+  DALI_ASSERT_ALWAYS(handle && "VertexBuffer handle is empty");
 
   const BaseObject& object = handle.GetBaseObject();
 
-  return static_cast<const Internal::PropertyBuffer&>(object);
+  return static_cast<const Internal::VertexBuffer&>(object);
 }
 
 } // namespace Dali
 
-#endif // DALI_INTERNAL_PROPERTY_BUFFER_H
+#endif // DALI_INTERNAL_VERTEX_BUFFER_H
index 64f37e5..f748935 100644 (file)
@@ -32,7 +32,6 @@ SET( internal_src_files
   ${internal_src_dir}/event/common/object-impl.cpp
   ${internal_src_dir}/event/common/object-registry-impl.cpp
   ${internal_src_dir}/event/common/projection.cpp
-  ${internal_src_dir}/event/common/property-buffer-impl.cpp
   ${internal_src_dir}/event/common/property-conditions-impl.cpp
   ${internal_src_dir}/event/common/property-metadata.cpp
   ${internal_src_dir}/event/common/property-notification-impl.cpp
@@ -92,6 +91,7 @@ SET( internal_src_files
   ${internal_src_dir}/event/rendering/renderer-impl.cpp
   ${internal_src_dir}/event/rendering/sampler-impl.cpp
   ${internal_src_dir}/event/rendering/shader-impl.cpp
+  ${internal_src_dir}/event/rendering/vertex-buffer-impl.cpp
   ${internal_src_dir}/event/size-negotiation/memory-pool-relayout-container.cpp
   ${internal_src_dir}/event/size-negotiation/relayout-controller-impl.cpp
 
@@ -110,7 +110,7 @@ SET( internal_src_files
   ${internal_src_dir}/render/queue/render-queue.cpp
   ${internal_src_dir}/render/renderers/render-frame-buffer.cpp
   ${internal_src_dir}/render/renderers/render-geometry.cpp
-  ${internal_src_dir}/render/renderers/render-property-buffer.cpp
+  ${internal_src_dir}/render/renderers/render-vertex-buffer.cpp
   ${internal_src_dir}/render/renderers/render-renderer.cpp
   ${internal_src_dir}/render/renderers/render-texture.cpp
   ${internal_src_dir}/render/shaders/program.cpp
index 3ec8755..75415ed 100644 (file)
@@ -206,7 +206,7 @@ struct RenderManager::Impl
   OwnerContainer< Render::Sampler* >        samplerContainer;        ///< List of owned samplers
   OwnerContainer< Render::Texture* >        textureContainer;        ///< List of owned textures
   OwnerContainer< Render::FrameBuffer* >    frameBufferContainer;    ///< List of owned framebuffers
-  OwnerContainer< Render::PropertyBuffer* > propertyBufferContainer; ///< List of owned property buffers
+  OwnerContainer< Render::VertexBuffer* >   vertexBufferContainer;   ///< List of owned vertex buffers
   OwnerContainer< Render::Geometry* >       geometryContainer;       ///< List of owned Geometries
 
   bool                                      lastFrameWasRendered;    ///< Keeps track of the last frame being rendered due to having render instructions
@@ -436,24 +436,24 @@ void RenderManager::AttachDepthStencilTextureToFrameBuffer( Render::FrameBuffer*
   frameBuffer->AttachDepthStencilTexture( mImpl->context, texture, mipmapLevel );
 }
 
-void RenderManager::AddPropertyBuffer( OwnerPointer< Render::PropertyBuffer >& propertyBuffer )
+void RenderManager::AddVertexBuffer( OwnerPointer< Render::VertexBuffer >& vertexBuffer )
 {
-  mImpl->propertyBufferContainer.PushBack( propertyBuffer.Release() );
+  mImpl->vertexBufferContainer.PushBack( vertexBuffer.Release() );
 }
 
-void RenderManager::RemovePropertyBuffer( Render::PropertyBuffer* propertyBuffer )
+void RenderManager::RemoveVertexBuffer( Render::VertexBuffer* vertexBuffer )
 {
-  mImpl->propertyBufferContainer.EraseObject( propertyBuffer );
+  mImpl->vertexBufferContainer.EraseObject( vertexBuffer );
 }
 
-void RenderManager::SetPropertyBufferFormat( Render::PropertyBuffer* propertyBuffer, OwnerPointer< Render::PropertyBuffer::Format>& format )
+void RenderManager::SetVertexBufferFormat( Render::VertexBuffer* vertexBuffer, OwnerPointer< Render::VertexBuffer::Format>& format )
 {
-  propertyBuffer->SetFormat( format.Release() );
+  vertexBuffer->SetFormat( format.Release() );
 }
 
-void RenderManager::SetPropertyBufferData( Render::PropertyBuffer* propertyBuffer, OwnerPointer< Vector<uint8_t> >& data, uint32_t size )
+void RenderManager::SetVertexBufferData( Render::VertexBuffer* vertexBuffer, OwnerPointer< Vector<uint8_t> >& data, uint32_t size )
 {
-  propertyBuffer->SetData( data.Release(), size );
+  vertexBuffer->SetData( data.Release(), size );
 }
 
 void RenderManager::SetIndexBuffer( Render::Geometry* geometry, Dali::Vector<uint16_t>& indices )
@@ -471,7 +471,7 @@ void RenderManager::RemoveGeometry( Render::Geometry* geometry )
   mImpl->geometryContainer.EraseObject( geometry );
 }
 
-void RenderManager::AttachVertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer )
+void RenderManager::AttachVertexBuffer( Render::Geometry* geometry, Render::VertexBuffer* vertexBuffer )
 {
   DALI_ASSERT_DEBUG( NULL != geometry );
 
@@ -480,13 +480,13 @@ void RenderManager::AttachVertexBuffer( Render::Geometry* geometry, Render::Prop
   {
     if ( iter == geometry )
     {
-      iter->AddPropertyBuffer( propertyBuffer );
+      iter->AddVertexBuffer( vertexBuffer );
       break;
     }
   }
 }
 
-void RenderManager::RemoveVertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer )
+void RenderManager::RemoveVertexBuffer( Render::Geometry* geometry, Render::VertexBuffer* vertexBuffer )
 {
   DALI_ASSERT_DEBUG( NULL != geometry );
 
@@ -495,7 +495,7 @@ void RenderManager::RemoveVertexBuffer( Render::Geometry* geometry, Render::Prop
   {
     if ( iter == geometry )
     {
-      iter->RemovePropertyBuffer( propertyBuffer );
+      iter->RemoveVertexBuffer( vertexBuffer );
       break;
     }
   }
index abc3c12..2e3ea2d 100644 (file)
@@ -22,9 +22,9 @@
 #include <dali/public-api/math/rect.h>
 #include <dali/integration-api/core-enumerations.h>
 #include <dali/internal/common/shader-saver.h>
-#include <dali/internal/render/gl-resources/gpu-buffer.h>
-#include <dali/internal/render/renderers/render-property-buffer.h>
 #include <dali/internal/event/rendering/texture-impl.h>
+#include <dali/internal/render/gl-resources/gpu-buffer.h>
+#include <dali/internal/render/renderers/render-vertex-buffer.h>
 
 namespace Dali
 {
@@ -62,7 +62,6 @@ class RenderQueue;
 class RenderInstruction;
 class RenderInstructionContainer;
 class Shader;
-class PropertyBufferDataProvider;
 class Scene;
 
 /**
@@ -176,17 +175,17 @@ public:
 
   /**
    * Add a property buffer to the render manager.
-   * @param[in] propertyBuffer The property buffer to add.
+   * @param[in] vertexBuffer The property buffer to add.
    * @post propertBuffer is owned by RenderManager
    */
-  void AddPropertyBuffer( OwnerPointer< Render::PropertyBuffer >& propertyBuffer );
+  void AddVertexBuffer( OwnerPointer< Render::VertexBuffer >& vertexBuffer );
 
   /**
    * Remove a property buffer from the render manager.
-   * @param[in] propertyBuffer The property buffer to remove.
-   * @post propertyBuffer is destroyed.
+   * @param[in] vertexBuffer The property buffer to remove.
+   * @post vertexBuffer is destroyed.
    */
-  void RemovePropertyBuffer( Render::PropertyBuffer* propertyBuffer );
+  void RemoveVertexBuffer( Render::VertexBuffer* vertexBuffer );
 
   /**
    * Add a geometry to the render manager.
@@ -205,32 +204,32 @@ public:
   /**
    * Adds a property buffer to a geometry from the render manager.
    * @param[in] geometry The geometry
-   * @param[in] propertyBuffer The property buffer to remove.
+   * @param[in] vertexBuffer The property buffer to remove.
    */
-  void AttachVertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer );
+  void AttachVertexBuffer( Render::Geometry* geometry, Render::VertexBuffer* vertexBuffer );
 
   /**
    * Remove a property buffer from a Render::Geometry from the render manager.
    * @param[in] geometry The geometry
-   * @param[in] propertyBuffer The property buffer to remove.
+   * @param[in] vertexBuffer The property buffer to remove.
    * @post property buffer is destroyed.
    */
-  void RemoveVertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer );
+  void RemoveVertexBuffer( Render::Geometry* geometry, Render::VertexBuffer* vertexBuffer );
 
   /**
    * Sets the format of an existing property buffer
-   * @param[in] propertyBuffer The property buffer.
+   * @param[in] vertexBuffer The property buffer.
    * @param[in] format The new format of the buffer
    */
-  void SetPropertyBufferFormat( Render::PropertyBuffer* propertyBuffer, OwnerPointer< Render::PropertyBuffer::Format>& format );
+  void SetVertexBufferFormat( Render::VertexBuffer* vertexBuffer, OwnerPointer< Render::VertexBuffer::Format>& format );
 
   /**
    * Sets the data of an existing property buffer
-   * @param[in] propertyBuffer The property buffer.
+   * @param[in] vertexBuffer The property buffer.
    * @param[in] data The new data of the buffer
    * @param[in] size The new size of the buffer
    */
-  void SetPropertyBufferData( Render::PropertyBuffer* propertyBuffer, OwnerPointer< Vector<uint8_t> >& data, uint32_t size );
+  void SetVertexBufferData( Render::VertexBuffer* vertexBuffer, OwnerPointer< Vector<uint8_t> >& data, uint32_t size );
 
   /**
    * Sets the data for the index buffer of an existing geometry
diff --git a/dali/internal/render/data-providers/property-buffer-data-provider.h b/dali/internal/render/data-providers/property-buffer-data-provider.h
deleted file mode 100644 (file)
index 51c8f64..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-#ifndef DALI_INTERNAL_SCENE_GRAPH_PROPERTY_BUFFER_DATA_PROVIDER_H
-#define DALI_INTERNAL_SCENE_GRAPH_PROPERTY_BUFFER_DATA_PROVIDER_H
-
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// EXTERNAL INCLUDES
-#include <string>
-
-// INTERNAL INCLUDES
-#include <dali/public-api/object/property.h>
-#include <dali/internal/common/buffer-index.h>
-
-namespace Dali
-{
-namespace Internal
-{
-namespace SceneGraph
-{
-
-class PropertyBufferDataProvider
-{
-public:
-
-  /**
-   * Type for the data contained in the buffer
-   */
-  typedef Dali::Vector< char > BufferType;
-
-public:
-  /**
-   * Constructor
-   */
-  PropertyBufferDataProvider()
-  {
-  }
-
-  /**
-   * Get the number of attributes
-   * @param[in] bufferIndex Index to access double buffered values
-   * @return the number of attributes
-   */
-  virtual unsigned int GetAttributeCount( BufferIndex bufferIndex ) const = 0;
-
-  /**
-   * Get the name of an attribute
-   * @param[in] bufferIndex Index to access double buffered values
-   * @param[in] index Index of the attribute
-   * @return the name of the attribute
-   */
-  virtual const std::string& GetAttributeName( BufferIndex bufferIndex, unsigned int index ) const = 0;
-
-  /**
-   * Get the byte size of an attribute
-   * @param[in] bufferIndex Index to access double buffered values
-   * @param[in] index Index of the attribute
-   * @return the byte size of the attribute
-   */
-  virtual size_t GetAttributeSize( BufferIndex bufferIndex, unsigned int index ) const = 0;
-
-  /**
-   * Get the type of an attribute
-   * @param[in] bufferIndex Index to access double buffered values
-   * @param[in] index Index of the attribute
-   * @return the type of the attribute
-   */
-  virtual Property::Type GetAttributeType( BufferIndex bufferIndex, unsigned int index ) const = 0;
-
-  /**
-   * Get the byte offset of an attribute
-   * @param[in] bufferIndex Index to access double buffered values
-   * @param[in] index Index of the attribute
-   * @return the byte offset of the attribute
-   */
-  virtual size_t GetAttributeOffset( BufferIndex bufferIndex, unsigned int index ) const = 0;
-
-  /**
-   * Get the property buffer data
-   * @param[in] bufferIndex Index to access double buffered values
-   * @return the property buffer's data array
-   */
-  virtual const BufferType& GetData( BufferIndex bufferIndex ) const = 0;
-
-  /**
-   * Get the size of the property buffer in bytes
-   * @param[in] bufferIndex Index to access double buffered values
-   * @return the size in bytes
-   */
-  virtual size_t GetDataSize( BufferIndex bufferIndex ) const = 0;
-
-  /**
-   * Get the size of an element of the buffer in bytes
-   * @param[in] bufferIndex Index to access double buffered values
-   * @return the element size in bytes
-   */
-  virtual size_t GetElementSize( BufferIndex bufferIndex ) const = 0;
-
-  /**
-   * Get the number of elements
-   * @param[in] bufferIndex Index to access double buffered values
-   * @return the number of elements
-   */
-  virtual unsigned int GetElementCount( BufferIndex bufferIndex ) const = 0;
-
-  /**
-   * Get Id of the GPU buffer associated with this propertyBuffer
-   * @param[in] bufferIndex Index to access double buffered values
-   * @return the Id
-   */
-  virtual unsigned int GetGpuBufferId( BufferIndex bufferIndex ) const = 0;
-
-  /**
-   * Checks if data in the PropertyBuffer has changed repect previous frame
-   * @param[in] bufferIndex Index to access double buffered values
-   * @return true if data has changed, false otherwise
-   */
-  virtual bool HasDataChanged( BufferIndex bufferIndex ) const = 0;
-
-protected:
-  /**
-   * No deletion through this interface
-   */
-  virtual ~PropertyBufferDataProvider()
-  {
-  }
-};
-
-} // namespace SceneGraph
-} // namespace Internal
-} // namespace Dali
-
-#endif // DALI_INTERNAL_SCENE_GRAPH_PROPERTY_BUFFER_DATA_PROVIDER_H
index 3d5573e..2ca0a45 100755 (executable)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_SCENE_GRAPH_RENDER_DATA_PROVIDER_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.
@@ -21,7 +21,6 @@
 #include <dali/public-api/common/vector-wrapper.h>
 #include <dali/public-api/rendering/renderer.h>
 #include <dali/internal/render/data-providers/node-data-provider.h>
-#include <dali/internal/render/data-providers/property-buffer-data-provider.h>
 #include <dali/internal/render/data-providers/uniform-map-data-provider.h>
 #include <dali/internal/render/renderers/render-sampler.h>
 #include <dali/internal/render/renderers/render-texture.h>
@@ -36,7 +35,6 @@ struct BlendingOptions;
 
 namespace SceneGraph
 {
-class PropertyBuffer;
 class Shader;
 class Renderer;
 
@@ -50,7 +48,6 @@ class Renderer;
 class RenderDataProvider
 {
 public:
-  typedef Dali::Vector< const PropertyBufferDataProvider* > VertexBuffers;
   typedef std::vector< Render::Sampler* > Samplers;
 
   /**
index 17ba522..592ec6d 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.
@@ -21,7 +21,7 @@
 #include <dali/internal/common/buffer-index.h>
 #include <dali/internal/render/gl-resources/context.h>
 #include <dali/internal/render/gl-resources/gpu-buffer.h>
-#include <dali/internal/render/renderers/render-property-buffer.h>
+#include <dali/internal/render/renderers/render-vertex-buffer.h>
 #include <dali/internal/render/shaders/program.h>
 
 namespace Dali
@@ -53,9 +53,9 @@ void Geometry::GlContextDestroyed()
 {
 }
 
-void Geometry::AddPropertyBuffer( Render::PropertyBuffer* propertyBuffer )
+void Geometry::AddVertexBuffer( Render::VertexBuffer* vertexBuffer )
 {
-  mVertexBuffers.PushBack( propertyBuffer );
+  mVertexBuffers.PushBack( vertexBuffer );
   mAttributesChanged = true;
 }
 
@@ -65,14 +65,14 @@ void Geometry::SetIndexBuffer( Dali::Vector<uint16_t>& indices )
   mIndicesChanged = true;
 }
 
-void Geometry::RemovePropertyBuffer( const Render::PropertyBuffer* propertyBuffer )
+void Geometry::RemoveVertexBuffer( const Render::VertexBuffer* vertexBuffer )
 {
   const auto&& end = mVertexBuffers.End();
   for( auto&& iter = mVertexBuffers.Begin(); iter != end; ++iter )
   {
-    if( *iter == propertyBuffer )
+    if( *iter == vertexBuffer )
     {
-      //This will delete the gpu buffer associated to the RenderPropertyBuffer if there is one
+      //This will delete the gpu buffer associated to the RenderVertexBuffer if there is one
       mVertexBuffers.Remove( iter );
       mAttributesChanged = true;
       break;
index f08cbce..c8ac1e5 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_RENDER_GEOMETRY_H
 
 /*
- * 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.
@@ -37,7 +37,7 @@ class GpuBuffer;
 
 namespace Render
 {
-class PropertyBuffer;
+class VertexBuffer;
 
 /**
  * This class encapsulates the GPU buffers. It is used to upload vertex data
@@ -68,9 +68,9 @@ public:
 
   /**
    * Adds a property buffer to the geometry
-   * @param[in] dataProvider The PropertyBuffer data provider
+   * @param[in] dataProvider The VertexBuffer data provider
    */
-  void AddPropertyBuffer( Render::PropertyBuffer* propertyBuffer );
+  void AddVertexBuffer( Render::VertexBuffer* vertexBuffer );
 
   /**
    * Set the data for the index buffer to be used by the geometry
@@ -79,10 +79,10 @@ public:
   void SetIndexBuffer( Dali::Vector<uint16_t>& indices );
 
   /**
-   * Removes a PropertyBuffer from the geometry
-   * @param[in] propertyBuffer The property buffer to be removed
+   * Removes a VertexBuffer from the geometry
+   * @param[in] vertexBuffer The property buffer to be removed
    */
-  void RemovePropertyBuffer(  const Render::PropertyBuffer* propertyBuffer );
+  void RemoveVertexBuffer(  const Render::VertexBuffer* vertexBuffer );
 
   /**
    * Gets the attribute locations on the shader for the attributes defined in the geometry RenderBuffers
@@ -137,8 +137,8 @@ public:
 
 private:
 
-  // PropertyBuffers
-  Vector< Render::PropertyBuffer* > mVertexBuffers;
+  // VertexBuffers
+  Vector< Render::VertexBuffer* > mVertexBuffers;
 
   Dali::Vector< uint16_t > mIndices;
   OwnerPointer< GpuBuffer > mIndexBuffer;
@@ -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.
@@ -15,8 +15,8 @@
  *
  */
 
-#include <dali/internal/render/renderers/render-property-buffer.h>
-#include <dali/internal/event/common/property-buffer-impl.h>  // Dali::Internal::PropertyBuffer
+#include <dali/internal/render/renderers/render-vertex-buffer.h>
+#include <dali/internal/event/rendering/vertex-buffer-impl.h>  // Dali::Internal::VertexBuffer
 
 namespace
 {
@@ -116,7 +116,7 @@ namespace Internal
 namespace Render
 {
 
-PropertyBuffer::PropertyBuffer()
+VertexBuffer::VertexBuffer()
 :mFormat(NULL),
  mData(NULL),
  mGpuBuffer(NULL),
@@ -125,24 +125,24 @@ PropertyBuffer::PropertyBuffer()
 {
 }
 
-PropertyBuffer::~PropertyBuffer()
+VertexBuffer::~VertexBuffer()
 {
 }
 
-void PropertyBuffer::SetFormat( PropertyBuffer::Format* format )
+void VertexBuffer::SetFormat( VertexBuffer::Format* format )
 {
   mFormat = format;
   mDataChanged = true;
 }
 
-void PropertyBuffer::SetData( Dali::Vector<uint8_t>* data, uint32_t size )
+void VertexBuffer::SetData( Dali::Vector<uint8_t>* data, uint32_t size )
 {
   mData = data;
   mSize = size;
   mDataChanged = true;
 }
 
-bool PropertyBuffer::Update( Context& context )
+bool VertexBuffer::Update( Context& context )
 {
   if( !mData || !mFormat || !mSize )
   {
@@ -169,7 +169,7 @@ bool PropertyBuffer::Update( Context& context )
   return true;
 }
 
-void PropertyBuffer::BindBuffer( Context& context, GpuBuffer::Target target )
+void VertexBuffer::BindBuffer( Context& context, GpuBuffer::Target target )
 {
   if(mGpuBuffer)
   {
@@ -177,7 +177,7 @@ void PropertyBuffer::BindBuffer( Context& context, GpuBuffer::Target target )
   }
 }
 
-uint32_t PropertyBuffer::EnableVertexAttributes( Context& context, Vector<GLint>& vAttributeLocation, uint32_t locationBase )
+uint32_t VertexBuffer::EnableVertexAttributes( Context& context, Vector<GLint>& vAttributeLocation, uint32_t locationBase )
 {
   const uint32_t attributeCount = static_cast<uint32_t>( mFormat->components.size() );
 
@@ -1,8 +1,8 @@
-#ifndef DALI_INTERNAL_RENDER_PROPERTY_BUFFER_H
-#define DALI_INTERNAL_RENDER_PROPERTY_BUFFER_H
+#ifndef DALI_INTERNAL_RENDER_VERTEX_BUFFER_H
+#define DALI_INTERNAL_RENDER_VERTEX_BUFFER_H
 
 /*
- * 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.
@@ -32,7 +32,7 @@ namespace Internal
 namespace Render
 {
 
-class PropertyBuffer
+class VertexBuffer
 {
 public:
 
@@ -45,7 +45,7 @@ public:
   };
 
   /**
-   * Structure that holds the meta-data of the format of PropertyBuffer.
+   * Structure that holds the meta-data of the format of VertexBuffer.
    */
   struct Format
   {
@@ -56,27 +56,27 @@ public:
   /**
    * @brief Default constructor
    */
-  PropertyBuffer();
+  VertexBuffer();
 
   /**
    * @brief Destructor
    */
-  ~PropertyBuffer();
+  ~VertexBuffer();
 
   /**
    * @brief Set the format of the buffer
    *
    * This function takes ownership of the pointer
    *
-   * @param[in] format The format for the PropertyBuffer
+   * @param[in] format The format for the VertexBuffer
    */
-  void SetFormat( PropertyBuffer::Format* format );
+  void SetFormat( VertexBuffer::Format* format );
 
   /**
-   * @brief Set the data of the PropertyBuffer
+   * @brief Set the data of the VertexBuffer
    *
    * This function takes ownership of the pointer
-   * @param[in] data The new data of the PropertyBuffer
+   * @param[in] data The new data of the VertexBuffer
    * @param[in] size The new size of the buffer
    */
   void SetData( Dali::Vector<uint8_t>* data, uint32_t size );
@@ -180,15 +180,15 @@ public:
     return reinterpret_cast<T*>( &data->operator[]( 0 ) );
   }
 
-  inline const PropertyBuffer::Format* GetFormat() const
+  inline const VertexBuffer::Format* GetFormat() const
   {
     return mFormat.Get();
   }
 
 private:
-  OwnerPointer< PropertyBuffer::Format >  mFormat;    ///< Format of the buffer
+  OwnerPointer< VertexBuffer::Format >  mFormat;    ///< Format of the buffer
   OwnerPointer< Dali::Vector< uint8_t > > mData;      ///< Data
-  OwnerPointer< GpuBuffer >               mGpuBuffer; ///< Pointer to the GpuBuffer associated with this RenderPropertyBuffer
+  OwnerPointer< GpuBuffer >               mGpuBuffer; ///< Pointer to the GpuBuffer associated with this RenderVertexBuffer
 
   uint32_t mSize;       ///< Number of Elements in the buffer
   bool mDataChanged;  ///< Flag to know if data has changed in a frame
@@ -201,4 +201,4 @@ private:
 } // namespace Dali
 
 
-#endif //  DALI_INTERNAL_RENDER_PROPERTY_BUFFER_H
+#endif //  DALI_INTERNAL_RENDER_VERTEX_BUFFER_H
index 167dcaa..f0d961d 100644 (file)
@@ -209,7 +209,7 @@ void Animation::Pause()
 
 void Animation::Bake(BufferIndex bufferIndex, EndAction action)
 {
-  if( action == Dali::Animation::BakeFinal )
+  if( action == Dali::Animation::BAKE_FINAL )
   {
     if( mSpeedFactor > 0.0f )
     {
@@ -240,7 +240,7 @@ bool Animation::Stop(BufferIndex bufferIndex)
   {
     animationFinished = true; // The actor-thread should be notified of this
 
-    if( mEndAction != Dali::Animation::Discard )
+    if( mEndAction != Dali::Animation::DISCARD )
     {
       Bake( bufferIndex, mEndAction );
 
@@ -266,7 +266,7 @@ void Animation::OnDestroy(BufferIndex bufferIndex)
 {
   if (mState == Playing || mState == Paused)
   {
-    if (mEndAction != Dali::Animation::Discard)
+    if (mEndAction != Dali::Animation::DISCARD)
     {
       Bake( bufferIndex, mEndAction );
 
@@ -378,7 +378,7 @@ void Animation::Update( BufferIndex bufferIndex, float elapsedSeconds, bool& loo
 
           // Make elapsed second as edge of range forcely.
           mElapsedSeconds = edgeRangeSeconds + signSpeedFactor * Math::MACHINE_EPSILON_10;
-          UpdateAnimators(bufferIndex, finished && (mEndAction != Dali::Animation::Discard), finished );
+          UpdateAnimators(bufferIndex, finished && (mEndAction != Dali::Animation::DISCARD), finished );
 
           // After update animation, mElapsedSeconds must be begin of value
           mElapsedSeconds = playRangeStartSeconds + playRangeEndSeconds - edgeRangeSeconds;
index 2de0fd7..5e682da 100644 (file)
@@ -147,7 +147,7 @@ public:
     mCurrentProgress( 0.f ),
     mLoopCount( 1 ),
     mAlphaFunction( alphaFunction ),
-    mDisconnectAction( Dali::Animation::BakeFinal ),
+    mDisconnectAction( Dali::Animation::BAKE_FINAL ),
     mAnimationPlaying( false ),
     mEnabled( true ),
     mConnectedToSceneGraph( false ),
@@ -197,10 +197,10 @@ private: // From PropertyOwner::Observer
   void PropertyOwnerDisconnected( BufferIndex bufferIndex, PropertyOwner& owner ) override final
   {
     // If we are active, then bake the value if required
-    if ( mAnimationPlaying && mDisconnectAction != Dali::Animation::Discard )
+    if ( mAnimationPlaying && mDisconnectAction != Dali::Animation::DISCARD )
     {
       // Bake to target-value if BakeFinal, otherwise bake current value
-      Update( bufferIndex, ( mDisconnectAction == Dali::Animation::Bake ? mCurrentProgress : 1.0f ), true );
+      Update( bufferIndex, ( mDisconnectAction == Dali::Animation::BAKE ? mCurrentProgress : 1.0f ), true );
     }
 
     mEnabled = false;
@@ -1038,7 +1038,7 @@ struct KeyFrameBooleanFunctor : public AnimatorFunctionBase
   {
     if(mKeyFrames->IsActive(progress))
     {
-      return mKeyFrames->GetValue(progress, Dali::Animation::Linear);
+      return mKeyFrames->GetValue(progress, Dali::Animation::LINEAR);
     }
     return property;
   }
@@ -1164,7 +1164,7 @@ struct KeyFrameQuaternionFunctor : public AnimatorFunctionBase
   {
     if(mKeyFrames->IsActive(progress))
     {
-      return mKeyFrames->GetValue(progress, Dali::Animation::Linear);
+      return mKeyFrames->GetValue(progress, Dali::Animation::LINEAR);
     }
     return property;
   }
index 30e1866..fab009c 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_SCENE_GRAPH_RENDER_MESSAGE_DISPATCHER_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,9 +20,7 @@
 
 // INTERNAL INCLUDES
 #include <dali/internal/update/common/scene-graph-buffers.h>
-#include <dali/internal/render/gl-resources/gpu-buffer.h>
 #include <dali/internal/render/renderers/render-renderer.h>
-#include <dali/internal/render/renderers/render-property-buffer.h>
 
 namespace Dali
 {
@@ -35,12 +33,13 @@ namespace Render
 {
 class RenderTracker;
 }
+
 namespace SceneGraph
 {
 
 class RenderManager;
 class RenderQueue;
-class PropertyBufferDataProvider;
+
 /**
  * A utility class for sending messages to the render-thread.
  */
index 3e71956..35a1839 100644 (file)
@@ -31,7 +31,6 @@
 #include <dali/internal/render/common/render-instruction-container.h>
 #include <dali/internal/render/shaders/scene-graph-shader.h>
 #include <dali/internal/render/renderers/render-renderer.h>
-#include <dali/internal/render/renderers/render-property-buffer.h>
 #include <dali/internal/update/nodes/scene-graph-layer.h>
 
 namespace
index 4272e48..b0a3787 100644 (file)
@@ -1235,51 +1235,51 @@ void UpdateManager::SetWrapMode( Render::Sampler* sampler, uint32_t rWrapMode, u
   new (slot) DerivedType( &mImpl->renderManager,  &RenderManager::SetWrapMode, sampler, rWrapMode, sWrapMode, tWrapMode );
 }
 
-void UpdateManager::AddPropertyBuffer( OwnerPointer< Render::PropertyBuffer >& propertyBuffer )
+void UpdateManager::AddVertexBuffer( OwnerPointer< Render::VertexBuffer >& vertexBuffer )
 {
   // Message has ownership of format while in transit from update -> render
-  typedef MessageValue1< RenderManager, OwnerPointer< Render::PropertyBuffer > > DerivedType;
+  typedef MessageValue1< RenderManager, OwnerPointer< Render::VertexBuffer > > DerivedType;
 
   // Reserve some memory inside the render queue
   uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) );
 
   // Construct message in the render queue memory; note that delete should not be called on the return value
-  new (slot) DerivedType( &mImpl->renderManager,  &RenderManager::AddPropertyBuffer, propertyBuffer );
+  new (slot) DerivedType( &mImpl->renderManager,  &RenderManager::AddVertexBuffer, vertexBuffer );
 }
 
-void UpdateManager::RemovePropertyBuffer( Render::PropertyBuffer* propertyBuffer )
+void UpdateManager::RemoveVertexBuffer( Render::VertexBuffer* vertexBuffer )
 {
-  typedef MessageValue1< RenderManager, Render::PropertyBuffer* > DerivedType;
+  typedef MessageValue1< RenderManager, Render::VertexBuffer* > DerivedType;
 
   // Reserve some memory inside the render queue
   uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) );
 
   // Construct message in the render queue memory; note that delete should not be called on the return value
-  new (slot) DerivedType( &mImpl->renderManager,  &RenderManager::RemovePropertyBuffer, propertyBuffer );
+  new (slot) DerivedType( &mImpl->renderManager,  &RenderManager::RemoveVertexBuffer, vertexBuffer );
 }
 
-void UpdateManager::SetPropertyBufferFormat( Render::PropertyBuffer* propertyBuffer, OwnerPointer< Render::PropertyBuffer::Format>& format )
+void UpdateManager::SetVertexBufferFormat( Render::VertexBuffer* vertexBuffer, OwnerPointer< Render::VertexBuffer::Format>& format )
 {
   // Message has ownership of format while in transit from update -> render
-  typedef MessageValue2< RenderManager, Render::PropertyBuffer*, OwnerPointer< Render::PropertyBuffer::Format > > DerivedType;
+  typedef MessageValue2< RenderManager, Render::VertexBuffer*, OwnerPointer< Render::VertexBuffer::Format > > DerivedType;
 
   // Reserve some memory inside the render queue
   uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) );
 
   // Construct message in the render queue memory; note that delete should not be called on the return value
-  new (slot) DerivedType( &mImpl->renderManager,  &RenderManager::SetPropertyBufferFormat, propertyBuffer, format );
+  new (slot) DerivedType( &mImpl->renderManager,  &RenderManager::SetVertexBufferFormat, vertexBuffer, format );
 }
 
-void UpdateManager::SetPropertyBufferData( Render::PropertyBuffer* propertyBuffer, OwnerPointer< Vector<uint8_t> >& data, uint32_t size )
+void UpdateManager::SetVertexBufferData( Render::VertexBuffer* vertexBuffer, OwnerPointer< Vector<uint8_t> >& data, uint32_t size )
 {
   // Message has ownership of format while in transit from update -> render
-  typedef MessageValue3< RenderManager, Render::PropertyBuffer*, OwnerPointer< Dali::Vector<uint8_t> >, uint32_t > DerivedType;
+  typedef MessageValue3< RenderManager, Render::VertexBuffer*, OwnerPointer< Dali::Vector<uint8_t> >, uint32_t > DerivedType;
 
   // Reserve some memory inside the render queue
   uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) );
 
   // Construct message in the render queue memory; note that delete should not be called on the return value
-  new (slot) DerivedType( &mImpl->renderManager, &RenderManager::SetPropertyBufferData, propertyBuffer, data, size );
+  new (slot) DerivedType( &mImpl->renderManager, &RenderManager::SetVertexBufferData, vertexBuffer, data, size );
 }
 
 void UpdateManager::AddGeometry( OwnerPointer< Render::Geometry >& geometry )
@@ -1327,26 +1327,26 @@ void UpdateManager::SetIndexBuffer( Render::Geometry* geometry, Dali::Vector<uin
   new (slot) DerivedType( &mImpl->renderManager, geometry, indices );
 }
 
-void UpdateManager::RemoveVertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer )
+void UpdateManager::RemoveVertexBuffer( Render::Geometry* geometry, Render::VertexBuffer* vertexBuffer )
 {
-  typedef MessageValue2< RenderManager, Render::Geometry*, Render::PropertyBuffer* > DerivedType;
+  typedef MessageValue2< RenderManager, Render::Geometry*, Render::VertexBuffer* > DerivedType;
 
   // Reserve some memory inside the render queue
   uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) );
 
   // Construct message in the render queue memory; note that delete should not be called on the return value
-  new (slot) DerivedType( &mImpl->renderManager,  &RenderManager::RemoveVertexBuffer, geometry, propertyBuffer );
+  new (slot) DerivedType( &mImpl->renderManager,  &RenderManager::RemoveVertexBuffer, geometry, vertexBuffer );
 }
 
-void UpdateManager::AttachVertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer )
+void UpdateManager::AttachVertexBuffer( Render::Geometry* geometry, Render::VertexBuffer* vertexBuffer )
 {
-  typedef MessageValue2< RenderManager, Render::Geometry*, Render::PropertyBuffer* > DerivedType;
+  typedef MessageValue2< RenderManager, Render::Geometry*, Render::VertexBuffer* > DerivedType;
 
   // Reserve some memory inside the render queue
   uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) );
 
   // Construct message in the render queue memory; note that delete should not be called on the return value
-  new (slot) DerivedType( &mImpl->renderManager,  &RenderManager::AttachVertexBuffer, geometry, propertyBuffer );
+  new (slot) DerivedType( &mImpl->renderManager,  &RenderManager::AttachVertexBuffer, geometry, vertexBuffer );
 }
 
 void UpdateManager::AddTexture( OwnerPointer< Render::Texture >& texture )
index f07a3be..419fec3 100644 (file)
@@ -42,7 +42,7 @@
 #include <dali/internal/update/render-tasks/scene-graph-camera.h>
 #include <dali/internal/update/render-tasks/scene-graph-render-task-list.h>
 #include <dali/internal/render/shaders/scene-graph-shader.h>   // for OwnerPointer< Shader >
-#include <dali/internal/render/renderers/render-property-buffer.h>
+#include <dali/internal/render/renderers/render-vertex-buffer.h>
 #include <dali/internal/event/rendering/texture-impl.h>
 
 namespace Dali
@@ -83,7 +83,7 @@ class RenderManager;
 class RenderTaskList;
 class RenderTaskProcessor;
 class RenderQueue;
-class PropertyBuffer;
+class VertexBuffer;
 
 struct NodeDepthPair
 {
@@ -470,31 +470,31 @@ public:
    * @post Sends a message to RenderManager to add the property buffer.
    * The property buffer will be owned by RenderManager
    */
-  void AddPropertyBuffer( OwnerPointer< Render::PropertyBuffer >& propertryBuffer );
+  void AddVertexBuffer( OwnerPointer< Render::VertexBuffer >& propertryBuffer );
 
   /**
-   * Removes an existing PropertyBuffer from RenderManager
+   * Removes an existing VertexBuffer from RenderManager
    * @param[in] propertryBuffer The property buffer to remove
    * @post The property buffer will be destroyed in the render thread
    */
-  void RemovePropertyBuffer( Render::PropertyBuffer* propertryBuffer );
+  void RemoveVertexBuffer( Render::VertexBuffer* propertryBuffer );
 
   /**
    * Sets the format of an existing property buffer
-   * @param[in] propertyBuffer The property buffer.
+   * @param[in] vertexBuffer The property buffer.
    * @param[in] format The new format of the buffer
    * @post Sends a message to RenderManager to set the new format to the property buffer.
    */
-  void SetPropertyBufferFormat( Render::PropertyBuffer* propertyBuffer, OwnerPointer< Render::PropertyBuffer::Format>& format );
+  void SetVertexBufferFormat( Render::VertexBuffer* vertexBuffer, OwnerPointer< Render::VertexBuffer::Format>& format );
 
   /**
    * Sets the data of an existing property buffer
-   * @param[in] propertyBuffer The property buffer.
+   * @param[in] vertexBuffer The property buffer.
    * @param[in] data The new data of the buffer
    * @param[in] size The new size of the buffer
    * @post Sends a message to RenderManager to set the new data to the property buffer.
    */
-  void SetPropertyBufferData( Render::PropertyBuffer* propertyBuffer, OwnerPointer< Vector<uint8_t> >& data, uint32_t size );
+  void SetVertexBufferData( Render::VertexBuffer* vertexBuffer, OwnerPointer< Vector<uint8_t> >& data, uint32_t size );
 
   /**
    * Adds a geometry to the RenderManager
@@ -528,16 +528,16 @@ public:
   /**
    * Adds a vertex buffer to a geometry
    * @param[in] geometry The geometry
-   * @param[in] propertyBuffer The property buffer
+   * @param[in] vertexBuffer The property buffer
    */
-  void AttachVertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer );
+  void AttachVertexBuffer( Render::Geometry* geometry, Render::VertexBuffer* vertexBuffer );
 
   /**
    * Removes a vertex buffer from a geometry
    * @param[in] geometry The geometry
-   * @param[in] propertyBuffer The property buffer
+   * @param[in] vertexBuffer The property buffer
    */
-  void RemoveVertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer );
+  void RemoveVertexBuffer( Render::Geometry* geometry, Render::VertexBuffer* vertexBuffer );
 
   /**
    * Adds a texture to the render manager
@@ -1216,51 +1216,51 @@ inline void SetWrapModeMessage( UpdateManager& manager, Render::Sampler& sampler
   new (slot) LocalType( &manager, &UpdateManager::SetWrapMode, &sampler, rWrapMode, sWrapMode, tWrapMode );
 }
 
-inline void AddPropertyBuffer( UpdateManager& manager, OwnerPointer< Render::PropertyBuffer >& propertyBuffer )
+inline void AddVertexBuffer( UpdateManager& manager, OwnerPointer< Render::VertexBuffer >& vertexBuffer )
 {
-  // Message has ownership of propertyBuffer while in transit from event -> update
-  typedef MessageValue1< UpdateManager, OwnerPointer< Render::PropertyBuffer > > LocalType;
+  // Message has ownership of vertexBuffer while in transit from event -> update
+  typedef MessageValue1< UpdateManager, OwnerPointer< Render::VertexBuffer > > LocalType;
 
   // Reserve some memory inside the message queue
   uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
 
   // Construct message in the message queue memory; note that delete should not be called on the return value
-  new (slot) LocalType( &manager, &UpdateManager::AddPropertyBuffer, propertyBuffer );
+  new (slot) LocalType( &manager, &UpdateManager::AddVertexBuffer, vertexBuffer );
 }
 
-inline void RemovePropertyBuffer( UpdateManager& manager, Render::PropertyBuffer& propertyBuffer )
+inline void RemoveVertexBuffer( UpdateManager& manager, Render::VertexBuffer& vertexBuffer )
 {
-  typedef MessageValue1< UpdateManager, Render::PropertyBuffer*  > LocalType;
+  typedef MessageValue1< UpdateManager, Render::VertexBuffer*  > LocalType;
 
   // Reserve some memory inside the message queue
   uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
 
   // Construct message in the message queue memory; note that delete should not be called on the return value
-  new (slot) LocalType( &manager, &UpdateManager::RemovePropertyBuffer, &propertyBuffer );
+  new (slot) LocalType( &manager, &UpdateManager::RemoveVertexBuffer, &vertexBuffer );
 }
 
-inline void SetPropertyBufferFormat( UpdateManager& manager, Render::PropertyBuffer& propertyBuffer, OwnerPointer< Render::PropertyBuffer::Format>& format )
+inline void SetVertexBufferFormat( UpdateManager& manager, Render::VertexBuffer& vertexBuffer, OwnerPointer< Render::VertexBuffer::Format>& format )
 {
-  // Message has ownership of PropertyBuffer::Format while in transit from event -> update
-  typedef MessageValue2< UpdateManager, Render::PropertyBuffer*, OwnerPointer< Render::PropertyBuffer::Format> > LocalType;
+  // Message has ownership of VertexBuffer::Format while in transit from event -> update
+  typedef MessageValue2< UpdateManager, Render::VertexBuffer*, OwnerPointer< Render::VertexBuffer::Format> > LocalType;
 
   // Reserve some memory inside the message queue
   uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
 
   // Construct message in the message queue memory; note that delete should not be called on the return value
-  new (slot) LocalType( &manager, &UpdateManager::SetPropertyBufferFormat, &propertyBuffer, format );
+  new (slot) LocalType( &manager, &UpdateManager::SetVertexBufferFormat, &vertexBuffer, format );
 }
 
-inline void SetPropertyBufferData( UpdateManager& manager, Render::PropertyBuffer& propertyBuffer, OwnerPointer< Vector<uint8_t> >& data, uint32_t size )
+inline void SetVertexBufferData( UpdateManager& manager, Render::VertexBuffer& vertexBuffer, OwnerPointer< Vector<uint8_t> >& data, uint32_t size )
 {
-  // Message has ownership of PropertyBuffer data while in transit from event -> update
-  typedef MessageValue3< UpdateManager, Render::PropertyBuffer*, OwnerPointer< Vector<uint8_t> >, uint32_t  > LocalType;
+  // Message has ownership of VertexBuffer data while in transit from event -> update
+  typedef MessageValue3< UpdateManager, Render::VertexBuffer*, OwnerPointer< Vector<uint8_t> >, uint32_t  > LocalType;
 
   // Reserve some memory inside the message queue
   uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
 
   // Construct message in the message queue memory; note that delete should not be called on the return value
-  new (slot) LocalType( &manager, &UpdateManager::SetPropertyBufferData, &propertyBuffer, data, size );
+  new (slot) LocalType( &manager, &UpdateManager::SetVertexBufferData, &vertexBuffer, data, size );
 }
 
 inline void AddGeometry( UpdateManager& manager, OwnerPointer< Render::Geometry >& geometry )
@@ -1286,26 +1286,26 @@ inline void RemoveGeometry( UpdateManager& manager, Render::Geometry& geometry )
   new (slot) LocalType( &manager, &UpdateManager::RemoveGeometry, &geometry );
 }
 
-inline void AttachVertexBufferMessage( UpdateManager& manager, Render::Geometry& geometry, const Render::PropertyBuffer& vertexBuffer )
+inline void AttachVertexBufferMessage( UpdateManager& manager, Render::Geometry& geometry, const Render::VertexBuffer& vertexBuffer )
 {
-  typedef MessageValue2< UpdateManager, Render::Geometry*, Render::PropertyBuffer* > LocalType;
+  typedef MessageValue2< UpdateManager, Render::Geometry*, Render::VertexBuffer* > LocalType;
 
   // Reserve some memory inside the message queue
   uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
 
   // Construct message in the message queue memory; note that delete should not be called on the return value
-  new (slot) LocalType( &manager, &UpdateManager::AttachVertexBuffer, &geometry, const_cast<Render::PropertyBuffer*>(&vertexBuffer) );
+  new (slot) LocalType( &manager, &UpdateManager::AttachVertexBuffer, &geometry, const_cast<Render::VertexBuffer*>(&vertexBuffer) );
 }
 
-inline void RemoveVertexBufferMessage( UpdateManager& manager, Render::Geometry& geometry, const Render::PropertyBuffer& vertexBuffer )
+inline void RemoveVertexBufferMessage( UpdateManager& manager, Render::Geometry& geometry, const Render::VertexBuffer& vertexBuffer )
 {
-  typedef MessageValue2< UpdateManager, Render::Geometry*, Render::PropertyBuffer* > LocalType;
+  typedef MessageValue2< UpdateManager, Render::Geometry*, Render::VertexBuffer* > LocalType;
 
   // Reserve some memory inside the message queue
   uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) );
 
   // Construct message in the message queue memory; note that delete should not be called on the return value
-  new (slot) LocalType( &manager, &UpdateManager::RemoveVertexBuffer, &geometry, const_cast<Render::PropertyBuffer*>(&vertexBuffer) );
+  new (slot) LocalType( &manager, &UpdateManager::RemoveVertexBuffer, &geometry, const_cast<Render::VertexBuffer*>(&vertexBuffer) );
 }
 
 // Custom message type for SetIndexBuffer() used to move data with Vector::Swap()
index 698e625..4714bc2 100644 (file)
@@ -44,7 +44,7 @@ class Animation;
 class CustomActor;
 class CustomActorImpl;
 class RelayoutContainer;
-struct KeyEvent;
+class KeyEvent;
 class HoverEvent;
 class WheelEvent;
 struct Vector2;
@@ -326,7 +326,7 @@ protected: // For derived classes
     LAST_ACTOR_FLAG                             ///< Special marker for last actor flag @SINCE_1_0.0
   };
 
-  static const int32_t ACTOR_FLAG_COUNT = Log< LAST_ACTOR_FLAG - 1 >::value + 1;      ///< Value for deriving classes to continue on the flag enum
+  static constexpr int32_t ACTOR_FLAG_COUNT = Log< LAST_ACTOR_FLAG - 1 >::value + 1;      ///< Value for deriving classes to continue on the flag enum
 
   /**
    * @brief Creates a CustomActorImpl.
index 2fa2db1..644cfb5 100644 (file)
@@ -134,9 +134,9 @@ public:
    */
   enum EndAction
   {
-    Bake,     ///< When the animation ends, the animated property values are saved. @SINCE_1_0.0
-    Discard,  ///< When the animation ends, the animated property values are forgotten. @SINCE_1_0.0
-    BakeFinal ///< If the animation is stopped, the animated property values are saved as if the animation had run to completion, otherwise behaves like Bake. @SINCE_1_0.0
+    BAKE,     ///< When the animation ends, the animated property values are saved. @SINCE_1_0.0
+    DISCARD,  ///< When the animation ends, the animated property values are forgotten. @SINCE_1_0.0
+    BAKE_FINAL ///< If the animation is stopped, the animated property values are saved as if the animation had run to completion, otherwise behaves like Bake. @SINCE_1_0.0
   };
 
   /**
@@ -145,8 +145,8 @@ public:
    */
   enum Interpolation
   {
-    Linear,   ///< Values in between key frames are interpolated using a linear polynomial. (Default) @SINCE_1_0.0
-    Cubic     ///< Values in between key frames are interpolated using a cubic polynomial. @SINCE_1_0.0
+    LINEAR,   ///< Values in between key frames are interpolated using a linear polynomial. (Default) @SINCE_1_0.0
+    CUBIC     ///< Values in between key frames are interpolated using a cubic polynomial. @SINCE_1_0.0
   };
 
   /**
diff --git a/dali/public-api/common/constants.cpp b/dali/public-api/common/constants.cpp
deleted file mode 100644 (file)
index ca1d222..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 2015 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.
- *
- */
-
-// CLASS HEADER
-#include <dali/public-api/common/constants.h>
-
-// EXTERNAL INCLUDES
-#include <string>
-
-// INTERNAL INCLUDES
-#include <dali/public-api/math/compile-time-math.h>
-#include <dali/public-api/math/degree.h>
-
-namespace Dali
-{
-
-const Vector3 ParentOrigin::TOP_LEFT     (0.0f, 0.0f, 0.5f);
-const Vector3 ParentOrigin::TOP_CENTER   (0.5f, 0.0f, 0.5f);
-const Vector3 ParentOrigin::TOP_RIGHT    (1.0f, 0.0f, 0.5f);
-const Vector3 ParentOrigin::CENTER_LEFT  (0.0f, 0.5f, 0.5f);
-const Vector3 ParentOrigin::CENTER       (0.5f, 0.5f, 0.5f);
-const Vector3 ParentOrigin::CENTER_RIGHT (1.0f, 0.5f, 0.5f);
-const Vector3 ParentOrigin::BOTTOM_LEFT  (0.0f, 1.0f, 0.5f);
-const Vector3 ParentOrigin::BOTTOM_CENTER(0.5f, 1.0f, 0.5f);
-const Vector3 ParentOrigin::BOTTOM_RIGHT (1.0f, 1.0f, 0.5f);
-
-const Vector3 ParentOrigin::DEFAULT( ParentOrigin::TOP_LEFT );
-
-const Vector3 AnchorPoint::TOP_LEFT     (0.0f, 0.0f, 0.5f);
-const Vector3 AnchorPoint::TOP_CENTER   (0.5f, 0.0f, 0.5f);
-const Vector3 AnchorPoint::TOP_RIGHT    (1.0f, 0.0f, 0.5f);
-const Vector3 AnchorPoint::CENTER_LEFT  (0.0f, 0.5f, 0.5f);
-const Vector3 AnchorPoint::CENTER       (0.5f, 0.5f, 0.5f);
-const Vector3 AnchorPoint::CENTER_RIGHT (1.0f, 0.5f, 0.5f);
-const Vector3 AnchorPoint::BOTTOM_LEFT  (0.0f, 1.0f, 0.5f);
-const Vector3 AnchorPoint::BOTTOM_CENTER(0.5f, 1.0f, 0.5f);
-const Vector3 AnchorPoint::BOTTOM_RIGHT (1.0f, 1.0f, 0.5f);
-
-const Vector3 AnchorPoint::DEFAULT( AnchorPoint::CENTER );
-
-const Vector4 Color::BLACK( 0.0f, 0.0f, 0.0f, 1.0f );
-const Vector4 Color::WHITE( 1.0f, 1.0f, 1.0f, 1.0f );
-
-const Vector4 Color::RED(   1.0f, 0.0f, 0.0f, 1.0f );
-const Vector4 Color::GREEN( 0.0f, 1.0f, 0.0f, 1.0f );
-const Vector4 Color::BLUE(  0.0f, 0.0f, 1.0f, 1.0f );
-
-const Vector4 Color::YELLOW(  1.0f, 1.0f, 0.0f, 1.0f );
-const Vector4 Color::MAGENTA( 1.0f, 0.0f, 1.0f, 1.0f );
-const Vector4 Color::CYAN(    0.0f, 1.0f, 1.0f, 1.0f );
-
-const Vector4 Color::TRANSPARENT( 0.0f, 0.0f, 0.0f, 0.0f );
-
-// epsilon constants
-const float Math::MACHINE_EPSILON_0     = Epsilon<0>::value;
-const float Math::MACHINE_EPSILON_1     = Epsilon<1>::value;
-const float Math::MACHINE_EPSILON_10    = Epsilon<10>::value;
-const float Math::MACHINE_EPSILON_100   = Epsilon<100>::value;
-const float Math::MACHINE_EPSILON_1000  = Epsilon<1000>::value;
-const float Math::MACHINE_EPSILON_10000 = Epsilon<10000>::value;
-
-} // namespace Dali
index 9750c43..f2a7007 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_CONSTANTS_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,6 +22,7 @@
 #include <math.h> // M_PI
 
 // INTERNAL INCLUDES
+#include <dali/public-api/math/compile-time-math.h>
 #include <dali/public-api/math/vector3.h>
 #include <dali/public-api/math/vector4.h>
 
@@ -40,23 +41,21 @@ namespace Dali
  */
 namespace ParentOrigin
 {
-extern const Vector3 DEFAULT; ///< TOP_LEFT
-static const float TOP = 0.0f;
-static const float BOTTOM = 1.0f;
-static const float LEFT = 0.0f;
-static const float RIGHT = 1.0f;
-static const float MIDDLE = 0.5f;
-
-DALI_CORE_API extern const Vector3 TOP_LEFT;           ///< 0.0f, 0.0f, 0.5f
-DALI_CORE_API extern const Vector3 TOP_CENTER;         ///< 0.5f, 0.0f, 0.5f
-DALI_CORE_API extern const Vector3 TOP_RIGHT;          ///< 1.0f, 0.0f, 0.5f
-DALI_CORE_API extern const Vector3 CENTER_LEFT;        ///< 0.0f, 0.5f, 0.5f
-DALI_CORE_API extern const Vector3 CENTER;             ///< 0.5f, 0.5f, 0.5f
-DALI_CORE_API extern const Vector3 CENTER_RIGHT;       ///< 1.0f, 0.5f, 0.5f
-DALI_CORE_API extern const Vector3 BOTTOM_LEFT;        ///< 0.0f, 1.0f, 0.5f
-DALI_CORE_API extern const Vector3 BOTTOM_CENTER;      ///< 0.5f, 1.0f, 0.5f
-DALI_CORE_API extern const Vector3 BOTTOM_RIGHT;       ///< 1.0f, 1.0f, 0.5f
-
+static constexpr float TOP = 0.0f;
+static constexpr float BOTTOM = 1.0f;
+static constexpr float LEFT = 0.0f;
+static constexpr float RIGHT = 1.0f;
+static constexpr float MIDDLE = 0.5f;
+static constexpr Vector3 TOP_LEFT     (0.0f, 0.0f, 0.5f);
+static constexpr Vector3 TOP_CENTER   (0.5f, 0.0f, 0.5f);
+static constexpr Vector3 TOP_RIGHT    (1.0f, 0.0f, 0.5f);
+static constexpr Vector3 CENTER_LEFT  (0.0f, 0.5f, 0.5f);
+static constexpr Vector3 CENTER       (0.5f, 0.5f, 0.5f);
+static constexpr Vector3 CENTER_RIGHT (1.0f, 0.5f, 0.5f);
+static constexpr Vector3 BOTTOM_LEFT  (0.0f, 1.0f, 0.5f);
+static constexpr Vector3 BOTTOM_CENTER(0.5f, 1.0f, 0.5f);
+static constexpr Vector3 BOTTOM_RIGHT (1.0f, 1.0f, 0.5f);
+static constexpr Vector3 DEFAULT( TOP_LEFT );
 }
 
 /**
@@ -67,23 +66,21 @@ DALI_CORE_API extern const Vector3 BOTTOM_RIGHT;       ///< 1.0f, 1.0f, 0.5f
  */
 namespace AnchorPoint
 {
-static const float TOP = 0.0f;
-static const float BOTTOM = 1.0f;
-static const float LEFT = 0.0f;
-static const float RIGHT = 1.0f;
-static const float MIDDLE = 0.5f;
-
-extern const Vector3 DEFAULT; ///< CENTER
-DALI_CORE_API extern const Vector3 TOP_LEFT;           ///< 0.0f, 0.0f, 0.5f
-DALI_CORE_API extern const Vector3 TOP_CENTER;         ///< 0.5f, 0.0f, 0.5f
-DALI_CORE_API extern const Vector3 TOP_RIGHT;          ///< 1.0f, 0.0f, 0.5f
-DALI_CORE_API extern const Vector3 CENTER_LEFT;        ///< 0.0f, 0.5f, 0.5f
-DALI_CORE_API extern const Vector3 CENTER;             ///< 0.5f, 0.5f, 0.5f
-DALI_CORE_API extern const Vector3 CENTER_RIGHT;       ///< 1.0f, 0.5f, 0.5f
-DALI_CORE_API extern const Vector3 BOTTOM_LEFT;        ///< 0.0f, 1.0f, 0.5f
-DALI_CORE_API extern const Vector3 BOTTOM_CENTER;      ///< 0.5f, 1.0f, 0.5f
-DALI_CORE_API extern const Vector3 BOTTOM_RIGHT;       ///< 1.0f, 1.0f, 0.5f
-
+static constexpr float TOP = 0.0f;
+static constexpr float BOTTOM = 1.0f;
+static constexpr float LEFT = 0.0f;
+static constexpr float RIGHT = 1.0f;
+static constexpr float MIDDLE = 0.5f;
+static constexpr Vector3 TOP_LEFT     (0.0f, 0.0f, 0.5f);
+static constexpr Vector3 TOP_CENTER   (0.5f, 0.0f, 0.5f);
+static constexpr Vector3 TOP_RIGHT    (1.0f, 0.0f, 0.5f);
+static constexpr Vector3 CENTER_LEFT  (0.0f, 0.5f, 0.5f);
+static constexpr Vector3 CENTER       (0.5f, 0.5f, 0.5f);
+static constexpr Vector3 CENTER_RIGHT (1.0f, 0.5f, 0.5f);
+static constexpr Vector3 BOTTOM_LEFT  (0.0f, 1.0f, 0.5f);
+static constexpr Vector3 BOTTOM_CENTER(0.5f, 1.0f, 0.5f);
+static constexpr Vector3 BOTTOM_RIGHT (1.0f, 1.0f, 0.5f);
+static constexpr Vector3 DEFAULT( CENTER );
 }
 
 
@@ -95,18 +92,15 @@ DALI_CORE_API extern const Vector3 BOTTOM_RIGHT;       ///< 1.0f, 1.0f, 0.5f
  */
 namespace Color
 {
-DALI_CORE_API extern const Vector4 BLACK;       ///< Pure black (0.0f, 0.0f, 0.0f, 1.0f);
-DALI_CORE_API extern const Vector4 WHITE;       ///< Pure white (1.0f, 1.0f, 1.0f, 1.0f);
-
-DALI_CORE_API extern const Vector4 RED;         ///< Pure red   (1.0f, 0.0f, 0.0f, 1.0f);
-DALI_CORE_API extern const Vector4 GREEN;       ///< Pure green (0.0f, 1.0f, 0.0f, 1.0f);
-DALI_CORE_API extern const Vector4 BLUE;        ///< Pure blue  (0.0f, 0.0f, 1.0f, 1.0f);
-
-DALI_CORE_API extern const Vector4 YELLOW;      ///< Pure yellow  (1.0f, 1.0f, 0.0f, 1.0f);
-DALI_CORE_API extern const Vector4 MAGENTA;     ///< Pure magenta (1.0f, 0.0f, 1.0f, 1.0f);
-DALI_CORE_API extern const Vector4 CYAN;        ///< Pure cyan    (0.0f, 1.0f, 1.0f, 1.0f);
-
-DALI_CORE_API extern const Vector4 TRANSPARENT; ///< Black transparent (0.0f, 0.0f, 0.0f, 0.0f);
+static constexpr Vector4 BLACK( 0.0f, 0.0f, 0.0f, 1.0f );
+static constexpr Vector4 WHITE( 1.0f, 1.0f, 1.0f, 1.0f );
+static constexpr Vector4 RED(   1.0f, 0.0f, 0.0f, 1.0f );
+static constexpr Vector4 GREEN( 0.0f, 1.0f, 0.0f, 1.0f );
+static constexpr Vector4 BLUE(  0.0f, 0.0f, 1.0f, 1.0f );
+static constexpr Vector4 YELLOW(  1.0f, 1.0f, 0.0f, 1.0f );
+static constexpr Vector4 MAGENTA( 1.0f, 0.0f, 1.0f, 1.0f );
+static constexpr Vector4 CYAN(    0.0f, 1.0f, 1.0f, 1.0f );
+static constexpr Vector4 TRANSPARENT( 0.0f, 0.0f, 0.0f, 0.0f );
 
 } // namespace Color
 
@@ -116,19 +110,19 @@ DALI_CORE_API extern const Vector4 TRANSPARENT; ///< Black transparent (0.0f, 0.
  */
 namespace Math
 {
-DALI_CORE_API extern const float MACHINE_EPSILON_0;      ///< Epsilon for values near zero
-DALI_CORE_API extern const float MACHINE_EPSILON_1;      ///< Epsilon for values near 1
-DALI_CORE_API extern const float MACHINE_EPSILON_10;     ///< Epsilon for values near 10
-DALI_CORE_API extern const float MACHINE_EPSILON_100;    ///< Epsilon for values near 100
-DALI_CORE_API extern const float MACHINE_EPSILON_1000;   ///< Epsilon for values near 1000
-DALI_CORE_API extern const float MACHINE_EPSILON_10000;  ///< Epsilon for values near 10000
+static constexpr float MACHINE_EPSILON_0     = Epsilon<0>::value;
+static constexpr float MACHINE_EPSILON_1     = Epsilon<1>::value;
+static constexpr float MACHINE_EPSILON_10    = Epsilon<10>::value;
+static constexpr float MACHINE_EPSILON_100   = Epsilon<100>::value;
+static constexpr float MACHINE_EPSILON_1000  = Epsilon<1000>::value;
+static constexpr float MACHINE_EPSILON_10000 = Epsilon<10000>::value;
 
 // float is preferred to double for performance on ARM targets
-static const float PI   = static_cast<float>(M_PI);       ///< Constant representing PI
-static const float PI_2 = static_cast<float>(M_PI_2);     ///< Constant representing PI/2
-static const float PI_4 = static_cast<float>(M_PI_4);     ///< Constant representing PI/4
-static const float PI_OVER_180 = Dali::Math::PI/180.0f;   ///< Constant used to convert degree to radian
-static const float ONE80_OVER_PI = 180.0f/Dali::Math::PI; ///< Constant used to convert radian to degree
+static constexpr float PI   = static_cast<float>(M_PI);       ///< Pi
+static constexpr float PI_2 = static_cast<float>(M_PI_2);     ///< Pi/2
+static constexpr float PI_4 = static_cast<float>(M_PI_4);     ///< Pi/4
+static constexpr float PI_OVER_180 = Dali::Math::PI/180.0f;   ///< Constant used to convert degree to radian
+static constexpr float ONE80_OVER_PI = 180.0f/Dali::Math::PI; ///< Constant used to convert radian to degree
 
 } // namespace Math
 
index 5b668f5..c858328 100755 (executable)
 #if __GNUC__ >= 4
 #  ifndef HIDE_DALI_INTERNALS
 #    define DALI_EXPORT_API
+#    define DALI_NO_EXPORT_API
 #    define DALI_IMPORT_API
 #    define DALI_CORE_API
 #    define DALI_INTERNAL
 #  else
 #    define DALI_EXPORT_API __attribute__ ((visibility ("default")))
+#    define DALI_NO_EXPORT_API __attribute__ ((visibility ("hidden")))
 #    define DALI_IMPORT_API __attribute__ ((visibility ("default")))
 #    define DALI_CORE_API   __attribute__ ((visibility ("default")))
 #    define DALI_INTERNAL   __attribute__ ((visibility ("hidden")))
@@ -65,6 +67,7 @@
 #endif
 /** Visibility attribute to hide declarations */
 #  define DALI_INTERNAL
+#  define DALI_NO_EXPORT_API
 #endif
 
 #ifdef DEPRECATION_WARNING
index 9ae40e2..6396028 100755 (executable)
@@ -692,6 +692,19 @@ public: // API
   }
 
   /**
+   * @brief Resizes the vector without initializing the data.
+   *
+   * Can be used as a data container for reading whole file content.
+   * @SINCE_1_9.27
+   * @param[in] count Count to resize to
+   */
+  void ResizeUninitialized( SizeType count )
+  {
+    Reserve( count );
+    VectorBase::SetCount( count );
+  }
+
+  /**
    * @brief Resizes the vector. Does not change capacity.
    *
    * @SINCE_1_0.0
index a32b939..9cee3fd 100644 (file)
@@ -28,7 +28,7 @@ namespace Dali
 
 const uint32_t CORE_MAJOR_VERSION = 1;
 const uint32_t CORE_MINOR_VERSION = 9;
-const uint32_t CORE_MICRO_VERSION = 26;
+const uint32_t CORE_MICRO_VERSION = 27;
 const char * const CORE_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index 6627929..a53cb12 100644 (file)
@@ -56,6 +56,8 @@
 #include <dali/public-api/events/pinch-gesture-detector.h>
 #include <dali/public-api/events/pinch-gesture.h>
 #include <dali/public-api/events/point-state.h>
+#include <dali/public-api/events/rotation-gesture-detector.h>
+#include <dali/public-api/events/rotation-gesture.h>
 #include <dali/public-api/events/tap-gesture-detector.h>
 #include <dali/public-api/events/tap-gesture.h>
 #include <dali/public-api/events/touch-event.h>
 
 #include <dali/public-api/rendering/frame-buffer.h>
 #include <dali/public-api/rendering/geometry.h>
-#include <dali/public-api/rendering/property-buffer.h>
 #include <dali/public-api/rendering/renderer.h>
 #include <dali/public-api/rendering/sampler.h>
 #include <dali/public-api/rendering/shader.h>
 #include <dali/public-api/rendering/texture.h>
 #include <dali/public-api/rendering/texture-set.h>
+#include <dali/public-api/rendering/vertex-buffer.h>
 
 #include <dali/public-api/signals/base-signal.h>
 #include <dali/public-api/signals/callback.h>
index 0dcdc14..0e9a6ff 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_GESTURE_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.
@@ -80,7 +80,8 @@ struct DALI_CORE_API Gesture
     Pinch      = 1 << 0, ///< When two touch points move away or towards each other. @SINCE_1_0.0
     Pan        = 1 << 1, ///< When the user drags their finger(s) in a particular direction. @SINCE_1_0.0
     Tap        = 1 << 2, ///< When the user taps the screen. @SINCE_1_0.0
-    LongPress  = 1 << 3  ///< When the user continues to touch the same area on the screen for the device configured time. @SINCE_1_0.0
+    LongPress  = 1 << 3, ///< When the user continues to touch the same area on the screen for the device configured time. @SINCE_1_0.0
+    Rotation   = 1 << 4, ///< When the user rotates two fingers around a particular ares of the screen. @SINCE_1_9.27
   };
 
   /**
index 30a1323..9b3bba8 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.
 namespace Dali
 {
 
-namespace
+KeyEvent::KeyEvent()
+: BaseHandle()
 {
-const uint32_t MODIFIER_SHIFT = 0x1;
-const uint32_t MODIFIER_CTRL  = 0x2;
-const uint32_t MODIFIER_ALT   = 0x4;
-const int32_t KEY_INVALID_CODE = -1;
 }
 
-KeyEvent::KeyEvent()
-: keyPressedName(""),
-  keyPressed(""),
-  keyCode(KEY_INVALID_CODE),
-  keyModifier(0),
-  time(0),
-  state(KeyEvent::Down)
+KeyEvent::KeyEvent( const KeyEvent& rhs ) = default;
+
+KeyEvent::KeyEvent( KeyEvent&& rhs ) = default;
+
+KeyEvent::~KeyEvent()
 {
-  new Internal::KeyEventImpl( this );
 }
 
-KeyEvent::KeyEvent(const std::string& keyName, const std::string& keyString, int32_t keyCode, int32_t keyModifier,unsigned long timeStamp, const State& keyState)
-: keyPressedName(keyName),
-  keyPressed(keyString),
-  keyCode(keyCode),
-  keyModifier(keyModifier),
-  time(timeStamp),
-  state(keyState)
+KeyEvent& KeyEvent::operator=( const KeyEvent& rhs ) = default;
+
+KeyEvent& KeyEvent::operator=( KeyEvent&& rhs ) = default;
+
+bool KeyEvent::IsShiftModifier() const
 {
-  new Internal::KeyEventImpl( this );
+  return GetImplementation( *this ).IsShiftModifier();
 }
 
-KeyEvent::KeyEvent( const KeyEvent& rhs )
-: keyPressedName( rhs.keyPressedName ),
-  keyPressed( rhs.keyPressed ),
-  keyCode( rhs.keyCode ),
-  keyModifier( rhs.keyModifier ),
-  time( rhs.time ),
-  state( rhs.state )
+bool KeyEvent::IsCtrlModifier() const
 {
-  Internal::KeyEventImpl* impl = new Internal::KeyEventImpl( this );
-  *impl = *GetImplementation( &rhs );
+  return GetImplementation( *this ).IsCtrlModifier();
 }
 
-KeyEvent& KeyEvent::operator=( const KeyEvent& rhs )
+bool KeyEvent::IsAltModifier() const
 {
-  if( this != &rhs )
-  {
-    keyPressedName = rhs.keyPressedName;
-    keyPressed = rhs.keyPressed;
-    keyCode = rhs.keyCode;
-    keyModifier = rhs.keyModifier;
-    time = rhs.time;
-    state = rhs.state;
-
-    *GetImplementation( this ) = *GetImplementation( &rhs );
-  }
-
-  return *this;
+  return GetImplementation( *this ).IsAltModifier();
 }
 
-KeyEvent::~KeyEvent()
+const std::string& KeyEvent::GetCompose() const
 {
-  delete GetImplementation( this );
+  return GetImplementation( *this ).GetCompose();
 }
 
-bool KeyEvent::IsShiftModifier() const
+const std::string& KeyEvent::GetDeviceName() const
 {
-  if ((MODIFIER_SHIFT & keyModifier) == MODIFIER_SHIFT)
-  {
-    return true;
-  }
+  return GetImplementation( *this ).GetDeviceName();
+}
 
-  return false;
+Device::Class::Type KeyEvent::GetDeviceClass() const
+{
+  return GetImplementation( *this ).GetDeviceClass();
 }
 
-bool KeyEvent::IsCtrlModifier() const
+Device::Subclass::Type KeyEvent::GetDeviceSubclass() const
 {
-  if ((MODIFIER_CTRL & keyModifier) == MODIFIER_CTRL)
-  {
-    return true;
-  }
+  return GetImplementation( *this ).GetDeviceSubclass();
+}
 
-  return false;
+const std::string& KeyEvent::GetKeyName() const
+{
+  return GetImplementation( *this ).GetKeyName();
 }
 
-bool KeyEvent::IsAltModifier() const
+const std::string& KeyEvent::GetKeyString() const
 {
-  if ((MODIFIER_ALT & keyModifier) == MODIFIER_ALT)
-  {
-    return true;
-  }
+  return GetImplementation( *this ).GetKeyString();
+}
 
-  return false;
+const std::string& KeyEvent::GetLogicalKey() const
+{
+  return GetImplementation( *this ).GetLogicalKey();
 }
 
-std::string KeyEvent::GetCompose() const
+int32_t KeyEvent::GetKeyCode() const
 {
-  return GetImplementation( this )->GetCompose();
+  return GetImplementation( *this ).GetKeyCode();
 }
 
-std::string KeyEvent::GetDeviceName() const
+int32_t KeyEvent::GetKeyModifier() const
 {
-  return GetImplementation( this )->GetDeviceName();
+  return GetImplementation( *this ).GetKeyModifier();
 }
 
-Device::Class::Type KeyEvent::GetDeviceClass() const
+unsigned long KeyEvent::GetTime() const
 {
-  return GetImplementation( this )->GetDeviceClass();
+  return GetImplementation( *this ).GetTime();
 }
 
-Device::Subclass::Type KeyEvent::GetDeviceSubclass() const
+KeyEvent::State KeyEvent::GetState() const
 {
-  return GetImplementation( this )->GetDeviceSubclass();
+  return GetImplementation( *this ).GetState();
 }
 
+KeyEvent::KeyEvent( Internal::KeyEvent* internal )
+: BaseHandle( internal )
+{
+}
 
 } // namespace Dali
index 6cd17ad..3b8884c 100755 (executable)
@@ -2,7 +2,7 @@
 #define DALI_KEY_EVENT_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.
 
 // INTERNAL INCLUDES
 #include <dali/public-api/common/dali-common.h>
+#include <dali/public-api/object/base-handle.h>
 #include <dali/public-api/events/device.h>
 
 namespace Dali
 {
+
+namespace Internal DALI_INTERNAL
+{
+class KeyEvent;
+}
+
 /**
  * @addtogroup dali_core_events
  * @{
  */
 
 /**
- * @brief The key event structure is used to store a key press.
+ * @brief The key event class is used to store a key press.
  *
  * It facilitates processing of these key presses and passing to other
  * libraries like Toolkit. The keyString is the actual character you
@@ -48,39 +55,30 @@ namespace Dali
  * module.
  * @SINCE_1_0.0
  */
-struct DALI_CORE_API KeyEvent
+class DALI_CORE_API KeyEvent : public BaseHandle
 {
+
+public:
+
   // Enumerations
 
   /**
    * @brief Enumeration for specifying the state of the key event.
-   * @SINCE_1_0.0
+   * @SINCE_1_9.27
    */
   enum State
   {
-    Down,        ///< Key down @SINCE_1_0.0
-    Up,          ///< Key up @SINCE_1_0.0
-    Last
+    DOWN,        ///< Key down @SINCE_1_9.27
+    UP,          ///< Key up @SINCE_1_9.27
   };
 
   /**
-   * @brief Default constructor.
-   * @SINCE_1_0.0
-   */
-  KeyEvent();
-
-  /**
-   * @brief Constructor.
+   * @brief An uninitialized KeyEvent instance.
    *
+   * Calling member functions with an uninitialized KeyEvent handle is not allowed.
    * @SINCE_1_0.0
-   * @param[in] keyName The name of the key pressed or command from the IMF, if later then the some following parameters will be needed
-   * @param[in] keyString A string of input characters or key pressed
-   * @param[in] keyCode The unique key code for the key pressed
-   * @param[in] keyModifier The key modifier for special keys like shift and alt
-   * @param[in] timeStamp The time (in ms) that the key event occurred
-   * @param[in] keyState The state of the key event
    */
-  KeyEvent(const std::string& keyName, const std::string& keyString, int32_t keyCode, int32_t keyModifier, unsigned long timeStamp, const State& keyState);
+  KeyEvent();
 
   /**
    * @brief Copy constructor.
@@ -90,7 +88,15 @@ struct DALI_CORE_API KeyEvent
   KeyEvent( const KeyEvent& rhs );
 
   /**
-   * @brief Assignment operator.
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.27
+   * @param[in] rhs A reference to the moved handle
+   */
+  KeyEvent( KeyEvent&& rhs );
+
+  /**
+   * @brief Copy assignment operator.
    * @SINCE_1_2.36
    * @param[in] rhs A reference to the copied handle
    * @return A reference to this
@@ -98,6 +104,15 @@ struct DALI_CORE_API KeyEvent
   KeyEvent& operator=( const KeyEvent& rhs );
 
   /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_9.27
+   * @param[in] rhs A reference to the moved handle
+   * @return A reference to this
+   */
+  KeyEvent& operator=( KeyEvent&& rhs );
+
+  /**
    * @brief Destructor.
    * @SINCE_1_0.0
    */
@@ -130,18 +145,18 @@ struct DALI_CORE_API KeyEvent
   /**
    * @brief Get the key compose string.
    *
-   * @SINCE_1_3.22
+   * @SINCE_1_9.27
    * @return The compose string
    */
-  std::string GetCompose() const;
+  const std::string& GetCompose() const;
 
   /**
    * @brief Get the device name the key event originated from.
    *
-   * @SINCE_1_2.60
+   * @SINCE_1_9.27
    * @return The device name
    */
-  std::string GetDeviceName() const;
+  const std::string& GetDeviceName() const;
 
   /**
    * @brief Get the device class the key event originated from.
@@ -161,45 +176,83 @@ struct DALI_CORE_API KeyEvent
    */
   Device::Subclass::Type GetDeviceSubclass() const;
 
-  // Data
+  /**
+   * @brief Get the name given to the key pressed or command from the IMF
+   *
+   * @SINCE_1_9.27
+   * @return The name given to the key pressed.
+   */
+  const std::string& GetKeyName() const;
 
   /**
-   * @brief Name given to the key pressed.
+   * @brief Get the actual string of input characters that should be used for input editors.
+   *
+   * @SINCE_1_9.27
+   * @return The actual string of input characters
    */
-  std::string keyPressedName;
+  const std::string& GetKeyString() const;
 
   /**
-   * @brief The actual string returned that should be used for input editors.
+   * @brief Gets the logical key string.
+   *
+   * For example, when the user presses 'shift' key and '1' key together, the logical key is "exclamation".
+   * Plus, the key name is "1", and the key string is "!".
+   *
+   * @SINCE_1_9.27
+   * @return The logical key symbol
    */
-  std::string keyPressed;
+  const std::string& GetLogicalKey() const;
 
   /**
-   * @brief Keycode for the key pressed.
+   * @brief Get the unique key code for the key pressed.
+   *
+   * @SINCE_1_9.27
+   * @return The unique key code for the key pressed
    *
-   * @remarks We recommend not to use this key code value
-   * directly because its meaning might be changed in the future. Currently, it means a
-   * platform-specific key code. You need to use IsKey() to know what a key event means
-   * instead of direct comparison of key code value.
+   * @remarks We recommend not to use this key code value directly because its meaning
+   * might be changed in the future. Currently, it means a platform-specific key code.
+   * You need to use IsKey() to know what a key event means instead of direct comparison
+   * of key code value.
    */
-  int32_t keyCode;
+  int32_t GetKeyCode() const;
 
   /**
-   * @brief special keys like shift, alt and control which modify the next key pressed.
+   * @brief Return the key modifier for special keys like Shift, Alt and Ctrl which modify the next key pressed.
+   *
+   * @SINCE_1_9.27
+   * @return The key modifier
    */
-  int32_t keyModifier;
+  int32_t GetKeyModifier() const;
 
   /**
-   * @brief The time (in ms) that the key event occurred.
+   * @brief Get the time (in ms) that the key event occurred.
+   *
+   * @SINCE_1_9.27
+   * @return The time (in ms)
    */
-  unsigned long time;
+  unsigned long GetTime() const;
 
   /**
-   * @brief State of the key event.
+   * @brief Get the state of the key event.
    *
    * @see State
+   *
+   * @SINCE_1_9.27
+   * @return The state of the key event
    */
-  State state;
+  State GetState() const;
 
+public: // Not intended for application developers
+
+  /// @cond internal
+  /**
+   * @brief This constructor is used internally to Create an initialized KeyEvent handle.
+   *
+   * @SINCE_1_9.27
+   * @param[in] keyEvent A pointer to a newly allocated Dali resource
+   */
+  explicit DALI_INTERNAL KeyEvent( Internal::KeyEvent* keyEvent );
+  /// @endcond
 };
 
 /**
@@ -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.
@@ -16,7 +16,7 @@
  */
 
 // CLASS HEADER
-#include <dali/devel-api/events/rotation-gesture-detector.h>
+#include <dali/public-api/events/rotation-gesture-detector.h>
 
 // INTERNAL INCLUDES
 #include <dali/internal/event/events/rotation-gesture/rotation-gesture-detector-impl.h>
@@ -2,7 +2,7 @@
 #define DALI_ROTATION_GESTURE_DETECTOR_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.
@@ -51,6 +51,8 @@ struct RotationGesture;
  * | %Signal Name      | Method                |
  * |-------------------|-----------------------|
  * | rotationDetected  | @ref DetectedSignal() |
+ *
+ * @SINCE_1_9.27
  */
 class DALI_CORE_API RotationGestureDetector : public GestureDetector
 {
@@ -66,6 +68,7 @@ public: // Creation & Destruction
   /**
    * @brief Creates an uninitialized RotationGestureDetector; this can be initialized with RotationGestureDetector::New().
    *
+   * @SINCE_1_9.27
    * Calling member functions with an uninitialized RotationGestureDetector handle is not allowed.
    */
   RotationGestureDetector();
@@ -73,6 +76,7 @@ public: // Creation & Destruction
   /**
    * @brief Creates an initialized RotationGestureDetector.
    *
+   * @SINCE_1_9.27
    * @return A handle to a newly allocated Dali resource
    */
   static RotationGestureDetector New();
@@ -80,6 +84,7 @@ public: // Creation & Destruction
   /**
    * @brief Downcasts a handle to RotationGestureDetector handle.
    *
+   * @SINCE_1_9.27
    * If handle points to a RotationGestureDetector object, the
    * downcast produces valid handle. If not, the returned handle is left uninitialized.
    * @param[in] handle Handle to an object
@@ -90,6 +95,7 @@ public: // Creation & Destruction
   /**
    * @brief Destructor.
    *
+   * @SINCE_1_9.27
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
    */
   ~RotationGestureDetector();
@@ -97,6 +103,7 @@ public: // Creation & Destruction
   /**
    * @brief This copy constructor is required for (smart) pointer semantics.
    *
+   * @SINCE_1_9.27
    * @param[in] handle A reference to the copied handle
    */
   RotationGestureDetector(const RotationGestureDetector& handle);
@@ -104,6 +111,7 @@ public: // Creation & Destruction
   /**
    * @brief This assignment operator is required for (smart) pointer semantics.
    *
+   * @SINCE_1_9.27
    * @param[in] rhs A reference to the copied handle
    * @return A reference to this
    */
@@ -118,6 +126,7 @@ public: // Signals
    * @code
    *   void YourCallbackName( Actor actor, const RotationGesture& gesture );
    * @endcode
+   * @SINCE_1_9.27
    * @return The signal to connect to
    * @pre The gesture detector has been initialized.
    */
@@ -129,6 +138,7 @@ public: // Not intended for Application developers
   /**
    * @brief This constructor is used by RotationGestureDetector::New() methods.
    *
+   * @SINCE_1_9.27
    * @param[in] internal A pointer to a newly allocated Dali resource
    */
   explicit DALI_INTERNAL RotationGestureDetector(Internal::RotationGestureDetector* internal);
similarity index 84%
rename from dali/devel-api/events/rotation-gesture.cpp
rename to dali/public-api/events/rotation-gesture.cpp
index 05b1258..03d6d81 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.
  */
 
 // CLASS HEADER
-#include <dali/devel-api/events/rotation-gesture.h>
+#include <dali/public-api/events/rotation-gesture.h>
 
 // INTERNAL INCLUDES
 #include <dali/public-api/common/dali-common.h>
-#include <dali/devel-api/events/gesture-devel.h>
 
 namespace Dali
 {
 
 RotationGesture::RotationGesture( Gesture::State state )
-: Gesture( static_cast< Gesture::Type >( DevelGesture::Rotation ), state )
+: Gesture( Gesture::Rotation, state )
 {
 }
 
similarity index 92%
rename from dali/devel-api/events/rotation-gesture.h
rename to dali/public-api/events/rotation-gesture.h
index 5f3e2f8..fa3894f 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_ROTATION_GESTURE_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.
@@ -37,6 +37,7 @@ namespace Dali
  *
  * A rotation gesture will continue to be sent to the actor under the center point of the rotation
  * until the rotation ends.
+ * @SINCE_1_9.27
  */
 struct DALI_CORE_API RotationGesture: public Gesture
 {
@@ -44,19 +45,21 @@ struct DALI_CORE_API RotationGesture: public Gesture
 
   /**
    * @brief Default Constructor.
-   *
+   * @SINCE_1_9.27
    * @param[in] state The state of the gesture
    */
   RotationGesture( Gesture::State state );
 
   /**
    * @brief Copy constructor.
+   * @SINCE_1_9.27
    * @param[in] rhs A reference to the copied handle
    */
   RotationGesture( const RotationGesture& rhs );
 
   /**
    * @brief Assignment operator.
+   * @SINCE_1_9.27
    * @param[in] rhs A reference to the copied handle
    * @return A reference to this
    */
@@ -64,6 +67,7 @@ struct DALI_CORE_API RotationGesture: public Gesture
 
   /**
    * @brief Virtual destructor.
+   * @SINCE_1_9.27
    */
   virtual ~RotationGesture();
 
@@ -71,16 +75,19 @@ struct DALI_CORE_API RotationGesture: public Gesture
 
   /**
    * @brief The overall rotation from the start of the rotation gesture till the latest rotation gesture.
+   * @SINCE_1_9.27
    */
   Radian rotation;
 
   /**
    * @brief The center point of the two points that caused the rotation gesture in screen coordinates.
+   * @SINCE_1_9.27
    */
   Vector2 screenCenterPoint;
 
   /**
    * @brief The center point of the two points that caused the rotation gesture in local actor coordinates.
+   * @SINCE_1_9.27
    */
   Vector2 localCenterPoint;
 };
index a9c0577..9675830 100644 (file)
@@ -16,7 +16,6 @@ SET( public_api_src_files
   ${public_api_src_dir}/animation/linear-constrainer.cpp
   ${public_api_src_dir}/animation/path.cpp
   ${public_api_src_dir}/animation/time-period.cpp
-  ${public_api_src_dir}/common/constants.cpp
   ${public_api_src_dir}/common/dali-common.cpp
   ${public_api_src_dir}/common/dali-vector.cpp
   ${public_api_src_dir}/common/extents.cpp
@@ -31,6 +30,8 @@ SET( public_api_src_files
   ${public_api_src_dir}/events/pan-gesture-detector.cpp
   ${public_api_src_dir}/events/pinch-gesture.cpp
   ${public_api_src_dir}/events/pinch-gesture-detector.cpp
+  ${public_api_src_dir}/events/rotation-gesture.cpp
+  ${public_api_src_dir}/events/rotation-gesture-detector.cpp
   ${public_api_src_dir}/events/tap-gesture.cpp
   ${public_api_src_dir}/events/tap-gesture-detector.cpp
   ${public_api_src_dir}/events/touch-point.cpp
@@ -42,13 +43,15 @@ SET( public_api_src_files
   ${public_api_src_dir}/math/matrix.cpp
   ${public_api_src_dir}/math/matrix3.cpp
   ${public_api_src_dir}/math/quaternion.cpp
+  ${public_api_src_dir}/math/rect.cpp
   ${public_api_src_dir}/math/vector2.cpp
   ${public_api_src_dir}/math/vector3.cpp
   ${public_api_src_dir}/math/vector4.cpp
   ${public_api_src_dir}/object/any.cpp
   ${public_api_src_dir}/object/base-handle.cpp
-  ${public_api_src_dir}/object/handle.cpp
   ${public_api_src_dir}/object/base-object.cpp
+  ${public_api_src_dir}/object/handle.cpp
+  ${public_api_src_dir}/object/indirect-value.cpp
   ${public_api_src_dir}/object/object-registry.cpp
   ${public_api_src_dir}/object/property.cpp
   ${public_api_src_dir}/object/property-array.cpp
@@ -64,7 +67,7 @@ SET( public_api_src_files
   ${public_api_src_dir}/render-tasks/render-task-list.cpp
   ${public_api_src_dir}/rendering/frame-buffer.cpp
   ${public_api_src_dir}/rendering/geometry.cpp
-  ${public_api_src_dir}/rendering/property-buffer.cpp
+  ${public_api_src_dir}/rendering/vertex-buffer.cpp
   ${public_api_src_dir}/rendering/texture.cpp
   ${public_api_src_dir}/rendering/texture-set.cpp
   ${public_api_src_dir}/rendering/renderer.cpp
@@ -141,6 +144,8 @@ SET( public_api_core_events_header_files
   ${public_api_src_dir}/events/pinch-gesture.h
   ${public_api_src_dir}/events/pinch-gesture-detector.h
   ${public_api_src_dir}/events/point-state.h
+  ${public_api_src_dir}/events/rotation-gesture.h
+  ${public_api_src_dir}/events/rotation-gesture-detector.h
   ${public_api_src_dir}/events/tap-gesture.h
   ${public_api_src_dir}/events/tap-gesture-detector.h
   ${public_api_src_dir}/events/touch-point.h
@@ -181,6 +186,7 @@ SET( public_api_core_object_header_files
   ${public_api_src_dir}/object/base-handle.h
   ${public_api_src_dir}/object/base-object.h
   ${public_api_src_dir}/object/handle.h
+  ${public_api_src_dir}/object/indirect-value.h
   ${public_api_src_dir}/object/object-registry.h
   ${public_api_src_dir}/object/property-array.h
   ${public_api_src_dir}/object/property-conditions.h
@@ -210,7 +216,7 @@ SET( public_api_core_render_tasks_header_files
 SET( public_api_core_rendering_header_files
   ${public_api_src_dir}/rendering/frame-buffer.h
   ${public_api_src_dir}/rendering/geometry.h
-  ${public_api_src_dir}/rendering/property-buffer.h
+  ${public_api_src_dir}/rendering/vertex-buffer.h
   ${public_api_src_dir}/rendering/texture.h
   ${public_api_src_dir}/rendering/texture-set.h
   ${public_api_src_dir}/rendering/renderer.h
index cf695dd..e2bfca9 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.
@@ -29,17 +29,4 @@ Degree::Degree( Radian radian )
 {
 }
 
-const Radian ANGLE_360 = Radian( Math::PI * 2.f     ); ///< 360 degree turn in radians
-const Radian ANGLE_315 = Radian( Math::PI * 1.75f   ); ///< 315 degree turn in radians
-const Radian ANGLE_270 = Radian( Math::PI * 1.5f    ); ///< 270 degree turn in radians
-const Radian ANGLE_225 = Radian( Math::PI * 1.25f   ); ///< 225 degree turn in radians
-const Radian ANGLE_180 = Radian( Math::PI           ); ///< 180 degree turn in radians
-const Radian ANGLE_135 = Radian( Math::PI * 0.75f   ); ///< 135 degree turn in radians
-const Radian ANGLE_120 = Radian( Math::PI * 2.f/3.f ); ///< 120 degree turn in radians
-const Radian ANGLE_90  = Radian( Math::PI_2         ); ///< 90 degree turn in radians
-const Radian ANGLE_60  = Radian( Math::PI / 3.f     ); ///< 60 degree turn in radians
-const Radian ANGLE_45  = Radian( Math::PI_4         ); ///< 45 degree turn in radians
-const Radian ANGLE_30  = Radian( Math::PI / 6.f     ); ///< 30 degree turn in radians
-const Radian ANGLE_0   = Radian( 0.0f               ); ///< 0 degree turn in radians
-
 } // namespace Dali
index f7d900f..cefaa98 100644 (file)
@@ -54,7 +54,7 @@ struct Degree
    * @SINCE_1_0.0
    * @param[in] value The initial value in degrees
    */
-  explicit Degree( float value )
+  explicit constexpr Degree( float value )
   : degree( value )
   { }
 
@@ -82,19 +82,6 @@ public:
 
 // compiler generated destructor, copy constructor and assignment operators are ok as this class is POD
 
-// useful constant angles
-DALI_CORE_API extern const Radian ANGLE_360; ///< 360 degree turn in radians
-DALI_CORE_API extern const Radian ANGLE_315; ///< 315 degree turn in radians
-DALI_CORE_API extern const Radian ANGLE_270; ///< 270 degree turn in radians
-DALI_CORE_API extern const Radian ANGLE_225; ///< 225 degree turn in radians
-DALI_CORE_API extern const Radian ANGLE_180; ///< 180 degree turn in radians
-DALI_CORE_API extern const Radian ANGLE_135; ///< 135 degree turn in radians
-DALI_CORE_API extern const Radian ANGLE_120; ///< 120 degree turn in radians
-DALI_CORE_API extern const Radian ANGLE_90;  ///< 90 degree turn in radians
-DALI_CORE_API extern const Radian ANGLE_60;  ///< 60 degree turn in radians
-DALI_CORE_API extern const Radian ANGLE_45;  ///< 45 degree turn in radians
-DALI_CORE_API extern const Radian ANGLE_30;  ///< 30 degree turn in radians
-DALI_CORE_API extern const Radian ANGLE_0;   ///< 0 degree turn in radians
 
 /**
  * @brief Compares equality between two degrees.
index 8f1af8a..6c16482 100644 (file)
@@ -53,7 +53,7 @@ struct Radian
    * @SINCE_1_0.0
    * @param[in] value The initial value in radians
    */
-  explicit Radian( float value )
+  explicit constexpr Radian( float value )
   : radian( value )
   { }
 
@@ -312,6 +312,20 @@ inline Radian Clamp( Radian angle, float min, float max )
   return Radian( Clamp<float>( angle.radian, min, max ) );
 }
 
+// useful constant angles
+inline constexpr Radian ANGLE_360( Math::PI * 2.f     );
+inline constexpr Radian ANGLE_315( Math::PI * 1.75f   );
+inline constexpr Radian ANGLE_270( Math::PI * 1.5f    );
+inline constexpr Radian ANGLE_225( Math::PI * 1.25f   );
+inline constexpr Radian ANGLE_180( Math::PI           );
+inline constexpr Radian ANGLE_135( Math::PI * 0.75f   );
+inline constexpr Radian ANGLE_120( Math::PI * 2.f/3.f );
+inline constexpr Radian ANGLE_90 ( Math::PI_2         );
+inline constexpr Radian ANGLE_60 ( Math::PI / 3.f     );
+inline constexpr Radian ANGLE_45 ( Math::PI_4         );
+inline constexpr Radian ANGLE_30 ( Math::PI / 6.f     );
+inline constexpr Radian ANGLE_0  ( 0.0f               );
+
 /**
  * @}
  */
similarity index 52%
rename from dali/devel-api/events/gesture-devel.h
rename to dali/public-api/math/rect.cpp
index 45ca3df..94bd0c6 100644 (file)
@@ -1,8 +1,5 @@
-#ifndef DALI_GESTURE_DEVEL_H
-#define DALI_GESTURE_DEVEL_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.
  *
  */
 
-#include <dali/public-api/events/gesture.h>
+// CLASS HEADER
+#include <dali/public-api/math/rect.h>
 
 namespace Dali
 {
-
-namespace DevelGesture
-{
-
-/**
- * @copydoc Dali::Gesture::Type
- */
-enum Type
-{
-  Pinch      = Gesture::Pinch,
-  Pan        = Gesture::Pan,
-  Tap        = Gesture::Tap,
-  LongPress  = Gesture::LongPress,
-
-  // Devel Gesture Types
-  Rotation   = 1 << 4, ///< When the user rotates two fingers around a particular ares of the screen.
-};
-
-} // namespace DevelGesture
-
+// Ensure Rect is maintained as a trivially copyable type
+static_assert(std::is_trivially_copyable<Rect<float>>::value);
 } // namespace Dali
 
-#endif // DALI_GESTURE_DEVEL_H
index 9d136d4..3de2dd0 100644 (file)
@@ -36,7 +36,6 @@ namespace Dali
  * @brief Template class to create and operate on rectangles.
  * @SINCE_1_0.0
  */
-
 template< typename T = float >
 struct Rect
 {
@@ -86,72 +85,38 @@ struct Rect
   }
 
   /**
-   * @brief Copy constructor.
+   * @brief Default copy constructor.
    *
-   * @SINCE_1_0.0
+   * @SINCE_1_9.27
    * @param[in] rhs The original object
    */
-  Rect(const Rect<T>& rhs)
-  {
-    x = rhs.x;
-    y = rhs.y;
-    width = rhs.width;
-    height = rhs.height;
-  }
+  Rect( const Rect<T>& rhs ) = default;
 
   /**
-   * @brief Copy assignment operator.
+   * @brief Default copy assignment operator.
    *
-   * @SINCE_1_0.0
+   * @SINCE_1_9.27
    * @param[in] rhs The original object
    * @return Reference to this
    */
-  Rect<T>& operator= (const Rect<T>& rhs)
-  {
-    if (this != &rhs)
-    {
-      x = rhs.x;
-      y = rhs.y;
-      width = rhs.width;
-      height = rhs.height;
-    }
-
-    return *this;
-  }
+  Rect<T>& operator=( const Rect<T>& rhs ) = default;
 
   /**
-   * @brief Move constructor.
+   * @brief Default move constructor.
    *
-   * @SINCE_1_9.21
+   * @SINCE_1_9.27
    * @param[in] rhs The original object
    */
-  Rect<T>( Rect<T>&& rhs )
-  : x( rhs.x ),
-    y( rhs.y ),
-    width( rhs.width ),
-    height( rhs.height )
-  {
-  }
+  Rect<T>( Rect<T>&& rhs ) = default;
 
   /**
-   * @brief Move assignment operator.
+   * @brief Default move assignment operator.
    *
-   * @SINCE_1_9.21
+   * @SINCE_1_9.27
    * @param[in] rhs The original object
    * @return Reference to this
    */
-  Rect<T>& operator=( Rect<T>&& rhs )
-  {
-    if (this != &rhs)
-    {
-      x = rhs.x;
-      y = rhs.y;
-      width = rhs.width;
-      height = rhs.height;
-    }
-
-    return *this;
-  }
+  Rect<T>& operator=( Rect<T>&& rhs ) = default;
 
   /**
    * @brief Assignment operator.
@@ -160,7 +125,7 @@ struct Rect
    * @param[in] vec4 The Vector4 to assign
    * @return Reference to this
    */
-  Rect<T>& operator= (const Vector4& vec4)
+  Rect<T>& operator=(const Vector4& vec4)
   {
     x = vec4.x;
     y = vec4.y;
index ab72e66..200230a 100644 (file)
@@ -68,7 +68,7 @@ public:
    * @param[in] x x or width component
    * @param[in] y y or height component
    */
-  explicit Vector2(float x, float y)
+  explicit constexpr Vector2(float x, float y)
   : x(x), y(y)
   {
   }
index 8232a43..97775f0 100644 (file)
@@ -68,7 +68,7 @@ struct DALI_CORE_API Vector3
    * @param[in] y (or height) component
    * @param[in] z (or depth) component
    */
-  explicit Vector3(float x, float y, float z)
+  explicit constexpr Vector3(float x, float y, float z)
   : x(x),
     y(y),
     z(z)
index eab78ca..9af98e3 100644 (file)
@@ -72,7 +72,7 @@ struct DALI_CORE_API Vector4
    * @param[in] z z (or b/p) component
    * @param[in] w w (or a/q) component
    */
-  explicit Vector4(float x, float y, float z, float w)
+  explicit constexpr Vector4(float x, float y, float z, float w)
   : x(x),
     y(y),
     z(z),
index a22fc74..c28330c 100644 (file)
 namespace Dali
 {
 
+
 Handle::Handle( Dali::Internal::Object* handle )
 : BaseHandle(handle)
 {
 }
 
-
 Handle::Handle()
 {
 }
@@ -76,9 +76,9 @@ std::string Handle::GetPropertyName( Property::Index index ) const
   return GetImplementation(*this).GetPropertyName( index );
 }
 
-Property::Index Handle::GetPropertyIndex( const std::string& name ) const
+Property::Index Handle::GetPropertyIndex( Property::Key key ) const
 {
-  return GetImplementation(*this).GetPropertyIndex( name );
+  return GetImplementation( *this ).GetPropertyIndex( key );
 }
 
 bool Handle::IsPropertyWritable( Property::Index index ) const
@@ -111,6 +111,11 @@ Property::Index Handle::RegisterProperty( const std::string& name, const Propert
   return GetImplementation(*this).RegisterProperty( name, propertyValue );
 }
 
+Property::Index Handle::RegisterProperty( Property::Index key, const std::string& name, const Property::Value& propertyValue )
+{
+  return GetImplementation( *this ).RegisterProperty( name, key, propertyValue );
+}
+
 Property::Index Handle::RegisterProperty( const std::string& name, const Property::Value& propertyValue, Property::AccessMode accessMode )
 {
   return GetImplementation(*this).RegisterProperty( name, propertyValue, accessMode );
@@ -126,11 +131,26 @@ Property::Value Handle::GetCurrentProperty( Property::Index index ) const
   return GetImplementation(*this).GetCurrentProperty( index );
 }
 
+void Handle::SetProperties( const Property::Map& properties )
+{
+  GetImplementation( *this ).SetProperties( properties );
+}
+
+void Handle::GetProperties( Property::Map& properties )
+{
+  GetImplementation( *this ).GetProperties( properties );
+}
+
 void Handle::GetPropertyIndices( Property::IndexContainer& indices ) const
 {
   GetImplementation(*this).GetPropertyIndices( indices );
 }
 
+bool Handle::DoesCustomPropertyExist( Property::Index index )
+{
+  return GetImplementation( *this ).DoesCustomPropertyExist( index );
+}
+
 Dali::PropertyNotification Handle::AddPropertyNotification( Property::Index index,
                                                             const PropertyCondition& condition )
 {
@@ -164,6 +184,24 @@ void Handle::RemoveConstraints( uint32_t tag )
   GetImplementation(*this).RemoveConstraints( tag );
 }
 
+IndirectValue Handle::operator[]( Property::Index index )
+{
+  // Will assert on access if handle is empty
+  return IndirectValue(*this, index);
+}
+
+IndirectValue Handle::operator[]( const std::string& name )
+{
+  // Will assert immediately when GetPropertyIndex is called if handle is empty
+  return IndirectValue(*this, GetPropertyIndex(name));
+}
+
+Handle::PropertySetSignalType& Handle::PropertySetSignal()
+{
+  return GetImplementation( *this ).PropertySetSignal();
+}
+
+
 namespace WeightObject
 {
 
index 02ffd8d..b5f0ecb 100644 (file)
 // INTERNAL INCLUDES
 #include <dali/public-api/common/dali-common.h>
 #include <dali/public-api/object/base-handle.h>
+#include <dali/public-api/object/indirect-value.h>
+#include <dali/public-api/object/property-key.h>
 #include <dali/public-api/object/property-types.h>
 #include <dali/public-api/object/property-value.h>
 #include <dali/public-api/object/property-notification-declarations.h>
 #include <dali/public-api/object/ref-object.h>
+#include <dali/public-api/signals/dali-signal.h>
+
 
 namespace Dali
 {
@@ -69,6 +73,11 @@ public:
     DYNAMIC_PROPERTIES = 0x01,
   };
 
+  /**
+   * @brief PropertySetSignal function prototype for signal handler. Called when a property is set on this object.
+   */
+  using PropertySetSignalType = Signal< void( Handle& handle, Property::Index index, Property::Value value ) >;
+
 public:
 
   /**
@@ -104,6 +113,22 @@ public:
   static Handle New();
 
   /**
+   * @brief Template to create a derived handle and set properties on it.
+   *
+   * Marked as DALI_NO_EXPORT_API to prevent internal usage exporting symbols.
+   * @SINCE_1_9.27
+   * @tparam T The derived class to create
+   * @param[in] properties The properties to set
+   */
+  template< typename Type >
+  static DALI_NO_EXPORT_API Type New( const Property::Map& properties )
+  {
+    Type handle = Type::New();
+    handle.SetProperties( properties );
+    return handle;
+  }
+
+  /**
    * @brief Dali::Handle is intended as a base class.
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
@@ -185,15 +210,15 @@ public:
   std::string GetPropertyName( Property::Index index ) const;
 
   /**
-   * @brief Queries the index of a property.
+   * @brief Query the index of a property using the given key.
    *
-   * Returns the first property index that matches the given name exactly.
-   *
-   * @SINCE_1_0.0
-   * @param[in] name The name of the property
-   * @return The index of the property, or Property::INVALID_INDEX if no property exists with the given name
+   * @SINCE_1_9.27
+   * @param[in] key The key of the property to search for. (The name or integer key provided to
+   * RegisterProperty()).
+   * @return the matching property index of the key, or Property::INVALID_INDEX if no
+   * property matches the given key.
    */
-  Property::Index GetPropertyIndex( const std::string& name ) const;
+  Property::Index GetPropertyIndex( Property::Key key ) const;
 
   /**
    * @brief Queries whether a property can be set using SetProperty().
@@ -270,6 +295,48 @@ public:
   Property::Index RegisterProperty( const std::string& name, const Property::Value& propertyValue );
 
   /**
+   * @brief Register a new animatable property with an integer key.
+   *
+   * @SINCE_1_9.27
+   * @param[in] key  The integer key of the property.
+   * @param[in] name The text key of the property.
+   * @param[in] propertyValue The new value of the property.
+   *
+   * @return The index of the property or Property::INVALID_INDEX if registration failed
+   *
+   * @pre The object supports dynamic properties
+   * i.e. Supports(Handle::DYNAMIC_PROPERTIES) returns true.  Property names and keys
+   * are expected to be unique, but this is not enforced.  Property indices are unique
+   * to each registered custom property in a given object.
+   *
+   * @note Returns Property::INVALID_INDEX if registration failed. This can happen if
+   * you try to register animatable property on an object that does not have scene graph
+   * object.
+   *
+   * @note The returned property index is not the same as the integer key (though it
+   * shares a type)
+   *
+   * This version of RegisterProperty associates both an integer key and the text key
+   * with the property, allowing for lookup of the property index by either key or name
+   * ( which is useful when other classes know the key but not the name )
+   *
+   * @note Only the following types can be animated:
+   *       - Property::BOOLEAN
+   *       - Property::FLOAT
+   *       - Property::INTEGER
+   *       - Property::VECTOR2
+   *       - Property::VECTOR3
+   *       - Property::VECTOR4
+   *       - Property::MATRIX3
+   *       - Property::MATRIX
+   *       - Property::ROTATION
+   * @note If a property with the desired name already exists, then the value given is just set.
+   */
+  Property::Index RegisterProperty( Property::Index key,
+                                    const std::string& name,
+                                    const Property::Value& propertyValue );
+
+  /**
    * @brief Registers a new property.
    *
    * Properties can be set as non animatable using property attributes.
@@ -345,6 +412,24 @@ public:
   }
 
   /**
+   * @brief Sets all the properties in the given property map.
+   *
+   * @SINCE_1_9.27
+   * @param[in] properties The properties to set
+   */
+  void SetProperties( const Property::Map& properties );
+
+  /**
+   * @brief Retrieves all the properties and the values for this object
+   *
+   * @SINCE_1_9.27
+   * @param[out] properties A map which is populated with the index-value pairs
+   *
+   * @note The properties map will be cleared by this method first.
+   */
+  void GetProperties( Property::Map& properties );
+
+  /**
    * @brief Retrieves all the property indices for this object (including custom properties).
    *
    * @SINCE_1_0.0
@@ -354,6 +439,15 @@ public:
   void GetPropertyIndices( Property::IndexContainer& indices ) const;
 
   /**
+   * @brief Determine if the custom property index exists on this object without throwing a Dali::Exception.
+   *
+   * @SINCE_1_9.27
+   * @note This does not check default properties.
+   * @param[in] index The index of the property to test for
+   */
+  bool DoesCustomPropertyExist( Property::Index index );
+
+  /**
    * @brief Adds a property notification to this object.
    *
    * @SINCE_1_0.0
@@ -409,6 +503,37 @@ public:
    * @pre The Object has been initialized.
    */
   void RemoveConstraints( uint32_t tag );
+
+  /**
+   * @brief Index operator, using integer lookup.
+   *
+   * Returns an object that can be assigned to or cast from, enabling
+   * the indexed property to be either read or written.
+   *
+   * @param[in] index The index of the property to access.
+   * @return indirect value. Should have shorter scope than the handle
+   */
+  IndirectValue operator[]( Property::Index index );
+
+  /**
+   * @brief Index operator, using name lookup.
+   *
+   * Returns an object that can be assigned to or cast from, enabling
+   * the named property to be either read or written.
+   *
+   * @param[in] name The name of the property to access.
+   * @return indirect value. Should have shorter scope than the handle
+   */
+  IndirectValue operator[]( const std::string& name );
+
+public: // Signals
+  /**
+   * @brief Get a signal when a property is set on this object through the API (i.e. not when animating)
+   *
+   * @SINCE_1_9.27
+   * @return The signal to attach a connection to.
+   */
+  PropertySetSignalType& PropertySetSignal();
 };
 
 /**
diff --git a/dali/public-api/object/indirect-value.cpp b/dali/public-api/object/indirect-value.cpp
new file mode 100644 (file)
index 0000000..321feaa
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * 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.
+ */
+
+
+#include <dali/public-api/object/indirect-value.h>
+#include <dali/public-api/object/handle.h>
+#include <dali/internal/event/common/object-impl.h>
+
+namespace Dali
+{
+
+IndirectValue::IndirectValue( Handle& handle, Property::Index index )
+: mHandle(handle.GetObjectPtr()),
+  mIndex(index),
+  mExtension(nullptr)
+{
+}
+
+void IndirectValue::operator= (Property::Value value)
+{
+  Handle(static_cast<Dali::Internal::Object*>(mHandle.Get())).SetProperty(mIndex, value);
+}
+
+Property::Value IndirectValue::GetProperty()
+{
+  return Handle(static_cast<Dali::Internal::Object*>(mHandle.Get())).GetProperty(mIndex);
+}
+
+IndirectValue& IndirectValue::operator=( IndirectValue&& ) = default;
+
+IndirectValue::IndirectValue( IndirectValue&& ) = default;
+
+
+} // namespace Dali
diff --git a/dali/public-api/object/indirect-value.h b/dali/public-api/object/indirect-value.h
new file mode 100644 (file)
index 0000000..39db23c
--- /dev/null
@@ -0,0 +1,140 @@
+#ifndef DALI_INDIRECT_VALUE_H
+#define DALI_INDIRECT_VALUE_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.
+ */
+
+#include <dali/public-api/common/intrusive-ptr.h>
+#include <dali/public-api/object/property.h>
+#include <dali/public-api/object/property-value.h>
+#include <dali/public-api/object/ref-object.h>
+
+namespace Dali
+{
+/**
+ * @addtogroup dali_core_object
+ * @{
+ */
+
+class Handle;
+
+
+/**
+ * @brief Dali::IndirectValue is an intermediate object that enables a simpler
+ * syntax for addressing properties.
+ *
+ * @SINCE_1_9.27
+ * object["property"] = value;
+ * float value = object["property"];
+ *
+ * It is not intended to be directly instantiated, instead, any Handle type
+ * will generate a temporary object using the above syntax.
+ */
+class DALI_CORE_API IndirectValue
+{
+public:
+  /**
+   * @brief Assignment operator
+   *
+   * @SINCE_1_9.27
+   * Enables "handle[property] = value" syntax.
+   * @param[in] value The value to assign
+   */
+  void operator=(Property::Value value);
+
+  /**
+   * @brief Explicit cast operator for property value.
+   *
+   * @SINCE_1_9.27
+   * Enables implicit promotion of this to a Property::Value type parameter
+   * @return The property value
+   */
+  operator Property::Value()
+  {
+    return GetProperty();
+  }
+
+  /**
+   * @brief Cast operator
+   *
+   * @SINCE_1_9.27
+   * Enables "value = handle[property]" syntax.
+   * @tparam Type The type of the associated property
+   * @return The associated property cast to the desired type
+   */
+  template <typename Type>
+  inline operator Type()
+  {
+    Property::Value value = GetProperty();
+    return value.Get<Type>();
+  }
+
+private:
+  /// @cond internal
+
+  /**
+   * @brief Move constructor.
+   *
+   * @SINCE_1_9.27
+   * Making this private to prevent construction of auto type or IndirectValue type.
+   * @param[in] rhs The object to move
+   */
+  DALI_INTERNAL IndirectValue( IndirectValue&& rhs );
+
+  /**
+   * @brief Move assignment operator.
+   *
+   * @SINCE_1_9.27
+   * Making this private to prevent assignment to auto type or IndirectValue type.
+   * @param[in] rhs The object to move
+   */
+  DALI_INTERNAL IndirectValue& operator=( IndirectValue&& rhs );
+
+  /**
+   * @brief Accessor for handle property.
+   *
+   * @SINCE_1_9.27
+   * @return The handle's property value
+   * @note Asserts if the handle is empty
+   */
+  Property::Value GetProperty();
+
+  friend class Handle; ///< Only Handle types can construct this object
+
+  /**
+   * @brief Private constructor
+   *
+   * @SINCE_1_9.27
+   * @param[in] handle A reference to the associated handle
+   * @param[in] index The index to the associated property
+   */
+  DALI_INTERNAL IndirectValue( Handle& handle, Property::Index index );
+private:
+  IntrusivePtr<Dali::RefObject> mHandle; ///< A handle to the property owner
+  Property::Index mIndex; ///< Index of the property in the property owner.
+
+  struct Extension; ///< Reserved for future use
+  Extension* mExtension; ///< Reserved for future use
+
+  /// @endcond
+};
+
+/**
+ * @}
+ */
+} // Namespace Dali
+
+#endif // DALI_INDIRECT_VALUE_H
index 1ac8453..c80524e 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.
 namespace Dali
 {
 
-const int32_t Property::INVALID_INDEX           = -1;
-const int32_t Property::INVALID_KEY             = -1;
-const int32_t Property::INVALID_COMPONENT_INDEX = -1;
-
 Property::Property(Handle& obj, Property::Index propIndex)
 : object(obj),
   propertyIndex(propIndex),
index 6553591..bf48f5c 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_PROPERTY_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.
@@ -48,9 +48,9 @@ struct DALI_CORE_API Property
    */
   typedef int32_t Index;
 
-  static const int32_t INVALID_INDEX; ///< -1 is not a valid property index
-  static const int32_t INVALID_KEY;   ///< -1 is not a valid property key
-  static const int32_t INVALID_COMPONENT_INDEX; ///< -1 is not a valid property index
+  static constexpr int32_t INVALID_INDEX{-1}; ///< -1 is not a valid property index
+  static constexpr int32_t INVALID_KEY{-1};   ///< -1 is not a valid property key
+  static constexpr int32_t INVALID_COMPONENT_INDEX{-1}; ///< -1 is not a valid property index
 
   typedef Dali::Vector< Index > IndexContainer; ///< A vector of property indices @SINCE_1_0.0
 
index b1d0766..58b54be 100644 (file)
@@ -51,7 +51,7 @@ Geometry::Geometry( Geometry&& rhs ) =  default;
 
 Geometry& Geometry::operator=( Geometry&& rhs ) =  default;
 
-std::size_t Geometry::AddVertexBuffer( PropertyBuffer& vertexBuffer )
+std::size_t Geometry::AddVertexBuffer( VertexBuffer& vertexBuffer )
 {
   DALI_ASSERT_ALWAYS( vertexBuffer && "VertexBuffer is not initialized ");
   return GetImplementation(*this).AddVertexBuffer( GetImplementation( vertexBuffer ) );
index a898e56..56cb874 100644 (file)
@@ -25,7 +25,7 @@
 // INTERNAL INCLUDES
 #include <dali/public-api/object/handle.h> // Dali::Handle
 #include <dali/public-api/object/property-index-ranges.h> // DEFAULT_DERIVED_HANDLE_PROPERTY_START_INDEX
-#include <dali/public-api/rendering/property-buffer.h> // Dali::PropertyBuffer
+#include <dali/public-api/rendering/vertex-buffer.h> // Dali::VertexBuffer
 
 namespace Dali
 {
@@ -131,19 +131,19 @@ public:
   Geometry& operator=( Geometry&& rhs );
 
   /**
-   * @brief Adds a PropertyBuffer to be used as source of geometry vertices.
+   * @brief Adds a VertexBuffer to be used as source of geometry vertices.
    *
-   * @SINCE_1_1.43
-   * @param[in] vertexBuffer PropertyBuffer to be used as source of geometry vertices
+   * @SINCE_1_9.27
+   * @param[in] vertexBuffer VertexBuffer to be used as source of geometry vertices
    * @return Index of the newly added buffer, can be used with RemoveVertexBuffer to remove
    *         this buffer if no longer required
    */
-  std::size_t AddVertexBuffer( PropertyBuffer& vertexBuffer );
+  std::size_t AddVertexBuffer( VertexBuffer& vertexBuffer );
 
   /**
    * @brief Retrieves the number of vertex buffers that have been added to this geometry.
    *
-   * @SINCE_1_1.43
+   * @SINCE_1_9.27
    * @return Number of vertex buffers that have been added to this geometry
    */
   std::size_t GetNumberOfVertexBuffers() const;
@@ -152,7 +152,7 @@ public:
    * @brief Removes a vertex buffer.
    * The index must be between 0 and GetNumberOfVertexBuffers().
    *
-   * @SINCE_1_1.43
+   * @SINCE_1_9.27
    * @param[in] index Index to the vertex buffer to remove
    */
   void RemoveVertexBuffer( std::size_t index );
diff --git a/dali/public-api/rendering/property-buffer.cpp b/dali/public-api/rendering/property-buffer.cpp
deleted file mode 100644 (file)
index 839f202..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * 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.
- *
- */
-
-// CLASS HEADER
-#include <dali/public-api/rendering/property-buffer.h>
-
-// INTERNAL INCLUDES
-#include <dali/public-api/object/property-map.h>             // Dali::Property::Map
-#include <dali/internal/event/common/property-buffer-impl.h> // Dali::Internal::PropertyBuffer
-
-namespace Dali
-{
-
-PropertyBuffer PropertyBuffer::New( Dali::Property::Map& bufferFormat )
-{
-  Internal::PropertyBufferPtr propertyBuffer = Internal::PropertyBuffer::New( bufferFormat );
-
-  return PropertyBuffer( propertyBuffer.Get() );
-}
-
-PropertyBuffer::PropertyBuffer()
-{
-}
-
-PropertyBuffer::~PropertyBuffer()
-{
-}
-
-PropertyBuffer::PropertyBuffer( const PropertyBuffer& handle ) = default;
-
-PropertyBuffer PropertyBuffer::DownCast( BaseHandle handle )
-{
-  return PropertyBuffer( dynamic_cast<Dali::Internal::PropertyBuffer*>(handle.GetObjectPtr()));
-}
-
-PropertyBuffer& PropertyBuffer::operator=( const PropertyBuffer& handle ) = default;
-
-PropertyBuffer::PropertyBuffer( PropertyBuffer&& rhs ) =  default;
-
-PropertyBuffer& PropertyBuffer::operator=( PropertyBuffer&& rhs ) =  default;
-
-void PropertyBuffer::SetData( const void* data, std::size_t size )
-{
-  GetImplementation(*this).SetData( data, static_cast<uint32_t>( size ) ); // only support 4,294,967,295 bytes
-}
-
-std::size_t PropertyBuffer::GetSize() const
-{
-  return  GetImplementation(*this).GetSize();
-}
-
-
-PropertyBuffer::PropertyBuffer( Internal::PropertyBuffer* pointer )
-: BaseHandle( pointer )
-{
-}
-
-} // namespace Dali
diff --git a/dali/public-api/rendering/vertex-buffer.cpp b/dali/public-api/rendering/vertex-buffer.cpp
new file mode 100644 (file)
index 0000000..3b7873d
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * 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.
+ *
+ */
+
+// CLASS HEADER
+#include <dali/public-api/rendering/vertex-buffer.h>
+
+// INTERNAL INCLUDES
+#include <dali/public-api/object/property-map.h>              // Dali::Property::Map
+#include <dali/internal/event/rendering/vertex-buffer-impl.h> // Dali::Internal::VertexBuffer
+
+namespace Dali
+{
+
+VertexBuffer VertexBuffer::New( Dali::Property::Map& bufferFormat )
+{
+  Internal::VertexBufferPtr vertexBuffer = Internal::VertexBuffer::New( bufferFormat );
+
+  return VertexBuffer( vertexBuffer.Get() );
+}
+
+VertexBuffer::VertexBuffer()
+{
+}
+
+VertexBuffer::~VertexBuffer()
+{
+}
+
+VertexBuffer::VertexBuffer( const VertexBuffer& handle ) = default;
+
+VertexBuffer VertexBuffer::DownCast( BaseHandle handle )
+{
+  return VertexBuffer( dynamic_cast<Dali::Internal::VertexBuffer*>(handle.GetObjectPtr()));
+}
+
+VertexBuffer& VertexBuffer::operator=( const VertexBuffer& handle ) = default;
+
+VertexBuffer::VertexBuffer( VertexBuffer&& rhs ) =  default;
+
+VertexBuffer& VertexBuffer::operator=( VertexBuffer&& rhs ) =  default;
+
+void VertexBuffer::SetData( const void* data, std::size_t size )
+{
+  GetImplementation(*this).SetData( data, static_cast<uint32_t>( size ) ); // only support 4,294,967,295 bytes
+}
+
+std::size_t VertexBuffer::GetSize() const
+{
+  return  GetImplementation(*this).GetSize();
+}
+
+
+VertexBuffer::VertexBuffer( Internal::VertexBuffer* pointer )
+: BaseHandle( pointer )
+{
+}
+
+} // namespace Dali
similarity index 75%
rename from dali/public-api/rendering/property-buffer.h
rename to dali/public-api/rendering/vertex-buffer.h
index c6037e4..69f46c5 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef DALI_PROPERTY_BUFFER_H
-#define DALI_PROPERTY_BUFFER_H
+#ifndef DALI_VERTEX_BUFFER_H
+#define DALI_VERTEX_BUFFER_H
 
 /*
  * Copyright (c) 2020 Samsung Electronics Co., Ltd.
@@ -35,13 +35,13 @@ namespace Dali
 
 namespace Internal DALI_INTERNAL
 {
-class PropertyBuffer;
+class VertexBuffer;
 }
 
 /**
- * @brief PropertyBuffer is a handle to an object that contains a buffer of structured properties.
+ * @brief VertexBuffer is a handle to an object that contains a buffer of structured data.
  *
- * PropertyBuffers can be used to provide data to Geometry objects.
+ * VertexBuffers can be used to provide data to Geometry objects.
  *
  * Example:
  *
@@ -56,7 +56,7 @@ class PropertyBuffer;
  *  Property::Map texturedQuadVertexFormat;
  *  texturedQuadVertexFormat["aPosition"] = Property::VECTOR2;
  *  texturedQuadVertexFormat["aTexCoord"] = Property::VECTOR2;
- *  PropertyBuffer texturedQuadVertices = PropertyBuffer::New( texturedQuadVertexFormat );
+ *  VertexBuffer texturedQuadVertices = VertexBuffer::New( texturedQuadVertexFormat );
  *  texturedQuadVertices.SetData( texturedQuadVertexData, 4 );
  *
  *  // Create indices
@@ -69,77 +69,76 @@ class PropertyBuffer;
  *
  * @SINCE_1_1.43
  */
-class DALI_CORE_API PropertyBuffer : public BaseHandle
+class DALI_CORE_API VertexBuffer : public BaseHandle
 {
 public:
 
   /**
-   * @brief Creates a PropertyBuffer.
-   * Static property buffers use less memory.
+   * @brief Creates a VertexBuffer.
    *
-   * @SINCE_1_1.43
+   * @SINCE_1_9.27
    * @param[in] bufferFormat Map of names and types that describes the components of the buffer
-   * @return Handle to a newly allocated PropertyBuffer
+   * @return Handle to a newly allocated VertexBuffer
    */
-  static PropertyBuffer New( Dali::Property::Map& bufferFormat );
+  static VertexBuffer New( Dali::Property::Map& bufferFormat );
 
   /**
    * @brief Default constructor, creates an empty handle.
    *
-   * @SINCE_1_1.43
+   * @SINCE_1_9.27
    */
-  PropertyBuffer();
+  VertexBuffer();
 
   /**
    * @brief Destructor.
    *
-   * @SINCE_1_1.43
+   * @SINCE_1_9.27
    */
-  ~PropertyBuffer();
+  ~VertexBuffer();
 
   /**
    * @brief Copy constructor, creates a new handle to the same object.
    *
-   * @SINCE_1_1.43
+   * @SINCE_1_9.27
    * @param[in] handle Handle to an object
    */
-  PropertyBuffer( const PropertyBuffer& handle );
+  VertexBuffer( const VertexBuffer& handle );
 
   /**
    * @brief Downcasts to a property buffer handle.
    * If not, a property buffer the returned property buffer handle is left uninitialized.
    *
-   * @SINCE_1_1.43
+   * @SINCE_1_9.27
    * @param[in] handle Handle to an object
    * @return Property buffer handle or an uninitialized handle
    */
-  static PropertyBuffer DownCast( BaseHandle handle );
+  static VertexBuffer DownCast( BaseHandle handle );
 
   /**
    * @brief Assignment operator, changes this handle to point at the same object.
    *
-   * @SINCE_1_1.43
+   * @SINCE_1_9.27
    * @param[in] handle Handle to an object
    * @return Reference to the assigned object
    */
-  PropertyBuffer& operator=( const PropertyBuffer& handle );
+  VertexBuffer& operator=( const VertexBuffer& handle );
 
   /**
    * @brief Move constructor.
    *
-   * @SINCE_1_9.22
+   * @SINCE_1_9.27
    * @param[in] rhs A reference to the moved handle
    */
-  PropertyBuffer( PropertyBuffer&& rhs );
+  VertexBuffer( VertexBuffer&& rhs );
 
   /**
    * @brief Move assignment operator.
    *
-   * @SINCE_1_9.22
+   * @SINCE_1_9.27
    * @param[in] rhs A reference to the moved handle
    * @return A reference to this handle
    */
-  PropertyBuffer& operator=( PropertyBuffer&& rhs );
+  VertexBuffer& operator=( VertexBuffer&& rhs );
 
   /**
    * @brief Updates the whole buffer information.
@@ -156,10 +155,10 @@ public:
    *   Dali::Vector2 uv;
    * };
    * Vertex vertices[ 10 ] = { ... };
-   * propertyBuffer.SetData( vertices );
+   * vertexBuffer.SetData( vertices );
    * </pre>
    *
-   * @SINCE_1_1.43
+   * @SINCE_1_9.27
    * @param[in] data A pointer to the data that will be copied to the buffer
    * @param[in] size Number of elements to expand or contract the buffer
    */
@@ -168,7 +167,7 @@ public:
   /**
    * @brief Gets the number of elements in the buffer.
    *
-   * @SINCE_1_1.43
+   * @SINCE_1_9.27
    * @return Number of elements to expand or contract the buffer
    */
   std::size_t GetSize() const;
@@ -178,10 +177,10 @@ public:
   /**
    * @brief The constructor.
    * @note  Not intended for application developers.
-   * @SINCE_1_1.43
-   * @param[in] pointer A pointer to a newly allocated PropertyBuffer
+   * @SINCE_1_9.27
+   * @param[in] pointer A pointer to a newly allocated VertexBuffer
    */
-  explicit DALI_INTERNAL PropertyBuffer( Internal::PropertyBuffer* pointer );
+  explicit DALI_INTERNAL VertexBuffer( Internal::VertexBuffer* pointer );
 };
 
 /**
@@ -189,4 +188,4 @@ public:
  */
 } // namespace Dali
 
-#endif // DALI_PROPERTY_BUFFER_H
+#endif // DALI_VERTEX_BUFFER_H
index 1fe3bcf..145430d 100644 (file)
@@ -1,6 +1,6 @@
 Name:       dali2
 Summary:    DALi 3D Engine
-Version:    1.9.26
+Version:    1.9.27
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT