678d03bc700fcde5f6a1e1ef871dedd344a8b4fd
[platform/core/csapi/nui.git] / Tizen.NUI / src / public / LongPressGesture.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     /// A LongPressGesture is emitted when the user holds the screen with the stated number of fingers.
16     /// Long press gesture finishes when all touches have been released.
17     /// </summary>
18     public class LongPressGesture : Gesture
19     {
20         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
21
22         internal LongPressGesture(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.LongPressGesture_SWIGUpcast(cPtr), cMemoryOwn)
23         {
24             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
25         }
26
27         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(LongPressGesture obj)
28         {
29             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
30         }
31
32         ~LongPressGesture()
33         {
34             DisposeQueue.Instance.Add(this);
35         }
36
37         public override void Dispose()
38         {
39             if (!Stage.IsInstalled())
40             {
41                 DisposeQueue.Instance.Add(this);
42                 return;
43             }
44
45             lock (this)
46             {
47                 if (swigCPtr.Handle != global::System.IntPtr.Zero)
48                 {
49                     if (swigCMemOwn)
50                     {
51                         swigCMemOwn = false;
52                         NDalicPINVOKE.delete_LongPressGesture(swigCPtr);
53                     }
54                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
55                 }
56                 global::System.GC.SuppressFinalize(this);
57                 base.Dispose();
58             }
59         }
60
61
62         public static LongPressGesture GetLongPressGestureFromPtr(global::System.IntPtr cPtr)
63         {
64             LongPressGesture ret = new LongPressGesture(cPtr, false);
65             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
66             return ret;
67         }
68
69         /// <summary>
70         /// The number of touch points in this long press gesture, i.e. the number of fingers the user had
71         /// on the screen to generate the long press gesture.
72         /// </summary>
73         public uint NumberOfTouches
74         {
75             get
76             {
77                 return numberOfTouches;
78             }
79         }
80
81         /// <summary>
82         /// This is the point, in screen coordinates, where the long press occurred.
83         /// If a multi-touch long press, then this is the centroid of all the touch points.
84         /// </summary>
85         public Vector2 ScreenPoint
86         {
87             get
88             {
89                 return screenPoint;
90             }
91         }
92
93         /// <summary>
94         /// This is the point, in local actor coordinates, where the long press occurred.
95         /// If a multi-touch long press, then this is the centroid of all the touch points.
96         /// </summary>
97         public Vector2 LocalPoint
98         {
99             get
100             {
101                 return localPoint;
102             }
103         }
104
105         /// <summary>
106         /// Constructor.
107         /// </summary>
108         /// <param name="state">The state of the gesture</param>
109         public LongPressGesture(Gesture.StateType state) : this(NDalicPINVOKE.new_LongPressGesture__SWIG_0((int)state), true)
110         {
111             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
112         }
113
114         /// <summary>
115         /// Copy constructor.
116         /// </summary>
117         /// <param name="rhs">A reference to the copied handle</param>
118         public LongPressGesture(LongPressGesture rhs) : this(NDalicPINVOKE.new_LongPressGesture__SWIG_1(LongPressGesture.getCPtr(rhs)), true)
119         {
120             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
121         }
122
123         /// <summary>
124         /// Assignment operator.
125         /// </summary>
126         /// <param name="rhs">A reference to the copied handle</param>
127         /// <returns>A reference to this</returns>
128         public LongPressGesture Assign(LongPressGesture rhs)
129         {
130             LongPressGesture ret = new LongPressGesture(NDalicPINVOKE.LongPressGesture_Assign(swigCPtr, LongPressGesture.getCPtr(rhs)), false);
131             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
132             return ret;
133         }
134
135         private uint numberOfTouches
136         {
137             set
138             {
139                 NDalicPINVOKE.LongPressGesture_numberOfTouches_set(swigCPtr, value);
140                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
141             }
142             get
143             {
144                 uint ret = NDalicPINVOKE.LongPressGesture_numberOfTouches_get(swigCPtr);
145                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
146                 return ret;
147             }
148         }
149
150         private Vector2 screenPoint
151         {
152             set
153             {
154                 NDalicPINVOKE.LongPressGesture_screenPoint_set(swigCPtr, Vector2.getCPtr(value));
155                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
156             }
157             get
158             {
159                 global::System.IntPtr cPtr = NDalicPINVOKE.LongPressGesture_screenPoint_get(swigCPtr);
160                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
161                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
162                 return ret;
163             }
164         }
165
166         private Vector2 localPoint
167         {
168             set
169             {
170                 NDalicPINVOKE.LongPressGesture_localPoint_set(swigCPtr, Vector2.getCPtr(value));
171                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
172             }
173             get
174             {
175                 global::System.IntPtr cPtr = NDalicPINVOKE.LongPressGesture_localPoint_get(swigCPtr);
176                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
177                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
178                 return ret;
179             }
180         }
181
182     }
183
184 }