X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fdevel-api%2Fadaptor-framework%2Fapplication-devel.h;h=e82281cdd5aa29e7fd72fe392712944a0df4443d;hb=abe404aa50089e1042631d5bb3254ad760552b65;hp=05bc65aa4ad9ed7b0bf728e74a9b2dc19d68dfc5;hpb=f9b298189acf7034afcc56a8412513a19746c515;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/devel-api/adaptor-framework/application-devel.h b/dali/devel-api/adaptor-framework/application-devel.h index 05bc65a..e82281c 100644 --- a/dali/devel-api/adaptor-framework/application-devel.h +++ b/dali/devel-api/adaptor-framework/application-devel.h @@ -2,7 +2,7 @@ #define DALI_APPLICATION_DEVEL_H /* - * Copyright (c) 2018 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. @@ -23,20 +23,72 @@ namespace Dali { - namespace DevelApplication { /** - * @brief This is used to improve application launch performance. - * It preloads so files, initializes some functions in advance and makes a window in advance. + * @brief This is the constructor for applications. + * Especially, it is for keyboard application. + * If you want to create Ime window, use this API with WindowType::IME. + * + * @param[in,out] argc A pointer to the number of arguments + * @param[in,out] argv A pointer to the argument list + * @param[in] stylesheet The path to user defined theme file + * @param[in] windowMode A member of WINDOW_MODE + * @param[in] positionSize A position and a size of the window + * @param[in] type It is window type for default window. + * @return A handle to the Application + * @note If the stylesheet is not specified, then the library's default stylesheet will not be overridden. + */ +DALI_ADAPTOR_API Application New(int* argc, char** argv[], const std::string& stylesheet, Application::WINDOW_MODE windowMode, PositionSize positionSize, WindowType type); + +/** + * @brief Ensures that the function passed in is called from the main loop when it is idle. + * @param[in] application A handle to the Application + * @param[in] callback The function to call + * @return @c true if added successfully, @c false otherwise + * + * @note Function must be called from main event thread only * - * @param[in,out] argc A pointer to the number of arguments - * @param[in,out] argv A pointer to the argument list + * A callback of the following type should be used: + * @code + * bool MyFunction(); + * @endcode + * This callback will be called repeatedly as long as it returns true. A return of 0 deletes this callback. + * + * @note Ownership of the callback is passed onto this class. */ -DALI_ADAPTOR_API void PreInitialize( int* argc, char** argv[] ); +DALI_ADAPTOR_API bool AddIdleWithReturnValue(Application application, CallbackBase* callback); + +/** +* @brief Gets the absolute path to the application's data directory which is used to store private data of the application. +* @return The absolute path to the application's data directory +*/ +DALI_ADAPTOR_API std::string GetDataPath(); + +/** + * @brief Downcasts a ref object to Application handle + * + * If handle points to an Application object, the downcast produces valid base handle + * If not, the returned base handle is left uninitialized + * + * @param[in] refObject to an Application + * @return handle to an Application object or an uninitialized base handle + */ +DALI_ADAPTOR_API Application DownCast(Dali::RefObject* refObject); } // namespace DevelApplication } // namespace Dali +/** + * @brief This is used to improve application launch performance. + * Initializes some functions in advance and makes a window in advance. + * @param[in,out] argc A pointer to the number of arguments + * @param[in,out] argv A pointer to the argument list + * + * @note Declared in C style for calling from app-launcher. + * + */ +extern "C" DALI_ADAPTOR_API void ApplicationPreInitialize(int* argc, char** argv[]); + #endif // DALI_APPLICATION_DEVEL_H