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.
18 using System.ComponentModel;
24 /// A TapGesture is emitted when the user taps the screen with the stated number of fingers a stated number of times.
26 /// <since_tizen> 3 </since_tizen>
27 public class TapGesture : Gesture
31 /// Creates a TapGesture.
33 /// <since_tizen> 3 </since_tizen>
34 public TapGesture() : this(Interop.TapGesture.New(0), true)
36 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
39 internal TapGesture(global::System.IntPtr cPtr, bool cMemoryOwn) : this(cPtr, cMemoryOwn, cMemoryOwn)
43 internal TapGesture(global::System.IntPtr cPtr, bool cMemoryOwn, bool cRegister) : base(cPtr, cMemoryOwn, cRegister)
48 /// The number of taps property (read-only).
50 /// <since_tizen> 3 </since_tizen>
51 public uint NumberOfTaps
60 /// The number of touches property (read-only).
62 /// <since_tizen> 3 </since_tizen>
63 public uint NumberOfTouches
67 return numberOfTouches;
72 /// The screen point property (read-only).
74 /// <since_tizen> 3 </since_tizen>
75 public Vector2 ScreenPoint
84 /// The local point property (read-only).
86 /// <since_tizen> 3 </since_tizen>
87 public Vector2 LocalPoint
96 /// The gesture source type of touches property (read-only).
97 /// If you touch with a mouse button, this will tell you which mouse input you touched.
98 /// Primary(Left), Secondary(Right). Tertiary(Wheel).
99 /// Deprecated. This api will be deleted without notice. Please do not use it.
101 [Obsolete("This property will be deleted without notice. Please do not use it. Use Gesture.SourceData instead.")]
102 [EditorBrowsable(EditorBrowsableState.Never)]
103 public new GestureSourceType SourceType
107 return (GestureSourceType)SourceData;
111 private uint numberOfTaps
115 Interop.TapGesture.NumberOfTapsSet(SwigCPtr, value);
116 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
120 uint ret = Interop.TapGesture.NumberOfTapsGet(SwigCPtr);
121 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
126 private uint numberOfTouches
130 Interop.TapGesture.NumberOfTouchesSet(SwigCPtr, value);
131 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
135 uint ret = Interop.TapGesture.NumberOfTouchesGet(SwigCPtr);
136 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
141 private Vector2 screenPoint
145 Interop.TapGesture.ScreenPointSet(SwigCPtr, Vector2.getCPtr(value));
146 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
150 global::System.IntPtr cPtr = Interop.TapGesture.ScreenPointGet(SwigCPtr);
151 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
152 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
157 private Vector2 localPoint
161 Interop.TapGesture.LocalPointSet(SwigCPtr, Vector2.getCPtr(value));
162 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
166 global::System.IntPtr cPtr = Interop.TapGesture.LocalPointGet(SwigCPtr);
167 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
168 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
174 /// Gets the TapGesture from the pointer.
176 /// <param name="cPtr">The pointer to cast.</param>
177 /// <returns>The TapGesture object.</returns>
178 internal static TapGesture GetTapGestureFromPtr(global::System.IntPtr cPtr)
180 TapGesture ret = new TapGesture(cPtr, false);
181 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
185 /// This will not be public opened.
186 [EditorBrowsable(EditorBrowsableState.Never)]
187 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
189 Interop.TapGesture.DeleteTapGesture(swigCPtr);
194 /// Gesture source type.
195 /// Deprecated. This value will be deleted without notice. Please do not use it.
197 [Obsolete("This enum will be deleted without notice. Please do not use it.")]
198 [EditorBrowsable(EditorBrowsableState.Never)]
199 public enum GestureSourceType
204 [EditorBrowsable(EditorBrowsableState.Never)]
209 [EditorBrowsable(EditorBrowsableState.Never)]
214 [EditorBrowsable(EditorBrowsableState.Never)]
219 [EditorBrowsable(EditorBrowsableState.Never)]