X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Fdali-toolkit-test-utils%2Ftoolkit-adaptor.cpp;h=1fe86c3711bd3f86f8ecac1bf334872b0e3c077e;hb=7c81ee521e33d47e386d60eb7ccf07b98073542c;hp=7c50cc7d268f98a24639ae192c981db7287811b0;hpb=19c7495f5e82eb301e7af38370ea2897e7324b7b;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-adaptor.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-adaptor.cpp index 7c50cc7..1fe86c3 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-adaptor.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-adaptor.cpp @@ -29,34 +29,11 @@ #include #include #include +#include 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 @@ -195,6 +172,23 @@ void Adaptor::RemoveWindow( Internal::Adaptor::SceneHolder* window ) } } +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; @@ -347,6 +341,24 @@ void Adaptor::SceneCreated() { } +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 ) @@ -356,4 +368,14 @@ const LogFactoryInterface& Adaptor::GetLogFactory() return *gLogFactory; } +void Adaptor::RegisterProcessor( Integration::Processor& processor ) +{ + mImpl->RegisterProcessor( processor ); +} + +void Adaptor::UnregisterProcessor( Integration::Processor& processor ) +{ + mImpl->UnregisterProcessor( processor ); +} + } // namespace Dali