59ea8c058ffbe10d579c6b947bbb395fff1aa16f
[platform/core/csapi/nui.git] / Tizen.NUI / src / public / Touch.cs
1 //------------------------------------------------------------------------------\r
2 // <auto-generated />\r
3 //\r
4 // This file was automatically generated by SWIG (http://www.swig.org).\r
5 // Version 3.0.9\r
6 //\r
7 // Do not make changes to this file unless you know what you are doing--modify\r
8 // the SWIG interface file instead.\r
9 //------------------------------------------------------------------------------\r
10 \r
11 namespace Tizen.NUI\r
12 {\r
13 \r
14     public class Touch : BaseHandle\r
15     {\r
16         private global::System.Runtime.InteropServices.HandleRef swigCPtr;\r
17 \r
18         internal Touch(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Touch_SWIGUpcast(cPtr), cMemoryOwn)\r
19         {\r
20             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);\r
21         }\r
22 \r
23         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Touch obj)\r
24         {\r
25             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;\r
26         }\r
27 \r
28         ~Touch()\r
29         {\r
30             DisposeQueue.Instance.Add(this);\r
31         }\r
32 \r
33         public override void Dispose()\r
34         {\r
35             if (!Stage.IsInstalled())\r
36             {\r
37                 DisposeQueue.Instance.Add(this);\r
38                 return;\r
39             }\r
40 \r
41             lock (this)\r
42             {\r
43                 if (swigCPtr.Handle != global::System.IntPtr.Zero)\r
44                 {\r
45                     if (swigCMemOwn)\r
46                     {\r
47                         swigCMemOwn = false;\r
48                         NDalicPINVOKE.delete_Touch(swigCPtr);\r
49                     }\r
50                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);\r
51                 }\r
52                 global::System.GC.SuppressFinalize(this);\r
53                 base.Dispose();\r
54             }\r
55         }\r
56 \r
57 \r
58         internal static Touch GetTouchFromPtr(global::System.IntPtr cPtr)\r
59         {\r
60             Touch ret = new Touch(cPtr, false);\r
61             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
62             return ret;\r
63         }\r
64 \r
65         public Touch() : this(NDalicPINVOKE.new_Touch__SWIG_0(), true)\r
66         {\r
67             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
68         }\r
69 \r
70         internal Touch(Touch other) : this(NDalicPINVOKE.new_Touch__SWIG_1(Touch.getCPtr(other)), true)\r
71         {\r
72             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
73         }\r
74 \r
75         internal Touch Assign(Touch other)\r
76         {\r
77             Touch ret = new Touch(NDalicPINVOKE.Touch_Assign(swigCPtr, Touch.getCPtr(other)), false);\r
78             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
79             return ret;\r
80         }\r
81 \r
82         public uint GetTime()\r
83         {\r
84             uint ret = NDalicPINVOKE.Touch_GetTime(swigCPtr);\r
85             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
86             return ret;\r
87         }\r
88 \r
89         public uint GetPointCount()\r
90         {\r
91             uint ret = NDalicPINVOKE.Touch_GetPointCount(swigCPtr);\r
92             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
93             return ret;\r
94         }\r
95 \r
96         public int GetDeviceId(uint point)\r
97         {\r
98             int ret = NDalicPINVOKE.Touch_GetDeviceId(swigCPtr, point);\r
99             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
100             return ret;\r
101         }\r
102 \r
103         public PointStateType GetState(uint point)\r
104         {\r
105             PointStateType ret = (PointStateType)NDalicPINVOKE.Touch_GetState(swigCPtr, point);\r
106             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
107             return ret;\r
108         }\r
109 \r
110         public Actor GetHitActor(uint point)\r
111         {\r
112             Actor ret = new Actor(NDalicPINVOKE.Touch_GetHitActor(swigCPtr, point), true);\r
113             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
114             return ret;\r
115         }\r
116 \r
117         public Vector2 GetLocalPosition(uint point)\r
118         {\r
119             Vector2 ret = new Vector2(NDalicPINVOKE.Touch_GetLocalPosition(swigCPtr, point), false);\r
120             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
121             return ret;\r
122         }\r
123 \r
124         public Vector2 GetScreenPosition(uint point)\r
125         {\r
126             Vector2 ret = new Vector2(NDalicPINVOKE.Touch_GetScreenPosition(swigCPtr, point), false);\r
127             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
128             return ret;\r
129         }\r
130 \r
131         public float GetRadius(uint point)\r
132         {\r
133             float ret = NDalicPINVOKE.Touch_GetRadius(swigCPtr, point);\r
134             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
135             return ret;\r
136         }\r
137 \r
138         public Vector2 GetEllipseRadius(uint point)\r
139         {\r
140             Vector2 ret = new Vector2(NDalicPINVOKE.Touch_GetEllipseRadius(swigCPtr, point), false);\r
141             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
142             return ret;\r
143         }\r
144 \r
145         public float GetPressure(uint point)\r
146         {\r
147             float ret = NDalicPINVOKE.Touch_GetPressure(swigCPtr, point);\r
148             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
149             return ret;\r
150         }\r
151 \r
152         internal Degree GetAngle(uint point)\r
153         {\r
154             Degree ret = new Degree(NDalicPINVOKE.Touch_GetAngle(swigCPtr, point), true);\r
155             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();\r
156             return ret;\r
157         }\r
158 \r
159     }\r
160 \r
161     public enum PointStateType\r
162     {\r
163         Started,\r
164         Finished,\r
165         Down = Started,\r
166         Up = Finished,\r
167         Motion,\r
168         Leave,\r
169         Stationary,\r
170         Interrupted\r
171     }\r
172 \r
173 }\r