Merge branch 'devel/master' into sandbox/dkdk/tizen
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / color-controller-plugin.h
1 #ifndef DALI_COLOR_CONTROLLER_PLUGIN_H
2 #define DALI_COLOR_CONTROLLER_PLUGIN_H
3
4 /*
5  * Copyright (c) 2020 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 // EXTERNAL INCLUDES
22 #include <cstdlib>
23
24 namespace Dali
25 {
26 /**
27  * @brief ColorControllerPlugin is an abstract interface, used by dali-adaptor to access Color Controller plugin.
28  * A concrete implementation must be created for each platform and provided as dynamic library.
29  */
30 class ColorControllerPlugin
31 {
32 public:
33   /**
34    * @brief Constructor.
35    */
36   ColorControllerPlugin()
37   {
38   }
39
40   /**
41    * @brief Destructor.
42    */
43   virtual ~ColorControllerPlugin()
44   {
45   }
46
47   /**
48    * @brief Retrieve the RGBA value by given the color code.
49    *
50    * @param[in] colorCode The color code string.
51    * @param[out] colorValue The RGBA color
52    * @return true if the color code exists, otherwise false
53    */
54   virtual bool RetrieveColor(const std::string& colorCode, Vector4& colorValue) const = 0;
55
56   /**
57    * @brief Retrieve the RGBA value by given the color code.
58    *
59    * @param[in] colorCode The color code string.
60    * @param[out] textColor The text color.
61    * @param[out] textOutlineColor The text outline color.
62    * @param[out] textShadowColor The text shadow color.
63    * @return true if the color code exists, otherwise false
64    */
65   virtual bool RetrieveColor(const std::string& colorCode, Vector4& textColor, Vector4& textOutlineColor, Vector4& textShadowColor) const = 0;
66 };
67
68 } // namespace Dali
69
70 #endif // DALI_COLOR_CONTROLLER_PLUGIN_H