Revert "[4.0] Changed internal property to public-api and added public-api" 92/155792/1
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Mon, 16 Oct 2017 07:10:01 +0000 (16:10 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Mon, 16 Oct 2017 07:10:07 +0000 (16:10 +0900)
This reverts commit a3e25ea951e9c9583ff84e2c983f4b0434913765.

Change-Id: Ica7ae3fc3d13a61535c112cd3043cf09fdb2b5b1

widget_viewer_dali/internal/widget_view/widget_view_impl.cpp
widget_viewer_dali/internal/widget_view/widget_view_impl.h
widget_viewer_dali/public_api/widget_view/widget_view.cpp
widget_viewer_dali/public_api/widget_view/widget_view.h

index f34c02609d0c65efea9d9e22e2f47cc473351149..b86aac75c3f433020a846ca7c395e87d0339dcef 100644 (file)
@@ -80,15 +80,16 @@ DALI_PROPERTY_REGISTRATION( Dali::WidgetView, WidgetView, "preview", MAP, PREVIE
 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 for compatibility.
-const int TERMINATE_WIDGET = Dali::WidgetView::WidgetView::Property::EFFECT+1;
-const int WIDGET_IMAGE = TERMINATE_WIDGET+1;
+// 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;
 
 Dali::PropertyRegistration internalProperty1( typeRegistration, "terminateWidget", TERMINATE_WIDGET, Property::BOOLEAN, 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 );
+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 );
 
 // Signals
 DALI_SIGNAL_REGISTRATION( Dali::WidgetView, WidgetView, "widgetAdded", SIGNAL_WIDGET_ADDED )
@@ -540,21 +541,15 @@ void WidgetView::RemoveWidgetImage()
   DALI_LOG_INFO( gWidgetViewLogging, Debug::Verbose, "WidgetView::RemoveWidgetImage: Widget image is removed.\n" );
 }
 
-bool WidgetView::TerminateWidget()
+void WidgetView::TerminateWidget()
 {
   if( !mWidgetId.empty() && !mInstanceId.empty() )
   {
-    int ret = 0;
-    ret = widget_instance_terminate( mInstanceId.c_str() );
+    widget_instance_terminate( mInstanceId.c_str() );
 
     if( mPermanentDelete )
     {
-      ret = widget_instance_destroy( mInstanceId.c_str() );
-    }
-
-    if( ret < 0 )
-    {
-      return false;
+      widget_instance_destroy( mInstanceId.c_str() );
     }
 
     Dali::WidgetView::WidgetView handle( GetOwner() );
@@ -565,12 +560,10 @@ bool WidgetView::TerminateWidget()
     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 )
@@ -734,31 +727,22 @@ void WidgetView::SetProperty( BaseObject* object, Property::Index index, const P
         }
         break;
       }
-      case Dali::WidgetView::WidgetView::Property::RETRY_TEXT:
+      case TERMINATE_WIDGET:
       {
-        Property::Map map;
-
-        if( value.Get( map ) )
+        bool del = false;
+        if( value.Get( del ) && del )
         {
-          impl.SetRetryTextPropertyMap( map );
+          impl.TerminateWidget();
         }
         break;
       }
-      case Dali::WidgetView::WidgetView::Property::EFFECT:
+      case RETRY_TEXT:
       {
         Property::Map map;
+
         if( value.Get( map ) )
         {
-          impl.SetWidgetImagePropertyMap( map );
-        }
-        break;
-      }
-      case TERMINATE_WIDGET:
-      {
-        bool del = false;
-        if( value.Get( del ) && del )
-        {
-          impl.TerminateWidget();
+          impl.SetRetryTextPropertyMap( map );
         }
         break;
       }
index 7009bf4b5216726628ad756b9801c5bdbbc26a42..f772df04b67cb23949b0ffc95d9e7f97e24b76ed 100644 (file)
@@ -158,7 +158,7 @@ public: // Internal API
 
   void ShowRetryState( bool show );
 
-  bool TerminateWidget();
+  void TerminateWidget();
 
   void MouseIn( const Dali::TouchData& event );
 
index f05212036b43a772619901958e4b5c3f626401e8..064b7cd52644b16b0466796d32eb2fcd2c14d80c 100644 (file)
@@ -69,11 +69,6 @@ bool WidgetView::ResumeWidget()
   return Dali::WidgetView::GetImplementation( *this ).ResumeWidget();
 }
 
-bool WidgetView::TerminateWidget()
-{
-  return Dali::WidgetView::GetImplementation( *this ).TerminateWidget();
-}
-
 bool WidgetView::CancelTouchEvent()
 {
   return Dali::WidgetView::GetImplementation( *this ).CancelTouchEvent();
index 283009e21ae68ec5942e5cbbb49da1ec9ae0c838..2ac21f3b7fa95f04f7565f1b0ebdb81d1199497e 100644 (file)
@@ -59,19 +59,19 @@ public:
 
   /**
    * @brief The start and end property ranges for this control.
-   * @since_tizen 3.0
+   * @SINCE_1_0.0
    */
   enum PropertyRange
   {
-    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
+    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
   };
 
   /**
    * @brief An enumeration of properties belonging to the WidgetView class.
    * @privlevel public
    * @privilege %http://tizen.org/privilege/widget.viewer
-   * @since_tizen 3.0
+   * @SINCE_1_0.0
    */
   struct Property
   {
@@ -79,7 +79,7 @@ public:
      * @brief An enumeration of properties belonging to the WidgetView class.
      * @privlevel public
      * @privilege %http://tizen.org/privilege/widget.viewer
-     * @since_tizen 3.0
+     * @SINCE_1_0.0
      */
     enum
     {
@@ -87,70 +87,58 @@ public:
 
       /**
        * @brief name "widgetId", Get the id of the widget, type string, read-only
-       * @since_tizen 3.0
+       * @SINCE_1_0.0
        */
       WIDGET_ID = PROPERTY_START_INDEX,
 
       /**
        * @brief name "instanceId", type string, read-only
-       * @since_tizen 3.0
+       * @SINCE_1_0.0
        */
       INSTANCE_ID,
 
       /**
        * @brief name "contentInfo", type string, read-only
-       * @since_tizen 3.0
+       * @SINCE_1_0.0
        */
       CONTENT_INFO,
 
       /**
        * @brief name "title", type string, read-only
-       * @since_tizen 3.0
+       * @SINCE_1_0.0
        */
       TITLE,
 
       /**
        * @brief name "updatePeriod", type float, read-only
-       * @since_tizen 3.0
+       * @SINCE_1_0.0
        */
       UPDATE_PERIOD,
 
       /**
        * @brief name "preview", type boolean if it is a show/hide flag, map otherwise
-       * @since_tizen 3.0
+       * @SINCE_1_0.0
        */
       PREVIEW,
 
       /**
        * @brief name "loadingText", type boolean if it is a show/hide flag, map otherwise
-       * @since_tizen 3.0
+       * @SINCE_1_0.0
        */
       LOADING_TEXT,
 
       /**
-       * @brief name "widgetStateFaulted", type boolean, read-only
-       * @since_tizen 3.0
+       * @brief name "widgetStateFaulted", type boolean
+       * @SINCE_1_0.0
        */
       WIDGET_STATE_FAULTED,
 
       /**
        * @brief name "permanentDelete", type boolean
-       * @since_tizen 3.0
+       * @SINCE_1_0.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
-
     };
   };
 
@@ -255,16 +243,6 @@ public:
    */
   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