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 long press gesture is emitted when the user holds the screen with the stated number of fingers.<br />
23 /// A long press gesture finishes when all touches have been released.<br />
25 /// <since_tizen> 3 </since_tizen>
26 public class LongPressGesture : Gesture
28 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
33 /// <param name="state">The state of the gesture</param>
34 /// <since_tizen> 3 </since_tizen>
35 public LongPressGesture(Gesture.StateType state) : this(Interop.LongPressGesture.new_LongPressGesture__SWIG_0((int)state), true)
37 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
40 internal LongPressGesture(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.LongPressGesture.LongPressGesture_SWIGUpcast(cPtr), cMemoryOwn)
42 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
46 /// The number of touch points in this long press gesture, i.e., the number of fingers the user had
47 /// on the screen to generate the long press gesture.<br />
49 /// <since_tizen> 3 </since_tizen>
50 public uint NumberOfTouches
54 return numberOfTouches;
59 /// This is the point, in screen coordinates, where the long press occurred.<br />
60 /// If a multi-touch long press, then this is the centroid of all the touch points.<br />
62 /// <since_tizen> 3 </since_tizen>
63 public Vector2 ScreenPoint
72 /// This is the point, in local actor coordinates, where the long press occurred.<br />
73 /// If a multi-touch long press, then this is the centroid of all the touch points.<br />
75 /// <since_tizen> 3 </since_tizen>
76 public Vector2 LocalPoint
85 private uint numberOfTouches
89 Interop.LongPressGesture.LongPressGesture_numberOfTouches_set(swigCPtr, value);
90 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
94 uint ret = Interop.LongPressGesture.LongPressGesture_numberOfTouches_get(swigCPtr);
95 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
100 private Vector2 screenPoint
104 Interop.LongPressGesture.LongPressGesture_screenPoint_set(swigCPtr, Vector2.getCPtr(value));
105 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
109 global::System.IntPtr cPtr = Interop.LongPressGesture.LongPressGesture_screenPoint_get(swigCPtr);
110 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
111 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
116 private Vector2 localPoint
120 Interop.LongPressGesture.LongPressGesture_localPoint_set(swigCPtr, Vector2.getCPtr(value));
121 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
125 global::System.IntPtr cPtr = Interop.LongPressGesture.LongPressGesture_localPoint_get(swigCPtr);
126 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
127 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
132 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(LongPressGesture obj)
134 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
137 internal static LongPressGesture GetLongPressGestureFromPtr(global::System.IntPtr cPtr)
139 LongPressGesture ret = new LongPressGesture(cPtr, false);
140 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
147 /// <since_tizen> 3 </since_tizen>
148 protected override void Dispose(DisposeTypes type)
155 //Release your own unmanaged resources here.
156 //You should not access any managed member here except static instance.
157 //because the execution order of Finalizes is non-deterministic.
159 if (swigCPtr.Handle != global::System.IntPtr.Zero)
164 Interop.LongPressGesture.delete_LongPressGesture(swigCPtr);
166 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);