Remove Setter/Getter public APIs from Dali::Layer 77/235877/1
authorRichard Huang <r.huang@samsung.com>
Wed, 10 Jun 2020 12:49:27 +0000 (13:49 +0100)
committerRichard Huang <r.huang@samsung.com>
Wed, 10 Jun 2020 12:49:54 +0000 (13:49 +0100)
Change-Id: Ic256f62b5488ee271802ff24aeaac1283c1d4634

14 files changed:
automated-tests/src/dali/utc-Dali-Actor.cpp
automated-tests/src/dali/utc-Dali-Layer.cpp
automated-tests/src/dali/utc-Dali-LongPressGestureDetector.cpp
automated-tests/src/dali/utc-Dali-PanGestureDetector.cpp
automated-tests/src/dali/utc-Dali-PinchGestureDetector.cpp
automated-tests/src/dali/utc-Dali-Renderer.cpp
automated-tests/src/dali/utc-Dali-RotationGestureDetector.cpp
automated-tests/src/dali/utc-Dali-TapGestureDetector.cpp
automated-tests/src/dali/utc-Dali-TouchDataProcessing.cpp
automated-tests/src/dali/utc-Dali-TouchProcessing.cpp
dali/internal/event/actors/layer-impl.cpp
dali/internal/event/events/hit-test-algorithm-impl.cpp
dali/public-api/actors/layer.cpp
dali/public-api/actors/layer.h

index bd23d7d..2ebb714 100644 (file)
@@ -4310,7 +4310,7 @@ int UtcDaliActorPropertyClippingNestedChildren(void)
     // If we are on the first loop, set the layer to 3D and loop to perform the test again.
     if( i == 0u )
     {
-      Stage::GetCurrent().GetRootLayer().SetBehavior( Layer::LAYER_3D );
+      Stage::GetCurrent().GetRootLayer().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
       GenerateTrace( application, enabledDisableTrace, stencilTrace );
     }
   }
index 90f11e1..3225695 100644 (file)
@@ -89,19 +89,19 @@ int UtcDaliLayerGetDepth(void)
   Layer layer2 = Layer::New();
 
   // layers are not on stage
-  DALI_TEST_EQUALS(layer1.GetDepth(), 0u, TEST_LOCATION);
-  DALI_TEST_EQUALS(layer2.GetDepth(), 0u, TEST_LOCATION);
+  DALI_TEST_EQUALS(layer1.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION);
+  DALI_TEST_EQUALS(layer2.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION);
 
   // root depth is 0
   Layer root = Stage::GetCurrent().GetLayer( 0 );
-  DALI_TEST_EQUALS(root.GetDepth(), 0u, TEST_LOCATION);
+  DALI_TEST_EQUALS(root.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION);
 
   Stage::GetCurrent().Add(layer1);
   Stage::GetCurrent().Add(layer2);
 
-  DALI_TEST_EQUALS(  root.GetDepth(), 0u, TEST_LOCATION);
-  DALI_TEST_EQUALS(layer1.GetDepth(), 1u, TEST_LOCATION);
-  DALI_TEST_EQUALS(layer2.GetDepth(), 2u, TEST_LOCATION);
+  DALI_TEST_EQUALS(  root.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION);
+  DALI_TEST_EQUALS(layer1.GetProperty< int >( Layer::Property::DEPTH ), 1u, TEST_LOCATION);
+  DALI_TEST_EQUALS(layer2.GetProperty< int >( Layer::Property::DEPTH ), 2u, TEST_LOCATION);
   END_TEST;
 }
 
@@ -114,18 +114,18 @@ int UtcDaliLayerRaise(void)
 
   Stage::GetCurrent().Add(layer1);
   Stage::GetCurrent().Add(layer2);
-  DALI_TEST_EQUALS(layer1.GetDepth(), 1u, TEST_LOCATION);
+  DALI_TEST_EQUALS(layer1.GetProperty< int >( Layer::Property::DEPTH ), 1u, TEST_LOCATION);
 
   layer1.Raise();
-  DALI_TEST_EQUALS(layer1.GetDepth(), 2u, TEST_LOCATION);
+  DALI_TEST_EQUALS(layer1.GetProperty< int >( Layer::Property::DEPTH ), 2u, TEST_LOCATION);
 
   // get root
   Layer root = Stage::GetCurrent().GetLayer( 0 );
-  DALI_TEST_EQUALS(  root.GetDepth(), 0u, TEST_LOCATION);
+  DALI_TEST_EQUALS(  root.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION);
   root.Raise();
-  DALI_TEST_EQUALS(  root.GetDepth(), 1u, TEST_LOCATION);
-  DALI_TEST_EQUALS(layer1.GetDepth(), 2u, TEST_LOCATION);
-  DALI_TEST_EQUALS(layer2.GetDepth(), 0u, TEST_LOCATION);
+  DALI_TEST_EQUALS(  root.GetProperty< int >( Layer::Property::DEPTH ), 1u, TEST_LOCATION);
+  DALI_TEST_EQUALS(layer1.GetProperty< int >( Layer::Property::DEPTH ), 2u, TEST_LOCATION);
+  DALI_TEST_EQUALS(layer2.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION);
   END_TEST;
 }
 
@@ -138,18 +138,18 @@ int UtcDaliLayerLower(void)
 
   Stage::GetCurrent().Add(layer1);
   Stage::GetCurrent().Add(layer2);
-  DALI_TEST_EQUALS(layer2.GetDepth(), 2u, TEST_LOCATION);
+  DALI_TEST_EQUALS(layer2.GetProperty< int >( Layer::Property::DEPTH ), 2u, TEST_LOCATION);
 
   layer2.Lower();
-  DALI_TEST_EQUALS(layer2.GetDepth(), 1u, TEST_LOCATION);
+  DALI_TEST_EQUALS(layer2.GetProperty< int >( Layer::Property::DEPTH ), 1u, TEST_LOCATION);
 
   // get root
   Layer root = Stage::GetCurrent().GetLayer( 0 );
   root.Lower();
-  DALI_TEST_EQUALS(  root.GetDepth(), 0u, TEST_LOCATION);
+  DALI_TEST_EQUALS(  root.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION);
   layer2.Lower();
-  DALI_TEST_EQUALS(  root.GetDepth(), 1u, TEST_LOCATION);
-  DALI_TEST_EQUALS(layer2.GetDepth(), 0u, TEST_LOCATION);
+  DALI_TEST_EQUALS(  root.GetProperty< int >( Layer::Property::DEPTH ), 1u, TEST_LOCATION);
+  DALI_TEST_EQUALS(layer2.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION);
   END_TEST;
 }
 
@@ -166,16 +166,16 @@ int UtcDaliLayerRaiseToTop(void)
   Stage::GetCurrent().Add(layer3);
   Layer root = Stage::GetCurrent().GetLayer( 0 );
 
-  DALI_TEST_EQUALS(  root.GetDepth(), 0u, TEST_LOCATION);
-  DALI_TEST_EQUALS(layer1.GetDepth(), 1u, TEST_LOCATION);
-  DALI_TEST_EQUALS(layer2.GetDepth(), 2u, TEST_LOCATION);
-  DALI_TEST_EQUALS(layer3.GetDepth(), 3u, TEST_LOCATION);
+  DALI_TEST_EQUALS(  root.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION);
+  DALI_TEST_EQUALS(layer1.GetProperty< int >( Layer::Property::DEPTH ), 1u, TEST_LOCATION);
+  DALI_TEST_EQUALS(layer2.GetProperty< int >( Layer::Property::DEPTH ), 2u, TEST_LOCATION);
+  DALI_TEST_EQUALS(layer3.GetProperty< int >( Layer::Property::DEPTH ), 3u, TEST_LOCATION);
 
   layer1.RaiseToTop();
-  DALI_TEST_EQUALS(layer1.GetDepth(), 3u, TEST_LOCATION);
+  DALI_TEST_EQUALS(layer1.GetProperty< int >( Layer::Property::DEPTH ), 3u, TEST_LOCATION);
 
   root.RaiseToTop();
-  DALI_TEST_EQUALS(  root.GetDepth(), 3u, TEST_LOCATION);
+  DALI_TEST_EQUALS(  root.GetProperty< int >( Layer::Property::DEPTH ), 3u, TEST_LOCATION);
   END_TEST;
 }
 
@@ -191,12 +191,12 @@ int UtcDaliLayerLowerToBottom(void)
   Stage::GetCurrent().Add(layer2);
   Stage::GetCurrent().Add(layer3);
 
-  DALI_TEST_EQUALS(layer1.GetDepth(), 1u, TEST_LOCATION);
-  DALI_TEST_EQUALS(layer2.GetDepth(), 2u, TEST_LOCATION);
-  DALI_TEST_EQUALS(layer3.GetDepth(), 3u, TEST_LOCATION);
+  DALI_TEST_EQUALS(layer1.GetProperty< int >( Layer::Property::DEPTH ), 1u, TEST_LOCATION);
+  DALI_TEST_EQUALS(layer2.GetProperty< int >( Layer::Property::DEPTH ), 2u, TEST_LOCATION);
+  DALI_TEST_EQUALS(layer3.GetProperty< int >( Layer::Property::DEPTH ), 3u, TEST_LOCATION);
 
   layer3.LowerToBottom();
-  DALI_TEST_EQUALS(layer3.GetDepth(), 0u, TEST_LOCATION);
+  DALI_TEST_EQUALS(layer3.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION);
   END_TEST;
 }
 
@@ -206,10 +206,10 @@ int UtcDaliLayerSetClipping(void)
   TestApplication application;
 
   Layer layer = Layer::New();
-  DALI_TEST_CHECK(!layer.IsClipping());
+  DALI_TEST_CHECK( !layer.GetProperty< bool >( Layer::Property::CLIPPING_ENABLE ) );
 
-  layer.SetClipping(true);
-  DALI_TEST_CHECK(layer.IsClipping());
+  layer.SetProperty( Layer::Property::CLIPPING_ENABLE, true );
+  DALI_TEST_CHECK( layer.GetProperty< bool >( Layer::Property::CLIPPING_ENABLE ) );
   END_TEST;
 }
 
@@ -219,7 +219,7 @@ int UtcDaliLayerIsClipping(void)
   TestApplication application;
 
   Layer layer = Layer::New();
-  DALI_TEST_CHECK(!layer.IsClipping());
+  DALI_TEST_CHECK( !layer.GetProperty< bool >( Layer::Property::CLIPPING_ENABLE ) );
   END_TEST;
 }
 
@@ -231,10 +231,9 @@ int UtcDaliLayerSetClippingBox(void)
   ClippingBox testBox(5,6, 77,83);
 
   Layer layer = Layer::New();
-  DALI_TEST_CHECK(layer.GetClippingBox() != testBox);
-
-  layer.SetClippingBox(5,6, 77,83);
-  DALI_TEST_CHECK(layer.GetClippingBox() == testBox);
+  DALI_TEST_CHECK(layer.GetProperty< Rect<int32_t> >( Layer::Property::CLIPPING_BOX ) != testBox);
+  layer.SetProperty( Layer::Property::CLIPPING_BOX, testBox );
+  DALI_TEST_CHECK(layer.GetProperty< Rect<int32_t> >( Layer::Property::CLIPPING_BOX ) == testBox);
   END_TEST;
 }
 
@@ -244,7 +243,7 @@ int UtcDaliLayerGetClippingBox(void)
   TestApplication application;
 
   Layer layer = Layer::New();
-  DALI_TEST_CHECK(layer.GetClippingBox() == ClippingBox(0,0,0,0));
+  DALI_TEST_CHECK( layer.GetProperty< Rect<int32_t> >( Layer::Property::CLIPPING_BOX ) == ClippingBox(0,0,0,0) );
   END_TEST;
 }
 
@@ -295,25 +294,25 @@ int UtcDaliLayerRaiseAbove(void)
   Layer root = Stage::GetCurrent().GetLayer( 0 );
   layer.RaiseAbove( root );
   // layer depth is zero as its not on stage
-  DALI_TEST_EQUALS( layer.GetDepth(), 0u, TEST_LOCATION );
+  DALI_TEST_EQUALS( layer.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION );
   // add to stage
   Stage::GetCurrent().Add( layer );
   layer.RaiseAbove( root );
-  DALI_TEST_EQUALS( layer.GetDepth(), 1u, TEST_LOCATION );
+  DALI_TEST_EQUALS( layer.GetProperty< int >( Layer::Property::DEPTH ), 1u, TEST_LOCATION );
   root.RaiseAbove( layer );
-  DALI_TEST_EQUALS( layer.GetDepth(), 0u, TEST_LOCATION );
+  DALI_TEST_EQUALS( layer.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION );
   layer.RaiseAbove( layer );
-  DALI_TEST_EQUALS( layer.GetDepth(), 0u, TEST_LOCATION );
+  DALI_TEST_EQUALS( layer.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION );
 
   // make another layer on the stage
   Layer layer2 = Layer::New();
   Stage::GetCurrent().Add( layer2 );
   layer.RaiseAbove( layer2 );
-  DALI_TEST_GREATER( layer.GetDepth(), layer2.GetDepth(), TEST_LOCATION );
+  DALI_TEST_GREATER( layer.GetProperty< int >( Layer::Property::DEPTH ), layer2.GetProperty< int >( Layer::Property::DEPTH ), TEST_LOCATION );
   layer2.RaiseAbove( layer );
-  DALI_TEST_GREATER( layer2.GetDepth(), layer.GetDepth(), TEST_LOCATION );
+  DALI_TEST_GREATER( layer2.GetProperty< int >( Layer::Property::DEPTH ), layer.GetProperty< int >( Layer::Property::DEPTH ), TEST_LOCATION );
   root.RaiseAbove( layer2 );
-  DALI_TEST_GREATER( root.GetDepth(), layer2.GetDepth(), TEST_LOCATION );
+  DALI_TEST_GREATER( root.GetProperty< int >( Layer::Property::DEPTH ), layer2.GetProperty< int >( Layer::Property::DEPTH ), TEST_LOCATION );
   END_TEST;
 }
 
@@ -326,26 +325,26 @@ int UtcDaliLayerRaiseBelow(void)
   Layer root = Stage::GetCurrent().GetLayer( 0 );
   layer.LowerBelow( root );
   // layer depth is zero as its not on stage
-  DALI_TEST_EQUALS( layer.GetDepth(), 0u, TEST_LOCATION );
+  DALI_TEST_EQUALS( layer.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION );
   // add to stage
   Stage::GetCurrent().Add( layer );
-  DALI_TEST_EQUALS( layer.GetDepth(), 1u, TEST_LOCATION );
+  DALI_TEST_EQUALS( layer.GetProperty< int >( Layer::Property::DEPTH ), 1u, TEST_LOCATION );
   layer.LowerBelow( root );
-  DALI_TEST_EQUALS( layer.GetDepth(), 0u, TEST_LOCATION );
+  DALI_TEST_EQUALS( layer.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION );
   root.LowerBelow( layer );
-  DALI_TEST_EQUALS( layer.GetDepth(), 1u, TEST_LOCATION );
+  DALI_TEST_EQUALS( layer.GetProperty< int >( Layer::Property::DEPTH ), 1u, TEST_LOCATION );
   layer.LowerBelow( layer );
-  DALI_TEST_EQUALS( layer.GetDepth(), 1u, TEST_LOCATION );
+  DALI_TEST_EQUALS( layer.GetProperty< int >( Layer::Property::DEPTH ), 1u, TEST_LOCATION );
 
   // make another layer on the stage
   Layer layer2 = Layer::New();
   Stage::GetCurrent().Add( layer2 );
   layer.LowerBelow( layer2 );
-  DALI_TEST_GREATER( layer2.GetDepth(), layer.GetDepth(), TEST_LOCATION );
+  DALI_TEST_GREATER( layer2.GetProperty< int >( Layer::Property::DEPTH ), layer.GetProperty< int >( Layer::Property::DEPTH ), TEST_LOCATION );
   layer2.LowerBelow( layer );
-  DALI_TEST_GREATER( layer.GetDepth(), layer2.GetDepth(), TEST_LOCATION );
+  DALI_TEST_GREATER( layer.GetProperty< int >( Layer::Property::DEPTH ), layer2.GetProperty< int >( Layer::Property::DEPTH ), TEST_LOCATION );
   root.LowerBelow( layer2 );
-  DALI_TEST_GREATER( layer2.GetDepth(), root.GetDepth(), TEST_LOCATION );
+  DALI_TEST_GREATER( layer2.GetProperty< int >( Layer::Property::DEPTH ), root.GetProperty< int >( Layer::Property::DEPTH ), TEST_LOCATION );
   END_TEST;
 }
 
@@ -358,38 +357,38 @@ int UtcDaliLayerMoveAbove(void)
   Layer root = Stage::GetCurrent().GetLayer( 0 );
   layer.MoveAbove( root );
   // layer depth is zero as its not on stage
-  DALI_TEST_EQUALS( layer.GetDepth(), 0u, TEST_LOCATION );
+  DALI_TEST_EQUALS( layer.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION );
   root.MoveAbove( layer );
   // root depth is zero as layer is not on stage
-  DALI_TEST_EQUALS( layer.GetDepth(), 0u, TEST_LOCATION );
+  DALI_TEST_EQUALS( layer.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION );
   // add to stage
   Stage::GetCurrent().Add( layer );
   layer.MoveAbove( root );
-  DALI_TEST_EQUALS( layer.GetDepth(), 1u, TEST_LOCATION );
-  DALI_TEST_EQUALS( root.GetDepth(), 0u, TEST_LOCATION );
+  DALI_TEST_EQUALS( layer.GetProperty< int >( Layer::Property::DEPTH ), 1u, TEST_LOCATION );
+  DALI_TEST_EQUALS( root.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION );
   root.MoveAbove( layer );
-  DALI_TEST_EQUALS( layer.GetDepth(), 0u, TEST_LOCATION );
-  DALI_TEST_EQUALS( root.GetDepth(), 1u, TEST_LOCATION );
+  DALI_TEST_EQUALS( layer.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION );
+  DALI_TEST_EQUALS( root.GetProperty< int >( Layer::Property::DEPTH ), 1u, TEST_LOCATION );
 
   // make another layer on the stage
   Layer layer2 = Layer::New();
   Stage::GetCurrent().Add( layer2 );
   layer.MoveAbove( layer2 );
-  DALI_TEST_EQUALS( layer.GetDepth(), layer2.GetDepth() + 1u, TEST_LOCATION );
+  DALI_TEST_EQUALS( layer.GetProperty< int >( Layer::Property::DEPTH ), layer2.GetProperty< int >( Layer::Property::DEPTH ) + 1u, TEST_LOCATION );
   layer2.MoveAbove( root );
-  DALI_TEST_EQUALS( layer2.GetDepth(), root.GetDepth() + 1u, TEST_LOCATION );
+  DALI_TEST_EQUALS( layer2.GetProperty< int >( Layer::Property::DEPTH ), root.GetProperty< int >( Layer::Property::DEPTH ) + 1u, TEST_LOCATION );
   root.MoveAbove( layer );
-  DALI_TEST_EQUALS( root.GetDepth(), layer.GetDepth() + 1u, TEST_LOCATION );
+  DALI_TEST_EQUALS( root.GetProperty< int >( Layer::Property::DEPTH ), layer.GetProperty< int >( Layer::Property::DEPTH ) + 1u, TEST_LOCATION );
 
   Layer layer3 = Layer::New();
   Stage::GetCurrent().Add( layer3 );
-  DALI_TEST_EQUALS( layer3.GetDepth(), 3u, TEST_LOCATION );
+  DALI_TEST_EQUALS( layer3.GetProperty< int >( Layer::Property::DEPTH ), 3u, TEST_LOCATION );
   root.MoveAbove( layer3 );
-  DALI_TEST_EQUALS( root.GetDepth(), 3u, TEST_LOCATION );
-  DALI_TEST_EQUALS( layer3.GetDepth(), 2u, TEST_LOCATION );
-  DALI_TEST_EQUALS( Stage::GetCurrent().GetLayer( 0 ).GetDepth(), 0u, TEST_LOCATION );
+  DALI_TEST_EQUALS( root.GetProperty< int >( Layer::Property::DEPTH ), 3u, TEST_LOCATION );
+  DALI_TEST_EQUALS( layer3.GetProperty< int >( Layer::Property::DEPTH ), 2u, TEST_LOCATION );
+  DALI_TEST_EQUALS( Stage::GetCurrent().GetLayer( 0 ).GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION );
   layer3.MoveAbove( Stage::GetCurrent().GetLayer( 0 ) );
-  DALI_TEST_EQUALS( layer3.GetDepth(), 1u, TEST_LOCATION );
+  DALI_TEST_EQUALS( layer3.GetProperty< int >( Layer::Property::DEPTH ), 1u, TEST_LOCATION );
   END_TEST;
 }
 
@@ -402,35 +401,35 @@ int UtcDaliLayerMoveBelow(void)
   Layer root = Stage::GetCurrent().GetLayer( 0 );
   layer.MoveBelow( root );
   // layer depth is zero as its not on stage
-  DALI_TEST_EQUALS( layer.GetDepth(), 0u, TEST_LOCATION );
+  DALI_TEST_EQUALS( layer.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION );
   root.MoveBelow( layer );
   // root depth is zero as layer is not on stage
-  DALI_TEST_EQUALS( layer.GetDepth(), 0u, TEST_LOCATION );
+  DALI_TEST_EQUALS( layer.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION );
   // add to stage
   Stage::GetCurrent().Add( layer );
   layer.MoveBelow( root );
-  DALI_TEST_EQUALS( layer.GetDepth(), 0u, TEST_LOCATION );
-  DALI_TEST_EQUALS( root.GetDepth(), 1u, TEST_LOCATION );
+  DALI_TEST_EQUALS( layer.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION );
+  DALI_TEST_EQUALS( root.GetProperty< int >( Layer::Property::DEPTH ), 1u, TEST_LOCATION );
   root.MoveBelow( layer );
-  DALI_TEST_EQUALS( layer.GetDepth(), 1u, TEST_LOCATION );
-  DALI_TEST_EQUALS( root.GetDepth(), 0u, TEST_LOCATION );
+  DALI_TEST_EQUALS( layer.GetProperty< int >( Layer::Property::DEPTH ), 1u, TEST_LOCATION );
+  DALI_TEST_EQUALS( root.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION );
 
   // make another layer on the stage
   Layer layer2 = Layer::New();
   Stage::GetCurrent().Add( layer2 );
   layer.MoveBelow( layer2 );
-  DALI_TEST_EQUALS( layer.GetDepth(), layer2.GetDepth() - 1u, TEST_LOCATION );
+  DALI_TEST_EQUALS( layer.GetProperty< int >( Layer::Property::DEPTH ), layer2.GetProperty< int >( Layer::Property::DEPTH ) - 1u, TEST_LOCATION );
   layer2.MoveBelow( root );
-  DALI_TEST_EQUALS( layer2.GetDepth(), root.GetDepth() - 1u, TEST_LOCATION );
+  DALI_TEST_EQUALS( layer2.GetProperty< int >( Layer::Property::DEPTH ), root.GetProperty< int >( Layer::Property::DEPTH ) - 1u, TEST_LOCATION );
   root.MoveBelow( layer );
-  DALI_TEST_EQUALS( root.GetDepth(), layer.GetDepth() - 1u, TEST_LOCATION );
+  DALI_TEST_EQUALS( root.GetProperty< int >( Layer::Property::DEPTH ), layer.GetProperty< int >( Layer::Property::DEPTH ) - 1u, TEST_LOCATION );
 
   Layer layer3 = Layer::New();
   Stage::GetCurrent().Add( layer3 );
-  DALI_TEST_EQUALS( layer3.GetDepth(), 3u, TEST_LOCATION );
+  DALI_TEST_EQUALS( layer3.GetProperty< int >( Layer::Property::DEPTH ), 3u, TEST_LOCATION );
   root.MoveBelow( layer3 );
-  DALI_TEST_EQUALS( root.GetDepth(), 2u, TEST_LOCATION );
-  DALI_TEST_EQUALS( layer3.GetDepth(), 3u, TEST_LOCATION );
+  DALI_TEST_EQUALS( root.GetProperty< int >( Layer::Property::DEPTH ), 2u, TEST_LOCATION );
+  DALI_TEST_EQUALS( layer3.GetProperty< int >( Layer::Property::DEPTH ), 3u, TEST_LOCATION );
   END_TEST;
 }
 
@@ -445,22 +444,26 @@ int UtcDaliLayerDefaultProperties(void)
   indices.push_back(Layer::Property::CLIPPING_ENABLE);
   indices.push_back(Layer::Property::CLIPPING_BOX);
   indices.push_back(Layer::Property::BEHAVIOR);
+  indices.push_back(Layer::Property::DEPTH);
+  indices.push_back(Layer::Property::DEPTH_TEST);
+  indices.push_back(Layer::Property::CONSUMES_TOUCH);
+  indices.push_back(Layer::Property::CONSUMES_HOVER);
 
   DALI_TEST_CHECK(actor.GetPropertyCount() == ( Actor::New().GetPropertyCount() + indices.size() ) );
 
   for(std::vector<Property::Index>::iterator iter = indices.begin(); iter != indices.end(); ++iter)
   {
     DALI_TEST_CHECK( *iter == actor.GetPropertyIndex(actor.GetPropertyName(*iter)) );
-    DALI_TEST_CHECK( actor.IsPropertyWritable(*iter) );
+    DALI_TEST_CHECK( *iter == Layer::Property::DEPTH ? !actor.IsPropertyWritable(*iter) : actor.IsPropertyWritable(*iter) );
     DALI_TEST_CHECK( !actor.IsPropertyAnimatable(*iter) );
     DALI_TEST_CHECK( actor.GetPropertyType(*iter) == actor.GetPropertyType(*iter) );  // just checking call succeeds
   }
 
   // set/get one of them
-  actor.SetClippingBox(0,0,0,0);
+  actor.SetProperty( Layer::Property::CLIPPING_BOX, ClippingBox( 0, 0, 0, 0 ) );
 
   ClippingBox testBox(10,20,30,40);
-  DALI_TEST_CHECK(actor.GetClippingBox() != testBox);
+  DALI_TEST_CHECK(actor.GetProperty< Rect<int32_t> >( Layer::Property::CLIPPING_BOX ) != testBox);
 
   actor.SetProperty(Layer::Property::CLIPPING_BOX, Property::Value(Rect<int>(testBox)));
 
@@ -473,17 +476,17 @@ int UtcDaliLayerDefaultProperties(void)
   DALI_TEST_CHECK(v.Get<Rect<int> >() == testBox);
 
   // set the same boundaries, but through a clipping box object
-  actor.SetClippingBox( testBox );
-  DALI_TEST_CHECK( actor.GetClippingBox() == testBox );
+  actor.SetProperty( Layer::Property::CLIPPING_BOX, testBox );
+  DALI_TEST_CHECK( actor.GetProperty< Rect<int32_t> >( Layer::Property::CLIPPING_BOX ) == testBox );
 
   actor.SetProperty(Layer::Property::BEHAVIOR, Property::Value(Layer::LAYER_UI));
-  DALI_TEST_CHECK(Property::STRING == actor.GetPropertyType(Layer::Property::BEHAVIOR));
+  DALI_TEST_CHECK(Property::INTEGER == actor.GetPropertyType(Layer::Property::BEHAVIOR));
 
   Property::Value behavior = actor.GetProperty(Layer::Property::BEHAVIOR);
-  DALI_TEST_EQUALS(behavior.Get<std::string>().c_str(), "LAYER_UI", TEST_LOCATION );
+  DALI_TEST_EQUALS( behavior.Get<Dali::Layer::Behavior>(), Layer::LAYER_UI, TEST_LOCATION );
 
   behavior = actor.GetCurrentProperty( Layer::Property::BEHAVIOR );
-  DALI_TEST_EQUALS(behavior.Get<std::string>().c_str(), "LAYER_UI", TEST_LOCATION );
+  DALI_TEST_EQUALS( behavior.Get<Dali::Layer::Behavior>(), Layer::LAYER_UI, TEST_LOCATION );
 
   END_TEST;
 }
@@ -494,16 +497,16 @@ int UtcDaliLayerSetDepthTestDisabled(void)
   tet_infoline("Testing Dali::Layer::SetDepthTestDisabled() ");
 
   Layer actor = Layer::New();
-  // Note that IsDepthTestDisabled does not depend on layer behavior,
+  // Note that Layer::Property::DEPTH_TEST does not depend on layer behavior,
   // as 2D layers can still have depth tests performed on a per-renderer basis.
   // Check default.
-  DALI_TEST_CHECK( actor.IsDepthTestDisabled() );
+  DALI_TEST_CHECK( !actor.GetProperty< bool >( Layer::Property::DEPTH_TEST ) );
 
   // Check Set / Unset.
-  actor.SetDepthTestDisabled( false );
-  DALI_TEST_CHECK( !actor.IsDepthTestDisabled() );
-  actor.SetDepthTestDisabled( true );
-  DALI_TEST_CHECK( actor.IsDepthTestDisabled() );
+  actor.SetProperty(Layer::Property::DEPTH_TEST, true );
+  DALI_TEST_CHECK( actor.GetProperty< bool >( Layer::Property::DEPTH_TEST ) );
+  actor.SetProperty(Layer::Property::DEPTH_TEST, false );
+  DALI_TEST_CHECK( !actor.GetProperty< bool >( Layer::Property::DEPTH_TEST ) );
 
   END_TEST;
 }
@@ -535,9 +538,9 @@ int UtcDaliLayerTouchConsumed(void)
   TestApplication application;
   Layer layer = Layer::New();
 
-  DALI_TEST_EQUALS( layer.IsTouchConsumed(), false, TEST_LOCATION );
-  layer.SetTouchConsumed( true );
-  DALI_TEST_EQUALS( layer.IsTouchConsumed(), true, TEST_LOCATION );
+  DALI_TEST_EQUALS( layer.GetProperty< bool >( Layer::Property::CONSUMES_TOUCH ), false, TEST_LOCATION );
+  layer.SetProperty( Layer::Property::CONSUMES_TOUCH, true );
+  DALI_TEST_EQUALS( layer.GetProperty< bool >( Layer::Property::CONSUMES_TOUCH ), true, TEST_LOCATION );
   END_TEST;
 }
 
@@ -546,9 +549,9 @@ int UtcDaliLayerHoverConsumed(void)
   TestApplication application;
   Layer layer = Layer::New();
 
-  DALI_TEST_EQUALS( layer.IsHoverConsumed(), false, TEST_LOCATION );
-  layer.SetHoverConsumed( true );
-  DALI_TEST_EQUALS( layer.IsHoverConsumed(), true, TEST_LOCATION );
+  DALI_TEST_EQUALS( layer.GetProperty< bool >( Layer::Property::CONSUMES_HOVER ), false, TEST_LOCATION );
+  layer.SetProperty( Layer::Property::CONSUMES_HOVER, true );
+  DALI_TEST_EQUALS( layer.GetProperty< bool >( Layer::Property::CONSUMES_HOVER ), true, TEST_LOCATION );
   END_TEST;
 }
 
@@ -560,8 +563,8 @@ int UtcDaliLayerClippingGLCalls(void)
 
   ClippingBox testBox( 5, 6, 77, 83 );
   Layer layer = Stage::GetCurrent().GetRootLayer();
-  layer.SetClipping( true );
-  layer.SetClippingBox( testBox );
+  layer.SetProperty( Layer::Property::CLIPPING_ENABLE, true );
+  layer.SetProperty( Layer::Property::CLIPPING_BOX, testBox );
 
   // Add at least one renderable actor so the GL calls are actually made
   Texture img = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 1, 1 );
@@ -584,9 +587,9 @@ int UtcDaliLayerBehaviour(void)
   TestApplication application;
   Layer layer = Layer::New();
 
-  DALI_TEST_EQUALS( layer.GetBehavior(), Dali::Layer::LAYER_UI, TEST_LOCATION );
-  layer.SetBehavior( Dali::Layer::LAYER_3D );
-  DALI_TEST_EQUALS( layer.GetBehavior(), Dali::Layer::LAYER_3D, TEST_LOCATION );
+  DALI_TEST_EQUALS( layer.GetProperty<Layer::Behavior>( Layer::Property::BEHAVIOR ), Dali::Layer::LAYER_UI, TEST_LOCATION );
+  layer.SetProperty( Layer::Property::BEHAVIOR, Dali::Layer::LAYER_3D );
+  DALI_TEST_EQUALS( layer.GetProperty<Layer::Behavior>( Layer::Property::BEHAVIOR ), Dali::Layer::LAYER_3D, TEST_LOCATION );
   END_TEST;
 }
 
@@ -608,7 +611,7 @@ int UtcDaliLayer3DSort(void)
   TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
   TraceCallStack& enabledDisableTrace = glAbstraction.GetEnableDisableTrace();
 
-  Stage::GetCurrent().GetRootLayer().SetBehavior( Layer::LAYER_3D );
+  Stage::GetCurrent().GetRootLayer().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
 
   // Create an actor.
   Actor actor = CreateActor( false );
index d9fb1c8..2329c53 100644 (file)
@@ -947,7 +947,7 @@ int UtcDaliLongPressGestureLayerConsumesTouch(void)
   data.Reset();
 
   // Set layer to consume all touch
-  layer.SetTouchConsumed( true );
+  layer.SetProperty( Layer::Property::CONSUMES_TOUCH, true );
 
   // Render and notify
   application.SendNotification();
index 49709dc..fefb423 100644 (file)
@@ -2789,7 +2789,7 @@ int UtcDaliPanGestureLayerConsumesTouch(void)
   data.Reset();
 
   // Set layer to consume all touch
-  layer.SetTouchConsumed( true );
+  layer.SetProperty( Layer::Property::CONSUMES_TOUCH, true );
 
   // Render and notify
   application.SendNotification();
index 72bcb92..45e8948 100644 (file)
@@ -1096,7 +1096,7 @@ int UtcDaliPinchGestureLayerConsumesTouch(void)
   data.Reset();
 
   // Set layer to consume all touch
-  layer.SetTouchConsumed( true );
+  layer.SetProperty( Layer::Property::CONSUMES_TOUCH, true );
 
   // Render and notify
   application.SendNotification();
index b948e89..76639e8 100644 (file)
@@ -2083,7 +2083,7 @@ int UtcDaliRendererSetDepthFunction(void)
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
   Stage stage = Stage::GetCurrent();
-  stage.GetRootLayer().SetBehavior( Layer::LAYER_3D );
+  stage.GetRootLayer().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
   stage.Add(actor);
 
   TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
@@ -2292,7 +2292,7 @@ Renderer RendererTestFixture( TestApplication& application )
   actor.AddRenderer( renderer );
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
   Stage stage = Stage::GetCurrent();
-  stage.GetRootLayer().SetBehavior( Layer::LAYER_3D );
+  stage.GetRootLayer().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
   stage.Add( actor );
 
   return renderer;
@@ -2341,7 +2341,7 @@ int UtcDaliRendererSetDepthTestMode(void)
 
   // Change the layer behavior to LAYER_UI.
   // Note this will also disable depth testing for the layer by default, we test this first.
-  Stage::GetCurrent().GetRootLayer().SetBehavior( Layer::LAYER_UI );
+  Stage::GetCurrent().GetRootLayer().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_UI );
 
   glEnableDisableStack.Reset();
   application.SendNotification();
@@ -2351,7 +2351,7 @@ int UtcDaliRendererSetDepthTestMode(void)
   DALI_TEST_CHECK( glEnableDisableStack.FindMethodAndParams( "Disable", GetDepthTestString() ) );
 
   // Turn the layer depth-test flag back on, and confirm that depth testing is now on.
-  Stage::GetCurrent().GetRootLayer().SetDepthTestDisabled( false );
+  Stage::GetCurrent().GetRootLayer().SetProperty(Layer::Property::DEPTH_TEST, true );
 
   glEnableDisableStack.Reset();
   application.SendNotification();
index 77c7a8b..353b6f8 100644 (file)
@@ -1086,7 +1086,7 @@ int UtcDaliRotationGestureLayerConsumesTouch(void)
   data.Reset();
 
   // Set layer to consume all touch
-  layer.SetTouchConsumed( true );
+  layer.SetProperty( Layer::Property::CONSUMES_TOUCH, true );
 
   // Render and notify
   application.SendNotification();
index 67e60c2..516133a 100644 (file)
@@ -894,7 +894,7 @@ int UtcDaliTapGestureLayerConsumesTouch(void)
   data.Reset();
 
   // Set layer to consume all touch
-  layer.SetTouchConsumed( true );
+  layer.SetProperty( Layer::Property::CONSUMES_TOUCH, true );
 
   // Render and notify
   application.SendNotification();
index 5471181..48258eb 100755 (executable)
@@ -1435,7 +1435,7 @@ int UtcDaliTouchDataLayerConsumesTouch(void)
   data.Reset();
 
   // Set layer to consume all touch
-  layer.SetTouchConsumed( true );
+  layer.SetProperty( Layer::Property::CONSUMES_TOUCH, true );
 
   // Render and notify
   application.SendNotification();
index 2bc6636..8825942 100755 (executable)
@@ -1235,7 +1235,7 @@ int UtcDaliTouchLayerConsumesTouch(void)
   data.Reset();
 
   // Set layer to consume all touch
-  layer.SetTouchConsumed( true );
+  layer.SetProperty( Layer::Property::CONSUMES_TOUCH, true );
 
   // Render and notify
   application.SendNotification();
index 5d184b0..83508ce 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.
@@ -58,7 +58,11 @@ namespace
 DALI_PROPERTY_TABLE_BEGIN
 DALI_PROPERTY( "clippingEnable",    BOOLEAN,    true,    false,   true,   Dali::Layer::Property::CLIPPING_ENABLE )
 DALI_PROPERTY( "clippingBox",       RECTANGLE,  true,    false,   true,   Dali::Layer::Property::CLIPPING_BOX    )
-DALI_PROPERTY( "behavior",          STRING,     true,    false,   false,  Dali::Layer::Property::BEHAVIOR        )
+DALI_PROPERTY( "behavior",          INTEGER,    true,    false,   false,  Dali::Layer::Property::BEHAVIOR        )
+DALI_PROPERTY( "depth",             INTEGER,    false,   false,   false,  Dali::Layer::Property::DEPTH           )
+DALI_PROPERTY( "depthTest",         BOOLEAN,    true,    false,   false,  Dali::Layer::Property::DEPTH_TEST      )
+DALI_PROPERTY( "consumesTouch",     BOOLEAN,    true,    false,   false,  Dali::Layer::Property::CONSUMES_TOUCH  )
+DALI_PROPERTY( "consumesHover",     BOOLEAN,    true,    false,   false,  Dali::Layer::Property::CONSUMES_HOVER  )
 DALI_PROPERTY_TABLE_END( DEFAULT_DERIVED_ACTOR_PROPERTY_START_INDEX, LayerDefaultProperties )
 
 // Actions
@@ -383,13 +387,37 @@ void Layer::SetDefaultProperty( Property::Index index, const Property::Value& pr
       }
       case Dali::Layer::Property::BEHAVIOR:
       {
-        Behavior behavior(Dali::Layer::LAYER_UI);
-        if( Scripting::GetEnumeration< Behavior >( propertyValue.Get< std::string >().c_str(), BEHAVIOR_TABLE, BEHAVIOR_TABLE_COUNT, behavior ) )
+        Behavior behavior = mBehavior;
+
+        Property::Type type = propertyValue.GetType();
+        if( type == Property::STRING )
+        {
+          if( Scripting::GetEnumeration< Behavior >( propertyValue.Get< std::string >().c_str(), BEHAVIOR_TABLE, BEHAVIOR_TABLE_COUNT, behavior ) )
+          {
+            SetBehavior( behavior );
+          }
+        }
+        else if ( type == Property::INTEGER )
         {
-          SetBehavior( behavior );
+          SetBehavior( propertyValue.Get< Dali::Layer::Behavior >() );
         }
         break;
       }
+      case Dali::Layer::Property::DEPTH_TEST:
+      {
+        SetDepthTestDisabled( !propertyValue.Get<bool>() );
+        break;
+      }
+      case Dali::Layer::Property::CONSUMES_TOUCH:
+      {
+        SetTouchConsumed( propertyValue.Get<bool>() );
+        break;
+      }
+      case Dali::Layer::Property::CONSUMES_HOVER:
+      {
+        SetHoverConsumed( propertyValue.Get<bool>() );
+        break;
+      }
       default:
       {
         DALI_LOG_WARNING( "Unknown property (%d)\n", index );
@@ -423,7 +451,27 @@ Property::Value Layer::GetDefaultProperty( Property::Index index ) const
       }
       case Dali::Layer::Property::BEHAVIOR:
       {
-        ret = Scripting::GetLinearEnumerationName< Behavior >( GetBehavior(), BEHAVIOR_TABLE, BEHAVIOR_TABLE_COUNT );
+        ret = mBehavior;
+        break;
+      }
+      case Dali::Layer::Property::DEPTH:
+      {
+        ret = static_cast<int>( GetDepth() );
+        break;
+      }
+      case Dali::Layer::Property::DEPTH_TEST:
+      {
+        ret = !mDepthTestDisabled;
+        break;
+      }
+      case Dali::Layer::Property::CONSUMES_TOUCH:
+      {
+        ret = mTouchConsumed;
+        break;
+      }
+      case Dali::Layer::Property::CONSUMES_HOVER:
+      {
+        ret = mHoverConsumed;
         break;
       }
       default:
index f685837..87e1693 100644 (file)
@@ -432,7 +432,7 @@ bool HitTestRenderTask( const RenderTaskList::ExclusivesContainer& exclusives,
       Dali::Layer layer( sourceActor->GetLayer() );
       if( layer )
       {
-        const uint32_t sourceActorDepth( layer.GetDepth() );
+        const uint32_t sourceActorDepth( layer.GetProperty< bool >( Dali::Layer::Property::DEPTH ) );
 
         CameraActor* cameraActor = renderTask.GetCameraActor();
         bool pickingPossible = cameraActor->BuildPickingRay(
index 5e31ff7..ca96f9b 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.
@@ -58,11 +58,6 @@ Layer& Layer::operator=(const Layer& rhs)
   return *this;
 }
 
-uint32_t Layer::GetDepth() const
-{
-  return GetImplementation(*this).GetDepth();
-}
-
 void Layer::Raise()
 {
   GetImplementation(*this).Raise();
@@ -103,76 +98,11 @@ void Layer::MoveBelow( Layer target )
   GetImplementation(*this).MoveBelow( GetImplementation( target ) );
 }
 
-void Layer::SetBehavior( Behavior behavior )
-{
-  GetImplementation(*this).SetBehavior( behavior );
-}
-
-Layer::Behavior Layer::GetBehavior() const
-{
-  return GetImplementation(*this).GetBehavior();
-}
-
-void Layer::SetClipping(bool enabled)
-{
-  GetImplementation(*this).SetClipping(enabled);
-}
-
-bool Layer::IsClipping() const
-{
-  return GetImplementation(*this).IsClipping();
-}
-
-void Layer::SetClippingBox(int32_t x, int32_t y, int32_t width, int32_t height)
-{
-  GetImplementation(*this).SetClippingBox(x, y, width, height);
-}
-
-void Layer::SetClippingBox(ClippingBox box)
-{
-  GetImplementation(*this).SetClippingBox(box.x, box.y, box.width, box.height);
-}
-
-ClippingBox Layer::GetClippingBox() const
-{
-  return GetImplementation(*this).GetClippingBox();
-}
-
-void Layer::SetDepthTestDisabled( bool disable )
-{
-  GetImplementation(*this).SetDepthTestDisabled( disable );
-}
-
-bool Layer::IsDepthTestDisabled() const
-{
-  return GetImplementation(*this).IsDepthTestDisabled();
-}
-
 void Layer::SetSortFunction(SortFunctionType function)
 {
   GetImplementation(*this).SetSortFunction(function);
 }
 
-void Layer::SetTouchConsumed( bool consume )
-{
-  GetImplementation( *this ).SetTouchConsumed( consume );
-}
-
-bool Layer::IsTouchConsumed() const
-{
-  return GetImplementation( *this ).IsTouchConsumed();
-}
-
-void Layer::SetHoverConsumed( bool consume )
-{
-  GetImplementation( *this ).SetHoverConsumed( consume );
-}
-
-bool Layer::IsHoverConsumed() const
-{
-  return GetImplementation( *this ).IsHoverConsumed();
-}
-
 Layer::Layer(Internal::Layer* internal)
 : Actor(internal)
 {
index 3db29be..49cc2af 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_LAYER_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.
@@ -105,7 +105,42 @@ public:
     {
       CLIPPING_ENABLE = DEFAULT_DERIVED_ACTOR_PROPERTY_START_INDEX, ///< name "clippingEnable",   type bool @SINCE_1_0.0
       CLIPPING_BOX,                                                 ///< name "clippingBox",      type Rect<int32_t> @SINCE_1_0.0
-      BEHAVIOR,                                                     ///< name "behavior",         type String @SINCE_1_0.0
+      BEHAVIOR,                                                     ///< name "behavior",         type integer or string @SINCE_1_0.0
+
+      /**
+       * @brief The current depth of the layer.
+       * @details Name "depth", type Property::INTEGER. Read-only
+       * @note 0 is the bottom most layer, higher number is on top.
+       * @note Layer should be on the stage. If layer is not added to the stage, the depth is 0.
+       * @SINCE_1_9.16
+       */
+      DEPTH,
+
+      /**
+       * @brief Whether to enable the depth test.
+       * @details Name "depthTest", type Property::BOOLEAN.
+       * @note By default a layer enables depth test if there is more than one opaque actor
+       * or if there is one opaque actor and one, or more, transparent actors in LAYER_3D mode.
+       * However, it's possible to disable the depth test by setting this property to False.
+       * @SINCE_1_9.16
+       */
+      DEPTH_TEST,
+
+      /**
+       * @brief Whether this layer should consume touch (including gestures).
+       * @details Name "consumesTouch", type Property::BOOLEAN.
+       * @note When this is True, any layers behind this layer will not be hit-test.
+       * @SINCE_1_9.16
+       */
+      CONSUMES_TOUCH,
+
+      /**
+       * @brief Whether this layer should consume hover (including gestures).
+       * @details Name "consumesHover", type Property::BOOLEAN.
+       * @note When this is True, any layers behind this layer will not be hit-test.
+       * @SINCE_1_9.16
+       */
+      CONSUMES_HOVER,
     };
   };
 
@@ -250,17 +285,6 @@ public:
   Layer& operator=(const Layer& rhs);
 
   /**
-   * @brief Queries the depth of the layer.
-   *
-   * 0 is the bottom most layer, higher number is on top.
-   * @SINCE_1_0.0
-   * @return The current depth of the layer
-   * @pre Layer is on the stage.
-   * If layer is not added to the stage, returns 0.
-   */
-  uint32_t GetDepth() const;
-
-  /**
    * @brief Increments the depth of the layer.
    *
    * @SINCE_1_0.0
@@ -340,93 +364,6 @@ public:
    */
   void MoveBelow( Layer target );
 
-  /**
-   * @brief Sets the behavior of the layer.
-   *
-   * @SINCE_1_0.0
-   * @param[in] behavior The desired behavior
-   */
-  void SetBehavior( Behavior behavior );
-
-  /**
-   * @brief Gets the behavior of the layer.
-   *
-   * @SINCE_1_0.0
-   * @return The behavior of the layer
-   */
-  Behavior GetBehavior() const;
-
-  /**
-   * @brief Sets whether clipping is enabled for a layer.
-   *
-   * Clipping is initially disabled; see also SetClippingBox().
-   * @SINCE_1_0.0
-   * @param[in] enabled True if clipping is enabled
-   *
-   * @note When clipping is enabled, the default clipping box is empty (0,0,0,0), which means everything is clipped.
-   */
-  void SetClipping(bool enabled);
-
-  /**
-   * @brief Queries whether clipping is enabled for a layer.
-   * @SINCE_1_0.0
-   * @return True if clipping is enabled
-   */
-  bool IsClipping() const;
-
-  /**
-   * @brief Sets the clipping box of a layer, in window coordinates.
-   *
-   * The contents of the layer will not be visible outside this box, when clipping is
-   * enabled. The default clipping box is empty (0,0,0,0) which means everything is clipped.
-   * You can only do rectangular clipping using this API in window coordinates.
-   * @SINCE_1_0.0
-   * @param[in] x The X-coordinate of the top-left corner of the box
-   * @param[in] y The Y-coordinate of the top-left corner of the box
-   * @param[in] width The width of the box
-   * @param[in] height The height of the box
-   */
-  void SetClippingBox(int32_t x, int32_t y, int32_t width, int32_t height);
-
-  /**
-   * @brief Sets the clipping box of a layer in window coordinates.
-   *
-   * The contents of the layer will not be visible outside this box when clipping is
-   * enabled. The default clipping box is empty (0,0,0,0).
-   * @SINCE_1_0.0
-   * @param[in] box The clipping box
-   */
-  void SetClippingBox(ClippingBox box);
-
-  /**
-   * @brief Retrieves the clipping box of a layer in window coordinates.
-   *
-   * @SINCE_1_0.0
-   * @return The clipping box
-   */
-  ClippingBox GetClippingBox() const;
-
-  // Depth test
-
-  /**
-   * @brief Whether to disable the depth test.
-   *
-   * By default a layer enables depth test if there is more than one opaque actor or if there is one opaque actor and one, or more, transparent actors in LAYER_3D mode.
-   * However, it's possible to disable the depth test by calling this method.
-   *
-   * @SINCE_1_0.0
-   * @param[in] disable \e True disables depth test. \e false sets the default behavior
-   */
-  void SetDepthTestDisabled( bool disable );
-
-  /**
-   * @brief Retrieves whether depth test is disabled.
-   *
-   * @SINCE_1_0.0
-   * @return \e True if depth test is disabled
-   */
-  bool IsDepthTestDisabled() const;
-
   // Sorting
 
   /**
@@ -452,34 +389,6 @@ public:
   void SetSortFunction( SortFunctionType function );
 
   /**
-   * @brief This allows the user to specify whether this layer should consume touch (including gestures).
-   *
-   * If set, any layers behind this layer will not be hit-test.
-   *
-   * @SINCE_1_0.0
-   * @param[in] consume Whether the layer should consume touch (including gestures)
-   */
-  void SetTouchConsumed( bool consume );
-
-  /**
-   * @brief Retrieves whether the layer consumes touch (including gestures).
-   *
-   * @SINCE_1_0.0
-   * @return @c True if consuming touch, @c false otherwise
-   */
-  bool IsTouchConsumed() const;
-
-  /**
-   * @brief This allows the user to specify whether this layer should consume hover.
-   *
-   * If set, any layers behind this layer will not be hit-test.
-   *
-   * @SINCE_1_0.0
-   * @param[in] consume Whether the layer should consume hover
-   */
-  void SetHoverConsumed( bool consume );
-
-  /**
    * @brief Retrieves whether the layer consumes hover.
    *
    * @SINCE_1_0.0