Tizen 2.4.0 rev3 SDK Public Release
[framework/graphics/dali.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 /**
32  * @brief Blending mode.
33  * @since_tizen 2.4
34  * @remarks This is an experimental feature and might not be supported in the next release.
35  * We do recommend not to use it.
36  */
37 namespace BlendingMode
38 {
39 enum Type
40 {
41   OFF,  ///< Blending is disabled. @since_tizen 2.4
42   AUTO, ///< Blending is enabled if there is alpha channel. @since_tizen 2.4
43   ON    ///< Blending is enabled. @since_tizen 2.4
44 };
45
46 } //namespace BlendingMode
47
48 /**
49  * @brief Blending Factor.
50  *
51  * @since_tizen 2.4
52  * @remarks This is an experimental feature and might not be supported in the next release.
53  * We do recommend not to use it.
54  */
55 namespace BlendingFactor
56 {
57 enum Type
58 {
59   ZERO                     = 0,  ///< ZERO @since_tizen 2.4
60   ONE                      = 1,  ///< ONE @since_tizen 2.4
61   SRC_COLOR                = 0x0300,  ///< SRC_COLOR @since_tizen 2.4
62   ONE_MINUS_SRC_COLOR      = 0x0301,  ///< ONE_MINUS_SRC_COLOR @since_tizen 2.4
63   SRC_ALPHA                = 0x0302,  ///< SRC_ALPHA @since_tizen 2.4
64   ONE_MINUS_SRC_ALPHA      = 0x0303,  ///< ONE_MINUS_SRC_ALPHA @since_tizen 2.4
65   DST_ALPHA                = 0x0304,  ///< DST_ALPHA @since_tizen 2.4
66   ONE_MINUS_DST_ALPHA      = 0x0305,  ///< ONE_MINUS_DST_ALPHA @since_tizen 2.4
67   DST_COLOR                = 0x0306,  ///< DST_COLOR @since_tizen 2.4
68   ONE_MINUS_DST_COLOR      = 0x0307,  ///< ONE_MINUS_DST_COLOR @since_tizen 2.4
69   SRC_ALPHA_SATURATE       = 0x0308,  ///< SRC_ALPHA_SATURATE @since_tizen 2.4
70   CONSTANT_COLOR           = 0x8001,  ///< CONSTANT_COLOR @since_tizen 2.4
71   ONE_MINUS_CONSTANT_COLOR = 0x8002,  ///< ONE_MINUS_CONSTANT_COLOR @since_tizen 2.4
72   CONSTANT_ALPHA           = 0x8003,  ///< CONSTANT_ALPHA @since_tizen 2.4
73   ONE_MINUS_CONSTANT_ALPHA = 0x8004  ///< ONE_MINUS_CONSTANT_ALPHA @since_tizen 2.4
74 };
75
76 } // namespace BlendingFactor
77
78 /**
79  * @brief Blending Equation.
80  *
81  * @since_tizen 2.4
82  * @remarks This is an experimental feature and might not be supported in the next release.
83  * We do recommend not to use it.
84  */
85 namespace BlendingEquation
86 {
87 enum Type
88 {
89   ADD              = 0x8006,  ///< ADD @since_tizen 2.4
90   SUBTRACT         = 0x800A,  ///< SUBTRACT @since_tizen 2.4
91   REVERSE_SUBTRACT = 0x800B  ///< REVERSE_SUBTRACT @since_tizen 2.4
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__