Merge "Fix ZWJ, ZWNJ issues" into devel/master
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / styling / style-manager-devel.h
1 #ifndef DALI_TOOLKIT_STYLE_MANAGER_DEVEL_H
2 #define DALI_TOOLKIT_STYLE_MANAGER_DEVEL_H
3
4 /*
5  * Copyright (c) 2020 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  */
20
21 // INTERNAL INCLUDES
22 #include <dali-toolkit/public-api/styling/style-manager.h>
23
24 namespace Dali
25 {
26 namespace Toolkit
27 {
28 namespace DevelStyleManager
29 {
30 /**
31  * @brief The Type of BrokenImage
32  */
33 enum class BrokenImageType
34 {
35   SMALL,
36   NORMAL,
37   LARGE
38 };
39
40 using BrokenImageChangedSignalType = Signal<void(StyleManager)>;
41
42 /**
43  * @brief Gets all currently defined configurations.
44  *
45  * @pre The Builder has been initialized.
46  * @param[in] styleManager The instance of StyleManager
47  * @return A property map to the currently defined configurations
48 **/
49 DALI_TOOLKIT_API const Property::Map GetConfigurations(StyleManager styleManager);
50
51 /**
52    * @brief Sets an image to be used when a visual has failed to correctly render
53    * @param[in] styleManager The instance of StyleManager
54    * @param[in] brokenImageType The type of broken image
55    * @param[in] brokenImageUrl The broken image url
56    */
57 DALI_TOOLKIT_API void SetBrokenImageUrl(StyleManager styleManager, DevelStyleManager::BrokenImageType brokenImageType, const std::string& brokenImageUrl);
58
59 /**
60    * @brief Gets an image to be used when a visual has failed to correctly render
61    * @param[in] styleManager The instance of StyleManager
62    * @param[in] brokenImageType BrokenImage type
63    */
64 DALI_TOOLKIT_API std::string GetBrokenImageUrl(StyleManager styleManager, DevelStyleManager::BrokenImageType brokenImageType);
65
66 /**
67  * @brief Get the Broken Image Url List
68  *
69  * This list is broken images stored in order of SMALL, NORMAL, and LARGE values except if the value is empty.
70  * This API just makes the list without comparing size, so the application must set a value that matches the size.
71  * @param styleManager The instance of StyleManager
72  * @return A List of Broken Image Url
73  */
74 DALI_TOOLKIT_API std::vector<std::string> GetBrokenImageUrlList(StyleManager styleManager);
75
76 /**
77  * @brief This signal is emitted when the URL of the broken image is set
78  *
79  * A callback of the following type may be connected:
80  * @code
81  *   void YourCallbackName(StyleManager styleManager)
82  * @endcode
83  * @param styleManager The instance of StyleManager
84  * @return The signal to connect to
85  */
86 DALI_TOOLKIT_API BrokenImageChangedSignalType& BrokenImageChangedSignal(StyleManager styleManager);
87
88 } // namespace DevelStyleManager
89
90 } // namespace Toolkit
91
92 } // namespace Dali
93
94 #endif // DALI_TOOLKIT_STYLE_MANAGER_DEVEL_H