[dali_1.9.23] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / toolkit-window.cpp
index 5ee2dcb..3c01e99 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 // EXTERNAL INCLUDES
 #include <dali/public-api/actors/actor.h>
 #include <dali/public-api/actors/layer.h>
-#include <dali/public-api/common/stage.h>
 #include <dali/public-api/object/base-object.h>
 
 #define DALI_WINDOW_H
-#include <dali/integration-api/adaptors/adaptor.h>
+#include <dali/integration-api/adaptor-framework/adaptor.h>
 #include <toolkit-adaptor-impl.h>
 
-// INTERNAL INCLUDES
-#include "test-render-surface.h"
-
 using AdaptorImpl = Dali::Internal::Adaptor::Adaptor;
 
 namespace Dali
@@ -122,7 +118,7 @@ Integration::Scene Window::GetScene()
   return GetImplementation( *this ).GetScene();
 }
 
-Integration::RenderSurface& Window::GetRenderSurface()
+Dali::RenderSurfaceInterface& Window::GetRenderSurface()
 {
   return GetImplementation( *this ).GetRenderSurface();
 }
@@ -167,6 +163,16 @@ FocusChangeSignalType& Window::FocusChangeSignal()
   return GetImplementation( *this ).mFocusChangeSignal;
 }
 
+Window::KeyEventSignalType& Window::KeyEventSignal()
+{
+  return GetImplementation( *this ).KeyEventSignal();
+}
+
+Window::TouchSignalType& Window::TouchSignal()
+{
+  return GetImplementation( *this ).TouchSignal();
+}
+
 namespace DevelWindow
 {
 
@@ -192,24 +198,24 @@ Window DownCast( BaseHandle handle )
   return Dali::Window( windowImpl );
 }
 
-EventProcessingFinishedSignalType& EventProcessingFinishedSignal( Window window )
+void AddFrameRenderedCallback( Window window, std::unique_ptr< CallbackBase > callback, int32_t frameId )
 {
-  return GetImplementation( window ).GetScene().EventProcessingFinishedSignal();
+  CallbackBase::Execute( *callback, frameId );
 }
 
-KeyEventSignalType& KeyEventSignal( Window window )
+void AddFramePresentedCallback( Window window, std::unique_ptr< CallbackBase > callback, int32_t frameId )
 {
-  return GetImplementation( window ).KeyEventSignal();
+  CallbackBase::Execute( *callback, frameId );
 }
 
-KeyEventGeneratedSignalType& KeyEventGeneratedSignal( Window window )
+EventProcessingFinishedSignalType& EventProcessingFinishedSignal( Window window )
 {
-  return GetImplementation( window ).KeyEventGeneratedSignal();
+  return GetImplementation( window ).GetScene().EventProcessingFinishedSignal();
 }
 
-TouchSignalType& TouchSignal( Window window )
+KeyEventGeneratedSignalType& KeyEventGeneratedSignal( Window window )
 {
-  return GetImplementation( window ).TouchSignal();
+  return GetImplementation( window ).KeyEventGeneratedSignal();
 }
 
 WheelEventSignalType& WheelEventSignal( Window window )