From 0656544610876a69935c539bb65081e0974200d9 Mon Sep 17 00:00:00 2001 From: "dongsug.song" Date: Tue, 25 Jul 2017 10:43:35 +0900 Subject: [PATCH] Revert "[Tizen] Color constant value setting" This reverts commit 8d64a8211996954629765c634ecf4ab456766378. Change-Id: I67f9fce0f8dc120c7d07be18ddf5b6a266e8169a --- src/Tizen.NUI/src/public/Color.cs | 99 +++++++++++++++++++++++++++++++++++---- 1 file changed, 90 insertions(+), 9 deletions(-) diff --git a/src/Tizen.NUI/src/public/Color.cs b/src/Tizen.NUI/src/public/Color.cs index 1d3d55c..e2fae00 100755 --- a/src/Tizen.NUI/src/public/Color.cs +++ b/src/Tizen.NUI/src/public/Color.cs @@ -447,47 +447,128 @@ namespace Tizen.NUI /// /// Get black colored Color class. /// - 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; + } + } /// /// Get white colored Color class. /// - 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; + } + } /// /// Get red colored Color class. /// - 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; + } + } /// /// Get green colored Color class. /// - 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; + } + } /// /// Get blue colored Color class. /// - 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; + } + } /// /// Get yellow colored Color class. /// - 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; + } + } /// /// Get magenta colored Color class. /// - 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; + } + } /// /// Get cyan colored Color class. /// - 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; + } + } /// /// Get transparent colored Color class. /// - 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; + } + } /// /// convert Color class to Vector4 class implicitly. -- 2.7.4