8f7248fcf4ff06d932624f2eb7bb3e9ff0cc2ec8
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / visuals / visual-properties-devel.h
1 #ifndef DALI_TOOLKIT_DEVEL_API_VISUALS_VISUAL_PROPERTIES_DEVEL_H
2 #define DALI_TOOLKIT_DEVEL_API_VISUALS_VISUAL_PROPERTIES_DEVEL_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/visuals/visual-properties.h>
23
24 namespace Dali
25 {
26
27 namespace Toolkit
28 {
29
30 namespace DevelVisual
31 {
32
33 /**
34  * @brief All the visual types.
35  */
36 enum Type
37 {
38   BORDER    = Dali::Toolkit::Visual::BORDER,
39   COLOR     = Dali::Toolkit::Visual::COLOR,
40   GRADIENT  = Dali::Toolkit::Visual::GRADIENT,
41   IMAGE     = Dali::Toolkit::Visual::IMAGE,
42   MESH      = Dali::Toolkit::Visual::MESH,
43   PRIMITIVE = Dali::Toolkit::Visual::PRIMITIVE,
44   WIREFRAME = Dali::Toolkit::Visual::WIREFRAME,
45
46   TEXT      = WIREFRAME + 1, ///< Renders text.
47 };
48
49 namespace Property
50 {
51
52 enum Type
53 {
54   TYPE   = Dali::Toolkit::Visual::Property::TYPE,
55   SHADER = Dali::Toolkit::Visual::Property::SHADER,
56
57   /**
58    * @brief The transform used by the visual.
59    * @details Name "transform", type Property::Map.
60
61    * @note Optional.
62    * @see DevelVisual::Transform::Property
63    */
64   TRANSFORM = SHADER + 1, // Dali::Toolkit::Visual::Property::SHADER + 1
65
66   /**
67    * @brief Enables/disables premultiplied alpha.
68    * The premultiplied alpha is false by default unless this behaviour is modified
69    * by the derived Visual type.
70
71    * @details Name "premultipliedAlpha", type Property::Boolean.
72
73    * @note Optional.
74    */
75   PREMULTIPLIED_ALPHA = SHADER + 2, // Dali::Toolkit::Visual::Property::SHADER + 2
76 };
77
78 } //namespace Property
79
80 namespace Transform
81 {
82
83 namespace Property
84 {
85
86 enum Type
87 {
88   /**
89    * @brief Offset of the visual. It can be either relative (percentage of the parent)
90    * or absolute (in world units).
91    * @details Name "offset", type Property::VECTOR2
92    */
93   OFFSET,
94
95   /**
96    * @brief Size of the visual. It can be either relative (percentage of the parent)
97    * or absolute (in world units).
98    * @details Name "size", type Property::VECTOR2
99    */
100   SIZE,
101
102   /**
103    * @brief The origin of the visual within its control area.
104    * @details Name "origin", type Align::Type (Property::INTEGER) or Property::STRING.
105    * @see Toolkit::Align
106    */
107   ORIGIN,
108
109   /**
110    * @brief The anchor-point of the visual
111    * @details Name "anchorPoint", type Align::Type (Property::INTEGER) or Property::STRING.
112    * @see Toolkit::Align
113    */
114   ANCHOR_POINT,
115
116   /**
117    * @brief Indicates which components of the offset and size are relative
118    * (percentage of the parent) or absolute (in world units).
119    * 0 indicates the component is relative, and 1 absolute.
120    * @details Name "offsetSizeMode", type Property::VECTOR4
121    */
122   OFFSET_SIZE_MODE
123 };
124
125 } //namespace Property
126
127 } // namespace Transform
128
129 } // namespace DevelVisual
130
131 } // namespace Toolkit
132
133 } // namespace Dali
134
135 #endif // DALI_TOOLKIT_DEVEL_API_VISUALS_VISUAL_PROPERTIES_DEVEL_H