1 //------------------------------------------------------------------------------
4 // This file was automatically generated by SWIG (http://www.swig.org).
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
14 using Tizen.NUI.BaseComponents;
15 internal class TouchPoint : global::System.IDisposable
17 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
18 protected bool swigCMemOwn;
20 internal TouchPoint(global::System.IntPtr cPtr, bool cMemoryOwn)
22 swigCMemOwn = cMemoryOwn;
23 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
26 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TouchPoint obj)
28 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
31 //A Flag to check who called Dispose(). (By User or DisposeQueue)
32 private bool isDisposeQueued = false;
33 //A Flat to check if it is already disposed.
34 protected bool disposed = false;
41 isDisposeQueued = true;
42 DisposeQueue.Instance.Add(this);
48 //Throw excpetion if Dispose() is called in separate thread.
49 if (!Window.IsInstalled())
51 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
56 Dispose(DisposeTypes.Implicit);
60 Dispose(DisposeTypes.Explicit);
61 System.GC.SuppressFinalize(this);
65 protected virtual void Dispose(DisposeTypes type)
72 if (type == DisposeTypes.Explicit)
75 //Release your own managed resources here.
76 //You should release all of your own disposable objects here.
80 //Release your own unmanaged resources here.
81 //You should not access any managed member here except static instance.
82 //because the execution order of Finalizes is non-deterministic.
84 if (swigCPtr.Handle != global::System.IntPtr.Zero)
89 NDalicPINVOKE.delete_TouchPoint(swigCPtr);
91 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
98 public TouchPoint(int id, TouchPoint.State state, float screenX, float screenY) : this(NDalicPINVOKE.new_TouchPoint__SWIG_0(id, (int)state, screenX, screenY), true)
100 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
103 public TouchPoint(int id, TouchPoint.State state, float screenX, float screenY, float localX, float localY) : this(NDalicPINVOKE.new_TouchPoint__SWIG_1(id, (int)state, screenX, screenY, localX, localY), true)
105 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
112 NDalicPINVOKE.TouchPoint_deviceId_set(swigCPtr, value);
113 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
117 int ret = NDalicPINVOKE.TouchPoint_deviceId_get(swigCPtr);
118 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
123 public TouchPoint.State state
127 NDalicPINVOKE.TouchPoint_state_set(swigCPtr, (int)value);
128 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
132 TouchPoint.State ret = (TouchPoint.State)NDalicPINVOKE.TouchPoint_state_get(swigCPtr);
133 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
142 NDalicPINVOKE.TouchPoint_hitActor_set(swigCPtr, View.getCPtr(value));
143 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
147 global::System.IntPtr cPtr = NDalicPINVOKE.TouchPoint_hitActor_get(swigCPtr);
148 View ret = (cPtr == global::System.IntPtr.Zero) ? null : new View(cPtr, false);
149 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
158 NDalicPINVOKE.TouchPoint_local_set(swigCPtr, Vector2.getCPtr(value));
159 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
163 global::System.IntPtr cPtr = NDalicPINVOKE.TouchPoint_local_get(swigCPtr);
164 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
165 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
170 public Vector2 screen
174 NDalicPINVOKE.TouchPoint_screen_set(swigCPtr, Vector2.getCPtr(value));
175 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
179 global::System.IntPtr cPtr = NDalicPINVOKE.TouchPoint_screen_get(swigCPtr);
180 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
181 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();