Support scene holder instead of window in keyinput/keyboard focus
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / focus-manager / keyinput-focus-manager-impl.cpp
index 71bc352..57e0d86 100644 (file)
@@ -23,8 +23,8 @@
 #include <dali/public-api/actors/layer.h>
 #include <dali/public-api/common/stage.h>
 #include <dali/devel-api/common/stage-devel.h>
-#include <dali/devel-api/adaptor-framework/window-devel.h>
 #include <dali/integration-api/adaptors/adaptor.h>
+#include <dali/integration-api/adaptors/scene-holder.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control-impl.h>
@@ -53,23 +53,23 @@ KeyInputFocusManager::KeyInputFocusManager()
   mCurrentFocusControl()
 {
   // Retrieve all the existing widnows
-  Dali::WindowContainer windows = Adaptor::Get().GetWindows();
-  for ( auto iter = windows.begin(); iter != windows.end(); ++iter )
+  Dali::SceneHolderList sceneHolders = Adaptor::Get().GetSceneHolders();
+  for( auto iter = sceneHolders.begin(); iter != sceneHolders.end(); ++iter )
   {
-    DevelWindow::KeyEventGeneratedSignal( *iter ).Connect( mSlotDelegate, &KeyInputFocusManager::OnKeyEvent);
+    ( *iter ).KeyEventGeneratedSignal().Connect( mSlotDelegate, &KeyInputFocusManager::OnKeyEvent );
   }
 
-  // Get notified when any new window is created afterwards
-  Adaptor::Get().WindowCreatedSignal().Connect( mSlotDelegate, &KeyInputFocusManager::OnWindowCreated);
+  // Get notified when any new scene holder is created afterwards
+  Adaptor::Get().WindowCreatedSignal().Connect( mSlotDelegate, &KeyInputFocusManager::OnSceneHolderCreated );
 }
 
 KeyInputFocusManager::~KeyInputFocusManager()
 {
 }
 
-void KeyInputFocusManager::OnWindowCreated( Dali::Window& window )
+void KeyInputFocusManager::OnSceneHolderCreated( Dali::Integration::SceneHolder& sceneHolder )
 {
-  DevelWindow::KeyEventGeneratedSignal( window ).Connect( mSlotDelegate, &KeyInputFocusManager::OnKeyEvent);
+  sceneHolder.KeyEventGeneratedSignal().Connect( mSlotDelegate, &KeyInputFocusManager::OnKeyEvent );
 }
 
 void KeyInputFocusManager::SetFocus( Toolkit::Control control )