2 * Copyright(c) 2017 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
22 /// A TapGesture is emitted when the user taps the screen with the stated number of fingers a stated number of times.
24 public class TapGesture : Gesture
26 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
28 internal TapGesture(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TapGesture_SWIGUpcast(cPtr), cMemoryOwn)
30 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
33 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TapGesture obj)
35 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
41 protected override void Dispose(DisposeTypes type)
48 if(type == DisposeTypes.Explicit)
51 //Release your own managed resources here.
52 //You should release all of your own disposable objects here.
55 //Release your own unmanaged resources here.
56 //You should not access any managed member here except static instance.
57 //because the execution order of Finalizes is non-deterministic.
59 if (swigCPtr.Handle != global::System.IntPtr.Zero)
64 NDalicPINVOKE.delete_TapGesture(swigCPtr);
66 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
74 /// Gets the TapGesture from the pointer.
76 /// <param name="cPtr">The pointer to cast.</param>
77 /// <returns>The TapGesture object.</returns>
78 internal static TapGesture GetTapGestureFromPtr(global::System.IntPtr cPtr)
80 TapGesture ret = new TapGesture(cPtr, false);
81 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
86 /// The number of taps property (read-only).
88 /// <since_tizen> 3 </since_tizen>
89 public uint NumberOfTaps
98 /// The number of touches property (read-only).
100 /// <since_tizen> 3 </since_tizen>
101 public uint NumberOfTouches
105 return numberOfTouches;
110 /// The screen point property (read-only).
112 /// <since_tizen> 3 </since_tizen>
113 public Vector2 ScreenPoint
122 /// The local point property (read-only).
124 /// <since_tizen> 3 </since_tizen>
125 public Vector2 LocalPoint
134 /// Creates a TapGesture.
136 /// <since_tizen> 3 </since_tizen>
137 public TapGesture() : this(NDalicPINVOKE.new_TapGesture__SWIG_0(), true)
139 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
143 private uint numberOfTaps
147 NDalicPINVOKE.TapGesture_numberOfTaps_set(swigCPtr, value);
148 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
152 uint ret = NDalicPINVOKE.TapGesture_numberOfTaps_get(swigCPtr);
153 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
158 private uint numberOfTouches
162 NDalicPINVOKE.TapGesture_numberOfTouches_set(swigCPtr, value);
163 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
167 uint ret = NDalicPINVOKE.TapGesture_numberOfTouches_get(swigCPtr);
168 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
173 private Vector2 screenPoint
177 NDalicPINVOKE.TapGesture_screenPoint_set(swigCPtr, Vector2.getCPtr(value));
178 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
182 global::System.IntPtr cPtr = NDalicPINVOKE.TapGesture_screenPoint_get(swigCPtr);
183 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
184 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
189 private Vector2 localPoint
193 NDalicPINVOKE.TapGesture_localPoint_set(swigCPtr, Vector2.getCPtr(value));
194 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
198 global::System.IntPtr cPtr = NDalicPINVOKE.TapGesture_localPoint_get(swigCPtr);
199 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
200 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();