Raise SceneCreated signal with stage.
[platform/core/uifw/dali-adaptor.git] / adaptors / common / color-controller-impl.h
1 #ifndef __DALI_INTERNAL_COLOR_CONTROLLER_H__
2 #define __DALI_INTERNAL_COLOR_CONTROLLER_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 #include <dali/public-api/object/base-object.h>
22 #include <color-controller.h>
23
24 namespace Dali
25 {
26
27 namespace Internal
28 {
29
30 namespace Adaptor
31 {
32
33 /**
34  * Implementation of ColorController
35  */
36 class ColorController : public BaseObject
37 {
38 public:
39
40   /**
41    * Constructor.
42    */
43   ColorController();
44
45   /**
46    * @copydoc Dali::ColorController::Get()
47    */
48   static Dali::ColorController Get();
49
50   /**
51    * @copydoc Dali::ColorController::RetrieveColor(const std::string&, Vector4&)
52    */
53   bool RetrieveColor( const std::string& colorCode, Vector4& colorValue );
54
55   /**
56    *copydoc Dali::ColorController::RetrieveColor(const std::string&, Vector4&, Vector4&, Vector4&)
57    */
58   bool RetrieveColor( const std::string& colorCode , Vector4& textColor, Vector4& textOutlineColor, Vector4& textShadowColor);
59
60 protected:
61   /**
62    * Destructor.
63    */
64   virtual ~ColorController();
65
66 };
67
68 } // namespace Adaptor
69
70 } // namespace Internal
71
72 // Additional Helpers for public-api forwarding methods
73 inline Internal::Adaptor::ColorController& GetImplementation(Dali::ColorController& controller)
74 {
75   DALI_ASSERT_ALWAYS(controller && "ColorController handle is empty");
76   BaseObject& handle = controller.GetBaseObject();
77   return static_cast<Internal::Adaptor::ColorController&>(handle);
78 }
79
80 inline const Internal::Adaptor::ColorController& GetImplementation(const Dali::ColorController& controller)
81 {
82   DALI_ASSERT_ALWAYS(controller && "ColorController handle is empty");
83   const BaseObject& handle = controller.GetBaseObject();
84   return static_cast<const Internal::Adaptor::ColorController&>(handle);
85 }
86
87 } // namespace Dali
88
89 #endif // __DALI_INTERNAL_COLOR_CONTROLLER_H__