Remove unused parameters
[platform/core/uifw/dali-adaptor.git] / dali / internal / adaptor / common / adaptor-impl.cpp
index e73d5a2..c496606 100644 (file)
@@ -27,6 +27,7 @@
 #include <dali/public-api/actors/layer.h>
 #include <dali/public-api/object/any.h>
 #include <dali/public-api/object/object-registry.h>
+#include <dali/public-api/events/wheel-event.h>
 #include <dali/devel-api/actors/actor-devel.h>
 #include <dali/integration-api/debug.h>
 #include <dali/integration-api/core.h>
@@ -409,7 +410,10 @@ void Adaptor::Start()
     (*iter)->OnStart();
   }
 
-  mAddOnManager->Start();
+  if (mAddOnManager)
+  {
+    mAddOnManager->Start();
+  }
 }
 
 // Dali::Internal::Adaptor::Adaptor::Pause
@@ -425,7 +429,10 @@ void Adaptor::Pause()
     }
 
     // Extensions
-    mAddOnManager->Pause();
+    if (mAddOnManager)
+    {
+      mAddOnManager->Pause();
+    }
 
     // Pause all windows event handlers when adaptor paused
     for( auto window : mWindows )
@@ -462,7 +469,10 @@ void Adaptor::Resume()
     }
 
     // Resume AddOnManager
-    mAddOnManager->Resume();
+    if (mAddOnManager)
+    {
+      mAddOnManager->Resume();
+    }
 
     // Inform observers that we have resumed.
     for( ObserverContainer::iterator iter = mObservers.begin(), endIter = mObservers.end(); iter != endIter; ++iter )
@@ -495,7 +505,10 @@ void Adaptor::Stop()
       (*iter)->OnStop();
     }
 
-    mAddOnManager->Stop();
+    if (mAddOnManager)
+    {
+      mAddOnManager->Stop();
+    }
 
     mThreadController->Stop();
 
@@ -541,9 +554,9 @@ void Adaptor::FeedTouchPoint( TouchPoint& point, int timeStamp )
   mWindows.front()->FeedTouchPoint( convertedPoint, timeStamp );
 }
 
-void Adaptor::FeedWheelEvent( WheelEvent& wheelEvent )
+void Adaptor::FeedWheelEvent( Dali::WheelEvent& wheelEvent )
 {
-  Integration::WheelEvent event( static_cast< Integration::WheelEvent::Type >(wheelEvent.type), wheelEvent.direction, wheelEvent.modifiers, wheelEvent.point, wheelEvent.z, wheelEvent.timeStamp );
+  Integration::WheelEvent event( static_cast< Integration::WheelEvent::Type >( wheelEvent.GetType() ), wheelEvent.GetDirection(), wheelEvent.GetModifiers(), wheelEvent.GetPoint(), wheelEvent.GetDelta(), wheelEvent.GetTime() );
   mWindows.front()->FeedWheelEvent( event );
 }
 
@@ -635,7 +648,7 @@ void Adaptor::SetPreRenderCallback( CallbackBase* callback )
   mThreadController->SetPreRenderCallback( callback );
 }
 
-bool Adaptor::AddWindow( Dali::Integration::SceneHolder childWindow, const std::string& childWindowName, const std::string& childWindowClassName, bool childWindowMode )
+bool Adaptor::AddWindow( Dali::Integration::SceneHolder childWindow )
 {
   Internal::Adaptor::SceneHolder& windowImpl = Dali::GetImplementation( childWindow );
   windowImpl.SetAdaptor( Get() );
@@ -938,6 +951,11 @@ void Adaptor::OnWindowShown()
 
     DALI_LOG_RELEASE_INFO( "Adaptor::OnWindowShown: Update requested.\n" );
   }
+  else if( PAUSED_WHILE_INITIALIZING == mState )
+  {
+    // Change the state to READY again. It will be changed to RUNNING after the adaptor is started.
+    mState = READY;
+  }
   else
   {
     DALI_LOG_RELEASE_INFO( "Adaptor::OnWindowShown: Adaptor is not paused state.[%d]\n", mState );