#ifndef __DALI_TOOLKIT_INTERNAL_STYLE_MANAGER_H__
#define __DALI_TOOLKIT_INTERNAL_STYLE_MANAGER_H__
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://floralicense.org/license/
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an AS IS BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
// EXTERNAL INCLUDES
#include <string>
#include <list>
+#include <dali/public-api/common/map-wrapper.h>
// INTERNAL INCLUDES
-
#include <dali/dali.h>
#include <dali-toolkit/public-api/styling/style-manager.h>
#include <dali-toolkit/public-api/builder/builder.h>
// SIGNALS
/**
- * @copydoc Toolkit::StyleManager::ThemeChangeSignal
+ * @copydoc Toolkit::StyleManager::StyleChangeSignal
*/
- Toolkit::StyleManager::ThemeChangeSignalType& ThemeChangeSignal();
+ Toolkit::StyleManager::StyleChangeSignalType& StyleChangeSignal();
protected:
*
* @return Return the newly created builder
*/
- Toolkit::Builder CreateBuilder( const PropertyValueMap& constants );
+ Toolkit::Builder CreateBuilder( const Property::Map& constants );
/**
* @brief Load a JSON file into given builder
void ApplyStyle( Toolkit::Builder builder, Toolkit::Control control );
/**
- * @brief Emit theme changed signal
- */
- void EmitThemeChangeSignal();
-
- /**
* @brief Callback for orientation changes
*
* @param[in] orientation The orientation object
*/
void CacheBuilder( Toolkit::Builder builder, const std::string& key );
+ /**
+ * Callback for when style monitor raises a signal
+ *
+ * @param[in] styleMonitor The style monitor object
+ * @param[in] styleChange The style change data
+ */
+ void StyleMonitorChange( StyleMonitor styleMonitor, StyleChange styleChange );
+
// Undefined
StyleManager(const StyleManager&);
std::string mThemeFile; ///< The full path of the current theme file
- Toolkit::PropertyValueMap mThemeBuilderConstants; ///< Contants to give the theme builder
- Toolkit::PropertyValueMap mStyleBuilderConstants; ///< Constants specific to building styles
+ Property::Map mThemeBuilderConstants; ///< Contants to give the theme builder
+ Property::Map mStyleBuilderConstants; ///< Constants specific to building styles
BuilderMap mBuilderCache; ///< Cache of builders keyed by JSON file name
- bool mSetThemeConnection; ///< Has the callback to set the theme been set
-
// Signals
- Toolkit::StyleManager::ThemeChangeSignalType mThemeChangeSignal; ///< Emitted when the theme changes
+ Toolkit::StyleManager::StyleChangeSignalType mStyleChangeSignal; ///< Emitted when the style( theme/font ) changes
};
} // namespace Internal