Add event handling support for multiple windows. 53/194553/13
authorAnton Obzhirov <a.obzhirov@samsung.com>
Fri, 30 Nov 2018 17:44:15 +0000 (17:44 +0000)
committerAnton Obzhirov <a.obzhirov@samsung.com>
Fri, 8 Mar 2019 14:25:31 +0000 (14:25 +0000)
Add all basic event handling for multiple windows.
Event gestures are partially supported for now.

Change-Id: I2c2d81b0e0eb25c0d8619afd94b5aa8784b0db8a

38 files changed:
automated-tests/src/dali/utc-Dali-Scene.cpp
dali/devel-api/events/hit-test-algorithm.cpp
dali/devel-api/events/hit-test-algorithm.h
dali/integration-api/scene.cpp
dali/integration-api/scene.h
dali/internal/common/core-impl.cpp
dali/internal/common/core-impl.h
dali/internal/event/common/scene-impl.cpp
dali/internal/event/common/scene-impl.h
dali/internal/event/common/stage-impl.cpp
dali/internal/event/common/stage-impl.h
dali/internal/event/events/event-processor.cpp
dali/internal/event/events/event-processor.h
dali/internal/event/events/gesture-detector-impl.cpp
dali/internal/event/events/gesture-event-processor.cpp
dali/internal/event/events/gesture-event-processor.h
dali/internal/event/events/gesture-processor.cpp
dali/internal/event/events/gesture-processor.h
dali/internal/event/events/hit-test-algorithm-impl.cpp
dali/internal/event/events/hit-test-algorithm-impl.h
dali/internal/event/events/hover-event-processor.cpp
dali/internal/event/events/hover-event-processor.h
dali/internal/event/events/key-event-processor.cpp
dali/internal/event/events/key-event-processor.h
dali/internal/event/events/long-press-gesture-processor.cpp
dali/internal/event/events/long-press-gesture-processor.h
dali/internal/event/events/pan-gesture-processor.cpp
dali/internal/event/events/pan-gesture-processor.h
dali/internal/event/events/pinch-gesture-processor.cpp
dali/internal/event/events/pinch-gesture-processor.h
dali/internal/event/events/tap-gesture-processor.cpp
dali/internal/event/events/tap-gesture-processor.h
dali/internal/event/events/touch-event-processor.cpp
dali/internal/event/events/touch-event-processor.h
dali/internal/event/events/wheel-event-processor.cpp
dali/internal/event/events/wheel-event-processor.h
dali/internal/event/render-tasks/render-task-impl.cpp
dali/internal/event/render-tasks/render-task-impl.h

index a8b706e..062679c 100644 (file)
 
 #include <stdlib.h>
 #include <dali/integration-api/scene.h>
+#include <dali/integration-api/events/key-event-integ.h>
+#include <dali/public-api/events/key-event.h>
+#include <dali/integration-api/events/touch-event-integ.h>
+#include <dali/integration-api/events/wheel-event-integ.h>
+
 #include <dali-test-suite-utils.h>
 
 // Internal headers are allowed here
 
+namespace
+{
+
+const std::string DEFAULT_DEVICE_NAME("hwKeyboard");
+
+// Functor for EventProcessingFinished signal
+struct EventProcessingFinishedFunctor
+{
+  /**
+   * @param[in] eventProcessingFinished reference to a boolean variable used to check if signal has been called.
+   */
+  EventProcessingFinishedFunctor( bool& eventProcessingFinished )
+  : mEventProcessingFinished( eventProcessingFinished )
+  {}
+
+  void operator()()
+  {
+    mEventProcessingFinished = true;
+  }
+
+  bool& mEventProcessingFinished;
+};
+
+// Stores data that is populated in the key-event callback and will be read by the TET cases
+struct KeyEventSignalData
+{
+  KeyEventSignalData()
+  : functorCalled(false)
+  {}
+
+  void Reset()
+  {
+    functorCalled = false;
+
+    receivedKeyEvent.keyModifier = 0;
+    receivedKeyEvent.keyPressedName.clear();
+    receivedKeyEvent.keyPressed.clear();
+  }
+
+  bool functorCalled;
+  KeyEvent receivedKeyEvent;
+};
+
+// Functor that sets the data when called
+struct KeyEventReceivedFunctor
+{
+  KeyEventReceivedFunctor( KeyEventSignalData& data ) : signalData( data ) { }
+
+  bool operator()( const KeyEvent& keyEvent )
+  {
+    signalData.functorCalled = true;
+    signalData.receivedKeyEvent = keyEvent;
+
+    return true;
+  }
+
+  KeyEventSignalData& signalData;
+};
+
+// Stores data that is populated in the touched signal callback and will be read by the TET cases
+struct TouchedSignalData
+{
+  TouchedSignalData()
+  : functorCalled(false)
+  {}
+
+  void Reset()
+  {
+    functorCalled = false;
+
+    receivedTouchEvent.points.clear();
+    receivedTouchEvent.time = 0;
+
+    receivedTouchData.Reset();
+  }
+
+  bool functorCalled;
+  TouchEvent receivedTouchEvent;
+  TouchData receivedTouchData;
+};
+
+// Functor that sets the data when touched signal is received
+struct TouchedFunctor
+{
+  TouchedFunctor( TouchedSignalData& data ) : signalData( data ) { }
+
+  void operator()( const TouchEvent& touch )
+  {
+    signalData.functorCalled = true;
+    signalData.receivedTouchEvent = touch;
+  }
+
+  TouchedSignalData& signalData;
+};
+
+// Functor that sets the data when touched signal is received
+struct TouchFunctor
+{
+  TouchFunctor( TouchedSignalData& data ) : signalData( data ) { }
+
+  void operator()( const TouchData& touch )
+  {
+    signalData.functorCalled = true;
+    signalData.receivedTouchData = touch;
+  }
+
+  void operator()()
+  {
+    signalData.functorCalled = true;
+  }
+
+  TouchedSignalData& signalData;
+};
+
+// Stores data that is populated in the wheel-event callback and will be read by the TET cases
+struct WheelEventSignalData
+{
+  WheelEventSignalData()
+  : functorCalled(false)
+  {}
+
+  void Reset()
+  {
+    functorCalled = false;
+  }
+
+  bool functorCalled;
+  WheelEvent receivedWheelEvent;
+};
+
+// Functor that sets the data when wheel-event signal is received
+struct WheelEventReceivedFunctor
+{
+  WheelEventReceivedFunctor( WheelEventSignalData& data ) : signalData( data ) { }
+
+  bool operator()( const WheelEvent& wheelEvent )
+  {
+    signalData.functorCalled = true;
+    signalData.receivedWheelEvent = wheelEvent;
+
+    return true;
+  }
+
+  WheelEventSignalData& signalData;
+};
+
+void GenerateTouch( TestApplication& application, PointState::Type state, const Vector2& screenPosition )
+{
+  Integration::TouchEvent touchEvent;
+  Integration::Point point;
+  point.SetState( state );
+  point.SetScreenPosition( screenPosition );
+  touchEvent.points.push_back( point );
+  application.ProcessEvent( touchEvent );
+}
+
+bool DummyTouchCallback( Actor actor, const TouchEvent& touch )
+{
+  return true;
+}
+
+} // unnamed namespace
+
 int UtcDaliSceneAdd(void)
 {
   TestApplication application;
@@ -156,3 +324,346 @@ int UtcDaliSceneGetLayer(void)
   END_TEST;
 }
 
+int UtcDaliSceneEventProcessingFinishedP(void)
+{
+  TestApplication application;
+  Dali::Integration::Scene scene = application.GetScene();
+
+  bool eventProcessingFinished = false;
+  EventProcessingFinishedFunctor functor( eventProcessingFinished );
+  scene.EventProcessingFinishedSignal().Connect( &application, functor );
+
+  Actor actor( Actor::New() );
+  scene.Add( actor );
+
+  application.SendNotification();
+  application.Render();
+
+  DALI_TEST_CHECK( eventProcessingFinished );
+
+  END_TEST;
+}
+
+int UtcDaliSceneEventProcessingFinishedN(void)
+{
+  TestApplication application;
+  Dali::Integration::Scene scene = application.GetScene();
+
+  bool eventProcessingFinished = false;
+  EventProcessingFinishedFunctor functor( eventProcessingFinished );
+  scene.EventProcessingFinishedSignal().Connect( &application, functor );
+
+  Actor actor( Actor::New() );
+  scene.Add( actor );
+
+  // Do not complete event processing and confirm the signal has not been emitted.
+  DALI_TEST_CHECK( !eventProcessingFinished );
+
+  END_TEST;
+}
+
+int UtcDaliSceneSignalKeyEventP(void)
+{
+  TestApplication application;
+  Dali::Integration::Scene scene = application.GetScene();
+
+  KeyEventSignalData data;
+  KeyEventReceivedFunctor functor( data );
+  scene.KeyEventSignal().Connect( &application, functor );
+
+  Integration::KeyEvent event( "i", "", "i", 0, 0, 0, Integration::KeyEvent::Down, "i", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+  application.ProcessEvent( event );
+
+  DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
+  DALI_TEST_CHECK( event.keyModifier == data.receivedKeyEvent.keyModifier );
+  DALI_TEST_CHECK( event.keyName == data.receivedKeyEvent.keyPressedName );
+  DALI_TEST_CHECK( event.keyString == data.receivedKeyEvent.keyPressed );
+  DALI_TEST_CHECK( event.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.state ) );
+
+  data.Reset();
+
+  Integration::KeyEvent event2( "i", "", "i", 0, 0, 0, Integration::KeyEvent::Up, "i", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+  application.ProcessEvent( event2 );
+
+  DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
+  DALI_TEST_CHECK( event2.keyModifier == data.receivedKeyEvent.keyModifier );
+  DALI_TEST_CHECK( event2.keyName == data.receivedKeyEvent.keyPressedName );
+  DALI_TEST_CHECK( event2.keyString == data.receivedKeyEvent.keyPressed );
+  DALI_TEST_CHECK( event2.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.state ) );
+
+  data.Reset();
+
+  Integration::KeyEvent event3( "a", "", "a", 0, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+  application.ProcessEvent( event3 );
+
+  DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
+  DALI_TEST_CHECK( event3.keyModifier == data.receivedKeyEvent.keyModifier );
+  DALI_TEST_CHECK( event3.keyName == data.receivedKeyEvent.keyPressedName );
+  DALI_TEST_CHECK( event3.keyString == data.receivedKeyEvent.keyPressed );
+  DALI_TEST_CHECK( event3.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.state ) );
+
+  data.Reset();
+
+  Integration::KeyEvent event4( "a", "", "a", 0, 0, 0, Integration::KeyEvent::Up, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+  application.ProcessEvent( event4 );
+
+  DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
+  DALI_TEST_CHECK( event4.keyModifier == data.receivedKeyEvent.keyModifier );
+  DALI_TEST_CHECK( event4.keyName == data.receivedKeyEvent.keyPressedName );
+  DALI_TEST_CHECK( event4.keyString == data.receivedKeyEvent.keyPressed );
+  DALI_TEST_CHECK( event4.state == static_cast<Integration::KeyEvent::State>( data.receivedKeyEvent.state ) );
+  END_TEST;
+}
+
+int UtcDaliSceneSignalKeyEventN(void)
+{
+  TestApplication application;
+  Dali::Integration::Scene scene = application.GetScene();
+
+  KeyEventSignalData data;
+  KeyEventReceivedFunctor functor( data );
+  scene.KeyEventSignal().Connect( &application, functor );
+
+  // Check that a non-pressed key events data is not modified.
+  DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliSceneTouchSignalP(void)
+{
+  TestApplication application;
+  Dali::Integration::Scene scene = application.GetScene();
+
+  TouchedSignalData data;
+  TouchFunctor functor( data );
+  scene.TouchSignal().Connect( &application, functor );
+
+  // Render and notify.
+  application.SendNotification();
+  application.Render();
+
+  // Basic test: No actors, single touch (down then up).
+  {
+    GenerateTouch( application, PointState::DOWN, Vector2( 10.0f, 10.0f ) );
+
+    DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
+    DALI_TEST_CHECK( data.receivedTouchData.GetPointCount() != 0u );
+    DALI_TEST_CHECK( !data.receivedTouchData.GetHitActor(0) );
+    data.Reset();
+
+    GenerateTouch( application, PointState::UP, Vector2( 10.0f, 10.0f ) );
+
+    DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
+    DALI_TEST_CHECK( data.receivedTouchData.GetPointCount() != 0u );
+    DALI_TEST_CHECK( !data.receivedTouchData.GetHitActor(0) );
+    data.Reset();
+  }
+
+  // Add an actor to the scene.
+  Actor actor = Actor::New();
+  actor.SetSize( 100.0f, 100.0f );
+  actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+  actor.SetParentOrigin( ParentOrigin::TOP_LEFT );
+  actor.TouchedSignal().Connect( &DummyTouchCallback );
+  scene.Add( actor );
+
+  // Render and notify.
+  application.SendNotification();
+  application.Render();
+
+  // Actor on scene, single touch, down in actor, motion, then up outside actor.
+  {
+    GenerateTouch( application, PointState::DOWN, Vector2( 10.0f, 10.0f ) );
+
+    DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
+    DALI_TEST_CHECK( data.receivedTouchData.GetPointCount() != 0u );
+    DALI_TEST_CHECK( data.receivedTouchData.GetHitActor(0) == actor );
+    data.Reset();
+
+    GenerateTouch( application, PointState::MOTION, Vector2( 150.0f, 10.0f ) ); // Some motion
+
+    DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
+    data.Reset();
+
+    GenerateTouch( application, PointState::UP, Vector2( 150.0f, 10.0f ) ); // Some motion
+
+    DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
+    DALI_TEST_CHECK( data.receivedTouchData.GetPointCount() != 0u );
+    DALI_TEST_CHECK( !data.receivedTouchData.GetHitActor(0) );
+    data.Reset();
+  }
+
+  // Multiple touch. Should only receive a touch on first down and last up.
+  {
+    Integration::TouchEvent touchEvent;
+    Integration::Point point;
+
+    // 1st point
+    point.SetState( PointState::DOWN );
+    point.SetScreenPosition( Vector2( 10.0f, 10.0f ) );
+    touchEvent.points.push_back( point );
+    application.ProcessEvent( touchEvent );
+    DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
+    DALI_TEST_EQUALS( data.receivedTouchData.GetPointCount(), 1u, TEST_LOCATION );
+    data.Reset();
+
+    // 2nd point
+    touchEvent.points[0].SetState( PointState::STATIONARY );
+    point.SetDeviceId( 1 );
+    point.SetScreenPosition( Vector2( 50.0f, 50.0f ) );
+    touchEvent.points.push_back( point );
+    application.ProcessEvent( touchEvent );
+    DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
+    data.Reset();
+
+    // Primary point is up
+    touchEvent.points[0].SetState( PointState::UP );
+    touchEvent.points[1].SetState( PointState::STATIONARY );
+    application.ProcessEvent( touchEvent );
+    DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
+    data.Reset();
+
+    // Remove 1st point now, 2nd point is now in motion
+    touchEvent.points.erase( touchEvent.points.begin() );
+    touchEvent.points[0].SetState( PointState::MOTION );
+    touchEvent.points[0].SetScreenPosition( Vector2( 150.0f, 50.0f ) );
+    application.ProcessEvent( touchEvent );
+    DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
+    data.Reset();
+
+    // Final point Up
+    touchEvent.points[0].SetState( PointState::UP );
+    application.ProcessEvent( touchEvent );
+    DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
+    DALI_TEST_EQUALS( data.receivedTouchData.GetPointCount(), 1u, TEST_LOCATION );
+    data.Reset();
+  }
+  END_TEST;
+}
+
+int UtcDaliSceneTouchSignalN(void)
+{
+  TestApplication application;
+  Dali::Integration::Scene scene = application.GetScene();
+
+  TouchedSignalData data;
+  TouchFunctor functor( data );
+  scene.TouchSignal().Connect( &application, functor );
+
+  // Render and notify.
+  application.SendNotification();
+  application.Render();
+
+  // Confirm functor not called before there has been any touch event.
+  DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
+
+  // No actors, single touch, down, motion then up.
+  {
+    GenerateTouch( application, PointState::DOWN, Vector2( 10.0f, 10.0f ) );
+
+    DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
+    DALI_TEST_CHECK( data.receivedTouchData.GetPointCount() != 0u );
+    DALI_TEST_CHECK( !data.receivedTouchData.GetHitActor(0));
+
+    data.Reset();
+
+    // Confirm there is no signal when the touchpoint is only moved.
+    GenerateTouch( application, PointState::MOTION, Vector2( 1200.0f, 10.0f ) ); // Some motion
+
+    DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
+    data.Reset();
+
+    // Confirm a following up event generates a signal.
+    GenerateTouch( application, PointState::UP, Vector2( 1200.0f, 10.0f ) );
+
+    DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
+    DALI_TEST_CHECK( data.receivedTouchData.GetPointCount() != 0u );
+    DALI_TEST_CHECK( !data.receivedTouchData.GetHitActor(0));
+    data.Reset();
+  }
+
+  // Add an actor to the scene.
+  Actor actor = Actor::New();
+  actor.SetSize( 100.0f, 100.0f );
+  actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+  actor.SetParentOrigin( ParentOrigin::TOP_LEFT );
+  actor.TouchedSignal().Connect( &DummyTouchCallback );
+  scene.Add( actor );
+
+  // Render and notify.
+  application.SendNotification();
+  application.Render();
+
+  // Actor on scene. Interrupted before down and interrupted after down.
+  {
+    GenerateTouch( application, PointState::INTERRUPTED, Vector2( 10.0f, 10.0f ) );
+
+    DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
+    DALI_TEST_CHECK( data.receivedTouchData.GetPointCount() != 0u );
+    DALI_TEST_CHECK( !data.receivedTouchData.GetHitActor(0) );
+    DALI_TEST_CHECK( data.receivedTouchData.GetState(0) == PointState::INTERRUPTED );
+    data.Reset();
+
+    GenerateTouch( application, PointState::DOWN, Vector2( 10.0f, 10.0f ) );
+
+    DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
+    DALI_TEST_CHECK( data.receivedTouchData.GetPointCount() != 0u );
+    DALI_TEST_CHECK( data.receivedTouchData.GetHitActor(0) == actor );
+    DALI_TEST_CHECK( data.receivedTouchData.GetState(0) == PointState::DOWN );
+    data.Reset();
+
+    GenerateTouch( application, PointState::INTERRUPTED, Vector2( 10.0f, 10.0f ) );
+
+    DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
+    DALI_TEST_CHECK( data.receivedTouchData.GetPointCount() != 0u );
+    DALI_TEST_CHECK( !data.receivedTouchData.GetHitActor(0) );
+    DALI_TEST_CHECK( data.receivedTouchData.GetState(0) == PointState::INTERRUPTED );
+
+    DALI_TEST_EQUALS( data.receivedTouchData.GetPointCount(), 1u, TEST_LOCATION );
+
+    // Check that getting info about a non-existent point returns an empty handle
+    Actor actor = data.receivedTouchData.GetHitActor( 1 );
+    DALI_TEST_CHECK( !actor );
+
+    data.Reset();
+  }
+
+  END_TEST;
+}
+
+int UtcDaliSceneSignalWheelEventP(void)
+{
+  TestApplication application;
+  Dali::Integration::Scene scene = application.GetScene();
+
+  WheelEventSignalData data;
+  WheelEventReceivedFunctor functor( data );
+  scene.WheelEventSignal().Connect( &application, functor );
+
+  Integration::WheelEvent event( Integration::WheelEvent::CUSTOM_WHEEL, 0, 0u, Vector2( 0.0f, 0.0f ), 1, 1000u );
+  application.ProcessEvent( event );
+
+  DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
+  DALI_TEST_CHECK( static_cast< WheelEvent::Type >(event.type) == data.receivedWheelEvent.type );
+  DALI_TEST_CHECK( event.direction == data.receivedWheelEvent.direction );
+  DALI_TEST_CHECK( event.modifiers == data.receivedWheelEvent.modifiers );
+  DALI_TEST_CHECK( event.point == data.receivedWheelEvent.point );
+  DALI_TEST_CHECK( event.z == data.receivedWheelEvent.z );
+  DALI_TEST_CHECK( event.timeStamp == data.receivedWheelEvent.timeStamp );
+
+  data.Reset();
+
+  Integration::WheelEvent event2( Integration::WheelEvent::CUSTOM_WHEEL, 0, 0u, Vector2( 0.0f, 0.0f ), -1, 1000u );
+  application.ProcessEvent( event2 );
+
+  DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
+  DALI_TEST_CHECK( static_cast< WheelEvent::Type >(event2.type) == data.receivedWheelEvent.type );
+  DALI_TEST_CHECK( event2.direction == data.receivedWheelEvent.direction );
+  DALI_TEST_CHECK( event2.modifiers == data.receivedWheelEvent.modifiers );
+  DALI_TEST_CHECK( event2.point == data.receivedWheelEvent.point );
+  DALI_TEST_CHECK( event2.z == data.receivedWheelEvent.z );
+  DALI_TEST_CHECK( event2.timeStamp == data.receivedWheelEvent.timeStamp );
+  END_TEST;
+}
+
index c260513..70377fe 100644 (file)
@@ -21,6 +21,7 @@
 // INTERNAL INCLUDES
 #include <dali/internal/event/events/hit-test-algorithm-impl.h>
 #include <dali/internal/event/common/stage-impl.h>
+#include <dali/internal/event/common/scene-impl.h>
 #include <dali/internal/event/render-tasks/render-task-impl.h>
 
 namespace Dali
@@ -31,7 +32,8 @@ namespace HitTestAlgorithm
 
 bool HitTest( Stage stage, const Vector2& screenCoordinates, Results& results, HitTestFunction func )
 {
-  return Internal::HitTestAlgorithm::HitTest( GetImplementation(stage), screenCoordinates, results, func );
+  Internal::Stage& stageImpl = GetImplementation( stage );
+  return Internal::HitTestAlgorithm::HitTest( stageImpl.GetSize(), stageImpl.GetRenderTaskList(), stageImpl.GetLayerList(), screenCoordinates, results, func );
 }
 
 } // namespace HitTestAlgorithm
index 02d8c3b..f3b5774 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <dali/public-api/actors/actor.h>
 #include <dali/public-api/common/stage.h>
+#include <dali/integration-api/scene.h>
 
 
 namespace Dali
index 717132c..0a1f690 100644 (file)
@@ -29,10 +29,10 @@ namespace Dali
 namespace Integration
 {
 
-Scene Scene::New( Size size )
+Scene Scene::New( const Size& size )
 {
   Internal::ScenePtr internal = Internal::Scene::New( size );
-  return Scene(internal.Get());
+  return Scene( internal.Get() );
 }
 
 Scene Scene::DownCast( BaseHandle handle )
@@ -114,6 +114,41 @@ void Scene::SetSurface( Integration::RenderSurface& surface )
   GetImplementation(*this).SetSurface( surface );
 }
 
+Integration::RenderSurface* Scene::GetSurface() const
+{
+  return GetImplementation(*this).GetSurface();
+}
+
+void Scene::QueueEvent( const Integration::Event& event )
+{
+  GetImplementation(*this).QueueEvent( event );
+}
+
+void Scene::ProcessEvents()
+{
+  GetImplementation(*this).ProcessEvents();
+}
+
+Scene::EventProcessingFinishedSignalType& Scene::EventProcessingFinishedSignal()
+{
+  return GetImplementation(*this).EventProcessingFinishedSignal();
+}
+
+Scene::KeyEventSignalType& Scene::KeyEventSignal()
+{
+  return GetImplementation(*this).KeyEventSignal();
+}
+
+Scene::TouchSignalType& Scene::TouchSignal()
+{
+  return GetImplementation(*this).TouchSignal();
+}
+
+Scene::WheelEventSignalType& Scene::WheelEventSignal()
+{
+  return GetImplementation(*this).WheelEventSignal();
+}
+
 } // Integration
 
 } // Dali
index 83519b6..092b6c3 100644 (file)
@@ -26,8 +26,11 @@ namespace Dali
 {
 
 class Actor;
+class KeyEvent;
 class Layer;
 class RenderTaskList;
+class TouchData;
+class WheelEvent;
 
 namespace Internal DALI_INTERNAL
 {
@@ -38,6 +41,7 @@ namespace Integration
 {
 
 class RenderSurface;
+struct Event;
 
 /**
  * @brief
@@ -48,6 +52,10 @@ class RenderSurface;
 class DALI_CORE_API Scene : public BaseHandle
 {
 public:
+  typedef Signal< void () > EventProcessingFinishedSignalType; ///< Event Processing finished signal type
+  typedef Signal< void (const Dali::KeyEvent&) > KeyEventSignalType; ///< Key event signal type
+  typedef Signal< void (const Dali::TouchData&) > TouchSignalType; ///< Touch signal type
+  typedef Signal< void (const Dali::WheelEvent&) > WheelEventSignalType; ///< Touched signal type
 
   /**
    * @brief Create an initialized Scene handle.
@@ -56,7 +64,7 @@ public:
    *
    * @return a handle to a newly allocated Dali resource.
    */
-  static Scene New( Size size );
+  static Scene New( const Size& size );
 
   /**
    * @brief Downcast an Object handle to Scene handle.
@@ -178,6 +186,70 @@ public:
    */
   void SetSurface( Integration::RenderSurface& surface );
 
+  /**
+   * @brief Gets the rendering surface bound to the scene
+   *
+   * @return The render surface
+   */
+  Integration::RenderSurface* GetSurface() const;
+
+  /**
+   * This function is called when an event is queued.
+   * @param[in] event A event to queue.
+   */
+  void QueueEvent( const Integration::Event& event );
+
+  /**
+   * This function is called by Core when events are processed.
+   */
+  void ProcessEvents();
+
+  /**
+   * @brief This signal is emitted just after the event processing is finished.
+   *
+   * @return The signal to connect to
+   */
+  EventProcessingFinishedSignalType& EventProcessingFinishedSignal();
+
+  /**
+   * @brief This signal is emitted when key event is received.
+   *
+   * A callback of the following type may be connected:
+   * @code
+   *   void YourCallbackName(const KeyEvent& event);
+   * @endcode
+   * @return The signal to connect to
+   */
+  KeyEventSignalType& KeyEventSignal();
+
+  /**
+   * @brief This signal is emitted when the screen is touched and when the touch ends
+   * (i.e. the down & up touch events only).
+   *
+   * If there are multiple touch points, then this will be emitted when the first touch occurs and
+   * then when the last finger is lifted.
+   * An interrupted event will also be emitted (if it occurs).
+   * A callback of the following type may be connected:
+   * @code
+   *   void YourCallbackName( TouchData event );
+   * @endcode
+   *
+   * @return The touch signal to connect to
+   * @note Motion events are not emitted.
+   */
+  TouchSignalType& TouchSignal();
+
+  /**
+   * @brief This signal is emitted when wheel event is received.
+   *
+   * A callback of the following type may be connected:
+   * @code
+   *   void YourCallbackName(const WheelEvent& event);
+   * @endcode
+   * @return The signal to connect to
+   */
+  WheelEventSignalType& WheelEventSignal();
+
 public: // Not intended for application developers
 
   /**
index 4ddbc04..8e99503 100644 (file)
@@ -132,8 +132,7 @@ Core::Core( RenderController& renderController,
   // This must be called after stage is created but before stage initialization
   mRelayoutController = IntrusivePtr< RelayoutController >( new RelayoutController( mRenderController ) );
 
-  mGestureEventProcessor = new GestureEventProcessor( *mStage, *mUpdateManager, gestureManager, mRenderController );
-  mEventProcessor = new EventProcessor( *mStage, *mNotificationManager, *mGestureEventProcessor );
+  mGestureEventProcessor = new GestureEventProcessor( *mUpdateManager, gestureManager, mRenderController );
 
   mShaderFactory = new ShaderFactory();
   mUpdateManager->SetShaderSaver( *mShaderFactory );
@@ -249,7 +248,10 @@ void Core::SceneCreated()
 
 void Core::QueueEvent( const Integration::Event& event )
 {
-  mEventProcessor->QueueEvent( event );
+  if (mScenes.size() != 0)
+  {
+    mScenes.front()->QueueEvent( event );
+  }
 }
 
 void Core::ProcessEvents()
@@ -268,12 +270,19 @@ void Core::ProcessEvents()
   // Signal that any messages received will be flushed soon
   mUpdateManager->EventProcessingStarted();
 
-  mEventProcessor->ProcessEvents();
+  // process events in all scenes
+  for( auto iter = mScenes.begin(); iter != mScenes.end(); ++iter )
+  {
+    (*iter)->ProcessEvents();
+  }
 
   mNotificationManager->ProcessMessages();
 
   // Emit signal here to inform listeners that event processing has finished.
-  mStage->EmitEventProcessingFinishedSignal();
+  for( auto iter = mScenes.begin(); iter != mScenes.end(); ++iter )
+  {
+    (*iter)->EmitEventProcessingFinishedSignal();
+  }
 
   // Run any registered processors
   RunProcessors();
@@ -281,7 +290,6 @@ void Core::ProcessEvents()
   // Run the size negotiation after event processing finished signal
   mRelayoutController->Relayout();
 
-
   // Rebuild depth tree after event processing has finished
   for( auto iter = mScenes.begin(); iter != mScenes.end(); ++iter )
   {
index bd94c43..6e51b4a 100644 (file)
@@ -326,7 +326,6 @@ private:
   OwnerPointer<ShaderFactory>                   mShaderFactory;               ///< Shader resource factory
   OwnerPointer<NotificationManager>             mNotificationManager;         ///< Notification manager
   OwnerPointer<GestureEventProcessor>           mGestureEventProcessor;       ///< The gesture event processor
-  OwnerPointer<EventProcessor>                  mEventProcessor;              ///< The event processor
   Dali::Vector<Integration::Processor*>         mProcessors;                  ///< Registered processors (not owned)
 
   std::vector<ScenePtr>                         mScenes;                      ///< A container of scenes that bound to a surface for rendering, owned by Core
index f68060e..30a4a0f 100644 (file)
@@ -48,7 +48,7 @@ const Vector4 DEFAULT_BACKGROUND_COLOR(0.0f, 0.0f, 0.0f, 1.0f); // Default backg
 
 } //Unnamed namespace
 
-ScenePtr Scene::New( Size size )
+ScenePtr Scene::New( const Size& size )
 {
   ScenePtr scene = new Scene( size );
 
@@ -58,12 +58,13 @@ ScenePtr Scene::New( Size size )
   return scene;
 }
 
-Scene::Scene( Size size )
+Scene::Scene( const Size& size )
 : mSurface( nullptr ),
   mSize( size ),
   mSurfaceSize( Vector2::ZERO ),
   mDpi( Vector2::ZERO ),
-  mDepthTreeDirty( false )
+  mDepthTreeDirty( false ),
+  mEventProcessor( *this, ThreadLocalStorage::GetInternal()->GetGestureEventProcessor() )
 {
 }
 
@@ -108,7 +109,7 @@ void Scene::Initialize()
   // Create the ordered list of layers
   mLayerList = LayerList::New( updateManager );
 
-  // The stage owns the default layer
+  // The scene owns the default layer
   mRootLayer = Layer::NewRoot( *mLayerList, updateManager );
   mRootLayer->SetName("RootLayer");
   mRootLayer->SetScene( *this );
@@ -238,6 +239,16 @@ void Scene::RequestRebuildDepthTree()
   mDepthTreeDirty = true;
 }
 
+void Scene::QueueEvent( const Integration::Event& event )
+{
+  mEventProcessor.QueueEvent( event );
+}
+
+void Scene::ProcessEvents()
+{
+  mEventProcessor.ProcessEvents();
+}
+
 void Scene::RebuildDepthTree()
 {
   // If the depth tree needs rebuilding, do it in this frame only.
@@ -262,6 +273,51 @@ Vector4 Scene::GetBackgroundColor() const
   return mSurface ? mSurface->GetBackgroundColor() : DEFAULT_BACKGROUND_COLOR;
 }
 
+void Scene::EmitKeyEventSignal(const KeyEvent& event)
+{
+  mKeyEventSignal.Emit( event );
+}
+
+void Scene::EmitEventProcessingFinishedSignal()
+{
+  mEventProcessingFinishedSignal.Emit();
+}
+
+void Scene::EmitTouchedSignal( const TouchEvent& touchEvent, const Dali::TouchData& touch )
+{
+  mTouchedSignal.Emit( touchEvent );
+  mTouchSignal.Emit( touch );
+}
+
+void Scene::EmitWheelEventSignal(const WheelEvent& event)
+{
+  mWheelEventSignal.Emit( event );
+}
+
+Integration::Scene::KeyEventSignalType& Scene::KeyEventSignal()
+{
+  return mKeyEventSignal;
+}
+
+Integration::Scene::EventProcessingFinishedSignalType& Scene::EventProcessingFinishedSignal()
+{
+  return mEventProcessingFinishedSignal;
+}
+
+Scene::TouchedSignalType& Scene::TouchedSignal()
+{
+  return mTouchedSignal;
+}
+
+Integration::Scene::TouchSignalType& Scene::TouchSignal()
+{
+  return mTouchSignal;
+}
+
+Integration::Scene::WheelEventSignalType& Scene::WheelEventSignal()
+{
+  return mWheelEventSignal;
+}
 
 } // Internal
 
index 1140b6a..634bcbd 100644 (file)
 #include <dali/integration-api/render-surface.h>
 #include <dali/internal/common/owner-pointer.h>
 #include <dali/internal/event/actors/layer-impl.h>
+#include <dali/internal/event/events/event-processor.h>
 #include <dali/internal/event/render-tasks/render-task-defaults.h>
 
 namespace Dali
 {
 
+namespace Integration
+{
+
+class Event;
+
+}
+
 namespace Internal
 {
 
+class EventProcessor;
 class Layer;
 class LayerList;
 class CameraActor;
@@ -50,11 +59,10 @@ class Scene : public BaseObject, public RenderTaskDefaults
 {
 
 public:
-
   /**
    * @copydoc Dali::Integration::Scene::New
    */
-  static ScenePtr New( Size size );
+  static ScenePtr New( const Size& size );
 
   /**
    * virtual destructor
@@ -118,7 +126,7 @@ public:
   Integration::RenderSurface* GetSurface() const;
 
   /**
-   * Retrieve the ordered list of on-stage layers.
+   * Retrieve the ordered list of on-scene layers.
    * @return The layer-list.
    */
   LayerList& GetLayerList() const;
@@ -129,6 +137,17 @@ public:
   void RequestRebuildDepthTree();
 
   /**
+   * This function is called when an event is queued.
+   * @param[in] event A event to queue.
+   */
+  void QueueEvent( const Integration::Event& event );
+
+  /**
+   * This function is called by Core when events are processed.
+   */
+  void ProcessEvents();
+
+  /**
    * Rebuilds the depth tree at the end of the event frame if
    * it was requested this frame.
    */
@@ -146,6 +165,60 @@ public:
    */
   Vector4 GetBackgroundColor() const;
 
+  /**
+   * Used by the EventProcessor to emit key event signals.
+   * @param[in] event The key event.
+   */
+  void EmitKeyEventSignal(const KeyEvent& event);
+
+  /**
+   * Emits the event processing finished signal.
+   *
+   * @see Dali::Scene::SignalEventProcessingFinished()
+   */
+  void EmitEventProcessingFinishedSignal();
+
+  /**
+   * Emits the touched signal.
+   * @param[in] touchEvent The touch event details (Old API).
+   * @param[in] touch The touch event details.
+   */
+  void EmitTouchedSignal( const TouchEvent& touchEvent, const Dali::TouchData& touch );
+
+  /**
+   * Used by the EventProcessor to emit wheel event signals.
+   * @param[in] event The wheel event.
+   */
+  void EmitWheelEventSignal( const WheelEvent& event );
+
+  /**
+   * @copydoc Integration::Scene::KeyEventSignal()
+   */
+  Integration::Scene::KeyEventSignalType& KeyEventSignal();
+
+  /**
+   * @copydoc Integration::Scene::SignalEventProcessingFinished()
+   */
+  Integration::Scene::EventProcessingFinishedSignalType& EventProcessingFinishedSignal();
+
+  // The touched signal, to support Stage touched signal, will be removed when deprecated in public Stage API
+  using TouchedSignalType = Signal< void (const TouchEvent&) >;
+
+  /**
+   * Touched signal to support deprecated stage touched signal.
+   */
+  TouchedSignalType& TouchedSignal();
+
+  /**
+    * @copydoc Integration::Scene::TouchSignal()
+    */
+  Integration::Scene::TouchSignalType& TouchSignal();
+
+  /**
+   * @copydoc Integration::Scene::sWheelEventSignal()
+   */
+  Integration::Scene::WheelEventSignalType& WheelEventSignal();
+
 public:
 
   /**
@@ -163,7 +236,7 @@ public:
 private:
 
   // Constructor
-  Scene( Size size );
+  Scene( const Size& size );
 
   /**
    * Second-phase constructor.
@@ -177,7 +250,6 @@ private:
   Scene& operator=(const Scene& rhs) = delete;
 
 private:
-
   Integration::RenderSurface* mSurface;
 
   // The scene-size may be different with the surface-size
@@ -200,6 +272,23 @@ private:
   FrameBufferPtr mFrameBuffer;
 
   bool mDepthTreeDirty:1;  ///< True if the depth tree needs recalculating
+
+  EventProcessor mEventProcessor;
+
+  // The key event signal
+  Integration::Scene::KeyEventSignalType mKeyEventSignal;
+
+  // The event processing finished signal
+  Integration::Scene::EventProcessingFinishedSignalType mEventProcessingFinishedSignal;
+
+  // The touch signal
+  Integration::Scene::TouchSignalType mTouchSignal;
+
+  // The touched signal
+  TouchedSignalType mTouchedSignal;
+
+  // The wheel event signal
+  Integration::Scene::WheelEventSignalType mWheelEventSignal;
 };
 
 } // Internal
index 54201e1..69b0584 100644 (file)
@@ -36,6 +36,7 @@
 #include <dali/internal/event/common/object-registry-impl.h>
 #include <dali/integration-api/platform-abstraction.h>
 #include <dali/public-api/common/constants.h>
+#include <dali/public-api/events/touch-event.h>
 #include <dali/public-api/events/touch-data.h>
 #include <dali/public-api/object/type-registry.h>
 #include <dali/public-api/render-tasks/render-task-list.h>
@@ -94,6 +95,11 @@ void Stage::Initialize( Scene& scene )
 {
   mScene = &scene;
   mScene->SetBackgroundColor( Dali::Stage::DEFAULT_BACKGROUND_COLOR );
+  mScene->EventProcessingFinishedSignal().Connect( this, &Stage::OnEventProcessingFinished );
+  mScene->KeyEventSignal().Connect( this, &Stage::OnKeyEvent );
+  mScene->TouchedSignal().Connect( this, &Stage::OnTouchedEvent );
+  mScene->TouchSignal().Connect( this, &Stage::OnTouchEvent );
+  mScene->WheelEventSignal().Connect( this, &Stage::OnWheelEvent );
 }
 
 StagePtr Stage::GetCurrent()
@@ -261,6 +267,35 @@ bool Stage::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tra
   return connected;
 }
 
+void Stage::OnEventProcessingFinished()
+{
+  EmitEventProcessingFinishedSignal();
+}
+
+void Stage::OnKeyEvent( const Dali::KeyEvent& event )
+{
+  bool consumed = EmitKeyEventGeneratedSignal( event );
+  if( !consumed )
+  {
+    EmitKeyEventSignal( event );
+  }
+}
+
+void Stage::OnTouchedEvent( const Dali::TouchEvent& touchEvent )
+{
+  mTouchedSignal.Emit( touchEvent );
+}
+
+void Stage::OnTouchEvent( const Dali::TouchData& touch )
+{
+  mTouchSignal.Emit( touch );
+}
+
+void Stage::OnWheelEvent( const Dali::WheelEvent& event )
+{
+  EmitWheelEventSignal( event );
+}
+
 void Stage::EmitKeyEventSignal(const KeyEvent& event)
 {
   // Emit the key event signal when no actor in the stage has gained the key input focus
@@ -286,7 +321,7 @@ void Stage::EmitTouchedSignal( const TouchEvent& touchEvent, const Dali::TouchDa
   mTouchSignal.Emit( touch );
 }
 
-void Stage::EmitWheelEventSignal(const WheelEvent& event)
+void Stage::EmitWheelEventSignal( const WheelEvent& event )
 {
   // Emit the wheel event signal when no actor in the stage has gained the wheel input focus
 
index 1f52431..f8299a8 100644 (file)
@@ -65,7 +65,7 @@ class Scene;
 /**
  * Implementation of Stage
  */
-class Stage : public BaseObject, public RenderTaskDefaults, public Integration::ContextNotifierInterface
+class Stage : public BaseObject, public RenderTaskDefaults, public Integration::ContextNotifierInterface, public ConnectionTracker
 {
 public:
 
@@ -196,6 +196,31 @@ public:
   DevelStage::Rendering GetRenderingBehavior() const;
 
   /**
+   * Callback for Internal::Scene EventProcessingFinished signal
+   */
+  void OnEventProcessingFinished();
+
+  /**
+   * Callback for Internal::Scene KeyEventSignal signal
+   */
+  void OnKeyEvent( const Dali::KeyEvent& event );
+
+  /**
+   * Callback for Internal::Scene TouchedEventSignal signal
+   */
+  void OnTouchedEvent( const Dali::TouchEvent& touch );
+
+  /**
+   * Callback for Internal::Scene TouchSignal signal
+   */
+  void OnTouchEvent( const Dali::TouchData& touch );
+
+  /**
+   * Callback for Internal::Scene WheelEventSignal signal
+   */
+  void OnWheelEvent( const Dali::WheelEvent& event );
+
+  /**
    * Used by the EventProcessor to emit key event signals.
    * @param[in] event The key event.
    */
index 9a4874c..d19ff67 100644 (file)
@@ -55,12 +55,13 @@ static const std::size_t INITIAL_BUFFER_SIZE = MAX_MESSAGE_SIZE * INITIAL_MIN_CA
 
 } // unnamed namespace
 
-EventProcessor::EventProcessor(Stage& stage, NotificationManager& /* notificationManager */, GestureEventProcessor& gestureEventProcessor)
-: mTouchEventProcessor(stage),
-  mHoverEventProcessor(stage),
-  mGestureEventProcessor(gestureEventProcessor),
-  mKeyEventProcessor(stage),
-  mWheelEventProcessor(stage),
+EventProcessor::EventProcessor( Scene& scene, GestureEventProcessor& gestureEventProcessor )
+: mScene( scene ),
+  mTouchEventProcessor( scene ),
+  mHoverEventProcessor( scene ),
+  mGestureEventProcessor( gestureEventProcessor ),
+  mKeyEventProcessor( scene ),
+  mWheelEventProcessor( scene ),
   mEventQueue0( INITIAL_BUFFER_SIZE ),
   mEventQueue1( INITIAL_BUFFER_SIZE ),
   mCurrentEventQueue( &mEventQueue0 )
@@ -212,7 +213,7 @@ void EventProcessor::ProcessEvents()
   MessageBuffer* queueToProcess = mCurrentEventQueue;
 
   // Switch current queue; events can be added safely while iterating through the other queue.
-  mCurrentEventQueue = (&mEventQueue0 == mCurrentEventQueue) ? &mEventQueue1 : &mEventQueue0;
+  mCurrentEventQueue = ( &mEventQueue0 == mCurrentEventQueue ) ? &mEventQueue1 : &mEventQueue0;
 
   for( MessageBuffer::Iterator iter = queueToProcess->Begin(); iter.IsValid(); iter.Next() )
   {
@@ -246,7 +247,7 @@ void EventProcessor::ProcessEvents()
 
       case Event::Gesture:
       {
-        mGestureEventProcessor.ProcessGestureEvent( static_cast<const Integration::GestureEvent&>(*event) );
+        mGestureEventProcessor.ProcessGestureEvent( mScene, static_cast<const Integration::GestureEvent&>(*event) );
         break;
       }
 
index bc5300e..44392b1 100644 (file)
@@ -37,7 +37,7 @@ struct GestureEvent;
 namespace Internal
 {
 
-class Stage;
+class Scene;
 class GestureEventProcessor;
 class NotificationManager;
 
@@ -54,11 +54,10 @@ public:
 
   /**
    * Constructor
-   * @param[in] stage                  The stage.
-   * @param[in] notificationManager    The Notification Manager.
+   * @param[in] scene                  The scene.
    * @param[in] gestureEventProcessor  The gesture event processor.
    */
-  EventProcessor(Stage& stage, NotificationManager& notificationManager, GestureEventProcessor& gestureEventProcessor);
+  EventProcessor( Scene& scene, GestureEventProcessor& gestureEventProcessor );
 
   /**
    * Destructor
@@ -68,13 +67,13 @@ public:
 public:
 
   /**
-   * This function is called by Core when an event is queued.
+   * This function is called when an event is queued.
    * @param[in] event A event to queue.
    */
   void QueueEvent( const Integration::Event& event );
 
   /**
-   * This function is called by Core when events are processed.
+   * This function is called when events are processed.
    */
   void ProcessEvents();
 
@@ -87,6 +86,7 @@ private:
 
 private:
 
+  Scene& mScene;                                        ///< The Scene events are processed for.
   TouchEventProcessor      mTouchEventProcessor;        ///< Processes touch events.
   HoverEventProcessor      mHoverEventProcessor;        ///< Processes hover events.
   GestureEventProcessor&   mGestureEventProcessor;      ///< Processes gesture events.
index f1cd4e7..a871337 100644 (file)
@@ -62,26 +62,26 @@ GestureDetector::~GestureDetector()
   }
 }
 
-void GestureDetector::Attach(Actor& actor)
+void GestureDetector::Attach( Actor& actor )
 {
-  if ( !IsAttached(actor) )
+  if ( !IsAttached( actor) )
   {
     // Register with EventProcessor if first actor being added
-    if ( mAttachedActors.empty() )
+    if( mAttachedActors.empty() )
     {
-      mGestureEventProcessor.AddGestureDetector(this);
+      mGestureEventProcessor.AddGestureDetector( this );
     }
 
-    mAttachedActors.push_back(&actor);
+    mAttachedActors.push_back( &actor );
 
     // We need to observe the actor's destruction
-    actor.AddObserver(*this);
+    actor.AddObserver( *this );
 
     // Add the detector to the actor (so the actor knows it requires this gesture when going through hit-test algorithm)
     actor.GetGestureData().AddGestureDetector( *this );
 
     // Notification for derived classes
-    OnActorAttach(actor);
+    OnActorAttach( actor );
   }
 }
 
index 6ad09d9..07eb618 100644 (file)
@@ -37,13 +37,12 @@ namespace Dali
 namespace Internal
 {
 
-GestureEventProcessor::GestureEventProcessor( Stage& stage, SceneGraph::UpdateManager& updateManager, Integration::GestureManager& gestureManager, Integration::RenderController& renderController )
-: mStage( stage ),
-  mGestureManager( gestureManager ),
-  mLongPressGestureProcessor( stage, gestureManager ),
-  mPanGestureProcessor( stage, gestureManager, updateManager ),
-  mPinchGestureProcessor( stage, gestureManager ),
-  mTapGestureProcessor( stage, gestureManager ),
+GestureEventProcessor::GestureEventProcessor( SceneGraph::UpdateManager& updateManager, Integration::GestureManager& gestureManager, Integration::RenderController& renderController )
+: mGestureManager( gestureManager ),
+  mLongPressGestureProcessor( gestureManager ),
+  mPanGestureProcessor( gestureManager, updateManager ),
+  mPinchGestureProcessor( gestureManager ),
+  mTapGestureProcessor( gestureManager ),
   mRenderController( renderController ),
   mUpdateRequired( false )
 {
@@ -53,7 +52,7 @@ GestureEventProcessor::~GestureEventProcessor()
 {
 }
 
-void GestureEventProcessor::ProcessGestureEvent(const Integration::GestureEvent& event)
+void GestureEventProcessor::ProcessGestureEvent( Scene& scene, const Integration::GestureEvent& event)
 {
   if( Gesture::Started == event.state || Gesture::Continuing == event.state )
   {
@@ -63,19 +62,19 @@ void GestureEventProcessor::ProcessGestureEvent(const Integration::GestureEvent&
   switch(event.gestureType)
   {
     case Gesture::LongPress:
-      mLongPressGestureProcessor.Process(static_cast<const Integration::LongPressGestureEvent&>(event));
+      mLongPressGestureProcessor.Process( scene, static_cast<const Integration::LongPressGestureEvent&>(event) );
       break;
 
     case Gesture::Pan:
-      mPanGestureProcessor.Process(static_cast<const Integration::PanGestureEvent&>(event));
+      mPanGestureProcessor.Process( scene, static_cast<const Integration::PanGestureEvent&>(event));
       break;
 
     case Gesture::Pinch:
-      mPinchGestureProcessor.Process(static_cast<const Integration::PinchGestureEvent&>(event));
+      mPinchGestureProcessor.Process( scene, static_cast<const Integration::PinchGestureEvent&>(event));
       break;
 
     case Gesture::Tap:
-      mTapGestureProcessor.Process(static_cast<const Integration::TapGestureEvent&>(event));
+      mTapGestureProcessor.Process( scene, static_cast<const Integration::TapGestureEvent&>(event));
       break;
   }
 }
index 78c252f..903f5a6 100644 (file)
@@ -47,6 +47,7 @@ namespace Internal
 {
 
 class Stage;
+class Scene;
 
 /**
  * Gesture Event Processing:
@@ -60,12 +61,11 @@ public:
 
   /**
    * Create a gesture event processor.
-   * @param[in] stage The stage.
    * @param[in] updateManager The update manager
    * @param[in] gestureManager The gesture manager
    * @param[in] renderController The render controller
    */
-  GestureEventProcessor( Stage& stage, SceneGraph::UpdateManager& updateManager, Integration::GestureManager& gestureManager, Integration::RenderController& renderController );
+  GestureEventProcessor( SceneGraph::UpdateManager& updateManager, Integration::GestureManager& gestureManager, Integration::RenderController& renderController );
 
   /**
    * Non-virtual destructor; GestureProcessor is not a base class
@@ -78,7 +78,7 @@ public: // To be called by EventProcessor
    * This function is called by Core whenever a gesture event occurs.
    * @param[in] event The event that has occurred.
    */
-  void ProcessGestureEvent(const Integration::GestureEvent& event);
+  void ProcessGestureEvent( Scene& scene, const Integration::GestureEvent& event );
 
 public: // To be called by gesture detectors
 
@@ -252,7 +252,6 @@ private:
 
 private:
 
-  Stage& mStage;
   Integration::GestureManager& mGestureManager;
 
   LongPressGestureProcessor mLongPressGestureProcessor;
index 5ad06df..153dafb 100644 (file)
@@ -22,6 +22,7 @@
 #include <dali/integration-api/debug.h>
 #include <dali/internal/event/actors/actor-impl.h>
 #include <dali/internal/event/actors/layer-impl.h>
+#include <dali/internal/event/common/scene-impl.h>
 #include <dali/internal/event/events/hit-test-algorithm-impl.h>
 #include <dali/internal/event/events/actor-gesture-data.h>
 #include <dali/internal/event/render-tasks/render-task-impl.h>
@@ -170,13 +171,10 @@ void GestureProcessor::ProcessAndEmit( HitTestAlgorithm::Results& hitTestResults
   }
 }
 
-bool GestureProcessor::HitTest(
-  Stage&                     stage,
-  Vector2                    screenCoordinates,
-  HitTestAlgorithm::Results& hitTestResults)
+bool GestureProcessor::HitTest( Scene& scene, Vector2 screenCoordinates, HitTestAlgorithm::Results& hitTestResults )
 {
   GestureHitTestCheck hitCheck( mType );
-  HitTestAlgorithm::HitTest( stage, screenCoordinates, hitTestResults, hitCheck );
+  HitTestAlgorithm::HitTest( scene.GetSize(), scene.GetRenderTaskList(), scene.GetLayerList(), screenCoordinates, hitTestResults, hitCheck );
   return hitTestResults.renderTask && hitTestResults.actor;
 }
 
index 8b661b3..6e7f59e 100644 (file)
@@ -76,12 +76,12 @@ protected:
 
   /**
    * Hit test the screen coordinates, and place the results in hitTestResults.
-   * @param[in] stage Stage.
+   * @param[in] scene Scene.
    * @param[in] screenCoordinates The screen coordinates to test.
    * @param[out] hitTestResults Structure to write results into.
    * @return false if the system overlay was hit or no actor was hit.
    */
-  virtual bool HitTest(Stage& stage, Vector2 screenCoordinates, HitTestAlgorithm::Results& hitTestResults);
+  virtual bool HitTest( Scene& scene, Vector2 screenCoordinates, HitTestAlgorithm::Results& hitTestResults);
 
   /**
    * Sets the mCurrentGesturedActor and connects to the required signals.
index 59bb3d0..bb9291d 100644 (file)
@@ -27,7 +27,6 @@
 #include <dali/internal/event/actors/camera-actor-impl.h>
 #include <dali/internal/event/actors/layer-impl.h>
 #include <dali/internal/event/actors/layer-list.h>
-#include <dali/internal/event/common/stage-impl.h>
 #include <dali/internal/event/common/projection.h>
 #include <dali/internal/event/images/frame-buffer-image-impl.h>
 #include <dali/internal/event/render-tasks/render-task-impl.h>
@@ -403,7 +402,7 @@ void GetCameraClippingPlane( RenderTask& renderTask, float& nearClippingPlane, f
  * Hit test a RenderTask
  */
 bool HitTestRenderTask( const Vector< RenderTaskList::Exclusive >& exclusives,
-                        Stage& stage,
+                        const Vector2& sceneSize,
                         LayerList& layers,
                         RenderTask& renderTask,
                         Vector2 screenCoordinates,
@@ -450,7 +449,6 @@ bool HitTestRenderTask( const Vector< RenderTaskList::Exclusive >& exclusives,
         HitActor hit;
         bool overlayHit = false;
         bool layerConsumesHit = false;
-        const Vector2& stageSize = stage.GetSize();
 
         for( int32_t i = layers.GetLayerCount() - 1; i >= 0 && !( hit.actor ); --i )
         {
@@ -458,7 +456,7 @@ bool HitTestRenderTask( const Vector< RenderTaskList::Exclusive >& exclusives,
           overlayHit = false;
 
           // Ensure layer is touchable (also checks whether ancestors are also touchable)
-          if( IsActuallyHittable( *layer, screenCoordinates, stageSize, hitCheck ) )
+          if( IsActuallyHittable( *layer, screenCoordinates, sceneSize, hitCheck ) )
           {
             // Always hit-test the source actor; otherwise test whether the layer is below the source actor in the hierarchy
             if( sourceActorDepth == static_cast<uint32_t>( i ) )
@@ -525,7 +523,7 @@ bool HitTestRenderTask( const Vector< RenderTaskList::Exclusive >& exclusives,
 /**
  * Iterate through the RenderTaskList and perform hit testing.
  *
- * @param[in] stage The stage the tests will be performed in
+ * @param[in] sceneSize The scene size the tests will be performed in
  * @param[in] layers The list of layers to test
  * @param[in] taskList The list of render tasks
  * @param[out] results Ray information calculated by the camera
@@ -533,7 +531,7 @@ bool HitTestRenderTask( const Vector< RenderTaskList::Exclusive >& exclusives,
  * @param[in] onScreen True to test on-screen, false to test off-screen
  * @return True if we have a hit, false otherwise
  */
-bool HitTestRenderTaskList( Stage& stage,
+bool HitTestRenderTaskList( const Vector2& sceneSize,
                             LayerList& layers,
                             RenderTaskList& taskList,
                             const Vector2& screenCoordinates,
@@ -555,7 +553,7 @@ bool HitTestRenderTaskList( Stage& stage,
       continue;
     }
 
-    if( HitTestRenderTask( exclusives, stage, layers, renderTask, screenCoordinates, results, hitCheck ) )
+    if( HitTestRenderTask( exclusives, sceneSize, layers, renderTask, screenCoordinates, results, hitCheck ) )
     {
       // Return true when an actor is hit (or layer in our render-task consumes the hit)
       return true; // don't bother checking off screen tasks
@@ -568,7 +566,7 @@ bool HitTestRenderTaskList( Stage& stage,
 /**
  * Iterate through the RenderTaskList and perform hit testing for both on-screen and off-screen.
  *
- * @param[in] stage The stage the tests will be performed in
+ * @param[in] sceneSize The scene size the tests will be performed in
  * @param[in] layers The list of layers to test
  * @param[in] taskList The list of render tasks
  * @param[out] results Ray information calculated by the camera
@@ -576,7 +574,7 @@ bool HitTestRenderTaskList( Stage& stage,
  * @param[in] onScreen True to test on-screen, false to test off-screen
  * @return True if we have a hit, false otherwise
  */
-bool HitTestForEachRenderTask( Stage& stage,
+bool HitTestForEachRenderTask( const Vector2& sceneSize,
                                LayerList& layers,
                                RenderTaskList& taskList,
                                const Vector2& screenCoordinates,
@@ -587,8 +585,8 @@ bool HitTestForEachRenderTask( Stage& stage,
 
   // Check on-screen tasks before off-screen ones.
   // Hit test order should be reverse of draw order (see ProcessRenderTasks() where off-screen tasks are drawn first).
-  if( HitTestRenderTaskList( stage, layers, taskList, screenCoordinates, results, hitCheck, true  ) ||
-      HitTestRenderTaskList( stage, layers, taskList, screenCoordinates, results, hitCheck, false ) )
+  if( HitTestRenderTaskList( sceneSize, layers, taskList, screenCoordinates, results, hitCheck, true  ) ||
+      HitTestRenderTaskList( sceneSize, layers, taskList, screenCoordinates, results, hitCheck, false ) )
   {
     // Found hit.
     result = true;
@@ -603,16 +601,13 @@ HitTestInterface::~HitTestInterface()
 {
 }
 
-bool HitTest( Stage& stage, const Vector2& screenCoordinates, Dali::HitTestAlgorithm::Results& results, Dali::HitTestAlgorithm::HitTestFunction func )
+bool HitTest( const Vector2& sceneSize, RenderTaskList& taskList, LayerList& layerList, const Vector2& screenCoordinates, Dali::HitTestAlgorithm::Results& results, Dali::HitTestAlgorithm::HitTestFunction func )
 {
   bool wasHit( false );
-  // Hit-test the regular on-stage actors
-  RenderTaskList& taskList = stage.GetRenderTaskList();
-  LayerList& layerList = stage.GetLayerList();
-
+  // Hit-test the regular on-scene actors
   Results hitTestResults;
   HitTestFunctionWrapper hitTestFunctionWrapper( func );
-  if( HitTestForEachRenderTask( stage, layerList, taskList, screenCoordinates, hitTestResults, hitTestFunctionWrapper ) )
+  if( HitTestForEachRenderTask( sceneSize, layerList, taskList, screenCoordinates, hitTestResults, hitTestFunctionWrapper ) )
   {
     results.actor = hitTestResults.actor;
     results.actorCoordinates = hitTestResults.actorCoordinates;
@@ -621,36 +616,33 @@ bool HitTest( Stage& stage, const Vector2& screenCoordinates, Dali::HitTestAlgor
   return wasHit;
 }
 
-bool HitTest( Stage& stage, const Vector2& screenCoordinates, Results& results, HitTestInterface& hitTestInterface )
+bool HitTest( const Vector2& sceneSize, RenderTaskList& renderTaskList, LayerList& layerList, const Vector2& screenCoordinates, Results& results, HitTestInterface& hitTestInterface )
 {
   bool wasHit( false );
 
-  // Hit-test the regular on-stage actors
+  // Hit-test the regular on-scene actors
   if( !wasHit )
   {
-    RenderTaskList& taskList = stage.GetRenderTaskList();
-    LayerList& layerList = stage.GetLayerList();
-
-    wasHit = HitTestForEachRenderTask( stage, layerList, taskList, screenCoordinates, results, hitTestInterface );
+    wasHit = HitTestForEachRenderTask( sceneSize, layerList, renderTaskList, screenCoordinates, results, hitTestInterface );
   }
   return wasHit;
 }
 
-bool HitTest( Stage& stage, const Vector2& screenCoordinates, Results& results )
+bool HitTest( const Vector2& sceneSize, RenderTaskList& renderTaskList, LayerList& layerList, const Vector2& screenCoordinates, Results& results )
 {
   ActorTouchableCheck actorTouchableCheck;
-  return HitTest( stage, screenCoordinates, results, actorTouchableCheck );
+  return HitTest( sceneSize, renderTaskList, layerList, screenCoordinates, results, actorTouchableCheck );
 }
 
-bool HitTest( Stage& stage, RenderTask& renderTask, const Vector2& screenCoordinates,
+bool HitTest( const Vector2& sceneSize, RenderTaskList& renderTaskList, LayerList& layerList, RenderTask& renderTask, const Vector2& screenCoordinates,
               Dali::HitTestAlgorithm::Results& results, Dali::HitTestAlgorithm::HitTestFunction func )
 {
   bool wasHit( false );
   Results hitTestResults;
 
-  const Vector< RenderTaskList::Exclusive >& exclusives = stage.GetRenderTaskList().GetExclusivesList();
+  const Vector< RenderTaskList::Exclusive >& exclusives = renderTaskList.GetExclusivesList();
   HitTestFunctionWrapper hitTestFunctionWrapper( func );
-  if( HitTestRenderTask( exclusives, stage, stage.GetLayerList(), renderTask, screenCoordinates, hitTestResults, hitTestFunctionWrapper ) )
+  if( HitTestRenderTask( exclusives, sceneSize, layerList, renderTask, screenCoordinates, hitTestResults, hitTestFunctionWrapper ) )
   {
     results.actor = hitTestResults.actor;
     results.actorCoordinates = hitTestResults.actorCoordinates;
index a160bc9..bf16b93 100644 (file)
@@ -30,6 +30,7 @@ namespace Internal
 {
 
 class Layer;
+class LayerList;
 
 /**
  * This namespace is provided for application developers to do hit test for the actors.
@@ -93,13 +94,26 @@ protected:
 };
 
 /**
- * @copydoc Dali::HitTestAlgorithm::HitTest(Stage stage, const Vector2& screenCoordinates, Results& results, HitTestFunction func )
+ * Hit test specific to a given scene.
+ *
+ * @param[in] sceneSize The size of the scene.
+ * @param[in] renderTaskList The render task list of the scene.
+ * @param[in] layerList The layer list of the scene.
+ * @param[in] screenCoordinates The screen coordinates.
+ * @param[out] results The results of the hit-test.
+ * @param[in] func The function to use in the hit-test algorithm.
+ * @return true if something was hit
+ *
+ * @see HitTest(Stage&, const Vector2&, Results&, HitTestInterface&)
  */
-bool HitTest( Stage& stage, const Vector2& screenCoordinates, Dali::HitTestAlgorithm::Results& results, Dali::HitTestAlgorithm::HitTestFunction func );
+bool HitTest( const Vector2& sceneSize, RenderTaskList& renderTaskList, LayerList& layerList, const Vector2& screenCoordinates,
+              Dali::HitTestAlgorithm::Results& results, Dali::HitTestAlgorithm::HitTestFunction func );
 
 /**
  * Given screen coordinates, this method returns the hit actor & the local coordinates relative to the actor etc.
- * @param[in] stage The stage.
+ * @param[in] sceneSize The size of the scene.
+ * @param[in] renderTaskList The render task list of the scene.
+ * @param[in] layerList The layer list of the scene.
  * @param[in] screenCoordinates The screen coordinates.
  * @param[out] results The results of the hit-test.
  * @param[in] hitTestInterface Used to determine whether the actor is hit or whether we walk down its hierarchy
@@ -107,8 +121,7 @@ bool HitTest( Stage& stage, const Vector2& screenCoordinates, Dali::HitTestAlgor
  *
  * <h3>Hit Test Algorithm:</h3>
  *
- * - The system overlay RenderTaskList is hit-tested first.
- * - If no hit then the regular RenderTaskList is used to hit test the on stage actors.
+ * - The regular RenderTaskList is used to hit test the on scene actors.
  * - The bulk of the hit test algorithm is described in Dali::Actor.
  * - In each RenderTask's its viewing parameters (the view and projection matrices, and the viewport)
  *   are used to build a picking ray into the scene which is used for our ray tests when hit testing
@@ -120,31 +133,36 @@ bool HitTest( Stage& stage, const Vector2& screenCoordinates, Dali::HitTestAlgor
  * @note Currently, we prefer a child hit over a parent (regardless of the distance from the
  *       camera) unless the parent is a RenderableActor but this is subject to change.
  */
-bool HitTest( Stage& stage, const Vector2& screenCoordinates, Results& results, HitTestInterface& hitTestInterface );
+bool HitTest( const Vector2& sceneSize, RenderTaskList& renderTaskList, LayerList& layerList, const Vector2& screenCoordinates,
+              Results& results, HitTestInterface& hitTestInterface );
 
 /**
  * Default HitTest where we check if a touch is required.
  *
- * @param[in] stage The stage.
+ * @param[in] sceneSize The size of the scene.
+ * @param[in] renderTaskList The render task list of the scene.
+ * @param[in] layerList The layer list of the scene.
  * @param[in] screenCoordinates The screen coordinates.
  * @param[out] results The results of the hit-test.
  * @return true if something was hit
  *
  * @see HitTest(Stage&, const Vector2&, Results&, HitTestInterface&)
  */
-bool HitTest( Stage& stage, const Vector2& screenCoordinates, Results& results );
+bool HitTest( const Vector2& sceneSize, RenderTaskList& renderTaskList, LayerList& layerList, const Vector2& screenCoordinates, Results& results );
 
 /**
  * Hit test specific to a given RenderTask
  *
- * @param[in] stage The stage.
+ * @param[in] sceneSize The size of the scene.
+ * @param[in] renderTaskList The render task list of the scene.
+ * @param[in] layerList The layer list of the scene.
  * @param[in] renderTask The render task for hit test
  * @param[in] screenCoordinates The screen coordinates.
  * @param[out] results The results of the hit-test.
  * @param[in] func The function to use in the hit-test algorithm.
  * @return true if something was hit
  */
-bool HitTest( Stage& stage, RenderTask& renderTask, const Vector2& screenCoordinates,
+bool HitTest( const Vector2& sceneSize, RenderTaskList& renderTaskList, LayerList& layerList, RenderTask& renderTask, const Vector2& screenCoordinates,
               Dali::HitTestAlgorithm::Results& results, Dali::HitTestAlgorithm::HitTestFunction func );
 
 
index 2ddd84a..8fbacbc 100644 (file)
@@ -28,7 +28,7 @@
 #include <dali/integration-api/events/hover-event-integ.h>
 #include <dali/internal/event/actors/actor-impl.h>
 #include <dali/internal/event/actors/layer-impl.h>
-#include <dali/internal/event/common/stage-impl.h>
+#include <dali/internal/event/common/scene-impl.h>
 #include <dali/internal/event/events/hit-test-algorithm-impl.h>
 #include <dali/internal/event/events/multi-point-event-util.h>
 #include <dali/internal/event/render-tasks/render-task-impl.h>
@@ -146,12 +146,8 @@ struct ActorHoverableCheck : public HitTestAlgorithm::HitTestInterface
 
 } // unnamed namespace
 
-HoverEventProcessor::HoverEventProcessor( Stage& stage )
-: mStage( stage ),
-  mLastPrimaryHitActor(),
-  mLastConsumedActor(),
-  mHoverStartConsumedActor(),
-  mLastRenderTask()
+HoverEventProcessor::HoverEventProcessor( Scene& scene )
+: mScene( scene )
 {
   DALI_LOG_TRACE_METHOD( gLogFilter );
 }
@@ -164,10 +160,8 @@ HoverEventProcessor::~HoverEventProcessor()
 void HoverEventProcessor::ProcessHoverEvent( const Integration::HoverEvent& event )
 {
   DALI_LOG_TRACE_METHOD( gLogFilter );
-
   DALI_ASSERT_ALWAYS( !event.points.empty() && "Empty HoverEvent sent from Integration\n" );
 
-  Stage& stage = mStage;
   TouchPoint::State state = static_cast< TouchPoint::State >( event.points[0].GetState() );
 
   PRINT_HIERARCHY(gLogFilter);
@@ -235,7 +229,7 @@ void HoverEventProcessor::ProcessHoverEvent( const Integration::HoverEvent& even
   {
     HitTestAlgorithm::Results hitTestResults;
     ActorHoverableCheck actorHoverableCheck;
-    HitTestAlgorithm::HitTest( stage, iter->GetScreenPosition(), hitTestResults, actorHoverableCheck );
+    HitTestAlgorithm::HitTest( mScene.GetSize(), mScene.GetRenderTaskList(), mScene.GetLayerList(), iter->GetScreenPosition(), hitTestResults, actorHoverableCheck );
 
     TouchPoint newPoint( iter->GetTouchPoint() );
     newPoint.hitActor = hitTestResults.actor;
index 5cd0308..d5d6cc1 100644 (file)
@@ -38,7 +38,7 @@ namespace Internal
 {
 
 struct ActorObserver;
-class Stage;
+class Scene;
 
 /**
  * <h3>Multi-Hover Event Processing:</h3>
@@ -54,9 +54,9 @@ public:
 
   /**
    * Create an event processor.
-   * @param[in] stage The stage.
+   * @param[in] scene The scene the event processor belongs to.
    */
-  HoverEventProcessor( Stage& stage );
+  HoverEventProcessor( Scene& scene );
 
   /**
    * Non-virtual destructor; HoverEventProcessor is not a base class
@@ -77,7 +77,7 @@ private:
   // Undefined
   HoverEventProcessor& operator=(const HoverEventProcessor& rhs);
 
-  Stage& mStage; ///< Used to deliver touch events
+  Scene& mScene; ///< Reference to the scene
   ActorObserver mLastPrimaryHitActor; ///< Stores the last primary point hit actor
   ActorObserver mLastConsumedActor; ///< Stores the last consumed actor
   ActorObserver mHoverStartConsumedActor; ///< Stores the hover-start consumed actor
index 750654b..399c209 100755 (executable)
@@ -22,7 +22,7 @@
 #include <dali/public-api/events/key-event.h>
 #include <dali/internal/event/events/key-event-impl.h>
 #include <dali/internal/event/actors/actor-impl.h>
-#include <dali/internal/event/common/stage-impl.h>
+#include <dali/internal/event/common/scene-impl.h>
 #include <dali/integration-api/events/key-event-integ.h>
 
 namespace Dali
@@ -31,8 +31,8 @@ namespace Dali
 namespace Internal
 {
 
-KeyEventProcessor::KeyEventProcessor(Stage& stage)
-: mStage(stage)
+KeyEventProcessor::KeyEventProcessor( Scene& scene )
+: mScene( scene )
 {
 }
 
@@ -40,23 +40,17 @@ KeyEventProcessor::~KeyEventProcessor()
 {
 }
 
-void KeyEventProcessor::ProcessKeyEvent(const Integration::KeyEvent& event)
+void KeyEventProcessor::ProcessKeyEvent( const Integration::KeyEvent& event )
 {
   KeyEvent keyEvent(event.keyName, event.keyString, event.keyCode, event.keyModifier, event.time, static_cast<Dali::KeyEvent::State>(event.state));
-
   GetImplementation( &keyEvent )->SetLogicalKey( event.logicalKey );
   GetImplementation( &keyEvent )->SetCompose( event.compose );
   GetImplementation( &keyEvent )->SetDeviceName( event.deviceName );
   GetImplementation( &keyEvent )->SetDeviceClass( event.deviceClass );
   GetImplementation( &keyEvent )->SetDeviceSubclass( event.deviceSubclass );
 
-  // Emit the key event signal from stage.
-  bool consumed = mStage.EmitKeyEventGeneratedSignal( keyEvent );
-
-  if( !consumed )
-  {
-    mStage.EmitKeyEventSignal(keyEvent);
-  }
+  // Emit the key event signal from the scene.
+  mScene.EmitKeyEventSignal( keyEvent );
 }
 
 } // namespace Internal
index 9f8fc23..c6b732b 100644 (file)
@@ -18,6 +18,8 @@
  *
  */
 
+#include <vector>
+
 namespace Dali
 {
 
@@ -29,12 +31,13 @@ struct KeyEvent;
 namespace Internal
 {
 
+class Scene;
 class Stage;
 
 /**
  *  KeyEventProcessor receives the filtered key events from the Dali Event processor.
  *
- *  When a key event is received the KeyEvent Processor queries the Stage to get the actor in focus.
+ *  When a key event is received the KeyEventProcessor queues the event in the scene events queue.
  *  Any actor can be set by the actor api to be the focus of key events.  The actor is then sent the key event.
  *  If no actor is set for focus then the key event is discarded.
  */
@@ -44,8 +47,9 @@ public:
 
   /**
    * Create a Key event processor.
+   * @param[in] scene The scene the event processor belongs to.
    */
-  KeyEventProcessor(Stage& stage);
+  KeyEventProcessor( Scene& scene );
 
   /**
    * Non-virtual destructor; KeyEventProcessor is not a base class
@@ -68,8 +72,7 @@ private:
 
 private:
 
-  Stage& mStage; ///< Used to deliver touch events
-
+  Scene& mScene; ///< Used to deliver key events
 };
 
 } // namespace Internal
index 37be013..e8e613b 100644 (file)
@@ -29,7 +29,7 @@
 #include <dali/integration-api/gesture-manager.h>
 #include <dali/integration-api/debug.h>
 #include <dali/internal/event/actors/actor-impl.h>
-#include <dali/internal/event/common/stage-impl.h>
+#include <dali/internal/event/common/scene-impl.h>
 #include <dali/internal/event/render-tasks/render-task-impl.h>
 
 namespace Dali
@@ -98,9 +98,8 @@ struct IsNotAttachedFunctor
 
 } // unnamed namespace
 
-LongPressGestureProcessor::LongPressGestureProcessor( Stage& stage, Integration::GestureManager& gestureManager)
+LongPressGestureProcessor::LongPressGestureProcessor( Integration::GestureManager& gestureManager)
 : GestureProcessor( Gesture::LongPress ),
-  mStage( stage ),
   mGestureManager( gestureManager ),
   mGestureDetectors(),
   mCurrentEmitters(),
@@ -115,7 +114,7 @@ LongPressGestureProcessor::~LongPressGestureProcessor()
 {
 }
 
-void LongPressGestureProcessor::Process( const Integration::LongPressGestureEvent& longPressEvent )
+void LongPressGestureProcessor::Process( Scene& scene, const Integration::LongPressGestureEvent& longPressEvent )
 {
   switch ( longPressEvent.state )
   {
@@ -125,7 +124,7 @@ void LongPressGestureProcessor::Process( const Integration::LongPressGestureEven
       ResetActor();
 
       HitTestAlgorithm::Results hitTestResults;
-      if( HitTest( mStage, longPressEvent.point, hitTestResults ) )
+      if( HitTest( scene, longPressEvent.point, hitTestResults ) )
       {
         SetActor( &GetImplementation( hitTestResults.actor ) );
       }
@@ -138,7 +137,7 @@ void LongPressGestureProcessor::Process( const Integration::LongPressGestureEven
       if ( currentGesturedActor )
       {
         HitTestAlgorithm::Results hitTestResults;
-        HitTest( mStage, longPressEvent.point, hitTestResults );
+        HitTest( scene, longPressEvent.point, hitTestResults );
 
         if ( hitTestResults.actor && ( currentGesturedActor == &GetImplementation( hitTestResults.actor ) ) )
         {
index e71e4e5..d35c0a7 100644 (file)
@@ -37,6 +37,7 @@ namespace Internal
 {
 
 class Stage;
+class Scene;
 
 /**
  * Long Press Gesture Event Processing:
@@ -51,10 +52,9 @@ public:
 
   /**
    * Create a long press gesture processor.
-   * @param[in] stage The stage.
    * @param[in] gestureManager The gesture manager.
    */
-  LongPressGestureProcessor( Stage& stage, Integration::GestureManager& gestureManager );
+  LongPressGestureProcessor( Integration::GestureManager& gestureManager );
 
   /**
    * Non-virtual destructor; LongPressGestureProcessor is not a base class
@@ -65,9 +65,10 @@ public: // To be called by GestureEventProcessor
 
   /**
    * This method is called whenever a long press gesture event occurs.
+   * @param[in] scene The scene the long press gesture event occurs in.
    * @param[in] longPressEvent The event that has occurred.
    */
-  void Process( const Integration::LongPressGestureEvent& longPressEvent );
+  void Process( Scene& scene, const Integration::LongPressGestureEvent& longPressEvent );
 
   /**
    * Adds a gesture detector to this gesture processor.
@@ -124,7 +125,6 @@ private:
 
 private:
 
-  Stage& mStage;
   Integration::GestureManager& mGestureManager;
   LongPressGestureDetectorContainer mGestureDetectors;
 
index d95fe0f..d413f03 100644 (file)
@@ -29,7 +29,7 @@
 #include <dali/integration-api/events/pan-gesture-event.h>
 #include <dali/integration-api/gesture-manager.h>
 #include <dali/integration-api/debug.h>
-#include <dali/internal/event/common/stage-impl.h>
+#include <dali/internal/event/common/scene-impl.h>
 #include <dali/internal/event/render-tasks/render-task-impl.h>
 #include <dali/internal/update/gestures/scene-graph-pan-gesture.h>
 
@@ -101,9 +101,8 @@ struct IsNotAttachedAndOutsideTouchesRangeFunctor
 
 } // unnamed namespace
 
-PanGestureProcessor::PanGestureProcessor( Stage& stage, Integration::GestureManager& gestureManager, SceneGraph::UpdateManager& updateManager )
+PanGestureProcessor::PanGestureProcessor( Integration::GestureManager& gestureManager, SceneGraph::UpdateManager& updateManager )
 : GestureProcessor( Gesture::Pan ),
-  mStage( stage ),
   mGestureManager( gestureManager ),
   mGestureDetectors(),
   mCurrentPanEmitters(),
@@ -123,7 +122,7 @@ PanGestureProcessor::~PanGestureProcessor()
   mSceneObject = NULL; // mSceneObject is owned and destroyed by update manager (there is only one of these for now)
 }
 
-void PanGestureProcessor::Process( const Integration::PanGestureEvent& panEvent )
+void PanGestureProcessor::Process( Scene& scene, const Integration::PanGestureEvent& panEvent )
 {
   switch( panEvent.state )
   {
@@ -133,7 +132,7 @@ void PanGestureProcessor::Process( const Integration::PanGestureEvent& panEvent
       ResetActor();
 
       HitTestAlgorithm::Results hitTestResults;
-      if( HitTest( mStage, panEvent.currentPosition, hitTestResults ) )
+      if( HitTest( scene, panEvent.currentPosition, hitTestResults ) )
       {
         SetActor( &GetImplementation( hitTestResults.actor ) );
         mPossiblePanPosition = panEvent.currentPosition;
@@ -150,7 +149,7 @@ void PanGestureProcessor::Process( const Integration::PanGestureEvent& panEvent
         // it can be told when the gesture ends as well.
 
         HitTestAlgorithm::Results hitTestResults;
-        HitTest( mStage, mPossiblePanPosition, hitTestResults ); // Hit test original possible position...
+        HitTest( scene, mPossiblePanPosition, hitTestResults ); // Hit test original possible position...
 
         if ( hitTestResults.actor && ( GetCurrentGesturedActor() == &GetImplementation( hitTestResults.actor ) ) )
         {
index 7940951..bc0bdb3 100644 (file)
@@ -37,6 +37,7 @@ namespace Internal
 {
 
 class Stage;
+class Scene;
 
 namespace SceneGraph
 {
@@ -60,11 +61,10 @@ public:
 
   /**
    * Create a pan gesture processor.
-   * @param[in] stage The stage.
    * @param[in] gestureManager The gesture manager
    * @param[in] updateManager The Update Manager
    */
-  PanGestureProcessor( Stage& stage, Integration::GestureManager& gestureManager, SceneGraph::UpdateManager& updateManager );
+  PanGestureProcessor( Integration::GestureManager& gestureManager, SceneGraph::UpdateManager& updateManager );
 
   /**
    * Destructor
@@ -75,9 +75,10 @@ public: // To be called by GestureEventProcessor
 
   /**
    * This method is called whenever a pan gesture event occurs.
+   * @param[in] scene The scene the pan gesture event occurs in.
    * @param[in] panEvent The event that has occurred.
    */
-  void Process( const Integration::PanGestureEvent& panEvent );
+  void Process( Scene& scene, const Integration::PanGestureEvent& panEvent );
 
   /**
    * Adds a gesture detector to this gesture processor.
@@ -280,7 +281,6 @@ private:
 
 private:
 
-  Stage& mStage;
   Integration::GestureManager& mGestureManager;
   PanGestureDetectorContainer mGestureDetectors;
   GestureDetectorContainer mCurrentPanEmitters;
index d893726..21c362c 100644 (file)
@@ -28,7 +28,7 @@
 #include <dali/integration-api/events/pinch-gesture-event.h>
 #include <dali/integration-api/gesture-manager.h>
 #include <dali/integration-api/debug.h>
-#include <dali/internal/event/common/stage-impl.h>
+#include <dali/internal/event/common/scene-impl.h>
 #include <dali/internal/event/render-tasks/render-task-impl.h>
 
 namespace Dali
@@ -100,9 +100,8 @@ struct IsNotAttachedFunctor
 
 } // unnamed namespace
 
-PinchGestureProcessor::PinchGestureProcessor( Stage& stage, Integration::GestureManager& gestureManager )
+PinchGestureProcessor::PinchGestureProcessor( Integration::GestureManager& gestureManager )
 : GestureProcessor( Gesture::Pinch ),
-  mStage(stage),
   mGestureManager(gestureManager),
   mGestureDetectors(),
   mCurrentPinchEmitters(),
@@ -114,7 +113,7 @@ PinchGestureProcessor::~PinchGestureProcessor()
 {
 }
 
-void PinchGestureProcessor::Process( const Integration::PinchGestureEvent& pinchEvent )
+void PinchGestureProcessor::Process( Scene& scene, const Integration::PinchGestureEvent& pinchEvent )
 {
   switch ( pinchEvent.state )
   {
@@ -127,7 +126,7 @@ void PinchGestureProcessor::Process( const Integration::PinchGestureEvent& pinch
       ResetActor();
 
       HitTestAlgorithm::Results hitTestResults;
-      if( HitTest( mStage, pinchEvent.centerPoint, hitTestResults ) )
+      if( HitTest( scene, pinchEvent.centerPoint, hitTestResults ) )
       {
         // Record the current render-task for Screen->Actor coordinate conversions
         mCurrentRenderTask = hitTestResults.renderTask;
index 9c1928c..f9d147b 100644 (file)
@@ -36,6 +36,7 @@ struct PinchGestureEvent;
 namespace Internal
 {
 
+class Scene;
 class Stage;
 
 /**
@@ -54,10 +55,9 @@ public:
 
   /**
    * Create a pinch gesture processor.
-   * @param[in] stage The stage.
    * @param[in] gestureManager The gesture manager
    */
-  PinchGestureProcessor(Stage& stage, Integration::GestureManager& gestureManager);
+  PinchGestureProcessor( Integration::GestureManager& gestureManager );
 
   /**
    * Non-virtual destructor; PinchGestureProcessor is not a base class
@@ -68,9 +68,10 @@ public: // To be called by GestureEventProcessor
 
   /**
    * This method is called whenever a pinch gesture event occurs.
+   * @param[in] scene The scene the pinch gesture event occurs in.
    * @param[in] pinchEvent The event that has occurred.
    */
-  void Process(const Integration::PinchGestureEvent& pinchEvent);
+  void Process( Scene& scene, const Integration::PinchGestureEvent& pinchEvent );
 
   /**
    * Adds a gesture detector to this gesture processor.
@@ -121,7 +122,6 @@ private:
 
 private:
 
-  Stage& mStage;
   Integration::GestureManager& mGestureManager;
   PinchGestureDetectorContainer mGestureDetectors;
   GestureDetectorContainer mCurrentPinchEmitters;
index 20a5f19..9d3cbd8 100644 (file)
@@ -31,7 +31,7 @@
 #include <dali/integration-api/debug.h>
 #include <dali/internal/event/actors/actor-impl.h>
 #include <dali/internal/event/render-tasks/render-task-impl.h>
-#include <dali/internal/event/common/stage-impl.h>
+#include <dali/internal/event/common/scene-impl.h>
 
 namespace Dali
 {
@@ -72,9 +72,8 @@ void EmitTapSignal(
 
 } // unnamed namespace
 
-TapGestureProcessor::TapGestureProcessor( Stage& stage, Integration::GestureManager& gestureManager)
+TapGestureProcessor::TapGestureProcessor( Integration::GestureManager& gestureManager)
 : GestureProcessor( Gesture::Tap ),
-  mStage( stage ),
   mGestureManager( gestureManager ),
   mGestureDetectors(),
   mMinTapsRequired( 1 ),
@@ -90,7 +89,7 @@ TapGestureProcessor::~TapGestureProcessor()
 {
 }
 
-void TapGestureProcessor::Process( const Integration::TapGestureEvent& tapEvent )
+void TapGestureProcessor::Process( Scene& scene, const Integration::TapGestureEvent& tapEvent )
 {
   switch ( tapEvent.state )
   {
@@ -98,7 +97,7 @@ void TapGestureProcessor::Process( const Integration::TapGestureEvent& tapEvent
     {
       // Do a hit test and if an actor has been hit then save to see if tap event is still valid on a tap( same actor being hit )
       HitTestAlgorithm::Results hitTestResults;
-      if ( HitTest( mStage, tapEvent.point, hitTestResults ) )
+      if ( HitTest( scene, tapEvent.point, hitTestResults ) )
       {
         SetActor( &GetImplementation( hitTestResults.actor ) );
         mCurrentTapActor.SetActor( GetCurrentGesturedActor() );
@@ -117,7 +116,7 @@ void TapGestureProcessor::Process( const Integration::TapGestureEvent& tapEvent
     {
       // Ensure that we're processing a hit on the current actor and that we've already processed a touch down
       HitTestAlgorithm::Results hitTestResults;
-      if ( GetCurrentGesturedActor() && HitTest( mStage, tapEvent.point, hitTestResults ) && mPossibleProcessed )
+      if ( GetCurrentGesturedActor() && HitTest( scene, tapEvent.point, hitTestResults ) && mPossibleProcessed )
       {
         // Check that this actor is still the one that was used for the last touch down ?
         if ( mCurrentTapActor.GetActor() == &GetImplementation( hitTestResults.actor ) )
index 0f7c6ca..f391987 100644 (file)
@@ -36,6 +36,7 @@ struct TapGestureEvent;
 namespace Internal
 {
 
+class Scene;
 class Stage;
 class Actor;
 
@@ -52,10 +53,9 @@ public:
 
   /**
    * Create a tap gesture processor.
-   * @param[in] stage The stage.
    * @param[in] gestureManager The gesture manager.
    */
-  TapGestureProcessor(Stage& stage, Integration::GestureManager& gestureManager);
+  TapGestureProcessor( Integration::GestureManager& gestureManager );
 
   /**
    * Non-virtual destructor; TapGestureProcessor is not a base class
@@ -66,9 +66,10 @@ public: // To be called by GestureEventProcessor
 
   /**
    * This method is called whenever a tap gesture event occurs.
+   * @param[in] scene The scene the tap gesture event occurs in.
    * @param[in] tapEvent The event that has occurred.
    */
-  void Process(const Integration::TapGestureEvent& tapEvent);
+  void Process( Scene& scene, const Integration::TapGestureEvent& tapEvent);
 
   /**
    * Adds a gesture detector to this gesture processor.
@@ -125,7 +126,6 @@ private:
 
 private:
 
-  Stage& mStage;
   Integration::GestureManager& mGestureManager;
   TapGestureDetectorContainer mGestureDetectors;
 
index 90f75ca..b9047bd 100644 (file)
@@ -30,7 +30,7 @@
 #include <dali/integration-api/events/touch-event-integ.h>
 #include <dali/internal/event/actors/actor-impl.h>
 #include <dali/internal/event/actors/layer-impl.h>
-#include <dali/internal/event/common/stage-impl.h>
+#include <dali/internal/event/common/scene-impl.h>
 #include <dali/internal/event/events/hit-test-algorithm-impl.h>
 #include <dali/internal/event/events/multi-point-event-util.h>
 #include <dali/internal/event/events/touch-data-impl.h>
@@ -149,8 +149,8 @@ Dali::Actor EmitTouchSignals( Actor* actor, RenderTask& renderTask, const TouchE
 
 } // unnamed namespace
 
-TouchEventProcessor::TouchEventProcessor( Stage& stage )
-: mStage( stage ),
+TouchEventProcessor::TouchEventProcessor( Scene& scene )
+: mScene( scene ),
   mLastPrimaryHitActor( MakeCallback( this, &TouchEventProcessor::OnObservedActorDisconnected ) ),
   mLastConsumedActor(),
   mTouchDownConsumedActor(),
@@ -167,11 +167,8 @@ TouchEventProcessor::~TouchEventProcessor()
 void TouchEventProcessor::ProcessTouchEvent( const Integration::TouchEvent& event )
 {
   DALI_LOG_TRACE_METHOD( gLogFilter );
-
   DALI_ASSERT_ALWAYS( !event.points.empty() && "Empty TouchEvent sent from Integration\n" );
 
-  Stage& stage = mStage;
-
   PRINT_HIERARCHY(gLogFilter);
 
   // 1) Check if it is an interrupted event - we should inform our last primary hit actor about this
@@ -229,8 +226,7 @@ void TouchEventProcessor::ProcessTouchEvent( const Integration::TouchEvent& even
     touchEvent.points.push_back( currentPoint.GetTouchPoint() );
     touchData->AddPoint( currentPoint );
 
-    mStage.EmitTouchedSignal( touchEvent, touchDataHandle );
-
+    mScene.EmitTouchedSignal( touchEvent, touchDataHandle );
     return; // No need for hit testing
   }
 
@@ -247,7 +243,7 @@ void TouchEventProcessor::ProcessTouchEvent( const Integration::TouchEvent& even
   for ( Integration::PointContainerConstIterator iter = event.points.begin(), beginIter = event.points.begin(), endIter = event.points.end(); iter != endIter; ++iter )
   {
     HitTestAlgorithm::Results hitTestResults;
-    HitTestAlgorithm::HitTest( stage, iter->GetScreenPosition(), hitTestResults );
+    HitTestAlgorithm::HitTest( mScene.GetSize(), mScene.GetRenderTaskList(), mScene.GetLayerList(), iter->GetScreenPosition(), hitTestResults );
 
     Integration::Point newPoint( *iter );
     newPoint.SetHitActor( hitTestResults.actor );
@@ -299,7 +295,7 @@ void TouchEventProcessor::ProcessTouchEvent( const Integration::TouchEvent& even
   Actor* lastConsumedActor( mLastConsumedActor.GetActor() );
   if( ( primaryPointState == PointState::MOTION ) || ( primaryPointState == PointState::UP ) || ( primaryPointState == PointState::STATIONARY ) )
   {
-    if ( mLastRenderTask )
+    if( mLastRenderTask )
     {
       Dali::Actor leaveEventConsumer;
       RenderTask& lastRenderTaskImpl = *mLastRenderTask.Get();
@@ -419,7 +415,7 @@ void TouchEventProcessor::ProcessTouchEvent( const Integration::TouchEvent& even
 
       case PointState::DOWN:
       {
-        mStage.EmitTouchedSignal( touchEvent, touchDataHandle );
+        mScene.EmitTouchedSignal( touchEvent, touchDataHandle );
         break;
       }
 
index 9ffa7f2..245961a 100644 (file)
@@ -38,7 +38,7 @@ namespace Internal
 {
 
 class Actor;
-class Stage;
+class Scene;
 struct ActorObserver;
 
 /**
@@ -55,9 +55,9 @@ public:
 
   /**
    * Create an event processor.
-   * @param[in] stage The stage.
+   * @param[in] scene The scene the event processor belongs to.
    */
-  TouchEventProcessor( Stage& stage );
+  TouchEventProcessor( Scene& scene );
 
   /**
    * Non-virtual destructor; TouchEventProcessor is not a base class
@@ -78,6 +78,10 @@ private:
   // Undefined
   TouchEventProcessor& operator=(const TouchEventProcessor& rhs);
 
+private:
+
+  Scene& mScene; ///< Used to deliver touch events
+
   /**
    * Called by some actor-observers when the observed actor is disconnected.
    *
@@ -85,9 +89,6 @@ private:
    */
   void OnObservedActorDisconnected( Actor* actor );
 
-private:
-
-  Stage& mStage; ///< Used to deliver touch events
   ActorObserver mLastPrimaryHitActor; ///< Stores the last primary point hit actor
   ActorObserver mLastConsumedActor; ///< Stores the last consumed actor
   ActorObserver mTouchDownConsumedActor; ///< Stores the touch-down consumed actor
index 0dcdb2f..107bd27 100644 (file)
 
 // INTERNAL INCLUDES
 #include <dali/public-api/events/wheel-event.h>
-#include <dali/devel-api/events/hit-test-algorithm.h>
+
 #include <dali/public-api/math/vector2.h>
 #include <dali/integration-api/events/wheel-event-integ.h>
-#include <dali/internal/event/common/stage-impl.h>
 #include <dali/internal/event/actors/actor-impl.h>
+#include <dali/internal/event/common/scene-impl.h>
+#include <dali/internal/event/events/hit-test-algorithm-impl.h>
 
 namespace Dali
 {
@@ -121,8 +122,8 @@ bool IsActorWheelableFunction(Dali::Actor actor, Dali::HitTestAlgorithm::Travers
 } // unnamed namespace
 
 
-WheelEventProcessor::WheelEventProcessor(Stage& stage)
-: mStage(stage)
+WheelEventProcessor::WheelEventProcessor( Scene& scene )
+: mScene( scene )
 {
 }
 
@@ -130,15 +131,14 @@ WheelEventProcessor::~WheelEventProcessor()
 {
 }
 
-void WheelEventProcessor::ProcessWheelEvent(const Integration::WheelEvent& event)
+void WheelEventProcessor::ProcessWheelEvent( const Integration::WheelEvent& event )
 {
-  Stage& stage = mStage;
-  WheelEvent wheelEvent( static_cast< WheelEvent::Type >(event.type), event.direction, event.modifiers, event.point, event.z, event.timeStamp );
+  WheelEvent wheelEvent( static_cast< WheelEvent::Type >( event.type ), event.direction, event.modifiers, event.point, event.z, event.timeStamp );
 
   if( wheelEvent.type == WheelEvent::MOUSE_WHEEL )
   {
-    HitTestAlgorithm::Results hitTestResults;
-    HitTestAlgorithm::HitTest( Dali::Stage(&stage), event.point, hitTestResults, IsActorWheelableFunction );
+    Dali::HitTestAlgorithm::Results hitTestResults;
+    HitTestAlgorithm::HitTest( mScene.GetSize(), mScene.GetRenderTaskList(), mScene.GetLayerList(), event.point, hitTestResults, IsActorWheelableFunction );
 
     DALI_LOG_INFO( gLogFilter, Debug::General, "  Screen(%.0f, %.0f), HitActor(%p, %s), Local(%.2f, %.2f)\n",
                    event.point.x, event.point.y,
@@ -154,8 +154,8 @@ void WheelEventProcessor::ProcessWheelEvent(const Integration::WheelEvent& event
   }
   else
   {
-    // if CUSTOM_WHEEL, emit the key event signal from stage.
-    mStage.EmitWheelEventSignal( wheelEvent );
+    // if CUSTOM_WHEEL, emit the wheel event signal from the scene.
+    mScene.EmitWheelEventSignal( wheelEvent );
   }
 }
 
index bc26322..3e1bdc1 100644 (file)
@@ -18,6 +18,8 @@
  *
  */
 
+#include <vector>
+
 namespace Dali
 {
 
@@ -29,7 +31,7 @@ struct WheelEvent;
 namespace Internal
 {
 
-class Stage;
+class Scene;
 
 /**
  *  WheelEventProcessor receives the wheel events from the Dali Event processor.
@@ -46,7 +48,7 @@ public:
   /**
    * Create a wheel event processor.
    */
-  WheelEventProcessor(Stage& stage);
+  WheelEventProcessor( Scene& scenes );
 
   /**
    * Non-virtual destructor; WheelEventProcessor is not a base class
@@ -69,7 +71,7 @@ private:
 
 private:
 
-  Stage& mStage;               ///< Used to deliver the wheel events
+  Scene& mScene;               ///< Used to deliver the wheel events
 };
 
 } // namespace Internal
index aeec93f..0bc361f 100644 (file)
@@ -477,6 +477,11 @@ const SceneGraph::RenderTask& RenderTask::GetRenderTaskSceneObject() const
   return *static_cast<const SceneGraph::RenderTask*>( mUpdateObject );
 }
 
+RenderTaskList& RenderTask::GetRenderTaskList() const
+{
+  return mRenderTaskList;
+}
+
 /********************************************************************************
  ********************************   PROPERTY METHODS   **************************
  ********************************************************************************/
index 45e59ea..b32c451 100644 (file)
@@ -257,6 +257,12 @@ public: // Used by RenderTaskList, which owns the SceneGraph::RenderTasks
    */
   const SceneGraph::RenderTask& GetRenderTaskSceneObject() const;
 
+  /**
+   * Retrieve the render task list RenderTask object belongs to.
+   * @return The render task list
+   */
+  RenderTaskList& GetRenderTaskList() const;
+
 public: // Implementation of Object
 
   /**