X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Fdali-toolkit-test-utils%2Ftoolkit-adaptor.cpp;h=522537c02f5f7460de42c824357ed6236de9ad96;hp=10a265964d4e89ae38cf62fcf404a262b7bc2c87;hb=8ae521ab64a3922f3419fbbfb83dde57e6135cf5;hpb=e42dc155f49bacd9635433efafcfe3004392ddcf 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 10a2659..522537c 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 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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. @@ -15,9 +15,14 @@ * */ -// CLASS HEADER +#include + +// Don't want to include the actual window.h which otherwise will be indirectly included by adaptor.h. +#define DALI_WINDOW_H #include +#include + #include #include @@ -35,6 +40,8 @@ namespace Adaptor bool Adaptor::mAvailable = false; Vector Adaptor::mCallbacks = Vector(); +Dali::WindowContainer Adaptor::mWindows; +Dali::Adaptor::WindowCreatedSignalType* Adaptor::mWindowCreatedSignal = nullptr; Dali::Adaptor& Adaptor::Get() { @@ -49,12 +56,27 @@ Dali::RenderSurfaceInterface& Adaptor::GetSurface() return *renderSurface; } +Dali::WindowContainer Adaptor::GetWindows() +{ + return Adaptor::mWindows; +} + Dali::Adaptor::AdaptorSignalType& Adaptor::AdaptorSignal() { Dali::Adaptor::AdaptorSignalType* signal = new Dali::Adaptor::AdaptorSignalType; return *signal; } +Dali::Adaptor::WindowCreatedSignalType& Adaptor::WindowCreatedSignal() +{ + if ( !Adaptor::mWindowCreatedSignal ) + { + Adaptor::mWindowCreatedSignal = new Dali::Adaptor::WindowCreatedSignalType; + } + + return *Adaptor::mWindowCreatedSignal; +} + } // namespace Adaptor } // namespace Internal @@ -78,6 +100,26 @@ Adaptor& Adaptor::New( Window window, const Dali::RenderSurfaceInterface& surfac return Internal::Adaptor::Adaptor::Get(); } +Adaptor& Adaptor::New( Dali::Integration::SceneHolder window ) +{ + return Internal::Adaptor::Adaptor::Get(); +} + +Adaptor& Adaptor::New( Dali::Integration::SceneHolder window, Configuration::ContextLoss configuration ) +{ + return Internal::Adaptor::Adaptor::Get(); +} + +Adaptor& Adaptor::New( Dali::Integration::SceneHolder window, const Dali::RenderSurfaceInterface& surface ) +{ + return Internal::Adaptor::Adaptor::Get(); +} + +Adaptor& Adaptor::New( Dali::Integration::SceneHolder window, const Dali::RenderSurfaceInterface& surface, Configuration::ContextLoss configuration ) +{ + return Internal::Adaptor::Adaptor::Get(); +} + Adaptor::~Adaptor() { } @@ -134,6 +176,10 @@ void Adaptor::ReplaceSurface( Window window, Dali::RenderSurfaceInterface& surfa { } +void Adaptor::ReplaceSurface( Dali::Integration::SceneHolder window, Dali::RenderSurfaceInterface& surface ) +{ +} + Adaptor::AdaptorSignalType& Adaptor::ResizedSignal() { return Internal::Adaptor::Adaptor::AdaptorSignal(); @@ -144,11 +190,21 @@ Adaptor::AdaptorSignalType& Adaptor::LanguageChangedSignal() return Internal::Adaptor::Adaptor::AdaptorSignal(); } +Adaptor::WindowCreatedSignalType& Adaptor::WindowCreatedSignal() +{ + return Internal::Adaptor::Adaptor::WindowCreatedSignal(); +} + Dali::RenderSurfaceInterface& Adaptor::GetSurface() { return Internal::Adaptor::Adaptor::GetSurface(); } +Dali::WindowContainer Adaptor::GetWindows() const +{ + return Internal::Adaptor::Adaptor::GetWindows(); +} + Any Adaptor::GetNativeWindowHandle() { Any window; @@ -185,10 +241,6 @@ void Adaptor::NotifyLanguageChanged() { } -void Adaptor::SetMinimumPinchDistance(float distance) -{ -} - void Adaptor::FeedTouchPoint( TouchPoint& point, int timeStamp ) { } @@ -235,6 +287,12 @@ const LogFactoryInterface& Adaptor::GetLogFactory() Adaptor::Adaptor() : mImpl( NULL ) { + Dali::PositionSize win_size; + win_size.width = 640; + win_size.height = 800; + + Dali::Window window = Dali::Window::New( win_size, "" ); + Internal::Adaptor::Adaptor::mWindows.push_back( window ); } } // namespace Dali