END_TEST;
}
+int UtcDaliSceneGet(void)
+{
+ TestApplication application;
+ tet_infoline("Testing Dali::Integration::Scene::Get");
+
+ Dali::Integration::Scene scene = application.GetScene();
+
+ Actor actor = Actor::New();
+ DALI_TEST_CHECK( Dali::Integration::Scene() == Dali::Integration::Scene::Get( actor ) );
+
+ scene.Add( actor );
+
+ DALI_TEST_CHECK( scene == Dali::Integration::Scene::Get( actor ) );
+
+ END_TEST;
+}
+
int UtcDaliSceneEventProcessingFinishedP(void)
{
TestApplication application;
return *this;
}
-void Scene::Add( Actor& actor )
+void Scene::Add( Actor actor )
{
GetImplementation(*this).Add( GetImplementation(actor) );
}
-void Scene::Remove( Actor& actor )
+void Scene::Remove( Actor actor )
{
GetImplementation(*this).Remove( GetImplementation(actor) );
}
return GetImplementation(*this).GetSurface();
}
+Integration::Scene Scene::Get( Actor actor )
+{
+ return Dali::Integration::Scene( &GetImplementation( actor ).GetScene() );
+}
+
void Scene::QueueEvent( const Integration::Event& event )
{
GetImplementation(*this).QueueEvent( event );
* @pre The actor has been initialized.
* @pre The actor does not have a parent.
*/
- void Add(Actor& actor);
+ void Add(Actor actor);
/**
* @brief Removes a child Actor from the Scene.
* @param[in] actor The child
* @pre The actor has been added to the stage.
*/
- void Remove(Actor& actor);
+ void Remove(Actor actor);
/**
* @brief Returns the size of the Scene in pixels as a Vector.
Integration::RenderSurface* GetSurface() const;
/**
+ * @brief Retrieve the Scene that the given actor belongs to.
+ * @return The Scene.
+ */
+ static Integration::Scene Get( Actor actor );
+
+ /**
* This function is called when an event is queued.
* @param[in] event A event to queue.
*/