From d897eb3708e1860f636f4518ab07a149313cf5c9 Mon Sep 17 00:00:00 2001 From: Richard Huang Date: Wed, 10 Jun 2020 14:02:25 +0100 Subject: [PATCH] Remove Setter/Getter public APIs from Dali::Layer Change-Id: I1cfd50e01511c219929538c1d517d71d50584998 --- examples/benchmark/benchmark.cpp | 2 +- examples/clipping/clipping-example.cpp | 2 +- .../cube-transition-effect-example.cpp | 2 +- examples/deferred-shading/deferred-shading.cpp | 2 +- examples/flex-container/flex-container-example.cpp | 2 +- examples/fpp-game/fpp-game-example.cpp | 2 +- examples/item-view/item-view-example.cpp | 8 ++++---- examples/perf-scroll/perf-scroll.cpp | 2 +- .../pre-render-callback/pre-render-callback-example.cpp | 2 +- examples/primitive-shapes/primitive-shapes-example.cpp | 4 ++-- examples/reflection-demo/reflection-example.cpp | 4 ++-- examples/renderer-stencil/renderer-stencil-example.cpp | 4 ++-- .../shadows-and-lights/shadows-and-lights-example.cpp | 2 +- 13 files changed, 19 insertions(+), 19 deletions(-) diff --git a/examples/benchmark/benchmark.cpp b/examples/benchmark/benchmark.cpp index c4d4cf2c..a07e5f95 100644 --- a/examples/benchmark/benchmark.cpp +++ b/examples/benchmark/benchmark.cpp @@ -237,7 +237,7 @@ public: stage.SetBackgroundColor( Color::WHITE ); Vector2 stageSize = stage.GetSize(); - stage.GetRootLayer().SetDepthTestDisabled(true); + stage.GetRootLayer().SetProperty( Layer::Property::DEPTH_TEST, false ); mSize = Vector3( stageSize.x / mColumnsPerPage, stageSize.y / mRowsPerPage, 0.0f ); diff --git a/examples/clipping/clipping-example.cpp b/examples/clipping/clipping-example.cpp index 408d5c53..ab43a075 100644 --- a/examples/clipping/clipping-example.cpp +++ b/examples/clipping/clipping-example.cpp @@ -99,7 +99,7 @@ private: // Create a Spiral Layout and add it to the Item View. mItemView.AddLayout( * DefaultItemLayout::New( DefaultItemLayout::SPIRAL ) ); - stage.GetRootLayer().SetBehavior( Layer::LAYER_3D ); // The item-view spiral layout requires Layer 3D behaviour. + stage.GetRootLayer().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D ); // The item-view spiral layout requires Layer 3D behaviour. // Calculate the size we would like our item-view layout to be, and then activate the layout. const Vector2 stageSize = stage.GetSize(); diff --git a/examples/cube-transition-effect/cube-transition-effect-example.cpp b/examples/cube-transition-effect/cube-transition-effect-example.cpp index fd4ce0ae..ba73d76e 100644 --- a/examples/cube-transition-effect/cube-transition-effect-example.cpp +++ b/examples/cube-transition-effect/cube-transition-effect-example.cpp @@ -214,7 +214,7 @@ void CubeTransitionApp::OnInit( Application& application ) // Creates a default view with a default tool bar, the view is added to the stage. mContent = DemoHelper::CreateView( application, mView, mToolBar, "", TOOLBAR_IMAGE, "" ); - mContent.SetBehavior( Layer::LAYER_3D ); + mContent.SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D ); // Add an effect changing toggle button diff --git a/examples/deferred-shading/deferred-shading.cpp b/examples/deferred-shading/deferred-shading.cpp index b3819e79..78aff54b 100644 --- a/examples/deferred-shading/deferred-shading.cpp +++ b/examples/deferred-shading/deferred-shading.cpp @@ -504,7 +504,7 @@ private: // Grab stage, configure layer Stage stage = Stage::GetCurrent(); auto rootLayer = stage.GetRootLayer(); - rootLayer.SetBehavior(Layer::LAYER_3D); + rootLayer.SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D ); auto stageSize = stage.GetSize(); auto stageHalfSize = stageSize * .5f; diff --git a/examples/flex-container/flex-container-example.cpp b/examples/flex-container/flex-container-example.cpp index 0d5acb4b..b4886741 100644 --- a/examples/flex-container/flex-container-example.cpp +++ b/examples/flex-container/flex-container-example.cpp @@ -121,7 +121,7 @@ public: { Stage stage = Dali::Stage::GetCurrent(); stage.KeyEventSignal().Connect(this, &FlexContainerExample::OnKeyEvent); - stage.GetRootLayer().SetBehavior(Layer::LAYER_3D); + stage.GetRootLayer().SetProperty( Layer::Property::BEHAVIOR,Layer::LAYER_3D ); Vector2 stageSize = Stage::GetCurrent().GetSize(); diff --git a/examples/fpp-game/fpp-game-example.cpp b/examples/fpp-game/fpp-game-example.cpp index c409dc28..517cf69f 100644 --- a/examples/fpp-game/fpp-game-example.cpp +++ b/examples/fpp-game/fpp-game-example.cpp @@ -103,7 +103,7 @@ public: mStage.SetBackgroundColor( Color::BLACK ); // Use 3D layer - mStage.GetRootLayer().SetBehavior( Layer::LAYER_3D ); + mStage.GetRootLayer().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D ); // Load game scene mScene.Load( SCENE_URL ); diff --git a/examples/item-view/item-view-example.cpp b/examples/item-view/item-view-example.cpp index 677232dc..55e2c5b6 100644 --- a/examples/item-view/item-view-example.cpp +++ b/examples/item-view/item-view-example.cpp @@ -198,7 +198,7 @@ public: { Stage stage = Dali::Stage::GetCurrent(); stage.KeyEventSignal().Connect(this, &ItemViewExample::OnKeyEvent); - stage.GetRootLayer().SetBehavior(Layer::LAYER_3D); + stage.GetRootLayer().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D ); Vector2 stageSize = Stage::GetCurrent().GetSize(); @@ -280,7 +280,7 @@ public: // Display item view on the stage stage.Add( mItemView ); - stage.GetRootLayer().SetBehavior( Layer::LAYER_3D ); + stage.GetRootLayer().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D ); // Create the layouts mSpiralLayout = DefaultItemLayout::New( DefaultItemLayout::SPIRAL ); @@ -350,12 +350,12 @@ public: case SPIRAL_LAYOUT: case DEPTH_LAYOUT: { - stage.GetRootLayer().SetBehavior(Layer::LAYER_3D); + stage.GetRootLayer().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D ); break; } case GRID_LAYOUT: { - stage.GetRootLayer().SetBehavior(Layer::LAYER_UI); + stage.GetRootLayer().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_UI ); break; } } diff --git a/examples/perf-scroll/perf-scroll.cpp b/examples/perf-scroll/perf-scroll.cpp index 503dcc58..1680e965 100644 --- a/examples/perf-scroll/perf-scroll.cpp +++ b/examples/perf-scroll/perf-scroll.cpp @@ -235,7 +235,7 @@ public: stage.SetBackgroundColor( Color::WHITE ); Vector2 stageSize = stage.GetSize(); - stage.GetRootLayer().SetDepthTestDisabled(true); + stage.GetRootLayer().SetProperty( Layer::Property::DEPTH_TEST, false ); mSize = Vector3( stageSize.x / mColumnsPerPage, stageSize.y / mRowsPerPage, 0.0f ); diff --git a/examples/pre-render-callback/pre-render-callback-example.cpp b/examples/pre-render-callback/pre-render-callback-example.cpp index 68957cda..8143183c 100644 --- a/examples/pre-render-callback/pre-render-callback-example.cpp +++ b/examples/pre-render-callback/pre-render-callback-example.cpp @@ -125,7 +125,7 @@ private: void CreateAnimatingScene() { mSceneActor = Layer::New(); - mSceneActor.SetBehavior( Layer::LAYER_3D ); + mSceneActor.SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D ); mSceneActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER); // Create and add images to the scene actor: diff --git a/examples/primitive-shapes/primitive-shapes-example.cpp b/examples/primitive-shapes/primitive-shapes-example.cpp index 4eb57ddd..83cb06e0 100644 --- a/examples/primitive-shapes/primitive-shapes-example.cpp +++ b/examples/primitive-shapes/primitive-shapes-example.cpp @@ -94,8 +94,8 @@ public: layer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); layer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); layer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); - layer.SetBehavior( Layer::LAYER_UI ); //We use a 2D layer as this is closer to UI work than full 3D scene creation. - layer.SetDepthTestDisabled( false ); //Enable depth testing, as otherwise the 2D layer would not do so. + layer.SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_UI ); //We use a 2D layer as this is closer to UI work than full 3D scene creation. + layer.SetProperty( Layer::Property::DEPTH_TEST, true ); //Enable depth testing, as otherwise the 2D layer would not do so. stage.Add( layer ); //Set up model selection buttons. diff --git a/examples/reflection-demo/reflection-example.cpp b/examples/reflection-demo/reflection-example.cpp index 013c0b64..18329bbf 100644 --- a/examples/reflection-demo/reflection-example.cpp +++ b/examples/reflection-demo/reflection-example.cpp @@ -197,8 +197,8 @@ private: mLayer3D.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); mLayer3D.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - mLayer3D.SetBehavior( Layer::LAYER_3D ); - mLayer3D.SetDepthTestDisabled( false ); + mLayer3D.SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D ); + mLayer3D.SetProperty( Layer::Property::DEPTH_TEST, true ); auto gltf = glTF(DEMO_GAME_DIR "/reflection"); diff --git a/examples/renderer-stencil/renderer-stencil-example.cpp b/examples/renderer-stencil/renderer-stencil-example.cpp index 2e14a48e..e6732fa1 100644 --- a/examples/renderer-stencil/renderer-stencil-example.cpp +++ b/examples/renderer-stencil/renderer-stencil-example.cpp @@ -158,8 +158,8 @@ private: layer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); // Set the parent origin to a small percentage below the center (so the demo will scale for different resolutions). layer.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.5f, 0.58f, 0.5f ) ); - layer.SetBehavior( Layer::LAYER_UI ); - layer.SetDepthTestDisabled( false ); + layer.SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_UI ); + layer.SetProperty( Layer::Property::DEPTH_TEST, true ); stage.Add( layer ); // Main cube: diff --git a/examples/shadows-and-lights/shadows-and-lights-example.cpp b/examples/shadows-and-lights/shadows-and-lights-example.cpp index 597599af..d7ac08b6 100644 --- a/examples/shadows-and-lights/shadows-and-lights-example.cpp +++ b/examples/shadows-and-lights/shadows-and-lights-example.cpp @@ -188,7 +188,7 @@ public: // Setup mView.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ) ); - mContents.SetBehavior(Layer::LAYER_3D); + mContents.SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D ); mContents.SetProperty( Actor::Property::POSITION, mTranslation ); mContents.SetProperty( Actor::Property::ORIENTATION, CalculateWorldRotation( mSceneXRotation, mSceneYRotation ) ); mContents.SetProperty( Actor::Property::SCALE, Vector3( mPinchScale, mPinchScale, mPinchScale ) ); -- 2.34.1