2 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #include <dali/devel-api/adaptor-framework/color-controller.h>
19 #include <dali/public-api/object/base-object.h>
30 class ColorController : public BaseObject
34 static Dali::ColorController Get()
36 return Dali::ColorController( new ColorController() );
39 bool RetrieveColor( const std::string& colorCode, Vector4& colorValue )
44 bool RetrieveColor( const std::string& colorCode ,
46 Vector4& textOutlineColor,
47 Vector4& textShadowColor)
52 virtual ~ColorController(){}
58 inline Internal::Adaptor::ColorController& GetImplementation(Dali::ColorController& controller)
60 DALI_ASSERT_ALWAYS(controller && "ColorController handle is empty");
61 BaseObject& handle = controller.GetBaseObject();
62 return static_cast<Internal::Adaptor::ColorController&>(handle);
65 inline const Internal::Adaptor::ColorController& GetImplementation(const Dali::ColorController& controller)
67 DALI_ASSERT_ALWAYS(controller && "ColorController handle is empty");
68 const BaseObject& handle = controller.GetBaseObject();
69 return static_cast<const Internal::Adaptor::ColorController&>(handle);
72 ColorController ColorController::Get()
74 return Internal::Adaptor::ColorController::Get();
77 ColorController::ColorController(Internal::Adaptor::ColorController* internal)
78 : BaseHandle(internal)
82 ColorController::~ColorController()
86 bool ColorController::RetrieveColor( const std::string& colorCode, Vector4& colorValue )
88 return GetImplementation(*this).RetrieveColor( colorCode, colorValue );