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.New(0), true)
35 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
38 internal TapGesture(global::System.IntPtr cPtr, bool cMemoryOwn) : base(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
91 /// The gesture source type of touches property (read-only).
92 /// If you tap with a mouse button, this will tell you which mouse input you tapped.
93 /// Primary(Left), Secondary(Right). Tertiary(Wheel).
95 [EditorBrowsable(EditorBrowsableState.Never)]
96 public GestureSourceType SourceType
104 private uint numberOfTaps
108 Interop.TapGesture.NumberOfTapsSet(SwigCPtr, value);
109 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
113 uint ret = Interop.TapGesture.NumberOfTapsGet(SwigCPtr);
114 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
119 private uint numberOfTouches
123 Interop.TapGesture.NumberOfTouchesSet(SwigCPtr, value);
124 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
128 uint ret = Interop.TapGesture.NumberOfTouchesGet(SwigCPtr);
129 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
134 private Vector2 screenPoint
138 Interop.TapGesture.ScreenPointSet(SwigCPtr, Vector2.getCPtr(value));
139 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
143 global::System.IntPtr cPtr = Interop.TapGesture.ScreenPointGet(SwigCPtr);
144 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
145 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
150 private Vector2 localPoint
154 Interop.TapGesture.LocalPointSet(SwigCPtr, Vector2.getCPtr(value));
155 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
159 global::System.IntPtr cPtr = Interop.TapGesture.LocalPointGet(SwigCPtr);
160 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
161 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
166 private GestureSourceType sourceType
170 GestureSourceType ret = (GestureSourceType)Interop.TapGesture.SourceTypeGet(SwigCPtr);
171 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
176 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TapGesture obj)
178 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
182 /// Gets the TapGesture from the pointer.
184 /// <param name="cPtr">The pointer to cast.</param>
185 /// <returns>The TapGesture object.</returns>
186 internal static TapGesture GetTapGestureFromPtr(global::System.IntPtr cPtr)
188 TapGesture ret = new TapGesture(cPtr, false);
189 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
193 /// This will not be public opened.
194 [EditorBrowsable(EditorBrowsableState.Never)]
195 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
197 Interop.TapGesture.DeleteTapGesture(swigCPtr);
202 /// Gesture source type.
204 [EditorBrowsable(EditorBrowsableState.Never)]
205 public enum GestureSourceType
210 [EditorBrowsable(EditorBrowsableState.Never)]
215 [EditorBrowsable(EditorBrowsableState.Never)]
220 [EditorBrowsable(EditorBrowsableState.Never)]
225 [EditorBrowsable(EditorBrowsableState.Never)]