X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2FTizen.NUI%2Fsrc%2Fpublic%2FCommon%2FRelativeVector4.cs;h=6981ad0404bbf1185b372d6e9ad226b9a849d94f;hb=45fbc26d9cd4758d6f03c5907d5b6d1e7fd55eb3;hp=bfdde5eacbe161985fd7abaf26f299282a97373d;hpb=a1aa67f92f4a432b2138961cad23e1ce1f24b7c9;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git diff --git a/src/Tizen.NUI/src/public/Common/RelativeVector4.cs b/src/Tizen.NUI/src/public/Common/RelativeVector4.cs index bfdde5e..6981ad0 100755 --- a/src/Tizen.NUI/src/public/Common/RelativeVector4.cs +++ b/src/Tizen.NUI/src/public/Common/RelativeVector4.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 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. @@ -83,23 +83,22 @@ namespace Tizen.NUI /// The x component. /// /// - /// The setter is deprecated in API8 and will be removed in API10. Please use new RelativeVector4(...) constructor. + /// The setter is deprecated in API8 and will be removed in API10. Use new RelativeVector4(...) constructor. /// /// /// // DO NOT use like the followings! /// RelativeVector4 relativeVector4 = new RelativeVector4(); /// relativeVector4.X = 0.1f; - /// // Please USE like this + /// // USE like this /// float x = 0.1f, y = 0.5f, z = 0.9f, w = 1.0f; /// RelativeVector4 relativeVector4 = new RelativeVector4(x, y, z, w); /// /// 3 public float X { + [Obsolete("Do not use this setter, that is deprecated in API8 and will be removed in API10. Use new RelativeVector4(...) constructor")] set { - Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new RelativeVector4(...) constructor"); - Interop.Vector4.XSet(SwigCPtr, value); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -117,23 +116,22 @@ namespace Tizen.NUI /// The y component. /// /// - /// The setter is deprecated in API8 and will be removed in API10. Please use new RelativeVector4(...) constructor. + /// The setter is deprecated in API8 and will be removed in API10. Use new RelativeVector4(...) constructor. /// /// /// // DO NOT use like the followings! /// RelativeVector4 relativeVector4 = new RelativeVector4(); /// relativeVector4.Y = 0.5f; - /// // Please USE like this + /// // USE like this /// float x = 0.1f, y = 0.5f, z = 0.9f, w = 1.0f; /// RelativeVector4 relativeVector4 = new RelativeVector4(x, y, z, w); /// /// 3 public float Y { + [Obsolete("Do not use this setter, that is deprecated in API8 and will be removed in API10. Use new RelativeVector4(...) constructor")] set { - Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new RelativeVector4(...) constructor"); - Interop.Vector4.YSet(SwigCPtr, value); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -151,23 +149,22 @@ namespace Tizen.NUI /// The z component. /// /// - /// The setter is deprecated in API8 and will be removed in API10. Please use new RelativeVector4(...) constructor. + /// The setter is deprecated in API8 and will be removed in API10. Use new RelativeVector4(...) constructor. /// /// /// // DO NOT use like the followings! /// RelativeVector4 relativeVector4 = new RelativeVector4(); /// relativeVector4.Z = 0.9f; - /// // Please USE like this + /// // USE like this /// float x = 0.1f, y = 0.5f, z = 0.9f, w = 1.0f; /// RelativeVector4 relativeVector4 = new RelativeVector4(x, y, z, w); /// /// 3 public float Z { + [Obsolete("Do not use this setter, that is deprecated in API8 and will be removed in API10. Use new RelativeVector4(...) constructor")] set { - Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new RelativeVector4(...) constructor"); - Interop.Vector4.ZSet(SwigCPtr, value); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -185,23 +182,22 @@ namespace Tizen.NUI /// The w component. /// /// - /// The setter is deprecated in API8 and will be removed in API10. Please use new RelativeVector4(...) constructor. + /// The setter is deprecated in API8 and will be removed in API10. Use new RelativeVector4(...) constructor. /// /// /// // DO NOT use like the followings! /// RelativeVector4 relativeVector4 = new RelativeVector4(); /// relativeVector4.W = 1.0f; - /// // Please USE like this + /// // USE like this /// float x = 0.1f, y = 0.5f, z = 0.9f, w = 1.0f; /// RelativeVector4 relativeVector4 = new RelativeVector4(x, y, z, w); /// /// 3 public float W { + [Obsolete("Do not use this setter, that is deprecated in API8 and will be removed in API10. Use new RelativeVector4(...) constructor")] set { - Tizen.Log.Fatal("NUI", "Please do not use this setter, Deprecated in API8, will be removed in API10. please use new RelativeVector4(...) constructor"); - Interop.Vector4.WSet(SwigCPtr, value); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -298,7 +294,11 @@ namespace Tizen.NUI /// 3 public static implicit operator Vector4(RelativeVector4 relativeVector4) { - return new Vector4((float)relativeVector4?.X, (float)relativeVector4.Y, (float)relativeVector4.Z, (float)relativeVector4.W); + if (relativeVector4 == null) + { + return null; + } + return new Vector4(relativeVector4.X, relativeVector4.Y, relativeVector4.Z, relativeVector4.W); } /// @@ -306,7 +306,11 @@ namespace Tizen.NUI /// 3 public static implicit operator RelativeVector4(Vector4 vec) { - return new RelativeVector4((float)vec?.X, (float)vec.Y, (float)vec.Z, (float)vec.W); + if (vec == null) + { + return null; + } + return new RelativeVector4(vec.X, vec.Y, vec.Z, vec.W); } /// @@ -340,7 +344,7 @@ namespace Tizen.NUI } /// - /// Gets the the hash code of this RelativeVector4. + /// Gets the hash code of this RelativeVector4. /// /// The Hash Code. /// 6 @@ -384,11 +388,6 @@ namespace Tizen.NUI return ret; } - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RelativeVector4 obj) - { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr; - } - internal RelativeVector4(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn) { } @@ -450,5 +449,3 @@ namespace Tizen.NUI } } } - -