DALI_PROPERTY_REGISTRATION( Dali::WidgetView, WidgetView, "loadingText", MAP, LOADING_TEXT )
DALI_PROPERTY_REGISTRATION( Dali::WidgetView, WidgetView, "widgetStateFaulted", BOOLEAN, WIDGET_STATE_FAULTED )
DALI_PROPERTY_REGISTRATION( Dali::WidgetView, WidgetView, "permanentDelete", BOOLEAN, PERMANENT_DELETE )
+DALI_PROPERTY_REGISTRATION( Dali::WidgetView, WidgetView, "retryText", MAP, RETRY_TEXT )
+DALI_PROPERTY_REGISTRATION( Dali::WidgetView, WidgetView, "effect", MAP, EFFECT )
-// Internal property
-// ToDo it should be changed public property.
-const int TERMINATE_WIDGET = Dali::WidgetView::WidgetView::Property::PERMANENT_DELETE+1;
-const int RETRY_TEXT = TERMINATE_WIDGET+1;
-const int WIDGET_IMAGE = RETRY_TEXT+1;
+// Internal property for compatibility.
+const int TERMINATE_WIDGET = Dali::WidgetView::WidgetView::Property::EFFECT+1;
+const int WIDGET_IMAGE = TERMINATE_WIDGET+1;
Dali::PropertyRegistration internalProperty1( typeRegistration, "terminateWidget", TERMINATE_WIDGET, Property::BOOLEAN, Dali::WidgetView::Internal::WidgetView::SetProperty, Dali::WidgetView::Internal::WidgetView::GetProperty );
-Dali::PropertyRegistration internalProperty2( typeRegistration, "retryText", RETRY_TEXT, Property::MAP, Dali::WidgetView::Internal::WidgetView::SetProperty, Dali::WidgetView::Internal::WidgetView::GetProperty );
-Dali::PropertyRegistration internalProperty3( typeRegistration, "widgetImage", WIDGET_IMAGE, Property::MAP, Dali::WidgetView::Internal::WidgetView::SetProperty, Dali::WidgetView::Internal::WidgetView::GetProperty );
+Dali::PropertyRegistration internalProperty2( typeRegistration, "widgetImage", WIDGET_IMAGE, Property::MAP, Dali::WidgetView::Internal::WidgetView::SetProperty, Dali::WidgetView::Internal::WidgetView::GetProperty );
// Signals
DALI_SIGNAL_REGISTRATION( Dali::WidgetView, WidgetView, "widgetAdded", SIGNAL_WIDGET_ADDED )
DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "WidgetView::RemoveWidgetImage: Widget image is removed.\n" );
}
-void WidgetView::TerminateWidget()
+bool WidgetView::TerminateWidget()
{
if( !mWidgetId.empty() && !mInstanceId.empty() )
{
- widget_instance_terminate( mInstanceId.c_str() );
+ int ret = 0;
+ ret = widget_instance_terminate( mInstanceId.c_str() );
if( mPermanentDelete )
{
- widget_instance_destroy( mInstanceId.c_str() );
+ ret = widget_instance_destroy( mInstanceId.c_str() );
+ }
+
+ if( ret < 0 )
+ {
+ return false;
}
Dali::WidgetView::WidgetView handle( GetOwner() );
mInstanceId.clear();
CloseRemoteSurface();
+ return true;
}
DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "WidgetView::TerminateWidget: Widget is terminated/destroyed and deleted signal is emitted.\n" );
+ return false;
}
void WidgetView::SendWidgetEvent( int event )
}
break;
}
- case TERMINATE_WIDGET:
+ case Dali::WidgetView::WidgetView::Property::RETRY_TEXT:
{
- bool del = false;
- if( value.Get( del ) && del )
+ Property::Map map;
+
+ if( value.Get( map ) )
{
- impl.TerminateWidget();
+ impl.SetRetryTextPropertyMap( map );
}
break;
}
- case RETRY_TEXT:
+ case Dali::WidgetView::WidgetView::Property::EFFECT:
{
Property::Map map;
-
if( value.Get( map ) )
{
- impl.SetRetryTextPropertyMap( map );
+ impl.SetWidgetImagePropertyMap( map );
+ }
+ break;
+ }
+ case TERMINATE_WIDGET:
+ {
+ bool del = false;
+ if( value.Get( del ) && del )
+ {
+ impl.TerminateWidget();
}
break;
}
/**
* @brief The start and end property ranges for this control.
- * @SINCE_1_0.0
+ * @since_tizen 3.0
*/
enum PropertyRange
{
- PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, ///< @SINCE_1_0.0
- PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000, ///< Reserve property indices @SINCE_1_0.0
+ PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, ///< @since_tizen 3.0
+ PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000, ///< Reserve property indices @since_tizen 3.0
};
/**
* @brief An enumeration of properties belonging to the WidgetView class.
* @privlevel public
* @privilege %http://tizen.org/privilege/widget.viewer
- * @SINCE_1_0.0
+ * @since_tizen 3.0
*/
struct Property
{
* @brief An enumeration of properties belonging to the WidgetView class.
* @privlevel public
* @privilege %http://tizen.org/privilege/widget.viewer
- * @SINCE_1_0.0
+ * @since_tizen 3.0
*/
enum
{
/**
* @brief name "widgetId", Get the id of the widget, type string, read-only
- * @SINCE_1_0.0
+ * @since_tizen 3.0
*/
WIDGET_ID = PROPERTY_START_INDEX,
/**
* @brief name "instanceId", type string, read-only
- * @SINCE_1_0.0
+ * @since_tizen 3.0
*/
INSTANCE_ID,
/**
* @brief name "contentInfo", type string, read-only
- * @SINCE_1_0.0
+ * @since_tizen 3.0
*/
CONTENT_INFO,
/**
* @brief name "title", type string, read-only
- * @SINCE_1_0.0
+ * @since_tizen 3.0
*/
TITLE,
/**
* @brief name "updatePeriod", type float, read-only
- * @SINCE_1_0.0
+ * @since_tizen 3.0
*/
UPDATE_PERIOD,
/**
* @brief name "preview", type boolean if it is a show/hide flag, map otherwise
- * @SINCE_1_0.0
+ * @since_tizen 3.0
*/
PREVIEW,
/**
* @brief name "loadingText", type boolean if it is a show/hide flag, map otherwise
- * @SINCE_1_0.0
+ * @since_tizen 3.0
*/
LOADING_TEXT,
/**
- * @brief name "widgetStateFaulted", type boolean
- * @SINCE_1_0.0
+ * @brief name "widgetStateFaulted", type boolean, read-only
+ * @since_tizen 3.0
*/
WIDGET_STATE_FAULTED,
/**
* @brief name "permanentDelete", type boolean
- * @SINCE_1_0.0
+ * @since_tizen 3.0
*/
PERMANENT_DELETE,
+ /**
+ * @brief name "retryText", type Property::MAP
+ * @since_tizen 4.0
+ */
+ RETRY_TEXT,
+
+ /**
+ * @brief name "effect", type Property::MAP
+ * @since_tizen 4.0
+ */
+ EFFECT
+
};
};
*/
void ActivateFaultedWidget();
+ /**
+ * @brief Terminates a widget instance.
+ *
+ * @since_tizen 4.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/widget.viewer
+ * @return true on success, false otherwise.
+ */
+ bool TerminateWidget();
+
public: //Signals
typedef Signal< void ( WidgetView ) > WidgetViewSignalType; ///< WidgetView signal type @since_tizen 3.0