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