Color Controller implementation
[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) 2019 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 /**
28  * @brief ColorControllerPlugin is an abstract interface, used by dali-adaptor to access Color Controller plugin.
29  * A concrete implementation must be created for each platform and provided as dynamic library.
30  */
31 class ColorControllerPlugin
32 {
33 public:
34
35   /**
36    * @brief Constructor.
37    */
38   ColorControllerPlugin(){}
39
40   /**
41    * @brief Destructor.
42    */
43   virtual ~ColorControllerPlugin(){}
44
45   /**
46    * @brief Retrieve the RGBA value by given the color code.
47    *
48    * @param[in] colorCode The color code string.
49    * @param[out] colorValue The RGBA color
50    * @return true if the color code exists, otherwise false
51    */
52   virtual bool RetrieveColor( const std::string& colorCode, Vector4& colorValue ) const = 0;
53
54   /**
55    * @brief Retrieve the RGBA value by given the color code.
56    *
57    * @param[in] colorCode The color code string.
58    * @param[out] textColor The text color.
59    * @param[out] textOutlineColor The text outline color.
60    * @param[out] textShadowColor The text shadow color.
61    * @return true if the color code exists, otherwise false
62    */
63   virtual bool RetrieveColor( const std::string& colorCode , Vector4& textColor, Vector4& textOutlineColor, Vector4& textShadowColor ) const = 0;
64 };
65
66 } // namespace Dali;
67
68 #endif // DALI_COLOR_CONTROLLER_PLUGIN_H