[Tizen] Add obsolete attribute for deprecated apis, backward compatibility
[platform/core/csapi/nui.git] / Tizen.NUI / src / public / BaseComponents / View.cs
index d0ddfee..d220a7e 100755 (executable)
@@ -1853,7 +1853,13 @@ namespace Tizen.NUI.BaseComponents
             }
         }
 
-        [Obsolete("Please do not use! this will be internal property")]
+        /// <summary>
+        /// Returns the natural size of the view.
+        /// </summary>
+        /// <remarks>
+        /// Deriving classes stipulate the natural size and by default a view has a ZERO natural size.
+        /// </remarks>
+        [Obsolete("Please do not use! this will be deprecated, please use NaturalSize2D instead")]
         public Vector3 NaturalSize
         {
             get
@@ -1866,6 +1872,24 @@ namespace Tizen.NUI.BaseComponents
         }
 
         /// <summary>
+        /// Returns the natural size (Size2D) of the view.
+        /// </summary>
+        /// <remarks>
+        /// Deriving classes stipulate the natural size and by default a view has a ZERO natural size.
+        /// </remarks>
+        public Size2D NaturalSize2D
+        {
+            get
+            {
+                Vector3 temp = new Vector3(NDalicPINVOKE.Actor_GetNaturalSize(swigCPtr), true);
+                if (NDalicPINVOKE.SWIGPendingException.Pending)
+                    throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+
+                return new Size2D((int)temp.Width, (int)temp.Height);
+            }
+        }
+
+        /// <summary>
         /// Shows the View.
         /// </summary>
         /// <remarks>
@@ -3764,7 +3788,7 @@ namespace Tizen.NUI.BaseComponents
             }
         }
 
-        [Obsolete("Please do not use! this will be deprecated")]
+        [Obsolete("Please do not use! this will be deprecated, please use Size2D instead")]
         public Size Size
         {
             get