[ACR-564] deprecate unused API
[platform/core/csapi/tizenfx.git] / src / ElmSharp / ElmSharp / Color.cs
index 9b27f0f..85186ac 100644 (file)
@@ -20,8 +20,10 @@ using System.Globalization;
 namespace ElmSharp
 {
     /// <summary>
-    /// The Color is a struct to record Check's state.
+    /// The Color is a struct to record the check's state.
     /// </summary>
+    /// <since_tizen> preview </since_tizen>
+    [Obsolete("This has been deprecated in API12")]
     public struct Color
     {
         readonly int _a;
@@ -41,8 +43,10 @@ namespace ElmSharp
         /// Gets a default Color instance.
         /// </summary>
         /// <remarks>
-        /// In default Color instance,Mode type is Default,RGBA all set as -1.
+        /// In the default Color instance, the mode type is default with RGBA all set as -1.
         /// </remarks>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static Color Default
         {
             get { return new Color(-1, -1, -1, -1, Mode.Default); }
@@ -50,68 +54,82 @@ namespace ElmSharp
 
         /// <summary>
         /// Gets whether the Color instance's mode is default or not.
-        /// Return type is bool.
+        /// The return type is bool.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public bool IsDefault
         {
             get { return _mode == Mode.Default; }
         }
 
         /// <summary>
-        /// Gets A value of RGBA.
+        /// Gets the A value of RGBA.
         /// A means the Alpha in color.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public int A
         {
             get { return _a; }
         }
 
         /// <summary>
-        /// Gets R value of RGBA.
+        /// Gets the R value of RGBA.
         /// R means the Red in color.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public int R
         {
             get { return _r; }
         }
 
         /// <summary>
-        /// Gets G value of RGBA.
+        /// Gets the G value of RGBA.
         /// G means the Green in color.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public int G
         {
             get { return _g; }
         }
 
         /// <summary>
-        /// Gets B value of RGBA.
+        /// Gets the B value of RGBA.
         /// B means the Blue in color.
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public int B
         {
             get { return _b; }
         }
 
         /// <summary>
-        /// Creates and initializes a new instance of the Color class.
-        /// With RGB parameters.
+        /// Creates and initializes a new instance of the Color class
+        /// with RGB parameters.
         /// </summary>
-        /// <param name="r">Red of RGB</param>
-        /// <param name="g">Green of RGB</param>
-        /// <param name="b">Blue of RGB</param>
+        /// <param name="r">Red of RGB.</param>
+        /// <param name="g">Green of RGB.</param>
+        /// <param name="b">Blue of RGB.</param>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public Color(int r, int g, int b) : this(r, g, b, 255)
         {
         }
 
         /// <summary>
-        /// Creates and initializes a new instance of the Color class.
-        /// With RGBA parameters.
+        /// Creates and initializes a new instance of the Color class
+        /// with RGBA parameters.
         /// </summary>
-        /// <param name="r">Red of RGBA</param>
-        /// <param name="g">Green of RGBA<</param>
-        /// <param name="b">Blue of RGBA<</param>
-        /// <param name="a">Alpha of RGBA<</param>
+        /// <param name="r">Red of RGBA.</param>
+        /// <param name="g">Green of RGBA.</param>
+        /// <param name="b">Blue of RGBA.</param>
+        /// <param name="a">Alpha of RGBA.</param>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public Color(int r, int g, int b, int a) : this(r, g, b, a, Mode.Rgb)
         {
         }
@@ -132,6 +150,12 @@ namespace ElmSharp
             }
         }
 
+        /// <summary>
+        /// Returns the hash code for this instance.
+        /// </summary>
+        /// <returns>A 32-bit signed integer hash code.</returns>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public override int GetHashCode()
         {
             int hashcode = _r.GetHashCode();
@@ -141,6 +165,16 @@ namespace ElmSharp
             return hashcode;
         }
 
+        /// <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 Color)
@@ -151,32 +185,30 @@ namespace ElmSharp
         }
 
         /// <summary>
-        /// Compare whether two Color instance is same or not.
+        /// Compares whether the two Color instances are same or not.
         /// </summary>
         /// <param name="a">A Color instance.</param>
         /// <param name="b">A Color instance.</param>
-        /// <returns>The result whether two instance is same or not.
-        /// Return type is bool.If they are same, return true.
+        /// <returns>The result whether the two instances are the same or not.
+        /// Return type is bool. If they are same, return true.
         /// </returns>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static bool operator ==(Color a, Color b)
         {
-            if (ReferenceEquals(a, b))
-                return true;
-
-            if ((object)a == null || (object)b == null)
-                return false;
-
             return EqualsInner(a, b);
         }
 
         /// <summary>
-        /// Compare whether two Color instance is different or not.
+        /// Compares whether the two Color instances are different or not.
         /// </summary>
         /// <param name="a">A Color instance.</param>
         /// <param name="b">A Color instance.</param>
-        /// <returns>The result whether two instance is different or not.
-        /// Return type is bool.If they are different, return true.
+        /// <returns>The result whether the two instances are different or not.
+        /// Return type is bool. If they are different, return true.
         /// </returns>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static bool operator !=(Color a, Color b)
         {
             return !(a == b);
@@ -189,6 +221,12 @@ namespace ElmSharp
             return color1._r == color2._r && color1._g == color2._g && color1._b == color2._b && color1._a == color2._a;
         }
 
+        /// <summary>
+        /// Returns the fully qualified type name of this instance.
+        /// </summary>
+        /// <returns>The fully qualified type name.</returns>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public override string ToString()
         {
             return string.Format(CultureInfo.InvariantCulture, "[Color: R={0}, G={1}, B={2}, A={3}]", R, G, B, A);
@@ -198,30 +236,34 @@ namespace ElmSharp
         /// Gets a Color instance with a hexadecimal string parameter.
         /// </summary>
         /// <param name="hex">Hexadecimal string.</param>
-        /// <returns>New instance of Color struct.</returns>
+        /// <returns>New instance of the Color struct.</returns>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static Color FromHex(string hex)
         {
-            hex = hex.Replace("#", "");
-            switch (hex.Length)
+            string ret = hex.Replace("#", "");
+            switch (ret.Length)
             {
                 case 3: //#rgb => ffrrggbb
-                    hex = string.Format("ff{0}{1}{2}{3}{4}{5}", hex[0], hex[0], hex[1], hex[1], hex[2], hex[2]);
+                    ret = string.Format("ff{0}{1}{2}{3}{4}{5}", ret[0], ret[0], ret[1], ret[1], ret[2], ret[2]);
                     break;
                 case 4: //#argb => aarrggbb
-                    hex = string.Format("{0}{1}{2}{3}{4}{5}{6}{7}", hex[0], hex[0], hex[1], hex[1], hex[2], hex[2], hex[3], hex[3]);
+                    ret = string.Format("{0}{1}{2}{3}{4}{5}{6}{7}", ret[0], ret[0], ret[1], ret[1], ret[2], ret[2], ret[3], ret[3]);
                     break;
                 case 6: //#rrggbb => ffrrggbb
-                    hex = string.Format("ff{0}", hex);
+                    ret = string.Format("ff{0}", ret);
                     break;
             }
-            return FromUint(Convert.ToUInt32(hex.Replace("#", ""), 16));
+            return FromUint(Convert.ToUInt32(ret.Replace("#", ""), 16));
         }
 
         /// <summary>
-        /// Gets a Color instance with a Unsigned integer parameter.
+        /// Gets a Color instance with an unsigned integer parameter.
         /// </summary>
         /// <param name="argb">Unsigned integer indicates RGBA.</param>
-        /// <returns>New instance of Color struct.</returns>
+        /// <returns>New instance of the Color struct.</returns>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static Color FromUint(uint argb)
         {
             return FromRgba((byte)((argb & 0x00ff0000) >> 0x10), (byte)((argb & 0x0000ff00) >> 0x8), (byte)(argb & 0x000000ff), (byte)((argb & 0xff000000) >> 0x18));
@@ -230,23 +272,27 @@ namespace ElmSharp
         /// <summary>
         /// Gets a Color instance with R,G,B,A parameters.
         /// </summary>
-        /// <param name="r">Red in RGBA.</param>
-        /// <param name="g">Green in RGBA.</param>
-        /// <param name="b">Blue in RGBA.</param>
-        /// <param name="a">Alpha in RGBA.</param>
-        /// <returns>New instance of Color struct.</returns>
+        /// <param name="r">Red of RGBA.</param>
+        /// <param name="g">Green of RGBA.</param>
+        /// <param name="b">Blue of RGBA.</param>
+        /// <param name="a">Alpha of RGBA.</param>
+        /// <returns>New instance of the Color struct.</returns>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static Color FromRgba(int r, int g, int b, int a)
         {
             return new Color(r, g, b, a);
         }
 
         /// <summary>
-        /// Gets a Color instance with R,G,B,A parameters.
+        /// Gets a Color instance with R,G,B parameters.
         /// </summary>
-        /// <param name="r">Red in RGB.</param>
-        /// <param name="g">Green in RGB.</param>
-        /// <param name="b">Blue in RGB.</param>
-        /// <returns>New instance of Color struct.</returns>
+        /// <param name="r">Red of RGB.</param>
+        /// <param name="g">Green of RGB.</param>
+        /// <param name="b">Blue of RGB.</param>
+        /// <returns>New instance of the Color struct.</returns>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static Color FromRgb(int r, int g, int b)
         {
             return FromRgba(r, g, b, 255);
@@ -259,80 +305,118 @@ namespace ElmSharp
 
         #region Color Definitions
         /// <summary>
-        /// The Tansparent is a predefined Color, it's rgba value is (0, 0, 0, 0).
+        /// The Tansparent is a predefined Color instance. It's RGBA value is (0, 0, 0, 0).
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static readonly Color Transparent = FromRgba(0, 0, 0, 0);
         /// <summary>
-        /// The Aqua is a predefined Color instance, it's rgb value is (0, 255, 255).
+        /// The Aqua is a predefined Color instance. It's RGB value is (0, 255, 255).
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static readonly Color Aqua = FromRgb(0, 255, 255);
         /// <summary>
-        /// The Black is a predefined Color instance, it's rgb value is (0, 0, 0).
+        /// The Black is a predefined Color instance. It's RGB value is (0, 0, 0).
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static readonly Color Black = FromRgb(0, 0, 0);
         /// <summary>
-        /// The Blue is a predefined Color instance, it's rgb value is (0, 0, 255).
+        /// The Blue is a predefined Color instance. It's RGB value is (0, 0, 255).
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static readonly Color Blue = FromRgb(0, 0, 255);
         /// <summary>
-        /// The Fuchsia is a predefined Color instance, it's rgb value is (255, 0, 255).
+        /// The Fuchsia is a predefined Color instance. It's RGB value is (255, 0, 255).
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static readonly Color Fuchsia = FromRgb(255, 0, 255);
         /// <summary>
-        /// The Gray is a predefined Color instance, it's rgb value is (128, 128, 128).
+        /// The Gray is a predefined Color instance. It's RGB value is (128, 128, 128).
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static readonly Color Gray = FromRgb(128, 128, 128);
         /// <summary>
-        /// The Green is a predefined Color instance, it's rgb value is (0, 128, 0).
+        /// The Green is a predefined Color instance. It's RGB value is (0, 128, 0).
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static readonly Color Green = FromRgb(0, 128, 0);
         /// <summary>
-        /// The Lime is a predefined Color instance, it's rgb value is (0, 255, 0).
+        /// The Lime is a predefined Color instance. It's RGB value is (0, 255, 0).
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static readonly Color Lime = FromRgb(0, 255, 0);
         /// <summary>
-        /// The Maroon is a predefined Color instance, it's rgb value is (128, 0, 0).
+        /// The Maroon is a predefined Color instance. It's RGB value is (128, 0, 0).
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static readonly Color Maroon = FromRgb(128, 0, 0);
         /// <summary>
-        /// The Navy is a predefined Color instance, it's rgb value is (0, 0, 128).
+        /// The Navy is a predefined Color instance. It's RGB value is (0, 0, 128).
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static readonly Color Navy = FromRgb(0, 0, 128);
         /// <summary>
-        /// The Olive is a predefined Color instance, it's rgb value is (128, 128, 0).
+        /// The Olive is a predefined Color instance. It's RGB value is (128, 128, 0).
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static readonly Color Olive = FromRgb(128, 128, 0);
         /// <summary>
-        /// The Orange is a predefined Color instance, it's rgb value is (255, 165, 0).
+        /// The Orange is a predefined Color instance. It's RGB value is (255, 165, 0).
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static readonly Color Orange = FromRgb(255, 165, 0);
         /// <summary>
-        /// The Purple is a predefined Color instance, it's rgb value is (128, 0, 128).
+        /// The Purple is a predefined Color instance. It's RGB value is (128, 0, 128).
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static readonly Color Purple = FromRgb(128, 0, 128);
         /// <summary>
-        /// The Pink is a predefined Color instance, it's rgb value is (255, 102, 255).
+        /// The Pink is a predefined Color instance. It's RGB value is (255, 102, 255).
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static readonly Color Pink = FromRgb(255, 102, 255);
         /// <summary>
-        /// The Red is a predefined Color instance, it's rgb value is (255, 0, 0).
+        /// The Red is a predefined Color instance. It's RGB value is (255, 0, 0).
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static readonly Color Red = FromRgb(255, 0, 0);
         /// <summary>
-        /// The Silver is a predefined Color instance, it's rgb value is (192, 192, 192).
+        /// The Silver is a predefined Color instance. It's RGB value is (192, 192, 192).
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static readonly Color Silver = FromRgb(192, 192, 192);
         /// <summary>
-        /// The Teal is a predefined Color instance, it's rgb value is (0, 128, 128).
+        /// The Teal is a predefined Color instance. It's RGB value is (0, 128, 128).
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static readonly Color Teal = FromRgb(0, 128, 128);
         /// <summary>
-        /// The White is a predefined Color instance, it's rgb value is (255, 255, 255).
+        /// The White is a predefined Color instance. It's RGB value is (255, 255, 255).
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static readonly Color White = FromRgb(255, 255, 255);
         /// <summary>
-        /// The Yellow is a predefined Color instance, it's rgb value is (255, 255, 0).
+        /// The Yellow is a predefined Color instance. It's RGB value is (255, 255, 0).
         /// </summary>
+        /// <since_tizen> preview </since_tizen>
+        [Obsolete("This has been deprecated in API12")]
         public static readonly Color Yellow = FromRgb(255, 255, 0);
         #endregion
     }