Merge "Add comments for API reference Change Assign() to internal function" into...
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Radian.cs
1 //------------------------------------------------------------------------------
2 // <auto-generated />
3 //
4 // This file was automatically generated by SWIG (http://www.swig.org).
5 // Version 3.0.9
6 //
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
10
11 namespace Tizen.NUI
12 {
13
14     /// <summary>
15     /// An angle in radians.
16     /// </summary>
17     public class Radian : global::System.IDisposable
18     {
19         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
20         protected bool swigCMemOwn;
21
22         internal Radian(global::System.IntPtr cPtr, bool cMemoryOwn)
23         {
24             swigCMemOwn = cMemoryOwn;
25             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
26         }
27
28         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Radian obj)
29         {
30             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
31         }
32
33         ~Radian()
34         {
35             DisposeQueue.Instance.Add(this);
36         }
37
38         public virtual void Dispose()
39         {
40             if (!Stage.IsInstalled())
41             {
42                 DisposeQueue.Instance.Add(this);
43                 return;
44             }
45
46             lock (this)
47             {
48                 if (swigCPtr.Handle != global::System.IntPtr.Zero)
49                 {
50                     if (swigCMemOwn)
51                     {
52                         swigCMemOwn = false;
53                         NDalicPINVOKE.delete_Radian(swigCPtr);
54                     }
55                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
56                 }
57                 global::System.GC.SuppressFinalize(this);
58             }
59         }
60
61
62         /// <summary>
63         /// Default constructor, initializes to 0.
64         /// </summary>
65         public Radian() : this(NDalicPINVOKE.new_Radian__SWIG_0(), true)
66         {
67             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
68         }
69
70         /// <summary>
71         /// Creates an angle in radians.
72         /// </summary>
73         /// <param name="value">The initial value in radians</param>
74         public Radian(float value) : this(NDalicPINVOKE.new_Radian__SWIG_1(value), true)
75         {
76             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
77         }
78
79         /// <summary>
80         /// Creates an angle in radians from an angle in degrees.
81         /// </summary>
82         /// <param name="degree">The initial value in degrees</param>
83         public Radian(Degree degree) : this(NDalicPINVOKE.new_Radian__SWIG_2(Degree.getCPtr(degree)), true)
84         {
85             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
86         }
87
88         /// <summary>
89         /// Assigns an angle from a float value.
90         /// </summary>
91         /// <param name="value">Float value in radians</param>
92         /// <returns>A reference to this</returns>
93         internal Radian Assign(float value)
94         {
95             Radian ret = new Radian(NDalicPINVOKE.Radian_Assign__SWIG_0(swigCPtr, value), false);
96             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
97             return ret;
98         }
99
100         /// <summary>
101         /// Assigns an angle from a Degree value.
102         /// </summary>
103         /// <param name="degree">The value in degrees</param>
104         /// <returns>A reference to this</returns>
105         internal Radian Assign(Degree degree)
106         {
107             Radian ret = new Radian(NDalicPINVOKE.Radian_Assign__SWIG_1(swigCPtr, Degree.getCPtr(degree)), false);
108             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
109             return ret;
110         }
111
112         /// <summary>
113         /// Conversion to float.
114         /// </summary>
115         /// <returns>The float value of this Radian</returns>
116         public float ConvertToFloat()
117         {
118             float ret = NDalicPINVOKE.Radian_ConvertToFloat(swigCPtr);
119             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
120             return ret;
121         }
122
123         /// <summary>
124         /// The value in radians
125         /// </summary>
126         public float radian
127         {
128             set
129             {
130                 NDalicPINVOKE.Radian_radian_set(swigCPtr, value);
131                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
132             }
133             get
134             {
135                 float ret = NDalicPINVOKE.Radian_radian_get(swigCPtr);
136                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
137                 return ret;
138             }
139         }
140
141     }
142
143 }