From ab1b9c792cdd36e99994ae3d5263135b5220c420 Mon Sep 17 00:00:00 2001 From: Heeyong Song Date: Tue, 26 Apr 2016 18:20:56 +0900 Subject: [PATCH] [widget-viewer-dali] 1. Add a privilege to some APIs 2. Add the preview image and loading text Change-Id: Ie8b388c2f3a3af463cf98608c9c3df36628a9bcc --- CMakeLists.txt | 2 + images/unknown.png | Bin 0 -> 19568 bytes internal/widget_view/widget_view_impl.cpp | 159 ++++++++++++++++++++- internal/widget_view/widget_view_impl.h | 32 ++++- public_api/widget_view/widget_view.cpp | 24 +++- public_api/widget_view/widget_view.h | 60 +++++++- .../widget_view_manager/widget_view_manager.h | 4 + 7 files changed, 270 insertions(+), 11 deletions(-) create mode 100644 images/unknown.png diff --git a/CMakeLists.txt b/CMakeLists.txt index a014ff1..bd84efc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,6 +38,7 @@ SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") SET(CMAKE_C_FLAGS_RELEASE "-O2") SET(LOCAL_PUBLIC_HEADER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/public_api) +SET(IMAGE_DIR "${TZ_SYS_SHARE}/${PROJECT_NAME}/images") ADD_DEFINITIONS("-DPKGNAME=\"${PROJECT_NAME}\"") @@ -67,4 +68,5 @@ FOREACH(flag ${LOCAL_WIDGE_VIEW_MANAGER_HEADER_LIST}) ENDFOREACH(flag) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE DESTINATION /usr/share/license RENAME "lib${PROJECT_NAME}") +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/images/unknown.png DESTINATION ${IMAGE_DIR}) diff --git a/images/unknown.png b/images/unknown.png new file mode 100644 index 0000000000000000000000000000000000000000..535db6063ad8e69e355c808507480f46ab0ea5bc GIT binary patch literal 19568 zcmW(+WmFu^7F;B-xWi(>C4}Ja?(VL^-GaM&2<{f#f_%8UO9<}n4#D9~-k#l=KYM0+ zx^LfGx2h&mNkI|?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HwR<&9`^3{vKmE%1`1ntP!C-X-Ldgy0g;r$%r7HjP z>geL-k@7NcywX`!CHrDAGw0A!sl-!VzX#ytD2Y5R=IlV+)PD`cdRm*6}y%<&cOXN~{X>R_EJfvvb z_QMV_pB0g~495L0QV{xQToTSH#e!hQYv^=Vz#zxw2pPkuL-%Y7o3%Y7#p3|1ZV zfxx8IHe{|-6+?UJT{#%8N<5#+qb4GDe*e7x6Q%Ti0QX#e`Q>{=VtScL(~aqW38zk_ ztIo#xEQ`4f8#ZJKA$L6W)KlLtl}hg}l}gv^x_)^e5O7QXL|?9IsSgo^OxNQ{4qB@k zXR1_)SWx9;BYYXa0~@(G zn>TkB3WX0A3WY0mT|dw7_q%qk3|3TKs;6_F$hlRrPnvH$Q^Ltc0DyY|JOtpm_3PI& zaRELrr^FxY?)$%jsMFa{UO@s?7qxZk*7X7SuCD9f-Mo489LusUFBA&z0`LyL5WJYw z=HwKkN; #include #include +#include namespace Dali { @@ -38,6 +39,8 @@ namespace Internal namespace { +#define WIDGET_VIEW_RESOURCE_DEFAULT_IMG "/widget_viewer_dali/images/unknown.png" + #if defined(DEBUG_ENABLED) Integration::Log::Filter* gWidgetViewLogging = Integration::Log::Filter::New( Debug::Verbose, false, "LOG_WIDGET_VIEW" ); #endif @@ -70,6 +73,8 @@ WidgetView::WidgetView() mHeight( 0 ), mPid( 0 ), mPeriod( 0.0 ), + mPreviewEnabled( true ), + mStateTextEnabled( true ), mPermanentDelete( true ) { } @@ -85,6 +90,8 @@ WidgetView::WidgetView( const std::string& widgetId, const std::string& contentI mHeight( height ), mPid( 0 ), mPeriod( period ), + mPreviewEnabled( true ), + mStateTextEnabled( true ), mPermanentDelete( true ) { } @@ -117,13 +124,64 @@ const std::string& WidgetView::GetInstanceId() const return mInstanceId; } -const std::string& WidgetView::GetContentInfo() const +const std::string& WidgetView::GetContentInfo() { + widget_instance_h instance; + bundle* bundle = NULL; + bundle_raw* contentInfo = NULL; + int contentLength = 0; + + mContentInfo.clear(); + + if( mWidgetId.empty() || mInstanceId.empty() ) + { + DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "WidgetView::GetContentInfo: Widget id (%s) or instance id (%s) is invalid.\n", mWidgetId.c_str(), mInstanceId.c_str() ); + return mContentInfo; + } + + instance = widget_instance_get_instance( mWidgetId.c_str(), mInstanceId.c_str() ); + if( !instance ) + { + DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "WidgetView::GetContentInfo: widget_instance_get_instance is failed. [%s]\n", mInstanceId.c_str() ); + return mContentInfo; + } + + if( widget_instance_get_content( instance, &bundle ) < 0 ) + { + DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "WidgetView::GetContentInfo: Failed to get content of widget. [%s]\n", mInstanceId.c_str() ); + return mContentInfo; + } + + if( !bundle ) + { + DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "WidgetView::GetContentInfo: Cotent of widget [%s] is invalid.\n", mInstanceId.c_str() ); + return mContentInfo; + } + + if( bundle_encode( bundle, &contentInfo, &contentLength ) < 0 ) + { + DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "WidgetView::GetContentInfo: bundle_encode is failed. [%s]\n", mInstanceId.c_str() ); + return mContentInfo; + } + + mContentInfo = reinterpret_cast< char* >( contentInfo ); + return mContentInfo; } -const std::string& WidgetView::GetTitle() const +const std::string& WidgetView::GetTitle() { + if( mObjectView ) + { + mTitle = mObjectView.GetTitle(); + if( mTitle.empty() ) + { + mTitle = widget_service_get_name( mWidgetId.c_str(), NULL ); + } + } + + DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "WidgetView::GetTitle: title = %s\n", mTitle.c_str() ); + return mTitle; } @@ -132,10 +190,51 @@ double WidgetView::GetPeriod() const return mPeriod; } +void WidgetView::SetPreviewEnabled( bool enabled ) +{ + mPreviewEnabled = enabled; + + if( mPreviewImage ) + { + mPreviewImage.SetVisible( enabled ); + } +} + +bool WidgetView::GetPreviewEnabled() const +{ + return mPreviewEnabled; +} + +void WidgetView::SetStateTextEnabled( bool enabled ) +{ + mStateTextEnabled = enabled; + + if( mStateText ) + { + mStateText.SetVisible( enabled ); + } +} + +bool WidgetView::GetStateTextEnabled() const +{ + return mStateTextEnabled; +} + void WidgetView::ActivateFaultedWidget() { if( mPid < 0 ) { + // Esable preview and text + if( mPreviewEnabled ) + { + mPreviewImage.SetVisible( true ); + } + + if( mStateTextEnabled ) + { + mStateText.SetVisible( true ); + } + // launch widget again mPid = widget_instance_launch( mWidgetId.c_str(), mInstanceId.c_str(), mBundle, mWidth, mHeight ); if( mPid < 0) @@ -166,9 +265,17 @@ void WidgetView::AddObjectView( Pepper::ObjectView objectView ) mObjectView.SetAnchorPoint( AnchorPoint::CENTER ); Self().Add( mObjectView ); - Self().SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::ALL_DIMENSIONS ); - mTitle = mObjectView.GetTitle(); + // Disable preview and text + if( mPreviewEnabled ) + { + mPreviewImage.SetVisible( false ); + } + + if( mStateTextEnabled ) + { + mStateText.SetVisible( false ); + } // Emit signal Dali::WidgetView::WidgetView handle( GetOwner() ); @@ -197,6 +304,9 @@ Dali::WidgetView::WidgetView::WidgetViewSignalType& WidgetView::WidgetDeletedSig void WidgetView::OnInitialize() { char* instanceId = NULL; + char* previewPath = NULL; + std::string previewImage; + widget_size_type_e sizeType; if( !mContentInfo.empty() ) { @@ -227,6 +337,47 @@ void WidgetView::OnInitialize() mInstanceId = instanceId; + // Preview image + widget_service_get_size_type( mWidth, mHeight, &sizeType ); + + previewPath = widget_service_get_preview_image_path( mWidgetId.c_str(), sizeType ); + if( previewPath ) + { + previewImage = previewPath; + free( previewPath ); + } + else + { + previewImage = tzplatform_getenv( TZ_SYS_SHARE ); + previewImage.append( WIDGET_VIEW_RESOURCE_DEFAULT_IMG ); + } + + DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "WidgetView::OnInitialize: preview image path = %s\n", previewImage.c_str() ); + + mPreviewImage = Toolkit::ImageView::New( previewImage ); + + mPreviewImage.SetParentOrigin( ParentOrigin::CENTER ); + mPreviewImage.SetAnchorPoint( AnchorPoint::CENTER ); + + if( !previewPath ) + { + mPreviewImage.SetSize( mWidth, mHeight ); + } + + Self().SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::ALL_DIMENSIONS ); + Self().Add( mPreviewImage ); + + // State text + // TODO: use po files + mStateText = Toolkit::TextLabel::New( "Loading..." ); + + mStateText.SetParentOrigin( ParentOrigin::CENTER ); + mStateText.SetAnchorPoint( AnchorPoint::CENTER ); + mStateText.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); + mStateText.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); + + mPreviewImage.Add( mStateText ); + // launch widget mPid = widget_instance_launch( mWidgetId.c_str(), instanceId, mBundle, mWidth, mHeight ); if( mPid < 0) diff --git a/internal/widget_view/widget_view_impl.h b/internal/widget_view/widget_view_impl.h index 3e33b9b..d490e07 100644 --- a/internal/widget_view/widget_view_impl.h +++ b/internal/widget_view/widget_view_impl.h @@ -23,6 +23,8 @@ // EXTERNAL INCLUDES #include +#include +#include #include #include @@ -57,12 +59,12 @@ public: /** * @copydoc Dali::WidgetView::WidgetView::GetContentInfo */ - const std::string& GetContentInfo() const; + const std::string& GetContentInfo(); /** * @copydoc Dali::WidgetView::WidgetView::GetTitle */ - const std::string& GetTitle() const; + const std::string& GetTitle(); /** * @copydoc Dali::WidgetView::WidgetView::GetPeriod @@ -70,6 +72,26 @@ public: double GetPeriod() const; /** + * @copydoc Dali::WidgetView::WidgetView::SetPreviewEnabled + */ + void SetPreviewEnabled( bool enabled ); + + /** + * @copydoc Dali::WidgetView::WidgetView::GetPreviewEnabled + */ + bool GetPreviewEnabled() const; + + /** + * @copydoc Dali::WidgetView::WidgetView::SetStateTextEnabled + */ + void SetStateTextEnabled( bool enabled ); + + /** + * @copydoc Dali::WidgetView::WidgetView::GetStateTextEnabled + */ + bool GetStateTextEnabled() const; + + /** * @copydoc Dali::WidgetView::WidgetView::ActivateFaultedWidget */ void ActivateFaultedWidget(); @@ -126,7 +148,9 @@ private: private: - Pepper::ObjectView mObjectView; + Pepper::ObjectView mObjectView; ///< Widget content + Toolkit::ImageView mPreviewImage; ///< Preview image + Toolkit::TextLabel mStateText; ///< State text std::string mWidgetId; std::string mInstanceId; @@ -140,6 +164,8 @@ private: int mPid; double mPeriod; + bool mPreviewEnabled; + bool mStateTextEnabled; bool mPermanentDelete; // Signals diff --git a/public_api/widget_view/widget_view.cpp b/public_api/widget_view/widget_view.cpp index b52ee3f..8e992b8 100644 --- a/public_api/widget_view/widget_view.cpp +++ b/public_api/widget_view/widget_view.cpp @@ -69,12 +69,12 @@ const std::string& WidgetView::GetInstanceId() const return Dali::WidgetView::GetImplementation( *this ).GetInstanceId(); } -const std::string& WidgetView::GetContentInfo() const +const std::string& WidgetView::GetContentInfo() { return Dali::WidgetView::GetImplementation( *this ).GetContentInfo(); } -const std::string& WidgetView::GetTitle() const +const std::string& WidgetView::GetTitle() { return Dali::WidgetView::GetImplementation( *this ).GetTitle(); } @@ -84,6 +84,26 @@ double WidgetView::GetPeriod() const return Dali::WidgetView::GetImplementation( *this ).GetPeriod(); } +void WidgetView::SetPreviewEnabled( bool enabled ) +{ + Dali::WidgetView::GetImplementation( *this ).SetPreviewEnabled( enabled ); +} + +bool WidgetView::GetPreviewEnabled() const +{ + return Dali::WidgetView::GetImplementation( *this ).GetPreviewEnabled(); +} + +void WidgetView::SetStateTextEnabled( bool enabled ) +{ + Dali::WidgetView::GetImplementation( *this ).SetStateTextEnabled( enabled ); +} + +bool WidgetView::GetStateTextEnabled() const +{ + return Dali::WidgetView::GetImplementation( *this ).GetStateTextEnabled(); +} + void WidgetView::ActivateFaultedWidget() { return Dali::WidgetView::GetImplementation( *this ).ActivateFaultedWidget(); diff --git a/public_api/widget_view/widget_view.h b/public_api/widget_view/widget_view.h index 4583173..5a201a0 100644 --- a/public_api/widget_view/widget_view.h +++ b/public_api/widget_view/widget_view.h @@ -51,6 +51,8 @@ public: * @brief Create widget view. * * @since_tizen 3.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/widget.viewer * @param[in] widgetId The widget id. * @param[in] contentInfo Contents that will be given to the widget instance. * @param[in] width The widget width. @@ -107,6 +109,8 @@ public: * @brief Get the id of the widget. * * @since_tizen 3.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/widget.viewer * @return The widget id on success, otherwise an empty string. */ const std::string& GetWidgetId() const; @@ -115,6 +119,8 @@ public: * @brief Get the instance id of the widget. * * @since_tizen 3.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/widget.viewer * @return The instance id on success, otherwise an empty string. */ const std::string& GetInstanceId() const; @@ -124,28 +130,74 @@ public: * This string can be used for creating contents of widget again after reboot a device or recovered from crash(abnormal status). * * @since_tizen 3.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/widget.viewer * @return The content string to be recognize content of the widget or an empty string if there is no specific content string. */ - const std::string& GetContentInfo() const; + const std::string& GetContentInfo(); /** * @brief Get the summarized string of the widget content for accessibility. * If the accessibility feature is turned on, a viewer can use this text to describe the widget. * * @since_tizen 3.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/widget.viewer * @return The title string to be used for summarizing the widget or an empty string if there is no summarized text for content of given widget. */ - const std::string& GetTitle() const; + const std::string& GetTitle(); /** * @brief Get the update period of the widget. * * @since_tizen 3.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/widget.viewer * @return The update period of the widget. */ double GetPeriod() const; /** + * @brief Sets whether to enable or disable the preview of the widget + * + * @since_tizen 3.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/widget.viewer + * @param[in] enable Whether to enable the preview of the widget or not + */ + void SetPreviewEnabled( bool enabled ); + + /** + * @brief Checks if the preview of the widget has been enabled or not. + * + * @since_tizen 3.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/widget.viewer + * @return Whether the preview of the widget is enabled + */ + bool GetPreviewEnabled() const; + + /** + * @brief Sets whether to enable or disable the state message of the widget + * + * @since_tizen 3.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/widget.viewer + * @param[in] enable Whether to enable the state message of the widget or not + */ + void SetStateTextEnabled( bool enabled ); + + /** + * @brief Checks if the state message of the widget has been enabled or not. + * + * @since_tizen 3.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/widget.viewer + * @return Whether the state message of the widget is enabled + */ + bool GetStateTextEnabled() const; + + /** * @brief Activate a widget in faulted state. * A widget in faulted state MUST be activated before adding the widget. * @@ -159,6 +211,8 @@ public: * @brief Check whether the widget is faulted. * * @since_tizen 3.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/widget.viewer * @return true for faulted state, otherwise false. */ bool IsWidgetFaulted(); @@ -167,6 +221,8 @@ public: * @brief Set the deletion mode. * * @since_tizen 3.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/widget.viewer * @param[in] permanentDelete Pass true if you want to delete this widget instance permanently, or pass false if you want to keep it and it will be re-created soon. */ void SetPermanentDelete( bool permanentDelete ); diff --git a/public_api/widget_view_manager/widget_view_manager.h b/public_api/widget_view_manager/widget_view_manager.h index 9157863..c2ccd51 100644 --- a/public_api/widget_view_manager/widget_view_manager.h +++ b/public_api/widget_view_manager/widget_view_manager.h @@ -56,6 +56,8 @@ public: * @brief Create widget view manager. * * @since_tizen 3.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/widget.viewer * @param[in] application Application class for the widget view manager. * @param[in] name Widget view manager name. It is used for socket name internally. * @return A handle to WidgetViewManager. @@ -111,6 +113,8 @@ public: * @brief Creates a new widget view object * * @since_tizen 3.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/widget.viewer * @param[in] widgetId The widget id. * @param[in] contentInfo Contents that will be given to the widget instance. * @param[in] width The widget width. -- 2.7.4