-//------------------------------------------------------------------------------\r
-// <auto-generated />\r
-//\r
-// This file was automatically generated by SWIG (http://www.swig.org).\r
-// Version 3.0.9\r
-//\r
-// Do not make changes to this file unless you know what you are doing--modify\r
-// the SWIG interface file instead.\r
-//------------------------------------------------------------------------------\r
-\r
-namespace Tizen.NUI\r
-{\r
-\r
- public class Radian : global::System.IDisposable\r
- {\r
- private global::System.Runtime.InteropServices.HandleRef swigCPtr;\r
- protected bool swigCMemOwn;\r
-\r
- internal Radian(global::System.IntPtr cPtr, bool cMemoryOwn)\r
- {\r
- swigCMemOwn = cMemoryOwn;\r
- swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);\r
- }\r
-\r
- internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Radian obj)\r
- {\r
- return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;\r
- }\r
-\r
- ~Radian()\r
- {\r
- DisposeQueue.Instance.Add(this);\r
- }\r
-\r
- public virtual void Dispose()\r
- {\r
- if (!Stage.IsInstalled())\r
- {\r
- DisposeQueue.Instance.Add(this);\r
- return;\r
- }\r
-\r
- lock (this)\r
- {\r
- if (swigCPtr.Handle != global::System.IntPtr.Zero)\r
- {\r
- if (swigCMemOwn)\r
- {\r
- swigCMemOwn = false;\r
- NDalicPINVOKE.delete_Radian(swigCPtr);\r
- }\r
- swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);\r
- }\r
- global::System.GC.SuppressFinalize(this);\r
- }\r
- }\r
-\r
-\r
- public Radian() : this(NDalicPINVOKE.new_Radian__SWIG_0(), true)\r
- {\r
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
- }\r
-\r
- public Radian(float value) : this(NDalicPINVOKE.new_Radian__SWIG_1(value), true)\r
- {\r
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
- }\r
-\r
- public Radian(Degree degree) : this(NDalicPINVOKE.new_Radian__SWIG_2(Degree.getCPtr(degree)), true)\r
- {\r
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
- }\r
-\r
- public Radian Assign(float value)\r
- {\r
- Radian ret = new Radian(NDalicPINVOKE.Radian_Assign__SWIG_0(swigCPtr, value), false);\r
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
- return ret;\r
- }\r
-\r
- public Radian Assign(Degree degree)\r
- {\r
- Radian ret = new Radian(NDalicPINVOKE.Radian_Assign__SWIG_1(swigCPtr, Degree.getCPtr(degree)), false);\r
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
- return ret;\r
- }\r
-\r
- public float ConvertToFloat()\r
- {\r
- float ret = NDalicPINVOKE.Radian_ConvertToFloat(swigCPtr);\r
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
- return ret;\r
- }\r
-\r
- public float radian\r
- {\r
- set\r
- {\r
- NDalicPINVOKE.Radian_radian_set(swigCPtr, value);\r
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
- }\r
- get\r
- {\r
- float ret = NDalicPINVOKE.Radian_radian_get(swigCPtr);\r
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
- return ret;\r
- }\r
- }\r
-\r
- }\r
-\r
-}\r
+/*
+ * 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.
+ *
+ */
+
+namespace Tizen.NUI
+{
+
+ /// <summary>
+ /// An angle in radians.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public class Radian : global::System.IDisposable
+ {
+ private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+ /// <summary>
+ /// swigCMemOwn
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ protected bool swigCMemOwn;
+
+ internal Radian(global::System.IntPtr cPtr, bool cMemoryOwn)
+ {
+ swigCMemOwn = cMemoryOwn;
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ }
+
+ internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Radian obj)
+ {
+ return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+ }
+
+ //A Flag to check who called Dispose(). (By User or DisposeQueue)
+ private bool isDisposeQueued = false;
+ /// <summary>
+ /// A Flat to check if it is already disposed.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ protected bool disposed = false;
+
+ /// <summary>
+ /// Dispose.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ ~Radian()
+ {
+ if(!isDisposeQueued)
+ {
+ isDisposeQueued = true;
+ DisposeQueue.Instance.Add(this);
+ }
+ }
+
+ /// <summary>
+ /// Dispose.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public void Dispose()
+ {
+ //Throw excpetion if Dispose() is called in separate thread.
+ if (!Window.IsInstalled())
+ {
+ throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
+ }
+
+ if (isDisposeQueued)
+ {
+ Dispose(DisposeTypes.Implicit);
+ }
+ else
+ {
+ Dispose(DisposeTypes.Explicit);
+ System.GC.SuppressFinalize(this);
+ }
+ }
+
+ /// <summary>
+ /// Dispose.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ protected virtual void Dispose(DisposeTypes type)
+ {
+ if (disposed)
+ {
+ return;
+ }
+
+ if(type == DisposeTypes.Explicit)
+ {
+ //Called by User
+ //Release your own managed resources here.
+ //You should release all of your own disposable objects here.
+ }
+
+ //Release your own unmanaged resources here.
+ //You should not access any managed member here except static instance.
+ //because the execution order of Finalizes is non-deterministic.
+
+ if (swigCPtr.Handle != global::System.IntPtr.Zero)
+ {
+ if (swigCMemOwn)
+ {
+ swigCMemOwn = false;
+ NDalicPINVOKE.delete_Radian(swigCPtr);
+ }
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ }
+ disposed = true;
+ }
+
+
+ /// <summary>
+ /// The default constructor, initializes to 0.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public Radian() : this(NDalicPINVOKE.new_Radian__SWIG_0(), true)
+ {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Creates an angle in radians.
+ /// </summary>
+ /// <param name="value">The initial value in radians.</param>
+ /// <since_tizen> 3 </since_tizen>
+ public Radian(float value) : this(NDalicPINVOKE.new_Radian__SWIG_1(value), true)
+ {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Creates an angle in radians from an angle in degrees.
+ /// </summary>
+ /// <param name="degree">The initial value in degrees.</param>
+ /// <since_tizen> 3 </since_tizen>
+ public Radian(Degree degree) : this(NDalicPINVOKE.new_Radian__SWIG_2(Degree.getCPtr(degree)), true)
+ {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Conversion to float.
+ /// </summary>
+ /// <returns>The float value of this radian.</returns>
+ /// <since_tizen> 3 </since_tizen>
+ public float ConvertToFloat()
+ {
+ float ret = NDalicPINVOKE.Radian_ConvertToFloat(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// The value in radians.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public float Value
+ {
+ set
+ {
+ NDalicPINVOKE.Radian_radian_set(swigCPtr, value);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ get
+ {
+ float ret = NDalicPINVOKE.Radian_radian_get(swigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+ }
+
+ }
+
+}
\ No newline at end of file