Remove Setter/Getter public APIs from Dali::Layer 78/235878/3
authorRichard Huang <r.huang@samsung.com>
Wed, 10 Jun 2020 12:59:17 +0000 (13:59 +0100)
committerRichard Huang <r.huang@samsung.com>
Wed, 10 Jun 2020 14:16:44 +0000 (15:16 +0100)
Change-Id: Ic37c946754573dca358baa1d5d0489f1296587cf

automated-tests/src/dali-toolkit/utc-Dali-Popup.cpp
dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.cpp
dali-toolkit/internal/controls/popup/popup-impl.cpp
dali-toolkit/internal/controls/scene3d-view/scene3d-view-impl.cpp
dali-toolkit/internal/visuals/image/image-visual.cpp

index 02c94695c520a518767e3b163d5eed56907dc532..8c5fbf7ea9ad7c197cc1e2cf8408ba59353a9f1b 100755 (executable)
@@ -25,6 +25,7 @@
 #include <dali.h>
 #include <dali/integration-api/events/key-event-integ.h>
 #include <dali/integration-api/events/touch-event-integ.h>
+#include <dali/integration-api/events/wheel-event-integ.h>
 #include <dali/devel-api/actors/actor-devel.h>
 #include <dali/devel-api/scripting/scripting.h>
 #include <dali-toolkit/dali-toolkit.h>
@@ -1207,6 +1208,12 @@ int UtcDaliPopupPropertyTouchTransparent(void)
 
   DALI_TEST_CHECK( !gPushButtonClicked );
 
+  // Perform a wheel event
+  Dali::Integration::WheelEvent wheelEvent( Dali::Integration::WheelEvent::MOUSE_WHEEL, 0, 0u, Vector2( 10.0f, 10.0f ), 1, 1000u );
+  application.ProcessEvent( wheelEvent );
+  application.SendNotification();
+  application.Render();
+
   // Enable touch transparency.
   popup.SetProperty( Popup::Property::TOUCH_TRANSPARENT, true );
   bool propertyResult;
index 8e5613ec45fba01cbde644a0af6481d4776991cf..21a79a3ea8c2817ddb56e6d336fa56d786ca35b7 100644 (file)
@@ -395,7 +395,7 @@ void PageTurnView::OnInitialize()
   // create the layer for turning pages
   mTurningPageLayer = Layer::New();
   mTurningPageLayer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT );
-  mTurningPageLayer.SetBehavior(Layer::LAYER_3D);
+  mTurningPageLayer.SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
   mTurningPageLayer.Raise();
 
   // Set control size and the parent origin of page layers
index 66e63508330a3d4a0a4c5ef9975fb2b6ae4c974d..45d56f6f1fae05b9b769a6a00e95f1c3245954f0 100644 (file)
@@ -1552,7 +1552,7 @@ bool Popup::OnBackingTouched( Actor actor, const TouchData& touch )
   }
 
   // Block anything behind backing becoming touched.
-  mLayer.SetTouchConsumed( true );
+  mLayer.SetProperty( Layer::Property::CONSUMES_TOUCH, true );
   return true;
 }
 
@@ -1565,7 +1565,7 @@ bool Popup::OnBackingWheelEvent( Actor actor, const WheelEvent& event )
   }
 
   // Consume wheel event in dimmed backing actor.
-  mLayer.SetTouchConsumed( true );
+  mLayer.SetProperty( Layer::Property::CONSUMES_TOUCH, true );
   return true;
 }
 
@@ -1578,7 +1578,7 @@ bool Popup::OnDialogTouched( Actor actor, const TouchData& touch )
   }
 
   // Consume event (stops backing actor receiving touch events)
-  mLayer.SetTouchConsumed( true );
+  mLayer.SetProperty( Layer::Property::CONSUMES_TOUCH, true );
   return true;
 }
 
index 380f6b55feb1e8a80e3c4fed2e90588968c3c66c..1521ae909e7a1b2968e7cf9e89056c3b39f92343 100644 (file)
@@ -356,7 +356,7 @@ void Scene3dView::OnInitialize()
   mRoot.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
 
   Layer layer = Layer::New();
-  layer.SetBehavior( Layer::LAYER_3D );
+  layer.SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
   layer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
   layer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
   layer.Add( mRoot );
index 3d8456aca265958d761180c243051667765b6143..07ead876afb845c10f0f1dc48f6939f13f5f067e 100644 (file)
@@ -771,7 +771,7 @@ void ImageVisual::DoSetOnStage( Actor& actor )
   mPlacementActor = actor;
   // Search the Actor tree to find if Layer UI behaviour set.
   Layer layer = actor.GetLayer();
-  if( layer && layer.GetBehavior() == Layer::LAYER_3D )
+  if( layer && layer.GetProperty<Layer::Behavior>( Layer::Property::BEHAVIOR ) == Layer::LAYER_3D )
   {
      // Layer 3D set, do not align pixels
      mImpl->mRenderer.RegisterProperty( PIXEL_ALIGNED_UNIFORM_NAME, PIXEL_ALIGN_OFF );