More SVACE fixes
[platform/core/uifw/dali-toolkit.git] / plugins / dali-swig / automatic / csharp / PanGestureDetector.cs
1 /** Copyright (c) 2016 Samsung Electronics Co., Ltd.
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 *
15 */
16 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
17 //------------------------------------------------------------------------------
18 // <auto-generated />
19 //
20 // This file was automatically generated by SWIG (http://www.swig.org).
21 // Version 3.0.9
22 //
23 // Do not make changes to this file unless you know what you are doing--modify
24 // the SWIG interface file instead.
25 //------------------------------------------------------------------------------
26
27 namespace Dali {
28
29 using System;
30 using System.Runtime.InteropServices;
31
32
33 public class PanGestureDetector : GestureDetector {
34   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
35
36   internal PanGestureDetector(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PanGestureDetector_SWIGUpcast(cPtr), cMemoryOwn) {
37     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
38   }
39
40   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PanGestureDetector obj) {
41     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
42   }
43
44   ~PanGestureDetector() {
45     Dispose();
46   }
47
48   public override void Dispose() {
49     lock(this) {
50       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
51         if (swigCMemOwn) {
52           swigCMemOwn = false;
53           NDalicPINVOKE.delete_PanGestureDetector(swigCPtr);
54         }
55         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
56       }
57       global::System.GC.SuppressFinalize(this);
58       base.Dispose();
59     }
60   }
61
62
63
64 public class DetectedEventArgs : EventArgs
65 {
66    private Actor _actor;
67    private PanGesture _panGesture;
68
69    public Actor Actor
70    {
71       get
72       {
73          return _actor;
74       }
75       set
76       {
77          _actor = value;
78       }
79    }
80
81    public PanGesture PanGesture
82    {
83       get
84       {
85          return _panGesture;
86       }
87       set
88       {
89          _panGesture = value;
90       }
91    }
92 }
93
94   [UnmanagedFunctionPointer(CallingConvention.StdCall)]
95   private delegate void DetectedCallbackDelegate(IntPtr actor, IntPtr panGesture);
96   private DaliEventHandler<object,DetectedEventArgs> _panGestureEventHandler;
97   private DetectedCallbackDelegate _panGestureCallbackDelegate;
98
99
100   public event DaliEventHandler<object,DetectedEventArgs> Detected
101   {
102      add
103      {
104         lock(this)
105         {
106            // Restricted to only one listener
107            if (_panGestureEventHandler == null)
108            {
109               _panGestureEventHandler += value;
110
111               _panGestureCallbackDelegate = new DetectedCallbackDelegate(OnPanGestureDetected);
112               this.DetectedSignal().Connect(_panGestureCallbackDelegate);
113            }
114         }
115      }
116
117      remove
118      {
119         lock(this)
120         {
121            if (_panGestureEventHandler != null)
122            {
123               this.DetectedSignal().Disconnect(_panGestureCallbackDelegate);
124            }
125
126            _panGestureEventHandler -= value;
127         }
128      }
129   }
130
131  private void OnPanGestureDetected(IntPtr actor, IntPtr panGesture)
132   {
133    DetectedEventArgs e = new DetectedEventArgs();
134
135    // Populate all members of "e" (PanGestureEventArgs) with real data
136    e.Actor = Actor.GetActorFromPtr(actor);
137    e.PanGesture = Dali.PanGesture.GetPanGestureFromPtr(panGesture);
138
139    if (_panGestureEventHandler != null)
140    {
141       //here we send all data to user event handlers
142       _panGestureEventHandler(this, e);
143    }
144
145   }
146
147
148 public static PanGestureDetector GetPanGestureDetectorFromPtr(global::System.IntPtr cPtr) {
149     PanGestureDetector ret = new PanGestureDetector(cPtr, false);
150    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
151     return ret;
152   }
153
154
155   public class Property : global::System.IDisposable {
156     private global::System.Runtime.InteropServices.HandleRef swigCPtr;
157     protected bool swigCMemOwn;
158   
159     internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) {
160       swigCMemOwn = cMemoryOwn;
161       swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
162     }
163   
164     internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) {
165       return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
166     }
167   
168     ~Property() {
169       Dispose();
170     }
171   
172     public virtual void Dispose() {
173       lock(this) {
174         if (swigCPtr.Handle != global::System.IntPtr.Zero) {
175           if (swigCMemOwn) {
176             swigCMemOwn = false;
177             NDalicPINVOKE.delete_PanGestureDetector_Property(swigCPtr);
178           }
179           swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
180         }
181         global::System.GC.SuppressFinalize(this);
182       }
183     }
184   
185     public Property() : this(NDalicPINVOKE.new_PanGestureDetector_Property(), true) {
186       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
187     }
188   
189     public static readonly int SCREEN_POSITION = NDalicPINVOKE.PanGestureDetector_Property_SCREEN_POSITION_get();
190     public static readonly int SCREEN_DISPLACEMENT = NDalicPINVOKE.PanGestureDetector_Property_SCREEN_DISPLACEMENT_get();
191     public static readonly int SCREEN_VELOCITY = NDalicPINVOKE.PanGestureDetector_Property_SCREEN_VELOCITY_get();
192     public static readonly int LOCAL_POSITION = NDalicPINVOKE.PanGestureDetector_Property_LOCAL_POSITION_get();
193     public static readonly int LOCAL_DISPLACEMENT = NDalicPINVOKE.PanGestureDetector_Property_LOCAL_DISPLACEMENT_get();
194     public static readonly int LOCAL_VELOCITY = NDalicPINVOKE.PanGestureDetector_Property_LOCAL_VELOCITY_get();
195     public static readonly int PANNING = NDalicPINVOKE.PanGestureDetector_Property_PANNING_get();
196   
197   }
198
199   public static Radian DIRECTION_LEFT {
200     get {
201       global::System.IntPtr cPtr = NDalicPINVOKE.PanGestureDetector_DIRECTION_LEFT_get();
202       Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false);
203       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
204       return ret;
205     } 
206   }
207
208   public static Radian DIRECTION_RIGHT {
209     get {
210       global::System.IntPtr cPtr = NDalicPINVOKE.PanGestureDetector_DIRECTION_RIGHT_get();
211       Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false);
212       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
213       return ret;
214     } 
215   }
216
217   public static Radian DIRECTION_UP {
218     get {
219       global::System.IntPtr cPtr = NDalicPINVOKE.PanGestureDetector_DIRECTION_UP_get();
220       Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false);
221       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
222       return ret;
223     } 
224   }
225
226   public static Radian DIRECTION_DOWN {
227     get {
228       global::System.IntPtr cPtr = NDalicPINVOKE.PanGestureDetector_DIRECTION_DOWN_get();
229       Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false);
230       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
231       return ret;
232     } 
233   }
234
235   public static Radian DIRECTION_HORIZONTAL {
236     get {
237       global::System.IntPtr cPtr = NDalicPINVOKE.PanGestureDetector_DIRECTION_HORIZONTAL_get();
238       Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false);
239       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
240       return ret;
241     } 
242   }
243
244   public static Radian DIRECTION_VERTICAL {
245     get {
246       global::System.IntPtr cPtr = NDalicPINVOKE.PanGestureDetector_DIRECTION_VERTICAL_get();
247       Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false);
248       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
249       return ret;
250     } 
251   }
252
253   public static Radian DEFAULT_THRESHOLD {
254     get {
255       global::System.IntPtr cPtr = NDalicPINVOKE.PanGestureDetector_DEFAULT_THRESHOLD_get();
256       Radian ret = (cPtr == global::System.IntPtr.Zero) ? null : new Radian(cPtr, false);
257       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
258       return ret;
259     } 
260   }
261
262   public PanGestureDetector () : this (NDalicPINVOKE.PanGestureDetector_New(), true) {
263       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
264
265   }
266   public new static PanGestureDetector DownCast(BaseHandle handle) {
267     PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.PanGestureDetector_DownCast(BaseHandle.getCPtr(handle)), true);
268     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
269     return ret;
270   }
271
272   public PanGestureDetector(PanGestureDetector handle) : this(NDalicPINVOKE.new_PanGestureDetector__SWIG_1(PanGestureDetector.getCPtr(handle)), true) {
273     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
274   }
275
276   public PanGestureDetector Assign(PanGestureDetector rhs) {
277     PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.PanGestureDetector_Assign(swigCPtr, PanGestureDetector.getCPtr(rhs)), false);
278     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
279     return ret;
280   }
281
282   public void SetMinimumTouchesRequired(uint minimum) {
283     NDalicPINVOKE.PanGestureDetector_SetMinimumTouchesRequired(swigCPtr, minimum);
284     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
285   }
286
287   public void SetMaximumTouchesRequired(uint maximum) {
288     NDalicPINVOKE.PanGestureDetector_SetMaximumTouchesRequired(swigCPtr, maximum);
289     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
290   }
291
292   public uint GetMinimumTouchesRequired() {
293     uint ret = NDalicPINVOKE.PanGestureDetector_GetMinimumTouchesRequired(swigCPtr);
294     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
295     return ret;
296   }
297
298   public uint GetMaximumTouchesRequired() {
299     uint ret = NDalicPINVOKE.PanGestureDetector_GetMaximumTouchesRequired(swigCPtr);
300     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
301     return ret;
302   }
303
304   public void AddAngle(Radian angle, Radian threshold) {
305     NDalicPINVOKE.PanGestureDetector_AddAngle__SWIG_0(swigCPtr, Radian.getCPtr(angle), Radian.getCPtr(threshold));
306     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
307   }
308
309   public void AddAngle(Radian angle) {
310     NDalicPINVOKE.PanGestureDetector_AddAngle__SWIG_1(swigCPtr, Radian.getCPtr(angle));
311     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
312   }
313
314   public void AddDirection(Radian direction, Radian threshold) {
315     NDalicPINVOKE.PanGestureDetector_AddDirection__SWIG_0(swigCPtr, Radian.getCPtr(direction), Radian.getCPtr(threshold));
316     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
317   }
318
319   public void AddDirection(Radian direction) {
320     NDalicPINVOKE.PanGestureDetector_AddDirection__SWIG_1(swigCPtr, Radian.getCPtr(direction));
321     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
322   }
323
324   public uint GetAngleCount() {
325     uint ret = NDalicPINVOKE.PanGestureDetector_GetAngleCount(swigCPtr);
326     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
327     return ret;
328   }
329
330   public AngleThresholdPair GetAngle(uint index) {
331     AngleThresholdPair ret = new AngleThresholdPair(NDalicPINVOKE.PanGestureDetector_GetAngle(swigCPtr, index), true);
332     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
333     return ret;
334   }
335
336   public void ClearAngles() {
337     NDalicPINVOKE.PanGestureDetector_ClearAngles(swigCPtr);
338     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
339   }
340
341   public void RemoveAngle(Radian angle) {
342     NDalicPINVOKE.PanGestureDetector_RemoveAngle(swigCPtr, Radian.getCPtr(angle));
343     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
344   }
345
346   public void RemoveDirection(Radian direction) {
347     NDalicPINVOKE.PanGestureDetector_RemoveDirection(swigCPtr, Radian.getCPtr(direction));
348     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
349   }
350
351   public PanGestureDetectedSignal DetectedSignal() {
352     PanGestureDetectedSignal ret = new PanGestureDetectedSignal(NDalicPINVOKE.PanGestureDetector_DetectedSignal(swigCPtr), false);
353     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
354     return ret;
355   }
356
357   public static void SetPanGestureProperties(PanGesture pan) {
358     NDalicPINVOKE.PanGestureDetector_SetPanGestureProperties(PanGesture.getCPtr(pan));
359     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
360   }
361
362   public Vector2 ScreenPosition 
363   { 
364     get 
365     {
366       Vector2 temp = new Vector2(0.0f,0.0f);
367       GetProperty( PanGestureDetector.Property.SCREEN_POSITION).Get(  temp );
368       return temp;
369     }
370 }  public Vector2 ScreenDisplacement 
371   { 
372     get 
373     {
374       Vector2 temp = new Vector2(0.0f,0.0f);
375       GetProperty( PanGestureDetector.Property.SCREEN_DISPLACEMENT).Get(  temp );
376       return temp;
377     }
378 }  public Vector2 ScreenVelocity 
379   { 
380     get 
381     {
382       Vector2 temp = new Vector2(0.0f,0.0f);
383       GetProperty( PanGestureDetector.Property.SCREEN_VELOCITY).Get(  temp );
384       return temp;
385     }
386 }  public Vector2 LocalPosition 
387   { 
388     get 
389     {
390       Vector2 temp = new Vector2(0.0f,0.0f);
391       GetProperty( PanGestureDetector.Property.LOCAL_POSITION).Get(  temp );
392       return temp;
393     }
394 }  public Vector2 LocalDisplacement 
395   { 
396     get 
397     {
398       Vector2 temp = new Vector2(0.0f,0.0f);
399       GetProperty( PanGestureDetector.Property.LOCAL_DISPLACEMENT).Get(  temp );
400       return temp;
401     }
402 }  public Vector2 LocalVelocity 
403   { 
404     get 
405     {
406       Vector2 temp = new Vector2(0.0f,0.0f);
407       GetProperty( PanGestureDetector.Property.LOCAL_VELOCITY).Get(  temp );
408       return temp;
409     }
410 }  public bool Panning 
411   { 
412     get 
413     {
414       bool temp = false;
415       GetProperty( PanGestureDetector.Property.PANNING).Get( ref temp );
416       return temp;
417     }
418 }
419 }
420
421 }