Merge "Update Events' public header comments" into devel/master
[platform/core/uifw/dali-core.git] / dali / public-api / actors / blending.h
1 #ifndef __DALI_BLENDING_H__
2 #define __DALI_BLENDING_H__
3
4 /*
5  * Copyright (c) 2015 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/public-api/common/dali-common.h>
23
24 namespace Dali
25 {
26 /**
27  * @addtogroup dali_core_actors
28  * @{
29  */
30
31 namespace BlendingMode
32 {
33 /**
34  * @brief Blending mode.
35  * @SINCE_1_0.0
36  * @remarks This is an experimental feature and might not be supported in the next release.
37  * We do recommend not to use it.
38  */
39 enum Type
40 {
41   OFF,  ///< Blending is disabled. @SINCE_1_0.0
42   AUTO, ///< Blending is enabled if there is alpha channel. This is the default mode. @SINCE_1_0.0
43   ON    ///< Blending is enabled. @SINCE_1_0.0
44 };
45
46 } //namespace BlendingMode
47
48 namespace BlendingFactor
49 {
50 /**
51  * @brief Blending Factor.
52  *
53  * @SINCE_1_0.0
54  * @remarks This is an experimental feature and might not be supported in the next release.
55  * We do recommend not to use it.
56  */
57 enum Type
58 {
59   ZERO                     = 0,  ///< ZERO @SINCE_1_0.0
60   ONE                      = 1,  ///< ONE @SINCE_1_0.0
61   SRC_COLOR                = 0x0300,  ///< SRC_COLOR @SINCE_1_0.0
62   ONE_MINUS_SRC_COLOR      = 0x0301,  ///< ONE_MINUS_SRC_COLOR @SINCE_1_0.0
63   SRC_ALPHA                = 0x0302,  ///< SRC_ALPHA @SINCE_1_0.0
64   ONE_MINUS_SRC_ALPHA      = 0x0303,  ///< ONE_MINUS_SRC_ALPHA @SINCE_1_0.0
65   DST_ALPHA                = 0x0304,  ///< DST_ALPHA @SINCE_1_0.0
66   ONE_MINUS_DST_ALPHA      = 0x0305,  ///< ONE_MINUS_DST_ALPHA @SINCE_1_0.0
67   DST_COLOR                = 0x0306,  ///< DST_COLOR @SINCE_1_0.0
68   ONE_MINUS_DST_COLOR      = 0x0307,  ///< ONE_MINUS_DST_COLOR @SINCE_1_0.0
69   SRC_ALPHA_SATURATE       = 0x0308,  ///< SRC_ALPHA_SATURATE @SINCE_1_0.0
70   CONSTANT_COLOR           = 0x8001,  ///< CONSTANT_COLOR @SINCE_1_0.0
71   ONE_MINUS_CONSTANT_COLOR = 0x8002,  ///< ONE_MINUS_CONSTANT_COLOR @SINCE_1_0.0
72   CONSTANT_ALPHA           = 0x8003,  ///< CONSTANT_ALPHA @SINCE_1_0.0
73   ONE_MINUS_CONSTANT_ALPHA = 0x8004  ///< ONE_MINUS_CONSTANT_ALPHA @SINCE_1_0.0
74 };
75
76 } // namespace BlendingFactor
77
78 namespace BlendingEquation
79 {
80 /**
81  * @brief Blending Equation.
82  *
83  * @SINCE_1_0.0
84  * @remarks This is an experimental feature and might not be supported in the next release.
85  * We do recommend not to use it.
86  */
87 enum Type
88 {
89   ADD              = 0x8006,  ///< The source and destination colors are added to each other. @SINCE_1_0.0
90   SUBTRACT         = 0x800A,  ///< Subtracts the destination from the source. @SINCE_1_0.0
91   REVERSE_SUBTRACT = 0x800B  ///< Subtracts the source from the destination. @SINCE_1_0.0
92 };
93
94 } // namespace BlendingEquation
95
96 DALI_IMPORT_API extern const BlendingFactor::Type   DEFAULT_BLENDING_SRC_FACTOR_RGB;    ///< BlendingFactor::SRC_ALPHA
97 DALI_IMPORT_API extern const BlendingFactor::Type   DEFAULT_BLENDING_DEST_FACTOR_RGB;   ///< BlendingFactor::ONE_MINUS_SRC_ALPHA
98 DALI_IMPORT_API extern const BlendingFactor::Type   DEFAULT_BLENDING_SRC_FACTOR_ALPHA;  ///< BlendingFactor::ONE
99 DALI_IMPORT_API extern const BlendingFactor::Type   DEFAULT_BLENDING_DEST_FACTOR_ALPHA; ///< BlendingFactor::ONE_MINUS_SRC_ALPHA
100
101 DALI_IMPORT_API extern const BlendingEquation::Type DEFAULT_BLENDING_EQUATION_RGB;     ///< BlendingEquation::ADD
102 DALI_IMPORT_API extern const BlendingEquation::Type DEFAULT_BLENDING_EQUATION_ALPHA;   ///< BlendingEquation::ADD
103
104 /**
105  * @}
106  */
107 } // namespace Dali
108
109 #endif // __DALI_BLENDING_H__