2 * Copyright(c) 2021 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.Runtime.InteropServices;
19 using Tizen.NUI.BaseComponents;
20 using System.ComponentModel;
25 /// This class emits a signals when a pan gesture occurs.<br />
27 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
28 [EditorBrowsable(EditorBrowsableState.Never)]
29 public class PanGestureDetector : GestureDetector
32 /// Creates an initialized PanGestureDetector.
34 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
35 [EditorBrowsable(EditorBrowsableState.Never)]
36 public PanGestureDetector() : this(Interop.PanGestureDetector.New(), true)
38 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
43 /// The copy constructor.
45 /// <param name="handle">A reference to the copied handle</param>
46 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
47 [EditorBrowsable(EditorBrowsableState.Never)]
48 public PanGestureDetector(PanGestureDetector handle) : this(Interop.PanGestureDetector.NewPanGestureDetector(PanGestureDetector.getCPtr(handle)), true)
50 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
53 internal PanGestureDetector(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
57 private DaliEventHandler<object, DetectedEventArgs> detectedEventHandler;
58 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
59 private delegate void DetectedCallbackType(IntPtr actor, IntPtr panGesture);
60 private DetectedCallbackType detectedCallback;
63 /// This signal is emitted when the specified pan is detected on the attached view.
65 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
66 [EditorBrowsable(EditorBrowsableState.Never)]
67 public event DaliEventHandler<object, DetectedEventArgs> Detected
71 if (detectedEventHandler == null)
73 detectedCallback = OnPanGestureDetected;
74 using PanGestureDetectedSignal signal = new PanGestureDetectedSignal(Interop.PanGestureDetector.DetectedSignal(SwigCPtr), false);
75 signal?.Connect(detectedCallback);
77 detectedEventHandler += value;
81 detectedEventHandler -= value;
82 if (detectedEventHandler == null)
84 using PanGestureDetectedSignal signal = new PanGestureDetectedSignal(Interop.PanGestureDetector.DetectedSignal(SwigCPtr), false);
85 if (signal?.Empty() == false)
87 signal?.Disconnect(detectedCallback);
88 if (signal?.Empty() == true)
90 detectedCallback = null;
98 /// For a left pan (-PI Radians).
100 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
101 [EditorBrowsable(EditorBrowsableState.Never)]
102 public static Radian DirectionLeft
106 global::System.IntPtr cPtr = Interop.PanGestureDetector.DirectionLeftGet();
107 Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false);
108 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
114 /// For a right pan (0 Radians).
116 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
117 [EditorBrowsable(EditorBrowsableState.Never)]
118 public static Radian DirectionRight
122 global::System.IntPtr cPtr = Interop.PanGestureDetector.DirectionRightGet();
123 Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false);
124 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
130 /// For an up pan (-0.5 * PI Radians).
132 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
133 [EditorBrowsable(EditorBrowsableState.Never)]
134 public static Radian DirectionUp
138 global::System.IntPtr cPtr = Interop.PanGestureDetector.DirectionUpGet();
139 Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false);
140 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
146 /// For a down pan (0.5 * PI Radians).
148 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
149 [EditorBrowsable(EditorBrowsableState.Never)]
150 public static Radian DirectionDown
154 global::System.IntPtr cPtr = Interop.PanGestureDetector.DirectionDownGet();
155 Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false);
156 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
162 /// For a left and right pan (PI Radians). Useful for AddDirection().
164 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
165 [EditorBrowsable(EditorBrowsableState.Never)]
166 public static Radian DirectionHorizontal
170 global::System.IntPtr cPtr = Interop.PanGestureDetector.DirectionHorizontalGet();
171 Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false);
172 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
178 /// For an up and down pan (-0.5 * PI Radians). Useful for AddDirection().
180 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
181 [EditorBrowsable(EditorBrowsableState.Never)]
182 public static Radian DirectionVertical
186 global::System.IntPtr cPtr = Interop.PanGestureDetector.DirectionVerticalGet();
187 Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false);
188 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
194 /// The default threshold is PI * 0.25 radians (or 45 degrees).
196 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
197 [EditorBrowsable(EditorBrowsableState.Never)]
198 public static Radian DefaultThreshold
202 global::System.IntPtr cPtr = Interop.PanGestureDetector.DefaultThresholdGet();
203 Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false);
204 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
210 /// Retrieves the screen position.
212 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
213 [EditorBrowsable(EditorBrowsableState.Never)]
214 public Vector2 ScreenPosition
218 Vector2 temp = new Vector2(0.0f, 0.0f);
219 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
225 /// Retrieves the screen displacement.
227 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
228 [EditorBrowsable(EditorBrowsableState.Never)]
229 public Vector2 ScreenDisplacement
233 Vector2 temp = new Vector2(0.0f, 0.0f);
234 var pValue = Tizen.NUI.Object.GetProperty(SwigCPtr, PanGestureDetector.Property.ScreenDisplacement);
242 /// Retrieves the screen velocity.
244 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
245 [EditorBrowsable(EditorBrowsableState.Never)]
246 public Vector2 ScreenVelocity
250 Vector2 temp = new Vector2(0.0f, 0.0f);
251 var pValue = Tizen.NUI.Object.GetProperty(SwigCPtr, PanGestureDetector.Property.ScreenVelocity);
259 /// Retrieves the local position.
261 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
262 [EditorBrowsable(EditorBrowsableState.Never)]
263 public Vector2 LocalPosition
267 Vector2 temp = new Vector2(0.0f, 0.0f);
268 var pValue = Tizen.NUI.Object.GetProperty(SwigCPtr, PanGestureDetector.Property.LocalPosition);
276 /// Retrieves the local displacement
278 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
279 [EditorBrowsable(EditorBrowsableState.Never)]
280 public Vector2 LocalDisplacement
284 Vector2 temp = new Vector2(0.0f, 0.0f);
285 var pValue = Tizen.NUI.Object.GetProperty(SwigCPtr, PanGestureDetector.Property.LocalDisplacement);
293 /// Retrieves the local velocity.
295 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
296 [EditorBrowsable(EditorBrowsableState.Never)]
297 public Vector2 LocalVelocity
301 Vector2 temp = new Vector2(0.0f, 0.0f);
302 var pValue = Tizen.NUI.Object.GetProperty(SwigCPtr, PanGestureDetector.Property.LocalVelocity);
310 /// Retrieves the panning flag.
312 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
313 [EditorBrowsable(EditorBrowsableState.Never)]
319 var pValue = Tizen.NUI.Object.GetProperty(SwigCPtr, PanGestureDetector.Property.PANNING);
320 pValue.Get(out temp);
327 /// This is the minimum number of touches required for the pan gesture to be detected.
329 /// <param name="minimum">Minimum touches required</param>
330 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
331 [EditorBrowsable(EditorBrowsableState.Never)]
332 public void SetMinimumTouchesRequired(uint minimum)
334 Interop.PanGestureDetector.SetMinimumTouchesRequired(SwigCPtr, minimum);
335 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
339 /// This is the maximum number of touches required for the pan gesture to be detected.
341 /// <param name="maximum">Maximum touches required</param>
342 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
343 [EditorBrowsable(EditorBrowsableState.Never)]
344 public void SetMaximumTouchesRequired(uint maximum)
346 Interop.PanGestureDetector.SetMaximumTouchesRequired(SwigCPtr, maximum);
347 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
351 /// Set a maximum duration of motion event that is able to live on the pan gesture event queue.
352 /// If duration exceed it, the motion event is discarded.
354 /// <param name="maximumAgeMilliSecond">Maximum age of motion events as milliseconds</param>
355 [EditorBrowsable(EditorBrowsableState.Never)]
356 public void SetMaximumMotionEventAge(uint maximumAgeMilliSecond)
358 Interop.PanGestureDetector.SetMaximumMotionEventAge(SwigCPtr, maximumAgeMilliSecond);
359 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
363 /// Retrieves the minimum number of touches required for the pan gesture to be detected.
365 /// <returns>The minimum touches required</returns>
366 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
367 [EditorBrowsable(EditorBrowsableState.Never)]
368 public uint GetMinimumTouchesRequired()
370 uint ret = Interop.PanGestureDetector.GetMinimumTouchesRequired(SwigCPtr);
371 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
376 /// Retrieves the maximum number of touches required for the pan gesture to be detected.
378 /// <returns>The maximum touches required</returns>
379 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
380 [EditorBrowsable(EditorBrowsableState.Never)]
381 public uint GetMaximumTouchesRequired()
383 uint ret = Interop.PanGestureDetector.GetMaximumTouchesRequired(SwigCPtr);
384 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
389 /// Retrieves the maximum age for the pan gesture motion as milliseconds.
391 /// <returns>The maximum age of motion events as milliseconds</returns>
392 [EditorBrowsable(EditorBrowsableState.Never)]
393 public uint GetMaximumMotionEventAge()
395 uint ret = Interop.PanGestureDetector.GetMaximumMotionEventAge(SwigCPtr);
396 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
401 /// The pan gesture is only emitted if the pan occurs in the direction specified by this method with a +/- threshold allowance.<br />
402 /// If an angle of 0.0 degrees is specified and the threshold is 45 degrees then the acceptable direction range is from -45 to 45 degrees.<br />
403 /// The angle added using this API is only checked when the gesture first starts, after that, this detector will emit the gesture regardless of what angle the pan is moving.
404 /// The user can add as many angles as they require.
406 /// <param name="angle">The angle that pan should be allowed</param>
407 /// <param name="threshold">The threshold around that angle</param>
408 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
409 [EditorBrowsable(EditorBrowsableState.Never)]
410 public void AddAngle(Radian angle, Radian threshold)
412 Interop.PanGestureDetector.AddAngle(SwigCPtr, Radian.getCPtr(angle), Radian.getCPtr(threshold));
413 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
417 /// The pan gesture is only emitted if the pan occurs in the direction specified by this method with a +/- threshold allowance. The default threshold (PI * 0.25) is used.<br />
418 /// The angle added using this API is only checked when the gesture first starts, after that, this detector will emit the gesture regardless of what angle the pan is moving.<br />
419 /// The user can add as many angles as they require.<br />
421 /// <param name="angle">The angle that pan should be allowed</param>
422 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
423 [EditorBrowsable(EditorBrowsableState.Never)]
424 public void AddAngle(Radian angle)
426 Interop.PanGestureDetector.AddAngle(SwigCPtr, Radian.getCPtr(angle));
427 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
431 /// A helper method for adding bi-directional angles where the pan should take place.<br />
432 /// In other words, if 0 is requested, then PI will also be added so that we have both left and right scrolling.<br />
434 /// <param name="direction">The direction of panning required</param>
435 /// <param name="threshold">The threshold</param>
436 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
437 [EditorBrowsable(EditorBrowsableState.Never)]
438 public void AddDirection(Radian direction, Radian threshold)
440 Interop.PanGestureDetector.AddDirection(SwigCPtr, Radian.getCPtr(direction), Radian.getCPtr(threshold));
441 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
445 /// A helper method for adding bi-directional angles where the pan should take place.
446 /// In other words, if 0 is requested, then PI will also be added so that we have both left and right scrolling.<br />
447 /// The default threshold (PI * 0.25) is used.
449 /// <param name="direction">The direction of panning required</param>
450 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
451 [EditorBrowsable(EditorBrowsableState.Never)]
452 public void AddDirection(Radian direction)
454 Interop.PanGestureDetector.AddDirection(SwigCPtr, Radian.getCPtr(direction));
455 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
459 /// Returns the count of angles that this pan gesture detector emits a signal.
461 /// <returns>The gesture detector has been initialized.</returns>
462 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
463 [EditorBrowsable(EditorBrowsableState.Never)]
464 public uint GetAngleCount()
466 uint ret = Interop.PanGestureDetector.GetAngleCount(SwigCPtr);
467 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
472 /// Clears any directional angles that are used by the gesture detector.
474 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
475 [EditorBrowsable(EditorBrowsableState.Never)]
476 public void ClearAngles()
478 Interop.PanGestureDetector.ClearAngles(SwigCPtr);
479 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
483 /// Removes the angle specified from the container. This will only remove the first instance of the angle found from the container.
485 /// <param name="angle">The angle to remove</param>
486 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
487 [EditorBrowsable(EditorBrowsableState.Never)]
488 public void RemoveAngle(Radian angle)
490 Interop.PanGestureDetector.RemoveAngle(SwigCPtr, Radian.getCPtr(angle));
491 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
495 /// Removes the two angles that make up the direction from the container.
497 /// <param name="direction">The direction to remove</param>
498 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
499 [EditorBrowsable(EditorBrowsableState.Never)]
500 public void RemoveDirection(Radian direction)
502 Interop.PanGestureDetector.RemoveDirection(SwigCPtr, Radian.getCPtr(direction));
503 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
507 /// Allows setting of the pan properties that are returned in constraints.
509 /// <param name="pan">The pan gesture to set</param>
510 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
511 [EditorBrowsable(EditorBrowsableState.Never)]
512 public static void SetPanGestureProperties(PanGesture pan)
514 Interop.PanGestureDetector.SetPanGestureProperties(PanGesture.getCPtr(pan));
515 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
518 internal static PanGestureDetector GetPanGestureDetectorFromPtr(global::System.IntPtr cPtr)
520 PanGestureDetector ret = new PanGestureDetector(cPtr, false);
521 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
525 internal new static PanGestureDetector DownCast(BaseHandle handle)
527 PanGestureDetector ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as PanGestureDetector;
528 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
532 internal AngleThresholdPair GetAngle(uint index)
534 AngleThresholdPair ret = new AngleThresholdPair(Interop.PanGestureDetector.GetAngle(SwigCPtr, index), true);
535 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
539 internal PanGestureDetector Assign(PanGestureDetector rhs)
541 PanGestureDetector ret = new PanGestureDetector(Interop.PanGestureDetector.Assign(SwigCPtr, PanGestureDetector.getCPtr(rhs)), false);
542 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
547 /// override it to clean-up your own resources.
549 /// <param name="type"></param>
550 [EditorBrowsable(EditorBrowsableState.Never)]
551 protected override void Dispose(DisposeTypes type)
558 if (type == DisposeTypes.Explicit)
561 //Release your own managed resources here.
562 //You should release all of your own disposable objects here.
565 //Release your own unmanaged resources here.
566 //You should not access any managed member here except static instance.
567 //because the execution order of Finalizes is non-deterministic.
571 if (detectedCallback != null)
573 using PanGestureDetectedSignal signal = new PanGestureDetectedSignal(Interop.PanGestureDetector.DetectedSignal(GetBaseHandleCPtrHandleRef), false);
574 signal?.Disconnect(detectedCallback);
575 detectedCallback = null;
581 /// This will not be public opened.
582 [EditorBrowsable(EditorBrowsableState.Never)]
583 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
585 Interop.PanGestureDetector.DeletePanGestureDetector(swigCPtr);
588 private void OnPanGestureDetected(IntPtr actor, IntPtr panGesture)
590 if (IsNativeHandleInvalid())
594 if (detectedEventHandler != null)
596 var process = global::System.Diagnostics.Process.GetCurrentProcess();
597 var processId = process?.Id ?? -1;
598 var thread = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
599 var me = this.GetType().FullName;
601 Tizen.Log.Error("NUI", $"Error! NUI's native dali object is already disposed. " +
602 $"OR the native dali object handle of NUI becomes null! \n" +
603 $" process:{processId} thread:{thread}, isDisposed:{this.Disposed}, isDisposeQueued:{this.IsDisposeQueued}, me:{me}\n");
610 if (this.IsDisposeQueued)
612 var process = global::System.Diagnostics.Process.GetCurrentProcess();
613 var processId = process?.Id ?? -1;
614 var thread = global::System.Threading.Thread.CurrentThread.ManagedThreadId;
615 var me = this.GetType().FullName;
617 //in this case, this object is ready to be disposed waiting on DisposeQueue, so event callback should not be invoked!
618 Tizen.Log.Error("NUI", "in this case, the View object is ready to be disposed waiting on DisposeQueue, so event callback should not be invoked! just return here! \n" +
619 $"process:{processId} thread:{thread}, isDisposed:{this.Disposed}, isDisposeQueued:{this.IsDisposeQueued}, me:{me}\n");
627 if (detectedEventHandler != null)
629 DetectedEventArgs e = new DetectedEventArgs();
631 // Populate all members of "e" (PanGestureEventArgs) with real data
632 e.View = Registry.GetManagedBaseHandleFromNativePtr(actor) as View;
635 e.View = Registry.GetManagedBaseHandleFromRefObject(actor) as View;
638 // If DispatchGestureEvents is false, no gesture events are dispatched.
639 if (e.View != null && e.View.DispatchGestureEvents == false)
644 e.PanGesture = Tizen.NUI.PanGesture.GetPanGestureFromPtr(panGesture);
645 detectedEventHandler(this, e);
650 /// Event arguments that are passed via the PanGestureEvent signal.
652 /// <since_tizen> 5 </since_tizen>
653 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
654 [EditorBrowsable(EditorBrowsableState.Never)]
655 public class DetectedEventArgs : EventArgs
658 private PanGesture panGesture;
659 private bool handled = true;
662 /// The attached view.
664 /// <since_tizen> 5 </since_tizen>
665 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
666 [EditorBrowsable(EditorBrowsableState.Never)]
682 /// <since_tizen> 5 </since_tizen>
683 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
684 [EditorBrowsable(EditorBrowsableState.Never)]
685 public PanGesture PanGesture
698 /// Gets or sets a value that indicates whether the event handler has completely handled the event or whether the system should continue its own processing.
700 [EditorBrowsable(EditorBrowsableState.Never)]
707 Interop.Actor.SetNeedGesturePropagation(View.getCPtr(view), !value);
708 if (NDalicPINVOKE.SWIGPendingException.Pending)
709 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
714 internal class Property
716 internal static readonly int ScreenPosition = Interop.PanGestureDetector.ScreenPositionGet();
717 internal static readonly int ScreenDisplacement = Interop.PanGestureDetector.ScreenDisplacementGet();
718 internal static readonly int ScreenVelocity = Interop.PanGestureDetector.ScreenVelocityGet();
719 internal static readonly int LocalPosition = Interop.PanGestureDetector.LocalPositionGet();
720 internal static readonly int LocalDisplacement = Interop.PanGestureDetector.LocalDisplacementGet();
721 internal static readonly int LocalVelocity = Interop.PanGestureDetector.LocalVelocityGet();
722 internal static readonly int PANNING = Interop.PanGestureDetector.PanningGet();