/* * Copyright(c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ using System.ComponentModel; namespace Tizen.NUI { /// /// A TapGesture is emitted when the user taps the screen with the stated number of fingers a stated number of times. /// /// 3 public class TapGesture : Gesture { /// /// Creates a TapGesture. /// /// 3 public TapGesture() : this(Interop.TapGesture.New(0), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } internal TapGesture(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.TapGesture.Upcast(cPtr), cMemoryOwn) { } /// /// The number of taps property (read-only). /// /// 3 public uint NumberOfTaps { get { return numberOfTaps; } } /// /// The number of touches property (read-only). /// /// 3 public uint NumberOfTouches { get { return numberOfTouches; } } /// /// The screen point property (read-only). /// /// 3 public Vector2 ScreenPoint { get { return screenPoint; } } /// /// The local point property (read-only). /// /// 3 public Vector2 LocalPoint { get { return localPoint; } } private uint numberOfTaps { set { Interop.TapGesture.NumberOfTapsSet(swigCPtr, value); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } get { uint ret = Interop.TapGesture.NumberOfTapsGet(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } private uint numberOfTouches { set { Interop.TapGesture.NumberOfTouchesSet(swigCPtr, value); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } get { uint ret = Interop.TapGesture.NumberOfTouchesGet(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } private Vector2 screenPoint { set { Interop.TapGesture.ScreenPointSet(swigCPtr, Vector2.getCPtr(value)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } get { global::System.IntPtr cPtr = Interop.TapGesture.ScreenPointGet(swigCPtr); Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } private Vector2 localPoint { set { Interop.TapGesture.LocalPointSet(swigCPtr, Vector2.getCPtr(value)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } get { global::System.IntPtr cPtr = Interop.TapGesture.LocalPointGet(swigCPtr); Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TapGesture obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } /// /// Gets the TapGesture from the pointer. /// /// The pointer to cast. /// The TapGesture object. internal static TapGesture GetTapGestureFromPtr(global::System.IntPtr cPtr) { TapGesture ret = new TapGesture(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } /// This will not be public opened. [EditorBrowsable(EditorBrowsableState.Never)] protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr) { Interop.TapGesture.DeleteTapGesture(swigCPtr); } } }