Merge "DALi Version 1.2.27" into devel/master
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / visuals / visual-properties.h
1 #ifndef DALI_TOOLKIT_VISUAL_PROPERTIES_H
2 #define DALI_TOOLKIT_VISUAL_PROPERTIES_H
3
4 /*
5  * Copyright (c) 2017 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/toolkit-property-index-ranges.h>
23
24 namespace Dali
25 {
26
27 namespace Toolkit
28 {
29
30 /**
31  * @addtogroup dali_toolkit_visuals
32  * @{
33  */
34
35 /**
36  * @brief All the visual types
37  * @SINCE_1_1.45
38  */
39 namespace Visual
40 {
41
42 /**
43  * @brief All the visual types.
44  * @SINCE_1_1.45
45  */
46 enum Type
47 {
48   BORDER, ///< Renders a solid color as an internal border to the control's quad. @SINCE_1_1.45
49   COLOR, ///< Renders a solid color to the control's quad. @SINCE_1_1.45
50   GRADIENT, ///< Renders a smooth transition of colors to the control's quad. @SINCE_1_1.45
51   IMAGE, ///< Renders an image into the control's quad. @SINCE_1_1.45
52   MESH, ///< Renders a mesh using an "obj" file, optionally with textures provided by an "mtl" file. @SINCE_1_1.45
53   PRIMITIVE, ///< Renders a simple 3D shape, such as a cube or sphere. @SINCE_1_1.45
54   WIREFRAME ///< Renders a simple wire-frame outlining a quad. @SINCE_1_2_2
55 };
56
57 /**
58  * @brief Visual Property
59  * @SINCE_1_1.45
60  */
61 namespace Property
62 {
63
64 /**
65  * @brief Visual Property
66  * @SINCE_1_1.45
67  */
68 enum
69 {
70   /**
71    * @brief The index for the visual type.
72    * @details Name "visualType", type [Type](@ref Dali::Toolkit::Visual::Type) (Property::INTEGER) or Property::STRING.
73    * @SINCE_1_1.45
74    * @note Mandatory.
75    * @see Type
76    */
77   TYPE = VISUAL_PROPERTY_BASE_START_INDEX,
78
79   /**
80    * @brief The shader to use in the visual.
81    * @details Name "shader", type Property::Map.
82    * @SINCE_1_1.45
83    * @note Optional.
84    * @note Will override the existing shaders.
85    * @see Shader::Property
86    */
87   SHADER
88 };
89
90 } // namespace Property
91
92 /**
93  * @brief Shader for Visuals
94  * @SINCE_1_1.45
95  */
96 namespace Shader
97 {
98
99 /**
100  * @brief Shader Property
101  * @SINCE_1_1.45
102  */
103 namespace Property
104 {
105
106 /**
107  * @brief The type of Shader
108  * @SINCE_1_1.45
109  */
110 enum
111 {
112   /**
113    * @brief The vertex shader.
114    * @details Name "vertexShader", type Property::STRING or Property::ARRAY of Property::STRING.
115    *          A Property::ARRAY of Property::STRING values can be used to split the shader string over multiple lines.
116    * @SINCE_1_1.45
117    * @note Optional
118    * @note If not supplied, the visual's already set vertex shader is used.
119    */
120   VERTEX_SHADER,
121
122   /**
123    * @brief The fragment shader.
124    * @details Name "fragmentShader", type Property::STRING or Property::ARRAY of Property::STRING.
125    *          A Property::ARRAY of Property::STRING values can be used to split the shader string over multiple lines.
126    * @SINCE_1_1.45
127    * @note Optional
128    * @note If not supplied, the visual's already set fragment shader is used.
129    */
130   FRAGMENT_SHADER,
131
132   /**
133    * @brief How to subdivide the grid along the X-Axis.
134    * @details Name "subdivideGridX", type Property::INTEGER.
135    * @SINCE_1_1.45
136    * @note Optional
137    * @note If not supplied, the default is 1.
138    * @note Value should be greater than or equal to 1.
139    */
140   SUBDIVIDE_GRID_X,
141
142   /**
143    * @brief How to subdivide the grid along the Y-Axis.
144    * @details Name "subdivideGridY", type Property::INTEGER.
145    * @SINCE_1_1.45
146    * @note Optional
147    * @note If not supplied, the default is 1.
148    * @note Value should be greater than or equal to 1.
149    */
150   SUBDIVIDE_GRID_Y,
151
152   /**
153    * @brief Hints for rendering.
154    * @details Name "hints", type Dali::Shader::Hint (Property::INTEGER), Property::STRING or Property::ARRAY of Property::STRING.
155    * @SINCE_1_1.45
156    * @note Optional
157    * @note If not supplied, the default is Dali::Shader::Hint::NONE.
158    */
159   HINTS,
160 };
161
162 } // namespace Property
163
164 } // namespace Shader
165
166 } // namespace Visual
167
168 /**
169  * @}
170  */
171
172 } // namespace Toolkit
173
174 } // namespace Dali
175
176 #endif // DALI_TOOLKIT_VISUAL_PROPERTIES_H