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