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 /// <since_tizen> 3 </since_tizen>
25 public class TapGesture : Gesture
27 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
29 internal TapGesture(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TapGesture_SWIGUpcast(cPtr), cMemoryOwn)
31 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
34 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TapGesture obj)
36 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
42 /// <since_tizen> 3 </since_tizen>
43 protected override void Dispose(DisposeTypes type)
50 if(type == DisposeTypes.Explicit)
53 //Release your own managed resources here.
54 //You should release all of your own disposable objects here.
57 //Release your own unmanaged resources here.
58 //You should not access any managed member here except static instance.
59 //because the execution order of Finalizes is non-deterministic.
61 if (swigCPtr.Handle != global::System.IntPtr.Zero)
66 NDalicPINVOKE.delete_TapGesture(swigCPtr);
68 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
76 /// Gets the TapGesture from the pointer.
78 /// <param name="cPtr">The pointer to cast.</param>
79 /// <returns>The TapGesture object.</returns>
80 internal static TapGesture GetTapGestureFromPtr(global::System.IntPtr cPtr)
82 TapGesture ret = new TapGesture(cPtr, false);
83 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
88 /// The number of taps property (read-only).
90 /// <since_tizen> 3 </since_tizen>
91 public uint NumberOfTaps
100 /// The number of touches property (read-only).
102 /// <since_tizen> 3 </since_tizen>
103 public uint NumberOfTouches
107 return numberOfTouches;
112 /// The screen point property (read-only).
114 /// <since_tizen> 3 </since_tizen>
115 public Vector2 ScreenPoint
124 /// The local point property (read-only).
126 /// <since_tizen> 3 </since_tizen>
127 public Vector2 LocalPoint
136 /// Creates a TapGesture.
138 /// <since_tizen> 3 </since_tizen>
139 public TapGesture() : this(NDalicPINVOKE.new_TapGesture__SWIG_0(), true)
141 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
145 private uint numberOfTaps
149 NDalicPINVOKE.TapGesture_numberOfTaps_set(swigCPtr, value);
150 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
154 uint ret = NDalicPINVOKE.TapGesture_numberOfTaps_get(swigCPtr);
155 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
160 private uint numberOfTouches
164 NDalicPINVOKE.TapGesture_numberOfTouches_set(swigCPtr, value);
165 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
169 uint ret = NDalicPINVOKE.TapGesture_numberOfTouches_get(swigCPtr);
170 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
175 private Vector2 screenPoint
179 NDalicPINVOKE.TapGesture_screenPoint_set(swigCPtr, Vector2.getCPtr(value));
180 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
184 global::System.IntPtr cPtr = NDalicPINVOKE.TapGesture_screenPoint_get(swigCPtr);
185 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
186 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
191 private Vector2 localPoint
195 NDalicPINVOKE.TapGesture_localPoint_set(swigCPtr, Vector2.getCPtr(value));
196 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
200 global::System.IntPtr cPtr = NDalicPINVOKE.TapGesture_localPoint_get(swigCPtr);
201 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
202 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();