CAPI removal
[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) 2014 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 DALI_IMPORT_API
25 {
26
27 namespace BlendingMode
28 {
29 /**
30  * @brief Blending mode.
31  * @see Dali::RenderableActor::SetBlendMode() and Dali::RenderableActor::GetBlendMode()
32  */
33 enum Type
34 {
35   OFF,  ///< Blending is disabled.
36   AUTO, ///< Blending is enabled if there is alpha channel.
37   ON    ///< Blending is enabled.
38 };
39
40 } //namespace BlendingMode
41
42 namespace BlendingFactor
43 {
44 /**
45  * @brief Blending Factor.
46  *
47  * @see Dali::RenderableActor::SetBlendFunc() and Dali::RenderableActor::GetBlendFunc()
48  */
49 enum Type
50 {
51   ZERO                     = 0,
52   ONE                      = 1,
53   SRC_COLOR                = 0x0300,
54   ONE_MINUS_SRC_COLOR      = 0x0301,
55   SRC_ALPHA                = 0x0302,
56   ONE_MINUS_SRC_ALPHA      = 0x0303,
57   DST_ALPHA                = 0x0304,
58   ONE_MINUS_DST_ALPHA      = 0x0305,
59   DST_COLOR                = 0x0306,
60   ONE_MINUS_DST_COLOR      = 0x0307,
61   SRC_ALPHA_SATURATE       = 0x0308,
62   CONSTANT_COLOR           = 0x8001,
63   ONE_MINUS_CONSTANT_COLOR = 0x8002,
64   CONSTANT_ALPHA           = 0x8003,
65   ONE_MINUS_CONSTANT_ALPHA = 0x8004
66 };
67
68 } // namespace BlendingFactor
69
70 namespace BlendingEquation
71 {
72 /**
73  * @brief Blending Equation.
74  *
75  * @see Dali::RenderableActor::SetBlendEquation() and Dali::RenderableActor::GetBlendEquation()
76  */
77 enum Type
78 {
79   ADD              = 0x8006,
80   SUBTRACT         = 0x800A,
81   REVERSE_SUBTRACT = 0x800B
82 };
83
84 } // namespace BlendingEquation
85
86 extern const BlendingFactor::Type   DEFAULT_BLENDING_SRC_FACTOR_RGB;    ///< BlendingFactor::SRC_ALPHA
87 extern const BlendingFactor::Type   DEFAULT_BLENDING_DEST_FACTOR_RGB;   ///< BlendingFactor::ONE_MINUS_SRC_ALPHA
88 extern const BlendingFactor::Type   DEFAULT_BLENDING_SRC_FACTOR_ALPHA;  ///< BlendingFactor::ONE
89 extern const BlendingFactor::Type   DEFAULT_BLENDING_DEST_FACTOR_ALPHA; ///< BlendingFactor::ONE_MINUS_SRC_ALPHA
90
91 extern const BlendingEquation::Type DEFAULT_BLENDING_EQUATION_RGB;     ///< BlendingEquation::ADD
92 extern const BlendingEquation::Type DEFAULT_BLENDING_EQUATION_ALPHA;   ///< BlendingEquation::ADD
93
94 } // namespace Dali
95
96 #endif // __DALI_BLENDING_H__