/*
- * 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.
// Don't want to include the actual window.h which otherwise will be indirectly included by adaptor.h.
#define DALI_WINDOW_H
-#include <dali/integration-api/adaptors/adaptor.h>
+#include <dali/integration-api/adaptor-framework/adaptor.h>
+#include <dali/integration-api/adaptor-framework/scene-holder.h>
-#include <dali/integration-api/adaptors/scene-holder.h>
#include <toolkit-scene-holder-impl.h>
-
#include <toolkit-adaptor-impl.h>
#include <dali/integration-api/debug.h>
#include <dali/integration-api/scene.h>
#include <test-application.h>
-#include <test-render-surface.h>
+#include <toolkit-test-application.h>
namespace Dali
{
-namespace
-{
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// LogFactoryStub
-//
-///////////////////////////////////////////////////////////////////////////////
-
-class LogFactory : public LogFactoryInterface
-{
-public:
- LogFactory() = default;
- virtual ~LogFactory() = default;
-
-private:
- void InstallLogFunction() const override
- {
- Dali::Integration::Log::InstallLogFunction( &TestApplication::LogMessage );
- }
-};
-LogFactory* gLogFactory = NULL; // For some reason, destroying this when the Adaptor is destroyed causes a crash in some test cases when running all of them.
-} //unnamed namespace
-
namespace Internal
{
namespace Adaptor
}
}
+void Adaptor::RegisterProcessor( Integration::Processor& processor )
+{
+ Integration::Core& core = mTestApplication->GetCore();
+ core.RegisterProcessor( processor );
+}
+
+void Adaptor::UnregisterProcessor( Integration::Processor& processor )
+{
+ Integration::Core& core = mTestApplication->GetCore();
+ core.UnregisterProcessor( processor );
+}
+
+void Adaptor::SetApplication( Dali::TestApplication& testApplication )
+{
+ mTestApplication = &testApplication;
+}
+
Dali::Adaptor::AdaptorSignalType& Adaptor::ResizedSignal()
{
return mResizedSignal;
{
}
+class LogFactory : public LogFactoryInterface
+{
+public:
+ virtual void InstallLogFunction() const
+ {
+ Dali::Integration::Log::LogFunction logFunction(&ToolkitTestApplication::LogMessage);
+ Dali::Integration::Log::InstallLogFunction(logFunction);
+ }
+
+ LogFactory()
+ {
+ }
+ virtual ~LogFactory()
+ {
+ }
+};
+
+LogFactory* gLogFactory = NULL;
const LogFactoryInterface& Adaptor::GetLogFactory()
{
if( gLogFactory == NULL )
return *gLogFactory;
}
+void Adaptor::RegisterProcessor( Integration::Processor& processor )
+{
+ mImpl->RegisterProcessor( processor );
+}
+
+void Adaptor::UnregisterProcessor( Integration::Processor& processor )
+{
+ mImpl->UnregisterProcessor( processor );
+}
+
} // namespace Dali