[ACR-564] deprecate unused API
[platform/core/csapi/tizenfx.git] / src / ElmSharp / ElmSharp / Rect.cs
index 2f7a544..9ed36fb 100644 (file)
@@ -20,18 +20,22 @@ using System.Runtime.InteropServices;
 namespace ElmSharp
 {
     /// <summary>
-    /// The Rect is a struct that represent rectangluar space.
+    /// The Rect is a struct that represents the rectangular space.
     /// </summary>
+    /// <since_tizen> preview </since_tizen>
+    [Obsolete("This has been deprecated in API12")]
     [StructLayout(LayoutKind.Sequential)]
     public struct Rect : IEquatable<Rect>
     {
         /// <summary>
         /// Creates and initializes a new instance of the Rect class.
         /// </summary>
-        /// <param name="x">X axis value.</param>
-        /// <param name="y">Y axis value.</param>
+        /// <param name="x">X-axis value.</param>
+        /// <param name="y">Y-axis value.</param>
         /// <param name="w">Width value.</param>
         /// <param name="h">Height value.</param>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public Rect(int x, int y, int w, int h)
         {
             X = x;
@@ -39,61 +43,94 @@ namespace ElmSharp
             Width = w;
             Height = h;
         }
+
         /// <summary>
-        /// Gets or sets the position of this Rectangle on the X axis.
+        /// Gets or sets the position of this rectangle on the X-axis.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public int X { get; set; }
 
         /// <summary>
-        /// Gets or sets the position of this Rectangle on the Y axis.
+        /// Gets or sets the position of this rectangle on the Y-axis.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public int Y { get; set; }
 
         /// <summary>
-        /// Gets or sets the width of this Rectangle.
+        /// Gets or sets the width of this rectangle.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public int Width { get; set; }
 
         /// <summary>
-        /// Gets or sets the height of this Rectangle.
+        /// Gets or sets the height of this rectangle.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public int Height { get; set; }
 
         /// <summary>
-        /// Gets the position of this Rectangle on the X axis.
+        /// Gets the position of this rectangle on the X-axis.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public int Left { get { return X; } }
 
         /// <summary>
-        /// Gets the extent along the X axis.
+        /// Gets the extent along the X-axis.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public int Right { get { return X + Width; } }
 
         /// <summary>
-        /// Gets the position of this Rectangle on the Y axis.
+        /// Gets the position of this rectangle on the Y-axis.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public int Top { get { return Y; } }
 
         /// <summary>
-        /// Gets the extent along the Y axis.
+        /// Gets the extent along the Y-axis.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public int Bottom { get { return Y + Height; } }
 
         /// <summary>
-        /// Gets the Point defined by Rectangle.Left and Rectangle.Top.
+        /// Gets the point defined by Rectangle.Left and Rectangle.Top.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public Point Location { get { return new Point { X = X, Y = Y }; } }
 
         /// <summary>
-        /// Gets the extent of the Rectangle along its X and Y axis.
+        /// Gets the extent of the rectangle along its X-axis and Y-axis.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public Size Size { get { return new Size { Width = Width, Height = Height }; } }
 
+        /// <summary>
+        /// A human-readable representation of <see cref="Rect"/>.
+        /// </summary>
+        /// <returns>The string is formatted as "{{X={0} Y={1} Width={2} Height={3}}}".</returns>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public override string ToString()
         {
             return string.Format("{{X={0} Y={1} Width={2} Height={3}}}", X, Y, Width, Height);
         }
 
+        /// <summary>
+        /// Gets the hash code.
+        /// </summary>
+        /// <returns>The hash code.</returns>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public override int GetHashCode()
         {
             unchecked
@@ -106,6 +143,16 @@ namespace ElmSharp
             }
         }
 
+        /// <summary>
+        /// Indicates whether this instance and a specified object are equal.
+        /// </summary>
+        /// <param name="obj">The object to compare with the current instance.</param>
+        /// <returns>
+        /// true if the object and this instance are of the same type and represent the same value,
+        /// otherwise false.
+        /// </returns>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public override bool Equals(object obj)
         {
             if (!(obj is Rect))
@@ -114,31 +161,45 @@ namespace ElmSharp
             return Equals((Rect)obj);
         }
 
+        /// <summary>
+        /// Indicates whether this instance and a <see cref="Rect"/> object are equal.
+        /// </summary>
+        /// <param name="other">The <see cref="Rect"/> to compare with the current instance.</param>
+        /// <returns>
+        /// true if the object and this instance are of the same type and represent the same value,
+        /// otherwise, false
+        /// </returns>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public bool Equals(Rect other)
         {
             return X.Equals(other.X) && Y.Equals(other.Y) && Width.Equals(other.Width) && Height.Equals(other.Height);
         }
 
         /// <summary>
-        /// Whether the two <see cref="T:Tizen.UI.Rectangle" />s are equal.
+        /// Whether both <see cref="Rect"/>'s are equal.
         /// </summary>
-        /// <param name="r1">A <see cref="T:Tizen.UI.Rectangle" /> on the left hand side.</param>
-        /// <param name="r2">A <see cref="T:Tizen.UI.Rectangle" /> on the right hand side.</param>
-        /// <returns>True if the two <see cref="T:Tizen.UI.Rectangle" />s have equal values.</returns>
+        /// <param name="r1">A <see cref="Rect"/> on the left hand side.</param>
+        /// <param name="r2">A <see cref="Rect"/> on the right hand side.</param>
+        /// <returns>True if both <see cref="Rect"/>'s have equal values.</returns>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static bool operator ==(Rect r1, Rect r2)
         {
             return r1.Equals(r2);
         }
 
         /// <summary>
-        /// Whether two <see cref="T:Tizen.UI.Rectangle" />s are not equal.
+        /// Whether both <see cref="Rect"/>'s are not equal.
         /// </summary>
-        /// <param name="r1">A <see cref="T:Tizen.UI.Rectangle" /> on the left hand side.</param>
-        /// <param name="r2">A <see cref="T:Tizen.UI.Rectangle" /> on the right hand side.</param>
-        /// <returns>True if the two <see cref="T:Tizen.UI.Rectangle" />s do not have equal values.</returns>
+        /// <param name="r1">A <see cref="Rect"/> on the left hand side.</param>
+        /// <param name="r2">A <see cref="Rect"/> on the right hand side.</param>
+        /// <returns>True if both <see cref="Rect"/>'s do not have equal values.</returns>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static bool operator !=(Rect r1, Rect r2)
         {
             return !r1.Equals(r2);
         }
     }
-}
+}
\ No newline at end of file