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 //------------------------------------------------------------------------------
15 /// Base structure for different gestures that an application can receive.<br>
16 /// A gesture is an event that is produced from a combination of several touch events
17 /// in a particular order or within a certain time frame (e.g pinch).<br>
19 public class Gesture : global::System.IDisposable
21 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
22 protected bool swigCMemOwn;
24 internal Gesture(global::System.IntPtr cPtr, bool cMemoryOwn)
26 swigCMemOwn = cMemoryOwn;
27 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
30 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Gesture obj)
32 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
35 //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam)
37 //A Flag to check who called Dispose(). (By User or DisposeQueue)
38 private bool isDisposeQueued = false;
39 //A Flat to check if it is already disposed.
40 protected bool disposed = false;
46 isDisposeQueued = true;
47 DisposeQueue.Instance.Add(this);
53 //Throw excpetion if Dispose() is called in separate thread.
54 if (!Window.IsInstalled())
56 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
61 Dispose(DisposeTypes.Implicit);
65 Dispose(DisposeTypes.Explicit);
66 System.GC.SuppressFinalize(this);
70 protected virtual void Dispose(DisposeTypes type)
77 if(type == DisposeTypes.Explicit)
80 //Release your own managed resources here.
81 //You should release all of your own disposable objects here.
84 //Release your own unmanaged resources here.
85 //You should not access any managed member here except static instance.
86 //because the execution order of Finalizes is non-deterministic.
88 if (swigCPtr.Handle != global::System.IntPtr.Zero)
93 NDalicPINVOKE.delete_Gesture(swigCPtr);
95 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
102 /// The gesture type.
104 public Gesture.GestureType Type
113 /// The gesture state.
115 public Gesture.StateType State
124 /// The time the gesture took place.
135 /// Copy constructor.
137 /// <param name="rhs">A reference to the copied handle</param>
138 public Gesture(Gesture rhs) : this(NDalicPINVOKE.new_Gesture(Gesture.getCPtr(rhs)), true)
140 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
143 private Gesture.GestureType type
147 NDalicPINVOKE.Gesture_type_set(swigCPtr, (int)value);
148 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
152 Gesture.GestureType ret = (Gesture.GestureType)NDalicPINVOKE.Gesture_type_get(swigCPtr);
153 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
158 private Gesture.StateType state
162 NDalicPINVOKE.Gesture_state_set(swigCPtr, (int)value);
163 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
167 Gesture.StateType ret = (Gesture.StateType)NDalicPINVOKE.Gesture_state_get(swigCPtr);
168 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
177 NDalicPINVOKE.Gesture_time_set(swigCPtr, value);
178 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
182 uint ret = NDalicPINVOKE.Gesture_time_get(swigCPtr);
183 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
189 /// Enumeration for type of gesture
191 public enum GestureType
200 /// Enumeration for state of the gesture.
202 public enum StateType