(Automated Tests) Use Scene instead of Stage where possible 14/238314/3
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 10 Jul 2020 22:26:22 +0000 (23:26 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Mon, 13 Jul 2020 16:36:10 +0000 (17:36 +0100)
Change-Id: I88e987866d10b71b9ae7d80fbc13929d28324f3c

45 files changed:
automated-tests/src/dali-internal/utc-Dali-Internal-ActorObserver.cpp
automated-tests/src/dali-internal/utc-Dali-Internal-Core.cpp
automated-tests/src/dali-internal/utc-Dali-Internal-FrustumCulling.cpp
automated-tests/src/dali/utc-Dali-Actor.cpp
automated-tests/src/dali/utc-Dali-AlphaFunction.cpp
automated-tests/src/dali/utc-Dali-Animation.cpp
automated-tests/src/dali/utc-Dali-BaseHandle.cpp
automated-tests/src/dali/utc-Dali-CameraActor.cpp
automated-tests/src/dali/utc-Dali-ConnectionTracker.cpp
automated-tests/src/dali/utc-Dali-Constrainer.cpp
automated-tests/src/dali/utc-Dali-Constraint.cpp
automated-tests/src/dali/utc-Dali-Context.cpp
automated-tests/src/dali/utc-Dali-CustomActor.cpp
automated-tests/src/dali/utc-Dali-Geometry.cpp
automated-tests/src/dali/utc-Dali-Handle.cpp
automated-tests/src/dali/utc-Dali-HoverProcessing.cpp
automated-tests/src/dali/utc-Dali-KeyEvent.cpp [changed mode: 0755->0644]
automated-tests/src/dali/utc-Dali-Layer.cpp
automated-tests/src/dali/utc-Dali-LongPressGestureDetector.cpp
automated-tests/src/dali/utc-Dali-LongPressGestureRecognizer.cpp
automated-tests/src/dali/utc-Dali-PanGestureDetector.cpp
automated-tests/src/dali/utc-Dali-PanGestureRecognizer.cpp
automated-tests/src/dali/utc-Dali-PinchGestureDetector.cpp
automated-tests/src/dali/utc-Dali-PinchGestureRecognizer.cpp
automated-tests/src/dali/utc-Dali-PropertyBuffer.cpp
automated-tests/src/dali/utc-Dali-PropertyNotification.cpp
automated-tests/src/dali/utc-Dali-RenderTask.cpp
automated-tests/src/dali/utc-Dali-RenderTaskList.cpp
automated-tests/src/dali/utc-Dali-Renderer.cpp
automated-tests/src/dali/utc-Dali-RotationGestureDetector.cpp
automated-tests/src/dali/utc-Dali-RotationGestureRecognizer.cpp
automated-tests/src/dali/utc-Dali-Sampler.cpp
automated-tests/src/dali/utc-Dali-Scene.cpp
automated-tests/src/dali/utc-Dali-Scripting.cpp
automated-tests/src/dali/utc-Dali-Shader.cpp
automated-tests/src/dali/utc-Dali-SignalDelegate.cpp
automated-tests/src/dali/utc-Dali-SignalTemplates.cpp
automated-tests/src/dali/utc-Dali-Stage.cpp [changed mode: 0755->0644]
automated-tests/src/dali/utc-Dali-TapGestureDetector.cpp
automated-tests/src/dali/utc-Dali-TapGestureRecognizer.cpp
automated-tests/src/dali/utc-Dali-TextureSet.cpp
automated-tests/src/dali/utc-Dali-TouchDataProcessing.cpp [changed mode: 0755->0644]
automated-tests/src/dali/utc-Dali-TouchProcessing.cpp [changed mode: 0755->0644]
automated-tests/src/dali/utc-Dali-TypeRegistry.cpp
automated-tests/src/dali/utc-Dali-WheelEvent.cpp

index f95ba2e..6ca2c05 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.
@@ -61,7 +61,7 @@ int UtcDaliActorObserverTests(void)
 {
   TestApplication application;
 
-  auto stage = Stage::GetCurrent();
+  auto scene = application.GetScene();
   auto actor = Actor::New();
   auto& actorImpl = GetImplementation( actor );
 
@@ -73,15 +73,15 @@ int UtcDaliActorObserverTests(void)
   actorObserver.SetActor( &actorImpl );
   DALI_TEST_EQUALS( actorObserver.GetActor(), &actorImpl, TEST_LOCATION );
 
-  stage.Add( actor );
+  scene.Add( actor );
   DALI_TEST_EQUALS( actorObserver.GetActor(), &actorImpl, TEST_LOCATION );
 
-  // Removing the actor from the stage should make it return null
-  stage.Remove( actor );
+  // Removing the actor from the scene should make it return null
+  scene.Remove( actor );
   DALI_TEST_EQUALS( actorObserver.GetActor(), nullptr, TEST_LOCATION );
 
   // Adding the actor back to the scene should mean it returning the actor again
-  stage.Add( actor );
+  scene.Add( actor );
   DALI_TEST_EQUALS( actorObserver.GetActor(), &actorImpl, TEST_LOCATION );
 
   // Resetting the actor should return nullptr
@@ -92,7 +92,7 @@ int UtcDaliActorObserverTests(void)
   actorObserver.SetActor( &actorImpl );
   DALI_TEST_EQUALS( actorObserver.GetActor(), &actorImpl, TEST_LOCATION );
 
-  // Create another Actor and observe that (don't add it to the stage just yet)
+  // Create another Actor and observe that (don't add it to the scene just yet)
   {
     auto actor2 = Actor::New();
     auto& actor2Impl = GetImplementation( actor2 );
@@ -237,17 +237,17 @@ int UtcDaliActorObserverFunctionCallback(void)
   // Test to ensure the passed in callback is called when the observed actor is disconnected
   TestCallback::Reset();
 
-  auto stage = Stage::GetCurrent();
+  auto scene = application.GetScene();
   auto actor = Actor::New();
   auto& actorImpl = GetImplementation( actor );
-  stage.Add( actor );
+  scene.Add( actor );
 
   ActorObserver actorObserver( MakeCallback( &TestCallback::Function ) );
   actorObserver.SetActor( &actorImpl );
   DALI_TEST_EQUALS( actorObserver.GetActor(), &actorImpl, TEST_LOCATION );
   DALI_TEST_EQUALS( TestCallback::disconnectedActor, nullptr, TEST_LOCATION );
 
-  // Unstage Actor
+  // Remove Actor from scene
   actor.Unparent();
   DALI_TEST_EQUALS( actorObserver.GetActor(), nullptr, TEST_LOCATION );
   DALI_TEST_EQUALS( TestCallback::disconnectedActor, &actorImpl, TEST_LOCATION );
@@ -265,10 +265,10 @@ int UtcDaliActorObserverFunctionCallbackEnsureNoDoubleDelete(void)
 
   try
   {
-    auto stage = Stage::GetCurrent();
+    auto scene = application.GetScene();
     auto actor = Actor::New();
     auto& actorImpl = GetImplementation( actor );
-    stage.Add( actor );
+    scene.Add( actor );
 
     ActorObserver *observer1 = new ActorObserver( MakeCallback( &TestCallback::Function ) );
     observer1->SetActor( &actorImpl );
@@ -276,7 +276,7 @@ int UtcDaliActorObserverFunctionCallbackEnsureNoDoubleDelete(void)
     // Move observer1 into a new observer
     ActorObserver* observer2 = new ActorObserver( std::move( *observer1 ) );
 
-    // Unstage Actor, function should be called only once
+    // Remove actor from scene, function should be called only once
     actor.Unparent();
     DALI_TEST_EQUALS( TestCallback::disconnectedActor, &actorImpl, TEST_LOCATION );
     DALI_TEST_EQUALS( TestCallback::callCount, 1, TEST_LOCATION );
index 571c4b2..0004b0f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -78,7 +78,7 @@ int UtcDaliCoreProcessEvents(void)
   actor.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
   actor.SetProperty( Actor::Property::SIZE, size );
   actor.SetProperty( Actor::Property::POSITION, position );
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   RelayoutSignalHandler relayoutSignal( application );
   actor.OnRelayoutSignal().Connect( &relayoutSignal, &RelayoutSignalHandler::RelayoutCallback );
index 3c87cd0..5fd706a 100644 (file)
@@ -56,7 +56,7 @@ void main()
 }
 );
 
-Actor CreateMeshActorToStage( TestApplication& application, Vector3 parentOrigin = ParentOrigin::CENTER, Vector3 anchorPoint = AnchorPoint::CENTER, Shader::Hint::Value shaderHints = Shader::Hint::NONE )
+Actor CreateMeshActorToScene( TestApplication& application, Vector3 parentOrigin = ParentOrigin::CENTER, Vector3 anchorPoint = AnchorPoint::CENTER, Shader::Hint::Value shaderHints = Shader::Hint::NONE )
 {
   Integration::PixelBuffer* pixelBuffer = new Integration::PixelBuffer[ 4 ];
   PixelData pixelData = PixelData::New(pixelBuffer, 4, 1, 1, Pixel::RGBA8888, PixelData::DELETE_ARRAY);
@@ -75,7 +75,7 @@ Actor CreateMeshActorToStage( TestApplication& application, Vector3 parentOrigin
   meshActor.SetProperty( Actor::Property::SIZE, Vector3( 400.0f, 400.0f, 0.1f ) );
   meshActor.SetProperty( Actor::Property::PARENT_ORIGIN, parentOrigin );
   meshActor.SetProperty( Actor::Property::ANCHOR_POINT, anchorPoint );
-  Stage::GetCurrent().Add( meshActor );
+  application.GetScene().Add( meshActor );
 
   application.SendNotification();
   application.Render( 16 );
@@ -85,7 +85,7 @@ Actor CreateMeshActorToStage( TestApplication& application, Vector3 parentOrigin
 
 bool GetCameraDepths( TestApplication& application, float& nearPlane, float& farPlane, float& cameraDepth )
 {
-  RenderTaskList renderTasks = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList renderTasks = application.GetScene().GetRenderTaskList();
   CameraActor cameraActor;
   for( unsigned int i = 0; i < renderTasks.GetTaskCount(); ++i )
   {
@@ -116,7 +116,7 @@ int UtcFrustumCullN(void)
   TraceCallStack& drawTrace = glAbstraction.GetDrawTrace();
   drawTrace.Enable( true );
 
-  CreateMeshActorToStage( application );
+  CreateMeshActorToScene( application );
 
   drawTrace.Reset();
   application.SendNotification();
@@ -135,11 +135,11 @@ int UtcFrustumLeftCullP(void)
   drawTrace.Enable( true );
 
   float offset = -0.01f;
-  Actor meshActor = CreateMeshActorToStage( application, Vector3( offset, 0.5f, 0.5f ), AnchorPoint::CENTER_RIGHT );
+  Actor meshActor = CreateMeshActorToScene( application, Vector3( offset, 0.5f, 0.5f ), AnchorPoint::CENTER_RIGHT );
 
   float radius = meshActor.GetTargetSize().Length() * 0.5f;
-  Vector2 stageSize = Stage::GetCurrent().GetSize();
-  meshActor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( -radius / stageSize.width + offset, 0.5f, 0.5f ) );
+  Vector2 sceneSize = application.GetScene().GetSize();
+  meshActor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( -radius / sceneSize.width + offset, 0.5f, 0.5f ) );
   meshActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
 
   drawTrace.Reset();
@@ -160,7 +160,7 @@ int UtcFrustumLeftCullN(void)
   drawTrace.Enable( true );
 
   float offset = 0.01f;
-  Actor meshActor = CreateMeshActorToStage( application, Vector3( offset, 0.5f, 0.5f ), AnchorPoint::CENTER_RIGHT );
+  Actor meshActor = CreateMeshActorToScene( application, Vector3( offset, 0.5f, 0.5f ), AnchorPoint::CENTER_RIGHT );
 
   drawTrace.Reset();
   application.SendNotification();
@@ -179,12 +179,12 @@ int UtcFrustumRightCullP(void)
   drawTrace.Enable( true );
 
   float offset = 1.01f;
-  Actor meshActor = CreateMeshActorToStage( application, Vector3( offset, 0.5f, 0.5f ), AnchorPoint::CENTER_LEFT );
+  Actor meshActor = CreateMeshActorToScene( application, Vector3( offset, 0.5f, 0.5f ), AnchorPoint::CENTER_LEFT );
 
   float radius = meshActor.GetTargetSize().Length() * 0.5f;
-  Vector2 stageSize = Stage::GetCurrent().GetSize();
+  Vector2 sceneSize = application.GetScene().GetSize();
 
-  meshActor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( radius / stageSize.width + offset, 0.5f, 0.5f ) );
+  meshActor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( radius / sceneSize.width + offset, 0.5f, 0.5f ) );
   meshActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
 
   drawTrace.Reset();
@@ -205,7 +205,7 @@ int UtcFrustumRightCullN(void)
   drawTrace.Enable( true );
 
   float offset = 0.99f;
-  Actor meshActor = CreateMeshActorToStage( application, Vector3( offset, 0.5f, 0.5f ), AnchorPoint::CENTER_LEFT );
+  Actor meshActor = CreateMeshActorToScene( application, Vector3( offset, 0.5f, 0.5f ), AnchorPoint::CENTER_LEFT );
 
   drawTrace.Reset();
   application.SendNotification();
@@ -224,12 +224,12 @@ int UtcFrustumTopCullP(void)
   drawTrace.Enable( true );
 
   float offset = -0.01f;
-  Actor meshActor = CreateMeshActorToStage( application, Vector3( 0.5f, offset, 0.5f ), AnchorPoint::BOTTOM_CENTER );
+  Actor meshActor = CreateMeshActorToScene( application, Vector3( 0.5f, offset, 0.5f ), AnchorPoint::BOTTOM_CENTER );
 
   float radius = meshActor.GetTargetSize().Length() * 0.5f;
-  Vector2 stageSize = Stage::GetCurrent().GetSize();
+  Vector2 sceneSize = application.GetScene().GetSize();
 
-  meshActor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.5f, -radius / stageSize.width + offset, 0.5f ) );
+  meshActor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.5f, -radius / sceneSize.width + offset, 0.5f ) );
   meshActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
 
   drawTrace.Reset();
@@ -250,7 +250,7 @@ int UtcFrustumTopCullN(void)
   drawTrace.Enable( true );
 
   float offset = 0.01f;
-  Actor meshActor = CreateMeshActorToStage( application, Vector3( 0.5f, offset, 0.5f ), AnchorPoint::BOTTOM_CENTER );
+  Actor meshActor = CreateMeshActorToScene( application, Vector3( 0.5f, offset, 0.5f ), AnchorPoint::BOTTOM_CENTER );
 
   drawTrace.Reset();
   application.SendNotification();
@@ -270,12 +270,12 @@ int UtcFrustumBottomCullP(void)
   drawTrace.Enable( true );
 
   float offset = 1.01f;
-  Actor meshActor = CreateMeshActorToStage( application, Vector3( 0.5f, offset, 0.5f ), AnchorPoint::TOP_CENTER );
+  Actor meshActor = CreateMeshActorToScene( application, Vector3( 0.5f, offset, 0.5f ), AnchorPoint::TOP_CENTER );
 
   float radius = meshActor.GetTargetSize().Length() * 0.5f;
-  Vector2 stageSize = Stage::GetCurrent().GetSize();
+  Vector2 sceneSize = application.GetScene().GetSize();
 
-  meshActor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.5f, radius / stageSize.width + offset, 0.5f ) );
+  meshActor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.5f, radius / sceneSize.width + offset, 0.5f ) );
   meshActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
 
   drawTrace.Reset();
@@ -296,7 +296,7 @@ int UtcFrustumBottomCullN(void)
   drawTrace.Enable( true );
 
   float offset = 0.99f;
-  Actor meshActor = CreateMeshActorToStage( application, Vector3( 0.5f, offset, 0.5f ), AnchorPoint::TOP_CENTER );
+  Actor meshActor = CreateMeshActorToScene( application, Vector3( 0.5f, offset, 0.5f ), AnchorPoint::TOP_CENTER );
 
   drawTrace.Reset();
   application.SendNotification();
@@ -317,7 +317,7 @@ int UtcFrustumNearCullP(void)
   float nearPlane, farPlane, cameraDepth;
   DALI_TEST_CHECK( GetCameraDepths( application, nearPlane, farPlane, cameraDepth ) );
 
-  Actor meshActor = CreateMeshActorToStage( application );
+  Actor meshActor = CreateMeshActorToScene( application );
   Vector3 meshPosition = meshActor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
 
   float radius = meshActor.GetTargetSize().Length() * 0.5f;
@@ -345,7 +345,7 @@ int UtcFrustumNearCullN(void)
   float nearPlane, farPlane, cameraDepth;
   DALI_TEST_CHECK( GetCameraDepths( application, nearPlane, farPlane, cameraDepth ) );
 
-  Actor meshActor = CreateMeshActorToStage( application );
+  Actor meshActor = CreateMeshActorToScene( application );
   Vector3 meshPosition = meshActor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
 
   float offset = meshActor.GetTargetSize().z - 0.1f;
@@ -371,7 +371,7 @@ int UtcFrustumFarCullP(void)
   float nearPlane, farPlane, cameraDepth;
   DALI_TEST_CHECK( GetCameraDepths( application, nearPlane, farPlane, cameraDepth ) );
 
-  Actor meshActor = CreateMeshActorToStage( application );
+  Actor meshActor = CreateMeshActorToScene( application );
   Vector3 meshPosition = meshActor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
 
   float radius = meshActor.GetTargetSize().Length() * 0.5f;
@@ -399,7 +399,7 @@ int UtcFrustumFarCullN(void)
   float nearPlane, farPlane, cameraDepth;
   DALI_TEST_CHECK( GetCameraDepths( application, nearPlane, farPlane, cameraDepth ) );
 
-  Actor meshActor = CreateMeshActorToStage( application );
+  Actor meshActor = CreateMeshActorToScene( application );
   Vector3 meshPosition = meshActor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
 
   float offset = meshActor.GetTargetSize().z - 0.1f;
@@ -422,7 +422,7 @@ int UtcFrustumCullDisabledP(void)
   TraceCallStack& drawTrace = glAbstraction.GetDrawTrace();
   drawTrace.Enable( true );
 
-  CreateMeshActorToStage( application, Vector3( 7.0f, 0.5f, 0.5f ), AnchorPoint::CENTER, Shader::Hint::MODIFIES_GEOMETRY );
+  CreateMeshActorToScene( application, Vector3( 7.0f, 0.5f, 0.5f ), AnchorPoint::CENTER, Shader::Hint::MODIFIES_GEOMETRY );
 
   drawTrace.Reset();
   application.SendNotification();
index 6c3f4a3..f9451d2 100644 (file)
@@ -369,7 +369,7 @@ int UtcDaliActorIsRoot(void)
   DALI_TEST_CHECK(!actor.GetProperty< bool >( Actor::Property::IS_ROOT ));
 
   // get the root layer
-  actor = Stage::GetCurrent().GetLayer( 0 );
+  actor = application.GetScene().GetLayer( 0 );
   DALI_TEST_CHECK( actor.GetProperty< bool >( Actor::Property::IS_ROOT ) );
   END_TEST;
 }
@@ -382,7 +382,7 @@ int UtcDaliActorOnStage(void)
   DALI_TEST_CHECK( !actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
 
   // get the root layer
-  actor = Stage::GetCurrent().GetLayer( 0 );
+  actor = application.GetScene().GetLayer( 0 );
   DALI_TEST_CHECK( actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
   END_TEST;
 }
@@ -395,7 +395,7 @@ int UtcDaliActorIsLayer(void)
   DALI_TEST_CHECK( !actor.GetProperty< bool >( Actor::Property::IS_LAYER ) );
 
   // get the root layer
-  actor = Stage::GetCurrent().GetLayer( 0 );
+  actor = application.GetScene().GetLayer( 0 );
   DALI_TEST_CHECK( actor.GetProperty< bool >( Actor::Property::IS_LAYER ) );
   END_TEST;
 }
@@ -405,13 +405,13 @@ int UtcDaliActorGetLayer(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   Layer layer = actor.GetLayer();
 
   DALI_TEST_CHECK(layer);
 
   // get the root layers layer
-  actor = Stage::GetCurrent().GetLayer( 0 );
+  actor = application.GetScene().GetLayer( 0 );
   DALI_TEST_CHECK( actor.GetLayer() );
   END_TEST;
 }
@@ -485,7 +485,7 @@ int UtcDaliActorAddN(void)
   // try reparenting root
   try
   {
-    parent2.Add( Stage::GetCurrent().GetLayer( 0 ) );
+    parent2.Add( application.GetScene().GetLayer( 0 ) );
     tet_printf("Assertion test failed - no Exception\n" );
     tet_result(TET_FAIL);
   }
@@ -580,7 +580,7 @@ int UtcDaliActorRemoveP(void)
   Actor child = Actor::New();
   Actor random = Actor::New();
 
-  Stage::GetCurrent().Add( parent );
+  application.GetScene().Add( parent );
 
   DALI_TEST_CHECK(parent.GetChildCount() == 0);
 
@@ -592,7 +592,7 @@ int UtcDaliActorRemoveP(void)
 
   DALI_TEST_CHECK(parent.GetChildCount() == 1);
 
-  Stage::GetCurrent().Remove( parent );
+  application.GetScene().Remove( parent );
 
   DALI_TEST_CHECK(parent.GetChildCount() == 1);
   END_TEST;
@@ -681,7 +681,7 @@ int UtcDaliActorCustomProperty(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   float startValue(1.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
@@ -704,7 +704,7 @@ int UtcDaliActorCustomPropertyIntToFloat(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   float startValue(5.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
@@ -727,7 +727,7 @@ int UtcDaliActorCustomPropertyFloatToInt(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   int startValue(5);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
@@ -762,7 +762,7 @@ int UtcDaliActorSetParentOrigin(void)
 
   DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ));
 
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   actor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.1f, 0.2f, 0.3f ) );
 
@@ -772,7 +772,7 @@ int UtcDaliActorSetParentOrigin(void)
 
   DALI_TEST_EQUALS( Vector3( 0.1f, 0.2f, 0.3f ), actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), TEST_LOCATION );
 
-  Stage::GetCurrent().Remove( actor );
+  application.GetScene().Remove( actor );
   END_TEST;
 }
 
@@ -848,7 +848,7 @@ int UtcDaliActorSetAnchorPoint(void)
 
   DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ));
 
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   actor.SetProperty( Actor::Property::ANCHOR_POINT, Vector3( 0.1f, 0.2f, 0.3f ) );
   // flush the queue and render once
@@ -857,7 +857,7 @@ int UtcDaliActorSetAnchorPoint(void)
 
   DALI_TEST_EQUALS( Vector3( 0.1f, 0.2f, 0.3f ), actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), TEST_LOCATION );
 
-  Stage::GetCurrent().Remove( actor );
+  application.GetScene().Remove( actor );
   END_TEST;
 }
 
@@ -1061,7 +1061,7 @@ int UtcDaliActorSetSize04(void)
   // Check the size in the new frame
   DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ));
 
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
   actor.SetProperty( Actor::Property::SIZE, Vector3( 0.1f, 0.2f, 0.3f ) );
 
   // Immediately check the size after setting
@@ -1078,7 +1078,7 @@ int UtcDaliActorSetSize04(void)
   currentSize = actor.GetProperty( Actor::Property::SIZE ).Get< Vector3 >();
   DALI_TEST_EQUALS( currentSize, Vector3( 0.1f, 0.2f, 0.3f ), Math::MACHINE_EPSILON_0, TEST_LOCATION );
 
-  Stage::GetCurrent().Remove( actor );
+  application.GetScene().Remove( actor );
   END_TEST;
 }
 
@@ -1172,7 +1172,7 @@ int UtcDaliActorSetSizeIndividual02(void)
 
   Actor actor = Actor::New();
   actor.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   Vector3 vector( 100.0f, 200.0f, 400.0f );
   DALI_TEST_CHECK( vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ) );
@@ -1290,7 +1290,7 @@ int UtcDaliActorCalculateScreenExtents(void)
   DALI_TEST_EQUALS( expectedExtent.width, actualExtent.width, Math::MACHINE_EPSILON_10000, TEST_LOCATION );
   DALI_TEST_EQUALS( expectedExtent.height, actualExtent.height, Math::MACHINE_EPSILON_10000, TEST_LOCATION );
 
-  Stage::GetCurrent().Remove( actor );
+  application.GetScene().Remove( actor );
   END_TEST;
 }
 
@@ -1314,7 +1314,7 @@ int UtcDaliActorSetPosition01(void)
   application.Render();
   DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ));
 
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
   actor.SetProperty( Actor::Property::POSITION, Vector3( 0.1f, 0.2f, 0.3f ) );
   // flush the queue and render once
   application.SendNotification();
@@ -1335,7 +1335,7 @@ int UtcDaliActorSetPosition01(void)
   application.Render();
   DALI_TEST_EQUALS( Vector3( 1.1f, 1.2f, 1.3f ), actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Math::MACHINE_EPSILON_10000, TEST_LOCATION );
 
-  Stage::GetCurrent().Remove( actor );
+  application.GetScene().Remove( actor );
   END_TEST;
 }
 
@@ -1553,7 +1553,7 @@ int UtcDaliActorGetCurrentWorldPosition(void)
   parent.SetProperty( Actor::Property::POSITION, parentPosition );
   parent.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
   parent.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
-  Stage::GetCurrent().Add( parent );
+  application.GetScene().Add( parent );
 
   Actor child = Actor::New();
   child.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
@@ -1588,7 +1588,7 @@ int UtcDaliActorSetInheritPosition(void)
   parent.SetProperty( Actor::Property::POSITION, parentPosition );
   parent.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
   parent.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
-  Stage::GetCurrent().Add( parent );
+  application.GetScene().Add( parent );
 
   Actor child = Actor::New();
   child.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
@@ -1644,7 +1644,7 @@ int UtcDaliActorInheritOpacity(void)
   Actor parent = Actor::New();
   Actor child = Actor::New();
   parent.Add( child );
-  Stage::GetCurrent().Add( parent );
+  application.GetScene().Add( parent );
 
   DALI_TEST_EQUALS( parent.GetProperty( Actor::Property::COLOR_ALPHA ).Get<float>(), 1.0f, 0.0001f, TEST_LOCATION );
   DALI_TEST_EQUALS( child.GetProperty( Actor::Property::COLOR_ALPHA ).Get<float>(), 1.0f, 0.0001f, TEST_LOCATION );
@@ -1705,7 +1705,7 @@ int UtcDaliActorSetOrientation02(void)
   application.Render();
   DALI_TEST_EQUALS(rotation, actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION);
 
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
   actor.RotateBy( Degree( 360 ), axis);
   DALI_TEST_EQUALS(rotation, actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION);
 
@@ -1722,7 +1722,7 @@ int UtcDaliActorSetOrientation02(void)
   application.Render();
   DALI_TEST_EQUALS(rotation, actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION);
 
-  Stage::GetCurrent().Remove( actor );
+  application.GetScene().Remove( actor );
   END_TEST;
 }
 
@@ -1761,7 +1761,7 @@ int UtcDaliActorRotateBy01(void)
   application.Render();
   DALI_TEST_EQUALS(Quaternion( angle, Vector3::ZAXIS), actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION);
 
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   actor.RotateBy( angle, Vector3::ZAXIS);
   // flush the queue and render once
@@ -1769,7 +1769,7 @@ int UtcDaliActorRotateBy01(void)
   application.Render();
   DALI_TEST_EQUALS(Quaternion(angle * 2.0f, Vector3::ZAXIS), actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION);
 
-  Stage::GetCurrent().Remove( actor );
+  application.GetScene().Remove( actor );
   END_TEST;
 }
 
@@ -1819,7 +1819,7 @@ int UtcDaliActorGetCurrentWorldOrientation(void)
   Radian rotationAngle( Degree(90.0f) );
   Quaternion rotation( rotationAngle, Vector3::YAXIS );
   parent.SetProperty( Actor::Property::ORIENTATION, rotation );
-  Stage::GetCurrent().Add( parent );
+  application.GetScene().Add( parent );
 
   Actor child = Actor::New();
   child.SetProperty( Actor::Property::ORIENTATION, rotation );
@@ -1894,14 +1894,14 @@ int UtcDaliActorSetScale02(void)
   DALI_TEST_CHECK(actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) == scale);
 
   // add to stage and test
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
   actor.SetProperty( Actor::Property::SCALE, Vector3( 2.0f, 2.0f, 2.0f ) );
   // flush the queue and render once
   application.SendNotification();
   application.Render();
   DALI_TEST_EQUALS( Vector3( 2.0f, 2.0f, 2.0f ), actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), 0.001, TEST_LOCATION);
 
-  Stage::GetCurrent().Remove( actor );
+  application.GetScene().Remove( actor );
 
   END_TEST;
 }
@@ -2027,7 +2027,7 @@ int UtcDaliActorGetCurrentWorldScale(void)
   Actor parent = Actor::New();
   Vector3 parentScale( 1.0f, 2.0f, 3.0f );
   parent.SetProperty( Actor::Property::SCALE, parentScale );
-  Stage::GetCurrent().Add( parent );
+  application.GetScene().Add( parent );
 
   Actor child = Actor::New();
   Vector3 childScale( 2.0f, 2.0f, 2.0f );
@@ -2062,7 +2062,7 @@ int UtcDaliActorInheritScale(void)
   Actor parent = Actor::New();
   Vector3 parentScale( 1.0f, 2.0f, 3.0f );
   parent.SetProperty( Actor::Property::SCALE, parentScale );
-  Stage::GetCurrent().Add( parent );
+  application.GetScene().Add( parent );
 
   Actor child = Actor::New();
   Vector3 childScale( 2.0f, 2.0f, 2.0f );
@@ -2103,7 +2103,7 @@ int UtcDaliActorSetVisible(void)
   DALI_TEST_CHECK(actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) == true);
 
   // put actor on stage
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
   actor.SetProperty( Actor::Property::VISIBLE,false);
   // flush the queue and render once
   application.SendNotification();
@@ -2144,7 +2144,7 @@ int UtcDaliActorSetOpacity(void)
   DALI_TEST_EQUALS(actor.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.5f, TEST_LOCATION );
 
   // put actor on stage
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   // change opacity, actor is on stage to change is not immediate
   actor.SetProperty( Actor::Property::OPACITY, 0.9f );
@@ -2221,7 +2221,7 @@ int UtcDaliActorSetColor(void)
   application.Render();
   DALI_TEST_EQUALS( Vector4( 0.6f, 0.5f, 0.4f, 0.1f ), actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ),  TEST_LOCATION );
 
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
   actor.SetProperty( Actor::Property::COLOR, color );
   // flush the queue and render once
   application.SendNotification();
@@ -2244,7 +2244,7 @@ int UtcDaliActorSetColor(void)
   actor.SetProperty( Actor::Property::COLOR, newColor );
   DALI_TEST_EQUALS( Vector4( newColor.r, newColor.g, newColor.b, 1.0f ), actor.GetProperty< Vector4 >( Actor::Property::COLOR ), TEST_LOCATION );
 
-  Stage::GetCurrent().Remove( actor );
+  application.GetScene().Remove( actor );
   END_TEST;
 }
 
@@ -2340,7 +2340,7 @@ int UtcDaliActorGetCurrentWorldColor(void)
   Actor parent = Actor::New();
   Vector4 parentColor( 1.0f, 0.5f, 0.0f, 0.8f );
   parent.SetProperty( Actor::Property::COLOR, parentColor );
-  Stage::GetCurrent().Add( parent );
+  application.GetScene().Add( parent );
 
   Actor child = Actor::New();
   Vector4 childColor( 0.5f, 0.6f, 0.5f, 1.0f );
@@ -2420,7 +2420,7 @@ int UtcDaliActorScreenToLocal(void)
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::POSITION, Vector2(10.0f, 10.0f));
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // flush the queue and render once
   application.SendNotification();
@@ -2502,7 +2502,7 @@ int UtcDaliActorRemoveConstraints(void)
 
   DALI_TEST_CHECK( gTestConstraintCalled == false );
 
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
   constraint.Apply();
 
   // flush the queue and render once
@@ -2536,7 +2536,7 @@ int UtcDaliActorRemoveConstraintTag(void)
   constraint2.SetTag( constraint2Tag );
   constraint2.Apply();
 
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
   // flush the queue and render once
   application.SendNotification();
   application.Render();
@@ -2605,7 +2605,7 @@ int UtcDaliActorTouchedSignal(void)
   ResetTouchCallbacks();
 
   // get the root layer
-  Actor actor = Stage::GetCurrent().GetRootLayer();
+  Actor actor = application.GetScene().GetRootLayer();
   DALI_TEST_CHECK( gTouchCallBackCalled == false );
 
   application.SendNotification();
@@ -2615,7 +2615,7 @@ int UtcDaliActorTouchedSignal(void)
   actor.TouchedSignal().Connect( TestCallback );
 
   // simulate a touch event in the middle of the screen
-  Vector2 touchPoint( Stage::GetCurrent().GetSize() * 0.5 );
+  Vector2 touchPoint( application.GetScene().GetSize() * 0.5 );
   Dali::Integration::Point point;
   point.SetDeviceId( 1 );
   point.SetState( PointState::DOWN );
@@ -2635,7 +2635,7 @@ int UtcDaliActorHoveredSignal(void)
   gHoverCallBackCalled = false;
 
   // get the root layer
-  Actor actor = Stage::GetCurrent().GetRootLayer();
+  Actor actor = application.GetScene().GetRootLayer();
   DALI_TEST_CHECK( gHoverCallBackCalled == false );
 
   application.SendNotification();
@@ -2645,7 +2645,7 @@ int UtcDaliActorHoveredSignal(void)
   actor.HoveredSignal().Connect( TestCallback3 );
 
   // simulate a hover event in the middle of the screen
-  Vector2 touchPoint( Stage::GetCurrent().GetSize() * 0.5 );
+  Vector2 touchPoint( application.GetScene().GetSize() * 0.5 );
   Dali::Integration::Point point;
   point.SetDeviceId( 1 );
   point.SetState( PointState::MOTION );
@@ -2677,7 +2677,7 @@ int UtcDaliActorOnOffStageSignal(void)
   DALI_TEST_CHECK( gOffStageCallBackCalled == 0 );
 
   // add parent to stage
-  Stage::GetCurrent().Add( parent );
+  application.GetScene().Add( parent );
   // onstage emitted, offstage not
   DALI_TEST_EQUALS(  gOnStageCallBackCalled, 1, TEST_LOCATION );
   DALI_TEST_EQUALS( gOffStageCallBackCalled, 0, TEST_LOCATION );
@@ -2703,7 +2703,7 @@ int UtcDaliActorOnOffStageSignal(void)
   gOnStageCallBackCalled = gOffStageCallBackCalled = 0;
   gActorNamesOnOffStage.clear();
 
-  Stage::GetCurrent().Remove( parent );
+  application.GetScene().Remove( parent );
   // onstage not emitted, offstage is
   DALI_TEST_EQUALS(  gOnStageCallBackCalled, 0, TEST_LOCATION );
   DALI_TEST_EQUALS( gOffStageCallBackCalled, 2, TEST_LOCATION );
@@ -2715,7 +2715,7 @@ int UtcDaliActorOnOffStageSignal(void)
   gOnStageCallBackCalled = gOffStageCallBackCalled = 0;
   gActorNamesOnOffStage.clear();
 
-  Stage::GetCurrent().Add( parent );
+  application.GetScene().Add( parent );
   // onstage emitted, offstage not
   DALI_TEST_EQUALS(  gOnStageCallBackCalled, 2, TEST_LOCATION );
   DALI_TEST_EQUALS( gOffStageCallBackCalled, 0, TEST_LOCATION );
@@ -2738,7 +2738,7 @@ int UtcDaliActorOnOffStageSignal(void)
   gOnStageCallBackCalled = gOffStageCallBackCalled = 0;
   gActorNamesOnOffStage.clear();
 
-  Stage::GetCurrent().Remove( parent );
+  application.GetScene().Remove( parent );
   // onstage not emitted, offstage is
   DALI_TEST_EQUALS(  gOnStageCallBackCalled, 0, TEST_LOCATION );
   DALI_TEST_EQUALS( gOffStageCallBackCalled, 1, TEST_LOCATION );
@@ -2836,7 +2836,7 @@ int UtcDaliActorHitTest(void)
   actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
   actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
 
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   ResetTouchCallbacks();
 
@@ -2882,28 +2882,28 @@ int UtcDaliActorHitTest(void)
 
 int UtcDaliActorSetDrawMode(void)
 {
-  TestApplication app;
+  TestApplication application;
   tet_infoline(" UtcDaliActorSetDrawModeOverlay");
 
   Actor a = Actor::New();
 
-  Stage::GetCurrent().Add(a);
-  app.SendNotification();
-  app.Render(0);
-  app.SendNotification();
-  app.Render(1);
+  application.GetScene().Add(a);
+  application.SendNotification();
+  application.Render(0);
+  application.SendNotification();
+  application.Render(1);
 
   DALI_TEST_CHECK( DrawMode::NORMAL == a.GetProperty< DrawMode::Type >( Actor::Property::DRAW_MODE ) ); // Ensure overlay is off by default
 
   a.SetProperty( Actor::Property::DRAW_MODE, DrawMode::OVERLAY_2D );
-  app.SendNotification();
-  app.Render(1);
+  application.SendNotification();
+  application.Render(1);
 
   DALI_TEST_CHECK( DrawMode::OVERLAY_2D == a.GetProperty< DrawMode::Type >( Actor::Property::DRAW_MODE ) ); // Check Actor is overlay
 
   a.SetProperty( Actor::Property::DRAW_MODE, DrawMode::NORMAL );
-  app.SendNotification();
-  app.Render(1);
+  application.SendNotification();
+  application.Render(1);
 
   DALI_TEST_CHECK( DrawMode::NORMAL == a.GetProperty< DrawMode::Type >( Actor::Property::DRAW_MODE ) ); // Check Actor is normal
   END_TEST;
@@ -2911,17 +2911,17 @@ int UtcDaliActorSetDrawMode(void)
 
 int UtcDaliActorSetDrawModeOverlayRender(void)
 {
-  TestApplication app;
+  TestApplication application;
   tet_infoline(" UtcDaliActorSetDrawModeOverlayRender");
 
-  app.SendNotification();
-  app.Render(1);
+  application.SendNotification();
+  application.Render(1);
 
   std::vector<GLuint> ids;
   ids.push_back( 8 );   // first rendered actor
   ids.push_back( 9 );   // second rendered actor
   ids.push_back( 10 );  // third rendered actor
-  app.GetGlAbstraction().SetNextTextureIds( ids );
+  application.GetGlAbstraction().SetNextTextureIds( ids );
 
   Texture imageA = Texture::New(TextureType::TEXTURE_2D, Pixel::Format::RGBA8888, 16, 16);
   Texture imageB = Texture::New(TextureType::TEXTURE_2D, Pixel::Format::RGBA8888, 16, 16);
@@ -2930,25 +2930,25 @@ int UtcDaliActorSetDrawModeOverlayRender(void)
   Actor b = CreateRenderableActor( imageB );
   Actor c = CreateRenderableActor( imageC );
 
-  app.SendNotification();
-  app.Render(1);
+  application.SendNotification();
+  application.Render(1);
 
   //Textures are bound when first created. Clear bound textures vector
-  app.GetGlAbstraction().ClearBoundTextures();
+  application.GetGlAbstraction().ClearBoundTextures();
 
   // Render a,b,c as regular non-overlays. so order will be:
   // a (8)
   // b (9)
   // c (10)
-  Stage::GetCurrent().Add(a);
-  Stage::GetCurrent().Add(b);
-  Stage::GetCurrent().Add(c);
+  application.GetScene().Add(a);
+  application.GetScene().Add(b);
+  application.GetScene().Add(c);
 
-  app.SendNotification();
-  app.Render(1);
+  application.SendNotification();
+  application.Render(1);
 
   // Should be 3 textures changes.
-  const std::vector<GLuint>& boundTextures = app.GetGlAbstraction().GetBoundTextures( GL_TEXTURE0 );
+  const std::vector<GLuint>& boundTextures = application.GetGlAbstraction().GetBoundTextures( GL_TEXTURE0 );
   typedef std::vector<GLuint>::size_type TextureSize;
   DALI_TEST_EQUALS( boundTextures.size(), static_cast<TextureSize>( 3 ), TEST_LOCATION );
   if( boundTextures.size() == 3 )
@@ -2964,10 +2964,10 @@ int UtcDaliActorSetDrawModeOverlayRender(void)
   // c (10)
   // a (8)
   a.SetProperty( Actor::Property::DRAW_MODE, DrawMode::OVERLAY_2D );
-  app.GetGlAbstraction().ClearBoundTextures();
+  application.GetGlAbstraction().ClearBoundTextures();
 
-  app.SendNotification();
-  app.Render(1);
+  application.SendNotification();
+  application.Render(1);
 
   // Should be 3 texture changes.
   DALI_TEST_EQUALS( boundTextures.size(), static_cast<TextureSize>(3), TEST_LOCATION );
@@ -2982,7 +2982,7 @@ int UtcDaliActorSetDrawModeOverlayRender(void)
 
 int UtcDaliActorGetCurrentWorldMatrix(void)
 {
-  TestApplication app;
+  TestApplication application;
   tet_infoline(" UtcDaliActorGetCurrentWorldMatrix");
 
   Actor parent = Actor::New();
@@ -2995,7 +2995,7 @@ int UtcDaliActorGetCurrentWorldMatrix(void)
   parent.SetProperty( Actor::Property::POSITION, parentPosition );
   parent.SetProperty( Actor::Property::ORIENTATION, parentRotation );
   parent.SetProperty( Actor::Property::SCALE, parentScale );
-  Stage::GetCurrent().Add( parent );
+  application.GetScene().Add( parent );
 
   Actor child = Actor::New();
   child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
@@ -3008,10 +3008,10 @@ int UtcDaliActorGetCurrentWorldMatrix(void)
   child.SetProperty( Actor::Property::SCALE, childScale );
   parent.Add( child );
 
-  app.SendNotification();
-  app.Render(0);
-  app.Render();
-  app.SendNotification();
+  application.SendNotification();
+  application.Render(0);
+  application.Render();
+  application.SendNotification();
 
   Matrix parentMatrix(false);
   parentMatrix.SetTransformComponents(parentScale, parentRotation, parentPosition);
@@ -3032,7 +3032,7 @@ int UtcDaliActorGetCurrentWorldMatrix(void)
 
 int UtcDaliActorConstrainedToWorldMatrix(void)
 {
-  TestApplication app;
+  TestApplication application;
   tet_infoline(" UtcDaliActorConstrainedToWorldMatrix");
 
   Actor parent = Actor::New();
@@ -3045,7 +3045,7 @@ int UtcDaliActorConstrainedToWorldMatrix(void)
   parent.SetProperty( Actor::Property::POSITION, parentPosition );
   parent.SetProperty( Actor::Property::ORIENTATION, parentRotation );
   parent.SetProperty( Actor::Property::SCALE, parentScale );
-  Stage::GetCurrent().Add( parent );
+  application.GetScene().Add( parent );
 
   Actor child = Actor::New();
   child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
@@ -3053,12 +3053,12 @@ int UtcDaliActorConstrainedToWorldMatrix(void)
   posConstraint.AddSource( Source( parent, Actor::Property::WORLD_MATRIX ) );
   posConstraint.Apply();
 
-  Stage::GetCurrent().Add( child );
+  application.GetScene().Add( child );
 
-  app.SendNotification();
-  app.Render(0);
-  app.Render();
-  app.SendNotification();
+  application.SendNotification();
+  application.Render(0);
+  application.Render();
+  application.SendNotification();
 
   Matrix parentMatrix(false);
   parentMatrix.SetTransformComponents(parentScale, parentRotation, parentPosition);
@@ -3070,7 +3070,7 @@ int UtcDaliActorConstrainedToWorldMatrix(void)
 
 int UtcDaliActorConstrainedToOrientation(void)
 {
-  TestApplication app;
+  TestApplication application;
   tet_infoline(" UtcDaliActorConstrainedToOrientation");
 
   Actor parent = Actor::New();
@@ -3083,7 +3083,7 @@ int UtcDaliActorConstrainedToOrientation(void)
   parent.SetProperty( Actor::Property::POSITION, parentPosition );
   parent.SetProperty( Actor::Property::ORIENTATION, parentRotation );
   parent.SetProperty( Actor::Property::SCALE, parentScale );
-  Stage::GetCurrent().Add( parent );
+  application.GetScene().Add( parent );
 
   Actor child = Actor::New();
   child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
@@ -3091,12 +3091,12 @@ int UtcDaliActorConstrainedToOrientation(void)
   posConstraint.AddSource( Source( parent, Actor::Property::ORIENTATION ) );
   posConstraint.Apply();
 
-  Stage::GetCurrent().Add( child );
+  application.GetScene().Add( child );
 
-  app.SendNotification();
-  app.Render(0);
-  app.Render();
-  app.SendNotification();
+  application.SendNotification();
+  application.Render(0);
+  application.Render();
+  application.SendNotification();
 
   DALI_TEST_EQUALS( child.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), parent.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION );
   END_TEST;
@@ -3104,33 +3104,33 @@ int UtcDaliActorConstrainedToOrientation(void)
 
 int UtcDaliActorConstrainedToOpacity(void)
 {
-  TestApplication app;
+  TestApplication application;
   tet_infoline(" UtcDaliActorConstrainedToOpacity");
 
   Actor parent = Actor::New();
   parent.SetProperty( Actor::Property::OPACITY, 0.7f );
-  Stage::GetCurrent().Add( parent );
+  application.GetScene().Add( parent );
 
   Actor child = Actor::New();
   Constraint opacityConstraint = Constraint::New<float>( child, Actor::Property::OPACITY, EqualToConstraint() );
   opacityConstraint.AddSource( Source( parent, Actor::Property::OPACITY ) );
   opacityConstraint.Apply();
 
-  Stage::GetCurrent().Add( child );
+  application.GetScene().Add( child );
 
-  app.SendNotification();
-  app.Render(0);
-  app.Render();
-  app.SendNotification();
+  application.SendNotification();
+  application.Render(0);
+  application.Render();
+  application.SendNotification();
 
   DALI_TEST_EQUALS( child.GetCurrentProperty< float >( Actor::Property::OPACITY ), parent.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.001f, TEST_LOCATION );
 
   parent.SetProperty( Actor::Property::OPACITY, 0.3f );
 
-  app.SendNotification();
-  app.Render(0);
-  app.Render();
-  app.SendNotification();
+  application.SendNotification();
+  application.Render(0);
+  application.Render();
+  application.SendNotification();
 
   DALI_TEST_EQUALS( child.GetCurrentProperty< float >( Actor::Property::OPACITY ), parent.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.001f, TEST_LOCATION );
 
@@ -3139,11 +3139,11 @@ int UtcDaliActorConstrainedToOpacity(void)
 
 int UtcDaliActorUnparent(void)
 {
-  TestApplication app;
+  TestApplication application;
   tet_infoline(" UtcDaliActorUnparent");
 
   Actor parent = Actor::New();
-  Stage::GetCurrent().Add( parent );
+  application.GetScene().Add( parent );
 
   Actor child = Actor::New();
 
@@ -3187,11 +3187,11 @@ int UtcDaliActorUnparent(void)
 
 int UtcDaliActorGetChildAt(void)
 {
-  TestApplication app;
+  TestApplication application;
   tet_infoline(" UtcDaliActorGetChildAt");
 
   Actor parent = Actor::New();
-  Stage::GetCurrent().Add( parent );
+  application.GetScene().Add( parent );
 
   Actor child0 = Actor::New();
   parent.Add( child0 );
@@ -3210,7 +3210,7 @@ int UtcDaliActorGetChildAt(void)
 
 int UtcDaliActorSetGetOverlay(void)
 {
-  TestApplication app;
+  TestApplication application;
   tet_infoline(" UtcDaliActorSetGetOverlay");
 
   Actor parent = Actor::New();
@@ -3299,7 +3299,7 @@ const unsigned int PROPERTY_TABLE_COUNT = sizeof( PROPERTY_TABLE ) / sizeof( PRO
 
 int UtcDaliActorProperties(void)
 {
-  TestApplication app;
+  TestApplication application;
 
   Actor actor = Actor::New();
 
@@ -3315,7 +3315,7 @@ int UtcDaliActorProperties(void)
 
 int UtcDaliRelayoutProperties_ResizePolicies(void)
 {
-  TestApplication app;
+  TestApplication application;
 
   Actor actor = Actor::New();
 
@@ -3355,7 +3355,7 @@ int UtcDaliRelayoutProperties_ResizePolicies(void)
 
 int UtcDaliRelayoutProperties_SizeScalePolicy(void)
 {
-  TestApplication app;
+  TestApplication application;
 
   Actor actor = Actor::New();
 
@@ -3381,7 +3381,7 @@ int UtcDaliRelayoutProperties_SizeScalePolicy(void)
 
 int UtcDaliRelayoutProperties_SizeModeFactor(void)
 {
-  TestApplication app;
+  TestApplication application;
 
   Actor actor = Actor::New();
 
@@ -3404,7 +3404,7 @@ int UtcDaliRelayoutProperties_SizeModeFactor(void)
 
 int UtcDaliRelayoutProperties_DimensionDependency(void)
 {
-  TestApplication app;
+  TestApplication application;
 
   Actor actor = Actor::New();
 
@@ -3428,7 +3428,7 @@ int UtcDaliRelayoutProperties_DimensionDependency(void)
 
 int UtcDaliRelayoutProperties_Padding(void)
 {
-  TestApplication app;
+  TestApplication application;
 
   Actor actor = Actor::New();
 
@@ -3446,7 +3446,7 @@ int UtcDaliRelayoutProperties_Padding(void)
 
 int UtcDaliRelayoutProperties_MinimumMaximumSize(void)
 {
-  TestApplication app;
+  TestApplication application;
 
   Actor actor = Actor::New();
 
@@ -3470,7 +3470,7 @@ int UtcDaliRelayoutProperties_MinimumMaximumSize(void)
 
 int UtcDaliActorGetHeightForWidth(void)
 {
-  TestApplication app;
+  TestApplication application;
 
   Actor actor = Actor::New();
 
@@ -3481,7 +3481,7 @@ int UtcDaliActorGetHeightForWidth(void)
 
 int UtcDaliActorGetWidthForHeight(void)
 {
-  TestApplication app;
+  TestApplication application;
 
   Actor actor = Actor::New();
 
@@ -3492,12 +3492,12 @@ int UtcDaliActorGetWidthForHeight(void)
 
 int UtcDaliActorGetRelayoutSize(void)
 {
-  TestApplication app;
+  TestApplication application;
 
   Actor actor = Actor::New();
 
   // Add actor to stage
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   DALI_TEST_EQUALS( actor.GetRelayoutSize( Dimension::WIDTH ), 0.0f, TEST_LOCATION );
 
@@ -3505,8 +3505,8 @@ int UtcDaliActorGetRelayoutSize(void)
   actor.SetProperty( Actor::Property::SIZE, Vector2( 1.0f, 0.0f ) );
 
   // Flush the queue and render once
-  app.SendNotification();
-  app.Render();
+  application.SendNotification();
+  application.Render();
 
   DALI_TEST_EQUALS( actor.GetRelayoutSize( Dimension::WIDTH ), 1.0f, TEST_LOCATION );
 
@@ -3515,7 +3515,7 @@ int UtcDaliActorGetRelayoutSize(void)
 
 int UtcDaliActorSetPadding(void)
 {
-  TestApplication app;
+  TestApplication application;
 
   Actor actor = Actor::New();
 
@@ -3542,7 +3542,7 @@ int UtcDaliActorSetPadding(void)
 
 int UtcDaliActorSetMinimumSize(void)
 {
-  TestApplication app;
+  TestApplication application;
 
   Actor actor = Actor::New();
 
@@ -3564,7 +3564,7 @@ int UtcDaliActorSetMinimumSize(void)
 
 int UtcDaliActorSetMaximumSize(void)
 {
-  TestApplication app;
+  TestApplication application;
 
   Actor actor = Actor::New();
 
@@ -3602,7 +3602,7 @@ int UtcDaliActorOnRelayoutSignal(void)
   DALI_TEST_CHECK( ! gOnRelayoutCallBackCalled );
 
   // Add actor to stage
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   actor.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
   actor.SetProperty( Actor::Property::SIZE, Vector2( 1.0f, 2.0 ) );
@@ -3636,7 +3636,7 @@ int UtcDaliActorGetHierachyDepth(void)
    *
    * GetHierarchyDepth should return 1 for A, 2 for B and C, and 3 for D, E and F.
    */
-  Stage stage( Stage::GetCurrent() );
+  Integration::Scene stage( application.GetScene() );
 
   Actor actorA = Actor::New();
   Actor actorB = Actor::New();
@@ -3946,7 +3946,7 @@ int UtcDaliActorAddRendererOnStage(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   application.SendNotification();
   application.Render(0);
@@ -4207,7 +4207,7 @@ int UtcDaliActorPropertyClippingActor(void)
   // Create a clipping actor.
   Actor actorDepth1Clip = CreateActorWithContent16x16();
   actorDepth1Clip.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN );
-  Stage::GetCurrent().Add( actorDepth1Clip );
+  application.GetScene().Add( actorDepth1Clip );
 
   // Gather the call trace.
   GenerateTrace( application, enabledDisableTrace, stencilTrace );
@@ -4243,7 +4243,7 @@ int UtcDaliActorPropertyClippingActorEnableThenDisable(void)
   // Create a clipping actor.
   Actor actorDepth1Clip = CreateActorWithContent16x16();
   actorDepth1Clip.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN );
-  Stage::GetCurrent().Add( actorDepth1Clip );
+  application.GetScene().Add( actorDepth1Clip );
 
   // Gather the call trace.
   GenerateTrace( application, enabledDisableTrace, stencilTrace );
@@ -4291,7 +4291,7 @@ int UtcDaliActorPropertyClippingNestedChildren(void)
   // Create a clipping actor.
   Actor actorDepth1Clip = CreateActorWithContent16x16();
   actorDepth1Clip.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN );
-  Stage::GetCurrent().Add( actorDepth1Clip );
+  application.GetScene().Add( actorDepth1Clip );
 
   // Create a child actor.
   Actor childDepth2 = CreateActorWithContent16x16();
@@ -4348,7 +4348,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().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
+      application.GetScene().GetRootLayer().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
       GenerateTrace( application, enabledDisableTrace, stencilTrace );
     }
   }
@@ -4401,7 +4401,7 @@ int UtcDaliActorPropertyClippingActorDrawOrder(void)
   actors[1].SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN );
 
   // Build the scene graph.
-  Stage::GetCurrent().Add( actors[0] );
+  application.GetScene().Add( actors[0] );
 
   // Left branch:
   actors[0].Add( actors[1] );
@@ -4468,7 +4468,7 @@ int UtcDaliActorPropertyScissorClippingActor(void)
   clippingActorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_LEFT );
   clippingActorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_LEFT );
   clippingActorA.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_TO_BOUNDING_BOX );
-  Stage::GetCurrent().Add( clippingActorA );
+  application.GetScene().Add( clippingActorA );
 
   // Gather the call trace.
   GenerateTrace( application, enabledDisableTrace, scissorTrace );
@@ -4529,8 +4529,8 @@ int UtcDaliActorPropertyScissorClippingActorSiblings(void)
   clippingActorA.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, -200.0f, 0.0f ));
   clippingActorB.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ));
 
-  Stage::GetCurrent().Add( clippingActorA );
-  Stage::GetCurrent().Add( clippingActorB );
+  application.GetScene().Add( clippingActorA );
+  application.GetScene().Add( clippingActorB );
 
   // Gather the call trace.
   GenerateTrace( application, enabledDisableTrace, scissorTrace );
@@ -4590,7 +4590,7 @@ int UtcDaliActorPropertyScissorClippingActorNested01(void)
   clippingActorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
   clippingActorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
   clippingActorA.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_TO_BOUNDING_BOX );
-  Stage::GetCurrent().Add( clippingActorA );
+  application.GetScene().Add( clippingActorA );
 
   // Create a child clipping actor.
   Actor clippingActorB = CreateActorWithContent16x16();
@@ -4689,10 +4689,10 @@ int UtcDaliActorPropertyScissorClippingActorNested02(void)
   clippingActorD.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ));
   clippingActorE.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ));
 
-  Stage::GetCurrent().Add( clippingActorA );
+  application.GetScene().Add( clippingActorA );
   clippingActorA.Add( clippingActorB );
-  Stage::GetCurrent().Add( clippingActorC );
-  Stage::GetCurrent().Add( clippingActorD );
+  application.GetScene().Add( clippingActorC );
+  application.GetScene().Add( clippingActorD );
   clippingActorD.Add( clippingActorE );
 
   // Gather the call trace.
@@ -4732,7 +4732,7 @@ int UtcDaliActorPropertyClippingActorWithRendererOverride(void)
   // Create a clipping actor.
   Actor actorDepth1Clip = CreateActorWithContent16x16();
   actorDepth1Clip.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN );
-  Stage::GetCurrent().Add( actorDepth1Clip );
+  application.GetScene().Add( actorDepth1Clip );
 
   // Turn the RenderMode to just "COLOR" at the Renderer level to ignore the clippingMode.
   actorDepth1Clip.GetRendererAt( 0 ).SetProperty( Renderer::Property::RENDER_MODE, RenderMode::COLOR );
@@ -4770,7 +4770,7 @@ int UtcDaliActorPropertyClippingActorWithRendererOverride(void)
 int UtcDaliGetPropertyN(void)
 {
   tet_infoline( "Testing Actor::GetProperty returns a non valid value if property index is out of range" );
-  TestApplication app;
+  TestApplication application;
 
   Actor actor = Actor::New();
 
@@ -4787,7 +4787,7 @@ int UtcDaliActorRaiseLower(void)
 
   Debug::Filter::SetGlobalLogLevel( Debug::Verbose );
 
-  Stage stage( Stage::GetCurrent() );
+  Integration::Scene stage( application.GetScene() );
 
   Actor actorA = Actor::New();
   Actor actorB = Actor::New();
@@ -4918,7 +4918,7 @@ int UtcDaliActorRaiseToTopLowerToBottom(void)
 
   TestApplication application;
 
-  Stage stage( Stage::GetCurrent() );
+  Integration::Scene stage( application.GetScene() );
 
   Actor actorA = Actor::New();
   Actor actorB = Actor::New();
@@ -5153,7 +5153,7 @@ int UtcDaliActorRaiseAbove(void)
 
   TestApplication application;
 
-  Stage stage( Stage::GetCurrent() );
+  Integration::Scene stage( application.GetScene() );
 
   Actor actorA = Actor::New();
   Actor actorB = Actor::New();
@@ -5262,7 +5262,7 @@ int UtcDaliActorLowerBelow(void)
 
   TestApplication application;
 
-  Stage stage( Stage::GetCurrent() );
+  Integration::Scene stage( application.GetScene() );
 
   // Set up renderers to add to Actors, float value 1, 2, 3 assigned to each
   // enables checking of which actor the uniform is assigned too
@@ -5488,7 +5488,7 @@ int UtcDaliActorRaiseAboveDifferentParentsN(void)
 
   TestApplication application;
 
-  Stage stage( Stage::GetCurrent() );
+  Integration::Scene stage( application.GetScene() );
 
   Actor parentA = Actor::New();
   Actor parentB = Actor::New();
@@ -5596,7 +5596,7 @@ int UtcDaliActorRaiseLowerWhenUnparentedTargetN(void)
 
   TestApplication application;
 
-  Stage stage( Stage::GetCurrent() );
+  Integration::Scene stage( application.GetScene() );
 
   Actor actorA = Actor::New();
   Actor actorB = Actor::New();
@@ -5764,7 +5764,7 @@ int UtcDaliActorTestAllAPIwhenActorNotParented(void)
 
   TestApplication application;
 
-  Stage stage( Stage::GetCurrent() );
+  Integration::Scene stage( application.GetScene() );
 
   Actor actorA = Actor::New();
   Actor actorB = Actor::New();
@@ -5925,7 +5925,7 @@ int UtcDaliActorRaiseAboveActorAndTargetTheSameN(void)
 
   TestApplication application;
 
-  Stage stage( Stage::GetCurrent() );
+  Integration::Scene stage( application.GetScene() );
 
   Actor actorA = Actor::New();
   Actor actorB = Actor::New();
@@ -6031,7 +6031,7 @@ int UtcDaliActorGetScreenPosition(void)
 
   TestApplication application;
 
-  Stage stage( Stage::GetCurrent() );
+  Integration::Scene stage( application.GetScene() );
 
   Actor actorA = Actor::New();
   actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
@@ -6151,7 +6151,7 @@ int UtcDaliActorGetScreenPositionAfterScaling(void)
 
   TestApplication application;
 
-  Stage stage( Stage::GetCurrent() );
+  Integration::Scene stage( application.GetScene() );
 
   Actor actorA = Actor::New();
   actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
@@ -6202,7 +6202,7 @@ int UtcDaliActorGetScreenPositionWithDifferentParentOrigin(void)
 
   TestApplication application;
 
-  Stage stage( Stage::GetCurrent() );
+  Integration::Scene stage( application.GetScene() );
 
   Actor actorA = Actor::New();
   actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
@@ -6254,7 +6254,7 @@ int UtcDaliActorGetScreenPositionWithChildActors(void)
 
   TestApplication application;
 
-  Stage stage( Stage::GetCurrent() );
+  Integration::Scene stage( application.GetScene() );
 
   tet_infoline( "Create Child Actor 1 TOP_LEFT Anchor Point, ParentOrigin::CENTER and 0,0 position \n" );
 
@@ -6319,7 +6319,7 @@ int UtcDaliActorGetScreenPositionWithChildActors02(void)
 
   TestApplication application;
 
-  Stage stage( Stage::GetCurrent() );
+  Integration::Scene stage( application.GetScene() );
 
   tet_infoline( "Create Child Actor 1 TOP_LEFT Anchor Point, ParentOrigin::CENTER and 0,0 position \n" );
 
@@ -6378,7 +6378,7 @@ int UtcDaliActorGetScreenPositionPositionUsesAnchorPointFalse(void)
 
   TestApplication application;
 
-  Stage stage( Stage::GetCurrent() );
+  Integration::Scene stage( application.GetScene() );
 
   tet_infoline( "Create an actor with AnchorPoint::TOP_LEFT, ParentOrigin::CENTER and 0,0 position, POSITION_USES_ANCHOR false" );
 
@@ -6445,7 +6445,7 @@ int utcDaliActorPositionUsesAnchorPoint(void)
   actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
   actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   application.SendNotification();
   application.Render();
@@ -6476,7 +6476,7 @@ int utcDaliActorPositionUsesAnchorPointCheckScale(void)
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::SCALE, 2.0f );
   actor.SetProperty( Actor::Property::POSITION_USES_ANCHOR_POINT, false );
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   application.SendNotification();
   application.Render();
@@ -6510,7 +6510,7 @@ int utcDaliActorPositionUsesAnchorPointCheckRotation(void)
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ORIENTATION, Quaternion( Degree( 90.0f), Vector3::ZAXIS ) );
   actor.SetProperty( Actor::Property::POSITION_USES_ANCHOR_POINT, false );
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   application.SendNotification();
   application.Render();
@@ -6545,7 +6545,7 @@ int utcDaliActorPositionUsesAnchorPointCheckScaleAndRotation(void)
   actor.SetProperty( Actor::Property::ORIENTATION, Quaternion( Degree( 90.0f), Vector3::ZAXIS ) );
   actor.SetProperty( Actor::Property::SCALE, 2.0f );
   actor.SetProperty( Actor::Property::POSITION_USES_ANCHOR_POINT, false );
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   application.SendNotification();
   application.Render();
@@ -6575,8 +6575,8 @@ int utcDaliActorPositionUsesAnchorPointOnlyInheritPosition(void)
 
   Actor parent = Actor::New();
 
-  Stage::GetCurrent().Add( parent );
-  Vector2 stageSize( Stage::GetCurrent().GetSize() );
+  application.GetScene().Add( parent );
+  Vector2 stageSize( application.GetScene().GetSize() );
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
@@ -6701,7 +6701,7 @@ int utcDaliActorVisibilityChangeSignalAfterAnimation(void)
   tet_infoline( "Check that the visibility change signal is emitted when the visibility changes when an animation starts" );
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   application.SendNotification();
   application.Render();
@@ -6778,7 +6778,7 @@ int UtcDaliActorLayoutDirectionProperty(void)
 
   Actor actor0 = Actor::New();
   DALI_TEST_EQUALS( actor0.GetProperty< int >( Actor::Property::LAYOUT_DIRECTION ), static_cast< int >( LayoutDirection::LEFT_TO_RIGHT ), TEST_LOCATION );
-  Stage::GetCurrent().Add( actor0 );
+  application.GetScene().Add( actor0 );
 
   application.SendNotification();
   application.Render();
@@ -6819,7 +6819,7 @@ int UtcDaliActorLayoutDirectionProperty(void)
   DALI_TEST_EQUALS( actor1.GetProperty< int >( Actor::Property::LAYOUT_DIRECTION ), static_cast< int >( LayoutDirection::LEFT_TO_RIGHT ), TEST_LOCATION );
   DALI_TEST_EQUALS( actor2.GetProperty< int >( Actor::Property::LAYOUT_DIRECTION ), static_cast< int >( LayoutDirection::LEFT_TO_RIGHT ), TEST_LOCATION );
 
-  Stage::GetCurrent().Add( actor3 );
+  application.GetScene().Add( actor3 );
   actor3.Add( actor4 );
   actor4.Add( actor5 );
   actor5.Add( actor6 );
@@ -6887,7 +6887,7 @@ int UtcDaliActorLayoutDirectionSignal(void)
 
   Actor actor = Actor::New();
   DALI_TEST_EQUALS( actor.GetProperty< int >( Actor::Property::LAYOUT_DIRECTION ), static_cast< int >( LayoutDirection::LEFT_TO_RIGHT ), TEST_LOCATION );
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
   bool signalCalled = false;
   LayoutDirectionFunctor layoutDirectionFunctor(signalCalled);
 
@@ -6936,7 +6936,7 @@ struct ChildAddedSignalCheck
 int UtcDaliChildAddedSignalP1(void)
 {
   TestApplication application;
-  auto stage = Stage::GetCurrent();
+  auto stage = application.GetScene();
 
   bool signalReceived=false;
   Actor childActor;
@@ -6963,7 +6963,7 @@ int UtcDaliChildAddedSignalP1(void)
 int UtcDaliChildAddedSignalP2(void)
 {
   TestApplication application;
-  auto stage = Stage::GetCurrent();
+  auto stage = application.GetScene();
 
   bool signalReceived=false;
   Actor childActor;
@@ -6991,7 +6991,7 @@ int UtcDaliChildAddedSignalP2(void)
 int UtcDaliChildAddedSignalN(void)
 {
   TestApplication application;
-  auto stage = Stage::GetCurrent();
+  auto stage = application.GetScene();
 
   bool signalReceived=false;
   Actor childActor;
@@ -7039,7 +7039,7 @@ struct ChildRemovedSignalCheck
 int UtcDaliChildRemovedSignalP1(void)
 {
   TestApplication application;
-  auto stage = Stage::GetCurrent();
+  auto stage = application.GetScene();
 
   bool signalReceived=false;
   Actor childActor;
@@ -7072,7 +7072,7 @@ int UtcDaliChildRemovedSignalP1(void)
 int UtcDaliChildRemovedSignalP2(void)
 {
   TestApplication application;
-  auto stage = Stage::GetCurrent();
+  auto stage = application.GetScene();
 
   bool signalReceived=false;
   Actor childActor;
@@ -7105,7 +7105,7 @@ int UtcDaliChildRemovedSignalP2(void)
 int UtcDaliChildRemovedSignalN(void)
 {
   TestApplication application;
-  auto stage = Stage::GetCurrent();
+  auto stage = application.GetScene();
 
   bool signalReceived=false;
   Actor childActor;
@@ -7132,7 +7132,7 @@ int UtcDaliChildRemovedSignalN(void)
 int UtcDaliChildMovedSignalP(void)
 {
   TestApplication application;
-  auto stage = Stage::GetCurrent();
+  auto stage = application.GetScene();
 
   bool addedASignalReceived   = false;
   bool removedASignalReceived = false;
@@ -7202,7 +7202,7 @@ int UtcDaliChildMovedSignalP(void)
 int utcDaliActorCulled(void)
 {
   TestApplication application;
-  auto stage = Stage::GetCurrent();
+  auto stage = application.GetScene();
 
   tet_infoline( "Check that the actor is culled if the actor is out of the screen" );
 
@@ -7249,7 +7249,7 @@ int utcDaliActorCulled(void)
 int utcDaliEnsureRenderWhenRemovingLastRenderableActor(void)
 {
   TestApplication application;
-  auto stage = Stage::GetCurrent();
+  auto stage = application.GetScene();
 
   tet_infoline( "Ensure we clear the screen when the last actor is removed" );
 
@@ -7276,7 +7276,7 @@ int utcDaliEnsureRenderWhenRemovingLastRenderableActor(void)
 int utcDaliEnsureRenderWhenMakingLastActorInvisible(void)
 {
   TestApplication application;
-  auto stage = Stage::GetCurrent();
+  auto stage = application.GetScene();
 
   tet_infoline( "Ensure we clear the screen when the last actor is made invisible" );
 
@@ -7310,7 +7310,7 @@ int utcDaliActorGetSizeAfterAnimation(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, actorSize );
   actor.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   // Size should be updated without rendering.
   Vector3 size = actor.GetProperty( Actor::Property::SIZE ).Get< Vector3 >();
@@ -7526,7 +7526,7 @@ int utcDaliActorPartialUpdate(void)
   actor.SetProperty(Actor::Property::POSITION, Vector3(16.0f, 16.0f, 0.0f));
   actor.SetProperty(Actor::Property::SIZE, Vector3(16.0f, 16.0f, 0.0f));
   actor.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   application.SendNotification();
 
@@ -7578,7 +7578,7 @@ int utcDaliActorPartialUpdate(void)
   DALI_TEST_EQUALS(clippingRect.width, glScissorParams.width, TEST_LOCATION);
   DALI_TEST_EQUALS(clippingRect.height, glScissorParams.height, TEST_LOCATION);
 
-  Stage::GetCurrent().Remove(actor);
+  application.GetScene().Remove(actor);
   application.SendNotification();
 
   // Actor removed, last 3 dirty rects are reported. Adaptor would merge them together.
@@ -7631,7 +7631,7 @@ int utcDaliActorPartialUpdateSetColor(void)
   actor.SetProperty(Actor::Property::POSITION, Vector3(16.0f, 16.0f, 0.0f));
   actor.SetProperty(Actor::Property::SIZE, Vector3(16.0f, 16.0f, 0.0f));
   actor.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   application.SendNotification();
 
@@ -7727,7 +7727,7 @@ int utcDaliActorPartialUpdateSetProperty(void)
   actor.SetProperty(Actor::Property::POSITION, Vector3(16.0f, 16.0f, 0.0f));
   actor.SetProperty(Actor::Property::SIZE, Vector3(16.0f, 16.0f, 0.0f));
   actor.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   actor.RegisterProperty(SHADER_SHADOW_COLOR_PROPERTY_NAME, Vector4(1.0f, 0.0f, 0.0f, 1.0f));
 
@@ -7796,13 +7796,13 @@ int utcDaliActorPartialUpdateTwoActors(void)
   actor.SetProperty(Actor::Property::POSITION, Vector3(100.0f, 100.0f, 0.0f));
   actor.SetProperty(Actor::Property::SIZE, Vector3(50.0f, 50.0f, 0.0f));
   actor.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   Actor actor2 = CreateRenderableActor();
   actor2.SetProperty(Actor::Property::POSITION, Vector3(150.0f, 150.0f, 0.0f));
   actor2.SetProperty(Actor::Property::SIZE, Vector3(100.0f, 100.0f, 0.0f));
   actor2.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS);
-  Stage::GetCurrent().Add(actor2);
+  application.GetScene().Add(actor2);
 
   application.SendNotification();
   std::vector<Rect<int>> damagedRects;
@@ -7843,7 +7843,7 @@ int utcDaliActorPartialUpdateActorsWithSizeHint(void)
   actor.SetProperty(Actor::Property::SIZE, Vector3(75.0f, 150.0f, 0.0f));
   actor.SetProperty(DevelActor::Property::UPDATE_SIZE_HINT, Vector3(150, 300, 0));
   actor.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   application.SendNotification();
   std::vector<Rect<int>> damagedRects;
index f5cdade..d59258c 100644 (file)
@@ -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.
@@ -206,7 +206,7 @@ int UtcDaliAlphaFunctionBezier(void)
   // Register a float property
   float startValue(0.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<float>(index), startValue, TEST_LOCATION );
 
   // Build the animation
index 8946ae2..2f9a3ae 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.
@@ -240,7 +240,7 @@ int UtcDaliAnimationSetDurationP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   float durationSeconds(1.0f);
@@ -329,7 +329,7 @@ int UtcDaliAnimationSetLoopingP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   float durationSeconds(1.0f);
@@ -393,7 +393,7 @@ int UtcDaliAnimationSetLoopCountP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   float durationSeconds(1.0f);
@@ -466,7 +466,7 @@ int UtcDaliAnimationSetLoopCountP2(void)
   //
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   float durationSeconds(1.0f);
@@ -587,7 +587,7 @@ int UtcDaliAnimationSetLoopCountP3(void)
   // switching between forever and loop count
   //
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   float durationSeconds(1.0f);
@@ -651,7 +651,7 @@ int UtcDaliAnimationSetLoopCountP4(void)
   // ..and play again
   //
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   float durationSeconds(1.0f);
@@ -700,7 +700,7 @@ int UtcDaliAnimationGetLoopCountP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   float durationSeconds(1.0f);
@@ -749,7 +749,7 @@ int UtcDaliAnimationGetCurrentLoopP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   float durationSeconds(1.0f);
@@ -821,7 +821,7 @@ int UtcDaliAnimationSetEndActionN(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   float durationSeconds(1.0f);
@@ -924,7 +924,7 @@ int UtcDaliAnimationGetEndActionP(void)
 int UtcDaliAnimationSetDisconnectActionP(void)
 {
   TestApplication application;
-  Stage stage( Stage::GetCurrent() );
+  Integration::Scene stage( application.GetScene() );
 
   // Default: BakeFinal
   {
@@ -1084,7 +1084,7 @@ int UtcDaliAnimationSetCurrentProgressP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   Animation animation = Animation::New(0.0f);
@@ -1147,7 +1147,7 @@ int UtcDaliAnimationSetCurrentProgressN(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   Animation animation = Animation::New(0.0f);
@@ -1180,7 +1180,7 @@ int UtcDaliAnimationGetCurrentProgressP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   Animation animation = Animation::New(0.0f);
@@ -1248,7 +1248,7 @@ int UtcDaliAnimationSetSpeedFactorP1(void)
   tet_printf("Testing that setting a speed factor of 2 takes half the time\n");
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   float durationSeconds(1.0f);
@@ -1308,7 +1308,7 @@ int UtcDaliAnimationSetSpeedFactorP2(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   float durationSeconds(1.0f);
@@ -1382,7 +1382,7 @@ int UtcDaliAnimationSetSpeedFactorP3(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   float durationSeconds(1.0f);
@@ -1459,7 +1459,7 @@ int UtcDaliAnimationSetSpeedFactorP4(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   float durationSeconds(1.0f);
@@ -1666,7 +1666,7 @@ int UtcDaliAnimationSetSpeedFactorAndRange(void)
     Actor actor = Actor::New();
     actor.SetProperty( Actor::Property::POSITION, Vector3( testData[actorIndex].startX, 0, 0 ) );
     actors.push_back(actor);
-    Stage::GetCurrent().Add(actor);
+    application.GetScene().Add(actor);
 
     if( actorIndex == 0 || actorIndex == NUM_ENTRIES-1 )
     {
@@ -1763,7 +1763,7 @@ int UtcDaliAnimationSetSpeedFactorRangeAndLoopCount01(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::POSITION, Vector3( testData.startX, 0, 0 ) );
   actors.push_back(actor);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   KeyFrames keyframes = KeyFrames::New();
   keyframes.Add( testData.startTime, Vector3(testData.startX, 0, 0));
@@ -1845,7 +1845,7 @@ int UtcDaliAnimationSetSpeedFactorRangeAndLoopCount02(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::POSITION, Vector3( testData.startX, 0, 0 ) );
   actors.push_back(actor);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   KeyFrames keyframes = KeyFrames::New();
   keyframes.Add( testData.startTime, Vector3(testData.startX, 0, 0));
@@ -1906,7 +1906,7 @@ int UtcDaliAnimationSetPlayRangeP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   // Build the animation
   float durationSeconds( 1.0f );
@@ -1958,7 +1958,7 @@ int UtcDaliAnimationSetPlayRangeN(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   Animation animation = Animation::New(0);
@@ -1985,7 +1985,7 @@ int UtcDaliAnimationGetPlayRangeP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   // Build the animation
   Animation animation = Animation::New( 1.0f );
@@ -2007,7 +2007,7 @@ int UtcDaliAnimationPlayP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   float durationSeconds(1.0f);
@@ -2110,7 +2110,7 @@ int UtcDaliAnimationPlayOffStageDiscardP(void)
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(20,20,20), TEST_LOCATION );
 
   // Add to the stage
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   application.SendNotification();
   application.Render(static_cast<unsigned int>(durationSeconds*200.0f)/* 40% progress */);
@@ -2121,7 +2121,7 @@ int UtcDaliAnimationPlayOffStageDiscardP(void)
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(40,40,40)/*on-stage*/, TEST_LOCATION );
 
   // Remove from the stage
-  Stage::GetCurrent().Remove(actor);
+  application.GetScene().Remove(actor);
 
   application.SendNotification();
   application.Render(static_cast<unsigned int>(durationSeconds*200.0f)/* 60% progress */);
@@ -2139,7 +2139,7 @@ int UtcDaliAnimationPlayOffStageDiscardP(void)
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION );
 
   // Add to the stage
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   application.SendNotification();
   application.Render(static_cast<unsigned int>(durationSeconds*200.0f)/* 80% progress */);
@@ -2202,7 +2202,7 @@ int UtcDaliAnimationPlayOffStageBakeFinalP(void)
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(20,20,20), TEST_LOCATION );
 
   // Add to the stage
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   application.SendNotification();
   application.Render(static_cast<unsigned int>(durationSeconds*200.0f)/* 40% progress */);
@@ -2213,7 +2213,7 @@ int UtcDaliAnimationPlayOffStageBakeFinalP(void)
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(40,40,40)/*on-stage*/, TEST_LOCATION );
 
   // Remove from the stage
-  Stage::GetCurrent().Remove(actor);
+  application.GetScene().Remove(actor);
 
   application.SendNotification();
   application.Render(static_cast<unsigned int>(durationSeconds*200.0f)/* 60% progress */);
@@ -2224,7 +2224,7 @@ int UtcDaliAnimationPlayOffStageBakeFinalP(void)
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition /*bake final*/, TEST_LOCATION );
 
   // Add to the stage
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   application.SendNotification();
   application.Render(static_cast<unsigned int>(durationSeconds*200.0f)/* 80% progress */);
@@ -2287,7 +2287,7 @@ int UtcDaliAnimationPlayOffStageBakeP(void)
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(20,20,20), TEST_LOCATION );
 
   // Add to the stage
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   application.SendNotification();
   application.Render(static_cast<unsigned int>(durationSeconds*200.0f)/* 40% progress */);
@@ -2298,7 +2298,7 @@ int UtcDaliAnimationPlayOffStageBakeP(void)
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(40,40,40)/*on-stage*/, TEST_LOCATION );
 
   // Remove from the stage
-  Stage::GetCurrent().Remove(actor); // baked here
+  application.GetScene().Remove(actor); // baked here
 
   application.SendNotification();
   // this render is a no-op in this case as animator is disabled while off stage
@@ -2309,7 +2309,7 @@ int UtcDaliAnimationPlayOffStageBakeP(void)
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(40,40,40) /*baked value*/, TEST_LOCATION );
 
   // Add back to the stage
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   application.SendNotification();
   application.Render(static_cast<unsigned int>(durationSeconds*200.0f)/* 80% progress */);
@@ -2320,7 +2320,7 @@ int UtcDaliAnimationPlayOffStageBakeP(void)
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(88,88,88) /*baked value*/, TEST_LOCATION );
 
   // Remove from the stage
-  Stage::GetCurrent().Remove(actor); // baked here
+  application.GetScene().Remove(actor); // baked here
 
   application.SendNotification();
   // this render is a no-op in this case as animator is disabled while off stage
@@ -2332,7 +2332,7 @@ int UtcDaliAnimationPlayOffStageBakeP(void)
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(88,88,88) /*baked value*/, TEST_LOCATION );
 
   // Add back to the stage
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // We didn't expect the animation to finish yet
   application.SendNotification();
@@ -2361,7 +2361,7 @@ int UtcDaliAnimationPlayDiscardHandleP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   float durationSeconds(1.0f);
@@ -2434,7 +2434,7 @@ int UtcDaliAnimationPlayStopDiscardHandleP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   float durationSeconds(1.0f);
@@ -2503,7 +2503,7 @@ int UtcDaliAnimationPlayRangeP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   float durationSeconds(1.0f);
@@ -2607,7 +2607,7 @@ int UtcDaliAnimationPlayFromP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION );
 
@@ -2663,7 +2663,7 @@ int UtcDaliAnimationPlayFromN(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   float durationSeconds(1.0f);
@@ -2687,7 +2687,7 @@ int UtcDaliAnimationPauseP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   float durationSeconds(1.0f);
@@ -2758,7 +2758,7 @@ int UtcDaliAnimationGetStateP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   float durationSeconds(1.0f);
@@ -2851,7 +2851,7 @@ int UtcDaliAnimationStopP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   float durationSeconds(1.0f);
@@ -2901,7 +2901,7 @@ int UtcDaliAnimationStopSetPositionP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   float durationSeconds(1.0f);
@@ -2950,7 +2950,7 @@ int UtcDaliAnimationClearP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   float durationSeconds(1.0f);
@@ -3043,7 +3043,7 @@ int UtcDaliAnimationAnimateByBooleanP(void)
   // Register a boolean property
   bool startValue(false);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_CHECK( actor.GetProperty<bool>(index) == startValue );
   DALI_TEST_CHECK( actor.GetCurrentProperty< bool >( index ) == startValue );
 
@@ -3130,7 +3130,7 @@ int UtcDaliAnimationAnimateByBooleanAlphaFunctionP(void)
   // Register a boolean property
   bool startValue(false);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_CHECK( actor.GetProperty<bool>(index) == startValue );
   DALI_TEST_CHECK( actor.GetCurrentProperty< bool >( index ) == startValue );
 
@@ -3208,7 +3208,7 @@ int UtcDaliAnimationAnimateByBooleanTimePeriodP(void)
   // Register a boolean property
   bool startValue(false);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_CHECK( actor.GetProperty<bool>(index) == startValue );
   DALI_TEST_CHECK( actor.GetCurrentProperty< bool >( index ) == startValue );
 
@@ -3272,7 +3272,7 @@ int UtcDaliAnimationAnimateByBooleanAlphaFunctionTimePeriodP(void)
   // Register a boolean property
   bool startValue(false);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_CHECK( actor.GetProperty<bool>(index) == startValue );
   DALI_TEST_CHECK( actor.GetCurrentProperty< bool >( index ) == startValue );
 
@@ -3337,7 +3337,7 @@ int UtcDaliAnimationAnimateByFloatP(void)
   // Register a float property
   float startValue(10.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<float>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( index ), startValue, TEST_LOCATION );
 
@@ -3393,7 +3393,7 @@ int UtcDaliAnimationAnimateByFloatAlphaFunctionP(void)
   // Register a float property
   float startValue(10.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<float>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( index ), startValue, TEST_LOCATION );
 
@@ -3449,7 +3449,7 @@ int UtcDaliAnimationAnimateByFloatTimePeriodP(void)
   // Register a float property
   float startValue(10.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<float>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( index ), startValue, TEST_LOCATION );
 
@@ -3511,7 +3511,7 @@ int UtcDaliAnimationAnimateByFloatAlphaFunctionTimePeriodP(void)
   // Register a float property
   float startValue(10.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<float>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( index ), startValue, TEST_LOCATION );
 
@@ -3574,7 +3574,7 @@ int UtcDaliAnimationAnimateByIntegerP(void)
   // Register an integer property
   int startValue(1);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<int>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< int >( index ), startValue, TEST_LOCATION );
 
@@ -3630,7 +3630,7 @@ int UtcDaliAnimationAnimateByIntegerAlphaFunctionP(void)
   // Register an integer property
   int startValue(1);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<int>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< int >( index ), startValue, TEST_LOCATION );
 
@@ -3686,7 +3686,7 @@ int UtcDaliAnimationAnimateByIntegerTimePeriodP(void)
   // Register an integer property
   int startValue(10);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<int>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< int >( index ), startValue, TEST_LOCATION );
 
@@ -3748,7 +3748,7 @@ int UtcDaliAnimationAnimateByIntegerAlphaFunctionTimePeriodP(void)
   // Register an integer property
   int startValue(10);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<int>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< int >( index ), startValue, TEST_LOCATION );
 
@@ -3811,7 +3811,7 @@ int UtcDaliAnimationAnimateByQuaternionP(void)
   // Register a quaternion property
   const Quaternion startValue( Degree( 90 ), Vector3::XAXIS );
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_CHECK( actor.GetProperty< Quaternion >(index) == startValue );
   DALI_TEST_CHECK( actor.GetCurrentProperty< Quaternion >( index ) == startValue );
 
@@ -3849,7 +3849,7 @@ int UtcDaliAnimationAnimateByVector2P(void)
   // Register a Vector2 property
   Vector2 startValue(10.0f, 10.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<Vector2>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector2 >( index ), startValue, TEST_LOCATION );
 
@@ -3905,7 +3905,7 @@ int UtcDaliAnimationAnimateByVector2AlphaFunctionP(void)
   // Register a Vector2 property
   Vector2 startValue(100.0f, 100.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<Vector2>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector2 >( index ), startValue, TEST_LOCATION );
 
@@ -3962,7 +3962,7 @@ int UtcDaliAnimationAnimateByVector2TimePeriodP(void)
   // Register a Vector2 property
   Vector2 startValue(10.0f, 10.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<Vector2>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector2 >( index ), startValue, TEST_LOCATION );
 
@@ -4024,7 +4024,7 @@ int UtcDaliAnimationAnimateByVector2AlphaFunctionTimePeriodP(void)
   // Register a Vector2 property
   Vector2 startValue(5.0f, 5.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<Vector2>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector2 >( index ), startValue, TEST_LOCATION );
 
@@ -4087,7 +4087,7 @@ int UtcDaliAnimationAnimateByVector3P(void)
   // Register a Vector3 property
   Vector3 startValue(10.0f, 10.0f, 10.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<Vector3>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( index ), startValue, TEST_LOCATION );
 
@@ -4143,7 +4143,7 @@ int UtcDaliAnimationAnimateByVector3AlphaFunctionP(void)
   // Register a Vector3 property
   Vector3 startValue(100.0f, 100.0f, 100.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<Vector3>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( index ), startValue, TEST_LOCATION );
 
@@ -4201,7 +4201,7 @@ int UtcDaliAnimationAnimateByVector3TimePeriodP(void)
   // Register a Vector3 property
   Vector3 startValue(10.0f, 10.0f, 10.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<Vector3>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( index ), startValue, TEST_LOCATION );
 
@@ -4263,7 +4263,7 @@ int UtcDaliAnimationAnimateByVector3AlphaFunctionTimePeriodP(void)
   // Register a Vector3 property
   Vector3 startValue(5.0f, 5.0f, 5.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<Vector3>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( index ), startValue, TEST_LOCATION );
 
@@ -4326,7 +4326,7 @@ int UtcDaliAnimationAnimateByVector4P(void)
   // Register a Vector4 property
   Vector4 startValue(10.0f, 10.0f, 10.0f, 10.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<Vector4>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( index ), startValue, TEST_LOCATION );
 
@@ -4382,7 +4382,7 @@ int UtcDaliAnimationAnimateByVector4AlphaFunctionP(void)
   // Register a Vector4 property
   Vector4 startValue(100.0f, 100.0f, 100.0f, 100.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<Vector4>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( index ), startValue, TEST_LOCATION );
 
@@ -4441,7 +4441,7 @@ int UtcDaliAnimationAnimateByVector4TimePeriodP(void)
   // Register a Vector4 property
   Vector4 startValue(10.0f, 10.0f, 10.0f, 10.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<Vector4>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( index ), startValue, TEST_LOCATION );
 
@@ -4503,7 +4503,7 @@ int UtcDaliAnimationAnimateByVector4AlphaFunctionTimePeriodP(void)
   // Register a Vector4 property
   Vector4 startValue(5.0f, 5.0f, 5.0f, 5.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<Vector4>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( index ), startValue, TEST_LOCATION );
 
@@ -4564,7 +4564,7 @@ int UtcDaliAnimationAnimateByActorPositionP(void)
   Actor actor = Actor::New();
   Vector3 startPosition(10.0f, 10.0f, 10.0f);
   actor.SetProperty( Actor::Property::POSITION, startPosition );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   application.SendNotification();
   application.Render(0);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), startPosition, TEST_LOCATION );
@@ -4617,7 +4617,7 @@ int UtcDaliAnimationAnimateByActorPositionComponentsP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION );
 
   // Build the animation
@@ -4658,7 +4658,7 @@ int UtcDaliAnimationAnimateByActorPositionAlphaFunctionP(void)
   Actor actor = Actor::New();
   Vector3 startPosition(10.0f, 10.0f, 10.0f);
   actor.SetProperty( Actor::Property::POSITION, startPosition );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   application.SendNotification();
   application.Render(0);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), startPosition, TEST_LOCATION );
@@ -4715,7 +4715,7 @@ int UtcDaliAnimationAnimateByActorPositionTimePeriodP(void)
   Actor actor = Actor::New();
   Vector3 startPosition(10.0f, 10.0f, 10.0f);
   actor.SetProperty( Actor::Property::POSITION, startPosition );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   application.SendNotification();
   application.Render(0);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), startPosition, TEST_LOCATION );
@@ -4770,7 +4770,7 @@ int UtcDaliAnimationAnimateByActorPositionAlphaFunctionTimePeriodP(void)
   Actor actor = Actor::New();
   Vector3 startPosition(10.0f, 10.0f, 10.0f);
   actor.SetProperty( Actor::Property::POSITION, startPosition );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   application.SendNotification();
   application.Render(0);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), startPosition, TEST_LOCATION );
@@ -4825,7 +4825,7 @@ int UtcDaliAnimationAnimateByActorOrientationP1(void)
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::ORIENTATION, Quaternion( Dali::ANGLE_0, Vector3::YAXIS ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION );
 
   // Build the animation
@@ -4887,7 +4887,7 @@ int UtcDaliAnimationAnimateByActorOrientationP2(void)
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::ORIENTATION, Quaternion( Dali::ANGLE_0, Vector3::ZAXIS ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::ZAXIS ), ROTATION_EPSILON, TEST_LOCATION );
 
   // Build the animation
@@ -4948,7 +4948,7 @@ int UtcDaliAnimationAnimateByActorOrientationP3(void)
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::ORIENTATION, Quaternion( Dali::ANGLE_0, Vector3::ZAXIS ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::ZAXIS ), ROTATION_EPSILON, TEST_LOCATION );
 
   // Build the animation
@@ -5010,7 +5010,7 @@ int UtcDaliAnimationAnimateByActorOrientationAlphaFunctionP(void)
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::ORIENTATION, Quaternion( Dali::ANGLE_0, Vector3::YAXIS ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION );
 
   // Build the animation
@@ -5067,7 +5067,7 @@ int UtcDaliAnimationAnimateByActorOrientationAlphaFunctionTimePeriodP(void)
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::ORIENTATION, Quaternion( Dali::ANGLE_0, Vector3::YAXIS ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION );
 
   // Build the animation
@@ -5128,7 +5128,7 @@ int UtcDaliAnimationAnimateByActorScaleP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION );
 
   // Build the animation
@@ -5240,7 +5240,7 @@ int UtcDaliAnimationAnimateByActorScaleComponentsP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION );
 
   // Build the animation
@@ -5279,7 +5279,7 @@ int UtcDaliAnimationAnimateByActorColorP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION );
 
   // Build the animation
@@ -5317,7 +5317,7 @@ int UtcDaliAnimationAnimateByActorColorComponentsP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION );
 
   // Build the animation
@@ -5358,7 +5358,7 @@ int UtcDaliAnimationAnimateByActorSizeP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION );
 
   // Build the animation
@@ -5395,7 +5395,7 @@ int UtcDaliAnimationAnimateByActorSizeComponentsP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION );
 
   // Build the animation
@@ -5434,7 +5434,7 @@ int UtcDaliAnimationAnimateByActorVisibilityP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), true, TEST_LOCATION );
 
   actor.SetProperty( Actor::Property::VISIBLE, false );
@@ -5477,7 +5477,7 @@ int UtcDaliAnimationAnimateToBooleanP(void)
   // Register a boolean property
   const bool startValue(false);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_CHECK( actor.GetProperty<bool>(index) == startValue );
   DALI_TEST_CHECK( actor.GetCurrentProperty< bool >( index ) == startValue );
 
@@ -5560,7 +5560,7 @@ int UtcDaliAnimationAnimateToBooleanAlphaFunctionP(void)
   // Register a boolean property
   const bool startValue(false);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_CHECK( actor.GetProperty<bool>(index) == startValue );
   DALI_TEST_CHECK( actor.GetCurrentProperty< bool >( index ) == startValue );
 
@@ -5643,7 +5643,7 @@ int UtcDaliAnimationAnimateToBooleanTimePeriodP(void)
   // Register a boolean property
   bool startValue(false);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_CHECK( actor.GetProperty<bool>(index) == startValue );
   DALI_TEST_CHECK( actor.GetCurrentProperty< bool >( index ) == startValue );
 
@@ -5706,7 +5706,7 @@ int UtcDaliAnimationAnimateToBooleanAlphaFunctionTimePeriodP(void)
   // Register a boolean property
   bool startValue(false);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_CHECK( actor.GetProperty<bool>(index) == startValue );
   DALI_TEST_CHECK( actor.GetCurrentProperty< bool >( index ) == startValue );
 
@@ -5770,7 +5770,7 @@ int UtcDaliAnimationAnimateToFloatP(void)
   // Register a float property
   float startValue(10.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<float>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( index ), startValue, TEST_LOCATION );
 
@@ -5817,7 +5817,7 @@ int UtcDaliAnimationAnimateToFloatAlphaFunctionP(void)
   // Register a float property
   float startValue(10.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<float>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( index ), startValue, TEST_LOCATION );
 
@@ -5867,7 +5867,7 @@ int UtcDaliAnimationAnimateToFloatTimePeriodP(void)
   // Register a float property
   float startValue(10.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<float>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( index ), startValue, TEST_LOCATION );
 
@@ -5923,7 +5923,7 @@ int UtcDaliAnimationAnimateToFloatAlphaFunctionTimePeriodP(void)
   // Register a float property
   float startValue(10.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<float>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( index ), startValue, TEST_LOCATION );
 
@@ -5980,7 +5980,7 @@ int UtcDaliAnimationAnimateToIntegerP(void)
   // Register an integer property
   int startValue(10);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<int>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< int >( index ), startValue, TEST_LOCATION );
 
@@ -6027,7 +6027,7 @@ int UtcDaliAnimationAnimateToIntegerAlphaFunctionP(void)
   // Register an integer property
   int startValue(10);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<int>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< int >( index ), startValue, TEST_LOCATION );
 
@@ -6077,7 +6077,7 @@ int UtcDaliAnimationAnimateToIntegerTimePeriodP(void)
   // Register an integer property
   int startValue(10);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<int>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< int >( index ), startValue, TEST_LOCATION );
 
@@ -6133,7 +6133,7 @@ int UtcDaliAnimationAnimateToIntegerAlphaFunctionTimePeriodP(void)
   // Register an integer property
   int startValue(10);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<int>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< int >( index ), startValue, TEST_LOCATION );
 
@@ -6190,7 +6190,7 @@ int UtcDaliAnimationAnimateToVector2P(void)
   // Register a Vector2 property
   Vector2 startValue(-50.0f, -50.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty< Vector2 >( index ), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector2 >( index ), startValue, TEST_LOCATION );
 
@@ -6237,7 +6237,7 @@ int UtcDaliAnimationAnimateToVector2AlphaFunctionP(void)
   // Register a Vector2 property
   Vector2 startValue(1000.0f, 1000.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty< Vector2 >( index ), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector2 >( index ), startValue, TEST_LOCATION );
 
@@ -6288,7 +6288,7 @@ int UtcDaliAnimationAnimateToVector2TimePeriodP(void)
   // Register a Vector2 property
   Vector2 startValue(10.0f, 10.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty< Vector2 >( index ), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector2 >( index ), startValue, TEST_LOCATION );
 
@@ -6344,7 +6344,7 @@ int UtcDaliAnimationAnimateToVector2AlphaFunctionTimePeriodP(void)
   // Register a Vector2 property
   Vector2 startValue(10.0f, 10.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty< Vector2 >( index ), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector2 >( index ), startValue, TEST_LOCATION );
 
@@ -6403,7 +6403,7 @@ int UtcDaliAnimationAnimateToVector3P(void)
   // Register a Vector3 property
   Vector3 startValue(-50.0f, -50.0f, -50.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<Vector3>( index ), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( index ), startValue, TEST_LOCATION );
 
@@ -6450,7 +6450,7 @@ int UtcDaliAnimationAnimateToVector3AlphaFunctionP(void)
   // Register a Vector3 property
   Vector3 startValue(1000.0f, 1000.0f, 1000.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<Vector3>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( index ), startValue, TEST_LOCATION );
 
@@ -6502,7 +6502,7 @@ int UtcDaliAnimationAnimateToVector3TimePeriodP(void)
   // Register a Vector3 property
   Vector3 startValue(10.0f, 10.0f, 10.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<Vector3>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( index ), startValue, TEST_LOCATION );
 
@@ -6558,7 +6558,7 @@ int UtcDaliAnimationAnimateToVector3AlphaFunctionTimePeriodP(void)
   // Register a Vector3 property
   Vector3 startValue(10.0f, 10.0f, 10.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<Vector3>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( index ), startValue, TEST_LOCATION );
 
@@ -6615,7 +6615,7 @@ int UtcDaliAnimationAnimateToVector3ComponentP(void)
   // Register a Vector3 property
   Vector3 startValue(10.0f, 10.0f, 10.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<Vector3>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( index ), startValue, TEST_LOCATION );
 
@@ -6676,7 +6676,7 @@ int UtcDaliAnimationAnimateToVector4P(void)
   // Register a Vector4 property
   Vector4 startValue(-50.0f, -40.0f, -30.0f, -20.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<Vector4>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( index ), startValue, TEST_LOCATION );
 
@@ -6723,7 +6723,7 @@ int UtcDaliAnimationAnimateToVector4AlphaFunctionP(void)
   // Register a Vector4 property
   Vector4 startValue(1000.0f, 1000.0f, 1000.0f, 1000.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<Vector4>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( index ), startValue, TEST_LOCATION );
 
@@ -6776,7 +6776,7 @@ int UtcDaliAnimationAnimateToVector4TimePeriodP(void)
   // Register a Vector4 property
   Vector4 startValue(10.0f, 10.0f, 10.0f, 10.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<Vector4>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( index ), startValue, VECTOR4_EPSILON, TEST_LOCATION );
 
@@ -6832,7 +6832,7 @@ int UtcDaliAnimationAnimateToVector4AlphaFunctionTimePeriodP(void)
   // Register a Vector4 property
   Vector4 startValue(10.0f, 10.0f, 10.0f, 10.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<Vector4>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( index ), startValue, TEST_LOCATION );
 
@@ -6885,7 +6885,7 @@ int UtcDaliAnimationAnimateToActorParentOriginP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::TOP_LEFT, TEST_LOCATION );
 
   // Build the animation
@@ -6906,7 +6906,7 @@ int UtcDaliAnimationAnimateToActorParentOriginXN(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   float startValue(0.0f);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ).x, startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::PARENT_ORIGIN_X), startValue, TEST_LOCATION );
@@ -6929,7 +6929,7 @@ int UtcDaliAnimationAnimateToActorParentOriginYN(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   float startValue(0.0f);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ).y, startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::PARENT_ORIGIN_Y), startValue, TEST_LOCATION );
@@ -6952,7 +6952,7 @@ int UtcDaliAnimationAnimateToActorParentOriginZN(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   float startValue(0.5f);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ).z, startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::PARENT_ORIGIN_Z), startValue, TEST_LOCATION );
@@ -6975,7 +6975,7 @@ int UtcDaliAnimationAnimateToActorAnchorPointN(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), AnchorPoint::CENTER, TEST_LOCATION );
 
   // Build the animation
@@ -6996,7 +6996,7 @@ int UtcDaliAnimationAnimateToActorAnchorPointXN(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   float startValue(0.5f);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ).x, startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::ANCHOR_POINT_X), startValue, TEST_LOCATION );
@@ -7019,7 +7019,7 @@ int UtcDaliAnimationAnimateToActorAnchorPointYN(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   float startValue(0.5f);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ).y, startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::ANCHOR_POINT_Y), startValue, TEST_LOCATION );
@@ -7042,7 +7042,7 @@ int UtcDaliAnimationAnimateToActorAnchorPointZN(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   float startValue(0.5f);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ).z, startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::ANCHOR_POINT_Z), startValue, TEST_LOCATION );
@@ -7065,7 +7065,7 @@ int UtcDaliAnimationAnimateToActorSizeP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION );
 
   // Build the animation
@@ -7185,7 +7185,7 @@ int UtcDaliAnimationAnimateToActorSizeWidthP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   float startValue(0.0f);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::SIZE_WIDTH), startValue, TEST_LOCATION );
@@ -7237,7 +7237,7 @@ int UtcDaliAnimationAnimateToActorSizeHeightP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   float startValue(0.0f);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).height, startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::SIZE_HEIGHT), startValue, TEST_LOCATION );
@@ -7289,7 +7289,7 @@ int UtcDaliAnimationAnimateToActorSizeDepthP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   float startValue(0.0f);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).depth, startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::SIZE_DEPTH), startValue, TEST_LOCATION );
@@ -7341,7 +7341,7 @@ int UtcDaliAnimationAnimateToActorSizeWidthHeightP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION );
 
   // Build the animation
@@ -7451,7 +7451,7 @@ int UtcDaliAnimationAnimateToActorPositionP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION );
 
   // Build the animation
@@ -7504,7 +7504,7 @@ int UtcDaliAnimationAnimateToActorPositionXP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   float startValue(0.0f);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::POSITION_X), startValue, TEST_LOCATION );
@@ -7560,7 +7560,7 @@ int UtcDaliAnimationAnimateToActorPositionYP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   float startValue(0.0f);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).y, startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::POSITION_X), startValue, TEST_LOCATION );
@@ -7616,7 +7616,7 @@ int UtcDaliAnimationAnimateToActorPositionZP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   float startValue(0.0f);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).z, startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::POSITION_X), startValue, TEST_LOCATION );
@@ -7672,7 +7672,7 @@ int UtcDaliAnimationAnimateToActorPositionAlphaFunctionP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION );
 
   // Build the animation
@@ -7721,7 +7721,7 @@ int UtcDaliAnimationAnimateToActorPositionTimePeriodP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION );
 
   // Build the animation
@@ -7773,7 +7773,7 @@ int UtcDaliAnimationAnimateToActorPositionAlphaFunctionTimePeriodP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION );
 
   // Build the animation
@@ -7827,7 +7827,7 @@ int UtcDaliAnimationAnimateToActorOrientationAngleAxisP(void)
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::ORIENTATION, Quaternion( Dali::ANGLE_0, Vector3::YAXIS ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION );
 
   // Build the animation
@@ -7887,7 +7887,7 @@ int UtcDaliAnimationAnimateToActorOrientationQuaternionP(void)
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::ORIENTATION, Quaternion( Dali::ANGLE_0, Vector3::YAXIS ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION );
 
   // Build the animation
@@ -7945,7 +7945,7 @@ int UtcDaliAnimationAnimateToActorOrientationAlphaFunctionP(void)
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::ORIENTATION, Quaternion( Dali::ANGLE_0, Vector3::YAXIS ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(Radian(0.0f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
 
   // Build the animation
@@ -8002,7 +8002,7 @@ int UtcDaliAnimationAnimateToActorOrientationTimePeriodP(void)
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::ORIENTATION, Quaternion( Dali::ANGLE_0, Vector3::YAXIS ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION );
 
   // Build the animation
@@ -8063,7 +8063,7 @@ int UtcDaliAnimationAnimateToActorOrientationAlphaFunctionTimePeriodP(void)
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::ORIENTATION, Quaternion( Dali::ANGLE_0, Vector3::YAXIS ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION );
 
   // Build the animation
@@ -8123,7 +8123,7 @@ int UtcDaliAnimationAnimateToActorScaleP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION );
 
   // Build the animation
@@ -8237,7 +8237,7 @@ int UtcDaliAnimationAnimateToActorScaleXP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   float startValue(1.0f);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).x, startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::SCALE_X), startValue, TEST_LOCATION );
@@ -8295,7 +8295,7 @@ int UtcDaliAnimationAnimateToActorScaleYP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   float startValue(1.0f);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).y, startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::SCALE_X), startValue, TEST_LOCATION );
@@ -8353,7 +8353,7 @@ int UtcDaliAnimationAnimateToActorScaleZP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   float startValue(1.0f);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).z, startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::SCALE_X), startValue, TEST_LOCATION );
@@ -8411,7 +8411,7 @@ int UtcDaliAnimationAnimateToActorColorP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION );
 
   // Build the animation
@@ -8536,7 +8536,7 @@ int UtcDaliAnimationAnimateToActorColorRedP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   float startValue(1.0f);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).r, startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_RED),   startValue, TEST_LOCATION );
@@ -8598,7 +8598,7 @@ int UtcDaliAnimationAnimateToActorColorGreenP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   float startValue(1.0f);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).g, startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_RED),   startValue, TEST_LOCATION );
@@ -8660,7 +8660,7 @@ int UtcDaliAnimationAnimateToActorColorBlueP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   float startValue(1.0f);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).b, startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_RED),   startValue, TEST_LOCATION );
@@ -8722,7 +8722,7 @@ int UtcDaliAnimationAnimateToActorColorAlphaP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   float startValue(1.0f);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_RED),   startValue, TEST_LOCATION );
@@ -8958,7 +8958,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaP(void)
   float startValue(1.0f);
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue));
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_RED),   startValue, TEST_LOCATION );
@@ -9060,7 +9060,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaCubicP(void)
   float startValue(1.0f);
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue));
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_RED),   startValue, TEST_LOCATION );
@@ -9159,7 +9159,7 @@ int UtcDaliAnimationAnimateBetweenActorColorP(void)
   float startValue(1.0f);
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue));
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_RED),   startValue, TEST_LOCATION );
@@ -9238,7 +9238,7 @@ int UtcDaliAnimationAnimateBetweenActorColorCubicP(void)
   float startValue(1.0f);
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue));
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_RED),   startValue, TEST_LOCATION );
@@ -9317,7 +9317,7 @@ int UtcDaliAnimationAnimateBetweenActorVisibleP(void)
   Actor actor = Actor::New();
   AngleAxis aa(Degree(90), Vector3::XAXIS);
   actor.SetProperty( Actor::Property::ORIENTATION, Quaternion(aa.angle, aa.axis) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   application.SendNotification();
   application.Render(0);
@@ -9365,7 +9365,7 @@ int UtcDaliAnimationAnimateBetweenActorVisibleCubicP(void)
   Actor actor = Actor::New();
   AngleAxis aa(Degree(90), Vector3::XAXIS);
   actor.SetProperty( Actor::Property::ORIENTATION, Quaternion(aa.angle, aa.axis) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   application.SendNotification();
   application.Render(0);
@@ -9411,7 +9411,7 @@ int UtcDaliAnimationAnimateBetweenActorOrientation01P(void)
   Actor actor = Actor::New();
   AngleAxis aa(Degree(90), Vector3::XAXIS);
   actor.SetProperty( Actor::Property::ORIENTATION, Quaternion(aa.angle, aa.axis) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   application.SendNotification();
   application.Render(0);
@@ -9459,7 +9459,7 @@ int UtcDaliAnimationAnimateBetweenActorOrientation02P(void)
   actor.SetProperty( Actor::Property::ORIENTATION, Quaternion(aa.angle, aa.axis) );
   application.SendNotification();
   application.Render(0);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   Quaternion start(Radian(aa.angle), aa.axis);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), start, 0.001f, TEST_LOCATION );
@@ -9522,7 +9522,7 @@ int UtcDaliAnimationAnimateBetweenActorOrientation01CubicP(void)
   Actor actor = Actor::New();
   AngleAxis aa(Degree(90), Vector3::XAXIS);
   actor.SetProperty( Actor::Property::ORIENTATION, Quaternion(aa.angle, aa.axis) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   application.SendNotification();
   application.Render(0);
@@ -9568,7 +9568,7 @@ int UtcDaliAnimationAnimateBetweenActorOrientation02CubicP(void)
   actor.SetProperty( Actor::Property::ORIENTATION, Quaternion(aa.angle, aa.axis) );
   application.SendNotification();
   application.Render(0);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   Quaternion start(Radian(aa.angle), aa.axis);
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), start, 0.001f, TEST_LOCATION );
@@ -9632,7 +9632,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaFunctionP(void)
   float startValue(1.0f);
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue));
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_RED),   startValue, TEST_LOCATION );
@@ -9711,7 +9711,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaFunctionCubicP(void)
   float startValue(1.0f);
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue));
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_RED),   startValue, TEST_LOCATION );
@@ -9790,7 +9790,7 @@ int UtcDaliAnimationAnimateBetweenActorColorTimePeriodP(void)
   float startValue(1.0f);
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue));
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_RED),   startValue, TEST_LOCATION );
@@ -9871,7 +9871,7 @@ int UtcDaliAnimationAnimateBetweenActorColorTimePeriodCubicP(void)
   float startValue(1.0f);
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue));
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_RED),   startValue, TEST_LOCATION );
@@ -9953,7 +9953,7 @@ int UtcDaliAnimationAnimateBetweenActorColorAlphaFunctionTimePeriodP(void)
   float delay = 0.5f;
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue));
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_RED),   startValue, TEST_LOCATION );
@@ -10033,7 +10033,7 @@ int UtcDaliAnimationAnimateBetweenActorColorCubicWithDelayP(void)
   float startValue(1.0f);
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue));
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_RED),   startValue, TEST_LOCATION );
@@ -10113,7 +10113,7 @@ int UtcDaliAnimationAnimateP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   //Build the path
   Vector3 position0( 30.0,  80.0,  0.0);
@@ -10192,7 +10192,7 @@ int UtcDaliAnimationAnimateAlphaFunctionP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   //Build the path
   Vector3 position0( 30.0,  80.0,  0.0);
@@ -10271,7 +10271,7 @@ int UtcDaliAnimationAnimateTimePeriodP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   //Build the path
   Vector3 position0( 30.0,  80.0,  0.0);
@@ -10350,7 +10350,7 @@ int UtcDaliAnimationAnimateAlphaFunctionTimePeriodP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   //Build the path
   Vector3 position0( 30.0,  80.0,  0.0);
@@ -10433,7 +10433,7 @@ int UtcDaliAnimationShowP(void)
   application.SendNotification();
   application.Render(0);
   DALI_TEST_CHECK( !actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Start the animation
   float durationSeconds(10.0f);
@@ -10477,7 +10477,7 @@ int UtcDaliAnimationHideP(void)
 
   Actor actor = Actor::New();
   DALI_TEST_CHECK( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Start the animation
   float durationSeconds(10.0f);
@@ -10524,7 +10524,7 @@ int UtcDaliAnimationShowHideAtEndP(void)
 
   Actor actor = Actor::New();
   DALI_TEST_CHECK( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Start Hide animation
   float durationSeconds(10.0f);
@@ -10622,7 +10622,7 @@ int UtcDaliAnimationUpdateManagerP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   // Build the animation
   Animation animation = Animation::New( 0.0f );
@@ -10659,7 +10659,7 @@ int UtcDaliAnimationSignalOrderP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   // Build the animations
   Animation animation1 = Animation::New( 0.0f ); // finishes first frame
@@ -10716,7 +10716,7 @@ int UtcDaliAnimationExtendDurationP(void)
   // Register a float property
   float startValue(10.0f);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<float>(index), startValue, TEST_LOCATION );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( index ), startValue, TEST_LOCATION );
 
@@ -10776,7 +10776,7 @@ int UtcDaliAnimationCustomIntProperty(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   int startValue(0u);
 
   Property::Index index = actor.RegisterProperty("anIndex",  startValue);
@@ -10822,7 +10822,7 @@ int UtcDaliAnimationDuration(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   Animation animation = Animation::New( 0.0f );
   DALI_TEST_EQUALS( 0.0f, animation.GetDuration(), TEST_LOCATION );
@@ -10847,7 +10847,7 @@ int UtcDaliAnimationAnimateByNonAnimateableTypeN(void)
   // Register an integer property
   int startValue(1);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<int>(index), startValue, TEST_LOCATION );
 
   DALI_TEST_ASSERTION(
@@ -10872,7 +10872,7 @@ int UtcDaliAnimationAnimateToNonAnimateableTypeN(void)
   // Register an integer property
   int startValue(1);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<int>(index), startValue, TEST_LOCATION );
 
   DALI_TEST_ASSERTION(
@@ -10895,7 +10895,7 @@ int UtcDaliAnimationAnimateBetweenNonAnimateableTypeN(void)
   // Register an integer property
   int startValue(1);
   Property::Index index = actor.RegisterProperty( "testProperty",  startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   DALI_TEST_EQUALS( actor.GetProperty<int>(index), startValue, TEST_LOCATION );
 
   DALI_TEST_ASSERTION(
@@ -10919,7 +10919,7 @@ int UtcDaliAnimationSetAndGetTargetBeforePlayP(void)
   tet_infoline("Set initial position and set up animation to re-position actor");
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   Vector3 initialPosition(0.0f, 0.0f, 0.0f);
   actor.SetProperty( Actor::Property::POSITION, initialPosition );
 
@@ -10984,7 +10984,7 @@ int UtcDaliAnimationSetAndGetTargetBeforePlayMulitpleAnimatorsPositionP(void)
   tet_infoline("Set initial position and set up animation to re-position actor");
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   Vector3 initialPosition(0.0f, 0.0f, 0.0f);
   actor.SetProperty( Actor::Property::POSITION, initialPosition );
 
@@ -11053,7 +11053,7 @@ int UtcDaliAnimationSetAndGetTargetBeforePlayMulitpleAnimatorsSizeAndPositionP(v
   tet_infoline("Set initial position and set up animation to re-position actor");
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   Vector3 initialSize( 10.0f, 10.0f, 10.0f);
   Vector3 initialPosition(10.0f, 10.0f, 10.0f);
 
@@ -11118,7 +11118,7 @@ int UtcDaliAnimationSetAndGetTargetBeforePlayMulitpleAnimatorsSizeAndPositionCol
   tet_infoline("Set initial position and set up animation to re-position actor");
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   Vector3 initialSize( 10.0f, 5.0f, 10.0f);
 
   actor.SetProperty( Actor::Property::SIZE, initialSize );
@@ -11165,7 +11165,7 @@ int UtcDaliAnimationTimePeriodOrder(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   application.SendNotification();
   application.Render();
@@ -11237,7 +11237,7 @@ int UtcDaliAnimationTimePeriodOrderSeveralAnimateToCalls(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   application.SendNotification();
   application.Render();
@@ -11318,7 +11318,7 @@ int UtcDaliAnimationAnimateBetweenIntegerP(void)
   int startValue(1);
   Actor actor = Actor::New();
   const Property::Index index = actor.RegisterProperty("customProperty", startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   application.Render();
   application.SendNotification();
@@ -11355,7 +11355,7 @@ int UtcDaliAnimationAnimateBetweenVector2P(void)
   Vector2 startValue( 10.0f, 20.0f );
   Actor actor = Actor::New();
   const Property::Index index = actor.RegisterProperty("customProperty", startValue );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   application.Render();
   application.SendNotification();
@@ -11390,7 +11390,7 @@ int UtcDaliAnimationProgressCallbackP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   Animation animation = Animation::New(0.0f);
@@ -11485,7 +11485,7 @@ int UtcDaliAnimationPlayAfterP(void)
 
   {
     Actor actor = Actor::New();
-    Stage::GetCurrent().Add(actor);
+    application.GetScene().Add(actor);
 
     // Build the animation
     float durationSeconds(1.0f);
@@ -11540,7 +11540,7 @@ int UtcDaliAnimationPlayAfterP(void)
   // SpeedFactor < 0
   {
     Actor actor = Actor::New();
-    Stage::GetCurrent().Add(actor);
+    application.GetScene().Add(actor);
 
     // Build the animation
     float durationSeconds(1.0f);
@@ -11603,7 +11603,7 @@ int UtcDaliAnimationPlayAfterP2(void)
 
   {
     Actor actor = Actor::New();
-    Stage::GetCurrent().Add(actor);
+    application.GetScene().Add(actor);
 
     // Build the animation
     float durationSeconds(1.0f);
@@ -11670,7 +11670,7 @@ int UtcDaliAnimationPlayAfterP2(void)
   // SpeedFactor < 0
   {
     Actor actor = Actor::New();
-    Stage::GetCurrent().Add(actor);
+    application.GetScene().Add(actor);
 
     // Build the animation
     float durationSeconds(1.0f);
@@ -11744,7 +11744,7 @@ int UtcDaliAnimationPlayAfterP3(void)
   tet_printf("Testing that PlayAfter with the negative delay seconds\n");
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   float durationSeconds(1.0f);
@@ -11798,7 +11798,7 @@ int UtcDaliAnimationPlayAfterP4(void)
   tet_printf("Testing that PlayAfter with progress value\n");
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   float durationSeconds(1.0f);
@@ -11870,7 +11870,7 @@ int UtcDaliAnimationSetLoopingModeP(void)
 {
   // Test Loop forever and Loop mode being set
   TestApplication application;
-  Stage stage( Stage::GetCurrent() );
+  Integration::Scene stage( application.GetScene() );
 
   // Default: LoopingMode::RESTART
   {
@@ -12015,7 +12015,7 @@ int UtcDaliAnimationSetLoopingModeP2(void)
 {
   // Test Loop Count and Loop mode being set
   TestApplication application;
-  Stage stage( Stage::GetCurrent() );
+  Integration::Scene stage( application.GetScene() );
 
   // LoopingMode::AUTO_REVERSE
   {
@@ -12152,7 +12152,7 @@ int UtcDaliAnimationSetLoopingModeP3(void)
 {
   // Test Loop Count is 1 (== default) and Loop mode being set
   TestApplication application;
-  Stage stage( Stage::GetCurrent() );
+  Integration::Scene stage( application.GetScene() );
 
   // LoopingMode::AUTO_REVERSE
   {
@@ -12289,7 +12289,7 @@ int UtcDaliAnimationProgressSignalConnectionWithoutProgressMarkerP(void)
   tet_infoline( "Connect to ProgressReachedSignal but do not set a required Progress marker" );
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   Animation animation = Animation::New(0.0f);
@@ -12340,7 +12340,7 @@ int UtcDaliAnimationMultipleProgressSignalsP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   Animation animationAlpha = Animation::New(0.0f);
@@ -12448,7 +12448,7 @@ int UtcDaliAnimationMultipleProgressSignalsP2(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   Animation animationAlpha = Animation::New(0.0f);
@@ -12563,7 +12563,7 @@ int UtcDaliAnimationProgressSignalWithPlayAfterP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   Animation animationAlpha = Animation::New(0.0f);
@@ -12674,7 +12674,7 @@ int UtcDaliAnimationProgressCallbackWithLoopingP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   Animation animation = Animation::New(0.0f);
@@ -12762,7 +12762,7 @@ int UtcDaliAnimationProgressCallbackWithLoopingP2(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   Animation animation = Animation::New(0.0f);
@@ -12855,7 +12855,7 @@ int UtcDaliAnimationProgressCallbackNegativeSpeed(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   Animation animation = Animation::New(0.0f);
@@ -12998,7 +12998,7 @@ int UtcDaliAnimationProgressCallbackInvalidSignalN(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   Animation animation = Animation::New(0.0f);
@@ -13073,7 +13073,7 @@ int UtcDaliAnimationProgressCallbackLongDurationP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build the animation
   Animation animation = Animation::New(0.0f);
@@ -13141,7 +13141,7 @@ int UtcDaliAnimationAnimateByInvalidParameters(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Create the animation
   Animation animation = Animation::New(1.0f);
@@ -13198,7 +13198,7 @@ int UtcDaliAnimationAnimateToInvalidParameters(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Create the animation
   Animation animation = Animation::New(1.0f);
@@ -13255,7 +13255,7 @@ int UtcDaliAnimationAnimateBetweenInvalidParameters(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Create the animation
   Animation animation = Animation::New(1.0f);
@@ -13353,7 +13353,7 @@ void CheckPropertyValuesWhenCallingAnimationMethod( TestFunction functionToTest,
     TestApplication application;
 
     Actor actor = Actor::New();
-    Stage::GetCurrent().Add(actor);
+    application.GetScene().Add(actor);
 
     // Build the animation
     Animation animation = Animation::New( durationSeconds );
@@ -13424,7 +13424,7 @@ int UtcDaliAnimationPausePropertyValue(void)
     TestApplication application;
 
     Actor actor = Actor::New();
-    Stage::GetCurrent().Add(actor);
+    application.GetScene().Add(actor);
 
     // Build the animation
     Animation animation = Animation::New( durationSeconds );
@@ -13460,7 +13460,7 @@ int UtcDaliAnimationPlayFromWithLoopCount(void)
   TestApplication application;
 
   auto actor = Actor::New();
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   auto animation = Animation::New( 1.0f );
   animation.AnimateTo( Property( actor, Actor::Property::POSITION_X ), 100.0f );
@@ -13502,7 +13502,7 @@ int UtcDaliAnimationCombineToAndByWithStop(void)
 
   auto actor = Actor::New();
   actor.SetProperty( Actor::Property::POSITION, Vector2( 100.0f, 100.0f ));
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   auto animation = Animation::New( 1.0f );
   const float origY = actor.GetProperty( Actor::Property::POSITION_Y ).Get< float >();
@@ -13537,7 +13537,7 @@ int UtcDaliAnimationCountAndGetAnimationAt(void)
 
   auto actor = Actor::New();
   actor.SetProperty( Actor::Property::POSITION, Vector2( 100.0f, 100.0f ));
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   auto animation = Animation::New( 1.0f );
   const float origY = actor.GetProperty( Actor::Property::POSITION_Y ).Get< float >();
index 8bf71c4..a60fcb1 100644 (file)
@@ -341,7 +341,7 @@ int UtcDaliBaseHandleDoAction(void)
   // Check that the actor is now visible
   DALI_TEST_CHECK(actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) == true);
 
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Build an animation with initial duration of 1 second
   float durationSeconds(1.0f);
@@ -423,7 +423,7 @@ int UtcDaliBaseHandleConnectSignal(void)
   actor.SetProperty( Actor::Property::POSITION, Vector2( 240, 400 ));
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100, 100 ) );
 
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   DALI_TEST_CHECK( gTouchCallBackCalled == false );
 
index 3d0eccd..0d4c8e5 100644 (file)
@@ -195,7 +195,7 @@ int UtcDaliCameraActorNewDefaultPerspectiveProjection(void)
   DALI_TEST_EQUALS( actor.GetProjectionMode(), Dali::Camera::PERSPECTIVE_PROJECTION, TEST_LOCATION );
 
   // Add it to the stage, then the values should be updated to reflect a 480.0f by 800.0f scene (default stage size)
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   DALI_TEST_EQUALS( 0.6f, actor.GetProperty( CameraActor::Property::ASPECT_RATIO ).Get< float >(), FLOAT_EPSILON, TEST_LOCATION );
   DALI_TEST_EQUALS( 0.489957f, actor.GetProperty( CameraActor::Property::FIELD_OF_VIEW ).Get< float >(), FLOAT_EPSILON, TEST_LOCATION );
@@ -839,7 +839,7 @@ int UtcDaliCameraActorSetPerspectiveProjectionP(void)
   DALI_TEST_EQUALS( actor.GetProjectionMode(), Dali::Camera::PERSPECTIVE_PROJECTION, TEST_LOCATION );
 
   // Ensure these values persist after adding to the stage and an update/render pass
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
   application.SendNotification();
   application.Render();
 
@@ -894,7 +894,7 @@ int UtcDaliCameraActorSetOrthographicProjectionP1(void)
   CameraActor actor = CameraActor::New( Size( 1080.0f, 1920.0f ) );
   DALI_TEST_CHECK( actor );
 
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   actor.SetOrthographicProjection( Size( 1080.0f, 1920.0f ) );
   application.SendNotification();
@@ -1203,7 +1203,7 @@ int UtcDaliCameraActorSetCameraOnStage(void)
   tet_infoline( "Testing Dali::CameraActor::SetCamera()" );
 
   CameraActor actor = CameraActor::New();
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
   application.Render( 0 );
   application.SendNotification();
 
@@ -1279,12 +1279,12 @@ int UtcDaliCameraActorDefaultProperties(void)
   tet_infoline( "Testing Dali::CameraActor DefaultProperties" );
 
   CameraActor actor = CameraActor::New();
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
   stage.Add(actor);
   stage.GetRenderTaskList().GetTask(0).SetCameraActor( actor );
 
   actor.SetAspectRatio( TEST_ASPECT_RATIO );
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
   application.Render( 0 );
   application.SendNotification();
   bool bValue;
@@ -1355,11 +1355,11 @@ int UtcDaliCameraActorDefaultPropertiesInherited(void)
   TestApplication application;
 
   CameraActor actor = CameraActor::New();
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
   stage.Add(actor);
   stage.GetRenderTaskList().GetTask(0).SetCameraActor( actor );
 
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
   application.Render( 0 );
   application.SendNotification();
 
@@ -1472,7 +1472,7 @@ int UtcDaliCameraActorModelView(void)
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::POSITION, Vector3( 20.0f, 30.0f, 40.0f ));
   actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   application.SendNotification();
   application.Render( 0 );
@@ -1482,7 +1482,7 @@ int UtcDaliCameraActorModelView(void)
   Matrix resultMatrix( true );
   resultMatrix.SetTransformComponents( Vector3::ONE, Quaternion::IDENTITY, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ) );
 
-  RenderTask task = Stage::GetCurrent().GetRenderTaskList().GetTask( 0 );
+  RenderTask task = application.GetScene().GetRenderTaskList().GetTask( 0 );
   CameraActor cameraActor = task.GetCameraActor();
 
   Matrix viewMatrix( false );
@@ -1498,7 +1498,7 @@ int UtcDaliCameraActorReadProjectionMatrix(void)
   TestApplication application;
   tet_infoline( "Testing Dali::CameraActor::ReadProjectionMatrix()" );
 
-  CameraActor camera = Stage::GetCurrent().GetRenderTaskList().GetTask( 0u ).GetCameraActor();
+  CameraActor camera = application.GetScene().GetRenderTaskList().GetTask( 0u ).GetCameraActor();
   application.SendNotification();
   application.Render( 0 );
   application.Render();
@@ -1506,7 +1506,7 @@ int UtcDaliCameraActorReadProjectionMatrix(void)
   Texture image = Texture::New(TextureType::TEXTURE_2D, Pixel::RGBA8888, 4u, 4u);
   Actor actor = CreateRenderableActor( image, RENDER_SHADOW_VERTEX_SOURCE, RENDER_SHADOW_FRAGMENT_SOURCE );
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   Matrix projectionMatrix;
   Matrix viewMatrix;
@@ -1543,10 +1543,10 @@ int UtcDaliCameraActorAnimatedProperties(void)
   TestApplication application;
   tet_infoline( "Testing Dali::Internal::CameraActor::GetSceneObjectAnimatableProperty()" );
 
-  CameraActor camera = Stage::GetCurrent().GetRenderTaskList().GetTask( 0u ).GetCameraActor();
+  CameraActor camera = application.GetScene().GetRenderTaskList().GetTask( 0u ).GetCameraActor();
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   Constraint constraint = Constraint::New<Dali::Vector3>( actor, Actor::Property::POSITION, EqualToConstraint() );
   constraint.AddSource( Source( camera, Actor::Property::POSITION ) );
@@ -1563,7 +1563,7 @@ int UtcDaliCameraActorAnimatedProperties(void)
 int UtcDaliCameraActorPropertyIndices(void)
 {
   TestApplication application;
-  CameraActor camera = Stage::GetCurrent().GetRenderTaskList().GetTask( 0u ).GetCameraActor();
+  CameraActor camera = application.GetScene().GetRenderTaskList().GetTask( 0u ).GetCameraActor();
 
   Actor basicActor = Actor::New();
   Property::IndexContainer indices;
@@ -1576,7 +1576,7 @@ int UtcDaliCameraActorPropertyIndices(void)
 int UtcDaliCameraActorCheckLookAtAndFreeLookViews01(void)
 {
   TestApplication application;
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
   Vector2 stageSize = stage.GetSize();
 
   CameraActor freeLookCameraActor = CameraActor::New( stageSize );
@@ -1636,7 +1636,7 @@ int UtcDaliCameraActorCheckLookAtAndFreeLookViews01(void)
 int UtcDaliCameraActorCheckLookAtAndFreeLookViews02(void)
 {
   TestApplication application;
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
   Vector2 stageSize = stage.GetSize();
 
   CameraActor freeLookCameraActor = CameraActor::New( stageSize );
@@ -1700,7 +1700,7 @@ int UtcDaliCameraActorCheckLookAtAndFreeLookViews02(void)
 int UtcDaliCameraActorCheckLookAtAndFreeLookViews03(void)
 {
   TestApplication application;
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
   Vector2 stageSize = stage.GetSize();
 
   Vector3 targetPosition( Vector3::ZERO );
@@ -1747,7 +1747,7 @@ int UtcDaliCameraActorReflectionByPlane(void)
 {
   TestApplication application;
 
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
 
   Vector3 targetPosition( Vector3::ZERO );
   Vector3 cameraOffset( 0.0f, 100.0f, 100.0f );
index c5bfa87..00c28fd 100644 (file)
@@ -53,7 +53,7 @@ namespace {
 
 int UtcConnectionTrackerConstructorP(void)
 {
-  TestApplication app; // Create core for debug logging
+  TestApplication application; // Create core for debug logging
 
   ConnectionTracker tracker;
 
@@ -64,7 +64,7 @@ int UtcConnectionTrackerConstructorP(void)
 
 int UtcConnectionTrackerDestructorP(void)
 {
-  TestApplication app; // Create core for debug logging
+  TestApplication application; // Create core for debug logging
   // make sure the ConnectionTracker disconnects form a signal when it
   // gets deleted.
   TestButton* button = new TestButton(1);
@@ -84,7 +84,7 @@ int UtcConnectionTrackerDestructorP(void)
 
 int UtcConnectionTrackerDisconnectAllP(void)
 {
-  TestApplication app; // Create core for debug logging
+  TestApplication application; // Create core for debug logging
 
   TestButton* button = new TestButton(1);
   TestApp testApp;
@@ -103,7 +103,7 @@ int UtcConnectionTrackerDisconnectAllP(void)
 
 int UtcConnectionTrackerDisconnectAllN(void)
 {
-  TestApplication app; // Create core for debug logging
+  TestApplication application; // Create core for debug logging
   TestApp testApp;
   TestButton* button = new TestButton(1);
 
@@ -118,7 +118,7 @@ int UtcConnectionTrackerDisconnectAllN(void)
 
 int UtcConnectionTrackerSignalConnectedP(void)
 {
-  TestApplication app; // Create core for debug logging
+  TestApplication application; // Create core for debug logging
 
   TestButton* button = new TestButton(1);
   TestApp testApp;
@@ -133,7 +133,7 @@ int UtcConnectionTrackerSignalConnectedP(void)
 }
 int UtcConnectionTrackerSignalConnectedN(void)
 {
-  TestApplication app; // Create core for debug logging
+  TestApplication application; // Create core for debug logging
 
   TestButton* button = new TestButton(1);
   TestApp* testApp( NULL );
@@ -158,7 +158,7 @@ int UtcConnectionTrackerSignalConnectedN(void)
 
 int UtcConnectionTrackerSignalDisconnectP(void)
 {
-  TestApplication app; // Create core for debug logging
+  TestApplication application; // Create core for debug logging
 
   TestButton* button = new TestButton(1);
   TestApp testApp;
@@ -177,7 +177,7 @@ int UtcConnectionTrackerSignalDisconnectP(void)
 
 int UtcConnectionTrackerSignalDisconnectN(void)
 {
-  TestApplication app; // Create core for debug logging
+  TestApplication application; // Create core for debug logging
 
   TestButton* button = new TestButton(1);
   TestApp testApp;
@@ -187,7 +187,7 @@ int UtcConnectionTrackerSignalDisconnectN(void)
 
   try
   {
-    app.SignalDisconnected( NULL, NULL );
+    application.SignalDisconnected( NULL, NULL );
     tet_result( TET_FAIL );
   }
   catch (Dali::DaliException& e)
@@ -203,7 +203,7 @@ int UtcConnectionTrackerSignalDisconnectN(void)
 
 int UtcConnectionTrackerGetConnectionCountP(void)
 {
-  TestApplication app; // Create core for debug logging
+  TestApplication application; // Create core for debug logging
 
   TestButton* button = new TestButton(1);
   TestApp testApp;
@@ -217,7 +217,7 @@ int UtcConnectionTrackerGetConnectionCountP(void)
 
 int UtcConnectionTrackerGetConnectionCountN(void)
 {
-  TestApplication app; // Create core for debug logging
+  TestApplication application; // Create core for debug logging
 
   TestButton* button = new TestButton(1);
   DALI_TEST_CHECK( button->DownSignal().GetConnectionCount( ) == 0 );
index 30d5388..b413783 100644 (file)
@@ -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.
@@ -99,7 +99,7 @@ int UtcPathConstrainerApply(void)
   // Register a float property
   Property::Index index = actor.RegisterProperty( "t", 0.0f );
 
-  Dali::Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   //Create a Path
   Dali::Path path = Dali::Path::New();
@@ -161,7 +161,7 @@ int UtcPathConstrainerApplyRange(void)
 
   // Register a float property
   Property::Index index = actor.RegisterProperty( "t", 0.0f );
-  Dali::Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   //Create a Path
   Dali::Path path = Dali::Path::New();
@@ -239,7 +239,7 @@ int UtcPathConstrainerDestroy(void)
 
   // Register a float property
   Property::Index index = actor.RegisterProperty( "t", 0.0f );
-  Dali::Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   {
     //Create a Path
@@ -283,7 +283,7 @@ int UtcPathConstrainerRemove(void)
 
   // Register a float property
   Property::Index index = actor.RegisterProperty( "t", 0.0f );
-  Dali::Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   //Create a Path
   Dali::Path path = Dali::Path::New();
@@ -433,7 +433,7 @@ int UtcLinearConstrainerApply(void)
   // Register a float property
   Property::Index index = actor.RegisterProperty( "t", 0.0f );
 
-  Dali::Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
 
   //Create a LinearConstrainer without specifying progress for values
@@ -510,7 +510,7 @@ int UtcLinearConstrainerApplyRange(void)
 
   // Register a float property
   Property::Index index = actor.RegisterProperty( "t", 100.0f );
-  Dali::Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   //Create a LinearConstrainer
   Dali::LinearConstrainer linearConstrainer = Dali::LinearConstrainer::New();
@@ -559,7 +559,7 @@ int UtcLinearConstrainerDestroy(void)
 
   // Register a float property
   Property::Index index = actor.RegisterProperty( "t", 0.0f );
-  Dali::Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   {
     //Create a LinearConstrainer
@@ -597,7 +597,7 @@ int UtcLinearConstrainerRemove(void)
 
   // Register a float property
   Property::Index index = actor.RegisterProperty( "t", 0.0f );
-  Dali::Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   //Create a LinearConstrainer
   Dali::LinearConstrainer linearConstrainer = Dali::LinearConstrainer::New();
index 0b786c9..0bf072e 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.
@@ -121,7 +121,7 @@ int UtcDaliConstraintNewFunctionP(void)
   UtcDaliConstraintNewFunction::gConstraintFunctionCalled = false;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   application.SendNotification();
   application.Render();
@@ -174,7 +174,7 @@ int UtcDaliConstraintNewFunctionNonConstrainableTypeN(void)
   UtcDaliConstraintNewFunction::gConstraintFunctionCalled = false;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   application.SendNotification();
   application.Render();
@@ -211,7 +211,7 @@ int UtcDaliConstraintNewFunctorP(void)
   bool functorCalled = false;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   application.SendNotification();
   application.Render();
@@ -294,7 +294,7 @@ int UtcDaliConstraintNewFunctorMemberP(void)
   bool sizeFunctorCalled = false;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   application.SendNotification();
   application.Render();
@@ -375,7 +375,7 @@ int UtcDaliConstraintCloneP(void)
   Actor actor = Actor::New();
   Actor clone = Actor::New();
 
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
   stage.Add( actor );
   stage.Add( clone );
 
@@ -472,7 +472,7 @@ int UtcDaliConstraintCloneCheckSourcesAndSetters(void)
   Actor actor = Actor::New();
   Actor clone = Actor::New();
 
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
   stage.Add( actor );
   stage.Add( clone );
 
@@ -513,7 +513,7 @@ int UtcDaliConstraintCopyAndAssignment(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   Constraint constraint = Constraint::New< Vector3 >( actor, Actor::Property::POSITION, &BasicFunction< Vector3 > );
   Constraint copied( constraint );
@@ -761,7 +761,7 @@ int UtcDaliConstraintBakeRemoveAction(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   application.SendNotification();
   application.Render();
@@ -798,7 +798,7 @@ int UtcDaliConstraintDiscardRemoveAction(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   application.SendNotification();
   application.Render();
@@ -846,7 +846,7 @@ int UtcDaliConstraintApplyRemove(void)
   bool functorCalled = false;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   application.SendNotification();
   application.Render();
@@ -904,7 +904,7 @@ int UtcDaliConstraintApplyBeforeAddedToStage(void)
   DALI_TEST_EQUALS( functorCalled, false, TEST_LOCATION );
 
   // Add actor to stage
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   application.SendNotification();
   application.Render();
@@ -938,7 +938,7 @@ int UtcDaliConstraintApplyAndRemoveBeforeAddedToStage(void)
   constraint.Remove();
 
   // Add actor to stage
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   application.SendNotification();
   application.Render();
@@ -959,7 +959,7 @@ int UtcDaliConstraintApplyActorStagedUnstaged(void)
 
   // Create an actor and add to stage
   Actor actor = Actor::New();
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
   stage.Add( actor );
 
   // Create a constraint and apply
@@ -1006,7 +1006,7 @@ int UtcDaliConstraintApplySeveralTimes(void)
 
   // Create an actor and add to stage
   Actor actor = Actor::New();
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
   stage.Add( actor );
 
   // Create a constraint and apply
@@ -1073,7 +1073,7 @@ int UtcDaliConstraintAddSourceP(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   // Create a constraint, add sources
   Constraint constraint = Constraint::New< Vector3 >( actor, Actor::Property::POSITION, &UtcDaliConstraintAddSource::Function );
@@ -1166,7 +1166,7 @@ int UtcDaliConstraintChaining(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   Constraint constraint1 = Constraint::New< Vector3 >( actor, Actor::Property::POSITION, &TestChaining::Function1 );
   Constraint constraint2 = Constraint::New< Vector3 >( actor, Actor::Property::POSITION, &TestChaining::Function2 );
@@ -1199,7 +1199,7 @@ void Execute( T value )
   Actor actor = Actor::New();
   Property::Index index = actor.RegisterProperty( "TEMP_PROPERTY_NAME", value );
 
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   application.SendNotification();
   application.Render();
@@ -1253,7 +1253,7 @@ int UtcDaliConstraintEnsureResetterAppliedOnStageRemoval(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   // Check initial value is fully opaque
   application.SendNotification();
@@ -1286,7 +1286,7 @@ int UtcDaliConstraintEnsureResetterAppliedOnStageRemoval(void)
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 1.0f, TEST_LOCATION );
 
   // Add the actor back to the stage and check the value, it should be fully opaque again
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   // Check value when back on-stage, it should be fully opaque as the constraint is no longer applied to it.
   application.SendNotification();
@@ -1308,7 +1308,7 @@ int UtcDaliConstraintOnActorAddedAndRemoved(void)
   TestApplication application;
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   // Check initial value is fully opaque
   application.SendNotification();
@@ -1344,7 +1344,7 @@ int UtcDaliConstraintOnActorAddedAndRemoved(void)
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 1.0f, TEST_LOCATION );
 
   // Add the actor back to the stage and check the value, the constraint should have been re-applied
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
   application.SendNotification();
   application.Render();
   DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.5f, TEST_LOCATION );
index fd63707..711e4cf 100644 (file)
@@ -95,7 +95,7 @@ int UtcDaliContextVertexAttribImageRendering(void)
 
   // create a test bitmap actor
   Actor actor(CreateBitmapActor());
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
 
   application.SendNotification();
index b0dbc73..decec42 100644 (file)
@@ -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.
@@ -122,12 +122,12 @@ int UtcDaliCustomActorOnStageConnectionDisconnection(void)
   DALI_TEST_EQUALS( 0, (int)(custom.GetMethodsCalled().size()), TEST_LOCATION );
 
   // add the custom actor to stage
-  Stage::GetCurrent().Add( custom );
+  application.GetScene().Add( custom );
 
   DALI_TEST_EQUALS( 1, (int)(custom.GetMethodsCalled().size()), TEST_LOCATION );
   DALI_TEST_EQUALS( "OnStageConnection", custom.GetMethodsCalled()[ 0 ], TEST_LOCATION );
 
-  Stage::GetCurrent().Remove( custom );
+  application.GetScene().Remove( custom );
 
   DALI_TEST_EQUALS( 2, (int)(custom.GetMethodsCalled().size()), TEST_LOCATION );
   DALI_TEST_EQUALS( "OnStageDisconnection", custom.GetMethodsCalled()[ 1 ], TEST_LOCATION );
@@ -182,7 +182,7 @@ int UtcDaliCustomActorOnStageConnectionOrder(void)
   actorC.Add( actorF );
 
   // add the custom actor to stage
-  Stage::GetCurrent().Add( actorA );
+  application.GetScene().Add( actorA );
 
   DALI_TEST_EQUALS( 4, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION );
   DALI_TEST_EQUALS( "OnPropertySet",     actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION );
@@ -250,7 +250,7 @@ int UtcDaliCustomActorOnStageDisconnectionOrder(void)
   TestApplication application;
   tet_infoline("Testing Dali::CustomActor::OnStageDisconnection() order");
 
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
 
   /* Build tree of actors:
    *
@@ -346,7 +346,7 @@ int UtcDaliCustomActorAddDuringOnStageConnection(void)
   TestApplication application;
   tet_infoline("Testing Actor::Add behaviour during Dali::CustomActor::OnStageConnection() callback");
 
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
 
   MasterCallStack.clear();
 
@@ -400,7 +400,7 @@ int UtcDaliCustomActorRemoveDuringOnStageConnection(void)
   TestApplication application;
   tet_infoline("Testing Actor::Remove behaviour during Dali::CustomActor::OnStageConnection() callback");
 
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
 
   MasterCallStack.clear();
 
@@ -468,7 +468,7 @@ int UtcDaliCustomActorAddDuringOnStageDisconnection(void)
   TestApplication application;
   tet_infoline("Testing Actor::Add behaviour during Dali::CustomActor::OnStageDisonnection() callback");
 
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
 
   /* The actorA is a special variant which adds a child to itself during OnStageDisconnection()
    * The actorB is provided as the child
@@ -521,7 +521,7 @@ int UtcDaliCustomActorRemoveDuringOnStageDisconnection(void)
   TestApplication application;
   tet_infoline("Testing Actor::Remove behaviour during Dali::CustomActor::OnStageDisconnection() callback");
 
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
 
   /* The actorA is a special variant which removes its children during OnStageDisconnection()
    * The actorB is provided as the child
@@ -576,7 +576,7 @@ int UtcDaliCustomActorRemoveParentDuringOnStageConnection(void)
   TestApplication application;
   tet_infoline("Weird test where child removes its own parent from Stage during Dali::CustomActor::OnStageConnection() callback");
 
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
 
   MasterCallStack.clear();
 
@@ -628,7 +628,7 @@ int UtcDaliCustomActorAddParentDuringOnStageDisconnection(void)
   TestApplication application;
   tet_infoline("Weird test where child adds its own parent to Stage during Dali::CustomActor::OnStageDisconnection() callback");
 
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
 
   MasterCallStack.clear();
 
@@ -703,7 +703,7 @@ int UtcDaliCustomActorReparentDuringOnChildAdd(void)
   TestApplication application;
   tet_infoline("Testing Actor:Add (reparenting) behaviour during Dali::CustomActor::OnChildAdd() callback");
 
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
 
   MasterCallStack.clear();
 
@@ -790,7 +790,7 @@ int UtcDaliCustomActorRemoveDuringOnChildRemove(void)
   TestApplication application;
   tet_infoline("Testing Actor:Remove behaviour during OnChildRemove() callback triggered when reparenting");
 
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
 
   MasterCallStack.clear();
 
@@ -972,7 +972,7 @@ int UtcDaliCustomActorOnTouchEvent(void)
   // set size for custom actor
   custom.SetProperty( Actor::Property::SIZE, Vector2( 100, 100 ) );
   // add the custom actor to stage
-  Stage::GetCurrent().Add( custom );
+  application.GetScene().Add( custom );
   custom.ResetCallStack();
 
   // Render and notify a couple of times
@@ -1005,7 +1005,7 @@ int UtcDaliCustomActorOnHoverEvent(void)
   // set size for custom actor
   custom.SetProperty( Actor::Property::SIZE, Vector2( 100, 100 ) );
   // add the custom actor to stage
-  Stage::GetCurrent().Add( custom );
+  application.GetScene().Add( custom );
   custom.ResetCallStack();
 
   // Render and notify a couple of times
@@ -1038,7 +1038,7 @@ int UtcDaliCustomActorOnWheelEvent(void)
   // set size for custom actor
   custom.SetProperty( Actor::Property::SIZE, Vector2( 100, 100 ) );
   // add the custom actor to stage
-  Stage::GetCurrent().Add( custom );
+  application.GetScene().Add( custom );
   custom.ResetCallStack();
 
   // Render and notify a couple of times
@@ -1145,7 +1145,7 @@ int UtcDaliCustomActorImplRelayoutRequest(void)
   DALI_TEST_CHECK( gOnRelayout == false );
 
   Test::TestCustomActor custom = Test::TestCustomActor::NewNegoSize();
-  Stage::GetCurrent().Add(custom);
+  application.GetScene().Add(custom);
 
   application.SendNotification();
   application.Render();
@@ -1281,7 +1281,7 @@ int UtcDaliCustomActorOnConnectionDepth(void)
   TestApplication application;
   tet_infoline("Testing Dali::CustomActor::OnStageConnection() hierarchy depth");
 
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
 
   /* Build tree of actors:
    *
@@ -1335,7 +1335,7 @@ int UtcDaliCustomActorSetGetProperty(void)
   TestApplication application; // Need the type registry
 
   Test::TestCustomActor actor = Test::TestCustomActor::New();
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   actor.SetProperty( Test::TestCustomActor::Property::TEST_PROPERTY1, 0.5f );
   actor.SetProperty( Test::TestCustomActor::Property::TEST_PROPERTY2, Color::WHITE );
@@ -1479,7 +1479,7 @@ int UtcDaliCustomActorSetGetActorPropertyActionSignal(void)
   TestApplication application; // Need the type registry
 
   auto custom = UnregisteredCustomActor::New();
-  Stage::GetCurrent().Add( custom );
+  application.GetScene().Add( custom );
 
   // should have all actor properties
   DALI_TEST_EQUALS( custom.GetPropertyType( Actor::Property::COLOR ), Property::VECTOR4, TEST_LOCATION );
@@ -1518,8 +1518,8 @@ int UtcDaliCustomActorSetGetActorPropertyActionSignal(void)
         DALI_TEST_EQUALS( weakRef.GetHandle().GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ), false, TEST_LOCATION );
       } );
 
-  Stage::GetCurrent().Remove( custom );
-  Stage::GetCurrent().Add( custom );
+  application.GetScene().Remove( custom );
+  application.GetScene().Add( custom );
 
   END_TEST;
 }
@@ -1562,7 +1562,7 @@ int UtcDaliCustomActorPropertyRegistrationDefaultValue(void)
   Dali::TypeRegistration typeRegistration( typeid( UnregisteredCustomActor ), typeid( Dali::CustomActor ), nullptr );
 
   auto derived = DerivedCustomActor::New();
-  Stage::GetCurrent().Add( derived );
+  application.GetScene().Add( derived );
 
   // should have all actor properties
   DALI_TEST_EQUALS( derived.GetPropertyType( Actor::Property::WORLD_MATRIX ), Property::MATRIX, TEST_LOCATION );
index ab99c59..dfd1f39 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -142,7 +142,7 @@ int UtcDaliGeometryAddVertexBuffer(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE,Vector3::ONE * 100.f);
   actor.AddRenderer(renderer);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   application.SendNotification();
   application.Render(0);
@@ -220,7 +220,7 @@ int UtcDaliGeometryRemoveVertexBuffer(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE,Vector3::ONE * 100.f);
   actor.AddRenderer(renderer);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   DALI_TEST_EQUALS( geometry.GetNumberOfVertexBuffers(), 1u, TEST_LOCATION );
 
@@ -253,7 +253,7 @@ int UtcDaliGeometrySetIndexBuffer(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE,Vector3::ONE * 100.f);
   actor.AddRenderer(renderer);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   application.SendNotification();
   application.Render(0);
@@ -311,7 +311,7 @@ int UtcDaliGeometrySetGetGeometryType01(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE,Vector3::ONE * 100.f);
   actor.AddRenderer(renderer);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
   TraceCallStack& drawTrace = glAbstraction.GetDrawTrace();
@@ -443,7 +443,7 @@ int UtcDaliGeometrySetGetGeometryType02(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE,Vector3::ONE * 100.f);
   actor.AddRenderer(renderer);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
   TraceCallStack& drawTrace = glAbstraction.GetDrawTrace();
index 65e0777..d6a6e49 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.
@@ -195,7 +195,7 @@ int UtcDaliHandleGetPropertyIndex02(void)
   tet_infoline("Positive Test Dali::Handle::GetPropertyIndex() int key");
   TestApplication application;
 
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
 
   Actor actor = Actor::New();
   stage.Add( actor );
@@ -645,7 +645,7 @@ int UtcDaliHandleRegisterProperty01(void)
   tet_infoline("Positive Test Dali::Handle::RegisterProperty()");
   TestApplication application;
 
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
 
   Actor actor = Actor::New();
   stage.Add( actor );
@@ -682,7 +682,7 @@ int UtcDaliHandleRegisterProperty02(void)
   tet_infoline("Positive Test Dali::Handle::RegisterProperty() int key");
   TestApplication application;
 
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
 
   Actor actor = Actor::New();
   stage.Add( actor );
@@ -1363,7 +1363,7 @@ int UtcDaliHandleCustomPropertySynchronousGetSet(void)
   tet_infoline( "Create a custom property and set the value ensuring it can be retrieved synchronously" );
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   tet_infoline( "Create the custom property with an initial value" );
   float startValue(1.0f);
@@ -1427,7 +1427,7 @@ int UtcDaliHandleGetCurrentProperty(void)
   tet_infoline( "Get a default and non-animatable custom property using the GetCurrentProperty API" );
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
   DALI_TEST_EQUALS( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), true, TEST_LOCATION );
 
   Property::Index index = actor.RegisterProperty( "testProperty3", 1.0f, Property::READ_WRITE );
@@ -1493,7 +1493,7 @@ int UtcDaliHandleDoesCustomPropertyExistN3(void)
   ChildPropertyRegistration( customActorTypeInfo.GetName(), CHILD_PROPERTY_NAME, CHILD_PROPERTY, Property::INTEGER );
 
   auto container = Test::TestCustomActor::New();
-  Stage::GetCurrent().Add( container );
+  application.GetScene().Add( container );
   auto child = Actor::New();
   container.Add( child ); // Resolve child properties (if any)
 
@@ -1516,7 +1516,7 @@ int UtcDaliHandleDoesCustomPropertyExistP2(void)
   ChildPropertyRegistration( customActorTypeInfo.GetName(), CHILD_PROPERTY_NAME, CHILD_PROPERTY, Property::INTEGER );
 
   auto container = Test::TestCustomActor::New();
-  Stage::GetCurrent().Add( container );
+  application.GetScene().Add( container );
   auto child = Actor::New();
   container.Add( child ); // Resolve child properties (if any)
   child.SetProperty( CHILD_PROPERTY, 2 );
@@ -1541,7 +1541,7 @@ int UtcDaliHandleDoesCustomPropertyExistP3(void)
   ChildPropertyRegistration( customActorTypeInfo.GetName(), CHILD_PROPERTY_NAME, CHILD_PROPERTY, Property::INTEGER );
 
   auto container = Test::TestCustomActor::New();
-  Stage::GetCurrent().Add( container );
+  application.GetScene().Add( container );
   auto child = Actor::New();
   child.RegisterProperty( CHILD_PROPERTY_NAME, Property::Value(3) );
   container.Add( child ); // Resolve child properties (if any)
@@ -1594,7 +1594,7 @@ struct PropertySetSignalCheck
 
 int UtcDaliHandlePropertySetSignal01(void)
 {
-  TestApplication app;
+  TestApplication application;
 
   bool signalReceived(false);
   Property::Value value;
@@ -1603,7 +1603,7 @@ int UtcDaliHandlePropertySetSignal01(void)
   tet_infoline( "Test that setting a default property triggers a signal" );
 
   auto actor = Actor::New();
-  DevelHandle::PropertySetSignal(actor).Connect(&app, propertySetCheck);
+  DevelHandle::PropertySetSignal(actor).Connect(&application, propertySetCheck);
 
   actor.SetProperty( Actor::Property::POSITION, Vector3::XAXIS );
   propertySetCheck.CheckSignalReceived();
@@ -1614,7 +1614,7 @@ int UtcDaliHandlePropertySetSignal01(void)
 
 int UtcDaliHandlePropertySetSignal02(void)
 {
-  TestApplication app;
+  TestApplication application;
 
   bool signalReceived(false);
   Property::Value value;
@@ -1623,7 +1623,7 @@ int UtcDaliHandlePropertySetSignal02(void)
   tet_infoline( "Test that setting a custom property triggers a signal" );
 
   auto actor = Actor::New();
-  DevelHandle::PropertySetSignal(actor).Connect(&app, propertySetCheck);
+  DevelHandle::PropertySetSignal(actor).Connect(&application, propertySetCheck);
 
   auto propertyIndex = actor.RegisterProperty("propName", 3.0f);
   actor.SetProperty( propertyIndex, 5.0f );
@@ -1635,7 +1635,7 @@ int UtcDaliHandlePropertySetSignal02(void)
 
 int UtcDaliHandlePropertySetSignal03(void)
 {
-  TestApplication app;
+  TestApplication application;
   TypeRegistry typeRegistry = TypeRegistry::Get();
 
   bool signalReceived(false);
@@ -1652,10 +1652,10 @@ int UtcDaliHandlePropertySetSignal03(void)
   ChildPropertyRegistration( customActorTypeInfo.GetName(), CHILD_PROPERTY_NAME, CHILD_PROPERTY, Property::INTEGER );
 
   auto container = Test::TestCustomActor::New();
-  Stage::GetCurrent().Add( container );
+  application.GetScene().Add( container );
   auto child = Actor::New();
   child.RegisterProperty( CHILD_PROPERTY_NAME, Property::Value(3) );
-  DevelHandle::PropertySetSignal(child).Connect(&app, propertySetCheck);
+  DevelHandle::PropertySetSignal(child).Connect(&application, propertySetCheck);
   container.Add( child ); // Resolve child properties (if any)
 
   DALI_TEST_EQUALS( DevelHandle::DoesCustomPropertyExist( child, CHILD_PROPERTY ), true, TEST_LOCATION );
index cd35e20..f1f6200 100644 (file)
@@ -138,7 +138,7 @@ int UtcDaliHoverNormalProcessing(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -201,7 +201,7 @@ int UtcDaliHoverOutsideCameraNearFarPlanes(void)
 {
   TestApplication application;
 
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
   Vector2 stageSize = stage.GetSize();
 
   Actor actor = Actor::New();
@@ -308,7 +308,7 @@ int UtcDaliHoverInterrupted(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -340,12 +340,12 @@ int UtcDaliHoverInterrupted(void)
 int UtcDaliHoverParentConsumer(void)
 {
   TestApplication application;
-  Actor rootActor( Stage::GetCurrent().GetRootLayer() );
+  Actor rootActor( application.GetScene().GetRootLayer() );
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -440,12 +440,12 @@ int UtcDaliHoverParentConsumer(void)
 int UtcDaliHoverInterruptedParentConsumer(void)
 {
   TestApplication application;
-  Actor rootActor( Stage::GetCurrent().GetRootLayer() );
+  Actor rootActor( application.GetScene().GetRootLayer() );
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -493,7 +493,7 @@ int UtcDaliHoverInterruptedParentConsumer(void)
   rootData.Reset();
 
   // Remove actor from Stage
-  Stage::GetCurrent().Remove( actor );
+  application.GetScene().Remove( actor );
 
   // Render and notify
   application.SendNotification();
@@ -522,7 +522,7 @@ int UtcDaliHoverLeave(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -572,12 +572,12 @@ int UtcDaliHoverLeave(void)
 int UtcDaliHoverLeaveParentConsumer(void)
 {
   TestApplication application;
-  Actor rootActor( Stage::GetCurrent().GetRootLayer() );
+  Actor rootActor( application.GetScene().GetRootLayer() );
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -643,7 +643,7 @@ int UtcDaliHoverLeaveParentConsumer(void)
   actor.SetProperty( Actor::Property::LEAVE_REQUIRED, false );
 
   // Another motion event outside of root actor, only root signalled
-  Vector2 stageSize( Stage::GetCurrent().GetSize() );
+  Vector2 stageSize( application.GetScene().GetSize() );
   application.ProcessEvent( GenerateSingleHover( TouchPoint::Motion, Vector2 ( stageSize.width + 10.0f, stageSize.height + 10.0f )) );
   DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
   DALI_TEST_EQUALS( true, rootData.functorCalled, TEST_LOCATION );
@@ -658,7 +658,7 @@ int UtcDaliHoverActorBecomesInsensitive(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -689,12 +689,12 @@ int UtcDaliHoverActorBecomesInsensitive(void)
 int UtcDaliHoverActorBecomesInsensitiveParentConsumer(void)
 {
   TestApplication application;
-  Actor rootActor( Stage::GetCurrent().GetRootLayer() );
+  Actor rootActor( application.GetScene().GetRootLayer() );
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -722,7 +722,7 @@ int UtcDaliHoverActorBecomesInsensitiveParentConsumer(void)
   rootData.Reset();
 
   // Remove actor from Stage
-  Stage::GetCurrent().Remove( actor );
+  application.GetScene().Remove( actor );
 
   // Render and notify
   application.SendNotification();
@@ -742,7 +742,7 @@ int UtcDaliHoverActorBecomesInsensitiveParentConsumer(void)
 int UtcDaliHoverMultipleLayers(void)
 {
   TestApplication application;
-  Actor rootActor( Stage::GetCurrent().GetRootLayer() );
+  Actor rootActor( application.GetScene().GetRootLayer() );
 
   // Connect to actor's hovered signal
   SignalData data;
@@ -751,7 +751,7 @@ int UtcDaliHoverMultipleLayers(void)
   Layer layer1 ( Layer::New() );
   layer1.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   layer1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add( layer1 );
+  application.GetScene().Add( layer1 );
 
   Actor actor1 ( Actor::New() );
   actor1.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
@@ -800,7 +800,7 @@ int UtcDaliHoverMultipleLayers(void)
   layer2.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   layer2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
   layer2.SetProperty( Actor::Property::POSITION_Z,  10.0f ); // Should hit layer2 in this layer rather than actor2
-  Stage::GetCurrent().Add( layer2 );
+  application.GetScene().Add( layer2 );
 
   Actor actor2 ( Actor::New() );
   actor2.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
@@ -861,7 +861,7 @@ int UtcDaliHoverMultipleLayers(void)
 int UtcDaliHoverMultipleRenderTasks(void)
 {
   TestApplication application;
-  Stage stage ( Stage::GetCurrent() );
+  Integration::Scene stage ( application.GetScene() );
   Vector2 stageSize ( stage.GetSize() );
 
   Actor actor = Actor::New();
@@ -871,7 +871,7 @@ int UtcDaliHoverMultipleRenderTasks(void)
 
   // Create render task
   Viewport viewport( stageSize.width * 0.5f, stageSize.height * 0.5f, stageSize.width * 0.5f, stageSize.height * 0.5f );
-  RenderTask renderTask ( Stage::GetCurrent().GetRenderTaskList().CreateTask() );
+  RenderTask renderTask ( application.GetScene().GetRenderTaskList().CreateTask() );
   renderTask.SetViewport( viewport );
   renderTask.SetInputEnabled( true );
 
@@ -905,7 +905,7 @@ int UtcDaliHoverMultipleRenderTasks(void)
 int UtcDaliHoverMultipleRenderTasksWithChildLayer(void)
 {
   TestApplication application;
-  Stage stage ( Stage::GetCurrent() );
+  Integration::Scene stage ( application.GetScene() );
   Vector2 stageSize ( stage.GetSize() );
 
   Actor actor = Actor::New();
@@ -920,7 +920,7 @@ int UtcDaliHoverMultipleRenderTasksWithChildLayer(void)
 
   // Create render task
   Viewport viewport( stageSize.width * 0.5f, stageSize.height * 0.5f, stageSize.width * 0.5f, stageSize.height * 0.5f );
-  RenderTask renderTask ( Stage::GetCurrent().GetRenderTaskList().CreateTask() );
+  RenderTask renderTask ( application.GetScene().GetRenderTaskList().CreateTask() );
   renderTask.SetViewport( viewport );
   renderTask.SetInputEnabled( true );
   renderTask.SetSourceActor( actor );
@@ -956,7 +956,7 @@ int UtcDaliHoverMultipleRenderTasksWithChildLayer(void)
 int UtcDaliHoverOffscreenRenderTasks(void)
 {
   TestApplication application;
-  Stage stage ( Stage::GetCurrent() );
+  Integration::Scene stage ( application.GetScene() );
   Vector2 stageSize ( stage.GetSize() );
 
   // FrameBufferImage for offscreen RenderTask
@@ -1006,7 +1006,7 @@ int UtcDaliHoverOffscreenRenderTasks(void)
 int UtcDaliHoverMultipleRenderableActors(void)
 {
   TestApplication application;
-  Stage stage ( Stage::GetCurrent() );
+  Integration::Scene stage ( application.GetScene() );
   Vector2 stageSize ( stage.GetSize() );
 
   Actor parent = CreateRenderableActor();
@@ -1043,7 +1043,7 @@ int UtcDaliHoverActorRemovedInSignal(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -1063,7 +1063,7 @@ int UtcDaliHoverActorRemovedInSignal(void)
   data.Reset();
 
   // Re-add, render and notify
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   application.SendNotification();
   application.Render();
 
@@ -1087,7 +1087,7 @@ int UtcDaliHoverActorRemovedInSignal(void)
   data.Reset();
 
   // Re-add actor back to stage, render and notify
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   application.SendNotification();
   application.Render();
 
@@ -1112,7 +1112,7 @@ int UtcDaliHoverActorSignalNotConsumed(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -1136,7 +1136,7 @@ int UtcDaliHoverActorUnStaged(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -1153,7 +1153,7 @@ int UtcDaliHoverActorUnStaged(void)
   data.Reset();
 
   // Remove actor from stage
-  Stage::GetCurrent().Remove( actor );
+  application.GetScene().Remove( actor );
 
   // Render and notify
   application.SendNotification();
@@ -1169,7 +1169,7 @@ int UtcDaliHoverActorUnStaged(void)
 int UtcDaliHoverLeaveActorReadded(void)
 {
   TestApplication application;
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
@@ -1215,7 +1215,7 @@ int UtcDaliHoverLeaveActorReadded(void)
 int UtcDaliHoverClippingActor(void)
 {
   TestApplication application;
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
old mode 100755 (executable)
new mode 100644 (file)
index bdc7d4a..68703a5
@@ -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.
index 3225695..6ab1dc1 100644 (file)
@@ -88,16 +88,16 @@ int UtcDaliLayerGetDepth(void)
   Layer layer1 = Layer::New();
   Layer layer2 = Layer::New();
 
-  // layers are not on stage
+  // layers are not on scene
   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 );
+  Layer root = application.GetScene().GetLayer( 0 );
   DALI_TEST_EQUALS(root.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION);
 
-  Stage::GetCurrent().Add(layer1);
-  Stage::GetCurrent().Add(layer2);
+  application.GetScene().Add(layer1);
+  application.GetScene().Add(layer2);
 
   DALI_TEST_EQUALS(  root.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION);
   DALI_TEST_EQUALS(layer1.GetProperty< int >( Layer::Property::DEPTH ), 1u, TEST_LOCATION);
@@ -112,15 +112,15 @@ int UtcDaliLayerRaise(void)
   Layer layer1 = Layer::New();
   Layer layer2 = Layer::New();
 
-  Stage::GetCurrent().Add(layer1);
-  Stage::GetCurrent().Add(layer2);
+  application.GetScene().Add(layer1);
+  application.GetScene().Add(layer2);
   DALI_TEST_EQUALS(layer1.GetProperty< int >( Layer::Property::DEPTH ), 1u, TEST_LOCATION);
 
   layer1.Raise();
   DALI_TEST_EQUALS(layer1.GetProperty< int >( Layer::Property::DEPTH ), 2u, TEST_LOCATION);
 
   // get root
-  Layer root = Stage::GetCurrent().GetLayer( 0 );
+  Layer root = application.GetScene().GetLayer( 0 );
   DALI_TEST_EQUALS(  root.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION);
   root.Raise();
   DALI_TEST_EQUALS(  root.GetProperty< int >( Layer::Property::DEPTH ), 1u, TEST_LOCATION);
@@ -136,15 +136,15 @@ int UtcDaliLayerLower(void)
   Layer layer1 = Layer::New();
   Layer layer2 = Layer::New();
 
-  Stage::GetCurrent().Add(layer1);
-  Stage::GetCurrent().Add(layer2);
+  application.GetScene().Add(layer1);
+  application.GetScene().Add(layer2);
   DALI_TEST_EQUALS(layer2.GetProperty< int >( Layer::Property::DEPTH ), 2u, TEST_LOCATION);
 
   layer2.Lower();
   DALI_TEST_EQUALS(layer2.GetProperty< int >( Layer::Property::DEPTH ), 1u, TEST_LOCATION);
 
   // get root
-  Layer root = Stage::GetCurrent().GetLayer( 0 );
+  Layer root = application.GetScene().GetLayer( 0 );
   root.Lower();
   DALI_TEST_EQUALS(  root.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION);
   layer2.Lower();
@@ -161,10 +161,10 @@ int UtcDaliLayerRaiseToTop(void)
   Layer layer2 = Layer::New();
   Layer layer3 = Layer::New();
 
-  Stage::GetCurrent().Add(layer1);
-  Stage::GetCurrent().Add(layer2);
-  Stage::GetCurrent().Add(layer3);
-  Layer root = Stage::GetCurrent().GetLayer( 0 );
+  application.GetScene().Add(layer1);
+  application.GetScene().Add(layer2);
+  application.GetScene().Add(layer3);
+  Layer root = application.GetScene().GetLayer( 0 );
 
   DALI_TEST_EQUALS(  root.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION);
   DALI_TEST_EQUALS(layer1.GetProperty< int >( Layer::Property::DEPTH ), 1u, TEST_LOCATION);
@@ -187,9 +187,9 @@ int UtcDaliLayerLowerToBottom(void)
   Layer layer2 = Layer::New();
   Layer layer3 = Layer::New();
 
-  Stage::GetCurrent().Add(layer1);
-  Stage::GetCurrent().Add(layer2);
-  Stage::GetCurrent().Add(layer3);
+  application.GetScene().Add(layer1);
+  application.GetScene().Add(layer2);
+  application.GetScene().Add(layer3);
 
   DALI_TEST_EQUALS(layer1.GetProperty< int >( Layer::Property::DEPTH ), 1u, TEST_LOCATION);
   DALI_TEST_EQUALS(layer2.GetProperty< int >( Layer::Property::DEPTH ), 2u, TEST_LOCATION);
@@ -268,11 +268,11 @@ int UtcDaliLayerSetSortFunction(void)
   actor2.SetProperty( Actor::Property::SIZE, Vector2( 1, 1 ) );
   actor2.SetProperty( Actor::Property::COLOR, Vector4(1, 1, 1, 0.5f ) ); // 50% transparent
 
-  // add to stage
-  Stage::GetCurrent().Add( actor );
-  Stage::GetCurrent().Add( actor2 );
+  // add to scene
+  application.GetScene().Add( actor );
+  application.GetScene().Add( actor2 );
 
-  Layer root = Stage::GetCurrent().GetLayer( 0 );
+  Layer root = application.GetScene().GetLayer( 0 );
   gTestSortFunctionCalled = 0;
   root.SetSortFunction(TestSortFunction);
 
@@ -291,12 +291,12 @@ int UtcDaliLayerRaiseAbove(void)
   TestApplication application;
   Layer layer = Layer::New();
   // try to raise above root layer
-  Layer root = Stage::GetCurrent().GetLayer( 0 );
+  Layer root = application.GetScene().GetLayer( 0 );
   layer.RaiseAbove( root );
-  // layer depth is zero as its not on stage
+  // layer depth is zero as its not on scene
   DALI_TEST_EQUALS( layer.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION );
-  // add to stage
-  Stage::GetCurrent().Add( layer );
+  // add to scene
+  application.GetScene().Add( layer );
   layer.RaiseAbove( root );
   DALI_TEST_EQUALS( layer.GetProperty< int >( Layer::Property::DEPTH ), 1u, TEST_LOCATION );
   root.RaiseAbove( layer );
@@ -304,9 +304,9 @@ int UtcDaliLayerRaiseAbove(void)
   layer.RaiseAbove( layer );
   DALI_TEST_EQUALS( layer.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION );
 
-  // make another layer on the stage
+  // make another layer on the scene
   Layer layer2 = Layer::New();
-  Stage::GetCurrent().Add( layer2 );
+  application.GetScene().Add( layer2 );
   layer.RaiseAbove( layer2 );
   DALI_TEST_GREATER( layer.GetProperty< int >( Layer::Property::DEPTH ), layer2.GetProperty< int >( Layer::Property::DEPTH ), TEST_LOCATION );
   layer2.RaiseAbove( layer );
@@ -322,12 +322,12 @@ int UtcDaliLayerRaiseBelow(void)
   TestApplication application;
   Layer layer = Layer::New();
   // try to lower below root layer
-  Layer root = Stage::GetCurrent().GetLayer( 0 );
+  Layer root = application.GetScene().GetLayer( 0 );
   layer.LowerBelow( root );
-  // layer depth is zero as its not on stage
+  // layer depth is zero as its not on scene
   DALI_TEST_EQUALS( layer.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION );
-  // add to stage
-  Stage::GetCurrent().Add( layer );
+  // add to scene
+  application.GetScene().Add( layer );
   DALI_TEST_EQUALS( layer.GetProperty< int >( Layer::Property::DEPTH ), 1u, TEST_LOCATION );
   layer.LowerBelow( root );
   DALI_TEST_EQUALS( layer.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION );
@@ -336,9 +336,9 @@ int UtcDaliLayerRaiseBelow(void)
   layer.LowerBelow( layer );
   DALI_TEST_EQUALS( layer.GetProperty< int >( Layer::Property::DEPTH ), 1u, TEST_LOCATION );
 
-  // make another layer on the stage
+  // make another layer on the scene
   Layer layer2 = Layer::New();
-  Stage::GetCurrent().Add( layer2 );
+  application.GetScene().Add( layer2 );
   layer.LowerBelow( layer2 );
   DALI_TEST_GREATER( layer2.GetProperty< int >( Layer::Property::DEPTH ), layer.GetProperty< int >( Layer::Property::DEPTH ), TEST_LOCATION );
   layer2.LowerBelow( layer );
@@ -354,15 +354,15 @@ int UtcDaliLayerMoveAbove(void)
   TestApplication application;
   Layer layer = Layer::New();
   // try to raise above root layer
-  Layer root = Stage::GetCurrent().GetLayer( 0 );
+  Layer root = application.GetScene().GetLayer( 0 );
   layer.MoveAbove( root );
-  // layer depth is zero as its not on stage
+  // layer depth is zero as its not on scene
   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
+  // root depth is zero as layer is not on scene
   DALI_TEST_EQUALS( layer.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION );
-  // add to stage
-  Stage::GetCurrent().Add( layer );
+  // add to scene
+  application.GetScene().Add( layer );
   layer.MoveAbove( root );
   DALI_TEST_EQUALS( layer.GetProperty< int >( Layer::Property::DEPTH ), 1u, TEST_LOCATION );
   DALI_TEST_EQUALS( root.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION );
@@ -370,9 +370,9 @@ int UtcDaliLayerMoveAbove(void)
   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
+  // make another layer on the scene
   Layer layer2 = Layer::New();
-  Stage::GetCurrent().Add( layer2 );
+  application.GetScene().Add( layer2 );
   layer.MoveAbove( layer2 );
   DALI_TEST_EQUALS( layer.GetProperty< int >( Layer::Property::DEPTH ), layer2.GetProperty< int >( Layer::Property::DEPTH ) + 1u, TEST_LOCATION );
   layer2.MoveAbove( root );
@@ -381,13 +381,13 @@ int UtcDaliLayerMoveAbove(void)
   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 );
+  application.GetScene().Add( layer3 );
   DALI_TEST_EQUALS( layer3.GetProperty< int >( Layer::Property::DEPTH ), 3u, TEST_LOCATION );
   root.MoveAbove( layer3 );
   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( application.GetScene().GetLayer( 0 ).GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION );
+  layer3.MoveAbove( application.GetScene().GetLayer( 0 ) );
   DALI_TEST_EQUALS( layer3.GetProperty< int >( Layer::Property::DEPTH ), 1u, TEST_LOCATION );
   END_TEST;
 }
@@ -398,15 +398,15 @@ int UtcDaliLayerMoveBelow(void)
   TestApplication application;
   Layer layer = Layer::New();
   // try to raise above root layer
-  Layer root = Stage::GetCurrent().GetLayer( 0 );
+  Layer root = application.GetScene().GetLayer( 0 );
   layer.MoveBelow( root );
-  // layer depth is zero as its not on stage
+  // layer depth is zero as its not on scene
   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
+  // root depth is zero as layer is not on scene
   DALI_TEST_EQUALS( layer.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION );
-  // add to stage
-  Stage::GetCurrent().Add( layer );
+  // add to scene
+  application.GetScene().Add( layer );
   layer.MoveBelow( root );
   DALI_TEST_EQUALS( layer.GetProperty< int >( Layer::Property::DEPTH ), 0u, TEST_LOCATION );
   DALI_TEST_EQUALS( root.GetProperty< int >( Layer::Property::DEPTH ), 1u, TEST_LOCATION );
@@ -414,9 +414,9 @@ int UtcDaliLayerMoveBelow(void)
   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
+  // make another layer on the scene
   Layer layer2 = Layer::New();
-  Stage::GetCurrent().Add( layer2 );
+  application.GetScene().Add( layer2 );
   layer.MoveBelow( layer2 );
   DALI_TEST_EQUALS( layer.GetProperty< int >( Layer::Property::DEPTH ), layer2.GetProperty< int >( Layer::Property::DEPTH ) - 1u, TEST_LOCATION );
   layer2.MoveBelow( root );
@@ -425,7 +425,7 @@ int UtcDaliLayerMoveBelow(void)
   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 );
+  application.GetScene().Add( layer3 );
   DALI_TEST_EQUALS( layer3.GetProperty< int >( Layer::Property::DEPTH ), 3u, TEST_LOCATION );
   root.MoveBelow( layer3 );
   DALI_TEST_EQUALS( root.GetProperty< int >( Layer::Property::DEPTH ), 2u, TEST_LOCATION );
@@ -559,24 +559,24 @@ int UtcDaliLayerClippingGLCalls(void)
 {
   TestApplication application;
   const TestGlAbstraction::ScissorParams& glScissorParams( application.GetGlAbstraction().GetScissorParams() );
-  Stage stage( Stage::GetCurrent() );
+  Integration::Scene scene( application.GetScene() );
 
   ClippingBox testBox( 5, 6, 77, 83 );
-  Layer layer = Stage::GetCurrent().GetRootLayer();
+  Layer layer = application.GetScene().GetRootLayer();
   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 );
   Actor actor = CreateRenderableActor( img );
-  stage.Add( actor );
+  scene.Add( actor );
 
   // flush the queue and render once
   application.SendNotification();
   application.Render();
 
   DALI_TEST_EQUALS( testBox.x, glScissorParams.x, TEST_LOCATION );
-  DALI_TEST_EQUALS( testBox.y, (int)(stage.GetSize().height - glScissorParams.y - testBox.height), TEST_LOCATION ); // GL Coordinates are from bottom left
+  DALI_TEST_EQUALS( testBox.y, (int)(scene.GetSize().height - glScissorParams.y - testBox.height), TEST_LOCATION ); // GL Coordinates are from bottom left
   DALI_TEST_EQUALS( testBox.width, glScissorParams.width, TEST_LOCATION );
   DALI_TEST_EQUALS( testBox.height, glScissorParams.height, TEST_LOCATION );
   END_TEST;
@@ -611,11 +611,11 @@ int UtcDaliLayer3DSort(void)
   TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
   TraceCallStack& enabledDisableTrace = glAbstraction.GetEnableDisableTrace();
 
-  Stage::GetCurrent().GetRootLayer().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
+  application.GetScene().GetRootLayer().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
 
   // Create an actor.
   Actor actor = CreateActor( false );
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   // Create child actors.
   Actor child1 = CreateActor( true );
index 2329c53..e0f68d5 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.
@@ -93,9 +93,10 @@ struct GestureReceivedFunctor
 // Functor that removes the gestured actor from stage
 struct UnstageActorFunctor : public GestureReceivedFunctor
 {
-  UnstageActorFunctor( SignalData& data, Gesture::State& stateToUnstage )
+  UnstageActorFunctor( SignalData& data, Gesture::State& stateToUnstage, Integration::Scene scene )
   : GestureReceivedFunctor( data ),
-    stateToUnstage( stateToUnstage )
+    stateToUnstage( stateToUnstage ),
+    scene( scene )
   {
   }
 
@@ -105,11 +106,12 @@ struct UnstageActorFunctor : public GestureReceivedFunctor
 
     if ( longPress.state == stateToUnstage )
     {
-      Stage::GetCurrent().Remove( actor );
+      scene.Remove( actor );
     }
   }
 
   Gesture::State& stateToUnstage;
+  Integration::Scene scene;
 };
 
 // Functor for receiving a touch event
@@ -198,7 +200,7 @@ int UtcDaliLongPressGestureDetectorNew(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -279,7 +281,7 @@ int UtcDaliLongPressGestureSignalReceptionNegative(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -307,7 +309,7 @@ int UtcDaliLongPressGestureSignalReceptionPositive(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -336,7 +338,7 @@ int UtcDaliLongPressGestureSignalReceptionDetach(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -391,7 +393,7 @@ int UtcDaliLongPressGestureSignalReceptionActorDestroyedDuringLongPress(void)
     Actor actor = Actor::New();
     actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
     actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-    Stage::GetCurrent().Add(actor);
+    application.GetScene().Add(actor);
 
     // Render and notify
     application.SendNotification();
@@ -404,7 +406,7 @@ int UtcDaliLongPressGestureSignalReceptionActorDestroyedDuringLongPress(void)
     DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
 
     // Remove the actor from stage and reset the data
-    Stage::GetCurrent().Remove(actor);
+    application.GetScene().Remove(actor);
 
     // Render and notify
     application.SendNotification();
@@ -426,7 +428,7 @@ int UtcDaliLongPressGestureSignalReceptionRotatedActor(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ORIENTATION, Quaternion( Dali::Degree(90.0f), Vector3::ZAXIS ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -479,7 +481,7 @@ int UtcDaliLongPressGestureSignalReceptionChildHit(void)
   Actor parent = Actor::New();
   parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(parent);
+  application.GetScene().Add(parent);
 
   // Set child to completely cover parent.
   // Change rotation of child to be different from parent so that we can check if our local coordinate
@@ -534,13 +536,13 @@ int UtcDaliLongPressGestureSignalReceptionAttachDetachMany(void)
   Actor first = Actor::New();
   first.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   first.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(first);
+  application.GetScene().Add(first);
 
   Actor second = Actor::New();
   second.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   second.SetProperty( Actor::Property::POSITION_X, 100.0f);
   second.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(second);
+  application.GetScene().Add(second);
 
   // Render and notify
   application.SendNotification();
@@ -591,7 +593,7 @@ int UtcDaliLongPressGestureSignalReceptionActorBecomesUntouchable(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -631,7 +633,7 @@ int UtcDaliLongPressGestureSignalReceptionMultipleDetectorsOnActor(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -665,7 +667,7 @@ int UtcDaliLongPressGestureSignalReceptionDifferentPossible(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -724,7 +726,7 @@ int UtcDaliLongPressGesturePossibleCancelled(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -752,7 +754,7 @@ int UtcDaliLongPressGestureDetachAfterStarted(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -786,7 +788,7 @@ int UtcDaliLongPressGestureActorUnstaged(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -797,7 +799,7 @@ int UtcDaliLongPressGestureActorUnstaged(void)
 
   // Attach actor to detector
   SignalData data;
-  UnstageActorFunctor functor( data, stateToUnstage );
+  UnstageActorFunctor functor( data, stateToUnstage, application.GetScene() );
   LongPressGestureDetector detector = LongPressGestureDetector::New();
   detector.Attach(actor);
   detector.DetectedSignal().Connect( &application, functor );
@@ -814,7 +816,7 @@ int UtcDaliLongPressGestureActorUnstaged(void)
   application.Render();
 
   // Re-add actor to stage
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -840,14 +842,14 @@ int UtcDaliLongPressGestureActorStagedAndDestroyed(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Create and add a second actor so that GestureDetector destruction does not come into play.
   Actor dummyActor( Actor::New() );
   dummyActor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   dummyActor.SetProperty( Actor::Property::POSITION, Vector2( 100.0f, 100.0f ));
   dummyActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(dummyActor);
+  application.GetScene().Add(dummyActor);
 
   // Render and notify
   application.SendNotification();
@@ -858,7 +860,7 @@ int UtcDaliLongPressGestureActorStagedAndDestroyed(void)
 
   // Attach actor to detector
   SignalData data;
-  UnstageActorFunctor functor( data, stateToUnstage );
+  UnstageActorFunctor functor( data, stateToUnstage, application.GetScene() );
   LongPressGestureDetector detector = LongPressGestureDetector::New();
   detector.Attach(actor);
   detector.Attach(dummyActor);
@@ -878,7 +880,7 @@ int UtcDaliLongPressGestureActorStagedAndDestroyed(void)
   application.Render();
 
   // Re add to the stage, we should not be signalled
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -920,7 +922,7 @@ int UtcDaliLongPressGestureLayerConsumesTouch(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Add a detector
   SignalData data;
@@ -933,7 +935,7 @@ int UtcDaliLongPressGestureLayerConsumesTouch(void)
   Layer layer = Layer::New();
   layer.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add( layer );
+  application.GetScene().Add( layer );
   layer.RaiseToTop();
 
   // Render and notify
@@ -974,7 +976,7 @@ int UtcDaliLongPressGestureSetMinimumHoldingTime(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   // Render and notify
   application.SendNotification();
index d623e28..eb90df5 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.
@@ -124,7 +124,7 @@ int UtcDaliLongPressGestureRecognizerBasicNoAction(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -156,7 +156,7 @@ int UtcDaliLongPressGestureRecognizerBasic(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -188,7 +188,7 @@ int UtcDaliLongPressGestureRecognizerTooShortWait(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -220,7 +220,7 @@ int UtcDaliLongPressGestureRecognizerTooFewPoints(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -253,7 +253,7 @@ int UtcDaliLongPressGestureRecognizerTooManyPoints(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -289,7 +289,7 @@ int UtcDaliLongPressGestureRecognizerMultiplePointsMoving(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -329,7 +329,7 @@ int UtcDaliLongPressGestureRecognizerMultiplePointsLongPress(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -363,13 +363,13 @@ int UtcDaliLongPressGestureRecognizerMultipleDetectors(void)
     Actor actor = Actor::New();
     actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
     actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-    Stage::GetCurrent().Add(actor);
+    application.GetScene().Add(actor);
 
     Actor actor2 = Actor::New();
     actor2.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
     actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
     actor2.SetProperty( Actor::Property::POSITION_X, 100.0f);
-    Stage::GetCurrent().Add(actor2);
+    application.GetScene().Add(actor2);
 
     // Render and notify
     application.SendNotification();
index fefb423..b4c66d4 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.
@@ -98,9 +98,10 @@ struct GestureReceivedFunctor
 // Functor that removes the gestured actor from stage
 struct UnstageActorFunctor : public GestureReceivedFunctor
 {
-  UnstageActorFunctor( SignalData& data, Gesture::State& stateToUnstage )
+  UnstageActorFunctor( SignalData& data, Gesture::State& stateToUnstage, Integration::Scene scene )
   : GestureReceivedFunctor( data ),
-    stateToUnstage( stateToUnstage )
+    stateToUnstage( stateToUnstage ),
+    scene( scene )
   {
   }
 
@@ -110,11 +111,12 @@ struct UnstageActorFunctor : public GestureReceivedFunctor
 
     if ( pan.state == stateToUnstage )
     {
-      Stage::GetCurrent().Remove( actor );
+      scene.Remove( actor );
     }
   }
 
   Gesture::State& stateToUnstage;
+  Integration::Scene scene;
 };
 
 // Functor for receiving a touch event
@@ -259,7 +261,7 @@ int UtcDaliPanGestureDetectorNew(void)
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
   detector.Attach(actor);
 
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -318,7 +320,7 @@ int UtcDaliPanGestureSetMinimumTouchesRequired(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -360,7 +362,7 @@ int UtcDaliPanGestureSetMaximumTouchesRequired(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -404,7 +406,7 @@ int UtcDaliPanGestureSignalReceptionNegative(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -444,7 +446,7 @@ int UtcDaliPanGestureSignalReceptionDownMotionLeave(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -519,7 +521,7 @@ int UtcDaliPanGestureSignalReceptionDownMotionUp(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -580,7 +582,7 @@ int UtcDaliPanGestureSignalReceptionDetach(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -636,7 +638,7 @@ int UtcDaliPanGestureSignalReceptionDetachWhilePanning(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -691,7 +693,7 @@ int UtcDaliPanGestureSignalReceptionActorDestroyedWhilePanning(void)
   Actor tempActor = Actor::New();
   tempActor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   tempActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT);
-  Stage::GetCurrent().Add(tempActor);
+  application.GetScene().Add(tempActor);
   detector.Attach(tempActor);
 
   uint32_t time = 100;
@@ -701,7 +703,7 @@ int UtcDaliPanGestureSignalReceptionActorDestroyedWhilePanning(void)
     Actor actor = Actor::New();
     actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
     actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-    Stage::GetCurrent().Add(actor);
+    application.GetScene().Add(actor);
 
     // Render and notify
     application.SendNotification();
@@ -723,7 +725,7 @@ int UtcDaliPanGestureSignalReceptionActorDestroyedWhilePanning(void)
     DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
 
     // Remove the actor from stage and reset the data
-    Stage::GetCurrent().Remove(actor);
+    application.GetScene().Remove(actor);
 
     // Render and notify
     application.SendNotification();
@@ -748,7 +750,7 @@ int UtcDaliPanGestureSignalReceptionRotatedActor(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ORIENTATION, Quaternion(Dali::Degree(90.0f), Vector3::ZAXIS) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -811,7 +813,7 @@ int UtcDaliPanGestureSignalReceptionChildHit(void)
   Actor parent = Actor::New();
   parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(parent);
+  application.GetScene().Add(parent);
 
   // Set child to completely cover parent.
   // Change rotation of child to be different from parent so that we can check if our local coordinate
@@ -874,13 +876,13 @@ int UtcDaliPanGestureSignalReceptionAttachDetachMany(void)
   Actor first = Actor::New();
   first.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   first.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(first);
+  application.GetScene().Add(first);
 
   Actor second = Actor::New();
   second.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   second.SetProperty( Actor::Property::POSITION_X, 100.0f);
   second.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(second);
+  application.GetScene().Add(second);
 
   // Render and notify
   application.SendNotification();
@@ -894,15 +896,15 @@ int UtcDaliPanGestureSignalReceptionAttachDetachMany(void)
   detector.Attach(second);
   detector.DetectedSignal().Connect(&application, functor);
 
-  DALI_TEST_EQUALS(Stage::GetCurrent().GetRootLayer(), first.GetParent(), TEST_LOCATION);
-  DALI_TEST_EQUALS(Stage::GetCurrent().GetRootLayer(), second.GetParent(), TEST_LOCATION);
+  DALI_TEST_EQUALS(application.GetScene().GetRootLayer(), first.GetParent(), TEST_LOCATION);
+  DALI_TEST_EQUALS(application.GetScene().GetRootLayer(), second.GetParent(), TEST_LOCATION);
 
   // Start pan within second actor's area
   uint32_t time = 100;
   TestStartPan( application, Vector2( 110.0f, 20.0f ),  Vector2( 126.0f, 20.0f ), time );
 
-  DALI_TEST_EQUALS(Stage::GetCurrent().GetRootLayer(), first.GetParent(), TEST_LOCATION);
-  DALI_TEST_EQUALS(Stage::GetCurrent().GetRootLayer(), second.GetParent(), TEST_LOCATION);
+  DALI_TEST_EQUALS(application.GetScene().GetRootLayer(), first.GetParent(), TEST_LOCATION);
+  DALI_TEST_EQUALS(application.GetScene().GetRootLayer(), second.GetParent(), TEST_LOCATION);
 
   DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
   DALI_TEST_EQUALS(true, second == data.pannedActor, TEST_LOCATION);
@@ -937,7 +939,7 @@ int UtcDaliPanGestureSignalReceptionActorBecomesUntouchable(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -987,12 +989,12 @@ int UtcDaliPanGestureSignalReceptionMultipleDetectorsOnActor(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   Actor actor2 = Actor::New();
   actor2.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT);
-  Stage::GetCurrent().Add(actor2);
+  application.GetScene().Add(actor2);
 
   // Render and notify
   application.SendNotification();
@@ -1073,7 +1075,7 @@ int UtcDaliPanGestureSignalReceptionEnsureCorrectSignalling(void)
   Actor actor1 = Actor::New();
   actor1.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor1);
+  application.GetScene().Add(actor1);
   SignalData data1;
   GestureReceivedFunctor functor1(data1);
   PanGestureDetector detector1 = PanGestureDetector::New();
@@ -1084,7 +1086,7 @@ int UtcDaliPanGestureSignalReceptionEnsureCorrectSignalling(void)
   actor2.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT);
   actor2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::BOTTOM_RIGHT);
-  Stage::GetCurrent().Add(actor2);
+  application.GetScene().Add(actor2);
   SignalData data2;
   GestureReceivedFunctor functor2(data2);
   PanGestureDetector detector2 = PanGestureDetector::New();
@@ -1113,7 +1115,7 @@ int UtcDaliPanGestureSignalReceptionAttachActorAfterDown(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -1161,7 +1163,7 @@ int UtcDaliPanGestureSignalReceptionAttachActorAfterDownAfterInitialPanToAnother
   Actor parent = Actor::New();
   parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add( parent );
+  application.GetScene().Add( parent );
 
   Actor child = Actor::New();
   child.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
@@ -1233,7 +1235,7 @@ int UtcDaliPanGestureSignalReceptionDifferentPossible(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -1302,7 +1304,7 @@ int UtcDaliPanGestureActorUnstaged(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -1313,7 +1315,7 @@ int UtcDaliPanGestureActorUnstaged(void)
 
   // Attach actor to detector
   SignalData data;
-  UnstageActorFunctor functor( data, stateToUnstage );
+  UnstageActorFunctor functor( data, stateToUnstage, application.GetScene() );
   PanGestureDetector detector = PanGestureDetector::New();
   detector.Attach(actor);
   detector.DetectedSignal().Connect( &application, functor );
@@ -1335,7 +1337,7 @@ int UtcDaliPanGestureActorUnstaged(void)
   application.Render();
 
   // Re-add actor to stage
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -1367,7 +1369,7 @@ int UtcDaliPanGestureActorUnstaged(void)
   application.Render();
 
   // Re-add actor to stage
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -1402,14 +1404,14 @@ int UtcDaliPanGestureActorStagedAndDestroyed(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Create and add a second actor so that GestureDetector destruction does not come into play.
   Actor dummyActor( Actor::New() );
   dummyActor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   dummyActor.SetProperty( Actor::Property::POSITION, Vector2( 100.0f, 100.0f ));
   dummyActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(dummyActor);
+  application.GetScene().Add(dummyActor);
 
   // Render and notify
   application.SendNotification();
@@ -1420,7 +1422,7 @@ int UtcDaliPanGestureActorStagedAndDestroyed(void)
 
   // Attach actor to detector
   SignalData data;
-  UnstageActorFunctor functor( data, stateToUnstage );
+  UnstageActorFunctor functor( data, stateToUnstage, application.GetScene() );
   PanGestureDetector detector = PanGestureDetector::New();
   detector.Attach(actor);
   detector.Attach(dummyActor);
@@ -1442,7 +1444,7 @@ int UtcDaliPanGestureActorStagedAndDestroyed(void)
   application.Render();
 
   // Re add to the stage, we should not be signalled
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -1643,7 +1645,7 @@ int UtcDaliPanGestureAngleProcessing(void)
   Actor parent = Actor::New();
   parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(parent);
+  application.GetScene().Add(parent);
 
   Actor child = Actor::New();
   child.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
@@ -1776,7 +1778,7 @@ int UtcDaliPanGestureDirectionProcessing(void)
   Actor parent = Actor::New();
   parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(parent);
+  application.GetScene().Add(parent);
 
   Actor child = Actor::New();
   child.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
@@ -1891,7 +1893,7 @@ int UtcDaliPanGestureNoPredictionNoSmoothing(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Add a pan detector
   PanGestureDetector detector = PanGestureDetector::New();
@@ -1954,7 +1956,7 @@ int UtcDaliPanGestureNoPredictionSmoothing(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Add a pan detector
   PanGestureDetector detector = PanGestureDetector::New();
@@ -2018,7 +2020,7 @@ int UtcDaliPanGesturePredictionNoSmoothing(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Add a pan detector
   PanGestureDetector detector = PanGestureDetector::New();
@@ -2081,7 +2083,7 @@ int UtcDaliPanGesturePredictionSmoothing01(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Add a pan detector
   PanGestureDetector detector = PanGestureDetector::New();
@@ -2147,7 +2149,7 @@ int UtcDaliPanGesturePredictionSmoothing02(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Add a pan detector
   PanGestureDetector detector = PanGestureDetector::New();
@@ -2254,7 +2256,7 @@ int UtcDaliPanGesturePrediction2SmoothingMultiTap01(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Add a pan detector
   PanGestureDetector detector = PanGestureDetector::New();
@@ -2328,7 +2330,7 @@ int UtcDaliPanGesturePrediction2SmoothingMultiTap02(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Add a pan detector
   PanGestureDetector detector = PanGestureDetector::New();
@@ -2433,7 +2435,7 @@ int UtcDaliPanGesturePrediction2Smoothing(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Add a pan detector
   PanGestureDetector detector = PanGestureDetector::New();
@@ -2528,7 +2530,7 @@ int UtcDaliPanGestureSetProperties(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Add a pan detector
   PanGestureDetector detector = PanGestureDetector::New();
@@ -2592,7 +2594,7 @@ int UtcDaliPanGestureSetPropertiesAlreadyPanning(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Add a pan detector
   PanGestureDetector detector = PanGestureDetector::New();
@@ -2723,7 +2725,7 @@ int UtcDaliPanGestureGetPropertyWithSceneObject(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Add a pan detector
   PanGestureDetector detector = PanGestureDetector::New();
@@ -2759,7 +2761,7 @@ int UtcDaliPanGestureLayerConsumesTouch(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Add a pan detector
   PanGestureDetector detector = PanGestureDetector::New();
@@ -2772,7 +2774,7 @@ int UtcDaliPanGestureLayerConsumesTouch(void)
   Layer layer = Layer::New();
   layer.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add( layer );
+  application.GetScene().Add( layer );
   layer.RaiseToTop();
 
   // Render and notify
@@ -2812,7 +2814,7 @@ int UtcDaliPanGestureNoTimeDiff(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Add a pan detector
   PanGestureDetector detector = PanGestureDetector::New();
index c4f5917..dac0418 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.
@@ -120,7 +120,7 @@ int UtcDaliPanGestureRecognizerBasicNoAction(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -152,7 +152,7 @@ int UtcDaliPanGestureRecognizerBasic(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -184,7 +184,7 @@ int UtcDaliPanGestureRecognizerBasicInterrupted(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -216,7 +216,7 @@ int UtcDaliPanGestureRecognizerBasicShortest(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -248,7 +248,7 @@ int UtcDaliPanGestureRecognizerBasicFailToStart(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -280,7 +280,7 @@ int UtcDaliPanGestureRecognizerBasicStationary(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -317,7 +317,7 @@ int UtcDaliPanGestureRecognizerNewParametersFail(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -352,7 +352,7 @@ int UtcDaliPanGestureRecognizerNewParametersSuccess(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -387,7 +387,7 @@ int UtcDaliPanGestureRecognizerNewParametersEndFewerTouches01(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -423,7 +423,7 @@ int UtcDaliPanGestureRecognizerNewParametersEndFewerTouches02(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -459,7 +459,7 @@ int UtcDaliPanGestureRecognizerNewParametersNoStart(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -494,7 +494,7 @@ int UtcDaliPanGestureRecognizerNewParametersSlowRelease(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -529,7 +529,7 @@ int UtcDaliPanGestureRecognizerOtherEvent(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -563,7 +563,7 @@ int UtcDaliPanGestureRecognizerSlowMoving(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -601,7 +601,7 @@ int UtcDaliPanGestureRecognizerNewParamsMinNum(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -638,7 +638,7 @@ int UtcDaliPanGestureRecognizerNewParamsMinDistance(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
index 45e8948..0c271c7 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.
@@ -92,9 +92,10 @@ struct GestureReceivedFunctor
 // Functor that removes the gestured actor from stage
 struct UnstageActorFunctor : public GestureReceivedFunctor
 {
-  UnstageActorFunctor( SignalData& data, Gesture::State& stateToUnstage )
+  UnstageActorFunctor( SignalData& data, Gesture::State& stateToUnstage, Integration::Scene scene )
   : GestureReceivedFunctor( data ),
-    stateToUnstage( stateToUnstage )
+    stateToUnstage( stateToUnstage ),
+    scene( scene )
   {
   }
 
@@ -104,11 +105,12 @@ struct UnstageActorFunctor : public GestureReceivedFunctor
 
     if ( pinch.state == stateToUnstage )
     {
-      Stage::GetCurrent().Remove( actor );
+      scene.Remove( actor );
     }
   }
 
   Gesture::State& stateToUnstage;
+  Integration::Scene scene;
 };
 
 // Functor for receiving a touch event
@@ -170,7 +172,7 @@ int UtcDaliPinchGestureDetectorNew(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -231,7 +233,7 @@ int UtcDaliPinchGestureSignalReceptionNegative(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -273,7 +275,7 @@ int UtcDaliPinchGestureSignalReceptionDownMotionLeave(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -334,7 +336,7 @@ int UtcDaliPinchGestureSignalReceptionDownMotionUp(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -385,7 +387,7 @@ int UtcDaliPinchGestureSignalReceptionDetach(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -436,7 +438,7 @@ int UtcDaliPinchGestureSignalReceptionDetachWhilePinching(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -488,7 +490,7 @@ int UtcDaliPinchGestureSignalReceptionActorDestroyedWhilePinching(void)
   Actor tempActor = Actor::New();
   tempActor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   tempActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT);
-  Stage::GetCurrent().Add(tempActor);
+  application.GetScene().Add(tempActor);
   detector.Attach(tempActor);
 
   // Actor lifetime is scoped
@@ -496,7 +498,7 @@ int UtcDaliPinchGestureSignalReceptionActorDestroyedWhilePinching(void)
     Actor actor = Actor::New();
     actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
     actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-    Stage::GetCurrent().Add(actor);
+    application.GetScene().Add(actor);
 
     // Render and notify
     application.SendNotification();
@@ -518,7 +520,7 @@ int UtcDaliPinchGestureSignalReceptionActorDestroyedWhilePinching(void)
     DALI_TEST_EQUALS(Gesture::Continuing, data.receivedGesture.state, TEST_LOCATION);
 
     // Remove the actor from stage and reset the data
-    Stage::GetCurrent().Remove(actor);
+    application.GetScene().Remove(actor);
 
     // Render and notify
     application.SendNotification();
@@ -542,7 +544,7 @@ int UtcDaliPinchGestureSignalReceptionRotatedActor(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ORIENTATION, Quaternion(Dali::Degree(90.0f), Vector3::ZAXIS) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify a couple of times
   application.SendNotification();
@@ -607,7 +609,7 @@ int UtcDaliPinchGestureSignalReceptionChildHit(void)
   Actor parent = Actor::New();
   parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(parent);
+  application.GetScene().Add(parent);
 
   // Set child to completely cover parent.
   // Change rotation of child to be different from parent so that we can check if our local coordinate
@@ -671,13 +673,13 @@ int UtcDaliPinchGestureSignalReceptionAttachDetachMany(void)
   Actor first = Actor::New();
   first.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   first.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(first);
+  application.GetScene().Add(first);
 
   Actor second = Actor::New();
   second.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   second.SetProperty( Actor::Property::POSITION_X, 100.0f);
   second.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(second);
+  application.GetScene().Add(second);
 
   // Render and notify
   application.SendNotification();
@@ -722,7 +724,7 @@ int UtcDaliPinchGestureSignalReceptionActorBecomesUntouchable(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -768,12 +770,12 @@ int UtcDaliPinchGestureSignalReceptionMultipleDetectorsOnActor(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   Actor actor2 = Actor::New();
   actor2.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT);
-  Stage::GetCurrent().Add(actor2);
+  application.GetScene().Add(actor2);
 
   // Render and notify
   application.SendNotification();
@@ -847,7 +849,7 @@ int UtcDaliPinchGestureSignalReceptionEnsureCorrectSignalling(void)
   Actor actor1 = Actor::New();
   actor1.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor1);
+  application.GetScene().Add(actor1);
   SignalData data1;
   GestureReceivedFunctor functor1(data1);
   PinchGestureDetector detector1 = PinchGestureDetector::New();
@@ -858,7 +860,7 @@ int UtcDaliPinchGestureSignalReceptionEnsureCorrectSignalling(void)
   actor2.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT);
   actor2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::BOTTOM_RIGHT);
-  Stage::GetCurrent().Add(actor2);
+  application.GetScene().Add(actor2);
   SignalData data2;
   GestureReceivedFunctor functor2(data2);
   PinchGestureDetector detector2 = PinchGestureDetector::New();
@@ -884,7 +886,7 @@ int UtcDaliPinchGestureActorUnstaged(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -895,7 +897,7 @@ int UtcDaliPinchGestureActorUnstaged(void)
 
   // Attach actor to detector
   SignalData data;
-  UnstageActorFunctor functor( data, stateToUnstage );
+  UnstageActorFunctor functor( data, stateToUnstage, application.GetScene() );
   PinchGestureDetector detector = PinchGestureDetector::New();
   detector.Attach(actor);
   detector.DetectedSignal().Connect( &application, functor );
@@ -915,7 +917,7 @@ int UtcDaliPinchGestureActorUnstaged(void)
   application.Render();
 
   // Re-add actor to stage
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -943,7 +945,7 @@ int UtcDaliPinchGestureActorUnstaged(void)
   application.Render();
 
   // Re-add actor to stage
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -975,14 +977,14 @@ int UtcDaliPinchGestureActorStagedAndDestroyed(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Create and add a second actor so that GestureDetector destruction does not come into play.
   Actor dummyActor( Actor::New() );
   dummyActor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   dummyActor.SetProperty( Actor::Property::POSITION, Vector2( 100.0f, 100.0f ));
   dummyActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(dummyActor);
+  application.GetScene().Add(dummyActor);
 
   // Render and notify
   application.SendNotification();
@@ -993,7 +995,7 @@ int UtcDaliPinchGestureActorStagedAndDestroyed(void)
 
   // Attach actor to detector
   SignalData data;
-  UnstageActorFunctor functor( data, stateToUnstage );
+  UnstageActorFunctor functor( data, stateToUnstage, application.GetScene() );
   PinchGestureDetector detector = PinchGestureDetector::New();
   detector.Attach(actor);
   detector.Attach(dummyActor);
@@ -1014,7 +1016,7 @@ int UtcDaliPinchGestureActorStagedAndDestroyed(void)
   application.Render();
 
   // Re add to the stage, we should not be signalled
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -1067,7 +1069,7 @@ int UtcDaliPinchGestureLayerConsumesTouch(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Add a detector
   SignalData data;
@@ -1080,7 +1082,7 @@ int UtcDaliPinchGestureLayerConsumesTouch(void)
   Layer layer = Layer::New();
   layer.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add( layer );
+  application.GetScene().Add( layer );
   layer.RaiseToTop();
 
   // Render and notify
index 820f7ef..cfdc7a8 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.
@@ -120,7 +120,7 @@ int UtcDaliPinchGestureRecognizerBasicNoAction(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -152,7 +152,7 @@ int UtcDaliPinchGestureRecognizerBasic(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -186,7 +186,7 @@ int UtcDaliPinchGestureRecognizerEndEarly01(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -221,7 +221,7 @@ int UtcDaliPinchGestureRecognizerEndEarly02(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -257,7 +257,7 @@ int UtcDaliPinchGestureRecognizerRealistic01(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -298,7 +298,7 @@ int UtcDaliPinchGestureRecognizerRealistic02(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -338,7 +338,7 @@ int UtcDaliPinchGestureRecognizerRealistic03(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -381,13 +381,13 @@ int UtcDaliPinchGestureRecognizerMultipleDetectors(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   Actor actor2 = Actor::New();
   actor2.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
   actor2.SetProperty( Actor::Property::POSITION_X, 100.0f);
-  Stage::GetCurrent().Add(actor2);
+  application.GetScene().Add(actor2);
 
   // Render and notify
   application.SendNotification();
@@ -448,7 +448,7 @@ int UtcDaliPinchGestureRecognizerShortDistance01(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -482,7 +482,7 @@ int UtcDaliPinchGestureRecognizerShortDistance02(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -520,7 +520,7 @@ int UtcDaliPinchGestureRecognizerLongDistance01(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -555,7 +555,7 @@ int UtcDaliPinchGestureRecognizerLongDistance02(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -589,7 +589,7 @@ int UtcDaliPinchGestureRecognizerLongDistance03(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -624,7 +624,7 @@ int UtcDaliPinchGestureRecognizerLongDistance04(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -660,7 +660,7 @@ int UtcDaliPinchGestureRecognizerMinimumTouchEvents(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   // Render and notify
   application.SendNotification();
@@ -703,7 +703,7 @@ int UtcDaliPinchGestureRecognizerMinimumTouchEventsAfterStart(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   // Render and notify
   application.SendNotification();
index c5c8301..e2b2689 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -140,7 +140,7 @@ int UtcDaliPropertyBufferSetData01(void)
     Actor actor = Actor::New();
     actor.SetProperty( Actor::Property::SIZE,Vector3::ONE * 100.f);
     actor.AddRenderer(renderer);
-    Stage::GetCurrent().Add(actor);
+    application.GetScene().Add(actor);
 
     application.SendNotification();
     application.Render(0);
@@ -191,7 +191,7 @@ int UtcDaliPropertyBufferSetData02(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE,Vector3::ONE * 100.f);
   actor.AddRenderer(renderer);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   application.SendNotification();
   application.Render(0);
index 1281713..2bd3c58 100644 (file)
@@ -50,7 +50,8 @@ class TestClass : public ConnectionTracker
 {
 public:
 
-  TestClass()
+  TestClass(Integration::Scene scene )
+  : mScene( scene )
   {
   }
 
@@ -61,7 +62,7 @@ public:
   void Initialize()
   {
     mActor = Actor::New();
-    Stage::GetCurrent().Add( mActor );
+    mScene.Add( mActor );
     mNotification = mActor.AddPropertyNotification( Actor::Property::POSITION_X, GreaterThanCondition(100.0f) );
     mNotification.NotifySignal().Connect( this, &TestClass::OnPropertyNotify );
   }
@@ -78,7 +79,7 @@ public:
 
   void Terminate()
   {
-    Stage::GetCurrent().Remove( mActor );
+    mScene.Remove( mActor );
     mActor.Reset();
     mNotification.Reset();
   }
@@ -91,6 +92,7 @@ public:
 
   Actor mActor;
   PropertyNotification mNotification;
+  Integration::Scene mScene;
 };
 
 
@@ -178,7 +180,7 @@ int UtcDaliAddPropertyNotificationCallback(void)
 {
   TestApplication application; // Reset all test adapter return codes
 
-  TestClass* object = new TestClass;
+  TestClass* object = new TestClass(application.GetScene());
 
   object->Initialize();
   application.Render(RENDER_FRAME_INTERVAL);
@@ -429,7 +431,7 @@ int UtcDaliPropertyNotificationGreaterThan(void)
   tet_infoline(" UtcDaliPropertyNotificationGreaterThan");
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   PropertyNotification notification = actor.AddPropertyNotification( Actor::Property::POSITION_X, GreaterThanCondition(100.0f) );
   notification.NotifySignal().Connect( &TestCallback );
@@ -464,7 +466,7 @@ int UtcDaliPropertyNotificationLessThan(void)
   tet_infoline(" UtcDaliPropertyNotificationLessThan");
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   PropertyNotification notification = actor.AddPropertyNotification( Actor::Property::POSITION_X, LessThanCondition(100.0f ) );
   notification.NotifySignal().Connect( &TestCallback );
@@ -499,7 +501,7 @@ int UtcDaliPropertyNotificationInside(void)
   tet_infoline(" UtcDaliPropertyNotificationInside");
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   PropertyNotification notification = actor.AddPropertyNotification( Actor::Property::POSITION_X, InsideCondition(100.0f, 200.0f) );
   notification.NotifySignal().Connect( &TestCallback );
@@ -534,7 +536,7 @@ int UtcDaliPropertyNotificationOutside(void)
   tet_infoline(" UtcDaliPropertyNotificationOutside");
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   PropertyNotification notification = actor.AddPropertyNotification( Actor::Property::POSITION_X, OutsideCondition(100.0f, 200.0f) );
   notification.NotifySignal().Connect( &TestCallback );
@@ -569,7 +571,7 @@ int UtcDaliPropertyNotificationVectorComponentGreaterThan(void)
   tet_infoline(" UtcDaliPropertyNotificationGreaterThan");
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   PropertyNotification notification = actor.AddPropertyNotification( Actor::Property::POSITION, 0, GreaterThanCondition(100.0f) );
   notification.NotifySignal().Connect( &TestCallback );
@@ -618,7 +620,7 @@ int UtcDaliPropertyNotificationVectorComponentLessThan(void)
   tet_infoline(" UtcDaliPropertyNotificationLessThan");
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   PropertyNotification notification = actor.AddPropertyNotification( Actor::Property::POSITION, 0, LessThanCondition(-100.0f) );
   notification.NotifySignal().Connect( &TestCallback );
@@ -667,7 +669,7 @@ int UtcDaliPropertyNotificationVectorComponentInside(void)
   tet_infoline(" UtcDaliPropertyNotificationInside");
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   PropertyNotification notification = actor.AddPropertyNotification( Actor::Property::POSITION, 0, InsideCondition(-100.0f, 100.0f) );
   notification.NotifySignal().Connect( &TestCallback );
@@ -717,7 +719,7 @@ int UtcDaliPropertyNotificationVectorComponentOutside(void)
   tet_infoline(" UtcDaliPropertyNotificationOutside");
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   PropertyNotification notification = actor.AddPropertyNotification( Actor::Property::POSITION, 0, OutsideCondition(-100.0f, 100.0f) );
   notification.NotifySignal().Connect( &TestCallback );
@@ -828,7 +830,7 @@ int UtcDaliPropertyNotificationStep(void)
   tet_infoline(" UtcDaliPropertyNotificationStep");
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   const float step = 100.0f;
   // float
@@ -866,7 +868,7 @@ int UtcDaliPropertyNotificationVariableStep(void)
   tet_infoline(" UtcDaliPropertyNotificationStep");
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   Dali::Vector<float> values;
 
@@ -907,7 +909,7 @@ int UtcDaliPropertyNotificationOrder(void)
   TestApplication application; // Reset all test adapter return codes
 
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   // this should complete in first frame
   PropertyNotification notification1 = actor.AddPropertyNotification( Actor::Property::POSITION_X, GreaterThanCondition(90.0f) );
   notification1.NotifySignal().Connect( &TestCallback );
index eb60d6d..c0b7219 100644 (file)
@@ -189,7 +189,7 @@ RenderTask CreateRenderTask(TestApplication& application,
                             bool glSync)
 {
   // Change main render task to use a different root
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
   taskList.GetTask(0u).SetSourceActor( rootActor );
 
   FrameBuffer frameBuffer = FrameBuffer::New(10,10);
@@ -284,7 +284,7 @@ int UtcDaliRenderTaskDownCast01(void)
 
   tet_infoline("Testing RenderTask::DownCast()");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
 
   BaseHandle base = taskList.GetTask( 0u );
   DALI_TEST_CHECK( base );
@@ -315,7 +315,7 @@ int UtcDaliRenderTaskSetSourceActorN(void)
 {
   TestApplication application;
   tet_infoline("Testing RenderTask::SetSourceActor() Negative - try with empty actor handle");
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
 
   Actor srcActor;
 
@@ -337,7 +337,7 @@ int UtcDaliRenderTaskSetSourceActorP01(void)
 
   tet_infoline("Testing RenderTask::SetSourceActor() Positive - check that setting a non-renderable actor stops existing source actor being rendered ");
 
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
   RenderTaskList taskList = stage.GetRenderTaskList();
   RenderTask task = taskList.GetTask( 0u );
 
@@ -380,7 +380,7 @@ int UtcDaliRenderTaskSetSourceActorP02(void)
 
   tet_infoline("Testing RenderTask::SetSourceActor() Positive - check that switching source from a non-renderable to a renderable actor causes the texture to be drawn");
 
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
 
   RenderTaskList taskList = stage.GetRenderTaskList();
 
@@ -438,7 +438,7 @@ int UtcDaliRenderTaskSetSourceActorOffStage(void)
 
   tet_infoline("Testing RenderTask::SetSourceActor (on/off stage testing)");
 
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
   RenderTaskList taskList = stage.GetRenderTaskList();
   RenderTask task = taskList.GetTask( 0u );
 
@@ -491,7 +491,7 @@ int UtcDaliRenderTaskSetSourceActorEmpty(void)
 
   tet_infoline("Testing RenderTask::SetSourceActor (empty handle case)");
 
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
   RenderTaskList taskList = stage.GetRenderTaskList();
   RenderTask task = taskList.GetTask( 0u );
 
@@ -541,7 +541,7 @@ int UtcDaliRenderTaskSetSourceActorDestroyed(void)
 
   tet_infoline( "Testing RenderTask::SetSourceActor - Set a source actor and destroy the source actor" );
 
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
   RenderTaskList taskList = stage.GetRenderTaskList();
   RenderTask task = taskList.GetTask( 0u );
 
@@ -577,7 +577,7 @@ int UtcDaliRenderTaskGetSourceActorP01(void)
 
   tet_infoline("Testing RenderTask::GetSourceActor() Check the default render task has a valid source actor");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
 
   RenderTask task = taskList.GetTask( 0u );
 
@@ -585,7 +585,7 @@ int UtcDaliRenderTaskGetSourceActorP01(void)
   DALI_TEST_CHECK( actor );
 
   // By default the entire scene should be rendered
-  Actor root = Stage::GetCurrent().GetLayer( 0 );
+  Actor root = application.GetScene().GetLayer( 0 );
   DALI_TEST_CHECK( root == actor );
   END_TEST;
 }
@@ -596,10 +596,10 @@ int UtcDaliRenderTaskGetSourceActorP02(void)
 
   tet_infoline("Testing RenderTask::GetSourceActor() Create a new render task, Add a new actor to the stage and set it as the source of the new render task. Get its source actor and check that it is equivalent to what was set.");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
   RenderTask task = taskList.CreateTask();
   Actor actor = Actor::New();
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   task.SetSourceActor( actor );
 
   DALI_TEST_EQUALS( actor, task.GetSourceActor(), TEST_LOCATION );
@@ -633,7 +633,7 @@ int UtcDaliRenderTaskSetExclusive(void)
 
   tet_infoline("Testing RenderTask::SetExclusive() Check that exclusion works");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
 
   // Manipulate the GenTextures behaviour, to identify different actors
 
@@ -646,7 +646,7 @@ int UtcDaliRenderTaskSetExclusive(void)
   Texture img1 = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 1, 1 );
   Actor actor1 = CreateRenderableActor( img1 );
   actor1.SetProperty( Actor::Property::SIZE, Vector2( 1.0f, 1.0f ) );
-  Stage::GetCurrent().Add( actor1 );
+  application.GetScene().Add( actor1 );
 
   // Update & Render actor1
   application.SendNotification();
@@ -673,7 +673,7 @@ int UtcDaliRenderTaskSetExclusive(void)
 
   // Force actor2 to be rendered before actor1
   Layer layer = Layer::New();
-  Stage::GetCurrent().Add( layer );
+  application.GetScene().Add( layer );
   layer.Add( actor2 );
   layer.LowerToBottom();
 
@@ -702,7 +702,7 @@ int UtcDaliRenderTaskSetExclusive(void)
 
   // Force actor3 to be rendered before actor2
   layer = Layer::New();
-  Stage::GetCurrent().Add( layer );
+  application.GetScene().Add( layer );
   layer.Add( actor3 );
   layer.LowerToBottom();
 
@@ -799,9 +799,9 @@ int UtcDaliRenderTaskSetExclusive02(void)
   Texture img1 = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 1, 1 );
   Actor actor1 = CreateRenderableActor( img1 );
   actor1.SetProperty( Actor::Property::SIZE, Vector2( 1.0f, 1.0f ) );
-  Stage::GetCurrent().Add( actor1 );
+  application.GetScene().Add( actor1 );
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
   RenderTask task = taskList.CreateTask();
 
   task.SetSourceActor( actor1 );
@@ -853,7 +853,7 @@ int UtcDaliRenderTaskIsExclusive01(void)
 
   tet_infoline("Testing RenderTask::IsExclusive() Check default values are non-exclusive");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
 
   // Not exclusive is the default
   RenderTask task = taskList.GetTask( 0u );
@@ -871,7 +871,7 @@ int UtcDaliRenderTaskIsExclusive02(void)
 
   tet_infoline("Testing RenderTask::IsExclusive() Check the getter returns set values");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
 
   // Not exclusive is the default
   RenderTask newTask = taskList.CreateTask();
@@ -908,7 +908,7 @@ int UtcDaliRenderTaskSetInputEnabled(void)
 
   tet_infoline("Testing RenderTask::SetInputEnabled()");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
 
   // Input is enabled by default
   RenderTask task = taskList.GetTask( 0u );
@@ -928,7 +928,7 @@ int UtcDaliRenderTaskGetInputEnabled(void)
 
   tet_infoline("Testing RenderTask::GetInputEnabled()");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
 
   // Input is enabled by default
   RenderTask task = taskList.GetTask( 0u );
@@ -949,7 +949,7 @@ int UtcDaliRenderTaskSetCameraActorP(void)
 
   tet_infoline("Testing RenderTask::SetCameraActor()");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
 
   RenderTask task = taskList.GetTask( 0u );
 
@@ -972,7 +972,7 @@ int UtcDaliRenderTaskSetCameraActorN(void)
 
   tet_infoline("Testing RenderTask::SetCameraActor() with empty actor handle");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
 
   RenderTask task = taskList.GetTask( 0u );
 
@@ -993,7 +993,7 @@ int UtcDaliRenderTaskSetCameraActorDestroyed(void)
 
   tet_infoline( "Testing RenderTask::SetCameraActor - Set a camera actor and destroy the camera actor" );
 
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
   RenderTaskList taskList = stage.GetRenderTaskList();
   RenderTask task = taskList.GetTask( 0u );
 
@@ -1017,7 +1017,7 @@ int UtcDaliRenderTaskGetCameraActorP(void)
 
   tet_infoline("Testing RenderTask::GetCameraActor()");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
 
   RenderTask task = taskList.GetTask( 0u );
 
@@ -1054,7 +1054,7 @@ int UtcDaliRenderTaskSetFrameBufferP(void)
 
   tet_infoline("Testing RenderTask::SetFrameBuffer()");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
 
   RenderTask task = taskList.GetTask( 0u );
 
@@ -1070,7 +1070,7 @@ int UtcDaliRenderTaskSetFrameBufferN(void)
 
   tet_infoline("Testing RenderTask::SetFrameBuffer()");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
 
   RenderTask task = taskList.GetTask( 0u );
   FrameBuffer newFrameBuffer; // Empty handle
@@ -1085,7 +1085,7 @@ int UtcDaliRenderTaskGetFrameBufferP(void)
 
   tet_infoline("Testing RenderTask::GetFrameBuffer()");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
 
   RenderTask task = taskList.GetTask( 0u );
 
@@ -1101,7 +1101,7 @@ int UtcDaliRenderTaskGetFrameBufferN(void)
 
   tet_infoline("Testing RenderTask::GetFrameBuffer()");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
 
   RenderTask task = taskList.GetTask( 0u );
 
@@ -1118,7 +1118,7 @@ int UtcDaliRenderTaskSetScreenToFrameBufferFunctionP(void)
 
   tet_infoline("Testing RenderTask::SetScreenToFrameBufferFunction()");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
 
   RenderTask task = taskList.GetTask( 0u );
 
@@ -1166,7 +1166,7 @@ int UtcDaliRenderTaskGetScreenToFrameBufferFunctionP(void)
 
   tet_infoline("Testing RenderTask::GetScreenToFrameBufferFunction()");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
 
   RenderTask task = taskList.GetTask( 0u );
 
@@ -1205,7 +1205,7 @@ int UtcDaliRenderTaskGetScreenToFrameBufferMappingActorP(void)
   TestApplication application;
   tet_infoline("Testing RenderTask::GetScreenToFrameBufferMappingActor ");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
   RenderTask renderTask = taskList.CreateTask();
   Actor mappingActor = Actor::New();
   renderTask.SetScreenToFrameBufferMappingActor(mappingActor);
@@ -1239,7 +1239,7 @@ int UtcDaliRenderTaskGetScreenToFrameBufferMappingActor02N(void)
   TestApplication application;
   tet_infoline("Testing RenderTask::GetScreenToFrameBufferMappingActor with empty task handle");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
   RenderTask renderTask = taskList.CreateTask();
   Actor actor;
   renderTask.SetScreenToFrameBufferMappingActor(actor);
@@ -1254,12 +1254,12 @@ int UtcDaliRenderTaskGetViewportP01(void)
 
   tet_infoline("Testing RenderTask::GetViewport() on default task");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
   RenderTask task = taskList.GetTask( 0u );
   Viewport viewport = task.GetViewport();
 
   // By default the viewport should match the stage width/height
-  Vector2 stageSize = Stage::GetCurrent().GetSize();
+  Vector2 stageSize = application.GetScene().GetSize();
   Viewport expectedViewport( 0, 0, stageSize.width, stageSize.height );
   DALI_TEST_CHECK( viewport == expectedViewport );
   END_TEST;
@@ -1271,12 +1271,12 @@ int UtcDaliRenderTaskGetViewportP02(void)
 
   tet_infoline("Testing RenderTask::GetViewport() on new task");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
   RenderTask task = taskList.CreateTask();
   Viewport viewport = task.GetViewport();
 
   // By default the viewport should match the stage width/height
-  Vector2 stageSize = Stage::GetCurrent().GetSize();
+  Vector2 stageSize = application.GetScene().GetSize();
   Viewport expectedViewport( 0, 0, stageSize.width, stageSize.height );
   DALI_TEST_CHECK( viewport == expectedViewport );
   END_TEST;
@@ -1309,10 +1309,10 @@ int UtcDaliRenderTaskSetViewportP(void)
 
   tet_infoline("Testing RenderTask::SetViewport()");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
 
   RenderTask task = taskList.GetTask( 0u );
-  Vector2 stageSize = Stage::GetCurrent().GetSize();
+  Vector2 stageSize = application.GetScene().GetSize();
   Viewport newViewport( 0, 0, stageSize.width * 0.5f, stageSize.height * 0.5f );
   task.SetViewport( newViewport );
 
@@ -1330,12 +1330,12 @@ int UtcDaliRenderTaskSetViewportN(void)
 
   tet_infoline("Testing RenderTask::SetViewport()");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
 
   RenderTask task;
   try
   {
-    Vector2 stageSize = Stage::GetCurrent().GetSize();
+    Vector2 stageSize = application.GetScene().GetSize();
     Viewport newViewport( 0, 0, stageSize.width * 0.5f, stageSize.height * 0.5f );
     task.SetViewport( newViewport );
   }
@@ -1355,7 +1355,7 @@ int UtcDaliRenderTaskSetViewportPosition(void)
 
   tet_infoline("Testing RenderTask::SetViewportPosition()");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
 
   RenderTask task = taskList.GetTask( 0u );
 
@@ -1363,7 +1363,7 @@ int UtcDaliRenderTaskSetViewportPosition(void)
 
   // By default the viewport should match the stage width/height
 
-  Vector2 stageSize = Stage::GetCurrent().GetSize();
+  Vector2 stageSize = application.GetScene().GetSize();
   Viewport expectedViewport( 0, 0, stageSize.width, stageSize.height );
   DALI_TEST_CHECK( viewport == expectedViewport );
 
@@ -1430,7 +1430,7 @@ int UtcDaliRenderTaskSetViewportSize(void)
 
   tet_infoline("Testing RenderTask::SetViewportSize()");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
 
   RenderTask task = taskList.GetTask( 0u );
 
@@ -1438,7 +1438,7 @@ int UtcDaliRenderTaskSetViewportSize(void)
 
   // By default the viewport should match the stage width/height
 
-  Vector2 stageSize = Stage::GetCurrent().GetSize();
+  Vector2 stageSize = application.GetScene().GetSize();
   Viewport expectedViewport( 0, 0, stageSize.width, stageSize.height );
   DALI_TEST_CHECK( viewport == expectedViewport );
 
@@ -1507,7 +1507,7 @@ int UtcDaliRenderTaskSetClearColorP(void)
   Vector4 testColor( 1.0f, 2.0f, 3.0f, 4.0f );
   Vector4 testColor2( 5.0f, 6.0f, 7.0f, 8.0f );
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
 
   RenderTask task = taskList.GetTask( 0u );
   DALI_TEST_CHECK( task.GetClearColor() != testColor );
@@ -1586,7 +1586,7 @@ int UtcDaliRenderTaskGetClearColorP(void)
 
   tet_infoline("Testing RenderTask::GetClearColor()");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
   RenderTask task = taskList.GetTask( 0u );
   DALI_TEST_EQUALS( task.GetClearColor(), RenderTask::DEFAULT_CLEAR_COLOR, TEST_LOCATION );
   END_TEST;
@@ -1618,7 +1618,7 @@ int UtcDaliRenderTaskSetClearEnabledP(void)
 
   tet_infoline("Testing RenderTask::SetClearEnabled()");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
 
   RenderTask task = taskList.GetTask( 0u );
   DALI_TEST_CHECK( task.GetClearEnabled() ); // defaults to true
@@ -1656,7 +1656,7 @@ int UtcDaliRenderTaskGetClearEnabledP(void)
 
   tet_infoline("Testing RenderTask::GetClearEnabled()");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
 
   RenderTask task = taskList.GetTask( 0u );
   DALI_TEST_CHECK( task.GetClearEnabled() ); // defaults to true
@@ -1690,7 +1690,7 @@ int UtcDaliRenderTaskSetCullModeP(void)
 
   tet_infoline("Testing RenderTask::SetCullMode()");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
   RenderTask task = taskList.GetTask( 0u );
   DALI_TEST_EQUALS( task.GetCullMode(), true, TEST_LOCATION );
 
@@ -1726,7 +1726,7 @@ int UtcDaliRenderTaskGetCullModeP(void)
 
   tet_infoline("Testing RenderTask::GetCullMode()");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
   RenderTask task = taskList.GetTask( 0u );
   DALI_TEST_EQUALS( task.GetCullMode(), true, TEST_LOCATION );
   END_TEST;
@@ -1759,7 +1759,7 @@ int UtcDaliRenderTaskSetRefreshRate(void)
 
   tet_infoline("Testing RenderTask::SetRefreshRate()");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
 
   // By default tasks will be processed every frame
   RenderTask task = taskList.GetTask( 0u );
@@ -1779,7 +1779,7 @@ int UtcDaliRenderTaskGetRefreshRate(void)
 
   tet_infoline("Testing RenderTask::GetRefreshRate()");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
 
   // By default tasks will be processed every frame
   RenderTask task = taskList.GetTask( 0u );
@@ -1801,14 +1801,14 @@ int UtcDaliRenderTaskSignalFinished(void)
 
   CameraActor offscreenCameraActor = CameraActor::New();
 
-  Stage::GetCurrent().Add( offscreenCameraActor );
+  application.GetScene().Add( offscreenCameraActor );
 
   Texture image = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 10, 10 );
   Actor rootActor = CreateRenderableActor( image );
   rootActor.SetProperty( Actor::Property::SIZE, Vector2( 10.0f, 10.0f ) );
-  Stage::GetCurrent().Add( rootActor );
+  application.GetScene().Add( rootActor );
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
   NativeImageInterfacePtr testNativeImagePtr = TestNativeImage::New(10, 10);
   Texture frameBufferTexture = Texture::New( *testNativeImagePtr );
   FrameBuffer frameBuffer = FrameBuffer::New(frameBufferTexture.GetWidth(),frameBufferTexture.GetHeight());
@@ -1879,10 +1879,10 @@ int UtcDaliRenderTaskContinuous01(void)
   drawTrace.Enable(true);
 
   Actor rootActor = Actor::New();
-  Stage::GetCurrent().Add( rootActor );
+  application.GetScene().Add( rootActor );
 
   CameraActor offscreenCameraActor = CameraActor::New( Size( TestApplication::DEFAULT_SURFACE_WIDTH, TestApplication::DEFAULT_SURFACE_HEIGHT ) );
-  Stage::GetCurrent().Add( offscreenCameraActor );
+  application.GetScene().Add( offscreenCameraActor );
 
   Actor secondRootActor = CreateRenderableActorSuccess(application, "aFile.jpg");
 
@@ -1896,7 +1896,7 @@ int UtcDaliRenderTaskContinuous01(void)
   application.GetPlatform().ClearReadyResources();
 
   // ADD SOURCE ACTOR TO STAGE - expect continuous renders to start, no finished signal
-  Stage::GetCurrent().Add(secondRootActor);
+  application.GetScene().Add(secondRootActor);
   application.SendNotification();
 
   // CONTINUE PROCESS/RENDER                  Input,    Expected  Input,    Expected
@@ -1917,13 +1917,13 @@ int UtcDaliRenderTaskContinuous02(void)
   drawTrace.Enable(true);
 
   Actor rootActor = Actor::New();
-  Stage::GetCurrent().Add( rootActor );
+  application.GetScene().Add( rootActor );
 
   CameraActor offscreenCameraActor = CameraActor::New( Size( TestApplication::DEFAULT_SURFACE_WIDTH, TestApplication::DEFAULT_SURFACE_HEIGHT ) );
-  Stage::GetCurrent().Add( offscreenCameraActor );
+  application.GetScene().Add( offscreenCameraActor );
 
   Actor secondRootActor = CreateRenderableActorSuccess(application, "aFile.jpg");
-  Stage::GetCurrent().Add(secondRootActor);
+  application.GetScene().Add(secondRootActor);
   secondRootActor.SetProperty( Actor::Property::VISIBLE,false);
 
   RenderTask newTask = CreateRenderTask(application, offscreenCameraActor, rootActor, secondRootActor, RenderTask::REFRESH_ALWAYS, true);
@@ -1957,11 +1957,11 @@ int UtcDaliRenderTaskContinuous03(void)
   drawTrace.Enable(true);
 
   Actor rootActor = Actor::New();
-  Stage::GetCurrent().Add( rootActor );
+  application.GetScene().Add( rootActor );
 
   CameraActor offscreenCameraActor = CameraActor::New( Size( TestApplication::DEFAULT_SURFACE_WIDTH, TestApplication::DEFAULT_SURFACE_HEIGHT ) );
   Actor secondRootActor = CreateRenderableActorSuccess(application, "aFile.jpg");
-  Stage::GetCurrent().Add(secondRootActor);
+  application.GetScene().Add(secondRootActor);
 
   RenderTask newTask = CreateRenderTask(application, offscreenCameraActor, rootActor, secondRootActor, RenderTask::REFRESH_ALWAYS, true);
   bool finished = false;
@@ -1974,7 +1974,7 @@ int UtcDaliRenderTaskContinuous03(void)
   application.GetPlatform().ClearReadyResources();
 
   // ADD CAMERA ACTOR TO STAGE - expect continuous renders to start, no finished signal
-  Stage::GetCurrent().Add( offscreenCameraActor );
+  application.GetScene().Add( offscreenCameraActor );
   application.SendNotification();
 
   // CONTINUE PROCESS/RENDER                 Input,    Expected  Input,    Expected
@@ -1995,12 +1995,12 @@ int UtcDaliRenderTaskContinuous04(void)
   drawTrace.Enable(true);
 
   Actor rootActor = Actor::New();
-  Stage::GetCurrent().Add( rootActor );
+  application.GetScene().Add( rootActor );
 
   CameraActor offscreenCameraActor = CameraActor::New( Size( TestApplication::DEFAULT_SURFACE_WIDTH, TestApplication::DEFAULT_SURFACE_HEIGHT ) );
-  Stage::GetCurrent().Add( offscreenCameraActor );
+  application.GetScene().Add( offscreenCameraActor );
   Actor secondRootActor = CreateRenderableActorSuccess(application, "aFile.jpg");
-  Stage::GetCurrent().Add(secondRootActor);
+  application.GetScene().Add(secondRootActor);
 
   RenderTask newTask = CreateRenderTask(application, offscreenCameraActor, rootActor, secondRootActor, RenderTask::REFRESH_ALWAYS, true);
   bool finished = false;
@@ -2026,13 +2026,13 @@ int UtcDaliRenderTaskOnce01(void)
   drawTrace.Enable(true);
 
   Actor rootActor = Actor::New();
-  Stage::GetCurrent().Add( rootActor );
+  application.GetScene().Add( rootActor );
 
   CameraActor offscreenCameraActor = CameraActor::New( Size( TestApplication::DEFAULT_SURFACE_WIDTH, TestApplication::DEFAULT_SURFACE_HEIGHT ) );
-  Stage::GetCurrent().Add( offscreenCameraActor );
+  application.GetScene().Add( offscreenCameraActor );
   Actor secondRootActor = CreateRenderableActorSuccess(application, "aFile.jpg");
 
-  Stage::GetCurrent().Add(secondRootActor);
+  application.GetScene().Add(secondRootActor);
 
   RenderTask newTask = CreateRenderTask(application, offscreenCameraActor, rootActor, secondRootActor, RenderTask::REFRESH_ONCE, true);
   bool finished = false;
@@ -2064,10 +2064,10 @@ int UtcDaliRenderTaskOnce02(void)
   drawTrace.Enable(true);
 
   Actor rootActor = Actor::New();
-  Stage::GetCurrent().Add( rootActor );
+  application.GetScene().Add( rootActor );
 
   CameraActor offscreenCameraActor = CameraActor::New( Size( TestApplication::DEFAULT_SURFACE_WIDTH, TestApplication::DEFAULT_SURFACE_HEIGHT ) );
-  Stage::GetCurrent().Add( offscreenCameraActor );
+  application.GetScene().Add( offscreenCameraActor );
 
   Shader shader = CreateShader();
   Texture image = CreateTexture();
@@ -2079,7 +2079,7 @@ int UtcDaliRenderTaskOnce02(void)
   Actor secondRootActor = Actor::New();
   secondRootActor.AddRenderer(renderer);
   secondRootActor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
-  Stage::GetCurrent().Add(secondRootActor);
+  application.GetScene().Add(secondRootActor);
 
   RenderTask newTask = CreateRenderTask(application, offscreenCameraActor, rootActor, secondRootActor, RenderTask::REFRESH_ONCE, true);
   bool finished = false;
@@ -2112,12 +2112,12 @@ int UtcDaliRenderTaskOnce03(void)
   drawTrace.Enable(true);
 
   Actor rootActor = Actor::New();
-  Stage::GetCurrent().Add( rootActor );
+  application.GetScene().Add( rootActor );
 
   CameraActor offscreenCameraActor = CameraActor::New( Size( TestApplication::DEFAULT_SURFACE_WIDTH, TestApplication::DEFAULT_SURFACE_HEIGHT ) );
-  Stage::GetCurrent().Add( offscreenCameraActor );
+  application.GetScene().Add( offscreenCameraActor );
   Actor secondRootActor = CreateRenderableActorSuccess(application, "aFile.jpg");
-  Stage::GetCurrent().Add(secondRootActor);
+  application.GetScene().Add(secondRootActor);
 
   RenderTask newTask = CreateRenderTask(application, offscreenCameraActor, rootActor, secondRootActor, RenderTask::REFRESH_ALWAYS, true);
   bool finished = false;
@@ -2157,10 +2157,10 @@ int UtcDaliRenderTaskOnce04(void)
   drawTrace.Enable(true);
 
   Actor rootActor = Actor::New();
-  Stage::GetCurrent().Add( rootActor );
+  application.GetScene().Add( rootActor );
 
   CameraActor offscreenCameraActor = CameraActor::New( Size( TestApplication::DEFAULT_SURFACE_WIDTH, TestApplication::DEFAULT_SURFACE_HEIGHT ) );
-  Stage::GetCurrent().Add( offscreenCameraActor );
+  application.GetScene().Add( offscreenCameraActor );
 
   Shader shader = CreateShader();
   Texture image = CreateTexture();
@@ -2172,7 +2172,7 @@ int UtcDaliRenderTaskOnce04(void)
   Actor secondRootActor = Actor::New();
   secondRootActor.AddRenderer(renderer);
   secondRootActor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
-  Stage::GetCurrent().Add(secondRootActor);
+  application.GetScene().Add(secondRootActor);
 
   RenderTask newTask = CreateRenderTask(application, offscreenCameraActor, rootActor, secondRootActor, RenderTask::REFRESH_ALWAYS, true);
   bool finished = false;
@@ -2209,12 +2209,12 @@ int UtcDaliRenderTaskOnceNoSync01(void)
   drawTrace.Enable(true);
 
   Actor rootActor = Actor::New();
-  Stage::GetCurrent().Add( rootActor );
+  application.GetScene().Add( rootActor );
 
   CameraActor offscreenCameraActor = CameraActor::New( Size( TestApplication::DEFAULT_SURFACE_WIDTH, TestApplication::DEFAULT_SURFACE_HEIGHT ) );
-  Stage::GetCurrent().Add( offscreenCameraActor );
+  application.GetScene().Add( offscreenCameraActor );
   Actor secondRootActor = CreateRenderableActorSuccess(application, "aFile.jpg");
-  Stage::GetCurrent().Add(secondRootActor);
+  application.GetScene().Add(secondRootActor);
 
   RenderTask newTask = CreateRenderTask(application, offscreenCameraActor, rootActor, secondRootActor, RenderTask::REFRESH_ONCE, false);
   bool finished = false;
@@ -2239,10 +2239,10 @@ int UtcDaliRenderTaskOnceNoSync02(void)
   drawTrace.Enable(true);
 
   Actor rootActor = Actor::New();
-  Stage::GetCurrent().Add( rootActor );
+  application.GetScene().Add( rootActor );
 
   CameraActor offscreenCameraActor = CameraActor::New( Size( TestApplication::DEFAULT_SURFACE_WIDTH, TestApplication::DEFAULT_SURFACE_HEIGHT ) );
-  Stage::GetCurrent().Add( offscreenCameraActor );
+  application.GetScene().Add( offscreenCameraActor );
 
   Shader shader = CreateShader();
   Texture image = CreateTexture();
@@ -2254,7 +2254,7 @@ int UtcDaliRenderTaskOnceNoSync02(void)
   Actor secondRootActor = Actor::New();
   secondRootActor.AddRenderer(renderer);
   secondRootActor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
-  Stage::GetCurrent().Add(secondRootActor);
+  application.GetScene().Add(secondRootActor);
 
   RenderTask newTask = CreateRenderTask(application, offscreenCameraActor, rootActor, secondRootActor, RenderTask::REFRESH_ONCE, false);
   bool finished = false;
@@ -2283,12 +2283,12 @@ int UtcDaliRenderTaskOnceNoSync03(void)
   drawTrace.Enable(true);
 
   Actor rootActor = Actor::New();
-  Stage::GetCurrent().Add( rootActor );
+  application.GetScene().Add( rootActor );
 
   CameraActor offscreenCameraActor = CameraActor::New( Size( TestApplication::DEFAULT_SURFACE_WIDTH, TestApplication::DEFAULT_SURFACE_HEIGHT ) );
-  Stage::GetCurrent().Add( offscreenCameraActor );
+  application.GetScene().Add( offscreenCameraActor );
   Actor secondRootActor = CreateRenderableActorSuccess(application, "aFile.jpg");
-  Stage::GetCurrent().Add(secondRootActor);
+  application.GetScene().Add(secondRootActor);
 
   RenderTask newTask = CreateRenderTask(application, offscreenCameraActor, rootActor, secondRootActor, RenderTask::REFRESH_ALWAYS, false);
   bool finished = false;
@@ -2320,10 +2320,10 @@ int UtcDaliRenderTaskOnceNoSync04(void)
   drawTrace.Enable(true);
 
   Actor rootActor = Actor::New();
-  Stage::GetCurrent().Add( rootActor );
+  application.GetScene().Add( rootActor );
 
   CameraActor offscreenCameraActor = CameraActor::New( Size( TestApplication::DEFAULT_SURFACE_WIDTH, TestApplication::DEFAULT_SURFACE_HEIGHT ) );
-  Stage::GetCurrent().Add( offscreenCameraActor );
+  application.GetScene().Add( offscreenCameraActor );
 
   Shader shader = CreateShader();
   Texture image = CreateTexture();
@@ -2335,7 +2335,7 @@ int UtcDaliRenderTaskOnceNoSync04(void)
   Actor secondRootActor = Actor::New();
   secondRootActor.AddRenderer(renderer);
   secondRootActor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
-  Stage::GetCurrent().Add(secondRootActor);
+  application.GetScene().Add(secondRootActor);
 
 
   RenderTask newTask = CreateRenderTask(application, offscreenCameraActor, rootActor, secondRootActor, RenderTask::REFRESH_ALWAYS, false);
@@ -2375,12 +2375,12 @@ int UtcDaliRenderTaskOnceNoSync05(void)
   drawTrace.Enable(true);
 
   Actor rootActor = Actor::New();
-  Stage::GetCurrent().Add( rootActor );
+  application.GetScene().Add( rootActor );
 
   CameraActor offscreenCameraActor = CameraActor::New( Size( TestApplication::DEFAULT_SURFACE_WIDTH, TestApplication::DEFAULT_SURFACE_HEIGHT ) );
-  Stage::GetCurrent().Add( offscreenCameraActor );
+  application.GetScene().Add( offscreenCameraActor );
   Actor secondRootActor = CreateRenderableActorSuccess(application, "aFile.jpg");
-  Stage::GetCurrent().Add(secondRootActor);
+  application.GetScene().Add(secondRootActor);
 
   RenderTask newTask = CreateRenderTask(application, offscreenCameraActor, rootActor, secondRootActor, RenderTask::REFRESH_ALWAYS, false);
   bool finished = false;
@@ -2415,12 +2415,12 @@ int UtcDaliRenderTaskOnceChain01(void)
   drawTrace.Enable(true);
 
   Actor defaultRootActor = Actor::New(); // Root for default RT
-  Stage::GetCurrent().Add( defaultRootActor );
+  application.GetScene().Add( defaultRootActor );
 
   CameraActor offscreenCameraActor = CameraActor::New( Size( TestApplication::DEFAULT_SURFACE_WIDTH, TestApplication::DEFAULT_SURFACE_HEIGHT ) );
-  Stage::GetCurrent().Add( offscreenCameraActor );
+  application.GetScene().Add( offscreenCameraActor );
   Actor firstRootActor = CreateRenderableActorSuccess(application, "aFile.jpg");
-  Stage::GetCurrent().Add(firstRootActor);
+  application.GetScene().Add(firstRootActor);
 
   // first render task
   RenderTask firstTask = CreateRenderTask(application, offscreenCameraActor, defaultRootActor, firstRootActor, RenderTask::REFRESH_ONCE, false);
@@ -2431,7 +2431,7 @@ int UtcDaliRenderTaskOnceChain01(void)
   // Second render task
   FrameBuffer fbo = firstTask.GetFrameBuffer();
   Actor secondRootActor = CreateRenderableActor( fbo.GetColorTexture() );
-  Stage::GetCurrent().Add(secondRootActor);
+  application.GetScene().Add(secondRootActor);
   RenderTask secondTask = CreateRenderTask(application, offscreenCameraActor, defaultRootActor, secondRootActor, RenderTask::REFRESH_ONCE, false);
   bool secondFinished = false;
   RenderTaskFinished renderTask2Finished( secondFinished );
@@ -2456,7 +2456,7 @@ int UtcDaliRenderTaskProperties(void)
 {
   TestApplication application;
 
-  RenderTask task = Stage::GetCurrent().GetRenderTaskList().CreateTask();
+  RenderTask task = application.GetScene().GetRenderTaskList().CreateTask();
 
   Property::IndexContainer indices;
   task.GetPropertyIndices( indices );
@@ -2476,15 +2476,15 @@ int UtcDaliRenderTaskFinishInvisibleSourceActor(void)
 
   CameraActor offscreenCameraActor = CameraActor::New();
 
-  Stage::GetCurrent().Add( offscreenCameraActor );
+  application.GetScene().Add( offscreenCameraActor );
 
   Texture image = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 10, 10 );
   Actor rootActor = CreateRenderableActor( image );
   rootActor.SetProperty( Actor::Property::SIZE, Vector2( 10.0f, 10.0f ) );
   rootActor.SetProperty( Actor::Property::VISIBLE,false);
-  Stage::GetCurrent().Add( rootActor );
+  application.GetScene().Add( rootActor );
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
   NativeImageInterfacePtr testNativeImagePtr = TestNativeImage::New(10, 10);
   Texture frameBufferTexture = Texture::New( *testNativeImagePtr );
   FrameBuffer frameBuffer = FrameBuffer::New(frameBufferTexture.GetWidth(), frameBufferTexture.GetHeight());
@@ -2559,7 +2559,7 @@ int UtcDaliRenderTaskFinishMissingImage(void)
   // Previously we had bugs where not having a resource ID would cause render-tasks to wait forever
   tet_infoline("Testing RenderTask::SignalFinished() when an Actor has no Image set");
 
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
 
   Texture image = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 10, 10 );
   Actor rootActor = CreateRenderableActor( image );
@@ -2570,7 +2570,7 @@ int UtcDaliRenderTaskFinishMissingImage(void)
   actorWithMissingImage.SetProperty( Actor::Property::SIZE, Vector2( 10.0f, 10.0f ) );
   stage.Add( actorWithMissingImage );
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
   RenderTask newTask = taskList.CreateTask();
   newTask.SetInputEnabled( false );
   newTask.SetClearColor( Vector4( 0.f, 0.f, 0.f, 0.f ) );
@@ -2597,7 +2597,7 @@ int UtcDaliRenderTaskWorldToViewport(void)
 {
   TestApplication application( 400u, 400u ); // square surface
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
@@ -2606,7 +2606,7 @@ int UtcDaliRenderTaskWorldToViewport(void)
   actor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3(0.5, 0.5, 0.5) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT, Vector3(0.5, 0.5, 0.5) );
 
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   application.SendNotification();
   application.Render();
@@ -2633,7 +2633,7 @@ int UtcDaliRenderTaskWorldToViewport(void)
   actor2.SetProperty( Actor::Property::POSITION, Vector3(0.0, 0.0, 0.0) );
   actor2.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3(0.5, 0.5, 0.0) );
   actor2.SetProperty( Actor::Property::ANCHOR_POINT, Vector3(0.5, 0.5, 0.0) );
-  Stage::GetCurrent().Add( actor2 );
+  application.GetScene().Add( actor2 );
   actor2.Add(actor);
   actor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3(0,0,0) );
 
@@ -2658,9 +2658,9 @@ int UtcDaliRenderTaskViewportToLocal(void)
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::POSITION, Vector2(10.0f, 10.0f));
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
   RenderTask task = taskList.GetTask( 0u );
 
   // flush the queue and render once
@@ -2696,9 +2696,9 @@ int UtcDaliRenderTaskOffscreenViewportToLocal(void)
   actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::POSITION, Vector2( 10.0f, 10.0f ));
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
   RenderTask task = taskList.CreateTask();
 
   FrameBuffer newFrameBuffer = FrameBuffer::New(10, 10);
@@ -2707,7 +2707,7 @@ int UtcDaliRenderTaskOffscreenViewportToLocal(void)
   task.SetScreenToFrameBufferMappingActor( actor );
 
   CameraActor offscreenCameraActor = CameraActor::New( Size( TestApplication::DEFAULT_SURFACE_WIDTH, TestApplication::DEFAULT_SURFACE_HEIGHT ) );
-  Stage::GetCurrent().Add( offscreenCameraActor );
+  application.GetScene().Add( offscreenCameraActor );
   task.SetCameraActor( offscreenCameraActor );
 
   // flush the queue and render once
@@ -2738,7 +2738,7 @@ int UtcDaliRenderTaskOffscreenViewportToLocal(void)
 int UtcDaliRenderTaskRequiresSync(void)
 {
   TestApplication application;
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
 
   RenderTask newTask = taskList.CreateTask();
   newTask.SetProperty( RenderTask::Property::REQUIRES_SYNC, false );
@@ -2764,16 +2764,16 @@ int UtcDaliRenderTaskSetClearEnabled(void)
   TestGlAbstraction& gl = application.GetGlAbstraction();
 
   Actor renderableActor = CreateRenderableActorSuccess( application, "aFile.jpg" );
-  Stage::GetCurrent().Add( renderableActor );
+  application.GetScene().Add( renderableActor );
 
   Actor rootActor = Actor::New();
-  Stage::GetCurrent().Add( rootActor );
+  application.GetScene().Add( rootActor );
 
   CameraActor offscreenCameraActor = CameraActor::New( Size( TestApplication::DEFAULT_SURFACE_WIDTH, TestApplication::DEFAULT_SURFACE_HEIGHT ) );
-  Stage::GetCurrent().Add( offscreenCameraActor );
+  application.GetScene().Add( offscreenCameraActor );
 
   Actor sourceActor = CreateRenderableActorSuccess( application, "aFile.jpg" );
-  Stage::GetCurrent().Add( sourceActor );
+  application.GetScene().Add( sourceActor );
 
   RenderTask newTask = CreateRenderTask( application, offscreenCameraActor, rootActor, sourceActor, RenderTask::REFRESH_ALWAYS, false );
 
index 8b097c5..28dd0d6 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.
@@ -82,7 +82,7 @@ int UtcDaliRenderTaskListDownCast(void)
 
   tet_infoline("Testing RenderTaskList::DownCast()");
 
-  BaseHandle base = Stage::GetCurrent().GetRenderTaskList();
+  BaseHandle base = application.GetScene().GetRenderTaskList();
 
   RenderTaskList taskList = RenderTaskList::DownCast( base );
 
@@ -99,7 +99,7 @@ int UtcDaliRenderTaskListCreateTask(void)
 
   tet_infoline("Testing RenderTaskList::CreateTask()");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
   DALI_TEST_CHECK( 1u == taskList.GetTaskCount() );
 
   taskList.CreateTask();
@@ -113,7 +113,7 @@ int UtcDaliRenderTaskListRemoveTask(void)
 
   tet_infoline("Testing RenderTaskList::RemoveTask()");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
   DALI_TEST_CHECK( 1u == taskList.GetTaskCount() );
 
   RenderTask newTask = taskList.CreateTask();
@@ -130,7 +130,7 @@ int UtcDaliRenderTaskListRemoveTaskWithExclusiveActor(void)
 
   tet_infoline("Testing RenderTaskList::RemoveTask() which has an exclusive actor set");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
   DALI_TEST_CHECK( 1u == taskList.GetTaskCount() );
 
   RenderTask newTask = taskList.CreateTask();
@@ -153,7 +153,7 @@ int UtcDaliRenderTaskListGetTaskCount(void)
 
   tet_infoline("Testing RenderTaskList::GetTaskCount()");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
   DALI_TEST_CHECK( 1u == taskList.GetTaskCount() );
 
   taskList.RemoveTask( taskList.GetTask(0u) );
@@ -167,7 +167,7 @@ int UtcDaliRenderTaskListGetTask(void)
 
   tet_infoline("Testing RenderTaskList::GetTask()");
 
-  RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
+  RenderTaskList taskList = application.GetScene().GetRenderTaskList();
   RenderTask defaultTask = taskList.GetTask( 0u );
   DALI_TEST_CHECK( 1u == taskList.GetTaskCount() );
   DALI_TEST_CHECK( defaultTask );
index 57188cf..00f5038 100644 (file)
@@ -255,7 +255,7 @@ int UtcDaliRendererSetGetGeometry(void)
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   application.SendNotification();
   application.Render(0);
@@ -290,7 +290,7 @@ int UtcDaliRendererSetGetShader(void)
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   TestGlAbstraction& gl = application.GetGlAbstraction();
   application.SendNotification();
@@ -330,7 +330,7 @@ int UtcDaliRendererSetGetDepthIndex(void)
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   application.SendNotification();
   application.Render(0);
@@ -369,7 +369,7 @@ int UtcDaliRendererSetGetFaceCullingMode(void)
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // By default, none of the faces should be culled
   unsigned int cullFace = renderer.GetProperty<int>( Renderer::Property::FACE_CULLING_MODE );
@@ -456,7 +456,7 @@ int UtcDaliRendererBlendOptions01(void)
   actor.SetProperty( Actor::Property::OPACITY, 0.5f );
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   renderer.SetProperty( Renderer::Property::BLEND_FACTOR_SRC_RGB,    BlendFactor::ONE_MINUS_SRC_COLOR );
   renderer.SetProperty( Renderer::Property::BLEND_FACTOR_DEST_RGB,   BlendFactor::SRC_ALPHA_SATURATE  );
@@ -501,7 +501,7 @@ int UtcDaliRendererBlendOptions02(void)
   actor.SetProperty( Actor::Property::OPACITY, 0.5f ); // enable blending
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   renderer.SetProperty( Renderer::Property::BLEND_FACTOR_SRC_RGB,    BlendFactor::CONSTANT_COLOR );
   renderer.SetProperty( Renderer::Property::BLEND_FACTOR_DEST_RGB,   BlendFactor::ONE_MINUS_CONSTANT_COLOR );
@@ -546,7 +546,7 @@ int UtcDaliRendererBlendOptions03(void)
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Test the defaults as documented in blending.h
   int equationRgb   = renderer.GetProperty<int>( Renderer::Property::BLEND_EQUATION_RGB );
@@ -572,7 +572,7 @@ int UtcDaliRendererBlendOptions04(void)
   actor.SetProperty( Actor::Property::OPACITY, 0.1f );
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Test the single blending equation setting
   {
@@ -617,7 +617,7 @@ int UtcDaliRendererSetBlendMode01(void)
   actor.SetProperty( Actor::Property::OPACITY, 0.98f );
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON);
 
@@ -649,7 +649,7 @@ int UtcDaliRendererSetBlendMode01b(void)
   actor.SetProperty( Actor::Property::OPACITY, 0.0f );
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON);
 
@@ -684,7 +684,7 @@ int UtcDaliRendererSetBlendMode02(void)
   actor.SetProperty( Actor::Property::OPACITY, 0.15f );
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::OFF);
 
@@ -716,7 +716,7 @@ int UtcDaliRendererSetBlendMode03(void)
   actor.SetProperty( Actor::Property::OPACITY, 0.75f );
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::AUTO);
 
@@ -747,7 +747,7 @@ int UtcDaliRendererSetBlendMode04(void)
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::AUTO);
 
@@ -779,7 +779,7 @@ int UtcDaliRendererSetBlendMode04b(void)
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
   actor.SetProperty( Actor::Property::COLOR, Vector4(1.0f, 0.0f, 1.0f, 0.5f) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::AUTO);
 
@@ -811,7 +811,7 @@ int UtcDaliRendererSetBlendMode04c(void)
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
   actor.SetProperty( Actor::Property::COLOR, Color::MAGENTA );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::AUTO);
 
@@ -846,7 +846,7 @@ int UtcDaliRendererSetBlendMode05(void)
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::AUTO);
 
@@ -877,7 +877,7 @@ int UtcDaliRendererSetBlendMode06(void)
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::AUTO);
 
@@ -911,7 +911,7 @@ int UtcDaliRendererSetBlendMode07(void)
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::AUTO);
 
@@ -971,7 +971,7 @@ int UtcDaliRendererSetBlendColor(void)
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
 
@@ -1044,7 +1044,7 @@ int UtcDaliRendererPreMultipledAlpha(void)
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
   actor.SetProperty( Actor::Property::COLOR, Vector4(1.0f, 0.0f, 1.0f, 0.5f) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   Property::Value value = renderer.GetProperty( Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA );
   bool preMultipliedAlpha;
@@ -1139,7 +1139,7 @@ int UtcDaliRendererConstraint01(void)
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   Vector4 initialColor = Color::WHITE;
   Property::Index colorIndex = renderer.RegisterProperty( "uFadeColor", initialColor );
@@ -1181,7 +1181,7 @@ int UtcDaliRendererConstraint02(void)
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   application.SendNotification();
   application.Render(0);
 
@@ -1235,7 +1235,7 @@ int UtcDaliRendererAnimatedProperty01(void)
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   Vector4 initialColor = Color::WHITE;
   Property::Index colorIndex = renderer.RegisterProperty( "uFadeColor", initialColor );
@@ -1276,7 +1276,7 @@ int UtcDaliRendererAnimatedProperty02(void)
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   application.SendNotification();
   application.Render(0);
 
@@ -1330,7 +1330,7 @@ int UtcDaliRendererUniformMapPrecendence01(void)
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   application.SendNotification();
   application.Render(0);
 
@@ -1387,7 +1387,7 @@ int UtcDaliRendererUniformMapPrecendence02(void)
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   application.SendNotification();
   application.Render(0);
 
@@ -1445,7 +1445,7 @@ int UtcDaliRendererUniformMapPrecendence03(void)
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   application.SendNotification();
   application.Render(0);
 
@@ -1483,7 +1483,7 @@ int UtcDaliRendererUniformMapMultipleUniforms01(void)
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   application.SendNotification();
   application.Render(0);
 
@@ -1530,7 +1530,7 @@ int UtcDaliRendererUniformMapMultipleUniforms02(void)
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   application.SendNotification();
   application.Render(0);
 
@@ -1599,7 +1599,7 @@ int UtcDaliRendererRenderOrder2DLayer(void)
   Shader shader = Shader::New("VertexSource", "FragmentSource");
   Geometry geometry = CreateQuadGeometry();
 
-  Actor root = Stage::GetCurrent().GetRootLayer();
+  Actor root = application.GetScene().GetRootLayer();
 
   Actor actor0 = CreateActor( root, 0, TEST_LOCATION );
   Renderer renderer0 = CreateRenderer( actor0, geometry, shader, 0 );
@@ -1691,7 +1691,7 @@ int UtcDaliRendererRenderOrder2DLayerMultipleRenderers(void)
   Shader shader = Shader::New("VertexSource", "FragmentSource");
   Geometry geometry = CreateQuadGeometry();
 
-  Actor root = Stage::GetCurrent().GetRootLayer();
+  Actor root = application.GetScene().GetRootLayer();
 
   Actor actor0 = CreateActor( root, 0, TEST_LOCATION );
   Actor actor1 = CreateActor( actor0, 0, TEST_LOCATION );
@@ -1779,7 +1779,7 @@ int UtcDaliRendererRenderOrder2DLayerSiblingOrder(void)
 
   Shader shader = Shader::New("VertexSource", "FragmentSource");
   Geometry geometry = CreateQuadGeometry();
-  Actor root = Stage::GetCurrent().GetRootLayer();
+  Actor root = application.GetScene().GetRootLayer();
   Actor actor0 = CreateActor( root,   1, TEST_LOCATION );
   Actor actor1 = CreateActor( root,   0, TEST_LOCATION );
   Actor actor2 = CreateActor( actor0, 0, TEST_LOCATION );
@@ -1846,7 +1846,7 @@ int UtcDaliRendererRenderOrder2DLayerOverlay(void)
 
   Shader shader = Shader::New("VertexSource", "FragmentSource");
   Geometry geometry = CreateQuadGeometry();
-  Actor root = Stage::GetCurrent().GetRootLayer();
+  Actor root = application.GetScene().GetRootLayer();
 
   /*
    * Create the following hierarchy:
@@ -1988,7 +1988,7 @@ int UtcDaliRendererSetIndexRange(void)
   Renderer renderer = Renderer::New( geometry, shader );
   actor.AddRenderer( renderer );
 
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
   stage.Add( actor );
 
   char buffer[ 128 ];
@@ -2081,7 +2081,7 @@ int UtcDaliRendererSetDepthFunction(void)
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
   stage.GetRootLayer().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
   stage.Add(actor);
 
@@ -2254,7 +2254,7 @@ int UtcDaliRendererEnumProperties(void)
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   /*
    * Here we use a templatized function to perform several checks on each enumeration property.
@@ -2290,7 +2290,7 @@ Renderer RendererTestFixture( TestApplication& application )
   Actor actor = Actor::New();
   actor.AddRenderer( renderer );
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene stage = application.GetScene();
   stage.GetRootLayer().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
   stage.Add( actor );
 
@@ -2340,7 +2340,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().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_UI );
+  application.GetScene().GetRootLayer().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_UI );
 
   glEnableDisableStack.Reset();
   application.SendNotification();
@@ -2350,7 +2350,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().SetProperty(Layer::Property::DEPTH_TEST, true );
+  application.GetScene().GetRootLayer().SetProperty(Layer::Property::DEPTH_TEST, true );
 
   glEnableDisableStack.Reset();
   application.SendNotification();
@@ -2785,7 +2785,7 @@ int UtcDaliRendererWrongNumberOfTextures(void)
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::POSITION, Vector2(0.0f,0.0f));
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   TestGlAbstraction& gl = application.GetGlAbstraction();
   TraceCallStack& drawTrace = gl.GetDrawTrace();
@@ -2827,7 +2827,7 @@ int UtcDaliRendererOpacity(void)
   actor.AddRenderer( renderer );
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
   actor.SetProperty( Actor::Property::COLOR, Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) );
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   Property::Value value = renderer.GetProperty( DevelRenderer::Property::OPACITY );
   float opacity;
@@ -2875,7 +2875,7 @@ int UtcDaliRendererOpacityAnimation(void)
   actor.AddRenderer( renderer );
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
   actor.SetProperty( Actor::Property::COLOR, Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) );
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   application.SendNotification();
   application.Render(0);
@@ -2927,7 +2927,7 @@ int UtcDaliRendererInvalidProperty(void)
   Actor actor = Actor::New();
   actor.AddRenderer( renderer );
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   application.SendNotification();
   application.Render(0);
@@ -2955,7 +2955,7 @@ int UtcDaliRendererRenderingBehavior(void)
   actor.AddRenderer( renderer );
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
   actor.SetProperty( Actor::Property::COLOR, Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) );
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   Property::Value value = renderer.GetProperty( DevelRenderer::Property::RENDERING_BEHAVIOR );
   int renderingBehavior;
@@ -3023,7 +3023,7 @@ int UtcDaliRendererRegenerateUniformMap(void)
   actor.AddRenderer( renderer );
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
   actor.SetProperty( Actor::Property::COLOR, Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) );
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   application.SendNotification();
   application.Render();
index 353b6f8..cfe42b0 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.
@@ -94,9 +94,10 @@ struct GestureReceivedFunctor
 // Functor that removes the gestured actor from stage
 struct UnstageActorFunctor : public GestureReceivedFunctor
 {
-  UnstageActorFunctor( SignalData& data, Gesture::State& stateToUnstage )
+  UnstageActorFunctor( SignalData& data, Gesture::State& stateToUnstage, Integration::Scene scene )
   : GestureReceivedFunctor( data ),
-    stateToUnstage( stateToUnstage )
+    stateToUnstage( stateToUnstage ),
+    scene( scene )
   {
   }
 
@@ -106,11 +107,12 @@ struct UnstageActorFunctor : public GestureReceivedFunctor
 
     if ( rotation.state == stateToUnstage )
     {
-      Stage::GetCurrent().Remove( actor );
+      scene.Remove( actor );
     }
   }
 
   Gesture::State& stateToUnstage;
+  Integration::Scene scene;
 };
 
 // Functor for receiving a touch event
@@ -172,7 +174,7 @@ int UtcDaliRotationGestureDetectorNew(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -233,7 +235,7 @@ int UtcDaliRotationGestureSignalReceptionNegative(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -275,7 +277,7 @@ int UtcDaliRotationGestureSignalReceptionDownMotionLeave(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -332,7 +334,7 @@ int UtcDaliRotationGestureSignalReceptionDownMotionUp(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -380,7 +382,7 @@ int UtcDaliRotationGestureSignalReceptionDetach(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -431,7 +433,7 @@ int UtcDaliRotationGestureSignalReceptionDetachWhileRotationing(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -483,7 +485,7 @@ int UtcDaliRotationGestureSignalReceptionActorDestroyedWhileRotationing(void)
   Actor tempActor = Actor::New();
   tempActor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   tempActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT);
-  Stage::GetCurrent().Add(tempActor);
+  application.GetScene().Add(tempActor);
   detector.Attach(tempActor);
 
   // Actor lifetime is scoped
@@ -491,7 +493,7 @@ int UtcDaliRotationGestureSignalReceptionActorDestroyedWhileRotationing(void)
     Actor actor = Actor::New();
     actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
     actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-    Stage::GetCurrent().Add(actor);
+    application.GetScene().Add(actor);
 
     // Render and notify
     application.SendNotification();
@@ -513,7 +515,7 @@ int UtcDaliRotationGestureSignalReceptionActorDestroyedWhileRotationing(void)
     DALI_TEST_EQUALS(Gesture::Continuing, data.receivedGesture.state, TEST_LOCATION);
 
     // Remove the actor from stage and reset the data
-    Stage::GetCurrent().Remove(actor);
+    application.GetScene().Remove(actor);
 
     // Render and notify
     application.SendNotification();
@@ -537,7 +539,7 @@ int UtcDaliRotationGestureSignalReceptionRotatedActor(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ORIENTATION, Quaternion(Dali::Degree(90.0f), Vector3::ZAXIS) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify a couple of times
   application.SendNotification();
@@ -599,7 +601,7 @@ int UtcDaliRotationGestureSignalReceptionChildHit(void)
   Actor parent = Actor::New();
   parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(parent);
+  application.GetScene().Add(parent);
 
   // Set child to completely cover parent.
   // Change rotation of child to be different from parent so that we can check if our local coordinate
@@ -661,13 +663,13 @@ int UtcDaliRotationGestureSignalReceptionAttachDetachMany(void)
   Actor first = Actor::New();
   first.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   first.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(first);
+  application.GetScene().Add(first);
 
   Actor second = Actor::New();
   second.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   second.SetProperty( Actor::Property::POSITION_X, 100.0f);
   second.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(second);
+  application.GetScene().Add(second);
 
   // Render and notify
   application.SendNotification();
@@ -712,7 +714,7 @@ int UtcDaliRotationGestureSignalReceptionActorBecomesUntouchable(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -758,12 +760,12 @@ int UtcDaliRotationGestureSignalReceptionMultipleDetectorsOnActor(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   Actor actor2 = Actor::New();
   actor2.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT);
-  Stage::GetCurrent().Add(actor2);
+  application.GetScene().Add(actor2);
 
   // Render and notify
   application.SendNotification();
@@ -837,7 +839,7 @@ int UtcDaliRotationGestureSignalReceptionEnsureCorrectSignalling(void)
   Actor actor1 = Actor::New();
   actor1.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor1);
+  application.GetScene().Add(actor1);
   SignalData data1;
   GestureReceivedFunctor functor1(data1);
   RotationGestureDetector detector1 = RotationGestureDetector::New();
@@ -848,7 +850,7 @@ int UtcDaliRotationGestureSignalReceptionEnsureCorrectSignalling(void)
   actor2.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT);
   actor2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::BOTTOM_RIGHT);
-  Stage::GetCurrent().Add(actor2);
+  application.GetScene().Add(actor2);
   SignalData data2;
   GestureReceivedFunctor functor2(data2);
   RotationGestureDetector detector2 = RotationGestureDetector::New();
@@ -874,7 +876,7 @@ int UtcDaliRotationGestureActorUnstaged(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -885,7 +887,7 @@ int UtcDaliRotationGestureActorUnstaged(void)
 
   // Attach actor to detector
   SignalData data;
-  UnstageActorFunctor functor( data, stateToUnstage );
+  UnstageActorFunctor functor( data, stateToUnstage, application.GetScene() );
   RotationGestureDetector detector = RotationGestureDetector::New();
   detector.Attach(actor);
   detector.DetectedSignal().Connect( &application, functor );
@@ -905,7 +907,7 @@ int UtcDaliRotationGestureActorUnstaged(void)
   application.Render();
 
   // Re-add actor to stage
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -933,7 +935,7 @@ int UtcDaliRotationGestureActorUnstaged(void)
   application.Render();
 
   // Re-add actor to stage
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -965,14 +967,14 @@ int UtcDaliRotationGestureActorStagedAndDestroyed(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Create and add a second actor so that GestureDetector destruction does not come into play.
   Actor dummyActor( Actor::New() );
   dummyActor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   dummyActor.SetProperty( Actor::Property::POSITION, Vector2( 100.0f, 100.0f ));
   dummyActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(dummyActor);
+  application.GetScene().Add(dummyActor);
 
   // Render and notify
   application.SendNotification();
@@ -983,7 +985,7 @@ int UtcDaliRotationGestureActorStagedAndDestroyed(void)
 
   // Attach actor to detector
   SignalData data;
-  UnstageActorFunctor functor( data, stateToUnstage );
+  UnstageActorFunctor functor( data, stateToUnstage, application.GetScene() );
   RotationGestureDetector detector = RotationGestureDetector::New();
   detector.Attach(actor);
   detector.Attach(dummyActor);
@@ -1004,7 +1006,7 @@ int UtcDaliRotationGestureActorStagedAndDestroyed(void)
   application.Render();
 
   // Re add to the stage, we should not be signalled
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -1057,7 +1059,7 @@ int UtcDaliRotationGestureLayerConsumesTouch(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Add a detector
   SignalData data;
@@ -1070,7 +1072,7 @@ int UtcDaliRotationGestureLayerConsumesTouch(void)
   Layer layer = Layer::New();
   layer.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add( layer );
+  application.GetScene().Add( layer );
   layer.RaiseToTop();
 
   // Render and notify
index 04d723c..3d23517 100644 (file)
@@ -117,7 +117,7 @@ int UtcDaliRotationGestureRecognizerMinimumTouchEvents(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   application.SendNotification();
   application.Render();
@@ -158,7 +158,7 @@ int UtcDaliRotationGestureRecognizerMinimumTouchEventsAfterStart(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   application.SendNotification();
   application.Render();
index 4ea197b..6f7ca28 100644 (file)
@@ -134,7 +134,7 @@ int UtcSamplerSetFilterMode(void)
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
 
   TestGlAbstraction& gl = application.GetGlAbstraction();
@@ -265,7 +265,7 @@ int UtcSamplerSetWrapMode1(void)
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   TestGlAbstraction& gl = application.GetGlAbstraction();
 
@@ -354,7 +354,7 @@ int UtcSamplerSetWrapMode2(void)
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   TestGlAbstraction& gl = application.GetGlAbstraction();
 
index 0b6ef44..d6857bb 100644 (file)
@@ -920,7 +920,7 @@ int UtcDaliSceneSurfaceResizedDefaultSceneViewport(void)
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render before resizing surface
   application.SendNotification();
@@ -963,7 +963,7 @@ int UtcDaliSceneSurfaceResizedMultipleRenderTasks(void)
   glAbstraction.EnableViewportCallTrace( true );
 
   // Initial scene setup
-  auto stage = Stage::GetCurrent();
+  auto scene = application.GetScene();
 
   Geometry geometry = CreateQuadGeometry();
   Shader shader = CreateShader();
@@ -974,14 +974,14 @@ int UtcDaliSceneSurfaceResizedMultipleRenderTasks(void)
   int testWidth = 400;
   int testHeight = 400;
   actor.SetProperty( Actor::Property::SIZE, Vector2( testWidth, testHeight) );
-  stage.Add(actor);
+  scene.Add(actor);
 
   CameraActor offscreenCameraActor = CameraActor::New( Size( testWidth, testHeight ) );
-  Stage::GetCurrent().Add( offscreenCameraActor );
+  application.GetScene().Add( offscreenCameraActor );
 
   FrameBuffer newFrameBuffer = FrameBuffer::New( testWidth, testHeight, FrameBuffer::Attachment::NONE );
 
-  RenderTask newTask = stage.GetRenderTaskList().CreateTask();
+  RenderTask newTask = scene.GetRenderTaskList().CreateTask();
   newTask.SetCameraActor( offscreenCameraActor );
   newTask.SetSourceActor( actor );
   newTask.SetFrameBuffer( newFrameBuffer );
@@ -1003,6 +1003,7 @@ int UtcDaliSceneSurfaceResizedMultipleRenderTasks(void)
   DALI_TEST_CHECK( defaultScene );
 
   // Ensure stage size matches the scene size
+  auto stage = Stage::GetCurrent();
   DALI_TEST_EQUALS( stage.GetSize(), defaultScene.GetSize(), TEST_LOCATION );
 
   // Resize the scene
@@ -1195,7 +1196,7 @@ int UtcDaliSceneEmptySceneRendering(void)
   actor.AddRenderer( renderer );
   
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400, 400 ) );
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   // Render
   application.SendNotification();
@@ -1206,7 +1207,7 @@ int UtcDaliSceneEmptySceneRendering(void)
   DALI_TEST_EQUALS( application.GetRenderNeedsPostRender(), true, TEST_LOCATION );
 
   // Remove the Renderer
-  Stage::GetCurrent().Remove( actor );
+  application.GetScene().Remove( actor );
   actor.Reset();
   renderer.Reset();
 
@@ -1234,7 +1235,7 @@ int UtcDaliSceneFrameRenderedPresentedCallback(void)
 
   Actor actor = Actor::New();
   actor.AddRenderer( renderer );
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   Dali::Integration::Scene scene = application.GetScene();
 
index 38367c1..e707c3f 100644 (file)
@@ -96,7 +96,7 @@ void TestEnumStrings(
     Actor actor = Actor::New();
     (actor.*method)( ( T ) values[i].value );
 
-    Stage::GetCurrent().Add( actor );
+    application.GetScene().Add( actor );
     application.SendNotification();
     application.Render();
 
@@ -107,7 +107,7 @@ void TestEnumStrings(
     DALI_TEST_CHECK( NULL != map.Find( keyName ) );
     DALI_TEST_EQUALS( map.Find( keyName )->Get< std::string >(), values[i].string, TEST_LOCATION );
 
-    Stage::GetCurrent().Remove( actor );
+    application.GetScene().Remove( actor );
   }
 }
 
@@ -192,7 +192,7 @@ int UtcDaliScriptingNewActorProperties(void)
     Actor handle = NewActor( map );
     DALI_TEST_CHECK( handle );
 
-    Stage::GetCurrent().Add( handle );
+    application.GetScene().Add( handle );
     application.SendNotification();
     application.Render();
 
@@ -209,7 +209,7 @@ int UtcDaliScriptingNewActorProperties(void)
     DALI_TEST_EQUALS( handle.GetProperty< bool >( Actor::Property::INHERIT_ORIENTATION ), false, TEST_LOCATION );
     DALI_TEST_EQUALS( handle.GetProperty< bool >( Actor::Property::INHERIT_SCALE ), false, TEST_LOCATION );
 
-    Stage::GetCurrent().Remove( handle );
+    application.GetScene().Remove( handle );
   }
 
   // Check Anchor point and parent origin vector3s
@@ -219,14 +219,14 @@ int UtcDaliScriptingNewActorProperties(void)
     Actor handle = NewActor( map );
     DALI_TEST_CHECK( handle );
 
-    Stage::GetCurrent().Add( handle );
+    application.GetScene().Add( handle );
     application.SendNotification();
     application.Render();
 
     DALI_TEST_EQUALS( handle.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::TOP_CENTER, TEST_LOCATION );
     DALI_TEST_EQUALS( handle.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), AnchorPoint::TOP_LEFT, TEST_LOCATION );
 
-    Stage::GetCurrent().Remove( handle );
+    application.GetScene().Remove( handle );
   }
 
   // Check Anchor point and parent origin STRINGS
@@ -236,14 +236,14 @@ int UtcDaliScriptingNewActorProperties(void)
     Actor handle = NewActor( map );
     DALI_TEST_CHECK( handle );
 
-    Stage::GetCurrent().Add( handle );
+    application.GetScene().Add( handle );
     application.SendNotification();
     application.Render();
 
     DALI_TEST_EQUALS( handle.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::TOP_LEFT, TEST_LOCATION );
     DALI_TEST_EQUALS( handle.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), AnchorPoint::CENTER_LEFT, TEST_LOCATION );
 
-    Stage::GetCurrent().Remove( handle );
+    application.GetScene().Remove( handle );
   }
   END_TEST;
 }
@@ -269,7 +269,7 @@ int UtcDaliScriptingNewAnimation(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::NAME,"Actor1");
   actor.SetProperty( Actor::Property::COLOR,Color::CYAN);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   Animation anim = data.CreateAnimation( actor, 0.5f );
   anim.Play();
@@ -308,7 +308,7 @@ int UtcDaliScriptingNewActorChildren(void)
   Actor handle = NewActor( map );
   DALI_TEST_CHECK( handle );
 
-  Stage::GetCurrent().Add( handle );
+  application.GetScene().Add( handle );
   application.SendNotification();
   application.Render();
 
@@ -321,7 +321,7 @@ int UtcDaliScriptingNewActorChildren(void)
   DALI_TEST_EQUALS( child1.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::YAXIS, TEST_LOCATION );
   DALI_TEST_EQUALS( child1.GetChildCount(), 0u, TEST_LOCATION );
 
-  Stage::GetCurrent().Remove( handle );
+  application.GetScene().Remove( handle );
   END_TEST;
 }
 
@@ -340,7 +340,7 @@ int UtcDaliScriptingCreatePropertyMapActor(void)
     DALI_TEST_CHECK( NULL != map.Find( "type" ) );
     DALI_TEST_EQUALS( map.Find( "type")->Get< std::string >(), "Actor", TEST_LOCATION );
 
-    Stage::GetCurrent().Remove( actor );
+    application.GetScene().Remove( actor );
   }
 
   // Layer Type
@@ -353,7 +353,7 @@ int UtcDaliScriptingCreatePropertyMapActor(void)
     DALI_TEST_CHECK( NULL != map.Find( "type" ) );
     DALI_TEST_EQUALS( map.Find( "type" )->Get< std::string >(), "Layer", TEST_LOCATION );
 
-    Stage::GetCurrent().Remove( actor );
+    application.GetScene().Remove( actor );
   }
 
   // Default properties
@@ -373,7 +373,7 @@ int UtcDaliScriptingCreatePropertyMapActor(void)
     actor.SetProperty( Actor::Property::INHERIT_SCALE, false );
     actor.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3::ONE );
 
-    Stage::GetCurrent().Add( actor );
+    application.GetScene().Add( actor );
     application.SendNotification();
     application.Render();
 
@@ -408,7 +408,7 @@ int UtcDaliScriptingCreatePropertyMapActor(void)
     DALI_TEST_CHECK( NULL != map.Find( "sizeModeFactor" ) );
     DALI_TEST_EQUALS( map.Find( "sizeModeFactor" )->Get< Vector3 >(), Vector3::ONE, TEST_LOCATION );
 
-    Stage::GetCurrent().Remove( actor );
+    application.GetScene().Remove( actor );
   }
 
   // Children
@@ -417,7 +417,7 @@ int UtcDaliScriptingCreatePropertyMapActor(void)
     Actor child = Layer::New();
     actor.Add( child );
 
-    Stage::GetCurrent().Add( actor );
+    application.GetScene().Add( actor );
     application.SendNotification();
     application.Render();
 
@@ -436,7 +436,7 @@ int UtcDaliScriptingCreatePropertyMapActor(void)
     DALI_TEST_CHECK( childMap.Find( "type" ) );
     DALI_TEST_EQUALS( childMap.Find( "type" )->Get< std::string >(), "Layer", TEST_LOCATION );
 
-    Stage::GetCurrent().Remove( actor );
+    application.GetScene().Remove( actor );
   }
   END_TEST;
 }
index 3336e20..6a06fa3 100644 (file)
@@ -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.
@@ -148,7 +148,7 @@ int UtcDaliShaderConstraint01(void)
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   Vector4 initialColor = Color::WHITE;
   Property::Index colorIndex = shader.RegisterProperty( "uFadeColor", initialColor );
@@ -190,7 +190,7 @@ int UtcDaliShaderConstraint02(void)
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   application.SendNotification();
   application.Render(0);
 
@@ -244,7 +244,7 @@ int UtcDaliShaderAnimatedProperty01(void)
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   Vector4 initialColor = Color::WHITE;
   Property::Index colorIndex = shader.RegisterProperty( "uFadeColor", initialColor );
@@ -285,7 +285,7 @@ int UtcDaliShaderAnimatedProperty02(void)
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   application.SendNotification();
   application.Render(0);
 
index d4743e1..b9420bc 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.
@@ -155,10 +155,10 @@ int UtcDaliSignalDelegateConnectToMemberP(void)
   // Note: It is at this point that the delegate internally makes the connection.
   testObject.ConnectToInternalMember();
 
-  // Add the actor to the stage to trigger it's "onStage" signal.
+  // Add the actor to the scene to trigger it's "onStage" signal.
   // If the delegate connected correctly, this will call the member
   // function in the test object and set a global flag.
-  Stage::GetCurrent().Add( connectActor );
+  application.GetScene().Add( connectActor );
 
   // Check the global flag to confirm the signal was received.
   DALI_TEST_CHECK( gSignalReceived );
@@ -217,10 +217,10 @@ int UtcDaliSignalDelegateConnectToFunctorP(void)
   // Check the signal delegate has made the connection.
   DALI_TEST_CHECK( signalDelegate.IsConnected() );
 
-  // Add the actor to the stage to trigger it's "onStage" signal.
+  // Add the actor to the scene to trigger it's "onStage" signal.
   // If the delegate connected correctly, this will call the () operator of our
   // passed-in functor, the functor will in turn set a global flag.
-  Stage::GetCurrent().Add( connectActor );
+  application.GetScene().Add( connectActor );
 
   // Check the global flag to confirm the signal was received.
   DALI_TEST_CHECK( gSignalReceived );
index 09c8704..3c21c13 100644 (file)
@@ -92,7 +92,7 @@ float StaticFloatCallbackFloatValueFloatValue( float value1, float value2 )
 
 int UtcDaliSignalEmptyP(void)
 {
-  TestApplication app; // Create core for debug logging
+  TestApplication application; // Create core for debug logging
 
   // Test that Empty() is true, when no slots connected to the signal
 
@@ -115,7 +115,7 @@ int UtcDaliSignalEmptyP(void)
 
 int UtcDaliSignalEmptyN(void)
 {
-  TestApplication app; // Create core for debug logging
+  TestApplication application; // Create core for debug logging
 
   // Test that Empty() is false after signal connection
   TestSignals::VoidRetNoParamSignal signal;
@@ -128,7 +128,7 @@ int UtcDaliSignalEmptyN(void)
 
 int UtcDaliSignalGetConnectionCountP(void)
 {
-  TestApplication app; // Create core for debug logging
+  TestApplication application; // Create core for debug logging
 
   TestSignals::VoidRetNoParamSignal signal;
   TestSlotHandler handler;
@@ -144,7 +144,7 @@ int UtcDaliSignalGetConnectionCountP(void)
 
 int UtcDaliSignalGetConnectionCountN(void)
 {
-  TestApplication app; // Create core for debug logging
+  TestApplication application; // Create core for debug logging
   TestSignals::VoidRetNoParamSignal signal;
   DALI_TEST_CHECK( signal.GetConnectionCount() == 0 );
   END_TEST;
@@ -156,7 +156,7 @@ int UtcDaliSignalGetConnectionCountN(void)
  */
 int UtcDaliSignalConnectP01(void)
 {
-  TestApplication app; // Create core for debug logging
+  TestApplication application; // Create core for debug logging
 
   // test static function: void Connect( void (*func)() )
   TestSignals::VoidRetNoParamSignal signal;
@@ -172,7 +172,7 @@ int UtcDaliSignalConnectN01(void)
   // difficult to perform a negative test on Connect as no checks are performed
   // when creating a callback for a null function ( during Connect).
   // so we test an assert on Emit
-  TestApplication app; // Create core for debug logging
+  TestApplication application; // Create core for debug logging
 
   TestSignals::VoidRetNoParamSignal signal;
   signal.Connect( NULL );
@@ -192,7 +192,7 @@ int UtcDaliSignalConnectN01(void)
 
 int UtcDaliSignalConnectP02(void)
 {
-  TestApplication app; // Create core for debug logging
+  TestApplication application; // Create core for debug logging
 
   // test member function: Connect( X* obj, void (X::*func)() ))
   TestSignals::VoidRetNoParamSignal signal;
@@ -206,7 +206,7 @@ int UtcDaliSignalConnectP02(void)
 
 int UtcDaliSignalConnectN02(void)
 {
-  TestApplication app; // Create core for debug logging
+  TestApplication application; // Create core for debug logging
 
   TestSignals::VoidRetNoParamSignal signal;
   try
@@ -226,7 +226,7 @@ int UtcDaliSignalConnectN02(void)
 
 int UtcDaliSignalConnectP03(void)
 {
-  TestApplication app; // Create core for debug logging
+  TestApplication application; // Create core for debug logging
 
   // test slot delegate: Connect( SlotDelegate<X>& delegate, void (X::*func)() )
   TestSignals::VoidRetNoParamSignal signal;
@@ -241,7 +241,7 @@ int UtcDaliSignalConnectP03(void)
 
 int UtcDaliSignalConnectN03(void)
 {
-  TestApplication app; // Create core for debug logging
+  TestApplication application; // Create core for debug logging
   // the delegate is passed by reference, so you can't pass null.
   tet_result( TET_PASS );
   END_TEST;
@@ -249,7 +249,7 @@ int UtcDaliSignalConnectN03(void)
 
 int UtcDaliSignalConnectP04(void)
 {
-  TestApplication app; // Create core for debug logging
+  TestApplication application; // Create core for debug logging
 
   //  test function object: Connect( ConnectionTrackerInterface* connectionTracker, const X& func )
   TestSlotHandler handler;
@@ -286,7 +286,7 @@ int UtcDaliSignalConnectN04(void)
 
 int UtcDaliSignalConnectP05(void)
 {
-  TestApplication app; // Create core for debug logging
+  TestApplication application; // Create core for debug logging
 
   // test function object using FunctorDelegate.
   // :Connect( ConnectionTrackerInterface* connectionTracker, FunctorDelegate* delegate )
@@ -312,7 +312,7 @@ int UtcDaliSignalConnectP05(void)
 
 int UtcDaliSignalConnectN05(void)
 {
-  TestApplication app; // Create core for debug logging
+  TestApplication application; // Create core for debug logging
 
   // for negative test we try to connect a null connection tracker to the signal
   // :Connect( ConnectionTrackerInterface == NULL, FunctorDelegate* delegate )
@@ -338,7 +338,7 @@ int UtcDaliSignalConnectN05(void)
  */
 int UtcDaliSignalDisconnectP01(void)
 {
-  TestApplication app; // Create core for debug logging
+  TestApplication application; // Create core for debug logging
 
   // test static function:  Disconnect( void (*func)( Arg0 arg0 ) )
 
@@ -353,7 +353,7 @@ int UtcDaliSignalDisconnectP01(void)
  }
 int UtcDaliSignalDisconnectN01(void)
 {
-  TestApplication app; // Create core for debug logging
+  TestApplication application; // Create core for debug logging
 
   // 1. Disconnect using the function
   TestSignals::VoidRetNoParamSignal signal;
@@ -369,7 +369,7 @@ int UtcDaliSignalDisconnectN01(void)
 
 int UtcDaliSignalDisconnectP02(void)
 {
-  TestApplication app; // Create core for debug logging
+  TestApplication application; // Create core for debug logging
 
   // test member function: Disconnect( X* obj, void (X::*func)( Arg0 arg0 ) )
   TestSignals::VoidRetNoParamSignal signal;
@@ -384,7 +384,7 @@ int UtcDaliSignalDisconnectP02(void)
 }
 int UtcDaliSignalDisconnectN02(void)
 {
-  TestApplication app; // Create core for debug logging
+  TestApplication application; // Create core for debug logging
 
   // 1. Disconnect using a null connection tracker
   TestSignals::VoidRetNoParamSignal signal;
@@ -409,7 +409,7 @@ int UtcDaliSignalDisconnectN02(void)
 
 int UtcDaliSignalDisconnectP03(void)
 {
-  TestApplication app; // Create core for debug logging
+  TestApplication application; // Create core for debug logging
 
   // test slot delegate: Disconnect( SlotDelegate<X>& delegate, void (X::*func)( Arg0 arg0 ) )
   TestSignals::VoidRetNoParamSignal signal;
@@ -424,7 +424,7 @@ int UtcDaliSignalDisconnectP03(void)
 
 int UtcDaliSignalDisconnectN03(void)
 {
-  TestApplication app; // Create core for debug logging
+  TestApplication application; // Create core for debug logging
 
    // try to disconnect from the wrong signal
   TestSignals::VoidRetNoParamSignal signal;
@@ -1576,7 +1576,7 @@ int UtcDaliSignalDisconnectDuringCallback2(void)
 
 int UtcDaliSignalEmitDuringCallback(void)
 {
-  TestApplication app; // Create core for debug logging
+  TestApplication application; // Create core for debug logging
 
   // for coverage purposes we test the emit guard for each signal type (0,1,2,3 params) void / return value
   {
@@ -1641,7 +1641,7 @@ int UtcDaliSignalDeleteDuringEmit(void)
   // testing a signal deletion during an emit
   // need to dynamically allocate the signal for this to work
 
-  TestApplication app; // Create core for debug logging
+  TestApplication application; // Create core for debug logging
 
   TestSignals::VoidRetNoParamSignal* signal = new TestSignals::VoidRetNoParamSignal;
 
old mode 100755 (executable)
new mode 100644 (file)
index 857fd78..2456d79
@@ -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.
@@ -1458,14 +1458,14 @@ int UtcDaliStageSignalWheelEventP(void)
 
 int UtcDaliStageContextLostSignalP(void)
 {
-  TestApplication app;
+  TestApplication application;
   Stage stage = Stage::GetCurrent();
 
   bool contextLost = false;
   ContextStatusFunctor contextLostFunctor( contextLost );
-  stage.ContextLostSignal().Connect( &app, contextLostFunctor );
+  stage.ContextLostSignal().Connect( &application, contextLostFunctor );
 
-  Integration::ContextNotifierInterface* notifier = app.GetCore().GetContextNotifier();
+  Integration::ContextNotifierInterface* notifier = application.GetCore().GetContextNotifier();
   notifier->NotifyContextLost();
   DALI_TEST_EQUALS( contextLost, true, TEST_LOCATION );
 
@@ -1474,7 +1474,7 @@ int UtcDaliStageContextLostSignalP(void)
 
 int UtcDaliStageContextLostSignalN(void)
 {
-  TestApplication app;
+  TestApplication application;
   Stage stage;
 
   // Check that connecting to the signal with a bad stage instance causes an assert.
@@ -1483,7 +1483,7 @@ int UtcDaliStageContextLostSignalN(void)
   ContextStatusFunctor contextLostFunctor( contextLost );
   try
   {
-    stage.ContextLostSignal().Connect( &app, contextLostFunctor );
+    stage.ContextLostSignal().Connect( &application, contextLostFunctor );
   }
   catch( Dali::DaliException& e )
   {
@@ -1498,14 +1498,14 @@ int UtcDaliStageContextLostSignalN(void)
 
 int UtcDaliStageContextRegainedSignalP(void)
 {
-  TestApplication app;
+  TestApplication application;
   Stage stage = Stage::GetCurrent();
 
   bool contextRegained = false;
   ContextStatusFunctor contextRegainedFunctor( contextRegained );
-  stage.ContextRegainedSignal().Connect( &app, contextRegainedFunctor );
+  stage.ContextRegainedSignal().Connect( &application, contextRegainedFunctor );
 
-  Integration::ContextNotifierInterface* notifier = app.GetCore().GetContextNotifier();
+  Integration::ContextNotifierInterface* notifier = application.GetCore().GetContextNotifier();
   notifier->NotifyContextLost();
   notifier->NotifyContextRegained();
   DALI_TEST_EQUALS( contextRegained, true, TEST_LOCATION );
@@ -1515,7 +1515,7 @@ int UtcDaliStageContextRegainedSignalP(void)
 
 int UtcDaliStageContextRegainedSignalN(void)
 {
-  TestApplication app;
+  TestApplication application;
   Stage stage;
 
   // Check that connecting to the signal with a bad stage instance causes an assert.
@@ -1524,7 +1524,7 @@ int UtcDaliStageContextRegainedSignalN(void)
   ContextStatusFunctor contextRegainedFunctor( contextRegained );
   try
   {
-    stage.ContextRegainedSignal().Connect( &app, contextRegainedFunctor );
+    stage.ContextRegainedSignal().Connect( &application, contextRegainedFunctor );
   }
   catch( Dali::DaliException& e )
   {
@@ -1539,14 +1539,14 @@ int UtcDaliStageContextRegainedSignalN(void)
 
 int UtcDaliStageSceneCreatedSignalP(void)
 {
-  TestApplication app;
+  TestApplication application;
   Stage stage = Stage::GetCurrent();
 
   bool signalCalled = false;
   SceneCreatedStatusFunctor sceneCreatedFunctor( signalCalled );
-  stage.SceneCreatedSignal().Connect( &app, sceneCreatedFunctor );
+  stage.SceneCreatedSignal().Connect( &application, sceneCreatedFunctor );
 
-  Integration::Core& core = app.GetCore();
+  Integration::Core& core = application.GetCore();
   core.SceneCreated();
   DALI_TEST_EQUALS( signalCalled, true, TEST_LOCATION );
 
@@ -1555,7 +1555,7 @@ int UtcDaliStageSceneCreatedSignalP(void)
 
 int UtcDaliStageSceneCreatedSignalN(void)
 {
-  TestApplication app;
+  TestApplication application;
   Stage stage;
 
   // Check that connecting to the signal with a bad stage instance causes an assert.
@@ -1564,7 +1564,7 @@ int UtcDaliStageSceneCreatedSignalN(void)
   SceneCreatedStatusFunctor sceneCreatedFunctor( signalCalled );
   try
   {
-    stage.SceneCreatedSignal().Connect( &app, sceneCreatedFunctor );
+    stage.SceneCreatedSignal().Connect( &application, sceneCreatedFunctor );
   }
   catch( Dali::DaliException& e )
   {
@@ -1579,7 +1579,7 @@ int UtcDaliStageSceneCreatedSignalN(void)
 
 int UtcDaliStageGetRenderTaskListP(void)
 {
-  TestApplication app;
+  TestApplication application;
   Stage stage = Stage::GetCurrent();
 
   // Check we get a valid instance.
@@ -1599,7 +1599,7 @@ int UtcDaliStageGetRenderTaskListP(void)
 
 int UtcDaliStageGetRenderTaskListN(void)
 {
-  TestApplication app;
+  TestApplication application;
   Stage stage;
 
   // Check that getting the render task list with a bad stage instance causes an assert.
@@ -1621,7 +1621,7 @@ int UtcDaliStageGetRenderTaskListN(void)
 
 int UtcDaliStageGetObjectRegistryP(void)
 {
-  TestApplication app;
+  TestApplication application;
   Stage stage = Stage::GetCurrent();
 
   ObjectRegistry objectRegistry = stage.GetObjectRegistry();
@@ -1630,7 +1630,7 @@ int UtcDaliStageGetObjectRegistryP(void)
   // However we want a basic test to confirm the returned registry is valid and works.
   bool verified = false;
   ActorCreatedFunctor test( verified );
-  objectRegistry.ObjectCreatedSignal().Connect( &app, test );
+  objectRegistry.ObjectCreatedSignal().Connect( &application, test );
 
   Actor actor = Actor::New();
   DALI_TEST_CHECK( test.mSignalVerified );
@@ -1640,7 +1640,7 @@ int UtcDaliStageGetObjectRegistryP(void)
 
 int UtcDaliStageGetObjectRegistryN(void)
 {
-  TestApplication app;
+  TestApplication application;
   Stage stage;
 
   // Check that getting the object registry with a bad stage instance DOES NOT cause an assert.
@@ -1662,7 +1662,7 @@ int UtcDaliStageGetObjectRegistryN(void)
 
 int UtcDaliStageOperatorAssign(void)
 {
-  TestApplication app;
+  TestApplication application;
   Stage stage;
   DALI_TEST_CHECK( !stage );
 
index 516133a..30966d4 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.
@@ -90,13 +90,19 @@ struct GestureReceivedFunctor
 // Functor that removes the gestured actor from stage
 struct UnstageActorFunctor : public GestureReceivedFunctor
 {
-  UnstageActorFunctor( SignalData& data ) : GestureReceivedFunctor( data ) { }
+  UnstageActorFunctor( SignalData& data, Integration::Scene scene )
+  : GestureReceivedFunctor( data ),
+    scene( scene )
+  {
+  }
 
   void operator()(Actor actor, const TapGesture& tap)
   {
     GestureReceivedFunctor::operator()( actor, tap );
-    Stage::GetCurrent().Remove( actor );
+    scene.Remove( actor );
   }
+
+  Integration::Scene scene;
 };
 
 // Functor for receiving a touch event
@@ -179,7 +185,7 @@ int UtcDaliTapGestureDetectorNew(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -244,7 +250,7 @@ int UtcDaliTapGestureSetTapsRequiredMinMaxCheck(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -285,7 +291,7 @@ int UtcDaliTapGestureSignalReceptionNegative(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -311,7 +317,7 @@ int UtcDaliTapGestureSignalReceptionPositive(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -340,7 +346,7 @@ int UtcDaliTapGestureSignalReceptionDetach(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -395,7 +401,7 @@ int UtcDaliTapGestureSignalReceptionActorDestroyedWhileTapping(void)
     Actor actor = Actor::New();
     actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
     actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-    Stage::GetCurrent().Add(actor);
+    application.GetScene().Add(actor);
 
     // Render and notify
     application.SendNotification();
@@ -408,7 +414,7 @@ int UtcDaliTapGestureSignalReceptionActorDestroyedWhileTapping(void)
     DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
 
     // Remove the actor from stage and reset the data
-    Stage::GetCurrent().Remove(actor);
+    application.GetScene().Remove(actor);
 
     // Render and notify
     application.SendNotification();
@@ -430,7 +436,7 @@ int UtcDaliTapGestureSignalReceptionRotatedActor(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ORIENTATION, Quaternion(Dali::Degree(90.0f), Vector3::ZAXIS) );
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -482,7 +488,7 @@ int UtcDaliTapGestureSignalReceptionChildHit(void)
   Actor parent = Actor::New();
   parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(parent);
+  application.GetScene().Add(parent);
 
   // Set child to completely cover parent.
   // Change rotation of child to be different from parent so that we can check if our local coordinate
@@ -535,13 +541,13 @@ int UtcDaliTapGestureSignalReceptionAttachDetachMany(void)
   Actor first = Actor::New();
   first.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   first.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(first);
+  application.GetScene().Add(first);
 
   Actor second = Actor::New();
   second.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   second.SetProperty( Actor::Property::POSITION_X, 100.0f);
   second.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(second);
+  application.GetScene().Add(second);
 
   // Render and notify
   application.SendNotification();
@@ -588,7 +594,7 @@ int UtcDaliTapGestureSignalReceptionActorBecomesUntouchable(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -626,7 +632,7 @@ int UtcDaliTapGestureSignalReceptionMultipleGestureDetectors(void)
   Actor first = Actor::New();
   first.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   first.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(first);
+  application.GetScene().Add(first);
 
   Actor second = Actor::New();
   second.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
@@ -687,7 +693,7 @@ int UtcDaliTapGestureSignalReceptionMultipleDetectorsOnActor(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -721,7 +727,7 @@ int UtcDaliTapGestureSignalReceptionDifferentPossible(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -777,7 +783,7 @@ int UtcDaliTapGestureActorUnstaged(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -785,7 +791,7 @@ int UtcDaliTapGestureActorUnstaged(void)
 
   // Attach actor to detector
   SignalData data;
-  UnstageActorFunctor functor( data );
+  UnstageActorFunctor functor( data, application.GetScene() );
   TapGestureDetector detector = TapGestureDetector::New();
   detector.Attach(actor);
   detector.DetectedSignal().Connect( &application, functor );
@@ -803,7 +809,7 @@ int UtcDaliTapGestureDetectorRemovedWhilePossible(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -833,7 +839,7 @@ int UtcDaliTapGestureActorRemovedWhilePossible(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -850,7 +856,7 @@ int UtcDaliTapGestureActorRemovedWhilePossible(void)
   TestStartLongPress( application, 50.0f, 10.0f, 100 );
 
   // Remove, render and delete actor
-  Stage::GetCurrent().Remove(actor);
+  application.GetScene().Remove(actor);
   application.SendNotification();
   application.Render();
   actor.Reset();
@@ -868,7 +874,7 @@ int UtcDaliTapGestureLayerConsumesTouch(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Add a detector
   SignalData data;
@@ -881,7 +887,7 @@ int UtcDaliTapGestureLayerConsumesTouch(void)
   Layer layer = Layer::New();
   layer.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add( layer );
+  application.GetScene().Add( layer );
   layer.RaiseToTop();
 
   // Render and notify
index 3e130b0..85d111d 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.
@@ -118,7 +118,7 @@ int UtcDaliTapGestureRecognizerBasic(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -151,7 +151,7 @@ int UtcDaliTapGestureRecognizerGapTooLong(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -184,7 +184,7 @@ int UtcDaliTapGestureRecognizerInterrupted(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -219,7 +219,7 @@ int UtcDaliTapGestureRecognizerMoveTooFar(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -252,7 +252,7 @@ int UtcDaliTapGestureRecognizerStartDouble(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -285,7 +285,7 @@ int UtcDaliTapGestureRecognizerEndDouble(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -320,7 +320,7 @@ int UtcDaliTapGestureRecognizerDoubleTap(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -361,7 +361,7 @@ int UtcDaliTapGestureRecognizerDoubleTapMoveTooFar(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -414,7 +414,7 @@ int UtcDaliTapGestureRecognizerDoubleTapWaitTooLong(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -465,13 +465,13 @@ int UtcDaliTapGestureRecognizerMultipleDetectors(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   Actor actor2 = Actor::New();
   actor2.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
   actor2.SetProperty( Actor::Property::POSITION_X, 100.0f);
-  Stage::GetCurrent().Add(actor2);
+  application.GetScene().Add(actor2);
 
   // Render and notify
   application.SendNotification();
index 2b0f58d..73a3b26 100644 (file)
@@ -149,7 +149,7 @@ int UtcDaliTextureSetTexture01(void)
 
   Actor actor = CreateActor( DONT_SET_SAMPLER );
 
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   TestGlAbstraction& gl = application.GetGlAbstraction();
 
@@ -179,7 +179,7 @@ int UtcDaliTextureSetTexture02(void)
 
   Actor actor = CreateActor(SET_SAMPLER);
 
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   TestGlAbstraction& gl = application.GetGlAbstraction();
 
@@ -211,8 +211,8 @@ int UtcDaliTextureSetMultiple(void)
   Actor actor1 = CreateActor(SET_SAMPLER);
   Actor actor2 = CreateActor(SET_SAMPLER);
 
-  Stage::GetCurrent().Add( actor1 );
-  Stage::GetCurrent().Add( actor2 );
+  application.GetScene().Add( actor1 );
+  application.GetScene().Add( actor2 );
 
   TestGlAbstraction& gl = application.GetGlAbstraction();
 
@@ -255,7 +255,7 @@ int UtcDaliTextureSetSetSampler(void)
   actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
   actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
 
-  Stage::GetCurrent().Add( actor );
+  application.GetScene().Add( actor );
 
   TestGlAbstraction& gl = application.GetGlAbstraction();
 
old mode 100755 (executable)
new mode 100644 (file)
index 48258eb..4e96d66
@@ -302,7 +302,7 @@ int UtcDaliTouchDataNormalProcessing01(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -366,7 +366,7 @@ int UtcDaliTouchDataNormalProcessing02(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -400,7 +400,7 @@ int UtcDaliTouchDataAPINegative(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -433,21 +433,21 @@ int UtcDaliTouchDataOutsideCameraNearFarPlanes(void)
 {
   TestApplication application;
 
-  Stage stage = Stage::GetCurrent();
-  Vector2 stageSize = stage.GetSize();
+  Integration::Scene scene = application.GetScene();
+  Vector2 sceneSize = scene.GetSize();
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
   actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
-  stage.Add(actor);
+  scene.Add(actor);
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Get the camera's near and far planes
-  RenderTaskList taskList = stage.GetRenderTaskList();
+  RenderTaskList taskList = scene.GetRenderTaskList();
   Dali::RenderTask task = taskList.GetTask(0);
   CameraActor camera = task.GetCameraActor();
   float nearPlane = camera.GetNearClippingPlane();
@@ -455,14 +455,14 @@ int UtcDaliTouchDataOutsideCameraNearFarPlanes(void)
 
   // Calculate the current distance of the actor from the camera
   float tanHalfFov = tanf(camera.GetFieldOfView() * 0.5f);
-  float distance = (stageSize.y * 0.5f) / tanHalfFov;
+  float distance = (sceneSize.y * 0.5f) / tanHalfFov;
 
   // Connect to actor's touched signal
   SignalData data;
   TouchDataFunctor functor( data );
   actor.TouchSignal().Connect( &application, functor );
 
-  Vector2 screenCoordinates( stageSize.x * 0.5f, stageSize.y * 0.5f );
+  Vector2 screenCoordinates( sceneSize.x * 0.5f, sceneSize.y * 0.5f );
 
   // Emit a down signal
   application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, screenCoordinates ) );
@@ -540,7 +540,7 @@ int UtcDaliTouchDataInterrupted(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -572,12 +572,12 @@ int UtcDaliTouchDataInterrupted(void)
 int UtcDaliTouchDataParentConsumer(void)
 {
   TestApplication application;
-  Actor rootActor( Stage::GetCurrent().GetRootLayer() );
+  Actor rootActor( application.GetScene().GetRootLayer() );
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -672,12 +672,12 @@ int UtcDaliTouchDataParentConsumer(void)
 int UtcDaliTouchDataInterruptedParentConsumer(void)
 {
   TestApplication application;
-  Actor rootActor( Stage::GetCurrent().GetRootLayer() );
+  Actor rootActor( application.GetScene().GetRootLayer() );
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -724,8 +724,8 @@ int UtcDaliTouchDataInterruptedParentConsumer(void)
   data.Reset();
   rootData.Reset();
 
-  // Remove actor from Stage
-  Stage::GetCurrent().Remove( actor );
+  // Remove actor from scene
+  application.GetScene().Remove( actor );
   data.Reset();
   rootData.Reset();
 
@@ -756,7 +756,7 @@ int UtcDaliTouchDataLeave(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -806,12 +806,12 @@ int UtcDaliTouchDataLeave(void)
 int UtcDaliTouchDataLeaveParentConsumer(void)
 {
   TestApplication application;
-  Actor rootActor( Stage::GetCurrent().GetRootLayer() );
+  Actor rootActor( application.GetScene().GetRootLayer() );
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -877,8 +877,8 @@ int UtcDaliTouchDataLeaveParentConsumer(void)
   actor.SetProperty( Actor::Property::LEAVE_REQUIRED, false );
 
   // Another motion event outside of root actor, only root signalled
-  Vector2 stageSize( Stage::GetCurrent().GetSize() );
-  application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2 ( stageSize.width + 10.0f, stageSize.height + 10.0f )) );
+  Vector2 sceneSize( application.GetScene().GetSize() );
+  application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2 ( sceneSize.width + 10.0f, sceneSize.height + 10.0f )) );
   DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
   DALI_TEST_EQUALS( true, rootData.functorCalled, TEST_LOCATION );
   DALI_TEST_EQUALS( PointState::LEAVE, rootData.touchData.points[0].state, TEST_LOCATION );
@@ -892,7 +892,7 @@ int UtcDaliTouchDataActorBecomesInsensitive(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -923,12 +923,12 @@ int UtcDaliTouchDataActorBecomesInsensitive(void)
 int UtcDaliTouchDataActorBecomesInsensitiveParentConsumer(void)
 {
   TestApplication application;
-  Actor rootActor( Stage::GetCurrent().GetRootLayer() );
+  Actor rootActor( application.GetScene().GetRootLayer() );
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -974,7 +974,7 @@ int UtcDaliTouchDataActorBecomesInsensitiveParentConsumer(void)
 int UtcDaliTouchDataMultipleLayers(void)
 {
   TestApplication application;
-  Actor rootActor( Stage::GetCurrent().GetRootLayer() );
+  Actor rootActor( application.GetScene().GetRootLayer() );
 
   // Connect to actor's touched signal
   SignalData data;
@@ -983,7 +983,7 @@ int UtcDaliTouchDataMultipleLayers(void)
   Layer layer1 ( Layer::New() );
   layer1.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   layer1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add( layer1 );
+  application.GetScene().Add( layer1 );
 
   Actor actor1 ( Actor::New() );
   actor1.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
@@ -1032,7 +1032,7 @@ int UtcDaliTouchDataMultipleLayers(void)
   layer2.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   layer2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
   layer2.SetProperty( Actor::Property::POSITION_Z,  10.0f ); // Should hit layer2 in this layer rather than actor2
-  Stage::GetCurrent().Add( layer2 );
+  application.GetScene().Add( layer2 );
 
   Actor actor2 ( Actor::New() );
   actor2.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
@@ -1093,17 +1093,17 @@ int UtcDaliTouchDataMultipleLayers(void)
 int UtcDaliTouchDataMultipleRenderTasks(void)
 {
   TestApplication application;
-  Stage stage ( Stage::GetCurrent() );
-  Vector2 stageSize ( stage.GetSize() );
+  Integration::Scene scene ( application.GetScene() );
+  Vector2 sceneSize ( scene.GetSize() );
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  stage.Add(actor);
+  scene.Add(actor);
 
   // Create render task
-  Viewport viewport( stageSize.width * 0.5f, stageSize.height * 0.5f, stageSize.width * 0.5f, stageSize.height * 0.5f );
-  RenderTask renderTask ( Stage::GetCurrent().GetRenderTaskList().CreateTask() );
+  Viewport viewport( sceneSize.width * 0.5f, sceneSize.height * 0.5f, sceneSize.width * 0.5f, sceneSize.height * 0.5f );
+  RenderTask renderTask ( application.GetScene().GetRenderTaskList().CreateTask() );
   renderTask.SetViewport( viewport );
   renderTask.SetInputEnabled( true );
 
@@ -1137,13 +1137,13 @@ int UtcDaliTouchDataMultipleRenderTasks(void)
 int UtcDaliTouchDataMultipleRenderTasksWithChildLayer(void)
 {
   TestApplication application;
-  Stage stage ( Stage::GetCurrent() );
-  Vector2 stageSize ( stage.GetSize() );
+  Integration::Scene scene ( application.GetScene() );
+  Vector2 sceneSize ( scene.GetSize() );
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  stage.Add(actor);
+  scene.Add(actor);
 
   Layer layer = Layer::New();
   layer.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
@@ -1151,8 +1151,8 @@ int UtcDaliTouchDataMultipleRenderTasksWithChildLayer(void)
   actor.Add(layer);
 
   // Create render task
-  Viewport viewport( stageSize.width * 0.5f, stageSize.height * 0.5f, stageSize.width * 0.5f, stageSize.height * 0.5f );
-  RenderTask renderTask ( Stage::GetCurrent().GetRenderTaskList().CreateTask() );
+  Viewport viewport( sceneSize.width * 0.5f, sceneSize.height * 0.5f, sceneSize.width * 0.5f, sceneSize.height * 0.5f );
+  RenderTask renderTask ( application.GetScene().GetRenderTaskList().CreateTask() );
   renderTask.SetViewport( viewport );
   renderTask.SetInputEnabled( true );
   renderTask.SetSourceActor( actor );
@@ -1188,35 +1188,35 @@ int UtcDaliTouchDataMultipleRenderTasksWithChildLayer(void)
 int UtcDaliTouchDataOffscreenRenderTasks(void)
 {
   TestApplication application;
-  Stage stage ( Stage::GetCurrent() );
-  Vector2 stageSize ( stage.GetSize() );
+  Integration::Scene scene ( application.GetScene() );
+  Vector2 sceneSize ( scene.GetSize() );
 
   // FrameBufferImage for offscreen RenderTask
-  FrameBuffer frameBuffer = FrameBuffer::New(stageSize.width, stageSize.height);
+  FrameBuffer frameBuffer = FrameBuffer::New(sceneSize.width, sceneSize.height);
 
   // Create a renderable actor to display the FrameBufferImage
   Actor renderableActor = CreateRenderableActor(frameBuffer.GetColorTexture());
   renderableActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
-  renderableActor.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x, stageSize.y ) );
+  renderableActor.SetProperty( Actor::Property::SIZE, Vector2( sceneSize.x, sceneSize.y ) );
   renderableActor.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) ); // FIXME
-  stage.Add( renderableActor );
+  scene.Add( renderableActor );
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  stage.Add( actor );
+  scene.Add( actor );
   application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE ); // Ensure framebuffer connects
 
-  stage.GetRenderTaskList().GetTask( 0u ).SetScreenToFrameBufferFunction( RenderTask::FULLSCREEN_FRAMEBUFFER_FUNCTION );
+  scene.GetRenderTaskList().GetTask( 0u ).SetScreenToFrameBufferFunction( RenderTask::FULLSCREEN_FRAMEBUFFER_FUNCTION );
 
   // Create a RenderTask
-  RenderTask renderTask = stage.GetRenderTaskList().CreateTask();
+  RenderTask renderTask = scene.GetRenderTaskList().CreateTask();
   renderTask.SetSourceActor( actor );
   renderTask.SetFrameBuffer(frameBuffer);
   renderTask.SetInputEnabled( true );
 
   // Create another RenderTask
-  RenderTask renderTask2( stage.GetRenderTaskList().CreateTask() );
+  RenderTask renderTask2( scene.GetRenderTaskList().CreateTask() );
   renderTask2.SetInputEnabled( true );
 
   // Render and notify
@@ -1238,13 +1238,13 @@ int UtcDaliTouchDataOffscreenRenderTasks(void)
 int UtcDaliTouchDataMultipleRenderableActors(void)
 {
   TestApplication application;
-  Stage stage ( Stage::GetCurrent() );
-  Vector2 stageSize ( stage.GetSize() );
+  Integration::Scene scene ( application.GetScene() );
+  Vector2 sceneSize ( scene.GetSize() );
 
   Actor parent = CreateRenderableActor();
   parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  stage.Add(parent);
+  scene.Add(parent);
 
   Actor actor = CreateRenderableActor();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
@@ -1275,7 +1275,7 @@ int UtcDaliTouchDataActorRemovedInSignal(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -1295,7 +1295,7 @@ int UtcDaliTouchDataActorRemovedInSignal(void)
   data.Reset();
 
   // Re-add, render and notify
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   application.SendNotification();
   application.Render();
 
@@ -1318,8 +1318,8 @@ int UtcDaliTouchDataActorRemovedInSignal(void)
   DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
   data.Reset();
 
-  // Re-add actor back to stage, render and notify
-  Stage::GetCurrent().Add(actor);
+  // Re-add actor back to scene, render and notify
+  application.GetScene().Add(actor);
   application.SendNotification();
   application.Render();
 
@@ -1344,7 +1344,7 @@ int UtcDaliTouchDataActorSignalNotConsumed(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -1361,14 +1361,14 @@ int UtcDaliTouchDataActorSignalNotConsumed(void)
   END_TEST;
 }
 
-int UtcDaliTouchDataActorUnStaged(void)
+int UtcDaliTouchDataActorRemovedFromScene(void)
 {
   TestApplication application;
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -1384,8 +1384,8 @@ int UtcDaliTouchDataActorUnStaged(void)
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
   data.Reset();
 
-  // Remove actor from stage
-  Stage::GetCurrent().Remove( actor );
+  // Remove actor from scene
+  application.GetScene().Remove( actor );
   data.Reset();
 
   // Render and notify
@@ -1406,7 +1406,7 @@ int UtcDaliTouchDataLayerConsumesTouch(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -1421,7 +1421,7 @@ int UtcDaliTouchDataLayerConsumesTouch(void)
   Layer layer = Layer::New();
   layer.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add( layer );
+  application.GetScene().Add( layer );
   layer.RaiseToTop();
 
   // Render and notify
@@ -1453,12 +1453,12 @@ int UtcDaliTouchDataLayerConsumesTouch(void)
 int UtcDaliTouchDataLeaveActorReadded(void)
 {
   TestApplication application;
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene scene = application.GetScene();
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  stage.Add(actor);
+  scene.Add(actor);
 
   // Set actor to receive touch-events
   actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
@@ -1478,9 +1478,9 @@ int UtcDaliTouchDataLeaveActorReadded(void)
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
   data.Reset();
 
-  // Remove actor from stage and add again
-  stage.Remove( actor );
-  stage.Add( actor );
+  // Remove actor from scene and add again
+  scene.Remove( actor );
+  scene.Add( actor );
 
   // Emit a motion within the actor's bounds
   application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2( 12.0f, 10.0f ) ) );
@@ -1499,18 +1499,18 @@ int UtcDaliTouchDataLeaveActorReadded(void)
 int UtcDaliTouchDataClippedActor(void)
 {
   TestApplication application;
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene scene = application.GetScene();
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
-  stage.Add( actor );
+  scene.Add( actor );
 
   Actor clippingActor = Actor::New();
   clippingActor.SetProperty( Actor::Property::SIZE, Vector2( 50.0f, 50.0f ) );
   clippingActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
   clippingActor.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN );
-  stage.Add( clippingActor );
+  scene.Add( clippingActor );
 
   // Add a child to the clipped region.
   Actor clippingChild = Actor::New();
@@ -1548,14 +1548,14 @@ int UtcDaliTouchDataClippedActor(void)
   END_TEST;
 }
 
-int UtcDaliTouchDataActorUnstaged(void)
+int UtcDaliTouchDataActorUnparented(void)
 {
   TestApplication application;
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -1586,14 +1586,14 @@ int UtcDaliTouchDataActorUnstaged(void)
   END_TEST;
 }
 
-int UtcDaliTouchDataParentUnstaged(void)
+int UtcDaliTouchDataParentRemovedFromScene(void)
 {
   TestApplication application;
 
   Actor parent = Actor::New();
   parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(parent);
+  application.GetScene().Add(parent);
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
@@ -1629,14 +1629,14 @@ int UtcDaliTouchDataParentUnstaged(void)
   END_TEST;
 }
 
-int UtcDaliTouchDataActorUnstagedDifferentConsumer(void)
+int UtcDaliTouchDataActorRemovedFromSceneDifferentConsumer(void)
 {
   TestApplication application;
 
   Actor parent = Actor::New();
   parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(parent);
+  application.GetScene().Add(parent);
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
@@ -1724,12 +1724,12 @@ int UtcDaliTouchDataActorUnstagedDifferentConsumer(void)
 int UtcDaliTouchDataInterruptedDifferentConsumer(void)
 {
   TestApplication application;
-  Actor rootActor( Stage::GetCurrent().GetRootLayer() );
+  Actor rootActor( application.GetScene().GetRootLayer() );
 
   Actor parent = Actor::New();
   parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(parent);
+  application.GetScene().Add(parent);
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
@@ -1800,7 +1800,7 @@ int UtcDaliTouchDataGetRadius(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -1831,7 +1831,7 @@ int UtcDaliTouchDataGetEllipseRadius(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -1862,7 +1862,7 @@ int UtcDaliTouchDataGetAngle(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -1891,7 +1891,7 @@ int UtcDaliTouchDataGetPressure(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -1920,7 +1920,7 @@ int UtcDaliTouchDataAndEventUsage(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -1951,7 +1951,7 @@ int UtcDaliTouchDataGetDeviceAPINegative(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -1982,7 +1982,7 @@ int UtcDaliTouchDataGetMouseButtonPositive(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -2011,7 +2011,7 @@ int UtcDaliTouchDataGetMouseButtonNagative(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
old mode 100755 (executable)
new mode 100644 (file)
index 8825942..17bb058
@@ -139,7 +139,7 @@ int UtcDaliTouchNormalProcessing(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -202,21 +202,21 @@ int UtcDaliTouchOutsideCameraNearFarPlanes(void)
 {
   TestApplication application;
 
-  Stage stage = Stage::GetCurrent();
-  Vector2 stageSize = stage.GetSize();
+  Integration::Scene scene = application.GetScene();
+  Vector2 sceneSize = scene.GetSize();
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
   actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
-  stage.Add(actor);
+  scene.Add(actor);
 
   // Render and notify
   application.SendNotification();
   application.Render();
 
   // Get the camera's near and far planes
-  RenderTaskList taskList = stage.GetRenderTaskList();
+  RenderTaskList taskList = scene.GetRenderTaskList();
   Dali::RenderTask task = taskList.GetTask(0);
   CameraActor camera = task.GetCameraActor();
   float nearPlane = camera.GetNearClippingPlane();
@@ -224,14 +224,14 @@ int UtcDaliTouchOutsideCameraNearFarPlanes(void)
 
   // Calculate the current distance of the actor from the camera
   float tanHalfFov = tanf(camera.GetFieldOfView() * 0.5f);
-  float distance = (stageSize.y * 0.5f) / tanHalfFov;
+  float distance = (sceneSize.y * 0.5f) / tanHalfFov;
 
   // Connect to actor's touched signal
   SignalData data;
   TouchEventFunctor functor( data );
   actor.TouchedSignal().Connect( &application, functor );
 
-  Vector2 screenCoordinates( stageSize.x * 0.5f, stageSize.y * 0.5f );
+  Vector2 screenCoordinates( sceneSize.x * 0.5f, sceneSize.y * 0.5f );
 
   // Emit a down signal
   application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, screenCoordinates ) );
@@ -309,7 +309,7 @@ int UtcDaliTouchInterrupted(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -341,12 +341,12 @@ int UtcDaliTouchInterrupted(void)
 int UtcDaliTouchParentConsumer(void)
 {
   TestApplication application;
-  Actor rootActor( Stage::GetCurrent().GetRootLayer() );
+  Actor rootActor( application.GetScene().GetRootLayer() );
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -441,12 +441,12 @@ int UtcDaliTouchParentConsumer(void)
 int UtcDaliTouchInterruptedParentConsumer(void)
 {
   TestApplication application;
-  Actor rootActor( Stage::GetCurrent().GetRootLayer() );
+  Actor rootActor( application.GetScene().GetRootLayer() );
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -493,8 +493,8 @@ int UtcDaliTouchInterruptedParentConsumer(void)
   data.Reset();
   rootData.Reset();
 
-  // Remove actor from Stage
-  Stage::GetCurrent().Remove( actor );
+  // Remove actor from scene
+  application.GetScene().Remove( actor );
   data.Reset();
   rootData.Reset();
 
@@ -525,7 +525,7 @@ int UtcDaliTouchLeave(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -575,12 +575,12 @@ int UtcDaliTouchLeave(void)
 int UtcDaliTouchLeaveParentConsumer(void)
 {
   TestApplication application;
-  Actor rootActor( Stage::GetCurrent().GetRootLayer() );
+  Actor rootActor( application.GetScene().GetRootLayer() );
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -646,8 +646,8 @@ int UtcDaliTouchLeaveParentConsumer(void)
   actor.SetProperty( Actor::Property::LEAVE_REQUIRED, false );
 
   // Another motion event outside of root actor, only root signalled
-  Vector2 stageSize( Stage::GetCurrent().GetSize() );
-  application.ProcessEvent( GenerateSingleTouch( TouchPoint::Motion, Vector2 ( stageSize.width + 10.0f, stageSize.height + 10.0f )) );
+  Vector2 sceneSize( application.GetScene().GetSize() );
+  application.ProcessEvent( GenerateSingleTouch( TouchPoint::Motion, Vector2 ( sceneSize.width + 10.0f, sceneSize.height + 10.0f )) );
   DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
   DALI_TEST_EQUALS( true, rootData.functorCalled, TEST_LOCATION );
   DALI_TEST_EQUALS( TouchPoint::Leave, rootData.touchEvent.points[0].state, TEST_LOCATION );
@@ -661,7 +661,7 @@ int UtcDaliTouchActorBecomesInsensitive(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -692,12 +692,12 @@ int UtcDaliTouchActorBecomesInsensitive(void)
 int UtcDaliTouchActorBecomesInsensitiveParentConsumer(void)
 {
   TestApplication application;
-  Actor rootActor( Stage::GetCurrent().GetRootLayer() );
+  Actor rootActor( application.GetScene().GetRootLayer() );
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -743,7 +743,7 @@ int UtcDaliTouchActorBecomesInsensitiveParentConsumer(void)
 int UtcDaliTouchMultipleLayers(void)
 {
   TestApplication application;
-  Actor rootActor( Stage::GetCurrent().GetRootLayer() );
+  Actor rootActor( application.GetScene().GetRootLayer() );
 
   // Connect to actor's touched signal
   SignalData data;
@@ -752,7 +752,7 @@ int UtcDaliTouchMultipleLayers(void)
   Layer layer1 ( Layer::New() );
   layer1.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   layer1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add( layer1 );
+  application.GetScene().Add( layer1 );
 
   Actor actor1 ( Actor::New() );
   actor1.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
@@ -801,7 +801,7 @@ int UtcDaliTouchMultipleLayers(void)
   layer2.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   layer2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
   layer2.SetProperty( Actor::Property::POSITION_Z,  10.0f ); // Should hit layer2 in this layer rather than actor2
-  Stage::GetCurrent().Add( layer2 );
+  application.GetScene().Add( layer2 );
 
   Actor actor2 ( Actor::New() );
   actor2.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
@@ -862,17 +862,17 @@ int UtcDaliTouchMultipleLayers(void)
 int UtcDaliTouchMultipleRenderTasks(void)
 {
   TestApplication application;
-  Stage stage ( Stage::GetCurrent() );
-  Vector2 stageSize ( stage.GetSize() );
+  Integration::Scene scene ( application.GetScene() );
+  Vector2 sceneSize ( scene.GetSize() );
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  stage.Add(actor);
+  scene.Add(actor);
 
   // Create render task
-  Viewport viewport( stageSize.width * 0.5f, stageSize.height * 0.5f, stageSize.width * 0.5f, stageSize.height * 0.5f );
-  RenderTask renderTask ( Stage::GetCurrent().GetRenderTaskList().CreateTask() );
+  Viewport viewport( sceneSize.width * 0.5f, sceneSize.height * 0.5f, sceneSize.width * 0.5f, sceneSize.height * 0.5f );
+  RenderTask renderTask ( application.GetScene().GetRenderTaskList().CreateTask() );
   renderTask.SetViewport( viewport );
   renderTask.SetInputEnabled( true );
 
@@ -906,13 +906,13 @@ int UtcDaliTouchMultipleRenderTasks(void)
 int UtcDaliTouchMultipleRenderTasksWithChildLayer(void)
 {
   TestApplication application;
-  Stage stage ( Stage::GetCurrent() );
-  Vector2 stageSize ( stage.GetSize() );
+  Integration::Scene scene ( application.GetScene() );
+  Vector2 sceneSize ( scene.GetSize() );
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  stage.Add(actor);
+  scene.Add(actor);
 
   Layer layer = Layer::New();
   layer.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
@@ -920,8 +920,8 @@ int UtcDaliTouchMultipleRenderTasksWithChildLayer(void)
   actor.Add(layer);
 
   // Create render task
-  Viewport viewport( stageSize.width * 0.5f, stageSize.height * 0.5f, stageSize.width * 0.5f, stageSize.height * 0.5f );
-  RenderTask renderTask ( Stage::GetCurrent().GetRenderTaskList().CreateTask() );
+  Viewport viewport( sceneSize.width * 0.5f, sceneSize.height * 0.5f, sceneSize.width * 0.5f, sceneSize.height * 0.5f );
+  RenderTask renderTask ( application.GetScene().GetRenderTaskList().CreateTask() );
   renderTask.SetViewport( viewport );
   renderTask.SetInputEnabled( true );
   renderTask.SetSourceActor( actor );
@@ -957,35 +957,35 @@ int UtcDaliTouchMultipleRenderTasksWithChildLayer(void)
 int UtcDaliTouchOffscreenRenderTasks(void)
 {
   TestApplication application;
-  Stage stage ( Stage::GetCurrent() );
-  Vector2 stageSize ( stage.GetSize() );
+  Integration::Scene scene ( application.GetScene() );
+  Vector2 sceneSize ( scene.GetSize() );
 
   // FrameBuffer for offscreen RenderTask
-  FrameBuffer frameBuffer = FrameBuffer::New( stageSize.width, stageSize.height );
+  FrameBuffer frameBuffer = FrameBuffer::New( sceneSize.width, sceneSize.height );
 
   // Create a renderable actor to display the FrameBufferImage
   Actor renderableActor = CreateRenderableActor(frameBuffer.GetColorTexture());
   renderableActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
-  renderableActor.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x, stageSize.y ) );
+  renderableActor.SetProperty( Actor::Property::SIZE, Vector2( sceneSize.x, sceneSize.y ) );
   renderableActor.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) ); // FIXME
-  stage.Add( renderableActor );
+  scene.Add( renderableActor );
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  stage.Add( actor );
+  scene.Add( actor );
   application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE ); // Ensure framebuffer connects
 
-  stage.GetRenderTaskList().GetTask( 0u ).SetScreenToFrameBufferFunction( RenderTask::FULLSCREEN_FRAMEBUFFER_FUNCTION );
+  scene.GetRenderTaskList().GetTask( 0u ).SetScreenToFrameBufferFunction( RenderTask::FULLSCREEN_FRAMEBUFFER_FUNCTION );
 
   // Create a RenderTask
-  RenderTask renderTask = stage.GetRenderTaskList().CreateTask();
+  RenderTask renderTask = scene.GetRenderTaskList().CreateTask();
   renderTask.SetSourceActor( actor );
   renderTask.SetFrameBuffer( frameBuffer );
   renderTask.SetInputEnabled( true );
 
   // Create another RenderTask
-  RenderTask renderTask2( stage.GetRenderTaskList().CreateTask() );
+  RenderTask renderTask2( scene.GetRenderTaskList().CreateTask() );
   renderTask2.SetInputEnabled( true );
 
   // Render and notify
@@ -1007,14 +1007,14 @@ int UtcDaliTouchOffscreenRenderTasks(void)
 int UtcDaliTouchRenderTaskWithExclusiveActor(void)
 {
   TestApplication application;
-  auto stage = Stage::GetCurrent();
-  auto stageSize( stage.GetSize() );
+  auto scene = application.GetScene();
+  auto sceneSize( scene.GetSize() );
 
   auto actor = CreateRenderableActor();
-  actor.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x, stageSize.y ) );
-  stage.Add( actor );
+  actor.SetProperty( Actor::Property::SIZE, Vector2( sceneSize.x, sceneSize.y ) );
+  scene.Add( actor );
 
-  auto renderTask = stage.GetRenderTaskList().CreateTask();
+  auto renderTask = scene.GetRenderTaskList().CreateTask();
   renderTask.SetSourceActor( actor );
   renderTask.SetExclusive( true );
 
@@ -1038,13 +1038,13 @@ int UtcDaliTouchRenderTaskWithExclusiveActor(void)
 int UtcDaliTouchMultipleRenderableActors(void)
 {
   TestApplication application;
-  Stage stage ( Stage::GetCurrent() );
-  Vector2 stageSize ( stage.GetSize() );
+  Integration::Scene scene ( application.GetScene() );
+  Vector2 sceneSize ( scene.GetSize() );
 
   Actor parent = CreateRenderableActor();
   parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  stage.Add(parent);
+  scene.Add(parent);
 
   Actor actor = CreateRenderableActor();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
@@ -1075,7 +1075,7 @@ int UtcDaliTouchActorRemovedInSignal(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -1095,7 +1095,7 @@ int UtcDaliTouchActorRemovedInSignal(void)
   data.Reset();
 
   // Re-add, render and notify
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
   application.SendNotification();
   application.Render();
 
@@ -1118,8 +1118,8 @@ int UtcDaliTouchActorRemovedInSignal(void)
   DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
   data.Reset();
 
-  // Re-add actor back to stage, render and notify
-  Stage::GetCurrent().Add(actor);
+  // Re-add actor back to scene, render and notify
+  application.GetScene().Add(actor);
   application.SendNotification();
   application.Render();
 
@@ -1144,7 +1144,7 @@ int UtcDaliTouchActorSignalNotConsumed(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -1161,14 +1161,14 @@ int UtcDaliTouchActorSignalNotConsumed(void)
   END_TEST;
 }
 
-int UtcDaliTouchActorUnStaged(void)
+int UtcDaliTouchActorRemovedFromScene(void)
 {
   TestApplication application;
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -1184,8 +1184,8 @@ int UtcDaliTouchActorUnStaged(void)
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
   data.Reset();
 
-  // Remove actor from stage
-  Stage::GetCurrent().Remove( actor );
+  // Remove actor from scene
+  application.GetScene().Remove( actor );
   data.Reset();
 
   // Render and notify
@@ -1206,7 +1206,7 @@ int UtcDaliTouchLayerConsumesTouch(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -1221,7 +1221,7 @@ int UtcDaliTouchLayerConsumesTouch(void)
   Layer layer = Layer::New();
   layer.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add( layer );
+  application.GetScene().Add( layer );
   layer.RaiseToTop();
 
   // Render and notify
@@ -1253,12 +1253,12 @@ int UtcDaliTouchLayerConsumesTouch(void)
 int UtcDaliTouchLeaveActorReadded(void)
 {
   TestApplication application;
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene scene = application.GetScene();
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  stage.Add(actor);
+  scene.Add(actor);
 
   // Set actor to receive touch-events
   actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
@@ -1278,9 +1278,9 @@ int UtcDaliTouchLeaveActorReadded(void)
   DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
   data.Reset();
 
-  // Remove actor from stage and add again
-  stage.Remove( actor );
-  stage.Add( actor );
+  // Remove actor from scene and add again
+  scene.Remove( actor );
+  scene.Add( actor );
 
   // Emit a motion within the actor's bounds
   application.ProcessEvent( GenerateSingleTouch( TouchPoint::Motion, Vector2( 12.0f, 10.0f ) ) );
@@ -1299,18 +1299,18 @@ int UtcDaliTouchLeaveActorReadded(void)
 int UtcDaliTouchClippingActor(void)
 {
   TestApplication application;
-  Stage stage = Stage::GetCurrent();
+  Integration::Scene scene = application.GetScene();
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
-  stage.Add( actor );
+  scene.Add( actor );
 
   Actor clippingActor = Actor::New();
   clippingActor.SetProperty( Actor::Property::SIZE, Vector2( 50.0f, 50.0f ) );
   clippingActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
   clippingActor.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN );
-  stage.Add( clippingActor );
+  scene.Add( clippingActor );
 
   // Add a child to the clipped region.
   Actor clippingChild = Actor::New();
@@ -1348,14 +1348,14 @@ int UtcDaliTouchClippingActor(void)
   END_TEST;
 }
 
-int UtcDaliTouchActorUnstaged(void)
+int UtcDaliTouchActorUnparented(void)
 {
   TestApplication application;
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -1386,14 +1386,14 @@ int UtcDaliTouchActorUnstaged(void)
   END_TEST;
 }
 
-int UtcDaliTouchParentUnstaged(void)
+int UtcDaliTouchParentRemovedFromScene(void)
 {
   TestApplication application;
 
   Actor parent = Actor::New();
   parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(parent);
+  application.GetScene().Add(parent);
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
@@ -1429,14 +1429,14 @@ int UtcDaliTouchParentUnstaged(void)
   END_TEST;
 }
 
-int UtcDaliTouchActorUnstagedDifferentConsumer(void)
+int UtcDaliTouchActorRemovedFromSceneDifferentConsumer(void)
 {
   TestApplication application;
 
   Actor parent = Actor::New();
   parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(parent);
+  application.GetScene().Add(parent);
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
@@ -1524,12 +1524,12 @@ int UtcDaliTouchActorUnstagedDifferentConsumer(void)
 int UtcDaliTouchInterruptedDifferentConsumer(void)
 {
   TestApplication application;
-  Actor rootActor( Stage::GetCurrent().GetRootLayer() );
+  Actor rootActor( application.GetScene().GetRootLayer() );
 
   Actor parent = Actor::New();
   parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(parent);
+  application.GetScene().Add(parent);
 
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
@@ -1600,7 +1600,7 @@ int UtcDaliTouchDataConvert(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
index a94fe9b..51a2e57 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.
@@ -600,7 +600,7 @@ int UtcDaliTypeRegistryGetTypeInfoFromTypeNameP(void)
   DALI_TEST_CHECK( type );
   CameraActor ca = CameraActor::DownCast(type.CreateInstance());
   DALI_TEST_CHECK( ca );
-  Stage::GetCurrent().Add( ca );
+  application.GetScene().Add( ca );
   application.Render();
 
   // animations
@@ -1062,7 +1062,7 @@ int UtcDaliTypeRegistryAnimatablePropertyRegistrationP(void)
   DALI_TEST_CHECK( handle );
   Actor customActor = Actor::DownCast( handle );
   DALI_TEST_CHECK( customActor );
-  Stage::GetCurrent().Add(customActor);
+  application.GetScene().Add(customActor);
 
   unsigned int customPropertyCount( customActor.GetPropertyCount() );
 
@@ -1172,7 +1172,7 @@ int UtcDaliTypeRegistryAnimatablePropertyRegistrationWithDefaultP(void)
   DALI_TEST_CHECK( handle );
   Actor customActor = Actor::DownCast( handle );
   DALI_TEST_CHECK( customActor );
-  Stage::GetCurrent().Add(customActor);
+  application.GetScene().Add(customActor);
 
   unsigned int customPropertyCount( customActor.GetPropertyCount() );
 
@@ -2067,7 +2067,7 @@ int UtcDaliLongPressGestureDetectorTypeRegistry(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Register Type
   TypeInfo type;
@@ -2105,7 +2105,7 @@ int UtcDaliPanGestureDetectorTypeRegistry(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Register Type
   TypeInfo type;
@@ -2141,7 +2141,7 @@ int UtcDaliPinchGestureDetectorTypeRegistry(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Register Type
   TypeInfo type;
@@ -2178,7 +2178,7 @@ int UtcDaliRotationGestureDetectorTypeRegistry(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Register Type
   TypeInfo type;
@@ -2215,7 +2215,7 @@ int UtcDaliTapGestureDetectorTypeRegistry(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Register Type
   TypeInfo type;
@@ -2455,7 +2455,7 @@ int UtcDaliPropertyRegistrationPropertyAnimatableSynchronousSetGet01(void)
   DALI_TEST_CHECK( handle );
   Actor customActor = Actor::DownCast( handle );
   DALI_TEST_CHECK( customActor );
-  Stage::GetCurrent().Add(customActor);
+  application.GetScene().Add(customActor);
 
   tet_infoline( "Set the value and ensure it changes straight away" );
   DALI_TEST_EQUALS( customActor.GetProperty< float >( animatablePropertyIndex ), 0.0f, TEST_LOCATION );
@@ -2499,7 +2499,7 @@ int UtcDaliPropertyRegistrationPropertyAnimatableSynchronousSetGetWithComponents
   DALI_TEST_CHECK( handle );
   Actor customActor = Actor::DownCast( handle );
   DALI_TEST_CHECK( customActor );
-  Stage::GetCurrent().Add(customActor);
+  application.GetScene().Add(customActor);
 
   tet_infoline( "Get the component values, they should be the default value of the base-property" );
   DALI_TEST_EQUALS( customActor.GetProperty< float >( componentZeroPropertyIndex ), 13.0f, TEST_LOCATION );
@@ -2566,7 +2566,7 @@ int UtcDaliPropertyRegistrationPropertyAnimatableSynchronousSetGetWithComponents
   DALI_TEST_CHECK( handle );
   Actor customActor = Actor::DownCast( handle );
   DALI_TEST_CHECK( customActor );
-  Stage::GetCurrent().Add(customActor);
+  application.GetScene().Add(customActor);
 
   tet_infoline( "Get the component values, they should be the default value of the base-property" );
   DALI_TEST_EQUALS( customActor.GetProperty< float >( componentZeroPropertyIndex ), 13.0f, TEST_LOCATION );
@@ -2644,7 +2644,7 @@ int UtcDaliPropertyRegistrationPropertyAnimatableSynchronousSetGetWithComponents
   DALI_TEST_CHECK( handle );
   Actor customActor = Actor::DownCast( handle );
   DALI_TEST_CHECK( customActor );
-  Stage::GetCurrent().Add(customActor);
+  application.GetScene().Add(customActor);
 
   tet_infoline( "Get the component values, they should be the default value of the base-property" );
   DALI_TEST_EQUALS( customActor.GetProperty< float >( componentZeroPropertyIndex ), 13.0f, TEST_LOCATION );
@@ -2727,7 +2727,7 @@ int UtcDaliTypeInfoRegisterChildProperties01(void)
   ChildPropertyRegistration( myCustomTypeInfo.GetName(), "marginSpecification", MARGIN_SPECIFICATION, Property::EXTENTS );
 
   auto customActor = MyTestCustomActor::New();
-  Stage::GetCurrent().Add( customActor );
+  application.GetScene().Add( customActor );
   auto child = Actor::New();
   customActor.Add( child );
 
index ccc16a4..5d8d303 100644 (file)
@@ -216,7 +216,7 @@ int UtcDaliWheelEventSignalling(void)
   Actor actor = Actor::New();
   actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
   actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(actor);
+  application.GetScene().Add(actor);
 
   // Render and notify
   application.SendNotification();
@@ -243,7 +243,7 @@ int UtcDaliWheelEventSignalling(void)
   data.Reset();
 
   // Emit a wheel signal where the actor is not present, will hit the root actor though
-  Actor rootActor( Stage::GetCurrent().GetRootLayer() );
+  Actor rootActor( application.GetScene().GetRootLayer() );
 
   // Connect to root actor's wheel event signal
   SignalData rootData;
@@ -263,8 +263,8 @@ int UtcDaliWheelEventSignalling(void)
   DALI_TEST_EQUALS(1, rootData.receivedWheelEvent.z, TEST_LOCATION); // check modifier
   DALI_TEST_EQUALS(1000u, rootData.receivedWheelEvent.timeStamp, TEST_LOCATION); // check modifier
 
-  // Remove actor from stage
-  Stage::GetCurrent().Remove( actor );
+  // Remove actor from the scene
+  application.GetScene().Remove( actor );
 
   // Render and notify
   application.SendNotification();