From 5aaba5adcf1a717e1ece3ef9c55c8912420993b5 Mon Sep 17 00:00:00 2001 From: Richard Huang Date: Wed, 10 Jun 2020 13:59:17 +0100 Subject: [PATCH] Remove Setter/Getter public APIs from Dali::Layer Change-Id: Ic37c946754573dca358baa1d5d0489f1296587cf --- automated-tests/src/dali-toolkit/utc-Dali-Popup.cpp | 7 +++++++ .../controls/page-turn-view/page-turn-view-impl.cpp | 2 +- dali-toolkit/internal/controls/popup/popup-impl.cpp | 6 +++--- .../internal/controls/scene3d-view/scene3d-view-impl.cpp | 2 +- dali-toolkit/internal/visuals/image/image-visual.cpp | 2 +- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/automated-tests/src/dali-toolkit/utc-Dali-Popup.cpp b/automated-tests/src/dali-toolkit/utc-Dali-Popup.cpp index 02c94695c5..8c5fbf7ea9 100755 --- a/automated-tests/src/dali-toolkit/utc-Dali-Popup.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-Popup.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -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; diff --git a/dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.cpp b/dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.cpp index 8e5613ec45..21a79a3ea8 100644 --- a/dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.cpp +++ b/dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.cpp @@ -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 diff --git a/dali-toolkit/internal/controls/popup/popup-impl.cpp b/dali-toolkit/internal/controls/popup/popup-impl.cpp index 66e6350833..45d56f6f1f 100644 --- a/dali-toolkit/internal/controls/popup/popup-impl.cpp +++ b/dali-toolkit/internal/controls/popup/popup-impl.cpp @@ -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; } diff --git a/dali-toolkit/internal/controls/scene3d-view/scene3d-view-impl.cpp b/dali-toolkit/internal/controls/scene3d-view/scene3d-view-impl.cpp index 380f6b55fe..1521ae909e 100644 --- a/dali-toolkit/internal/controls/scene3d-view/scene3d-view-impl.cpp +++ b/dali-toolkit/internal/controls/scene3d-view/scene3d-view-impl.cpp @@ -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 ); diff --git a/dali-toolkit/internal/visuals/image/image-visual.cpp b/dali-toolkit/internal/visuals/image/image-visual.cpp index 3d8456aca2..07ead876af 100644 --- a/dali-toolkit/internal/visuals/image/image-visual.cpp +++ b/dali-toolkit/internal/visuals/image/image-visual.cpp @@ -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::Property::BEHAVIOR ) == Layer::LAYER_3D ) { // Layer 3D set, do not align pixels mImpl->mRenderer.RegisterProperty( PIXEL_ALIGNED_UNIFORM_NAME, PIXEL_ALIGN_OFF ); -- 2.34.1