Revert "[Tizen] Color constant value setting" 10/140410/1
authordongsug.song <dongsug.song@samsung.com>
Tue, 25 Jul 2017 01:43:35 +0000 (10:43 +0900)
committerdongsug.song <dongsug.song@samsung.com>
Tue, 25 Jul 2017 01:43:39 +0000 (10:43 +0900)
This reverts commit 8d64a8211996954629765c634ecf4ab456766378.

Change-Id: I67f9fce0f8dc120c7d07be18ddf5b6a266e8169a

Tizen.NUI/src/public/Color.cs

index 1d3d55c..e2fae00 100755 (executable)
@@ -447,47 +447,128 @@ namespace Tizen.NUI
         /// <summary>
         /// Get black colored Color class.
         /// </summary>
-        public static readonly Color Black = new Color(0.0f, 0.0f, 0.0f, 1.0f);
+        public static Color Black
+        {
+            get
+            {
+                global::System.IntPtr cPtr = NDalicPINVOKE.BLACK_get();
+                Color ret = (cPtr == global::System.IntPtr.Zero) ? null : new Color(cPtr, false);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                return ret;
+            }
+        }
 
         /// <summary>
         /// Get white colored Color class.
         /// </summary>
-        public static readonly Color White = new Color(1.0f, 1.0f, 1.0f, 1.0f);
+        public static Color White
+        {
+            get
+            {
+                global::System.IntPtr cPtr = NDalicPINVOKE.WHITE_get();
+                Color ret = (cPtr == global::System.IntPtr.Zero) ? null : new Color(cPtr, false);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                return ret;
+            }
+        }
 
         /// <summary>
         /// Get red colored Color class.
         /// </summary>
-        public static readonly Color Red = new Color(1.0f, 0.0f, 0.0f, 1.0f);
+        public static Color Red
+        {
+            get
+            {
+                global::System.IntPtr cPtr = NDalicPINVOKE.RED_get();
+                Color ret = (cPtr == global::System.IntPtr.Zero) ? null : new Color(cPtr, false);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                return ret;
+            }
+        }
 
         /// <summary>
         /// Get green colored Color class.
         /// </summary>
-        public static readonly Color Green = new Color(0.0f, 1.0f, 0.0f, 1.0f);
+        public static Color Green
+        {
+            get
+            {
+                global::System.IntPtr cPtr = NDalicPINVOKE.GREEN_get();
+                Color ret = (cPtr == global::System.IntPtr.Zero) ? null : new Color(cPtr, false);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                return ret;
+            }
+        }
 
         /// <summary>
         /// Get blue colored Color class.
         /// </summary>
-        public static readonly Color Blue = new Color(0.0f, 0.0f, 1.0f, 1.0f);
+        public static Color Blue
+        {
+            get
+            {
+                global::System.IntPtr cPtr = NDalicPINVOKE.BLUE_get();
+                Color ret = (cPtr == global::System.IntPtr.Zero) ? null : new Color(cPtr, false);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                return ret;
+            }
+        }
 
         /// <summary>
         /// Get yellow colored Color class.
         /// </summary>
-        public static readonly Color Yellow = new Color(1.0f, 1.0f, 0.0f, 1.0f);
+        public static Color Yellow
+        {
+            get
+            {
+                global::System.IntPtr cPtr = NDalicPINVOKE.YELLOW_get();
+                Color ret = (cPtr == global::System.IntPtr.Zero) ? null : new Color(cPtr, false);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                return ret;
+            }
+        }
 
         /// <summary>
         /// Get magenta colored Color class.
         /// </summary>
-        public static readonly Color Magenta = new Color(1.0f, 0.0f, 1.0f, 1.0f);
+        public static Color Magenta
+        {
+            get
+            {
+                global::System.IntPtr cPtr = NDalicPINVOKE.MAGENTA_get();
+                Color ret = (cPtr == global::System.IntPtr.Zero) ? null : new Color(cPtr, false);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                return ret;
+            }
+        }
 
         /// <summary>
         /// Get cyan colored Color class.
         /// </summary>
-        public static readonly Color Cyan = new Color(0.0f, 1.0f, 1.0f, 1.0f);
+        public static Color Cyan
+        {
+            get
+            {
+                global::System.IntPtr cPtr = NDalicPINVOKE.CYAN_get();
+                Color ret = (cPtr == global::System.IntPtr.Zero) ? null : new Color(cPtr, false);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                return ret;
+            }
+        }
 
         /// <summary>
         /// Get transparent colored Color class.
         /// </summary>
-        public static readonly Color Transparent = new Color(0.0f, 0.0f, 0.0f, 0.0f);
+        public static Color Transparent
+        {
+            get
+            {
+                global::System.IntPtr cPtr = NDalicPINVOKE.TRANSPARENT_get();
+                Color ret = (cPtr == global::System.IntPtr.Zero) ? null : new Color(cPtr, false);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                return ret;
+            }
+        }
 
         /// <summary>
         /// convert Color class to Vector4 class implicitly.