manual nui merge 0.2.38
[platform/core/csapi/nui.git] / Tizen.NUI / src / public / Gesture.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     /// 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>
18     /// </summary>
19     public class Gesture : global::System.IDisposable
20     {
21         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
22         protected bool swigCMemOwn;
23
24         internal Gesture(global::System.IntPtr cPtr, bool cMemoryOwn)
25         {
26             swigCMemOwn = cMemoryOwn;
27             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
28         }
29
30         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Gesture obj)
31         {
32             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
33         }
34
35         ~Gesture()
36         {
37             DisposeQueue.Instance.Add(this);
38         }
39
40         public virtual void Dispose()
41         {
42             if (!Window.IsInstalled())
43             {
44                 DisposeQueue.Instance.Add(this);
45                 return;
46             }
47
48             lock (this)
49             {
50                 if (swigCPtr.Handle != global::System.IntPtr.Zero)
51                 {
52                     if (swigCMemOwn)
53                     {
54                         swigCMemOwn = false;
55                         NDalicPINVOKE.delete_Gesture(swigCPtr);
56                     }
57                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
58                 }
59                 global::System.GC.SuppressFinalize(this);
60             }
61         }
62
63
64         /// <summary>
65         /// The gesture type.
66         /// </summary>
67         public Gesture.GestureType Type
68         {
69             get
70             {
71                 return type;
72             }
73         }
74
75         /// <summary>
76         /// The gesture state.
77         /// </summary>
78         public Gesture.StateType State
79         {
80             get
81             {
82                 return state;
83             }
84         }
85
86         /// <summary>
87         /// The time the gesture took place.
88         /// </summary>
89         public uint Time
90         {
91             get
92             {
93                 return time;
94             }
95         }
96
97         /// <summary>
98         /// Copy constructor.
99         /// </summary>
100         /// <param name="rhs">A reference to the copied handle</param>
101         public Gesture(Gesture rhs) : this(NDalicPINVOKE.new_Gesture(Gesture.getCPtr(rhs)), true)
102         {
103             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
104         }
105
106         /// <summary>
107         /// Assignment operator.
108         /// </summary>
109         /// <param name="rhs">A reference to the copied handle</param>
110         /// <returns>A reference to this</returns>
111         public Gesture Assign(Gesture rhs)
112         {
113             Gesture ret = new Gesture(NDalicPINVOKE.Gesture_Assign(swigCPtr, Gesture.getCPtr(rhs)), false);
114             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
115             return ret;
116         }
117
118         private Gesture.GestureType type
119         {
120             set
121             {
122                 NDalicPINVOKE.Gesture_type_set(swigCPtr, (int)value);
123                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
124             }
125             get
126             {
127                 Gesture.GestureType ret = (Gesture.GestureType)NDalicPINVOKE.Gesture_type_get(swigCPtr);
128                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
129                 return ret;
130             }
131         }
132
133         private Gesture.StateType state
134         {
135             set
136             {
137                 NDalicPINVOKE.Gesture_state_set(swigCPtr, (int)value);
138                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
139             }
140             get
141             {
142                 Gesture.StateType ret = (Gesture.StateType)NDalicPINVOKE.Gesture_state_get(swigCPtr);
143                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
144                 return ret;
145             }
146         }
147
148         private uint time
149         {
150             set
151             {
152                 NDalicPINVOKE.Gesture_time_set(swigCPtr, value);
153                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
154             }
155             get
156             {
157                 uint ret = NDalicPINVOKE.Gesture_time_get(swigCPtr);
158                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
159                 return ret;
160             }
161         }
162
163         /// <summary>
164         /// Enumeration for type of gesture
165         /// </summary>
166         public enum GestureType
167         {
168             Pinch = 1 << 0,
169             Pan = 1 << 1,
170             Tap = 1 << 2,
171             LongPress = 1 << 3
172         }
173
174         /// <summary>
175         /// Enumeration for state of the gesture.
176         /// </summary>
177         public enum StateType
178         {
179             Clear,
180             Started,
181             Continuing,
182             Finished,
183             Cancelled,
184             Possible
185         }
186
187     }
188
189 }