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-window.cpp;h=e1ad7f2f04bdef52e77cc3246b1f8fc1960110c1;hp=1424f1ad8098ca6cb715e23dbe41c73ed95a3637;hb=f75399560e8f2c0eff3fc3678da77df7517dd9fa;hpb=65f6c9e91e0efbee208894b4cb1f9334a129b628 diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.cpp index 1424f1a..e1ad7f2 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.cpp @@ -25,7 +25,7 @@ #include #define DALI_WINDOW_H -#include +#include #include // INTERNAL INCLUDES @@ -48,7 +48,9 @@ namespace Adaptor { Window::Window( const PositionSize& positionSize ) -: SceneHolder( positionSize ) +: SceneHolder( positionSize ), + mFocusChangeSignal(), + mVisibilityChangedSignal() { } @@ -125,6 +127,46 @@ Integration::RenderSurface& Window::GetRenderSurface() return GetImplementation( *this ).GetRenderSurface(); } +void Window::Add( Actor actor ) +{ + GetImplementation( *this ).Add( actor ); +} + +void Window::Remove( Actor actor ) +{ + GetImplementation( *this ).Remove( actor ); +} + +Dali::Layer Window::GetRootLayer() const +{ + return GetImplementation( *this ).GetRootLayer(); +} + +void Window::SetBackgroundColor( const Vector4& color ) +{ + GetImplementation( *this ).SetBackgroundColor( color ); +} + +Vector4 Window::GetBackgroundColor() const +{ + return GetImplementation( *this ).GetBackgroundColor(); +} + +void Window::Raise() +{ + GetImplementation( *this ).mFocusChangeSignal.Emit(*this, true); +} + +void Window::Hide() +{ + GetImplementation( *this ).mVisibilityChangedSignal.Emit( *this, false ); +} + +FocusChangeSignalType& Window::FocusChangeSignal() +{ + return GetImplementation( *this ).mFocusChangeSignal; +} + namespace DevelWindow { @@ -140,6 +182,16 @@ Window Get( Actor actor ) return Dali::Window( windowImpl ); } +Window DownCast( BaseHandle handle ) +{ + Internal::Adaptor::Window* windowImpl = nullptr; + if ( Dali::Adaptor::IsAvailable() ) + { + windowImpl = dynamic_cast( handle.GetObjectPtr()); + } + return Dali::Window( windowImpl ); +} + EventProcessingFinishedSignalType& EventProcessingFinishedSignal( Window window ) { return GetImplementation( window ).GetScene().EventProcessingFinishedSignal(); @@ -164,6 +216,12 @@ WheelEventSignalType& WheelEventSignal( Window window ) { return GetImplementation( window ).WheelEventSignal(); } + +VisibilityChangedSignalType& VisibilityChangedSignal( Window window ) +{ + return GetImplementation( window ).mVisibilityChangedSignal; +} + } // namespace DevelWindow } // Dali