1 #ifndef DALI_APPLICATION_DEVEL_H
2 #define DALI_APPLICATION_DEVEL_H
5 * Copyright (c) 2018 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 #include <dali/public-api/adaptor-framework/application.h>
27 namespace DevelApplication
30 * @brief This is used to improve application launch performance.
31 * It preloads so files, initializes some functions in advance and makes a window in advance.
33 * @param[in,out] argc A pointer to the number of arguments
34 * @param[in,out] argv A pointer to the argument list
36 DALI_ADAPTOR_API void PreInitialize( int* argc, char** argv[] );
39 * @brief Ensures that the function passed in is called from the main loop when it is idle.
40 * @param[in] application A handle to the Application
41 * @param[in] callback The function to call
42 * @return @c true if added successfully, @c false otherwise
44 * @note Function must be called from main event thread only
46 * A callback of the following type should be used:
50 * This callback will be called repeatedly as long as it returns true. A return of 0 deletes this callback.
52 * @note Ownership of the callback is passed onto this class.
54 DALI_ADAPTOR_API bool AddIdleWithReturnValue( Application application, CallbackBase* callback );
57 * @brief Create and Add a child window to the application instance
58 * @param[in] application A handle to the Application
59 * @param[in] childPosSize The position and size of the child window to be created
60 * @param[in] childWindowName The title of the child window
61 * @param[in] childWindowClassName The class name of the child window
62 * @param[in] childWindowMode The mode of the newly created child window
63 * @return @c a window handle if added successfully, @c null otherwise
65 * @note Function must be called from main event thread only
67 DALI_ADAPTOR_API Dali::Window CreateWindow( Application application, PositionSize childPosSize, const std::string& childWindowName, const std::string& childWindowClassName, bool childWindowMode );
70 * @brief Removes a previously created Window instance from the Adaptor internal list
71 * @note Function must be called from the main event thread only.
72 * @param[in] application A handle to the Application
73 * @param[in] childWindow The created Window instance
74 * @return true if removed successfully, false otherwise
76 DALI_ADAPTOR_API bool DestroyWindow( Application application, Dali::Window* childWindow );
79 * @brief Removes a previously created Window instance from the Adaptor internal list
80 * @note Function must be called from the main event thread only.
81 * @param[in] application A handle to the Application
82 * @param[in] childWindowName The title of the window
83 * @return true if removed successfully, false otherwise
85 DALI_ADAPTOR_API bool DestroyWindow( Application application, const std::string& childWindowName );
87 } // namespace DevelApplication
91 #endif // DALI_APPLICATION_DEVEL_H