2 * Copyright (c) 2014 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.
19 #include <common/color-controller-impl.h>
22 #include <dali/integration-api/debug.h>
23 #include <dali/public-api/object/type-registry.h>
26 #include <singleton-service-impl.h>
37 Dali::ColorController ColorController::Get()
39 Dali::ColorController colorController;
41 Dali::SingletonService service( SingletonService::Get() );
44 // Check whether the singleton is already created
45 Dali::BaseHandle handle = service.GetSingleton( typeid( Dali::ColorController ) );
48 // If so, downcast the handle
49 colorController = Dali::ColorController( dynamic_cast< ColorController* >( handle.GetObjectPtr() ) );
53 colorController = Dali::ColorController( new ColorController( ) );
54 service.Register( typeid( colorController ), colorController );
58 return colorController;
62 ColorController::ColorController()
66 ColorController::~ColorController()
70 bool ColorController::RetrieveColor( const std::string& colorCode, Vector4& colorValue )
75 bool ColorController::RetrieveColor( const std::string& colorCode , Vector4& textColor, Vector4& textOutlineColor, Vector4& textShadowColor)
80 } // namespace Adaptor
82 } // namespace Internal