X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Fdali-toolkit-test-utils%2Ftoolkit-test-application.h;h=7dd21b5c168d6bca218cdf4ffc7b7cdfc9f79646;hb=3928808cc2029cbfd59230f2edb8889a63a59cec;hp=40280a04e5a78795b6870e813e650ecb8088e573;hpb=726e147d14bb18ef193b102a36d8068b62db89ed;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-test-application.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-test-application.h index 40280a0..7dd21b5 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-test-application.h +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-test-application.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TOOLKIT_TEST_APPLICATION_H__ -#define __DALI_TOOLKIT_TEST_APPLICATION_H__ +#ifndef DALI_TOOLKIT_TEST_APPLICATION_H +#define DALI_TOOLKIT_TEST_APPLICATION_H /* - * Copyright (c) 2014 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. @@ -18,17 +18,22 @@ * */ +// EXTERNAL INCLUDES +#include + // INTERNAL INCLUDES #include -#include - -#include "toolkit-orientation.h" namespace Dali { +class Adaptor; +class Window; + /** * Adds some functionality on top of TestApplication that is required by the Toolkit. + * + * This includes creation and destruction of the Adaptor and Window classes. */ class ToolkitTestApplication : public TestApplication { @@ -37,35 +42,24 @@ public: ToolkitTestApplication( size_t surfaceWidth = DEFAULT_SURFACE_WIDTH, size_t surfaceHeight = DEFAULT_SURFACE_HEIGHT, float horizontalDpi = DEFAULT_HORIZONTAL_DPI, - float verticalDpi = DEFAULT_VERTICAL_DPI ) - : TestApplication( false, surfaceWidth, surfaceHeight, horizontalDpi, verticalDpi ) - { - Initialize(); - - // set the DPI value for font rendering - Dali::TextAbstraction::FontClient fontClient = Dali::TextAbstraction::FontClient::Get(); - if( fontClient ) - { - fontClient.SetDpi( mDpi.x, mDpi.y ); - } - } + float verticalDpi = DEFAULT_VERTICAL_DPI ); - ~ToolkitTestApplication() - { - // Need to delete core before we delete the adaptor. - delete mCore; - mCore = NULL; - } + ~ToolkitTestApplication(); - //ToolkitOrientation& GetOrientation() - //{ - //return mOrientation; - //} + /** + * @brief Executes the idle callbacks. + * + * Some controls like the text-field and the text-editor connect callbacks to the + * idle signal. + */ + void RunIdles(); private: - //ToolkitOrientation mOrientation; + + std::unique_ptr mMainWindow; + std::unique_ptr< Adaptor > mAdaptor; }; } // namespace Dali -#endif // __DALI_TOOLKIT_TEST_APPLICATION_H__ +#endif // DALI_TOOLKIT_TEST_APPLICATION_H