Add comments, nui 0.2.31 upgrade
[platform/core/csapi/nui.git] / Tizen.NUI / src / public / Color.cs
index e9fe9da..9b19875 100755 (executable)
@@ -1,25 +1,29 @@
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
+// Copyright (c) 2017 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
+// Some have been manually changed
 
 namespace Tizen.NUI
 {
 
     using System;
 
+    /// <summary>
+    /// Color class
+    /// </summary>
     public class Color : global::System.IDisposable
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
@@ -41,6 +45,9 @@ namespace Tizen.NUI
             DisposeQueue.Instance.Add(this);
         }
 
+        /// <summary>
+        /// To make Color instance be disposed.
+        /// </summary>
         public virtual void Dispose()
         {
             if (!Stage.IsInstalled())
@@ -64,43 +71,65 @@ namespace Tizen.NUI
             }
         }
 
-
+        /// <summary>
+        /// Addition operator.
+        /// </summary>
+        /// <param name="arg1">First value</param>
+        /// <param name="arg2">Second value</param>
+        /// <returns>A Color containing the result of the addition</returns>
         public static Color operator +(Color arg1, Color arg2)
         {
             return arg1.Add(arg2);
         }
 
+        /// <summary>
+        /// Subtraction operator.
+        /// </summary>
+        /// <param name="arg1">First value</param>
+        /// <param name="arg2">Second value</param>
+        /// <returns>A Color containing the result of the subtraction</returns>
         public static Color operator -(Color arg1, Color arg2)
         {
             return arg1.Subtract(arg2);
         }
 
+        /// <summary>
+        /// Unary negation operator.
+        /// </summary>
+        /// <param name="arg1">Target Value</param>
+        /// <returns>A Color containg the negation</returns>
         public static Color operator -(Color arg1)
         {
             return arg1.Subtract();
         }
 
+        /// <summary>
+        /// Multiplication operator.
+        /// </summary>
+        /// <param name="arg1">First Value</param>
+        /// <param name="arg2">Second Value</param>
+        /// <returns>A Color containing the result of the multiplication</returns>
         public static Color operator *(Color arg1, Color arg2)
         {
             return arg1.Multiply(arg2);
         }
 
-        public static Color operator *(Color arg1, float arg2)
-        {
-            return arg1.Multiply(arg2);
-        }
-
+        /// <summary>
+        /// Division operator.
+        /// </summary>
+        /// <param name="arg1">First Value</param>
+        /// <param name="arg2">Second Value</param>
+        /// <returns>A Color containing the result of the division</returns>
         public static Color operator /(Color arg1, Color arg2)
         {
             return arg1.Divide(arg2);
         }
 
-        public static Color operator /(Color arg1, float arg2)
-        {
-            return arg1.Divide(arg2);
-        }
-
-
+        /// <summary>
+        /// Array subscript operator overload.
+        /// </summary>
+        /// <param name="index">Subscript index</param>
+        /// <returns>The float at the given index</returns>
         public float this[uint index]
         {
             get
@@ -109,24 +138,38 @@ namespace Tizen.NUI
             }
         }
 
-        public static Color GetColorFromPtr(global::System.IntPtr cPtr)
+        internal static Color GetColorFromPtr(global::System.IntPtr cPtr)
         {
             Color ret = new Color(cPtr, false);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
 
-
+        /// <summary>
+        /// Default constructor
+        /// </summary>
         public Color() : this(NDalicPINVOKE.new_Vector4__SWIG_0(), true)
         {
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
+
+        /// <summary>
+        /// Constructor.
+        /// </summary>
+        /// <param name="r">red component</param>
+        /// <param name="g">green component</param>
+        /// <param name="b">blue component</param>
+        /// <param name="a">alpha component</param>
         public Color(float r, float g, float b, float a) : this(NDalicPINVOKE.new_Vector4__SWIG_1(r, g, b, a), true)
         {
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
+        /// <summary>
+        /// Conversion constructor from an array of four floats.
+        /// </summary>
+        /// <param name="array">array Array of R,G,B,A</param>
         public Color(float[] array) : this(NDalicPINVOKE.new_Vector4__SWIG_2(array), true)
         {
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
@@ -167,13 +210,6 @@ namespace Tizen.NUI
             return ret;
         }
 
-        private Color Multiply(float rhs)
-        {
-            Color ret = new Color(NDalicPINVOKE.Vector4_Multiply__SWIG_1(swigCPtr, rhs), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
         private Color MultiplyAssign(Color rhs)
         {
             Color ret = new Color(NDalicPINVOKE.Vector4_MultiplyAssign__SWIG_0(swigCPtr, Color.getCPtr(rhs)), false);
@@ -195,12 +231,6 @@ namespace Tizen.NUI
             return ret;
         }
 
-        private Color Divide(float rhs)
-        {
-            Color ret = new Color(NDalicPINVOKE.Vector4_Divide__SWIG_1(swigCPtr, rhs), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
 
         private Color DivideAssign(Color rhs)
         {
@@ -223,6 +253,11 @@ namespace Tizen.NUI
             return ret;
         }
 
+        /// <summary>
+        /// Check if two Color classes are same.
+        /// </summary>
+        /// <param name="rhs">A Color to be compared</param>
+        /// <returns>If two Colors are are same, then true.</returns>
         public bool EqualTo(Color rhs)
         {
             bool ret = NDalicPINVOKE.Vector4_EqualTo(swigCPtr, Color.getCPtr(rhs));
@@ -233,6 +268,11 @@ namespace Tizen.NUI
             return ret;
         }
 
+        /// <summary>
+        /// Check if two Color classes are different.
+        /// </summary>
+        /// <param name="rhs">A Color to be compared</param>
+        /// <returns>If two Colors are are different, then true.</returns>
         public bool NotEqualTo(Color rhs)
         {
             bool ret = NDalicPINVOKE.Vector4_NotEqualTo(swigCPtr, Color.getCPtr(rhs));
@@ -248,6 +288,9 @@ namespace Tizen.NUI
             return ret;
         }
 
+        /// <summary>
+        /// red component
+        /// </summary>
         public float R
         {
             set
@@ -263,6 +306,9 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// green component
+        /// </summary>
         public float G
         {
             set
@@ -278,6 +324,9 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// blue component
+        /// </summary>
         public float B
         {
             set
@@ -293,6 +342,9 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// alpha component
+        /// </summary>
         public float A
         {
             set
@@ -308,6 +360,9 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// Get black colored Color class
+        /// </summary>
         public static Color Black
         {
             get
@@ -319,6 +374,9 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// Get white colored Color class
+        /// </summary>
         public static Color White
         {
             get
@@ -330,6 +388,9 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// Get red colored Color class
+        /// </summary>
         public static Color Red
         {
             get
@@ -341,6 +402,9 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// Get green colored Color class
+        /// </summary>
         public static Color Green
         {
             get
@@ -352,6 +416,9 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// Get blue colored Color class
+        /// </summary>
         public static Color Blue
         {
             get
@@ -363,6 +430,9 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// Get yellow colored Color class
+        /// </summary>
         public static Color Yellow
         {
             get
@@ -374,6 +444,9 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// Get magenta colored Color class
+        /// </summary>
         public static Color Magenta
         {
             get
@@ -385,6 +458,9 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// Get cyan colored Color class
+        /// </summary>
         public static Color Cyan
         {
             get
@@ -396,6 +472,9 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// Get transparent colored Color class
+        /// </summary>
         public static Color Transparent
         {
             get
@@ -407,11 +486,19 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// convert Color class to Vector4 class implicitly.
+        /// </summary>
+        /// <param name="color">A Color to be converted to Vector4</param>
         public static implicit operator Vector4(Color color)
         {
             return new Vector4(color.R, color.G, color.B, color.A);
         }
 
+        /// <summary>
+        /// convert Vector4 class to Color class implicitly.
+        /// </summary>
+        /// <param name="vec">A Vector4 to be converted to Color</param></param>
         public static implicit operator Color(Vector4 vec)
         {
             return new Color(vec.R, vec.G, vec.B, vec.A);