From: minho.sun Date: Thu, 6 Apr 2017 13:04:07 +0000 (+0900) Subject: [3.0] workaround to support APP_RESOURCE_PATH constants in stylesheet. X-Git-Tag: accepted/tizen/3.0/common/20170407.101133^0 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git;a=commitdiff_plain;h=e0fdd9b1f8ff47750b3ee8c7d7a03320bb660381 [3.0] workaround to support APP_RESOURCE_PATH constants in stylesheet. Workaround to support APP_RESOURCE_PATH constants in stylesheet. Signed-off-by: minho.sun Change-Id: Ie85f3cbc9d673cab5efad0106112f65f47669cbc --- diff --git a/adaptors/common/style-monitor-impl.cpp b/adaptors/common/style-monitor-impl.cpp index ca9ec8f..307a6c4 100644 --- a/adaptors/common/style-monitor-impl.cpp +++ b/adaptors/common/style-monitor-impl.cpp @@ -19,6 +19,7 @@ #include "style-monitor-impl.h" // EXTERNAL INCLUDES +#include #include #include #include @@ -156,6 +157,13 @@ void StyleMonitor::SetTheme(const std::string& path) EmitStyleChangeSignal( StyleChange::THEME_CHANGE ); } +std::string StyleMonitor::GetAppResourcePath() +{ + std::string resourcePath = ""; + resourcePath = app_get_resource_path(); + return resourcePath; +} + bool StyleMonitor::LoadThemeFile( const std::string& filename, std::string& output ) { bool retval( false ); diff --git a/adaptors/common/style-monitor-impl.h b/adaptors/common/style-monitor-impl.h index e279a31..075a377 100644 --- a/adaptors/common/style-monitor-impl.h +++ b/adaptors/common/style-monitor-impl.h @@ -98,6 +98,11 @@ public: */ bool LoadThemeFile( const std::string& filename, std::string& output ); + /** + * @copydoc Dali::StyleMonitor::GetResourcePath() + */ + std::string GetAppResourcePath(); + // Signals /** diff --git a/adaptors/devel-api/adaptor-framework/style-monitor.cpp b/adaptors/devel-api/adaptor-framework/style-monitor.cpp index 4b08a2b..c35a385 100644 --- a/adaptors/devel-api/adaptor-framework/style-monitor.cpp +++ b/adaptors/devel-api/adaptor-framework/style-monitor.cpp @@ -77,6 +77,11 @@ bool StyleMonitor::LoadThemeFile( const std::string& filename, std::string& outp return GetImplementation(*this).LoadThemeFile( filename, output ); } +std::string StyleMonitor::GetAppResourcePath() +{ + return GetImplementation(*this).GetAppResourcePath(); +} + StyleMonitor::StyleChangeSignalType& StyleMonitor::StyleChangeSignal() { return GetImplementation(*this).StyleChangeSignal(); diff --git a/adaptors/devel-api/adaptor-framework/style-monitor.h b/adaptors/devel-api/adaptor-framework/style-monitor.h index bf63048..2c03172 100644 --- a/adaptors/devel-api/adaptor-framework/style-monitor.h +++ b/adaptors/devel-api/adaptor-framework/style-monitor.h @@ -142,6 +142,12 @@ public: // Style Information */ bool LoadThemeFile( const std::string& filename, std::string& output ); + /** + * @brief Retrieves the app resource path. + * @return app resource path. + */ + std::string GetAppResourcePath(); + public: // Signals /**