2 * Copyright(c) 2020 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.
17 using System.ComponentModel;
23 /// A TapGesture is emitted when the user taps the screen with the stated number of fingers a stated number of times.
25 /// <since_tizen> 3 </since_tizen>
26 public class TapGesture : Gesture
30 /// Creates a TapGesture.
32 /// <since_tizen> 3 </since_tizen>
33 public TapGesture() : this(Interop.TapGesture.TapGesture_New(0), true)
35 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
38 internal TapGesture(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.TapGesture.TapGesture_SWIGUpcast(cPtr), cMemoryOwn)
43 /// The number of taps property (read-only).
45 /// <since_tizen> 3 </since_tizen>
46 public uint NumberOfTaps
55 /// The number of touches property (read-only).
57 /// <since_tizen> 3 </since_tizen>
58 public uint NumberOfTouches
62 return numberOfTouches;
67 /// The screen point property (read-only).
69 /// <since_tizen> 3 </since_tizen>
70 public Vector2 ScreenPoint
79 /// The local point property (read-only).
81 /// <since_tizen> 3 </since_tizen>
82 public Vector2 LocalPoint
90 private uint numberOfTaps
94 Interop.TapGesture.TapGesture_numberOfTaps_set(swigCPtr, value);
95 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
99 uint ret = Interop.TapGesture.TapGesture_numberOfTaps_get(swigCPtr);
100 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
105 private uint numberOfTouches
109 Interop.TapGesture.TapGesture_numberOfTouches_set(swigCPtr, value);
110 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
114 uint ret = Interop.TapGesture.TapGesture_numberOfTouches_get(swigCPtr);
115 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
120 private Vector2 screenPoint
124 Interop.TapGesture.TapGesture_screenPoint_set(swigCPtr, Vector2.getCPtr(value));
125 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
129 global::System.IntPtr cPtr = Interop.TapGesture.TapGesture_screenPoint_get(swigCPtr);
130 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
131 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
136 private Vector2 localPoint
140 Interop.TapGesture.TapGesture_localPoint_set(swigCPtr, Vector2.getCPtr(value));
141 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
145 global::System.IntPtr cPtr = Interop.TapGesture.TapGesture_localPoint_get(swigCPtr);
146 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
147 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
152 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TapGesture obj)
154 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
158 /// Gets the TapGesture from the pointer.
160 /// <param name="cPtr">The pointer to cast.</param>
161 /// <returns>The TapGesture object.</returns>
162 internal static TapGesture GetTapGestureFromPtr(global::System.IntPtr cPtr)
164 TapGesture ret = new TapGesture(cPtr, false);
165 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
169 /// This will not be public opened.
170 [EditorBrowsable(EditorBrowsableState.Never)]
171 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
173 Interop.TapGesture.delete_TapGesture(swigCPtr);