#define DALI_INTERNAL_STYLE_MONITOR_H
/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 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.
*/
// EXTERNAL INCLUDES
-#include <dali/public-api/object/ref-object.h>
-#include <dali/public-api/object/base-object.h>
#include <dali/devel-api/text-abstraction/font-client.h>
+#include <dali/public-api/object/base-object.h>
+#include <dali/public-api/object/ref-object.h>
// INTERNAL INCLUDES
#include <dali/devel-api/adaptor-framework/style-monitor.h>
namespace Dali
{
-
namespace Internal
{
-
namespace Adaptor
{
-
/**
* This holds the platform's style information.
* It provides a signal when any aspect of the default style changes on the device.
class StyleMonitor : public BaseObject
{
public:
-
// Creation & Destruction
/**
* Informs the Style Monitor that the style has changed.
* @param[in] styleChange The details of the change.
*/
- void StyleChanged( StyleChange::Type styleChange );
+ void StyleChanged(StyleChange::Type styleChange);
// Style Information
/**
+ * @copydoc Dali::StyleMonitor::EnsureFontClientCreated()
+ */
+ bool EnsureFontClientCreated();
+
+ /**
* @copydoc Dali::StyleMonitor::GetDefaultFontFamily() const
*/
std::string GetDefaultFontFamily() const;
/**
* @copydoc Dali::StyleMonitor::LoadThemeFile()
*/
- bool LoadThemeFile( const std::string& filename, std::string& output );
+ bool LoadThemeFile(const std::string& filename, std::string& output);
// Signals
Dali::StyleMonitor::StyleChangeSignalType& StyleChangeSignal();
protected:
-
/**
* Virtual Destructor.
*/
~StyleMonitor() override;
private:
-
/**
* Emit the style change signal.
* @param[in] styleChange The details of the style change
*/
- inline void EmitStyleChangeSignal( StyleChange::Type styleChange );
+ inline void EmitStyleChangeSignal(StyleChange::Type styleChange);
private:
-
Dali::StyleMonitor::StyleChangeSignalType mStyleChangeSignal; ///< Emitted when the style changes
TextAbstraction::FontClient mFontClient;
- std::string mDefaultFontFamily; ///< The system default font family
- std::string mDefaultFontStyle; ///< The default font style
- std::string mUserDefinedThemeFilePath; ///< String containing the user defined theme file path
- int mDefaultFontSize; ///< The default accessibility font size e.g. 0 is smallest
+ std::string mDefaultFontFamily; ///< The system default font family
+ std::string mDefaultFontStyle; ///< The default font style
+ std::string mUserDefinedThemeFilePath; ///< String containing the user defined theme file path
+ int mDefaultFontSize; ///< The default accessibility font size e.g. 0 is smallest
};
} // namespace Adaptor